mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
bcm2835_peripherals: add rollup device for bcm2835 peripherals
This device maintains all the non-CPU peripherals on bcm2835 (Pi1) which are also present on bcm2836 (Pi2). It also implements the private address spaces used for DMA and mailboxes. Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
e3ece3e34d
commit
7c62aeb82a
4 changed files with 375 additions and 0 deletions
42
include/hw/arm/bcm2835_peripherals.h
Normal file
42
include/hw/arm/bcm2835_peripherals.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Raspberry Pi emulation (c) 2012 Gregory Estrade
|
||||
* Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous
|
||||
*
|
||||
* Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft
|
||||
* Written by Andrew Baumann
|
||||
*
|
||||
* This code is licensed under the GNU GPLv2 and later.
|
||||
*/
|
||||
|
||||
#ifndef BCM2835_PERIPHERALS_H
|
||||
#define BCM2835_PERIPHERALS_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/intc/bcm2835_ic.h"
|
||||
#include "hw/misc/bcm2835_property.h"
|
||||
#include "hw/misc/bcm2835_mbox.h"
|
||||
#include "hw/sd/sdhci.h"
|
||||
|
||||
#define TYPE_BCM2835_PERIPHERALS "bcm2835-peripherals"
|
||||
#define BCM2835_PERIPHERALS(obj) \
|
||||
OBJECT_CHECK(BCM2835PeripheralState, (obj), TYPE_BCM2835_PERIPHERALS)
|
||||
|
||||
typedef struct BCM2835PeripheralState {
|
||||
/*< private >*/
|
||||
SysBusDevice parent_obj;
|
||||
/*< public >*/
|
||||
|
||||
MemoryRegion peri_mr, peri_mr_alias, gpu_bus_mr, mbox_mr;
|
||||
MemoryRegion ram_alias[4];
|
||||
qemu_irq irq, fiq;
|
||||
|
||||
SysBusDevice *uart0;
|
||||
BCM2835ICState ic;
|
||||
BCM2835PropertyState property;
|
||||
BCM2835MboxState mboxes;
|
||||
SDHCIState sdhci;
|
||||
} BCM2835PeripheralState;
|
||||
|
||||
#endif /* BCM2835_PERIPHERALS_H */
|
Loading…
Add table
Add a link
Reference in a new issue