From patchwork Fri Jan 9 03:30:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 426905 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 848F314012F for ; Fri, 9 Jan 2015 14:32:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA9064B6CA; Fri, 9 Jan 2015 04:32:17 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WFCilZOMDa8g; Fri, 9 Jan 2015 04:32:17 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D51664B692; Fri, 9 Jan 2015 04:31:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 73E344B604 for ; Fri, 9 Jan 2015 04:31:36 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VW8GDBaGnptL for ; Fri, 9 Jan 2015 04:31:36 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f74.google.com (mail-pa0-f74.google.com [209.85.220.74]) by theia.denx.de (Postfix) with ESMTPS id 591374B5EB for ; Fri, 9 Jan 2015 04:31:29 +0100 (CET) Received: by mail-pa0-f74.google.com with SMTP id kq14so2309254pab.1 for ; Thu, 08 Jan 2015 19:31:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nZvM0yDwYAXApQwJuHaXW2oyXNEnzizr7tlPV6lYF6k=; b=ipd6RsuXuZRb6Mmrx0SVOcXqkg+1+SX5gzd5Fjaw+ruyoyZZue1RaP3lX56XI3Q+zr VJ+vjQR4dKzdDMknJ19knsSNgs9Hz0NHa8zm1ETuhlwlu3+eZ8W4GzC7ZNWofhdMY6j7 3brl5NUh5rZEN+79FkA7NYi0Jj4ROaqHGX6N2qtzfFmuYDcsgn/K3TMvNv5myC2Yrn8F q1U7TpC91wSD06nE6cdZFju5KU++M184fv7Tgt6M6hBiiL4YR1xxp5j1+y0C2cpY0YGm nmHJ5YzUsIG4J6M+h4xH7PtJJTSrJy/dWQQzf50+oJnvhe8zifvEWj6qpsFMmIpFDar4 xvTQ== X-Gm-Message-State: ALoCoQkkzlg/At0COJN48MOFz2wkMed36yEDbPEC4jkCjPG0rPLmv/FBSvQZfT9QLTcAqoSWd11r X-Received: by 10.66.159.105 with SMTP id xb9mr3926531pab.48.1420774288227; Thu, 08 Jan 2015 19:31:28 -0800 (PST) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id v41si281267yha.7.2015.01.08.19.31.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jan 2015 19:31:28 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id guS7eKrL.1; Thu, 08 Jan 2015 19:31:28 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 73BE92207F0; Thu, 8 Jan 2015 20:31:27 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 8 Jan 2015 20:30:49 -0700 Message-Id: <1420774255-702-6-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1420774255-702-1-git-send-email-sjg@chromium.org> References: <1420774255-702-1-git-send-email-sjg@chromium.org> Cc: Graeme Russ Subject: [U-Boot] [PATCH v2 05/11] x86: spi: Add device tree support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de As a temporary measure before the ICH driver moves over to driver model, add device tree support to the driver. Signed-off-by: Simon Glass --- Changes in v2: None drivers/spi/ich.c | 7 +++++++ include/configs/x86-common.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 0379444..fdff158 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -153,6 +153,13 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, return &ich->slave; } +struct spi_slave *spi_setup_slave_fdt(const void *blob, int slave_node, + int spi_node) +{ + /* We only support a single SPI at present */ + return spi_setup_slave(0, 0, 20000000, 0); +} + void spi_free_slave(struct spi_slave *slave) { struct ich_spi_slave *ich = to_ich_spi(slave); diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 4f0a3c5..ecedfc3 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -211,6 +211,7 @@ #define CONFIG_CMD_SF_TEST #define CONFIG_CMD_SPI #define CONFIG_SPI +#define CONFIG_OF_SPI_FLASH /*----------------------------------------------------------------------- * Environment configuration