From patchwork Tue Apr 10 20:32:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oskar Andero X-Patchwork-Id: 151694 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9FA55B7028 for ; Wed, 11 Apr 2012 06:36:41 +1000 (EST) Received: from localhost ([::1]:57702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHhnr-0003Vb-HF for incoming@patchwork.ozlabs.org; Tue, 10 Apr 2012 16:36:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHhnc-0003LU-1w for qemu-devel@nongnu.org; Tue, 10 Apr 2012 16:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHhna-0005ch-E1 for qemu-devel@nongnu.org; Tue, 10 Apr 2012 16:36:23 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:59245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHhna-0005ac-3w for qemu-devel@nongnu.org; Tue, 10 Apr 2012 16:36:22 -0400 Received: by mail-lb0-f173.google.com with SMTP id l12so183324lbo.4 for ; Tue, 10 Apr 2012 13:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=GkxJhq3B6oxZ8xEwLqlRB7hidoUrfpAP1SvG+OvCdvQ=; b=UcC69HOI4MeHu86zDUlSBkroZ4mxxm07eG7cI/t5x6e5urUuCK9S0FUUYKpqqfJ9cI CUcvS1EB95bUJAM6Ej9C8+Ju5/hs0XJhMNX4qGxQzWbLgSd4k7mds7L+f0kM8uyiy6Z7 AbscpGky4Jqg65/2V5d77FdZeTGNh1KOAXO1P38exbgfLQvOd1ztDJDkkfrfgqeFE7e5 PwHjs2tFBjB3cjg4fzR5iDjASG4/aSz+RumXnwK/tLS00B0FNzS2ihEdljMHmSxXhmCD aML52OkRkj00ocRFpDR+lPoqiBoT6N/bbZ8USMlMCpHhAtMX759pZPWsjip+y0atFEsy IRSA== Received: by 10.152.132.6 with SMTP id oq6mr16038891lab.44.1334090181149; Tue, 10 Apr 2012 13:36:21 -0700 (PDT) Received: from localhost.localdomain (h107n5-m-fb-gr100.ias.bredband.telia.com. [81.236.172.107]) by mx.google.com with ESMTPS id pj20sm392687lab.13.2012.04.10.13.36.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 13:36:20 -0700 (PDT) From: Oskar Andero To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2012 22:32:27 +0200 Message-Id: <1334089947-24561-3-git-send-email-oskar.andero@gmail.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1334089947-24561-1-git-send-email-oskar.andero@gmail.com> References: <1334089947-24561-1-git-send-email-oskar.andero@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.217.173 Cc: peter.crosthwaite@petalogix.com, peter.maydell@linaro.org, Oskar Andero , afaerber@suse.de, paul@codesourcery.com Subject: [Qemu-devel] [PATCH v3 2/2] versatilepb: add i2c support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Oskar Andero Acked-by: Paul Brook --- hw/versatilepb.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/versatilepb.c b/hw/versatilepb.c index 25afb1e..d011554 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -13,6 +13,7 @@ #include "net.h" #include "sysemu.h" #include "pci.h" +#include "i2c.h" #include "boards.h" #include "blockdev.h" #include "exec-memory.h" @@ -178,6 +179,7 @@ static void versatile_init(ram_addr_t ram_size, DeviceState *pl041; PCIBus *pci_bus; NICInfo *nd; + i2c_bus *i2c; int n; int done_smc = 0; @@ -268,6 +270,10 @@ static void versatile_init(ram_addr_t ram_size, /* Add PL031 Real Time Clock. */ sysbus_create_simple("pl031", 0x101e8000, pic[10]); + dev = sysbus_create_simple("versatile_i2c", 0x10002000, NULL); + i2c = (i2c_bus *)qdev_get_child_bus(dev, "i2c"); + i2c_create_slave(i2c, "ds1338", 0x68); + /* Add PL041 AACI Interface to the LM4549 codec */ pl041 = qdev_create(NULL, "pl041"); qdev_prop_set_uint32(pl041, "nc_fifo_depth", 512);