diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2008-12-30 07:03:29 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2008-12-30 07:03:29 +0000 |
commit | 4f508c1d813925b6b2243080035ad1ff633c2320 (patch) | |
tree | 9cafc62b5eae240fda3b4273c7f34c01f8d9bbf2 /sys/arch | |
parent | b8e30cba359f2a027bc25f26af4eba0aa9924722 (diff) |
attempt to tell difference between gta01 and gta02 via clock rate (ick)
more debugging code.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/moko/moko/moko_machdep.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/arch/moko/moko/moko_machdep.c b/sys/arch/moko/moko/moko_machdep.c index c16c410523d..0cffeb080b5 100644 --- a/sys/arch/moko/moko/moko_machdep.c +++ b/sys/arch/moko/moko/moko_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moko_machdep.c,v 1.1 2008/11/26 14:47:50 drahn Exp $ */ +/* $OpenBSD: moko_machdep.c,v 1.2 2008/12/30 07:03:28 drahn Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -392,7 +392,6 @@ const struct pmap_devmap smdk2410_devmap[] = { #undef _S #define VERBOSE_INIT_ARM -#if 1 static void map_io_area(paddr_t pagedir) { @@ -419,7 +418,6 @@ map_io_area(paddr_t pagedir) ++loop; } } -#endif /* * simple memory mapping function used in early bootstrap stage @@ -479,6 +477,8 @@ bootstrap_bs_map(void *t, bus_addr_t bpa, bus_size_t size, * Relocating the kernel to the bottom of physical memory */ u_int ol1pagetable; +void sscom_dump_init_state(void); + u_int initarm(void *arg) { @@ -626,6 +626,8 @@ initarm(void *arg) /* Talk to the user */ printf("\nOpenBSD/moko booting ...\n"); + sscom_dump_init_state(); + { /* XXX - all Zaurus have this for now, fix memory sizing */ memstart = 0x30000000; @@ -1095,6 +1097,7 @@ void consinit(void) { static int consinit_done = 0; + int conunit; #if defined(SSCOM0CONSOLE) || defined(SSCOM1CONSOLE) bus_space_tag_t iot = &s3c2xx0_bs_tag; #endif @@ -1111,8 +1114,17 @@ consinit(void) s3c24x0_clock_freq2(CLKMAN_VBASE, NULL, NULL, &pclk); + + /* HORRID HACK */ + if (pclk == 66500000) + conunit = 0; + else if (pclk == 100000000) + conunit = 2; + else /* XXX */ + conunit = 0; + #if NSSCOM > 0 - if (0 == s3c2410_sscom_cnattach(iot, 0, comcnspeed, + if (0 == s3c2410_sscom_cnattach(iot, conunit, comcnspeed, pclk, comcnmode)) return; #if 0 |