summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2008-12-30 07:03:28 +0000
committerdrahn <drahn@openbsd.org>2008-12-30 07:03:28 +0000
commita5ce106d1d99fb37699b25a3269b674b146d9471 (patch)
tree593f3b110e38c084ead30d89a6b5cc17a998c8ec
parentsome progress on working on hardware, small steps. (diff)
downloadwireguard-openbsd-a5ce106d1d99fb37699b25a3269b674b146d9471.tar.xz
wireguard-openbsd-a5ce106d1d99fb37699b25a3269b674b146d9471.zip
attempt to tell difference between gta01 and gta02 via clock rate (ick)
more debugging code.
-rw-r--r--sys/arch/moko/moko/moko_machdep.c20
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