Message ID | 1308053788-25937-1-git-send-email-shahar@wizery.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
* Shahar Lev <shahar@wizery.com> [110614 05:12]: > > +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. > + 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
On Tue, Jun 14, 2011 at 3:34 PM, Tony Lindgren <tony@atomide.com> wrote: > > 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..
* Shahar Lev <shahar@wizery.com> [110614 06:21]: > On Tue, Jun 14, 2011 at 3:34 PM, Tony Lindgren <tony@atomide.com> wrote: > > > > 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.. Yes cmdline should do the trick until we have devicetree data available.. Tony
> -----Original Message----- > From: linux-omap-owner@vger.kernel.org > [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Shahar Lev > Sent: Tuesday, June 14, 2011 5:46 PM > To: linux-omap@vger.kernel.org > Cc: linux-arm; Tony Lindgren; Shahar Lev > Subject: [PATCH] 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_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_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. > > Signed-off-by: Shahar Lev <shahar@wizery.com> > --- > arch/arm/mach-omap2/Kconfig | 23 +++++++++++++++++++++++ > arch/arm/mach-omap2/board-omap3evm.c | 12 ++++++------ > 2 files changed, 29 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig > index 19d5891..8ef012d 100644 > --- a/arch/arm/mach-omap2/Kconfig > +++ b/arch/arm/mach-omap2/Kconfig > @@ -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]
Hi Shahar, Tony, On Tue, Jun 14, 2011 at 3:55 PM, Tony Lindgren <tony@atomide.com> wrote: > * Shahar Lev <shahar@wizery.com> [110614 06:21]: >> On Tue, Jun 14, 2011 at 3:34 PM, Tony Lindgren <tony@atomide.com> wrote: >> > >> > 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. You won't need Kconfig parameters then. Just have module parameters and supply whatever default values you find reasonable. ~Vitaly
> > [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.
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 19d5891..8ef012d 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -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 diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index b4d4346..23f12ff 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -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");
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. Signed-off-by: Shahar Lev <shahar@wizery.com> --- arch/arm/mach-omap2/Kconfig | 23 +++++++++++++++++++++++ arch/arm/mach-omap2/board-omap3evm.c | 12 ++++++------ 2 files changed, 29 insertions(+), 6 deletions(-)