From patchwork Mon Apr 22 10:00:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 16308 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EAE1425DEE for ; Mon, 22 Apr 2013 10:01:17 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id p12sf11698459vbe.8 for ; Mon, 22 Apr 2013 03:00:31 -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=Qi0p8yG9cGzkZuEOmN4moBdcjRHKbQjwWl3Dx1rC5OmyyU4+iKBVdW21Pn3tg1e9PY PA+CltO+jxkOVnhj2h1fDm6wP0Rl0UziFvSMZ1eQUwAoLGa5Luy/eIQVB5kgOsz13X31 3ZxJ4GykAGmgf2m9O3rJNj+IeWjDWJY1PMn8vF/D31tuKUneTHLGfhY6jIUDMUhfgaSf Y+EjjzRGzEAgrzRjNHlKe5U/SV9H7CqxO7oxV4pQKkMN8CxFVEnv1GWEI1QlQEMtJabO K0dnBtdljDbFC5NOStUtmW956xsXnmg0QeqqEy2/RdcRhxxnvVVmZ829+dv5XlkyXmy1 o6Jg== X-Received: by 10.224.217.195 with SMTP id hn3mr19534663qab.5.1366624831874; Mon, 22 Apr 2013 03:00:31 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.98.101 with SMTP id eh5ls2986210qeb.95.gmail; Mon, 22 Apr 2013 03:00:31 -0700 (PDT) X-Received: by 10.52.228.129 with SMTP id si1mr947211vdc.79.1366624831703; Mon, 22 Apr 2013 03:00:31 -0700 (PDT) Received: from mail-vb0-x229.google.com (mail-vb0-x229.google.com [2607:f8b0:400c:c02::229]) by mx.google.com with ESMTPS id l4si15539008vcu.78.2013.04.22.03.00.31 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 03:00:31 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::229 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::229; Received: by mail-vb0-f41.google.com with SMTP id f13so5722076vbg.28 for ; Mon, 22 Apr 2013 03:00:31 -0700 (PDT) X-Received: by 10.220.242.73 with SMTP id lh9mr18253925vcb.49.1366624831571; Mon, 22 Apr 2013 03:00:31 -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 nf2csp68954veb; Mon, 22 Apr 2013 03:00:26 -0700 (PDT) X-Received: by 10.180.183.133 with SMTP id em5mr40127434wic.26.1366624825455; Mon, 22 Apr 2013 03:00:25 -0700 (PDT) Received: from eu1sys200aog102.obsmtp.com (eu1sys200aog102.obsmtp.com [207.126.144.113]) by mx.google.com with SMTP id t4si38572373eeg.252.2013.04.22.03.00.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 03:00:25 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.113 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.113; Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob102.postini.com ([207.126.147.11]) with SMTP ID DSNKUXUKLmJ2Y7gl9VGuwT1KXOijexxqiG5H@postini.com; Mon, 22 Apr 2013 10:00:24 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 10264D3; Mon, 22 Apr 2013 09:52:03 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 020DD1402; Mon, 22 Apr 2013 10:00:10 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 804D924C07C; Mon, 22 Apr 2013 12:00:03 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.279.5; Mon, 22 Apr 2013 12:00:08 +0200 From: Linus Walleij To: Cc: Arnd Bergmann , , Linus Walleij Subject: [PATCH 20/23] ARM: u300: add SPI PL022 to the device tree Date: Mon, 22 Apr 2013 12:00:03 +0200 Message-ID: <1366624803-6854-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: ALoCoQmTpInohjkGMfLvHqFR9ifEy4fJwQ4LVADF0rrogTVWbOskX5R/pxp0+IoNlz52OTgnND98 X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::229 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,