public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: arnd@arndb•de (Arnd Bergmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 10/10] ARM: ux500: Enable PL022 SSP Controller in Device Tree
Date: Wed, 14 Mar 2012 14:05:49 +0000	[thread overview]
Message-ID: <201203141405.50005.arnd@arndb.de> (raw)
In-Reply-To: <1331730306-11461-11-git-send-email-lee.jones@linaro.org>

On Wednesday 14 March 2012, Lee Jones wrote:
> 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 <lee.jones@linaro•org>

Looks good to me, but this one needs review from Grant as the maintainer
for both device tree and SPI.

For this to be functional, I think you also need a way for the SPI
controller to find the child devices from the device tree, but I
don't see how ux500 currently does it, or how it should be done.

Acked-by: Arnd Bergmann <arnd@arndb•de>

> ---
>  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 at 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 at 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,
> -- 
> 1.7.5.4
> 
> 

  reply	other threads:[~2012-03-14 14:05 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 13:04 [PATCH 0/10] ARM: ux500: Enable Snowball for Device Tree Lee Jones
2012-03-14 13:04 ` [PATCH 01/10] ARM: ux500: CONFIG: Enable Device Tree support for future endeavours Lee Jones
2012-03-15 14:38   ` Linus Walleij
2012-03-14 13:04 ` [PATCH 02/10] ARM: ux500: Initial Device Tree support for Snowball Lee Jones
2012-03-14 13:58   ` Arnd Bergmann
2012-03-14 14:37     ` Lee Jones
2012-03-14 14:56       ` Arnd Bergmann
2012-03-15 14:39         ` Linus Walleij
2012-03-14 13:04 ` [PATCH 03/10] ARM: ux500: combine the board init functions for DT boot Lee Jones
2012-03-15 14:39   ` Linus Walleij
2012-03-14 13:05 ` [PATCH 04/10] ARM: ux500: split dts file for snowball into generic part Lee Jones
2012-03-15 15:56   ` Linus Walleij
2012-03-14 13:05 ` [PATCH 05/10] ARM: ux500: db8500: list most devices in the snowball device tree Lee Jones
2012-03-14 13:59   ` Arnd Bergmann
2012-03-15 16:05     ` Linus Walleij
2012-03-14 13:05 ` [PATCH 06/10] ARM: ux500: Enable Cortex-A9 GIC (Generic Interrupt Controller) in Device Tree Lee Jones
2012-03-14 14:00   ` Arnd Bergmann
2012-03-15 16:06   ` Linus Walleij
2012-03-14 13:05 ` [PATCH 07/10] ARM: ux500: Provide local timer support for " Lee Jones
2012-03-14 14:00   ` Arnd Bergmann
2012-03-14 15:02   ` Rob Herring
2012-03-14 15:16     ` Marc Zyngier
2012-03-15 17:47   ` Linus Walleij
2012-03-14 13:05 ` [PATCH 08/10] ARM: ux500: Enable PL011 AMBA UART Controller " Lee Jones
2012-03-14 14:01   ` Arnd Bergmann
2012-03-14 15:00   ` Rob Herring
2012-03-14 15:36     ` Lee Jones
2012-03-15 16:08   ` Linus Walleij
2012-03-14 13:05 ` [PATCH 09/10] ARM: ux500: Enable PL310 Level 2 Cache Controller in " Lee Jones
2012-03-14 14:01   ` Arnd Bergmann
2012-03-15 16:09   ` Linus Walleij
2012-03-14 13:05 ` [PATCH 10/10] ARM: ux500: Enable PL022 SSP " Lee Jones
2012-03-14 14:05   ` Arnd Bergmann [this message]
2012-03-15 16:13     ` Linus Walleij
2012-03-15 16:11   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201203141405.50005.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox