Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hpcarm Split pxa2x0_hpc/wzero3.
details: https://anonhg.NetBSD.org/src/rev/c8976bad0e8a
branches: trunk
changeset: 766397:c8976bad0e8a
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Tue Jun 21 15:23:57 2011 +0000
description:
Split pxa2x0_hpc/wzero3.
diffstat:
sys/arch/hpcarm/conf/WZERO3 | 5 +-
sys/arch/hpcarm/conf/files.pxa2x0 | 39 +----
sys/arch/hpcarm/conf/files.wzero3 | 39 ++++
sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c | 216 ++----------------------
sys/arch/hpcarm/hpcarm/wzero3_machdep.c | 247 ++++++++++++++++++++++++++++
5 files changed, 308 insertions(+), 238 deletions(-)
diffs (truncated from 659 to 300 lines):
diff -r a6b56e25371e -r c8976bad0e8a sys/arch/hpcarm/conf/WZERO3
--- a/sys/arch/hpcarm/conf/WZERO3 Tue Jun 21 15:13:34 2011 +0000
+++ b/sys/arch/hpcarm/conf/WZERO3 Tue Jun 21 15:23:57 2011 +0000
@@ -1,13 +1,14 @@
-# $NetBSD: WZERO3,v 1.19 2011/03/06 17:08:25 bouyer Exp $
+# $NetBSD: WZERO3,v 1.20 2011/06/21 15:23:57 kiyohara Exp $
#
# WZERO3 -- Sharp Windows Mobile 5 based PDA
#
include "arch/hpcarm/conf/std.pxa2x0"
+include "arch/hpcarm/conf/files.wzero3"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.19 $"
+#ident "GENERIC-$Revision: 1.20 $"
# estimated number of users
maxusers 32
diff -r a6b56e25371e -r c8976bad0e8a sys/arch/hpcarm/conf/files.pxa2x0
--- a/sys/arch/hpcarm/conf/files.pxa2x0 Tue Jun 21 15:13:34 2011 +0000
+++ b/sys/arch/hpcarm/conf/files.pxa2x0 Tue Jun 21 15:23:57 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.pxa2x0,v 1.3 2010/05/30 10:00:27 nonaka Exp $
+# $NetBSD: files.pxa2x0,v 1.4 2011/06/21 15:23:57 kiyohara Exp $
#
# PXA2x0 specific configuration info
#
@@ -7,40 +7,3 @@
# Include hpcarm/XScale config definitions.
include "arch/arm/xscale/files.pxa2x0"
-
-#
-# W-ZERO3 specific configuration info
-#
-
-# Dedicated SSP unit for touch screen, keypad
-device wzero3ssp
-attach wzero3ssp at pxaip
-file arch/hpcarm/dev/wzero3_ssp.c wzero3ssp
-
-# LCD frame buffer
-attach lcd at pxaip with wzero3lcd
-file arch/hpcarm/dev/wzero3_lcd.c wzero3lcd needs-flag
-
-# keyboard
-device wzero3kbd: hpckbdif, sysmon_power, sysmon_taskq
-attach wzero3kbd at pxaip
-file arch/hpcarm/dev/wzero3_kbd.c wzero3kbd
-
-# keypad
-device wzero3keypad: wskbddev
-attach wzero3keypad at pxaip
-file arch/hpcarm/dev/wzero3_keypad.c wzero3keypad
-
-# touchpad
-device wzero3tp: wsmousedev, hpctpanel
-attach wzero3tp at pxaip
-file arch/hpcarm/dev/wzero3_tp.c wzero3tp
-
-# MMC/SD controller
-attach pxamci at pxaip with wzero3mci
-file arch/hpcarm/dev/wzero3_mci.c wzero3mci
-
-# USB power control
-device wzero3usb
-attach wzero3usb at pxaip
-file arch/hpcarm/dev/wzero3_usb.c wzero3usb
diff -r a6b56e25371e -r c8976bad0e8a sys/arch/hpcarm/conf/files.wzero3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcarm/conf/files.wzero3 Tue Jun 21 15:23:57 2011 +0000
@@ -0,0 +1,39 @@
+# $NetBSD: files.wzero3,v 1.1 2011/06/21 15:23:57 kiyohara Exp $
+#
+# WZERO3 specific configuration info
+#
+
+file arch/hpcarm/hpcarm/wzero3_machdep.c
+
+# LCD frame buffer
+attach lcd at pxaip with wzero3lcd
+file arch/hpcarm/dev/wzero3_lcd.c wzero3lcd needs-flag
+
+# MMC/SD controller
+attach pxamci at pxaip with wzero3mci
+file arch/hpcarm/dev/wzero3_mci.c wzero3mci
+
+# Dedicated SSP unit for touch screen, keypad
+device wzero3ssp
+attach wzero3ssp at pxaip
+file arch/hpcarm/dev/wzero3_ssp.c wzero3ssp
+
+# keyboard
+device wzero3kbd: hpckbdif, sysmon_power, sysmon_taskq
+attach wzero3kbd at pxaip
+file arch/hpcarm/dev/wzero3_kbd.c wzero3kbd
+
+# keypad
+device wzero3keypad: wskbddev
+attach wzero3keypad at pxaip
+file arch/hpcarm/dev/wzero3_keypad.c wzero3keypad
+
+# touchpad
+device wzero3tp: wsmousedev, hpctpanel
+attach wzero3tp at pxaip
+file arch/hpcarm/dev/wzero3_tp.c wzero3tp
+
+# USB power control
+device wzero3usb
+attach wzero3usb at pxaip
+file arch/hpcarm/dev/wzero3_usb.c wzero3usb
diff -r a6b56e25371e -r c8976bad0e8a sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c
--- a/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c Tue Jun 21 15:13:34 2011 +0000
+++ b/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c Tue Jun 21 15:23:57 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.9 2011/06/14 14:33:50 kiyohara Exp $ */
+/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.10 2011/06/21 15:23:57 kiyohara Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.9 2011/06/14 14:33:50 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.10 2011/06/21 15:23:57 kiyohara Exp $");
#include "opt_ddb.h"
#include "opt_dram_pages.h"
@@ -59,7 +59,6 @@
#include <sys/boot_flag.h>
#include <sys/conf.h> /* XXX for consinit related hacks */
#include <sys/device.h>
-#include <sys/termios.h>
#if NKSYMS || defined(DDB) || defined(MODULAR)
#include <machine/db_machdep.h>
@@ -89,21 +88,11 @@
#include <machine/intr.h>
#include <machine/io.h>
#include <machine/platid.h>
-#include <machine/platid_mask.h>
#include <machine/rtc.h>
#include <machine/signal.h>
-#include <dev/cons.h>
#include <dev/hpc/apm/apmvar.h>
-#include <dev/hpc/bicons.h>
-
-#include "com.h"
-#if (NCOM > 0)
-#include "opt_com.h"
-#include <dev/ic/comvar.h>
-#endif /* NCOM > 0 */
-#include "lcd.h"
-#include "wzero3lcd.h"
+#include <dev/ic/comreg.h>
#include <sys/mount.h>
#include <nfs/rpcv2.h>
@@ -181,12 +170,13 @@
u_int initarm(int, char **, struct bootinfo *);
+/* Machine dependent initialize function */
+extern void pxa2x0_machdep_init(void);
+
/* Mode dependent sleep function holder */
extern void (*__sleep_func)(void *);
extern void *__sleep_ctx;
-extern void (*__cpu_reset)(void);
-
#ifdef DEBUG_BEFOREMMU
static void fakecninit(void);
#endif
@@ -261,85 +251,8 @@
};
#undef _A
#undef _S
-
-static void
-ws003sh_cpu_reset(void)
-{
- uint32_t rv;
-
- rv = pxa2x0_memctl_read(MEMCTL_MSC0);
- if ((rv & 0xffff0000) == 0x7ff00000) {
- pxa2x0_memctl_write(MEMCTL_MSC0, (rv & 0xffff) | 0x7ee00000);
- }
-
- pxa2x0_gpio_set_function(89, GPIO_OUT | GPIO_SET);
- for (;;)
- continue;
-}
-
-static struct pxa2x0_gpioconf ws003sh_boarddep_gpioconf[] = {
- /* FFUART */
- { 98, GPIO_ALT_FN_3_OUT }, /* FFRTS */
- { 99, GPIO_ALT_FN_3_OUT }, /* FFTXD */
- /* SSP3 */
- { 34, GPIO_ALT_FN_3_OUT }, /* SSPSCLK3 */
- { 38, GPIO_ALT_FN_1_OUT }, /* SSPTXD3 */
- { 82, GPIO_ALT_FN_1_IN }, /* SSPRXD3 */
-
- { -1 }
-};
+extern const struct pmap_devmap machdep_devmap[];
-static struct pxa2x0_gpioconf ws007sh_boarddep_gpioconf[] = {
- /* FFUART */
- { 98, GPIO_ALT_FN_3_OUT }, /* FFRTS */
- { 99, GPIO_ALT_FN_3_OUT }, /* FFTXD */
- /* SSP2 */
- { 19, GPIO_ALT_FN_1_OUT }, /* SSPSCLK2 */
- { 86, GPIO_ALT_FN_1_IN }, /* SSPRXD2 */
- { 87, GPIO_ALT_FN_1_OUT }, /* SSPTXD2 */
- /* SSP3 */
- { 38, GPIO_ALT_FN_1_OUT }, /* SSPTXD3 */
- { 52, GPIO_ALT_FN_2_OUT }, /* SSPSCLK3 */
- { 89, GPIO_ALT_FN_1_IN }, /* SSPRXD3 */
-
- { -1 }
-};
-
-static struct pxa2x0_gpioconf ws011sh_boarddep_gpioconf[] = {
- /* FFUART */
- { 98, GPIO_ALT_FN_3_OUT }, /* FFRTS */
- { 99, GPIO_ALT_FN_3_OUT }, /* FFTXD */
- /* SSP2 */
- { 19, GPIO_ALT_FN_1_OUT }, /* SSPSCLK2 */
- { 86, GPIO_ALT_FN_1_IN }, /* SSPRXD2 */
- { 87, GPIO_ALT_FN_1_OUT }, /* SSPTXD2 */
-
- { -1 }
-};
-
-static struct pxa2x0_gpioconf *ws003sh_gpioconf[] = {
- pxa27x_com_ffuart_gpioconf,
- pxa27x_pxamci_gpioconf,
- pxa27x_ohci_gpioconf,
- ws003sh_boarddep_gpioconf,
- NULL
-};
-
-static struct pxa2x0_gpioconf *ws007sh_gpioconf[] = {
- pxa27x_com_ffuart_gpioconf,
- pxa27x_pxamci_gpioconf,
- pxa27x_ohci_gpioconf,
- ws007sh_boarddep_gpioconf,
- NULL
-};
-
-static struct pxa2x0_gpioconf *ws011sh_gpioconf[] = {
- pxa27x_com_ffuart_gpioconf,
- pxa27x_pxamci_gpioconf,
- pxa27x_ohci_gpioconf,
- ws011sh_boarddep_gpioconf,
- NULL
-};
static inline pd_entry_t *
read_ttb(void)
@@ -440,38 +353,16 @@
pxa2x0_clkman_bootstrap(PXA2X0_CLKMAN_VBASE);
pxa2x0_gpio_bootstrap(PXA2X0_GPIO_VBASE);
- if (platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS003SH)
- || platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS004SH)
- || platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS007SH)
- || platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS011SH)
- || platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS020SH)) {
- if (platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS003SH)
- || platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS004SH)) {
- pxa2x0_gpio_config(ws003sh_gpioconf);
- __cpu_reset = ws003sh_cpu_reset;
- } else if (platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS007SH)) {
- pxa2x0_gpio_config(ws007sh_gpioconf);
- } else if (platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS011SH)) {
- pxa2x0_gpio_config(ws011sh_gpioconf);
- }
- pxa2x0_clkman_config(CKEN_FFUART, 1);
- pxa2x0_clkman_config(CKEN_OST, 1);
- pxa2x0_clkman_config(CKEN_USBHC, 0);
- pxa2x0_clkman_config(CKEN_USBDC, 0);
- pxa2x0_clkman_config(CKEN_AC97, 0);
- pxa2x0_clkman_config(CKEN_SSP, 0);
- pxa2x0_clkman_config(CKEN_HWUART, 0);
- pxa2x0_clkman_config(CKEN_STUART, 0);
- pxa2x0_clkman_config(CKEN_BTUART, 0);
- pxa2x0_clkman_config(CKEN_I2S, 0);
- pxa2x0_clkman_config(CKEN_MMC, 0);
- pxa2x0_clkman_config(CKEN_FICP, 0);
- pxa2x0_clkman_config(CKEN_I2C, 0);
- pxa2x0_clkman_config(CKEN_PWM1, 0);
- if (!platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS011SH)) {
- pxa2x0_clkman_config(CKEN_PWM0, 0); /* WS011SH: DON'T DISABLE */
- }
Home |
Main Index |
Thread Index |
Old Index