summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig12
-rw-r--r--arch/arm/Makefile1
-rw-r--r--board/pm9263/Makefile2
-rw-r--r--board/pm9263/config.h6
-rw-r--r--board/pm9263/env/bin/boot38
-rw-r--r--board/pm9263/env/bin/init19
-rw-r--r--board/pm9263/env/bin/update_kernel8
-rw-r--r--board/pm9263/env/bin/update_root8
-rw-r--r--board/pm9263/env/config21
-rw-r--r--board/pm9263/init.c105
-rw-r--r--board/pm9263/lowlevel_init.S26
11 files changed, 246 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 38dfa0498c..785b4b1b52 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -11,6 +11,7 @@ config ARCH_TEXT_BASE
default 0xa0000000 if MACH_IMX27ADS
default 0x87f00000 if MACH_PCM037
default 0x23f00000 if MACH_AT91SAM9260_EK
+ default 0x23f00000 if MACH_PM9263
config BOARDINFO
default "Synertronixx scb9328" if MACH_SCB9328
@@ -19,6 +20,7 @@ config BOARDINFO
default "Freescale i.MX27 ADS" if MACH_IMX27ADS
default "Phytec phyCORE-i.MX31" if MACH_PCM037
default "Atmel 91SAM9260-EK" if MACH_AT91SAM9260_EK
+ default "Ronetix PM9263" if MACH_PM9263
config BOARD_LINKER_SCRIPT
bool
@@ -84,6 +86,10 @@ config ARCH_AT91SAM9260
bool
select ARCH_AT91SAM9
+config ARCH_AT91SAM9263
+ bool
+ select ARCH_AT91SAM9
+
choice
prompt "Select your board"
@@ -157,6 +163,12 @@ config MACH_AT91SAM9260_EK
help
Say y here if you are using Atmel's AT91SAM9260-EK Evaluation board
+config MACH_PM9263
+ bool "Ronetix PM9263"
+ select ARCH_AT91SAM9263
+ help
+ Say y here if you are using the Ronetix PM9263 Board
+
endchoice
config IMX_CLKO
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 4767ccd237..15011f4b55 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -16,6 +16,7 @@ board-$(CONFIG_MACH_NXDB500) := netx
board-$(CONFIG_MACH_PCM037) := pcm037
board-$(CONFIG_MACH_OMAP) := omap
board-$(CONFIG_MACH_AT91SAM9260_EK):= at91sam9260ek
+board-$(CONFIG_MACH_PM9263) := pm9263
# FIXME "cpu-y" never used on ARM!
cpu-$(CONFIG_ARM920T) := arm920t
diff --git a/board/pm9263/Makefile b/board/pm9263/Makefile
new file mode 100644
index 0000000000..73ef72e210
--- /dev/null
+++ b/board/pm9263/Makefile
@@ -0,0 +1,2 @@
+obj-y += lowlevel_init.o
+obj-y += init.o
diff --git a/board/pm9263/config.h b/board/pm9263/config.h
new file mode 100644
index 0000000000..afd8563212
--- /dev/null
+++ b/board/pm9263/config.h
@@ -0,0 +1,6 @@
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define AT91_MASTER_CLOCK 99328000 /* peripheral = main / 2 */
+
+#endif /* __CONFIG_H */
diff --git a/board/pm9263/env/bin/boot b/board/pm9263/env/bin/boot
new file mode 100644
index 0000000000..ed6f11a108
--- /dev/null
+++ b/board/pm9263/env/bin/boot
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+. /env/config
+
+if [ x$1 = xflash ]; then
+ root=flash
+ kernel=flash
+fi
+
+if [ x$1 = xnet ]; then
+ root=net
+ kernel=net
+fi
+
+if [ x$ip = xdhcp ]; then
+ bootargs="$bootargs ip=dhcp"
+else
+ bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
+fi
+
+if [ x$root = xflash ]; then
+ bootargs="$bootargs root=$rootpart rootfstype=jffs2"
+else
+ bootargs="$bootargs root=/dev/nfs nfsroot=192.168.23.111:$nfsroot"
+fi
+
+bootargs="$bootargs mtdparts=physmap-flash.0:$mtdparts"
+
+if [ $kernel = net ]; then
+ if [ x$ip = xdhcp ]; then
+ dhcp
+ fi
+ tftp $uimage uImage
+ bootm uImage
+else
+ bootm /dev/nor0.kernel
+fi
+
diff --git a/board/pm9263/env/bin/init b/board/pm9263/env/bin/init
new file mode 100644
index 0000000000..b8d8399842
--- /dev/null
+++ b/board/pm9263/env/bin/init
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PATH=/env/bin
+export PATH
+
+. /env/config
+
+echo
+echo -n "Hit any key to stop autoboot: "
+timeout -a $autoboot_timeout
+if [ $? != 0 ]; then
+ echo
+ echo "type update_kernel [<imagename>] to update kernel into flash"
+ echo "type udate_root [<imagename>] to update rootfs into flash"
+ echo
+ exit
+fi
+
+boot \ No newline at end of file
diff --git a/board/pm9263/env/bin/update_kernel b/board/pm9263/env/bin/update_kernel
new file mode 100644
index 0000000000..1ad95fc5d6
--- /dev/null
+++ b/board/pm9263/env/bin/update_kernel
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+. /env/config
+
+image=$uimage
+part=/dev/nor0.kernel
+
+. /env/bin/_update $1
diff --git a/board/pm9263/env/bin/update_root b/board/pm9263/env/bin/update_root
new file mode 100644
index 0000000000..b757a5b922
--- /dev/null
+++ b/board/pm9263/env/bin/update_root
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+. /env/config
+
+image=$jffs2
+part=/dev/nor0.root
+
+. /env/bin/_update $1
diff --git a/board/pm9263/env/config b/board/pm9263/env/config
new file mode 100644
index 0000000000..9d2b0b1116
--- /dev/null
+++ b/board/pm9263/env/config
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# can be either 'net' or 'flash'
+kernel=net
+root=net
+
+# use 'dhcp' todo dhcp in uboot and in kernel
+ip=dhcp
+
+#
+# setup default ethernet address
+#
+eth0.serverip=192.168.23.108
+eth0.ethaddr=80:97:78:38:27:73
+
+uimage=uImage-at91sam9260ek
+
+autoboot_timeout=3
+
+nfsroot="/home/jbe/pengutronix/bsp/OSELAS.BSP-Phytec-phyCORE-i.MX27-trunk/root,v3"
+bootargs="console=ttyS0,115200 rw init=/bin/sh"
diff --git a/board/pm9263/init.c b/board/pm9263/init.c
new file mode 100644
index 0000000000..6a35fb26ba
--- /dev/null
+++ b/board/pm9263/init.c
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2007 Sascha Hauer, Pengutronix
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#include <common.h>
+#include <net.h>
+#include <cfi_flash.h>
+#include <init.h>
+#include <environment.h>
+#include <fec.h>
+#include <asm/armlinux.h>
+#include <asm/mach-types.h>
+#include <partition.h>
+#include <fs.h>
+#include <fcntl.h>
+#include <asm/io.h>
+#include <asm/hardware.h>
+#include <asm/arch/memory-map.h>
+#include <asm/arch/ether.h>
+#include <nand.h>
+#include <linux/mtd/nand.h>
+#include <asm/arch/gpio.h>
+
+static struct device_d sdram_dev = {
+ .name = "ram",
+ .id = "ram0",
+
+ .map_base = 0x20000000,
+ .size = 64 * 1024 * 1024,
+
+ .type = DEVICE_TYPE_DRAM,
+};
+
+static struct device_d cfi_dev = {
+ .name = "cfi_flash",
+ .id = "nor0",
+
+ .map_base = 0x10000000,
+ .size = 4 * 1024 * 1024,
+};
+
+static struct at91sam_ether_platform_data macb_pdata = {
+ .flags = AT91SAM_ETHER_RMII,
+ .phy_addr = 0,
+};
+
+static struct device_d macb_dev = {
+ .name = "macb",
+ .id = "eth0",
+ .map_base = AT91SAM9263_BASE_EMAC,
+ .size = 0x1000,
+ .type = DEVICE_TYPE_ETHER,
+ .platform_data = &macb_pdata,
+};
+
+static int pm9263_devices_init(void)
+{
+ register_device(&sdram_dev);
+ register_device(&macb_dev);
+ register_device(&cfi_dev);
+
+#ifdef CONFIG_PARTITION
+ dev_add_partition(&cfi_dev, 0x00000, 0x40000, PARTITION_FIXED, "self");
+ dev_add_partition(&cfi_dev, 0x40000, 0x10000, PARTITION_FIXED, "env");
+#endif
+
+ armlinux_set_bootparams((void *)0x20000100);
+ armlinux_set_architecture(0x4b2);
+
+ return 0;
+}
+
+device_initcall(pm9263_devices_init);
+
+static struct device_d pm9263_serial_device = {
+ .name = "atmel_serial",
+ .id = "cs0",
+ .map_base = AT91_DBGU + AT91_BASE_SYS,
+ .size = 4096,
+ .type = DEVICE_TYPE_CONSOLE,
+};
+
+static int pm9263_console_init(void)
+{
+ register_device(&pm9263_serial_device);
+ return 0;
+}
+
+console_initcall(pm9263_console_init);
diff --git a/board/pm9263/lowlevel_init.S b/board/pm9263/lowlevel_init.S
new file mode 100644
index 0000000000..4961682322
--- /dev/null
+++ b/board/pm9263/lowlevel_init.S
@@ -0,0 +1,26 @@
+/*
+ * Board specific setup info
+ *
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+.globl board_init_lowlevel
+board_init_lowlevel:
+ mov pc, lr