From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBxZx-0000RZ-Bg for qemu-devel@nongnu.org; Wed, 30 Nov 2016 00:37:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBxZu-0005Mg-Cx for qemu-devel@nongnu.org; Wed, 30 Nov 2016 00:37:13 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cBxZu-0005Lv-2f for qemu-devel@nongnu.org; Wed, 30 Nov 2016 00:37:10 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAU5Y41r032834 for ; Wed, 30 Nov 2016 00:37:09 -0500 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0a-001b2d01.pphosted.com with ESMTP id 271r8j2hb7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 30 Nov 2016 00:37:08 -0500 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Nov 2016 15:37:06 +1000 From: "Alastair D'Silva" Date: Wed, 30 Nov 2016 16:36:29 +1100 In-Reply-To: <20161130053629.23340-1-alastair@au1.ibm.com> References: <20161130053629.23340-1-alastair@au1.ibm.com> Message-Id: <20161130053629.23340-7-alastair@au1.ibm.com> Subject: [Qemu-devel] [PATCH v2 6/6] arm: Add an RX8900 RTC to the ASpeed board List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org, Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Andrew Jeffery , Joel Stanley , Alastair D'Silva From: Alastair D'Silva Connect an RX8900 RTC to i2c12 of the AST2500 SOC at address 0x32 Signed-off-by: Alastair D'Silva --- 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