omap3evm: Add Mistral WL12XX config support
Subsystems (3)
PATCH 1/1 omap3evm: Add Mistral WL12XX config support
Add Kconfig entries indicating the existence of omap3evm's wlan/bt wl12xx daughter card (see
http://mistralsolutions.com/component/jumi/Download_Common_Code.html?docid=298),
and the exact reference clock type that the wl12xx device is hardwired to (the wl12xx driver must know this).
In addition, start using CONFIG_OMAP3EVM_MISTRAL_WL12XX in the omap3evm's board file instead of CONFIG_WL12XX_PLATFORM_DATA, because the latter only indicates that the driver is being built, and shouldn't be used to assume the existence of extension cards.
--- arch/arm/mach-omap2/Kconfig | 23 +++++++++++++++++++++++ arch/arm/mach-omap2/board-omap3evm.c | 12 ++++++------ 2 files changed, 29 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/Kconfig +23 -0
@@ -342,6 +342,29 @@ config OMAP3_SDRC_AC_TIMING wish to say no. Selecting yes without understanding what is going on could result in system crashes; +config OMAP3EVM_MISTRAL_WL12XX + bool "Enable Mistral WL12XX daughter board support" + depends on MACH_OMAP3EVM + help + Support for the Mistral WL12XX daughter board. + This extension board which supports both WLAN and Bluetooth. + Specifically, for WL1271, more info can be found at + http://mistralsolutions.com/component/jumi/Download_Common_Code.html?docid=298 + +config OMAP3EVM_MISTRAL_WL12XX_REFCLOCK + int "Ref clock value" + range 0 5 + depends on OMAP3EVM_MISTRAL_WL12XX + default 2 + help + Set ref clock value for the Mistral WL12XX daughter board. + Select 0 for 19.2 MHz. + Select 1 for 26 MHz. + Select 2 for 38.4 MHz. + Select 3 for 52 MHz. + Select 4 for 38.4 MHz, XTAL. + Select 5 for 26 MHz, XTAL. + endmenu endif
arch/arm/mach-omap2/board-omap3evm.c +6 -6
@@ -318,7 +318,7 @@ static struct omap2_hsmmc_info mmc[] = { .gpio_cd = -EINVAL, .gpio_wp = 63, }, -#ifdef CONFIG_WL12XX_PLATFORM_DATA +#ifdef CONFIG_OMAP3EVM_MISTRAL_WL12XX { .name = "wl1271", .mmc = 2,
@@ -506,7 +506,7 @@ static struct regulator_init_data omap3evm_vio = { .consumer_supplies = &omap3evm_vio_supply, }; -#ifdef CONFIG_WL12XX_PLATFORM_DATA +#ifdef CONFIG_OMAP3EVM_MISTRAL_WL12XX #define OMAP3EVM_WLAN_PMENA_GPIO (150)#define OMAP3EVM_WLAN_IRQ_GPIO (149)
@@ -543,7 +543,7 @@ static struct platform_device omap3evm_wlan_regulator = {struct wl12xx_platform_data omap3evm_wlan_data__initdata = { .irq =OMAP_GPIO_IRQ (OMAP3EVM_WLAN_IRQ_GPIO ), - .board_ref_clock =WL12XX_REFCLOCK_38 ,/* 38.4 MHz */ + .board_ref_clock =CONFIG_OMAP3EVM_MISTRAL_WL12XX_REFCLOCK , };#endif
@@ -606,7 +606,7 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = { OMAP_PIN_OFF_NONE),OMAP3_MUX (GPMC_WAIT2 ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT_PULLUP |OMAP_PIN_OFF_NONE ), -#ifdef CONFIG_WL12XX_PLATFORM_DATA +#ifdef CONFIG_OMAP3EVM_MISTRAL_WL12XX/* WLAN IRQ - GPIO 149 */ OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
@@ -644,7 +644,7 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {OMAP3_MUX (SYS_BOOT4 ,OMAP_MUX_MODE3 |OMAP_PIN_OFF_NONE ),OMAP3_MUX (SYS_BOOT5 ,OMAP_MUX_MODE3 |OMAP_PIN_OFF_NONE ),OMAP3_MUX (SYS_BOOT6 ,OMAP_MUX_MODE3 |OMAP_PIN_OFF_NONE ), -#ifdef CONFIG_WL12XX_PLATFORM_DATA +#ifdef CONFIG_OMAP3EVM_MISTRAL_WL12XX/* WLAN IRQ - GPIO 149 */ OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
@@ -726,7 +726,7 @@ static void __init omap3_evm_init(void)omap3evm_init_smsc911x ();omap3_evm_display_init (); -#ifdef CONFIG_WL12XX_PLATFORM_DATA +#ifdef CONFIG_OMAP3EVM_MISTRAL_WL12XX /* WL12xx WLAN Init */ if (wl12xx_set_platform_data (&omap3evm_wlan_data))pr_err ("error setting wl12xx data\n" );
Signature · 1 line
1.7.4.1
Tony Lindgren
maintainerPATCH 1/1 omap3evm: Add Mistral WL12XX config support
Quoted 14 lines · Shahar Lev
arch/arm/mach-omap2/Kconfig +13
-0+config OMAP3EVM_MISTRAL_WL12XX + bool "Enable Mistral WL12XX daughter board support" + depends on MACH_OMAP3EVM + help + Support for the Mistral WL12XX daughter board. + This extension board which supports both WLAN and Bluetooth. + Specifically, for WL1271, more info can be found at + http://mistralsolutions.com/component/jumi/Download_Common_Code.html?docid=298 + +config OMAP3EVM_MISTRAL_WL12XX_REFCLOCK + int "Ref clock value" + range 0 5 + depends on OMAP3EVM_MISTRAL_WL12XX
arch/arm/mach-omap2/Kconfig config OMAP3_SDRC_AC_TIMING · line 367
Quoted 10 lines
arch/arm/mach-omap2/Kconfig +10
-0+ default 2 + help + Set ref clock value for the Mistral WL12XX daughter board. + Select 0 for 19.2 MHz. + Select 1 for 26 MHz. + Select 2 for 38.4 MHz. + Select 3 for 52 MHz. + Select 4 for 38.4 MHz, XTAL. + Select 5 for 26 MHz, XTAL. +
This your should try to remove as it won't work nicely for supporting various boards with the same kernel as we already do with omap2plus_defconfig.
Can you somehow detect the daughter board dynamically and then set the flags?
Tony
PATCH 1/1 omap3evm: Add Mistral WL12XX config support
Quoted 8 lines · Tony Lindgren
This your should try to remove as it won't work nicely for supporting various boards with the same kernel as we already do with
omap2plus_defconfig.Can you somehow detect the daughter board dynamically and then set the flags?
We thought about multi-board kernels, but unfortunately have no better solution, since there is no dynamic way to probe these cards. Even worse, these cards sometimes come with different clocks in them, hence the 2nd OMAP3EVM_MISTRAL_WL12XX_REFCLOCK entry we had to introduce...
Maybe we should add two bootargs with which the user can override this Kconfig configuration? This should allow using the same kernel binary with different omap3evm boards.
It's a bit cumbersome though..
Tony Lindgren
maintainerPATCH 1/1 omap3evm: Add Mistral WL12XX config support
Quoted 16 lines · Shahar Lev
Quoted 8 lines · Tony Lindgren
This your should try to remove as it won't work nicely for supporting various boards with the same kernel as we already do with
omap2plus_defconfig.Can you somehow detect the daughter board dynamically and then set the flags?
We thought about multi-board kernels, but unfortunately have no better solution, since there is no dynamic way to probe these cards. Even worse, these cards sometimes come with different clocks in them, hence the 2nd
OMAP3EVM_MISTRAL_WL12XX_REFCLOCKentry we had to introduce...
Quoted 5 lines
Maybe we should add two bootargs with which the user can override this
Kconfigconfiguration? This should allow using the same kernel binary with different omap3evm boards.It's a bit cumbersome though..
Yes cmdline should do the trick until we have devicetree data available..
Tony
PATCH 1/1 omap3evm: Add Mistral WL12XX config support
Hi Shahar, Tony,
Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Shahar Lev
Quoted 8 lines · Tony Lindgren
This your should try to remove as it won't work nicely for supporting various boards with the same kernel as we already do with
omap2plus_defconfig.Can you somehow detect the daughter board dynamically and then set the flags?
We thought about multi-board kernels, but unfortunately have no better solution, since there is no dynamic way to probe these cards. Even worse, these cards sometimes come with different clocks in them, hence the 2nd
OMAP3EVM_MISTRAL_WL12XX_REFCLOCKentry we had to introduce...
Quoted 3 lines
Quoted 3 lines
Maybe we should add two bootargs with which the user can override this
Kconfigconfiguration? This should allow using the same kernel binary with different omap3evm boards.
You won't need Kconfig parameters then. Just have module parameters and supply whatever default values you find reasonable.
~Vitaly
PATCH 1/1 omap3evm: Add Mistral WL12XX config support
In reply to Shahar LevQuoted 31 lines
-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Shahar Lev
Sent: Tuesday, June 14, 2011 5:46 PM
To: linux-omap at vger.kernel.org
Cc: linux-arm; Tony Lindgren; Shahar Lev
Subject: [PATCH] omap3evm: Add Mistral WL12XX config supportAdd
Kconfigentries indicating the existence of omap3evm's wlan/bt wl12xx daughter card (see
http://mistralsolutions.com/component/jumi/Download_Common_Cod
e.html?docid=298),
and the exact reference clock type that the wl12xx device is hardwired to (the wl12xx driver must know this).In addition, start using
CONFIG_OMAP3EVM_MISTRAL_WL12XXin the omap3evm's board file instead ofCONFIG_WL12XX_PLATFORM_DATA, because the latter only indicates that the driver is being built, and shouldn't be used to assume the existence of extension cards.Signed-off-by Shahar Lev <[email protected]>--- arch/arm/mach-omap2/Kconfig | 23 +++++++++++++++++++++++ arch/arm/mach-omap2/board-omap3evm.c | 12 ++++++------ 2 files changed, 29 insertions(+), 6 deletions(-)arch/arm/mach-omap2/Kconfig +0
-0
arch/arm/mach-omap2/Kconfig config OMAP3_SDRC_AC_TIMING · line 345
Quoted 4 lines
arch/arm/mach-omap2/Kconfig +1
-0@@ -342,6 +342,29 @@ config OMAP3_SDRC_AC_TIMING wish to say no. Selecting yes without understanding what is going on could result in system crashes; +config OMAP3EVM_MISTRAL_WL12XX
[sp] Could this be renamed simply as: OMAP3EVM_WL12XX?
OR is there a specific reason to add vendor/manufacturers' name to the defintion?
~sanjeev
[snip]...[snip]
PATCH 1/1 omap3evm: Add Mistral WL12XX config support
Quoted 5 lines
[sp] Could this be renamed simply as:
OMAP3EVM_WL12XX?
? ? OR is there a specific reason to add vendor/manufacturers' name ? ? to the defintion?
I don't mind changing it.