From patchwork Thu May 2 09:12:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 16574 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 08030238EC for ; Thu, 2 May 2013 09:13:24 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf630616ves.10 for ; Thu, 02 May 2013 02:13:16 -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=KrikYbxgIj3173qZGioFdfyP/K25h4eoHjwOYn6MA5Y=; b=QqDINwp++mTXlukkcUr4fvyejyjX3HXKfuKNdk8NfYRFqY/5b+W5a9MeiPnhDqhUbx j3MWdd/RcWUp1B9EvHfJAN1ga+7qnwAxys2kVWzfCK9T+5fc4zEUtfwxx43IoZD7BrED QZlTwcbyfusGLIATy/61cjqQc3ZeFJc3uzEss/kzd2Bb2j0/n5IaJ/sLnlRgpnLIzEK6 7mKguquH3tAUH8p8aRtmrFUA4mwHyK8ElvkW1fB9Beya3+ViMr+Yu3MDwNx7b/ViUK5n OBaHLX2jW47amTrIEUe4h6/6GqQry4a3rVlwaS2fVuu7QWz5bCCt6Tzjgi4c6FxXEz8O QK7Q== X-Received: by 10.236.60.73 with SMTP id t49mr4969328yhc.19.1367485996821; Thu, 02 May 2013 02:13:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.163 with SMTP id 3ls1169072qef.58.gmail; Thu, 02 May 2013 02:13:16 -0700 (PDT) X-Received: by 10.220.53.138 with SMTP id m10mr1897544vcg.29.1367485996642; Thu, 02 May 2013 02:13:16 -0700 (PDT) Received: from mail-vb0-x236.google.com (mail-vb0-x236.google.com [2607:f8b0:400c:c02::236]) by mx.google.com with ESMTPS id ij9si2556245vdb.43.2013.05.02.02.13.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 02:13:16 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::236 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::236; Received: by mail-vb0-f54.google.com with SMTP id f12so277245vbg.13 for ; Thu, 02 May 2013 02:13:16 -0700 (PDT) X-Received: by 10.52.228.71 with SMTP id sg7mr1532974vdc.51.1367485996488; Thu, 02 May 2013 02:13:16 -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 nf2csp192075veb; Thu, 2 May 2013 02:13:15 -0700 (PDT) X-Received: by 10.14.182.137 with SMTP id o9mr17552174eem.5.1367485994958; Thu, 02 May 2013 02:13:14 -0700 (PDT) Received: from eu1sys200aog124.obsmtp.com (eu1sys200aog124.obsmtp.com [207.126.144.157]) by mx.google.com with SMTP id k4si6874733eey.154.2013.05.02.02.12.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 May 2013 02:13:14 -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-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob124.postini.com ([207.126.147.11]) with SMTP ID DSNKUYIuCyNuyP8h7ZWzeCIoAyiXDWsu1X8b@postini.com; Thu, 02 May 2013 09:13:14 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 47A20102; Thu, 2 May 2013 09:04:31 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 4A8A519D0; Thu, 2 May 2013 09:12:37 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 8C9BFA8081; Thu, 2 May 2013 11:12:32 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.279.5; Thu, 2 May 2013 11:12:44 +0200 From: Linus Walleij To: Cc: Mark Brown , , Arnd Bergmann , Linus Walleij Subject: [PATCH 20/23 v2] ARM: u300: add SPI PL022 to the device tree Date: Thu, 2 May 2013 11:12:32 +0200 Message-ID: <1367485952-6212-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: ALoCoQlZ2cstHBoWaZe5+kpPdcexPguWzYCQ9L9rfE9BKmc9cc1OKGW9oWMLJJaLGsND8yOzMOcx X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::236 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 --- ChangeLog v1->v2: - Add DMA channels. --- arch/arm/boot/dts/ste-u300.dts | 11 +++++++++++ arch/arm/mach-u300/core.c | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/arch/arm/boot/dts/ste-u300.dts b/arch/arm/boot/dts/ste-u300.dts index 4dc9f26..46c0785 100644 --- a/arch/arm/boot/dts/ste-u300.dts +++ b/arch/arm/boot/dts/ste-u300.dts @@ -222,5 +222,16 @@ dmas = <&dmac 14>; dma-names = "rx"; }; + + spi: ssp@c0006000 { + compatible = "arm,pl022", "arm,primecell"; + reg = <0xc0006000 0x1000>; + interrupt-parent = <&vica>; + interrupts = <23>; + dmas = <&dmac 27 &dmac 28>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + }; }; }; 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,