From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9EMx-0000us-7T for qemu-devel@nongnu.org; Tue, 22 Nov 2016 11:56:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9EMs-0007nI-9j for qemu-devel@nongnu.org; Tue, 22 Nov 2016 11:56:31 -0500 Received: from 4.mo69.mail-out.ovh.net ([46.105.42.102]:55690) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9EMs-0007m3-33 for qemu-devel@nongnu.org; Tue, 22 Nov 2016 11:56:26 -0500 Received: from player798.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id D4D3CBD59 for ; Tue, 22 Nov 2016 17:56:23 +0100 (CET) References: <1479357400-17441-1-git-send-email-alastair@au1.ibm.com> <1479357400-17441-5-git-send-email-alastair@au1.ibm.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <948f93ef-50d3-a450-c69f-faefd078f00d@kaod.org> Date: Tue, 22 Nov 2016 17:56:14 +0100 MIME-Version: 1.0 In-Reply-To: <1479357400-17441-5-git-send-email-alastair@au1.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] arm: Add an RX8900 RTC to the ASpeed board List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alastair D'Silva , qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org, Peter Maydell , Andrew Jeffery , Joel Stanley , Alastair D'Silva On 11/17/2016 05:36 AM, Alastair D'Silva wrote: > From: Alastair D'Silva > > Connect an RX8900 RTC to i2c12 of the AST2500 SOC at address 0x32 If this is a board device, we should include it under a machine routine. Is that for the palmetto ? The ast2500 does not have a RTC. Thanks, C. > Signed-off-by: Alastair D'Silva > --- > hw/arm/aspeed.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c > index c7206fd..554ae20 100644 > --- a/hw/arm/aspeed.c > +++ b/hw/arm/aspeed.c > @@ -100,6 +100,8 @@ static void aspeed_board_init(MachineState *machine, > { > > AspeedBoardState *bmc; > AspeedSoCClass *sc; > + I2CBus *i2c12; > + DeviceState *rx8900; > > bmc = g_new0(AspeedBoardState, 1); > object_initialize(&bmc->soc, (sizeof(bmc->soc)), cfg->soc_name); > @@ -137,6 +139,12 @@ static void aspeed_board_init(MachineState *machine, > aspeed_board_binfo.ram_size = ram_size; > aspeed_board_binfo.loader_start = sc->info->sdram_base; > > + i2c12 = aspeed_i2c_get_bus((DeviceState *)&bmc->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(&bmc->soc.vic), 22)); > + > arm_load_kernel(ARM_CPU(first_cpu), &aspeed_board_binfo); > } > >