Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch More changes for BEAGLEBOARDXM. The kernel gets al...
details: https://anonhg.NetBSD.org/src/rev/b655cbbda4b8
branches: trunk
changeset: 781151:b655cbbda4b8
user: matt <matt%NetBSD.org@localhost>
date: Thu Aug 23 01:27:24 2012 +0000
description:
More changes for BEAGLEBOARDXM. The kernel gets all the way to usermode
and the installer will run (nothing to install to but ...)
diffstat:
sys/arch/arm/omap/obio_mputmr.c | 35 ++++++++++++++++++------------
sys/arch/arm/omap/omap2_reg.h | 19 +++++++++++++--
sys/arch/evbarm/beagle/beagle.h | 4 +-
sys/arch/evbarm/conf/BEAGLEBOARDXM | 6 ++--
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL | 10 ++++++++
5 files changed, 52 insertions(+), 22 deletions(-)
diffs (197 lines):
diff -r 4588e071e541 -r b655cbbda4b8 sys/arch/arm/omap/obio_mputmr.c
--- a/sys/arch/arm/omap/obio_mputmr.c Thu Aug 23 00:20:16 2012 +0000
+++ b/sys/arch/arm/omap/obio_mputmr.c Thu Aug 23 01:27:24 2012 +0000
@@ -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 @@
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 @@
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;
+ }
- /* We implicitly trust the config file. */
- return 1;
+ KASSERT(obio->obio_addr != GPT2_BASE);
+
+ return 0;
}
void
@@ -274,7 +279,8 @@
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 @@
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 @@
bus_space_write_4(obio->obio_iot, ioh, OMAP2_CM_ICLKEN1_CORE, r);
bus_space_unmap(obio->obio_iot, ioh, OMAP2_CM_SIZE);
+#endif
}
diff -r 4588e071e541 -r b655cbbda4b8 sys/arch/arm/omap/omap2_reg.h
--- a/sys/arch/arm/omap/omap2_reg.h Thu Aug 23 00:20:16 2012 +0000
+++ b/sys/arch/arm/omap/omap2_reg.h Thu Aug 23 01:27:24 2012 +0000
@@ -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
diff -r 4588e071e541 -r b655cbbda4b8 sys/arch/evbarm/beagle/beagle.h
--- a/sys/arch/evbarm/beagle/beagle.h Thu Aug 23 00:20:16 2012 +0000
+++ b/sys/arch/evbarm/beagle/beagle.h Thu Aug 23 01:27:24 2012 +0000
@@ -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
diff -r 4588e071e541 -r b655cbbda4b8 sys/arch/evbarm/conf/BEAGLEBOARDXM
--- a/sys/arch/evbarm/conf/BEAGLEBOARDXM Thu Aug 23 00:20:16 2012 +0000
+++ b/sys/arch/evbarm/conf/BEAGLEBOARDXM Thu Aug 23 01:27:24 2012 +0000
@@ -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 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 @@
# 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
diff -r 4588e071e541 -r b655cbbda4b8 sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL Thu Aug 23 01:27:24 2012 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index