From patchwork Tue Jun 14 12:16:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahar Lev X-Patchwork-Id: 878982 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5ECH1YR017910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 14 Jun 2011 12:17:22 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWSY2-0002WA-GB; Tue, 14 Jun 2011 12:16:46 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QWSY2-0003rr-1G; Tue, 14 Jun 2011 12:16:46 +0000 Received: from mail-wy0-f177.google.com ([74.125.82.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWSXy-0003rY-Bs for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2011 12:16:43 +0000 Received: by wyb28 with SMTP id 28so5203052wyb.36 for ; Tue, 14 Jun 2011 05:16:39 -0700 (PDT) Received: by 10.227.24.74 with SMTP id u10mr6207950wbb.69.1308053799182; Tue, 14 Jun 2011 05:16:39 -0700 (PDT) Received: from localhost.localdomain (89-139-199-166.bb.netvision.net.il [89.139.199.166]) by mx.google.com with ESMTPS id fw15sm4990318wbb.27.2011.06.14.05.16.37 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2011 05:16:38 -0700 (PDT) From: Shahar Lev To: linux-omap@vger.kernel.org Subject: [PATCH] omap3evm: Add Mistral WL12XX config support Date: Tue, 14 Jun 2011 15:16:28 +0300 Message-Id: <1308053788-25937-1-git-send-email-shahar@wizery.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110614_081642_659053_D5CC2397 X-CRM114-Status: GOOD ( 18.58 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.177 listed in list.dnswl.org] Cc: Tony Lindgren , Shahar Lev , linux-arm X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 14 Jun 2011 12:17:22 +0000 (UTC) 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 --- 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 + 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");