Re: [PATCH 2/4] arm/dts: OMAP4: Add SPI controller nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 15, 2012 at 06:37:35PM +0100, Benoit Cousson wrote:
> Add the 4 McSPI controller nodes present in an OMAP4 device.
> 
> Remove SPI static device initialisation if DT is populated.
> 
> Signed-off-by: Benoit Cousson <b-cousson@xxxxxx>
> Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
> ---
>  arch/arm/boot/dts/omap4.dtsi  |   32 ++++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/devices.c |    4 +++-
>  2 files changed, 35 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> index 4b81f03..7fc0cbe 100644
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -209,5 +209,37 @@
>  			#size-cells = <0>;
>  			ti,hwmods = "i2c4";
>  		};
> +
> +		mcspi1: mcspi@1 {
> +			compatible = "ti,omap4-mcspi";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			ti,hwmods = "mcspi1";
> +			ti,spi-num-cs = <4>;

No reg or interrupts properties?  And the @<num> in the name must match the
first entry in a reg property.  This looks wrong.

> +		};
> +
> +		mcspi2: mcspi@2 {
> +			compatible = "ti,omap4-mcspi";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			ti,hwmods = "mcspi2";
> +			ti,spi-num-cs = <2>;
> +		};
> +
> +		mcspi3: mcspi@3 {
> +			compatible = "ti,omap4-mcspi";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			ti,hwmods = "mcspi3";
> +			ti,spi-num-cs = <2>;
> +		};
> +
> +		mcspi4: mcspi@4 {
> +			compatible = "ti,omap4-mcspi";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			ti,hwmods = "mcspi4";
> +			ti,spi-num-cs = <1>;
> +		};
>  	};
>  };
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 283d11e..8a489ba 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -725,7 +725,9 @@ static int __init omap2_init_devices(void)
>  	omap_init_dmic();
>  	omap_init_camera();
>  	omap_init_mbox();
> -	omap_init_mcspi();
> +	/* If dtb is there, the devices will be created dynamically */
> +	if (!of_have_populated_dt())
> +		omap_init_mcspi();
>  	omap_init_pmu();
>  	omap_hdq_init();
>  	omap_init_sti();
> -- 
> 1.7.0.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux