From patchwork Mon Apr 22 10:01:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 16309 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f197.google.com (mail-gh0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4D26925DEE for ; Mon, 22 Apr 2013 10:02:31 +0000 (UTC) Received: by mail-gh0-f197.google.com with SMTP id r17sf785346ghr.0 for ; Mon, 22 Apr 2013 03:01:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=X5QEb+cmL66rWMvH+RBqPTP26a5ajErK54CBJeLur8k=; b=Df1od7DE3X18fD3DusHQE4/DGgc2gzyHx+K/3bk2PCf0Pk/KMV/swybNMooojuatg0 U/9xMCE3Gn6JMO19Y07RyKY6tQe9IchBpi3FqpllucTnwQIMpi87UPKeBfdHeXt0ru0D +ByT+qiR+wqHtjMPhmWalGnFqNCgsbJzcpvuDqfvO4a1Tsrj05p0eFBt4y/c7iiWlgB8 CQObjpmWbu67WzbDGDxwEMNvtdGSFQjhxrYZrtiQP2iDzlUDl9OCgKT2O+RIDjbbySp7 Rj97JPfax+QGwgCUJc4Zzy4T8LM9ZmCBD10drlNQZqIqXHVC+z3C0DXJ02YN0cxqTXlS WmoQ== X-Received: by 10.236.102.200 with SMTP id d48mr12861350yhg.3.1366624905201; Mon, 22 Apr 2013 03:01:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.130 with SMTP id i2ls2317776qey.12.gmail; Mon, 22 Apr 2013 03:01:45 -0700 (PDT) X-Received: by 10.221.3.2 with SMTP id nw2mr15039572vcb.55.1366624905076; Mon, 22 Apr 2013 03:01:45 -0700 (PDT) Received: from mail-vb0-x234.google.com (mail-vb0-x234.google.com [2607:f8b0:400c:c02::234]) by mx.google.com with ESMTPS id ec8si15554153vdb.85.2013.04.22.03.01.45 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 03:01:45 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::234 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::234; Received: by mail-vb0-f52.google.com with SMTP id w8so5554791vbf.25 for ; Mon, 22 Apr 2013 03:01:45 -0700 (PDT) X-Received: by 10.52.34.168 with SMTP id a8mr15715333vdj.75.1366624904933; Mon, 22 Apr 2013 03:01:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp69022veb; Mon, 22 Apr 2013 03:01:44 -0700 (PDT) X-Received: by 10.205.112.198 with SMTP id et6mr483632bkc.29.1366624903565; Mon, 22 Apr 2013 03:01:43 -0700 (PDT) Received: from eu1sys200aog124.obsmtp.com (eu1sys200aog124.obsmtp.com [207.126.144.157]) by mx.google.com with SMTP id 9si38583944eeo.235.2013.04.22.03.01.28 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 03:01:43 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.157 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.157; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob124.postini.com ([207.126.147.11]) with SMTP ID DSNKUXUKdo2mr7YG7Q0/4LuxHSYrW4tG9z+J@postini.com; Mon, 22 Apr 2013 10:01:43 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 843321ED; Mon, 22 Apr 2013 10:01:21 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C706F48DF; Mon, 22 Apr 2013 10:01:15 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id C228424C07C; Mon, 22 Apr 2013 12:01:15 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.279.5; Mon, 22 Apr 2013 12:01:20 +0200 From: Linus Walleij To: , Mark Brown , Grant Likely , Cc: Arnd Bergmann , , Linus Walleij Subject: [PATCH 20/23] ARM: u300: add SPI PL022 to the device tree Date: Mon, 22 Apr 2013 12:01:17 +0200 Message-ID: <1366624877-6932-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlZqzMgn6iw4ZKnKfXJ4V6UEomGORtXjBGRCz7OswWXVM2L2AeCOE0iYC3ds6lCM2k962ZC X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::234 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Linus Walleij This registers the PL022 PrimeCell from the U300 device tree. We make a new copy of the platform data for the device tree boot path, as the old platform data is in an older file which will be going away. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-u300.dts | 7 +++++++ arch/arm/mach-u300/core.c | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/ste-u300.dts b/arch/arm/boot/dts/ste-u300.dts index cdffeb9..979d96c 100644 --- a/arch/arm/boot/dts/ste-u300.dts +++ b/arch/arm/boot/dts/ste-u300.dts @@ -214,5 +214,12 @@ cd-inverted; vmmc-supply = <&ab3100_ldo_g_reg>; }; + + spi: ssp@c0006000 { + compatible = "arm,pl022", "arm,primecell"; + reg = <0xc0006000 0x1000>; + interrupt-parent = <&vica>; + interrupts = <23>; + }; }; }; diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 98d4dbe..9467ffe 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -703,6 +704,22 @@ MACHINE_END #ifdef CONFIG_OF +static struct pl022_ssp_controller spi_plat_data = { + /* If you have several SPI buses this varies, we have only bus 0 */ + .bus_id = 0, + /* + * On the APP CPU GPIO 4, 5 and 6 are connected as generic + * chip selects for SPI. (Same on U330, U335 and U365.) + * TODO: make sure the GPIO driver can select these properly + * and do padmuxing accordingly too. + */ + .num_chipselect = 3, + .enable_dma = 1, + .dma_filter = coh901318_filter_id, + .dma_rx_param = (void *) U300_DMA_SPI_RX, + .dma_tx_param = (void *) U300_DMA_SPI_TX, +}; + /* These are mostly to get the right device names for the clock lookups */ static struct of_dev_auxdata u300_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("stericsson,pinctrl-u300", U300_SYSCON_BASE, @@ -719,6 +736,8 @@ static struct of_dev_auxdata u300_auxdata_lookup[] __initdata = { "uart0", &uart0_plat_data), OF_DEV_AUXDATA("arm,primecell", U300_UART1_BASE, "uart1", &uart1_plat_data), + OF_DEV_AUXDATA("arm,primecell", U300_SPI_BASE, + "pl022", &spi_plat_data), OF_DEV_AUXDATA("st,ddci2c", U300_I2C0_BASE, "stu300.0", NULL), OF_DEV_AUXDATA("st,ddci2c", U300_I2C1_BASE,