qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/
Date: Wed, 9 Sep 2015 10:37:43 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Sep 07, 2015 at 07:28:39PM +0530, Sai Pavan Boddu wrote:
> Move sdhci.h to include/hw/sd/. Which makes easy creation of device
> using object_initialize.
> 
> Signed-off-by: Sai Pavan Boddu <address@hidden>
> ---
> Changes for V2:
>    Create new area in includes for sd. And move sdhci.h to same.
> ---
>  hw/sd/sdhci.c                 | 2 +-
>  {hw => include/hw}/sd/sdhci.h | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename {hw => include/hw}/sd/sdhci.h (100%)

Please keep hardware constants and any other device emulation internals
in hw/sd/.  The header files in include/ should only contain that
"public" APIs that other parts of QEMU consume.

I think the declarations that need to be in include/ are:
1. typedef struct SDHCIState
2. TYPE_PCI_SDHCI and PCI_SDHCI()
3. TYPE_SYSBUS_SDHCI and SYSBUS_SDHCI()

The other declarations are internals that should be kept in hw/sd/.

This way there is a clear public API and internals (used by SD emulation
code).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]