Index: sys/arch/arm/xscale/pxa2x0_com.c =================================================================== RCS file: /cvsroot/src/sys/arch/arm/xscale/pxa2x0_com.c,v retrieving revision 1.10 diff -u -r1.10 pxa2x0_com.c --- sys/arch/arm/xscale/pxa2x0_com.c 14 Mar 2008 15:09:09 -0000 1.10 +++ sys/arch/arm/xscale/pxa2x0_com.c 12 Sep 2008 06:02:52 -0000 @@ -103,8 +103,9 @@ case PXA2X0_HWUART_BASE: if (pxa->pxa_intr != PXA2X0_INT_HWUART) return (0); - gpioconf = CPU_IS_PXA250 ? pxa25x_com_hwuart_gpioconf : - pxa27x_com_hwuart_gpioconf; + if (CPU_IS_PXA270) + return (0); + gpioconf = pxa25x_com_hwuart_gpioconf; break; default: Index: sys/arch/arm/xscale/pxa2x0_gpio.c =================================================================== RCS file: /cvsroot/src/sys/arch/arm/xscale/pxa2x0_gpio.c,v retrieving revision 1.10 diff -u -r1.10 pxa2x0_gpio.c --- sys/arch/arm/xscale/pxa2x0_gpio.c 24 Apr 2008 11:46:30 -0000 1.10 +++ sys/arch/arm/xscale/pxa2x0_gpio.c 12 Sep 2008 06:02:52 -0000 @@ -853,10 +853,6 @@ { -1 } }; -struct pxa2x0_gpioconf pxa27x_com_hwuart_gpioconf[] = { - { -1 } -}; - struct pxa2x0_gpioconf pxa27x_com_stuart_gpioconf[] = { { 46, GPIO_CLR | GPIO_ALT_FN_2_IN }, /* STD_RXD */ { 47, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* STD_TXD */ @@ -886,15 +882,16 @@ { 55, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* nPREG */ { 56, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* nPWAIT */ { 57, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* nIOIS16 */ - { 104, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* pSKTSEL */ #if 0 /* We can select and/or. */ + { 79, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* pSKTSEL */ { 85, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE1 */ { 86, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE1 */ { 102, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE1 */ { 54, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* nPCE2 */ { 78, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE2 */ + { 104, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* pSKTSEL */ { 105, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE2 */ #endif Index: sys/arch/arm/xscale/pxa2x0_gpio.h =================================================================== RCS file: /cvsroot/src/sys/arch/arm/xscale/pxa2x0_gpio.h,v retrieving revision 1.4 diff -u -r1.4 pxa2x0_gpio.h --- sys/arch/arm/xscale/pxa2x0_gpio.h 24 Jun 2008 20:19:05 -0000 1.4 +++ sys/arch/arm/xscale/pxa2x0_gpio.h 12 Sep 2008 06:02:52 -0000 @@ -87,7 +87,6 @@ extern struct pxa2x0_gpioconf pxa27x_com_ffuart_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_com_stuart_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_com_btuart_gpioconf[]; -extern struct pxa2x0_gpioconf pxa27x_com_hwuart_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_i2c_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_i2s_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_pcic_gpioconf[]; Index: sys/arch/evbarm/gumstix/gxio.c =================================================================== RCS file: /cvsroot/src/sys/arch/evbarm/gumstix/gxio.c,v retrieving revision 1.8 diff -u -r1.8 gxio.c --- sys/arch/evbarm/gumstix/gxio.c 11 May 2008 08:23:17 -0000 1.8 +++ sys/arch/evbarm/gumstix/gxio.c 12 Sep 2008 06:02:52 -0000 @@ -79,13 +79,18 @@ char busheader[MAX_BOOT_STRING]; -static struct pxa2x0_gpioconf boarddep_gpioconf[] = { +#if defined(CPU_XSCALE_PXA250) +static struct pxa2x0_gpioconf pxa255dep_gpioconf[] = { /* Bluetooth module configuration */ { 7, GPIO_OUT | GPIO_SET }, /* power on */ { 12, GPIO_ALT_FN_1_OUT }, /* 32kHz out. required by SingleStone */ /* AC97 configuration */ - { 29, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* SDATA_IN0 */ + { 29, GPIO_ALT_FN_1_IN }, /* SDATA_IN0 */ + + /* FFUART configuration */ + { 35, GPIO_ALT_FN_1_IN }, /* CTS */ + { 41, GPIO_ALT_FN_2_OUT }, /* RTS */ #ifndef GXIO_BLUETOOTH_ON_HWUART /* BTUART configuration */ @@ -109,6 +114,25 @@ { -1 } }; +#endif +#if defined(CPU_XSCALE_PXA270) +static struct pxa2x0_gpioconf verdexdep_gpioconf[] = { + /* FFUART configuration */ + { 27, GPIO_ALT_FN_3_OUT }, /* FFRTS */ + { 34, GPIO_ALT_FN_1_IN }, /* FFRXD */ + { 39, GPIO_ALT_FN_2_OUT }, /* FFTXD */ + { 100, GPIO_ALT_FN_3_IN }, /* FFCTS */ + + /* BTUART configuration */ + { 44, GPIO_ALT_FN_1_IN }, /* BTCST */ + { 45, GPIO_ALT_FN_2_OUT }, /* BTRST */ + + /* AC97 configuration */ + { 29, GPIO_ALT_FN_1_IN }, /* SDATA_IN0 */ + + { -1 } +}; +#endif static const struct gxioconf busheader_conf[] = { { "basix", basix_config }, @@ -200,6 +224,7 @@ void gxio_config_pin() { +#if defined(CPU_XSCALE_PXA250) struct pxa2x0_gpioconf *gumstix_gpioconf[] = { pxa25x_com_ffuart_gpioconf, pxa25x_com_stuart_gpioconf, @@ -209,15 +234,36 @@ pxa25x_com_hwuart_gpioconf, pxa25x_i2c_gpioconf, pxa25x_pxaacu_gpioconf, - boarddep_gpioconf, + pxa255dep_gpioconf, NULL }; +#endif +#if defined(CPU_XSCALE_PXA270) + struct pxa2x0_gpioconf *verdex_gpioconf[] = { + pxa27x_com_ffuart_gpioconf, + pxa27x_com_stuart_gpioconf, + pxa27x_com_btuart_gpioconf, + pxa27x_i2c_gpioconf, + pxa27x_pxaacu_gpioconf, + verdexdep_gpioconf, + NULL + }; +#endif /* XXX: turn off for power of bluetooth module */ pxa2x0_gpio_set_function(7, GPIO_OUT | GPIO_CLR); delay(100); +#if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) + pxa2x0_gpio_config( + (CPU_IS_PXA250) ? gumstix_gpioconf : verdex_gpioconf); +#else +#if defined(CPU_XSCALE_PXA270) + pxa2x0_gpio_config(verdex_gpioconf); +#else pxa2x0_gpio_config(gumstix_gpioconf); +#endif +#endif } void @@ -275,14 +321,23 @@ cfstix_config() { u_int gpio, npoe_fn; +#if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) + int bvd = (CPU_IS_PXA250) ? 4 : 111; +#else +#if defined(CPU_XSCALE_PXA270) + const int bvd = 111; +#else + const int bvd = 4; +#endif +#endif #if 1 - /* this configuration set by pxa2x0_pcic.c::pxapcic_attach_common() */ + /* PCD/PRDY set by pxa2x0_pcic.c::pxapcic_attach_common() */ #else pxa2x0_gpio_set_function(11, GPIO_IN); /* PCD1 */ pxa2x0_gpio_set_function(26, GPIO_IN); /* PRDY1/~IRQ1 */ #endif - pxa2x0_gpio_set_function(4, GPIO_IN); /* BVD1/~STSCHG1 */ + pxa2x0_gpio_set_function(bvd, GPIO_IN); /* BVD1/~STSCHG1 */ for (gpio = 48, npoe_fn = 0; gpio <= 53 ; gpio++) npoe_fn |= pxa2x0_gpio_get_function(gpio); @@ -292,9 +347,15 @@ pxa2x0_gpio_set_function(49, GPIO_ALT_FN_2_OUT); /* nPWE */ pxa2x0_gpio_set_function(50, GPIO_ALT_FN_2_OUT); /* nPIOR */ pxa2x0_gpio_set_function(51, GPIO_ALT_FN_2_OUT); /* nPIOW */ - pxa2x0_gpio_set_function(52, GPIO_ALT_FN_2_OUT); /* nPCE1 */ - pxa2x0_gpio_set_function(53, GPIO_ALT_FN_2_OUT); /* nPCE2 */ - pxa2x0_gpio_set_function(54, GPIO_ALT_FN_2_OUT); /* pSKTSEL */ + if (CPU_IS_PXA250) { + pxa2x0_gpio_set_function(52, GPIO_ALT_FN_2_OUT); /* nPCE1 */ + pxa2x0_gpio_set_function(53, GPIO_ALT_FN_2_OUT); /* nPCE2 */ + pxa2x0_gpio_set_function(54, GPIO_ALT_FN_2_OUT); /* pSKTSEL */ + } else { + pxa2x0_gpio_set_function(102, GPIO_ALT_FN_1_OUT); /* nPCE1 */ + pxa2x0_gpio_set_function(105, GPIO_ALT_FN_1_OUT); /* nPCE2 */ + pxa2x0_gpio_set_function(79, GPIO_ALT_FN_1_OUT); /* pSKTSEL */ + } pxa2x0_gpio_set_function(55, GPIO_ALT_FN_2_OUT); /* nPREG */ pxa2x0_gpio_set_function(56, GPIO_ALT_FN_1_IN); /* nPWAIT */ pxa2x0_gpio_set_function(57, GPIO_ALT_FN_1_IN); /* nIOIS16 */ @@ -303,13 +364,32 @@ static void etherstix_config() { + extern struct cfdata cfdata[]; +#if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) + int rst = (CPU_IS_PXA250) ? 80 : 32; + int irq = (CPU_IS_PXA250) ? 36 : 99; +#else +#if defined(CPU_XSCALE_PXA270) + const int rst = 32, irq = 99; +#else + const int rst = 80, irq = 36; +#endif +#endif + int i; pxa2x0_gpio_set_function(49, GPIO_ALT_FN_2_OUT); /* nPWE */ pxa2x0_gpio_set_function(15, GPIO_ALT_FN_2_OUT); /* nCS 1 */ - pxa2x0_gpio_set_function(80, GPIO_OUT | GPIO_SET); /* RESET 1 */ + pxa2x0_gpio_set_function(rst, GPIO_OUT | GPIO_SET); /* RESET 1 */ delay(1); - pxa2x0_gpio_set_function(80, GPIO_OUT | GPIO_CLR); + pxa2x0_gpio_set_function(rst, GPIO_OUT | GPIO_CLR); delay(50000); + + for (i = 0; cfdata[i].cf_name != NULL; i++) + if (strcmp(cfdata[i].cf_name, "sm") == 0 && + strcmp(cfdata[i].cf_atname, "sm_gxio") == 0 && + cfdata[i].cf_loc[GXIOCF_ADDR] == 0x04000300 && + cfdata[i].cf_loc[GXIOCF_GPIRQ] == GXIOCF_GPIRQ_DEFAULT) + cfdata[i].cf_loc[GXIOCF_GPIRQ] = irq; } static void Index: sys/arch/evbarm/gumstix/gxpcic.c =================================================================== RCS file: /cvsroot/src/sys/arch/evbarm/gumstix/gxpcic.c,v retrieving revision 1.8 diff -u -r1.8 gxpcic.c --- sys/arch/evbarm/gumstix/gxpcic.c 11 May 2008 08:23:17 -0000 1.8 +++ sys/arch/evbarm/gumstix/gxpcic.c 12 Sep 2008 06:02:53 -0000 @@ -94,11 +94,16 @@ #define HAVE_CARD(r) (!((r) & GPIO_SET)) +/* for connex */ #define GXIO_GPIRQ11_CD1 11 #define GXIO_GPIRQ26_PRDY1 26 #define GXIO_GPIRQ27_PRDY2 27 #define GXIO_GPIRQ36_CD2 36 +/* for verdex */ +#define GXIO_GPIRQ104_CD1 104 +#define GXIO_GPIRQ109_PRDY1 109 + static int gxpcic_match(device_t, struct cfdata *, void *); static void gxpcic_attach(device_t, device_t, void *); @@ -127,13 +132,16 @@ gxpcic_intr_disestablish, }; -static struct { +struct { int cd; int prdy; -} gxpcic_slot_irqs[] = { +} gxpcic_25x_slot_irqs[] = { { GXIO_GPIRQ11_CD1, GXIO_GPIRQ26_PRDY1 }, - { GXIO_GPIRQ36_CD2, GXIO_GPIRQ27_PRDY2 } -}; + { GXIO_GPIRQ36_CD2, GXIO_GPIRQ27_PRDY2 }, +}, gxpcic_27x_slot_irqs[] = { + { GXIO_GPIRQ104_CD1, GXIO_GPIRQ109_PRDY1 }, + { 0, 0 }, +}, *gxpcic_slot_irqs; static int @@ -167,6 +175,8 @@ int nslot, i; sc->sc_iot = pxa->pxa_iot; + gxpcic_slot_irqs = + (CPU_IS_PXA250) ? gxpcic_25x_slot_irqs : gxpcic_27x_slot_irqs; nslot = gxpcic_count_slot(sc); Index: sys/arch/zaurus/zaurus/machdep.c =================================================================== RCS file: /cvsroot/src/sys/arch/zaurus/zaurus/machdep.c,v retrieving revision 1.9 diff -u -r1.9 machdep.c --- sys/arch/zaurus/zaurus/machdep.c 27 Apr 2008 18:58:47 -0000 1.9 +++ sys/arch/zaurus/zaurus/machdep.c 12 Sep 2008 06:02:59 -0000 @@ -285,6 +285,8 @@ { 44, GPIO_ALT_FN_1_IN }, /* BTCST */ { 45, GPIO_ALT_FN_2_OUT }, /* BTRST */ + { 104, GPIO_ALT_FN_1_OUT }, /* pSKTSEL */ + { 109, GPIO_ALT_FN_1_IN }, /* MMDAT<1> */ { 110, GPIO_ALT_FN_1_IN }, /* MMDAT<2>/MMCCS<0> */ { 111, GPIO_ALT_FN_1_IN }, /* MMDAT<3>/MMCCS<1> */ Index: sys/arch/evbarm/conf/GUMSTIX =================================================================== RCS file: /cvsroot/src/sys/arch/evbarm/conf/GUMSTIX,v retrieving revision 1.28 diff -u -r1.28 GUMSTIX --- sys/arch/evbarm/conf/GUMSTIX 31 Jul 2008 07:41:00 -0000 1.28 +++ sys/arch/evbarm/conf/GUMSTIX 28 Sep 2008 10:04:32 -0000 @@ -14,7 +14,8 @@ # CPU options # For XScale systems -options CPU_XSCALE_PXA250 # Support the XScale core +options CPU_XSCALE_PXA250 # Support the basix/connex motherboards +options CPU_XSCALE_PXA270 # Support the verdex motherboards makeoptions CPUFLAGS="-mcpu=xscale" # Architecture options @@ -157,7 +158,7 @@ #options KGDB #options DEBUG_KGDB makeoptions DEBUG="-g -O2" # compile full symbol table -options SYMTAB_SPACE=400000 +options SYMTAB_SPACE=450000 #options AUDIO_DEBUG=2 config netbsd root on ? type ? @@ -231,7 +227,9 @@ # gumstix expantion boards # SMC 91C111 -sm0 at gxio? addr 0x04000300 gpirq 36 # etherstix, net{MMC,CF,DUO} +sm0 at gxio? addr 0x04000300 gpirq ? +#sm0 at gxio? addr 0x04000300 gpirq 36 # etherstix, net{MMC,CF,DUO} +#sm0 at gxio? addr 0x04000300 gpirq 99 # net{CF,{wifi,}microSD}-vx sm1 at gxio? addr 0x08000300 gpirq 27 # netDUO(2nd NIC) # Inter-Integrated Circuit controller