mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00

Some typedefs and macros are defined after the type check macros. This makes it difficult to automatically replace their definitions with OBJECT_DECLARE_TYPE. Patch generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]') which will split "typdef struct { ... } TypedefName" declarations. Followed by: $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \ $(git grep -l '' -- '*.[ch]') which will: - move the typedefs and #defines above the type check macros - add missing #include "qom/object.h" lines if necessary Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-9-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-10-ehabkost@redhat.com> Message-Id: <20200831210740.126168-11-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
/*
|
|
* Raspberry Pi (BCM2835) SD Host Controller
|
|
*
|
|
* Copyright (c) 2017 Antfield SAS
|
|
*
|
|
* Authors:
|
|
* Clement Deschamps <clement.deschamps@antfield.fr>
|
|
* Luc Michel <luc.michel@antfield.fr>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef BCM2835_SDHOST_H
|
|
#define BCM2835_SDHOST_H
|
|
|
|
#include "hw/sysbus.h"
|
|
#include "hw/sd/sd.h"
|
|
#include "qom/object.h"
|
|
|
|
#define TYPE_BCM2835_SDHOST "bcm2835-sdhost"
|
|
typedef struct BCM2835SDHostState BCM2835SDHostState;
|
|
#define BCM2835_SDHOST(obj) \
|
|
OBJECT_CHECK(BCM2835SDHostState, (obj), TYPE_BCM2835_SDHOST)
|
|
|
|
#define BCM2835_SDHOST_FIFO_LEN 16
|
|
|
|
struct BCM2835SDHostState {
|
|
SysBusDevice busdev;
|
|
SDBus sdbus;
|
|
MemoryRegion iomem;
|
|
|
|
uint32_t cmd;
|
|
uint32_t cmdarg;
|
|
uint32_t status;
|
|
uint32_t rsp[4];
|
|
uint32_t config;
|
|
uint32_t edm;
|
|
uint32_t vdd;
|
|
uint32_t hbct;
|
|
uint32_t hblc;
|
|
int32_t fifo_pos;
|
|
int32_t fifo_len;
|
|
uint32_t fifo[BCM2835_SDHOST_FIFO_LEN];
|
|
uint32_t datacnt;
|
|
|
|
qemu_irq irq;
|
|
};
|
|
|
|
#endif
|