Skip to content
Snippets Groups Projects
Commit 7b9b8712 authored by Ankur Mittal's avatar Ankur Mittal Committed by CQ bot account: commit-bot@chromium.org
Browse files

Revert "[drivers] Avoid system/dev/lib/mmio deps in libraries and tests"

This reverts commit e5444b60.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [drivers] Avoid system/dev/lib/mmio deps in libraries and tests
> 
> Test code needs to use the mock mmio library header while driver
> code needs to use the real mmio library header.  Hence, a library
> like ddktl or hwreg that is used in both contexts cannot rely on
> this header directly.  Instead, make the APIs agnostic to mmio
> implementation by using forward declarations and requiring users of
> the mmio-related APIs to #include what they use.
> 
> The renaming of the mock library to aaa-mock-mmio-reg was a previous
> attempt to work around this issue, which is actually wholly
> inadequate in the current build system.  So the library is renamed
> back to mock-mmio-reg.
> 
> In the hwreg library, this was achieved by using a template common
> to the kernel and non-kernel cases, rather than an explicit forward
> declaration.  To make that work, the argument order for
> RegisterIo::Write was swapped to match MmioBuffer::Write so that
> they are interchangeable in template instantiation.
> 
> Both implementations of the <lib/mmio/mmio.h> were using templates
> where they should have been using simple forward declarations.  Fix
> that so that separate forward declarations become tenable.
> 
> Some cases of non-driver code still using the real mmio library
> remain and need to be untangled.
> 
> Bug: ZX-4062 #comment hwreg, ddktl libraries made mmio-header-agnostic
> Change-Id: I824d395501b35f59ffb23ac37fffb628f163d46e

TBR=teisenbe@google.com,qsr@google.com,mcgrathr@google.com

Change-Id: Ic4a02278d630b16ae349566ca53d781a26863202
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: ZX-4062 #comment hwreg, ddktl libraries made mmio-header-agnostic
parent 4869f283
No related branches found
No related tags found
Loading
Showing
with 48 additions and 60 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment