summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2012-08-16 05:03:59 +0000
committerimp <imp@FreeBSD.org>2012-08-16 05:03:59 +0000
commit7af781f113906e24538c26955dff8be265531544 (patch)
tree5f448eb6529dc522d92ea401eee2c672c8d51384
parenta6c0657f0734dd0633f7725d08a7b64b4c07ab79 (diff)
downloadFreeBSD-src-7af781f113906e24538c26955dff8be265531544.zip
FreeBSD-src-7af781f113906e24538c26955dff8be265531544.tar.gz
Preliminary Embest ATEB9200 support.
-rw-r--r--sys/arm/at91/board_eb9200.c68
-rw-r--r--sys/arm/at91/files.at911
-rw-r--r--sys/arm/at91/std.eb920010
-rw-r--r--sys/arm/conf/EB9200109
-rw-r--r--sys/arm/conf/EB9200.hints6
5 files changed, 194 insertions, 0 deletions
diff --git a/sys/arm/at91/board_eb9200.c b/sys/arm/at91/board_eb9200.c
new file mode 100644
index 0000000..5106bd4
--- /dev/null
+++ b/sys/arm/at91/board_eb9200.c
@@ -0,0 +1,68 @@
+/*-
+ * Copyright (c) 2005-2008 Olivier Houchard. All rights reserved.
+ * Copyright (c) 2005-2012 Warner Losh. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+#include <sys/param.h>
+#include <sys/systm.h>
+
+#include <machine/board.h>
+#include <arm/at91/at91board.h>
+#include <arm/at91/at91var.h>
+#include <arm/at91/at91rm9200var.h>
+
+BOARD_INIT long
+board_init(void)
+{
+
+ at91rm9200_set_subtype(AT91_ST_RM9200_BGA);
+
+ /*
+ * Setup the serial ports.
+ * DBGU and USART0 are DB9 ports.
+ * USART2 is IrDA.
+ */
+ at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */
+ at91rm9200_config_uart(AT91RM9200_ID_USART0, 1,
+ AT91_UART_CTS | AT91_UART_RTS | AT91_UART_DTR | AT91_UART_DSR |
+ AT91_UART_DCD | AT91_UART_RI);
+ at91rm9200_config_uart(AT91RM9200_ID_USART1, 2, 0);
+
+ at91rm9200_config_mci(1);
+
+ /* CFE interface */
+ /* SPI interface */
+ /* ethernet interface */
+ /* USB host */
+ /* USB device (gadget) */
+ /* TWI */
+ /* CF interface */
+ /* SmartMedia Interface */
+
+ return (at91_ramsize());
+}
+
+ARM_BOARD(KB9200, "Kwikbyte KB920x")
diff --git a/sys/arm/at91/files.at91 b/sys/arm/at91/files.at91
index 04dfd16..332f4b5 100644
--- a/sys/arm/at91/files.at91
+++ b/sys/arm/at91/files.at91
@@ -38,6 +38,7 @@ arm/at91/at91sam9x5.c optional at91sam9x5
# All the boards we support
#
arm/at91/board_bwct.c optional at91_board_bwct
+arm/at91/board_eb9200.c optional at91_board_eb9200
arm/at91/board_ethernut5.c optional at91_board_ethernut5
arm/at91/board_hl200.c optional at91_board_hl200
arm/at91/board_hl201.c optional at91_board_hl201
diff --git a/sys/arm/at91/std.eb9200 b/sys/arm/at91/std.eb9200
new file mode 100644
index 0000000..c1dcd2a
--- /dev/null
+++ b/sys/arm/at91/std.eb9200
@@ -0,0 +1,10 @@
+#$FreeBSD$
+include "../at91/std.at91"
+
+options STARTUP_PAGETABLE_ADDR=0x20800000
+makeoptions KERNPHYSADDR=0x20000000
+options KERNPHYSADDR=0x20000000
+makeoptions KERNVIRTADDR=0xc0000000
+options KERNVIRTADDR=0xc0000000
+
+device at91_board_eb9200
diff --git a/sys/arm/conf/EB9200 b/sys/arm/conf/EB9200
new file mode 100644
index 0000000..0570699
--- /dev/null
+++ b/sys/arm/conf/EB9200
@@ -0,0 +1,109 @@
+# EB9200 - Custom kernel for the Embest ATEB9200 AT91RM9200 evaluation board.
+#
+# For more information on this file, please read the handbook section on
+# Kernel Configuration Files:
+#
+# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+ident EB9200
+
+include "../at91/std.eb9200"
+# The AT91 platform doesn't use /boot/loader, so we have to statically wire
+# hints.
+hints "EB9200.hints"
+makeoptions MODULES_OVERRIDE=""
+
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+options DDB
+options KDB
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+#options INET6 #IPv6 communications protocols
+options FFS #Berkeley Fast Filesystem
+#options SOFTUPDATES #Enable FFS soft updates support
+#options UFS_ACL #Support for access control lists
+#options UFS_DIRHASH #Improve performance on big directories
+#options MD_ROOT #MD is a potential root device
+#options MD_ROOT_SIZE=4096 # 4MB ram disk
+#options ROOTDEVNAME=\"ufs:/dev/da0s1a\"
+options NFSCL #New Network Filesystem Client
+options NFSD #New Network Filesystem Server
+options NFSLOCKD #Network Lock Manager
+options NFS_ROOT #NFS usable as /, requires NFSCL
+options BOOTP_NFSROOT
+options BOOTP
+
+#options MSDOSFS #MSDOS Filesystem
+#options CD9660 #ISO 9660 Filesystem
+#options PROCFS #Process filesystem (requires PSEUDOFS)
+options PSEUDOFS #Pseudo-filesystem framework
+#options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI
+#options KTRACE #ktrace(1) support
+options SYSVSHM #SYSV-style shared memory
+options SYSVMSG #SYSV-style message queues
+options SYSVSEM #SYSV-style semaphores
+options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+#options NO_SYSCTL_DESCR
+# Disable the inlining of mutex, rwlock and sx locks. These eat up a lot
+# of space.
+options MUTEX_NOINLINE
+options RWLOCK_NOINLINE
+options SX_NOINLINE
+options NO_FFS_SNAPSHOT
+options NO_SWAPPING
+device random
+device loop
+device ether
+device uart
+device ate
+device miibus
+#device lxtphy
+
+device at91_cfata
+device ata
+
+# Debugging for use in -current
+#options DEADLKRES #Enable the deadlock resolver
+#options INVARIANTS #Enable calls of extra sanity checking
+#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS
+#options WITNESS #Enable checks to detect deadlocks and cycles
+#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed
+
+device md
+device at91_twi # TWI: Two Wire Interface
+device at91_spi # SPI:
+device spibus
+# MMC/SD
+device at91_mci
+device mmc
+device mmcsd
+# iic
+device iic
+device iicbus
+device icee
+
+device bpf
+# USB support
+options USB_DEBUG # enable debug msgs
+device ohci # OHCI localbus->USB interface
+device usb # USB Bus (required)
+device umass # Disks/Mass storage - Requires scbus and da
+# SCSI peripherals
+device scbus # SCSI bus (required for SCSI)
+device da # Direct Access (disks)
+device cd # CD
+device pass # Passthrough device (direct SCSI access)
+
+# USB device (gadget) support
+#device at91_dci # Atmel's usb device
+#device usfs # emulate a flash
+#device cdce # emulate an ethernet
+#device usb_template # Control of the gadget
diff --git a/sys/arm/conf/EB9200.hints b/sys/arm/conf/EB9200.hints
new file mode 100644
index 0000000..118cd95
--- /dev/null
+++ b/sys/arm/conf/EB9200.hints
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+# should likely list CF here since its address isn't fixed.
+# but since it is at an external chip select, do we use that or the address
+# to configure it as its bus address? Need to fix arbitrary bus mapping
+# before I can list it here.
OpenPOWER on IntegriCloud