tests: Fixes test-io-channel-file by mask only owner file state mask bits
[qemu/ar7.git] / include / hw / gpio / bcm2835_gpio.h
blobe06e08a0fe997b9f9ca785382feb3afaa89cc040
1 /*
2 * Raspberry Pi (BCM2835) GPIO Controller
4 * Copyright (c) 2017 Antfield SAS
6 * Authors:
7 * Clement Deschamps <clement.deschamps@antfield.fr>
8 * Luc Michel <luc.michel@antfield.fr>
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.
14 #ifndef BCM2835_GPIO_H
15 #define BCM2835_GPIO_H
17 #include "hw/sd/sd.h"
18 #include "hw/sysbus.h"
19 #include "qom/object.h"
21 struct BCM2835GpioState {
22 SysBusDevice parent_obj;
24 MemoryRegion iomem;
26 /* SDBus selector */
27 SDBus sdbus;
28 SDBus *sdbus_sdhci;
29 SDBus *sdbus_sdhost;
31 uint8_t fsel[54];
32 uint32_t lev0, lev1;
33 uint8_t sd_fsel;
34 qemu_irq out[54];
36 typedef struct BCM2835GpioState BCM2835GpioState;
38 #define TYPE_BCM2835_GPIO "bcm2835_gpio"
39 DECLARE_INSTANCE_CHECKER(BCM2835GpioState, BCM2835_GPIO,
40 TYPE_BCM2835_GPIO)
42 #endif