[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 6/6] arm: Add an RX8900 RTC to the ASpeed board
From: |
Alastair D'Silva |
Subject: |
[Qemu-devel] [PATCH v2 6/6] arm: Add an RX8900 RTC to the ASpeed board |
Date: |
Wed, 30 Nov 2016 16:36:29 +1100 |
From: Alastair D'Silva <address@hidden>
Connect an RX8900 RTC to i2c12 of the AST2500 SOC at address 0x32
Signed-off-by: Alastair D'Silva <address@hidden>
---
hw/arm/aspeed.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index c7206fd..8de95f2 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -166,7 +166,19 @@ static const TypeInfo palmetto_bmc_type = {
static void ast2500_evb_init(MachineState *machine)
{
+ AspeedSoCState *soc;
+ I2CBus *i2c12;
+ DeviceState *rx8900;
+
aspeed_board_init(machine, &aspeed_boards[AST2500_EVB]);
+
+ soc = ASPEED_SOC(object_resolve_path_component(OBJECT(machine), "soc"));
+
+ i2c12 = aspeed_i2c_get_bus((DeviceState *)&soc->i2c, 11);
+ rx8900 = i2c_create_slave(i2c12, "rx8900", 0x32);
+
+ qdev_connect_gpio_out_named(rx8900, "rx8900-interrupt-out", 0,
+ qdev_get_gpio_in(DEVICE(&soc->vic), 22));
}
static void ast2500_evb_class_init(ObjectClass *oc, void *data)
--
2.9.3