From patchwork Wed Mar 14 13:05:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7291 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2F9F123DEE for ; Wed, 14 Mar 2012 13:05:30 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id CCC87A18743 for ; Wed, 14 Mar 2012 13:05:29 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so3767obb.11 for ; Wed, 14 Mar 2012 06:05:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ugVsgN/LvmUj7o8xDAD6C3jaybKAeS7YcKjTPHhsLIA=; b=LwefdVPQefoTm4QEZZTPr0WVT0ZuNZJJkMCXunly4g55KvK5oPfJQGs7JgdaCa1Yy7 QRM8Mzo37uowit+a3jTsWAszBb7HOARo8jNjnEBeatAoiJlNaYMtCUIKn/A9uh2NQVdg LgNHFrLby6IQUaVky8kr/DD13D69sBffIJuzP7kgr3DIvx5hzoysWuED9InZj2tpKwol 5+1XjsHEsdFeYGdQT8VBPNd6x+YDCnIj1TGzoJIiI/bpRIiCsM8iDBPMHaqTdC9Dv/sW gHGZj2hvAlnXFjTq44Ot045XXTjXko+TfkF5u1NPoXEhsuvaz6khrnTFeGtvWxUQRfV8 tyfQ== Received: by 10.50.156.225 with SMTP id wh1mr7960156igb.0.1331730329129; Wed, 14 Mar 2012 06:05:29 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.53.18 with SMTP id k18csp9551ibg; Wed, 14 Mar 2012 06:05:28 -0700 (PDT) Received: by 10.180.14.230 with SMTP id s6mr6282454wic.2.1331730327842; Wed, 14 Mar 2012 06:05:27 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id z2si23944671wiw.30.2012.03.14.06.05.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Mar 2012 06:05:27 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f178.google.com with SMTP id a13so2184021wer.37 for ; Wed, 14 Mar 2012 06:05:27 -0700 (PDT) Received: by 10.216.135.131 with SMTP id u3mr1562781wei.46.1331730327006; Wed, 14 Mar 2012 06:05:27 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id fi4sm11477024wib.4.2012.03.14.06.05.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Mar 2012 06:05:26 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org Cc: linus.walleij@linaro.org, arnd@arndb.de, niklas.hernaeus@stericsson.com, Lee Jones Subject: [PATCH 10/10] ARM: ux500: Enable PL022 SSP Controller in Device Tree Date: Wed, 14 Mar 2012 13:05:06 +0000 Message-Id: <1331730306-11461-11-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1331730306-11461-1-git-send-email-lee.jones@linaro.org> References: <1331730306-11461-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkBi1HJWoOHOeJdzyWZf+h+rC/X4T5pDWsld1Hvc9pNnNVrt6zNacqtmW1mVpAR//Eeoney This SSP Controller supports a number of serial communication methods. Namely: /** * enum ssp_interface - interfaces allowed for this SSP Controller * @SSP_INTERFACE_MOTOROLA_SPI: Motorola Interface * @SSP_INTERFACE_TI_SYNC_SERIAL: Texas Instrument Synchronous Serial * interface * @SSP_INTERFACE_NATIONAL_MICROWIRE: National Semiconductor Microwire * interface * @SSP_INTERFACE_UNIDIRECTIONAL: Unidirectional interface (STn8810 * &STn8815 only) */ ... and as such cannot be registered using of_register_spi_devices. Instead it can be registered simply as a primecell device. Signed-off-by: Lee Jones --- arch/arm/boot/dts/db8500.dtsi | 5 ++++- arch/arm/mach-ux500/board-mop500.c | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi index 6ae7f69..a9866a3 100644 --- a/arch/arm/boot/dts/db8500.dtsi +++ b/arch/arm/boot/dts/db8500.dtsi @@ -206,11 +206,14 @@ ssp@80002000 { compatible = "arm,pl022", "arm,primecell"; reg = <80002000 0x1000>; - interrupts = <14>; + interrupts = <0 14 4>; #address-cells = <1>; #size-cells = <0>; status = "disabled"; + + // Add one of these for each child device cs-gpios = <&gpio0 31 &gpio4 14 &gpio4 16 &gpio6 22 &gpio7 0>; + }; uart@80120000 { diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index ea0242a..d0799d5 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -443,7 +443,7 @@ static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { }; #endif -static struct pl022_ssp_controller ssp0_platform_data = { +static struct pl022_ssp_controller ssp0_plat = { .bus_id = 0, #ifdef CONFIG_STE_DMA40 .enable_dma = 1, @@ -461,7 +461,7 @@ static struct pl022_ssp_controller ssp0_platform_data = { static void __init mop500_spi_init(struct device *parent) { - db8500_add_ssp0(parent, &ssp0_platform_data); + db8500_add_ssp0(parent, &ssp0_plat); } #ifdef CONFIG_STE_DMA40 @@ -749,6 +749,7 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), + OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), {}, }; @@ -804,7 +805,6 @@ static void __init u8500_init_machine(void) hrefv60_sdi_init(parent); } mop500_i2c_init(parent); - mop500_spi_init(parent); i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); i2c_register_board_info(2, mop500_i2c2_devices,