Module Name: src
Committed By: matt
Date: Thu Aug 23 01:27:25 UTC 2012
Modified Files:
src/sys/arch/arm/omap: obio_mputmr.c omap2_reg.h
src/sys/arch/evbarm/beagle: beagle.h
src/sys/arch/evbarm/conf: BEAGLEBOARDXM
Added Files:
src/sys/arch/evbarm/conf: BEAGLEBOARDXM_INSTALL
Log Message:
More changes for BEAGLEBOARDXM. The kernel gets all the way to usermode
and the installer will run (nothing to install to but ...)
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/obio_mputmr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/omap/omap2_reg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/beagle/beagle.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/BEAGLEBOARDXM
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL
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/omap/obio_mputmr.c
diff -u src/sys/arch/arm/omap/obio_mputmr.c:1.5 src/sys/arch/arm/omap/obio_mputmr.c:1.6
--- src/sys/arch/arm/omap/obio_mputmr.c:1.5 Fri Jul 1 20:30:21 2011
+++ src/sys/arch/arm/omap/obio_mputmr.c Thu Aug 23 01:27:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: obio_mputmr.c,v 1.5 2011/07/01 20:30:21 dyoung Exp $ */
+/* $NetBSD: obio_mputmr.c,v 1.6 2012/08/23 01:27:24 matt Exp $ */
/*
* Based on omap_mputmr.c
@@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio_mputmr.c,v 1.5 2011/07/01 20:30:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_mputmr.c,v 1.6 2012/08/23 01:27:24 matt Exp $");
#include "opt_omap.h"
#include "opt_cpuoptions.h"
@@ -155,10 +155,12 @@ typedef struct {
static const gptimer_instance_t gptimer_instance_tab[] = {
GPT_ENTRY( 2), GPT_ENTRY( 3), GPT_ENTRY( 4), GPT_ENTRY( 5),
GPT_ENTRY( 6), GPT_ENTRY( 7), GPT_ENTRY( 8), GPT_ENTRY( 9),
- GPT_ENTRY(10), GPT_ENTRY(11), GPT_ENTRY(12),
+ GPT_ENTRY(10), GPT_ENTRY(11),
+#ifdef GPT12_BASE
+ GPT_ENTRY(12),
+#endif
};
#undef GPT_ENTRY
-#define GPTIMER_INSTANCE_CNT __arraycount(gptimer_instance_tab)
static const gptimer_instance_t *
gpt_lookup(struct obio_attach_args *);
@@ -183,11 +185,14 @@ obiomputmr_match(device_t parent, cfdata
if (obio->obio_size == 0)
obio->obio_size = 256; /* Per the OMAP TRM. */
- if (gpt_lookup(obio) == NULL)
- return 0;
+ if (gpt_lookup(obio) != NULL) {
+ /* We implicitly trust the config file. */
+ return 1;
+ }
+
+ KASSERT(obio->obio_addr != GPT2_BASE);
- /* We implicitly trust the config file. */
- return 1;
+ return 0;
}
void
@@ -274,7 +279,8 @@ gpt_lookup(struct obio_attach_args *obio
uint i;
for (i = 0, ip = gptimer_instance_tab;
- i < GPTIMER_INSTANCE_CNT; i++, ip++) {
+ i < __arraycount(gptimer_instance_tab);
+ i++, ip++) {
if (ip->addr == obio->obio_addr && ip->intr == obio->obio_intr)
return ip;
}
@@ -288,15 +294,15 @@ gpt_enable(
struct obio_attach_args *obio,
const gptimer_instance_t *ip)
{
- bus_space_handle_t ioh;
- uint32_t r;
- int err;
-
KASSERT(ip != NULL);
aprint_normal(" #%d", ip->gptn);
- err = bus_space_map(obio->obio_iot, OMAP2_CM_BASE,
+#if defined(OMAP_2430) || defined(OMAP_2420)
+ bus_space_handle_t ioh;
+ uint32_t r;
+
+ int err = bus_space_map(obio->obio_iot, OMAP2_CM_BASE,
OMAP2_CM_SIZE, 0, &ioh);
KASSERT(err == 0);
@@ -313,4 +319,5 @@ gpt_enable(
bus_space_write_4(obio->obio_iot, ioh, OMAP2_CM_ICLKEN1_CORE, r);
bus_space_unmap(obio->obio_iot, ioh, OMAP2_CM_SIZE);
+#endif
}
Index: src/sys/arch/arm/omap/omap2_reg.h
diff -u src/sys/arch/arm/omap/omap2_reg.h:1.7 src/sys/arch/arm/omap/omap2_reg.h:1.8
--- src/sys/arch/arm/omap/omap2_reg.h:1.7 Wed Aug 22 22:18:21 2012
+++ src/sys/arch/arm/omap/omap2_reg.h Thu Aug 23 01:27:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.7 2012/08/22 22:18:21 matt Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.8 2012/08/23 01:27:24 matt Exp $ */
/*
* Copyright (c) 2007 Microsoft
@@ -93,7 +93,7 @@
#define TI_DM37XX_L4_WAKEUP_SIZE 0x00010000 /* 64KB */
#define TI_DM37XX_L4_PERIPHERAL_BASE 0x49000000
-#define TI_DM37XX_L4_PERIPHERAL_SIZE 0x00100000 /* 1MB */
+#define TI_DM37XX_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */
#define TI_DM37XX_L4_EMULATION_BASE 0x54000000
#define TI_DM37XX_L4_EMULATION_SIZE 0x00800000 /* 8MB */
@@ -518,7 +518,7 @@
/*
* GPT - General Purpose Timers
*/
-#ifdef OMAP_3530
+#if defined(OMAP_3530) || defined(TI_DM37XX)
#define GPT1_BASE 0x48318000
#define GPT2_BASE 0x49032000
#define GPT3_BASE 0x49034000
@@ -530,7 +530,20 @@
#define GPT9_BASE 0x49040000
#define GPT10_BASE 0x48086000
#define GPT11_BASE 0x48088000
+#if defined(OMAP_3530)
#define GPT12_BASE 0x48304000
+#endif
+#elif defined(TI_AM33XX)
+#if 0
+#define GPT0_BASE 0x44e05000
+#define GPT1_BASE 0x44e31000 /* 1ms */
+#define GPT2_BASE 0x48040000
+#define GPT3_BASE 0x48042000
+#define GPT4_BASE 0x48044000
+#define GPT5_BASE 0x48048000
+#define GPT6_BASE 0x4804A000
+#define GPT7_BASE 0x4804C000
+#endif
#else
#define GPT1_BASE 0x48028000
#define GPT2_BASE 0x4802a000
Index: src/sys/arch/evbarm/beagle/beagle.h
diff -u src/sys/arch/evbarm/beagle/beagle.h:1.5 src/sys/arch/evbarm/beagle/beagle.h:1.6
--- src/sys/arch/evbarm/beagle/beagle.h:1.5 Wed Aug 22 22:18:22 2012
+++ src/sys/arch/evbarm/beagle/beagle.h Thu Aug 23 01:27:25 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: beagle.h,v 1.5 2012/08/22 22:18:22 matt Exp $ */
+/* $NetBSD: beagle.h,v 1.6 2012/08/23 01:27:25 matt Exp $ */
/*
* Copyright (c) 2007 Microsoft
* All rights reserved.
@@ -96,7 +96,7 @@
#define OMAP_L4_CORE_VBASE OMAP_KERNEL_IO_VBASE
#define OMAP_L4_PERIPHERAL_VBASE (OMAP_L4_CORE_VBASE + OMAP_L4_CORE_SIZE)
#define OMAP_KERNEL_IO_VEND (OMAP_L4_PERIPHERAL_VBASE + OMAP_L4_PERIPHERAL_SIZE)
-#define CONSADDR_VA ((CONSADDR - OMAP_L4_CORE_BASE) + OMAP_L4_CORE_VBASE)
+#define CONSADDR_VA ((CONSADDR - OMAP_L4_PERIPHERAL_BASE) + OMAP_L4_PERIPHERAL_VBASE)
#else
#error unknown OMAP variant
#endif
Index: src/sys/arch/evbarm/conf/BEAGLEBOARDXM
diff -u src/sys/arch/evbarm/conf/BEAGLEBOARDXM:1.3 src/sys/arch/evbarm/conf/BEAGLEBOARDXM:1.4
--- src/sys/arch/evbarm/conf/BEAGLEBOARDXM:1.3 Wed Aug 22 23:00:48 2012
+++ src/sys/arch/evbarm/conf/BEAGLEBOARDXM Thu Aug 23 01:27:24 2012
@@ -1,5 +1,5 @@
#
-# $NetBSD: BEAGLEBOARDXM,v 1.3 2012/08/22 23:00:48 matt Exp $
+# $NetBSD: BEAGLEBOARDXM,v 1.4 2012/08/23 01:27:24 matt Exp $
#
# BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel
#
@@ -132,7 +132,7 @@ options DIAGNOSTIC # internally consist
#options DEBUG
#options PMAP_DEBUG # Enable pmap_debug_level code
#options IPKDB # remote kernel debugging
-options VERBOSE_INIT_ARM # verbose bootstraping messages
+#options VERBOSE_INIT_ARM # verbose bootstraping messages
options DDB # in-kernel debugger
options DDB_ONPANIC=1
options DDB_HISTORY_SIZE=100 # Enable history editing in DDB
@@ -174,7 +174,7 @@ L3i0 at mainbus?
# OBIO
obio0 at mainbus? base 0x48000000 size 0x1000000 # L4 CORE
obio1 at mainbus? base 0x48300000 size 0x0040000 # L4 WAKEUP
-obio2 at mainbus? base 0x49000000 size 0x0100000 # L4 PERIPHERAL
+obio2 at mainbus? base 0x49000000 size 0x1000000 # L4 PERIPHERAL
#obio3 at mainbus? base 0x54000000 size 0x0800000 # L4 EMUL
# General Purpose Memory Controller
Added files:
Index: src/sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL
diff -u /dev/null src/sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL:1.1
--- /dev/null Thu Aug 23 01:27:25 2012
+++ src/sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL Thu Aug 23 01:27:24 2012
@@ -0,0 +1,10 @@
+# $NetBSD: BEAGLEBOARDXM_INSTALL,v 1.1 2012/08/23 01:27:24 matt Exp $
+#
+# BEAGLEBOARDXM_INSTALL -- BEAGLEBOARDXM kernel with installation-sized
+# ramdisk
+#
+
+include "arch/evbarm/conf/BEAGLEBOARDXM"
+include "arch/evbarm/conf/INSTALL"
+
+options BOOTHOWTO=RB_SINGLE