Home | History | Annotate | Line # | Download | only in gumstix
gxio.c revision 1.8.6.1
      1  1.8.6.1     skrll /*	$NetBSD: gxio.c,v 1.8.6.1 2009/04/28 07:33:58 skrll Exp $ */
      2      1.1  kiyohara /*
      3      1.3  kiyohara  * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation.
      4      1.1  kiyohara  * All rights reserved.
      5      1.1  kiyohara  *
      6      1.1  kiyohara  * Written by Takashi Kiyohara and Susumu Miki for WIDE Project and SOUM
      7      1.1  kiyohara  * Corporation.
      8      1.1  kiyohara  *
      9      1.1  kiyohara  * Redistribution and use in source and binary forms, with or without
     10      1.1  kiyohara  * modification, are permitted provided that the following conditions
     11      1.1  kiyohara  * are met:
     12      1.1  kiyohara  * 1. Redistributions of source code must retain the above copyright
     13      1.1  kiyohara  *    notice, this list of conditions and the following disclaimer.
     14      1.1  kiyohara  * 2. Redistributions in binary form must reproduce the above copyright
     15      1.1  kiyohara  *    notice, this list of conditions and the following disclaimer in the
     16      1.1  kiyohara  *    documentation and/or other materials provided with the distribution.
     17      1.1  kiyohara  * 3. Neither the name of the project nor the name of SOUM Corporation
     18      1.1  kiyohara  *    may be used to endorse or promote products derived from this software
     19      1.1  kiyohara  *    without specific prior written permission.
     20      1.1  kiyohara  *
     21      1.1  kiyohara  * THIS SOFTWARE IS PROVIDED BY THE PROJECT and SOUM CORPORATION ``AS IS''
     22      1.1  kiyohara  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     23      1.1  kiyohara  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     24      1.1  kiyohara  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT AND SOUM CORPORATION
     25      1.1  kiyohara  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26      1.1  kiyohara  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27      1.1  kiyohara  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28      1.1  kiyohara  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29      1.1  kiyohara  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30      1.1  kiyohara  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     31      1.1  kiyohara  * POSSIBILITY OF SUCH DAMAGE.
     32      1.1  kiyohara  */
     33      1.1  kiyohara #include <sys/cdefs.h>
     34  1.8.6.1     skrll __KERNEL_RCSID(0, "$NetBSD: gxio.c,v 1.8.6.1 2009/04/28 07:33:58 skrll Exp $");
     35      1.3  kiyohara 
     36      1.3  kiyohara #include "opt_gxio.h"
     37      1.1  kiyohara 
     38      1.1  kiyohara #include <sys/param.h>
     39      1.1  kiyohara #include <sys/device.h>
     40      1.1  kiyohara #include <sys/errno.h>
     41      1.1  kiyohara 
     42      1.1  kiyohara #include <sys/systm.h>
     43      1.1  kiyohara 
     44      1.1  kiyohara #include <machine/bootconfig.h>
     45      1.1  kiyohara 
     46      1.1  kiyohara #include <arm/xscale/pxa2x0cpu.h>
     47      1.1  kiyohara #include <arm/xscale/pxa2x0reg.h>
     48      1.1  kiyohara #include <arm/xscale/pxa2x0var.h>
     49      1.1  kiyohara #include <arm/xscale/pxa2x0_gpio.h>
     50      1.1  kiyohara #include <evbarm/gumstix/gumstixvar.h>
     51      1.1  kiyohara 
     52      1.1  kiyohara #include "locators.h"
     53      1.1  kiyohara 
     54      1.1  kiyohara 
     55      1.3  kiyohara struct gxioconf {
     56      1.3  kiyohara 	const char *name;
     57      1.4  kiyohara 	void (*config)(void);
     58      1.3  kiyohara };
     59      1.3  kiyohara 
     60      1.8  kiyohara static int gxiomatch(device_t, struct cfdata *, void *);
     61      1.8  kiyohara static void gxioattach(device_t, device_t, void *);
     62      1.8  kiyohara static int gxiosearch(device_t, struct cfdata *, const int *, void *);
     63      1.1  kiyohara static int gxioprint(void *, const char *);
     64      1.1  kiyohara 
     65      1.3  kiyohara void gxio_config_pin(void);
     66      1.6  kiyohara void gxio_config_expansion(char *);
     67      1.4  kiyohara static void gxio_config_gpio(const struct gxioconf *, char *);
     68      1.6  kiyohara static void basix_config(void);
     69      1.4  kiyohara static void cfstix_config(void);
     70      1.4  kiyohara static void etherstix_config(void);
     71      1.4  kiyohara static void netcf_config(void);
     72      1.4  kiyohara static void netduommc_config(void);
     73      1.4  kiyohara static void netduo_config(void);
     74      1.4  kiyohara static void netmmc_config(void);
     75      1.4  kiyohara static void wifistix_cf_config(void);
     76      1.1  kiyohara 
     77      1.8  kiyohara CFATTACH_DECL_NEW(
     78      1.1  kiyohara     gxio, sizeof(struct gxio_softc), gxiomatch, gxioattach, NULL, NULL);
     79      1.1  kiyohara 
     80      1.6  kiyohara char busheader[MAX_BOOT_STRING];
     81      1.1  kiyohara 
     82      1.5  kiyohara static struct pxa2x0_gpioconf boarddep_gpioconf[] = {
     83      1.3  kiyohara 	/* Bluetooth module configuration */
     84      1.3  kiyohara 	{  7, GPIO_OUT | GPIO_SET },	/* power on */
     85      1.3  kiyohara 	{ 12, GPIO_ALT_FN_1_OUT },	/* 32kHz out. required by SingleStone */
     86      1.3  kiyohara 
     87      1.3  kiyohara 	/* AC97 configuration */
     88      1.5  kiyohara 	{ 29, GPIO_CLR | GPIO_ALT_FN_1_IN },	/* SDATA_IN0 */
     89      1.3  kiyohara 
     90      1.3  kiyohara #ifndef GXIO_BLUETOOTH_ON_HWUART
     91      1.3  kiyohara 	/* BTUART configuration */
     92      1.3  kiyohara 	{ 44, GPIO_ALT_FN_1_IN },	/* BTCST */
     93      1.3  kiyohara 	{ 45, GPIO_ALT_FN_2_OUT },	/* BTRST */
     94      1.3  kiyohara #else
     95      1.3  kiyohara 	/* HWUART configuration */
     96      1.3  kiyohara 	{ 42, GPIO_ALT_FN_3_IN },	/* HWRXD */
     97      1.3  kiyohara 	{ 43, GPIO_ALT_FN_3_OUT },	/* HWTXD */
     98      1.3  kiyohara 	{ 44, GPIO_ALT_FN_3_IN },	/* HWCST */
     99      1.3  kiyohara 	{ 45, GPIO_ALT_FN_3_OUT },	/* HWRST */
    100      1.3  kiyohara #endif
    101      1.3  kiyohara 
    102      1.3  kiyohara #ifndef GXIO_BLUETOOTH_ON_HWUART
    103      1.3  kiyohara 	/* HWUART configuration */
    104      1.3  kiyohara 	{ 48, GPIO_ALT_FN_1_OUT },	/* HWTXD */
    105      1.3  kiyohara 	{ 49, GPIO_ALT_FN_1_IN },	/* HWRXD */
    106      1.3  kiyohara 	{ 50, GPIO_ALT_FN_1_IN },	/* HWCTS */
    107      1.3  kiyohara 	{ 51, GPIO_ALT_FN_1_OUT },	/* HWRTS */
    108      1.3  kiyohara #endif
    109      1.3  kiyohara 
    110      1.3  kiyohara 	{ -1 }
    111      1.1  kiyohara };
    112      1.1  kiyohara 
    113      1.1  kiyohara static const struct gxioconf busheader_conf[] = {
    114      1.6  kiyohara 	{ "basix",		basix_config },
    115      1.1  kiyohara 	{ "cfstix",		cfstix_config },
    116      1.1  kiyohara 	{ "etherstix",		etherstix_config },
    117      1.1  kiyohara 	{ "netcf",		netcf_config },
    118      1.3  kiyohara 	{ "netduo-mmc",		netduommc_config },
    119      1.1  kiyohara 	{ "netduo",		netduo_config },
    120      1.1  kiyohara 	{ "netmmc",		netmmc_config },
    121      1.4  kiyohara 	{ "wifistix-cf",	wifistix_cf_config },
    122      1.3  kiyohara 	{ "wifistix",		cfstix_config },
    123      1.1  kiyohara 	{ NULL }
    124      1.1  kiyohara };
    125      1.1  kiyohara 
    126      1.1  kiyohara 
    127      1.1  kiyohara /* ARGSUSED */
    128      1.1  kiyohara static int
    129      1.8  kiyohara gxiomatch(device_t parent, struct cfdata *match, void *aux)
    130      1.1  kiyohara {
    131      1.1  kiyohara 	bus_space_tag_t iot = &pxa2x0_bs_tag;
    132      1.1  kiyohara 	bus_space_handle_t ioh;
    133      1.1  kiyohara 
    134      1.1  kiyohara 	if (bus_space_map(iot,
    135      1.1  kiyohara 	    PXA2X0_MEMCTL_BASE, PXA2X0_MEMCTL_SIZE, 0, &ioh))
    136      1.1  kiyohara 		return (0);
    137      1.1  kiyohara 	bus_space_unmap(iot, ioh, PXA2X0_MEMCTL_SIZE);
    138      1.1  kiyohara 
    139      1.1  kiyohara 	/* nothing */
    140      1.1  kiyohara 	return (1);
    141      1.1  kiyohara }
    142      1.1  kiyohara 
    143      1.1  kiyohara /* ARGSUSED */
    144      1.1  kiyohara static void
    145      1.8  kiyohara gxioattach(device_t parent, device_t self, void *aux)
    146      1.1  kiyohara {
    147      1.3  kiyohara 	struct gxio_softc *sc = device_private(self);
    148      1.1  kiyohara 
    149      1.3  kiyohara 	aprint_normal("\n");
    150      1.3  kiyohara 	aprint_naive("\n");
    151      1.1  kiyohara 
    152      1.8  kiyohara 	sc->sc_dev = self;
    153      1.1  kiyohara 	sc->sc_iot = &pxa2x0_bs_tag;
    154      1.1  kiyohara 
    155      1.1  kiyohara 	if (bus_space_map(sc->sc_iot,
    156      1.1  kiyohara 	    PXA2X0_MEMCTL_BASE, PXA2X0_MEMCTL_SIZE, 0, &sc->sc_ioh))
    157      1.1  kiyohara 		return;
    158      1.1  kiyohara 
    159      1.1  kiyohara 	/*
    160      1.4  kiyohara 	 *  Attach each gumstix expansion of busheader side devices
    161      1.1  kiyohara 	 */
    162      1.1  kiyohara 	config_search_ia(gxiosearch, self, "gxio", NULL);
    163      1.1  kiyohara }
    164      1.1  kiyohara 
    165      1.1  kiyohara /* ARGSUSED */
    166      1.1  kiyohara static int
    167      1.8  kiyohara gxiosearch(device_t parent, struct cfdata *cf, const int *ldesc, void *aux)
    168      1.1  kiyohara {
    169      1.3  kiyohara 	struct gxio_softc *sc = device_private(parent);
    170      1.1  kiyohara 	struct gxio_attach_args gxa;
    171      1.1  kiyohara 
    172      1.1  kiyohara 	gxa.gxa_sc = sc;
    173      1.1  kiyohara 	gxa.gxa_iot = sc->sc_iot;
    174      1.1  kiyohara 	gxa.gxa_addr = cf->cf_loc[GXIOCF_ADDR];
    175      1.1  kiyohara 	gxa.gxa_gpirq = cf->cf_loc[GXIOCF_GPIRQ];
    176      1.1  kiyohara 
    177      1.1  kiyohara 	if (config_match(parent, cf, &gxa))
    178      1.1  kiyohara 		config_attach(parent, cf, &gxa, gxioprint);
    179      1.1  kiyohara 
    180      1.1  kiyohara 	return (0);
    181      1.1  kiyohara }
    182      1.1  kiyohara 
    183      1.1  kiyohara /* ARGSUSED */
    184      1.1  kiyohara static int
    185      1.1  kiyohara gxioprint(void *aux, const char *name)
    186      1.1  kiyohara {
    187      1.1  kiyohara 	struct gxio_attach_args *gxa = (struct gxio_attach_args *)aux;
    188      1.1  kiyohara 
    189      1.1  kiyohara 	if (gxa->gxa_addr != GXIOCF_ADDR_DEFAULT)
    190      1.1  kiyohara 		printf(" addr 0x%lx", gxa->gxa_addr);
    191      1.1  kiyohara 	if (gxa->gxa_gpirq > 0)
    192      1.1  kiyohara 		printf(" gpirq %d", gxa->gxa_gpirq);
    193      1.1  kiyohara 	return (UNCONF);
    194      1.1  kiyohara }
    195      1.1  kiyohara 
    196      1.1  kiyohara 
    197      1.1  kiyohara /*
    198      1.3  kiyohara  * configure for GPIO pin and expansion boards.
    199      1.1  kiyohara  */
    200      1.1  kiyohara void
    201  1.8.6.1     skrll gxio_config_pin(void)
    202      1.3  kiyohara {
    203      1.5  kiyohara 	struct pxa2x0_gpioconf *gumstix_gpioconf[] = {
    204      1.5  kiyohara 		pxa25x_com_ffuart_gpioconf,
    205      1.5  kiyohara 		pxa25x_com_stuart_gpioconf,
    206      1.5  kiyohara #ifndef GXIO_BLUETOOTH_ON_HWUART
    207      1.5  kiyohara 		pxa25x_com_btuart_gpioconf,
    208      1.5  kiyohara #endif
    209      1.5  kiyohara 		pxa25x_com_hwuart_gpioconf,
    210      1.5  kiyohara 		pxa25x_i2c_gpioconf,
    211      1.5  kiyohara 		pxa25x_pxaacu_gpioconf,
    212      1.5  kiyohara 		boarddep_gpioconf,
    213      1.5  kiyohara 		NULL
    214      1.5  kiyohara 	};
    215      1.3  kiyohara 
    216      1.3  kiyohara 	/* XXX: turn off for power of bluetooth module */
    217      1.3  kiyohara 	pxa2x0_gpio_set_function(7, GPIO_OUT | GPIO_CLR);
    218      1.3  kiyohara 	delay(100);
    219      1.3  kiyohara 
    220      1.5  kiyohara 	pxa2x0_gpio_config(gumstix_gpioconf);
    221      1.3  kiyohara }
    222      1.3  kiyohara 
    223      1.4  kiyohara void
    224      1.6  kiyohara gxio_config_expansion(char *expansion)
    225      1.4  kiyohara {
    226      1.6  kiyohara #ifdef GXIO_DEFAULT_EXPANSION
    227      1.6  kiyohara 	char default_expansion[] = GXIO_DEFAULT_EXPANSION;
    228      1.6  kiyohara #endif
    229      1.4  kiyohara 
    230      1.6  kiyohara 	if (expansion == NULL) {
    231      1.6  kiyohara #ifndef GXIO_DEFAULT_EXPANSION
    232      1.6  kiyohara 		return;
    233      1.6  kiyohara #else
    234      1.6  kiyohara 		printf("not specified 'busheader=' in the boot args.\n");
    235      1.6  kiyohara 		printf("configure default expansion (%s)\n",
    236      1.6  kiyohara 		    GXIO_DEFAULT_EXPANSION);
    237      1.6  kiyohara 		expansion = default_expansion;
    238      1.6  kiyohara #endif
    239      1.6  kiyohara 	}
    240      1.4  kiyohara 	gxio_config_gpio(busheader_conf, expansion);
    241      1.4  kiyohara }
    242      1.4  kiyohara 
    243      1.3  kiyohara static void
    244      1.4  kiyohara gxio_config_gpio(const struct gxioconf *gxioconflist, char *expansion)
    245      1.1  kiyohara {
    246      1.1  kiyohara 	int i, rv;
    247      1.1  kiyohara 
    248      1.3  kiyohara 	for (i = 0; i < strlen(expansion); i++)
    249      1.3  kiyohara 		expansion[i] = tolower(expansion[i]);
    250      1.3  kiyohara 	for (i = 0; gxioconflist[i].name != NULL; i++) {
    251      1.3  kiyohara 		rv = strncmp(expansion, gxioconflist[i].name,
    252      1.3  kiyohara 		    strlen(gxioconflist[i].name) + 1);
    253      1.1  kiyohara 		if (rv == 0) {
    254      1.4  kiyohara 			gxioconflist[i].config();
    255      1.1  kiyohara 			break;
    256      1.1  kiyohara 		}
    257      1.1  kiyohara 	}
    258      1.3  kiyohara }
    259      1.1  kiyohara 
    260      1.1  kiyohara 
    261      1.1  kiyohara static void
    262  1.8.6.1     skrll basix_config(void)
    263      1.6  kiyohara {
    264      1.6  kiyohara 
    265      1.6  kiyohara 	pxa2x0_gpio_set_function(8, GPIO_ALT_FN_1_OUT);		/* MMCCS0 */
    266      1.6  kiyohara 	pxa2x0_gpio_set_function(53, GPIO_ALT_FN_1_OUT);	/* MMCCLK */
    267      1.6  kiyohara #if 0
    268      1.6  kiyohara 	/* this configuration set by gxmci.c::pxamci_attach() */
    269      1.6  kiyohara 	pxa2x0_gpio_set_function(11, GPIO_IN);			/* nSD_DETECT */
    270      1.6  kiyohara 	pxa2x0_gpio_set_function(22, GPIO_IN);			/* nSD_WP */
    271      1.6  kiyohara #endif
    272      1.6  kiyohara }
    273      1.6  kiyohara 
    274      1.6  kiyohara static void
    275  1.8.6.1     skrll cfstix_config(void)
    276      1.1  kiyohara {
    277      1.1  kiyohara 	u_int gpio, npoe_fn;
    278      1.1  kiyohara 
    279      1.4  kiyohara #if 1
    280      1.6  kiyohara 	/* this configuration set by pxa2x0_pcic.c::pxapcic_attach_common() */
    281      1.4  kiyohara #else
    282      1.4  kiyohara 	pxa2x0_gpio_set_function(11, GPIO_IN);		/* PCD1 */
    283      1.4  kiyohara 	pxa2x0_gpio_set_function(26, GPIO_IN);		/* PRDY1/~IRQ1 */
    284      1.4  kiyohara #endif
    285      1.4  kiyohara 	pxa2x0_gpio_set_function(4, GPIO_IN); 		/* BVD1/~STSCHG1 */
    286      1.1  kiyohara 
    287      1.1  kiyohara 	for (gpio = 48, npoe_fn = 0; gpio <= 53 ; gpio++)
    288      1.1  kiyohara 		npoe_fn |= pxa2x0_gpio_get_function(gpio);
    289      1.1  kiyohara 	npoe_fn &= GPIO_SET;
    290      1.1  kiyohara 
    291      1.1  kiyohara 	pxa2x0_gpio_set_function(48, GPIO_ALT_FN_2_OUT | npoe_fn); /* nPOE */
    292      1.1  kiyohara 	pxa2x0_gpio_set_function(49, GPIO_ALT_FN_2_OUT);	/* nPWE */
    293      1.1  kiyohara 	pxa2x0_gpio_set_function(50, GPIO_ALT_FN_2_OUT);	/* nPIOR */
    294      1.1  kiyohara 	pxa2x0_gpio_set_function(51, GPIO_ALT_FN_2_OUT);	/* nPIOW */
    295      1.1  kiyohara 	pxa2x0_gpio_set_function(52, GPIO_ALT_FN_2_OUT);	/* nPCE1 */
    296      1.4  kiyohara 	pxa2x0_gpio_set_function(53, GPIO_ALT_FN_2_OUT);	/* nPCE2 */
    297      1.1  kiyohara 	pxa2x0_gpio_set_function(54, GPIO_ALT_FN_2_OUT);	/* pSKTSEL */
    298      1.1  kiyohara 	pxa2x0_gpio_set_function(55, GPIO_ALT_FN_2_OUT);	/* nPREG */
    299      1.1  kiyohara 	pxa2x0_gpio_set_function(56, GPIO_ALT_FN_1_IN);		/* nPWAIT */
    300      1.1  kiyohara 	pxa2x0_gpio_set_function(57, GPIO_ALT_FN_1_IN);		/* nIOIS16 */
    301      1.1  kiyohara }
    302      1.1  kiyohara 
    303      1.1  kiyohara static void
    304  1.8.6.1     skrll etherstix_config(void)
    305      1.1  kiyohara {
    306      1.1  kiyohara 
    307      1.1  kiyohara 	pxa2x0_gpio_set_function(49, GPIO_ALT_FN_2_OUT);	/* nPWE */
    308      1.1  kiyohara 	pxa2x0_gpio_set_function(15, GPIO_ALT_FN_2_OUT);	/* nCS 1 */
    309      1.1  kiyohara 	pxa2x0_gpio_set_function(80, GPIO_OUT | GPIO_SET);	/* RESET 1 */
    310      1.1  kiyohara 	delay(1);
    311      1.1  kiyohara 	pxa2x0_gpio_set_function(80, GPIO_OUT | GPIO_CLR);
    312      1.1  kiyohara 	delay(50000);
    313      1.1  kiyohara }
    314      1.1  kiyohara 
    315      1.1  kiyohara static void
    316  1.8.6.1     skrll netcf_config(void)
    317      1.1  kiyohara {
    318      1.1  kiyohara 
    319      1.4  kiyohara 	etherstix_config();
    320      1.4  kiyohara 	cfstix_config();
    321      1.1  kiyohara }
    322      1.1  kiyohara 
    323      1.1  kiyohara static void
    324  1.8.6.1     skrll netduommc_config(void)
    325      1.3  kiyohara {
    326      1.3  kiyohara 
    327      1.4  kiyohara 	netduo_config();
    328      1.6  kiyohara 	basix_config();
    329      1.3  kiyohara }
    330      1.3  kiyohara 
    331      1.3  kiyohara static void
    332  1.8.6.1     skrll netduo_config(void)
    333      1.1  kiyohara {
    334      1.1  kiyohara 
    335      1.4  kiyohara 	etherstix_config();
    336      1.1  kiyohara 
    337      1.1  kiyohara 	pxa2x0_gpio_set_function(78, GPIO_ALT_FN_2_OUT);	/* nCS 2 */
    338      1.1  kiyohara 	pxa2x0_gpio_set_function(52, GPIO_OUT | GPIO_SET);	/* RESET 2 */
    339      1.1  kiyohara 	delay(1);
    340      1.1  kiyohara 	pxa2x0_gpio_set_function(52, GPIO_OUT | GPIO_CLR);
    341      1.1  kiyohara 	delay(50000);
    342      1.1  kiyohara }
    343      1.1  kiyohara 
    344      1.1  kiyohara static void
    345  1.8.6.1     skrll netmmc_config(void)
    346      1.1  kiyohara {
    347      1.1  kiyohara 
    348      1.4  kiyohara 	etherstix_config();
    349      1.6  kiyohara 	basix_config();
    350      1.1  kiyohara }
    351      1.4  kiyohara 
    352      1.4  kiyohara static void
    353  1.8.6.1     skrll wifistix_cf_config(void)
    354      1.4  kiyohara {
    355      1.4  kiyohara 
    356      1.4  kiyohara #if 1
    357      1.6  kiyohara 	/* this configuration set by pxa2x0_pcic.c::pxapcic_attach_common() */
    358      1.4  kiyohara #else
    359      1.4  kiyohara 	pxa2x0_gpio_set_function(36, GPIO_IN);		/* PCD2 */
    360      1.4  kiyohara 	pxa2x0_gpio_set_function(27, GPIO_IN);		/* PRDY2/~IRQ2 */
    361      1.4  kiyohara #endif
    362      1.4  kiyohara 	pxa2x0_gpio_set_function(18, GPIO_IN); 		/* BVD2/~STSCHG2 */
    363      1.4  kiyohara 
    364      1.4  kiyohara 	cfstix_config();
    365      1.4  kiyohara }
    366