Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm Make reset work on beagle again.
details: https://anonhg.NetBSD.org/src/rev/c391f5c2d7c1
branches: trunk
changeset: 781401:c391f5c2d7c1
user: matt <matt%NetBSD.org@localhost>
date: Tue Sep 04 00:19:20 2012 +0000
description:
Make reset work on beagle again.
Add nand (not yet working) and prcm to IGEPV2.
Add smsh to IGEPV2 (use attachment from gumstix).
Turn on a few options for IGEPV2.
diffstat:
sys/arch/evbarm/beagle/beagle_machdep.c | 19 ++++++++++++++++-
sys/arch/evbarm/conf/IGEPV2 | 34 +++++++++++++++++++++++++++++++-
sys/arch/evbarm/conf/files.beagle | 4 ++-
sys/arch/evbarm/conf/std.igepv2 | 7 +++--
4 files changed, 56 insertions(+), 8 deletions(-)
diffs (161 lines):
diff -r 7a79381850e7 -r c391f5c2d7c1 sys/arch/evbarm/beagle/beagle_machdep.c
--- a/sys/arch/evbarm/beagle/beagle_machdep.c Tue Sep 04 00:08:59 2012 +0000
+++ b/sys/arch/evbarm/beagle/beagle_machdep.c Tue Sep 04 00:19:20 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: beagle_machdep.c,v 1.20 2012/09/01 00:20:49 matt Exp $ */
+/* $NetBSD: beagle_machdep.c,v 1.21 2012/09/04 00:19:20 matt Exp $ */
/*
* Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.20 2012/09/01 00:20:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.21 2012/09/04 00:19:20 matt Exp $");
#include "opt_machdep.h"
#include "opt_ddb.h"
@@ -175,6 +175,7 @@
#include <evbarm/beagle/beagle.h>
+#include "prcm.h"
#include "omapwdt32k.h"
BootConfig bootconfig; /* Boot config storage */
@@ -200,6 +201,7 @@
#endif
static void init_clocks(void);
+static void beagle_reset(void);
#if defined(OMAP_3530) || defined(TI_DM37XX)
static void omap3_cpu_clk(void);
#endif
@@ -385,6 +387,8 @@
kgdb_port_init();
#endif
+ cpu_reset_address = beagle_reset;
+
#ifdef VERBOSE_INIT_ARM
/* Talk to the user */
printf("\nNetBSD/evbarm (beagle) booting ...\n");
@@ -480,6 +484,17 @@
beagle_putchar('g');
}
+void
+beagle_reset(void)
+{
+#if NPRCM > 0
+ prcm_cold_reset();
+#endif
+#if NOMAPWDT32K > 0
+ omapwdt32k_reboot();
+#endif
+}
+
#ifdef KGDB
#ifndef KGDB_DEVADDR
#error Specify the address of the kgdb UART with the KGDB_DEVADDR option.
diff -r 7a79381850e7 -r c391f5c2d7c1 sys/arch/evbarm/conf/IGEPV2
--- a/sys/arch/evbarm/conf/IGEPV2 Tue Sep 04 00:08:59 2012 +0000
+++ b/sys/arch/evbarm/conf/IGEPV2 Tue Sep 04 00:19:20 2012 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: IGEPV2,v 1.10 2012/08/23 00:20:16 kiyohara Exp $
+# $NetBSD: IGEPV2,v 1.11 2012/09/04 00:19:20 matt Exp $
#
# IGEPv2 -- TI OMAP 3530 Eval Board Kernel
#
@@ -180,6 +180,33 @@
# General Purpose Memory Controller
gpmc0 at mainbus? base 0x6e000000
+smsh0 at gpmc0 addr 0x2c000000 intr 272 # gpio5 16 (gpio 176)
+ukphy* at mii?
+
+# SDHC controllers
+sdhc0 at obio0 addr 0x4809C000 size 0x0400 intr 83
+#sdhc1 at obio0 addr 0x480B4000 size 0x0400 intr 86
+#sdhc2 at obio0 addr 0x480AD000 size 0x0400 intr 94
+sdmmc* at sdhc? # SD/MMC bus
+ld* at sdmmc?
+
+# NAND controller
+omapnand0 at gpmc? addr 0x20000000
+
+# NAND layer
+nand0 at nandbus?
+
+# use the bad block table
+options NAND_BBT
+
+# Define flash partitions for board
+flash0 at nand0 offset 0x000000 size 0x080000 readonly 1 # X-Loader
+flash1 at nand0 offset 0x080000 size 0x1e0000 readonly 1 # U-Boot
+flash2 at nand0 offset 0x260000 size 0x020000 readonly 1 # UB Env
+flash3 at nand0 offset 0x280000 size 0x400000 # kernel
+flash4 at nand0 offset 0x680000 size 0 # filesystem
+
+
# Interrupt Controller
omapicu0 at obio0 addr 0x48200000 size 0x1000 intrbase 0
omapgpio0 at obio1 addr 0x48310000 size 0x0400 intrbase 96 intr 29
@@ -187,7 +214,7 @@
#omapgpio2 at obio2 addr 0x49052000 size 0x0400 intrbase 160 intr 31
#omapgpio3 at obio2 addr 0x49054000 size 0x0400 intrbase 192 intr 32
omapgpio4 at obio2 addr 0x49056000 size 0x0400 intrbase 224 intr 33
-#omapgpio5 at obio2 addr 0x49058000 size 0x0400 intrbase 256 intr 34
+omapgpio5 at obio2 addr 0x49058000 size 0x0400 intrbase 256 intr 34
gpio* at omapgpio?
@@ -219,6 +246,9 @@
#omapwdt32k* at obio1 addr 0x4830c000 size 2048 # WDT1
#omapwdt32k* at obio1 addr 0x48314000 size 2048 # WDT2
+# Power, Reset and Clock Management
+prcm* at obio1 addr 0x48306000 size 0x2000 # PRM Module
+
# On-board USB
#ehci* at obio0 addr 0x48064800 size 0x0400 intr 77
#ohci* at obio0 addr 0x48064400 size 0x0400 intr 76
diff -r 7a79381850e7 -r c391f5c2d7c1 sys/arch/evbarm/conf/files.beagle
--- a/sys/arch/evbarm/conf/files.beagle Tue Sep 04 00:08:59 2012 +0000
+++ b/sys/arch/evbarm/conf/files.beagle Tue Sep 04 00:19:20 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.beagle,v 1.2 2012/09/01 00:20:49 matt Exp $
+# $NetBSD: files.beagle,v 1.3 2012/09/04 00:19:20 matt Exp $
#
# TI OMAP2 evaluation board configuration info
#
@@ -21,3 +21,5 @@
file arch/arm/omap/obio_com.c obiouart
defparam opt_com.h CONSADDR CONSPEED CONMODE
+attach smsh at gpmc with smsh_gpmc
+file arch/evbarm/gumstix/if_smsh_gpmc.c smsh_gpmc
diff -r 7a79381850e7 -r c391f5c2d7c1 sys/arch/evbarm/conf/std.igepv2
--- a/sys/arch/evbarm/conf/std.igepv2 Tue Sep 04 00:08:59 2012 +0000
+++ b/sys/arch/evbarm/conf/std.igepv2 Tue Sep 04 00:19:20 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.igepv2,v 1.3 2012/08/29 07:14:05 matt Exp $
+# $NetBSD: std.igepv2,v 1.4 2012/09/04 00:19:20 matt Exp $
#
# standard NetBSD/evbarm for IGEPV2 options
@@ -14,9 +14,10 @@
# To support easy transit to ../arch/arm/arm32
options ARM32
options CORTEX_PMC
-options CORTEX_PMC_CCNT_HZ=720000000
+options __HAVE_CPU_COUNTER
options __HAVE_FAST_SOFTINTS # should be in types.h
-#options TPIDRPRW_IS_CURLWP
+options __HAVE_CPU_UAREA_ALLOC_IDLELWP
+options TPIDRPRW_IS_CURCPU
options KERNEL_BASE_EXT=0x80000000
makeoptions LOADADDRESS="0x80300000"
Home |
Main Index |
Thread Index |
Old Index