Re: [PATCH 2/6] SPI omap2_mcspi: Add max_clk_div field to mcspi platform config

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

 



* Scott Ellis <scott@xxxxxxxxxxxxxx> [100312 07:20]:
> The McSPI_CHxCONF.CLKD register field has different limits for the
> OMAP3 then the OMAP24xx. As per recommendation from the linux-omap
> list, added a field for max_clk_div to the platform data for use in 
> omap2_mcspi.c.
> 
> Used in a subsequent patch. 
> 
> Signed-off-by: Scott Ellis <scott@xxxxxxxxxxxxxx>
> 
>  arch/arm/mach-omap2/devices.c           |   16 ++++++++++++++++
>  arch/arm/plat-omap/include/plat/mcspi.h |    1 +
>  2 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 23e4d77..d4ad126 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -302,6 +302,11 @@ static inline void omap_init_sti(void) {}
>  
>  static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
>  	.num_cs		= 4,
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> +	.max_clk_div	= 0x0c,
> +#else
> +	.max_clk_div	= 0x0f,
> +#endif
>  };
>  

Can't do ifdef else like this. It will break multi-omap booting on
omap2 + 3 + 4. In the platform init just set the values once with
cpu_is_omapXXXX() instead.

Regards,

Tony
--
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