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.
This commit is contained in:
matt 2012-09-04 00:19:20 +00:00
parent d31df9582e
commit 76625f4430
4 changed files with 56 additions and 8 deletions

View File

@ -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. * Machine dependent functions for kernel setup for TI OSK5912 board.
@ -125,7 +125,7 @@
*/ */
#include <sys/cdefs.h> #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_machdep.h"
#include "opt_ddb.h" #include "opt_ddb.h"
@ -175,6 +175,7 @@ __KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.20 2012/09/01 00:20:49 matt Exp
#include <evbarm/beagle/beagle.h> #include <evbarm/beagle/beagle.h>
#include "prcm.h"
#include "omapwdt32k.h" #include "omapwdt32k.h"
BootConfig bootconfig; /* Boot config storage */ BootConfig bootconfig; /* Boot config storage */
@ -200,6 +201,7 @@ static void kgdb_port_init(void);
#endif #endif
static void init_clocks(void); static void init_clocks(void);
static void beagle_reset(void);
#if defined(OMAP_3530) || defined(TI_DM37XX) #if defined(OMAP_3530) || defined(TI_DM37XX)
static void omap3_cpu_clk(void); static void omap3_cpu_clk(void);
#endif #endif
@ -385,6 +387,8 @@ initarm(void *arg)
kgdb_port_init(); kgdb_port_init();
#endif #endif
cpu_reset_address = beagle_reset;
#ifdef VERBOSE_INIT_ARM #ifdef VERBOSE_INIT_ARM
/* Talk to the user */ /* Talk to the user */
printf("\nNetBSD/evbarm (beagle) booting ...\n"); printf("\nNetBSD/evbarm (beagle) booting ...\n");
@ -480,6 +484,17 @@ consinit(void)
beagle_putchar('g'); beagle_putchar('g');
} }
void
beagle_reset(void)
{
#if NPRCM > 0
prcm_cold_reset();
#endif
#if NOMAPWDT32K > 0
omapwdt32k_reboot();
#endif
}
#ifdef KGDB #ifdef KGDB
#ifndef KGDB_DEVADDR #ifndef KGDB_DEVADDR
#error Specify the address of the kgdb UART with the KGDB_DEVADDR option. #error Specify the address of the kgdb UART with the KGDB_DEVADDR option.

View File

@ -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 # IGEPv2 -- TI OMAP 3530 Eval Board Kernel
# #
@ -180,6 +180,33 @@ obio2 at mainbus? base 0x49000000 size 0x0100000 # L4 PERIPHERAL
# General Purpose Memory Controller # General Purpose Memory Controller
gpmc0 at mainbus? base 0x6e000000 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 # Interrupt Controller
omapicu0 at obio0 addr 0x48200000 size 0x1000 intrbase 0 omapicu0 at obio0 addr 0x48200000 size 0x1000 intrbase 0
omapgpio0 at obio1 addr 0x48310000 size 0x0400 intrbase 96 intr 29 omapgpio0 at obio1 addr 0x48310000 size 0x0400 intrbase 96 intr 29
@ -187,7 +214,7 @@ omapgpio0 at obio1 addr 0x48310000 size 0x0400 intrbase 96 intr 29
#omapgpio2 at obio2 addr 0x49052000 size 0x0400 intrbase 160 intr 31 #omapgpio2 at obio2 addr 0x49052000 size 0x0400 intrbase 160 intr 31
#omapgpio3 at obio2 addr 0x49054000 size 0x0400 intrbase 192 intr 32 #omapgpio3 at obio2 addr 0x49054000 size 0x0400 intrbase 192 intr 32
omapgpio4 at obio2 addr 0x49056000 size 0x0400 intrbase 224 intr 33 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? gpio* at omapgpio?
@ -219,6 +246,9 @@ omapwdt32k* at obio2 addr 0x49030000 size 2048 # WDT3
#omapwdt32k* at obio1 addr 0x4830c000 size 2048 # WDT1 #omapwdt32k* at obio1 addr 0x4830c000 size 2048 # WDT1
#omapwdt32k* at obio1 addr 0x48314000 size 2048 # WDT2 #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 # On-board USB
#ehci* at obio0 addr 0x48064800 size 0x0400 intr 77 #ehci* at obio0 addr 0x48064800 size 0x0400 intr 77
#ohci* at obio0 addr 0x48064400 size 0x0400 intr 76 #ohci* at obio0 addr 0x48064400 size 0x0400 intr 76

View File

@ -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 # TI OMAP2 evaluation board configuration info
# #
@ -21,3 +21,5 @@ attach com at obio with obiouart
file arch/arm/omap/obio_com.c obiouart file arch/arm/omap/obio_com.c obiouart
defparam opt_com.h CONSADDR CONSPEED CONMODE defparam opt_com.h CONSADDR CONSPEED CONMODE
attach smsh at gpmc with smsh_gpmc
file arch/evbarm/gumstix/if_smsh_gpmc.c smsh_gpmc

View File

@ -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 # standard NetBSD/evbarm for IGEPV2 options
@ -14,9 +14,10 @@ options EXEC_SCRIPT
# To support easy transit to ../arch/arm/arm32 # To support easy transit to ../arch/arm/arm32
options ARM32 options ARM32
options CORTEX_PMC options CORTEX_PMC
options CORTEX_PMC_CCNT_HZ=720000000 options __HAVE_CPU_COUNTER
options __HAVE_FAST_SOFTINTS # should be in types.h 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 options KERNEL_BASE_EXT=0x80000000
makeoptions LOADADDRESS="0x80300000" makeoptions LOADADDRESS="0x80300000"