Wed Dec 2 13:05:09 2009 UTC ()
Enable latest bluetooth module (Infineon PBA31308).


(kiyohara)
diff -r1.12 -r1.13 src/sys/arch/evbarm/gumstix/gxio.c

cvs diff -r1.12 -r1.13 src/sys/arch/evbarm/gumstix/gxio.c (expand / switch to unified diff)

--- src/sys/arch/evbarm/gumstix/gxio.c 2009/11/22 12:00:56 1.12
+++ src/sys/arch/evbarm/gumstix/gxio.c 2009/12/02 13:05:09 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: gxio.c,v 1.12 2009/11/22 12:00:56 kiyohara Exp $ */ 1/* $NetBSD: gxio.c,v 1.13 2009/12/02 13:05:09 kiyohara Exp $ */
2/* 2/*
3 * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. 3 * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Written by Takashi Kiyohara and Susumu Miki for WIDE Project and SOUM 6 * Written by Takashi Kiyohara and Susumu Miki for WIDE Project and SOUM
7 * Corporation. 7 * Corporation.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * THIS SOFTWARE IS PROVIDED BY THE PROJECT and SOUM CORPORATION ``AS IS'' 21 * THIS SOFTWARE IS PROVIDED BY THE PROJECT and SOUM CORPORATION ``AS IS''
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT AND SOUM CORPORATION 24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT AND SOUM CORPORATION
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE. 31 * POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: gxio.c,v 1.12 2009/11/22 12:00:56 kiyohara Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: gxio.c,v 1.13 2009/12/02 13:05:09 kiyohara Exp $");
35 35
36#include "opt_gxio.h" 36#include "opt_gxio.h"
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/errno.h> 40#include <sys/errno.h>
41#include <sys/kernel.h> 41#include <sys/kernel.h>
42 42
43#include <sys/systm.h> 43#include <sys/systm.h>
44 44
45#include <machine/bootconfig.h> 45#include <machine/bootconfig.h>
46 46
47#include <arm/xscale/pxa2x0cpu.h> 47#include <arm/xscale/pxa2x0cpu.h>
@@ -113,26 +113,27 @@ static struct pxa2x0_gpioconf pxa255dep_ @@ -113,26 +113,27 @@ static struct pxa2x0_gpioconf pxa255dep_
113 { 48, GPIO_ALT_FN_1_OUT }, /* HWTXD */ 113 { 48, GPIO_ALT_FN_1_OUT }, /* HWTXD */
114 { 49, GPIO_ALT_FN_1_IN }, /* HWRXD */ 114 { 49, GPIO_ALT_FN_1_IN }, /* HWRXD */
115 { 50, GPIO_ALT_FN_1_IN }, /* HWCTS */ 115 { 50, GPIO_ALT_FN_1_IN }, /* HWCTS */
116 { 51, GPIO_ALT_FN_1_OUT }, /* HWRTS */ 116 { 51, GPIO_ALT_FN_1_OUT }, /* HWRTS */
117#endif 117#endif
118 118
119 { -1 } 119 { -1 }
120}; 120};
121#endif 121#endif
122#if defined(CPU_XSCALE_PXA270) 122#if defined(CPU_XSCALE_PXA270)
123static struct pxa2x0_gpioconf verdexdep_gpioconf[] = { 123static struct pxa2x0_gpioconf verdexdep_gpioconf[] = {
124 /* Bluetooth module configuration */ 124 /* Bluetooth module configuration */
125 { 9, GPIO_ALT_FN_3_OUT }, /* CHOUT<0> */ 125 { 9, GPIO_ALT_FN_3_OUT }, /* CHOUT<0> */
 126 { 12, GPIO_OUT | GPIO_SET },
126 127
127 /* LCD configuration */ 128 /* LCD configuration */
128 { 17, GPIO_IN }, /* backlight on */ 129 { 17, GPIO_IN }, /* backlight on */
129 130
130 /* FFUART configuration */ 131 /* FFUART configuration */
131 { 27, GPIO_ALT_FN_3_OUT }, /* FFRTS */ 132 { 27, GPIO_ALT_FN_3_OUT }, /* FFRTS */
132 { 34, GPIO_ALT_FN_1_IN }, /* FFRXD */ 133 { 34, GPIO_ALT_FN_1_IN }, /* FFRXD */
133 { 39, GPIO_ALT_FN_2_OUT }, /* FFTXD */ 134 { 39, GPIO_ALT_FN_2_OUT }, /* FFTXD */
134 { 100, GPIO_ALT_FN_3_IN }, /* FFCTS */ 135 { 100, GPIO_ALT_FN_3_IN }, /* FFCTS */
135 136
136 /* BTUART configuration */ 137 /* BTUART configuration */
137 { 42, GPIO_ALT_FN_1_IN }, /* BTRXD */ 138 { 42, GPIO_ALT_FN_1_IN }, /* BTRXD */
138 { 43, GPIO_ALT_FN_2_OUT }, /* BTTXD */ 139 { 43, GPIO_ALT_FN_2_OUT }, /* BTTXD */
@@ -268,27 +269,31 @@ gxio_config_pin(void) @@ -268,27 +269,31 @@ gxio_config_pin(void)
268 pxa27x_com_ffuart_gpioconf, 269 pxa27x_com_ffuart_gpioconf,
269 pxa27x_com_stuart_gpioconf, 270 pxa27x_com_stuart_gpioconf,
270 pxa27x_com_btuart_gpioconf, 271 pxa27x_com_btuart_gpioconf,
271 pxa27x_i2c_gpioconf, 272 pxa27x_i2c_gpioconf,
272 pxa27x_pxaacu_gpioconf, 273 pxa27x_pxaacu_gpioconf,
273 pxa27x_pxamci_gpioconf, 274 pxa27x_pxamci_gpioconf,
274 pxa27x_ohci_gpioconf, 275 pxa27x_ohci_gpioconf,
275 verdexdep_gpioconf, 276 verdexdep_gpioconf,
276 NULL 277 NULL
277 }; 278 };
278#endif 279#endif
279 280
280 /* XXX: turn off for power of bluetooth module */ 281 /* XXX: turn off for power of bluetooth module */
 282#if defined(CPU_XSCALE_PXA250)
281 pxa2x0_gpio_set_function(7, GPIO_OUT | GPIO_CLR); 283 pxa2x0_gpio_set_function(7, GPIO_OUT | GPIO_CLR);
 284#elif defined(CPU_XSCALE_PXA270)
 285 pxa2x0_gpio_set_function(12, GPIO_OUT | GPIO_CLR);
 286#endif
282 delay(100); 287 delay(100);
283 288
284#if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) 289#if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250)
285 pxa2x0_gpio_config( 290 pxa2x0_gpio_config(
286 (CPU_IS_PXA250) ? gumstix_gpioconf : verdex_gpioconf); 291 (CPU_IS_PXA250) ? gumstix_gpioconf : verdex_gpioconf);
287#else 292#else
288#if defined(CPU_XSCALE_PXA270) 293#if defined(CPU_XSCALE_PXA270)
289 pxa2x0_gpio_config(verdex_gpioconf); 294 pxa2x0_gpio_config(verdex_gpioconf);
290#else 295#else
291 pxa2x0_gpio_config(gumstix_gpioconf); 296 pxa2x0_gpio_config(gumstix_gpioconf);
292#endif 297#endif
293#endif 298#endif
294} 299}