]>
Commit | Line | Data |
---|---|---|
d72fc9dc CD |
1 | /* |
2 | * Raspberry Pi (BCM2835) GPIO Controller | |
3 | * | |
4 | * Copyright (c) 2017 Antfield SAS | |
5 | * | |
6 | * Authors: | |
7 | * Clement Deschamps <clement.deschamps@antfield.fr> | |
8 | * Luc Michel <luc.michel@antfield.fr> | |
9 | * | |
10 | * This work is licensed under the terms of the GNU GPL, version 2 or later. | |
11 | * See the COPYING file in the top-level directory. | |
12 | */ | |
13 | ||
14 | #ifndef BCM2835_GPIO_H | |
15 | #define BCM2835_GPIO_H | |
16 | ||
17 | #include "hw/sd/sd.h" | |
ec150c7e | 18 | #include "hw/sysbus.h" |
db1015e9 | 19 | #include "qom/object.h" |
d72fc9dc | 20 | |
db1015e9 | 21 | struct BCM2835GpioState { |
d72fc9dc CD |
22 | SysBusDevice parent_obj; |
23 | ||
24 | MemoryRegion iomem; | |
25 | ||
26 | /* SDBus selector */ | |
27 | SDBus sdbus; | |
28 | SDBus *sdbus_sdhci; | |
29 | SDBus *sdbus_sdhost; | |
30 | ||
31 | uint8_t fsel[54]; | |
32 | uint32_t lev0, lev1; | |
33 | uint8_t sd_fsel; | |
34 | qemu_irq out[54]; | |
db1015e9 | 35 | }; |
d72fc9dc CD |
36 | |
37 | #define TYPE_BCM2835_GPIO "bcm2835_gpio" | |
8063396b | 38 | OBJECT_DECLARE_SIMPLE_TYPE(BCM2835GpioState, BCM2835_GPIO) |
d72fc9dc CD |
39 | |
40 | #endif |