From patchwork Mon Feb 15 11:18:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe Dubois X-Patchwork-Id: 8313311 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 77DAB9F372 for ; Mon, 15 Feb 2016 11:20:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E69B22035E for ; Mon, 15 Feb 2016 11:20:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42CAE20340 for ; Mon, 15 Feb 2016 11:20:40 +0000 (UTC) Received: from localhost ([::1]:59182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVHCp-0004Nz-L0 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 15 Feb 2016 06:20:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVHAQ-0000iJ-LK for qemu-devel@nongnu.org; Mon, 15 Feb 2016 06:18:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVHAN-0001n9-4l for qemu-devel@nongnu.org; Mon, 15 Feb 2016 06:18:10 -0500 Received: from zose-mta03.web4all.fr ([185.49.20.44]:42010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVHAM-0001mu-VG for qemu-devel@nongnu.org; Mon, 15 Feb 2016 06:18:07 -0500 Received: from localhost (localhost [127.0.0.1]) by zose-mta03.web4all.fr (Postfix) with ESMTP id 7F28A41177; Mon, 15 Feb 2016 12:18:06 +0100 (CET) Received: from zose-mta03.web4all.fr ([127.0.0.1]) by localhost (zose-mta03.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id WdeuzD4SAfTc; Mon, 15 Feb 2016 12:18:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zose-mta03.web4all.fr (Postfix) with ESMTP id E5C8E4309A; Mon, 15 Feb 2016 12:18:05 +0100 (CET) X-Virus-Scanned: amavisd-new at zose-mta-03.w4a.fr Received: from zose-mta03.web4all.fr ([127.0.0.1]) by localhost (zose-mta03.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id X1zZ3axlo9J6; Mon, 15 Feb 2016 12:18:05 +0100 (CET) Received: from localhost.localdomain (smm49-1-78-235-240-156.fbx.proxad.net [78.235.240.156]) by zose-mta03.web4all.fr (Postfix) with ESMTPSA id 9EAC441177; Mon, 15 Feb 2016 12:18:05 +0100 (CET) From: Jean-Christophe Dubois To: qemu-devel@nongnu.org, peter.maydell@linaro.org, crosthwaite.peter@gmail.com Date: Mon, 15 Feb 2016 12:18:04 +0100 Message-Id: <7e53a8579626017e62bfa696ca343c310360afa8.1455534309.git.jcd@tribudubois.net> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.49.20.44 Cc: Jean-Christophe Dubois Subject: [Qemu-devel] [PATCH v2 4/4] i.MX: Add SPI NOR FLASH memory to sabrelite board. 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * Not present on v1. hw/arm/sabrelite.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c index 8db9bbc..237dfa1 100644 --- a/hw/arm/sabrelite.c +++ b/hw/arm/sabrelite.c @@ -70,6 +70,15 @@ static void sabrelite_init(MachineState *machine) memory_region_add_subregion(get_system_memory(), FSL_IMX6_MMDC_ADDR, &s->ram); + { + /* Add the sst25vf016b NOR FLASH memory to first SPI */ + SSIBus *spi = (SSIBus *)qdev_get_child_bus(DEVICE(&s->soc.spi[0]), + "spi"); + DeviceState *flash_dev = ssi_create_slave(spi, "sst25vf016b"); + qemu_irq cs_line = qdev_get_gpio_in_named(flash_dev, SSI_GPIO_CS, 0); + sysbus_connect_irq(SYS_BUS_DEVICE(&s->soc.spi[0]), 1, cs_line); + } + sabrelite_binfo.ram_size = machine->ram_size; sabrelite_binfo.kernel_filename = machine->kernel_filename; sabrelite_binfo.kernel_cmdline = machine->kernel_cmdline;