Module Name: src Committed By: kiyohara Date: Tue Aug 4 12:11:33 UTC 2009
Modified Files: src/sys/arch/arm/xscale: pxa2x0_com.c pxa2x0_gpio.c pxa2x0_gpio.h src/sys/arch/zaurus/zaurus: machdep.c Log Message: Fix GPIO configurations. http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html 3. I misstake sinse 2007/08/21. : Details: Remove hwuart_gpioconf. PXA270 not have HWUART. Add ohci_gpioconf. However all selectable. Fix pSKTSEL of pcic is selectable. Fix MMDAT<1-3> of mci is optional. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/xscale/pxa2x0_com.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/xscale/pxa2x0_gpio.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/xscale/pxa2x0_gpio.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/zaurus/zaurus/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/xscale/pxa2x0_com.c diff -u src/sys/arch/arm/xscale/pxa2x0_com.c:1.10 src/sys/arch/arm/xscale/pxa2x0_com.c:1.11 --- src/sys/arch/arm/xscale/pxa2x0_com.c:1.10 Fri Mar 14 15:09:09 2008 +++ src/sys/arch/arm/xscale/pxa2x0_com.c Tue Aug 4 12:11:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_com.c,v 1.10 2008/03/14 15:09:09 cube Exp $ */ +/* $NetBSD: pxa2x0_com.c,v 1.11 2009/08/04 12:11:33 kiyohara Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pxa2x0_com.c,v 1.10 2008/03/14 15:09:09 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0_com.c,v 1.11 2009/08/04 12:11:33 kiyohara Exp $"); #include "opt_com.h" @@ -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: src/sys/arch/arm/xscale/pxa2x0_gpio.c diff -u src/sys/arch/arm/xscale/pxa2x0_gpio.c:1.12 src/sys/arch/arm/xscale/pxa2x0_gpio.c:1.13 --- src/sys/arch/arm/xscale/pxa2x0_gpio.c:1.12 Wed Dec 17 20:51:32 2008 +++ src/sys/arch/arm/xscale/pxa2x0_gpio.c Tue Aug 4 12:11:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_gpio.c,v 1.12 2008/12/17 20:51:32 cegger Exp $ */ +/* $NetBSD: pxa2x0_gpio.c,v 1.13 2009/08/04 12:11:33 kiyohara Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pxa2x0_gpio.c,v 1.12 2008/12/17 20:51:32 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0_gpio.c,v 1.13 2009/08/04 12:11:33 kiyohara Exp $"); #include "opt_pxa2x0_gpio.h" @@ -850,10 +850,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 */ @@ -875,6 +871,16 @@ { -1 } }; +struct pxa2x0_gpioconf pxa27x_ohci_gpioconf[] = { +#if 0 /* We can select and/or. */ + { 88, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* USBHPWR1 */ + { 89, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* USBHPEN1 */ + { 119, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* USBHPWR2 */ + { 120, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* USBHPEN2 */ +#endif + { -1 } +}; + struct pxa2x0_gpioconf pxa27x_pcic_gpioconf[] = { { 48, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* nPOE */ { 49, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* nPWE */ @@ -883,7 +889,6 @@ { 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. */ { 85, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE1 */ @@ -893,6 +898,9 @@ { 54, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* nPCE2 */ { 78, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE2 */ { 105, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* nPCE2 */ + + { 79, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* pSKTSEL */ + { 104, GPIO_CLR | GPIO_ALT_FN_1_OUT }, /* pSKTSEL */ #endif { -1 } @@ -921,14 +929,11 @@ struct pxa2x0_gpioconf pxa27x_pxamci_gpioconf[] = { { 32, GPIO_CLR | GPIO_ALT_FN_2_OUT }, /* MMCLK */ - { 112, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* MMCMD */ { 92, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* MMDAT<0> */ - -#if 0 /* optional */ { 109, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* MMDAT<1> */ { 110, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* MMDAT<2>/MMCCS<0> */ { 111, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* MMDAT<3>/MMCCS<1> */ -#endif + { 112, GPIO_CLR | GPIO_ALT_FN_1_IN }, /* MMCMD */ { -1 } }; Index: src/sys/arch/arm/xscale/pxa2x0_gpio.h diff -u src/sys/arch/arm/xscale/pxa2x0_gpio.h:1.4 src/sys/arch/arm/xscale/pxa2x0_gpio.h:1.5 --- src/sys/arch/arm/xscale/pxa2x0_gpio.h:1.4 Tue Jun 24 20:19:05 2008 +++ src/sys/arch/arm/xscale/pxa2x0_gpio.h Tue Aug 4 12:11:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_gpio.h,v 1.4 2008/06/24 20:19:05 chris Exp $ */ +/* $NetBSD: pxa2x0_gpio.h,v 1.5 2009/08/04 12:11:33 kiyohara Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -87,9 +87,9 @@ 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_ohci_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_pcic_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_pxaacu_gpioconf[]; extern struct pxa2x0_gpioconf pxa27x_pxamci_gpioconf[]; Index: src/sys/arch/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.15 src/sys/arch/zaurus/zaurus/machdep.c:1.16 --- src/sys/arch/zaurus/zaurus/machdep.c:1.15 Mon Mar 16 12:54:52 2009 +++ src/sys/arch/zaurus/zaurus/machdep.c Tue Aug 4 12:11:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.15 2009/03/16 12:54:52 nonaka Exp $ */ +/* $NetBSD: machdep.c,v 1.16 2009/08/04 12:11:33 kiyohara Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2009/03/16 12:54:52 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2009/08/04 12:11:33 kiyohara Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -310,9 +310,7 @@ { 44, GPIO_ALT_FN_1_IN }, /* BTCST */ { 45, GPIO_ALT_FN_2_OUT }, /* BTRST */ - { 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> */ + { 104, GPIO_ALT_FN_1_OUT }, /* pSKTSEL */ { -1 } };