summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig12
-rw-r--r--arch/arm/Makefile1
-rw-r--r--board/phycore_pcm038/Makefile5
-rw-r--r--board/phycore_pcm038/pcm038.c114
-rw-r--r--board/phycore_pcm038/u-boot.lds.S71
5 files changed, 203 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 250765cd80..5392322691 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -5,6 +5,7 @@ config ARCH_TEXT_BASE
default 0x08f80000 if MACH_SCB9328
default 0x81f00000 if MACH_NXDB500
default 0x21e00000 if MACH_ECO920
+ default 0xa0000000 if MACH_PCM038
config BOARDINFO
default "Synertronixx scb9328" if MACH_SCB9328
@@ -12,6 +13,9 @@ config BOARDINFO
config BOARDINFO
default "Hilscher Netx nxdb500" if MACH_NXDB500
+config BOARDINFO
+ default "Phytec Phycore MX27" if MACH_PCM038
+
config ARM
bool
select HAS_KALLSYMS
@@ -65,6 +69,14 @@ config MACH_SCB9328
help
Say Y here if you are using the Synertronixx scb9328 board
+config MACH_PCM038
+ bool "Phytec pcm038"
+ select HAS_CFI
+ select ARCH_IMX27
+ help
+ Say Y here if you are using the Phytec Phycore pcm038 equipped
+ with a Freescale i.MX27 Processor
+
config MACH_ECO920
bool "eco920"
select HAS_AT91_ETHER
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 37e83e7b24..f838d3743d 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -10,6 +10,7 @@ machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200
board-$(CONFIG_MACH_MX1ADS) := mx1ads
board-$(CONFIG_MACH_ECO920) := eco920
board-$(CONFIG_MACH_SCB9328) := scb9328
+board-$(CONFIG_MACH_PCM038) := phycore_pcm038
board-$(CONFIG_MACH_NXDB500) := netx
cpu-$(CONFIG_ARM920T) := arm920t
cpu-$(CONFIG_ARM926EJS) := arm926ejs
diff --git a/board/phycore_pcm038/Makefile b/board/phycore_pcm038/Makefile
new file mode 100644
index 0000000000..4ba96cb5da
--- /dev/null
+++ b/board/phycore_pcm038/Makefile
@@ -0,0 +1,5 @@
+
+#obj-y += lowlevel_init.o
+obj-y += pcm038.o
+
+extra-y += u-boot.lds
diff --git a/board/phycore_pcm038/pcm038.c b/board/phycore_pcm038/pcm038.c
new file mode 100644
index 0000000000..db4ebc139b
--- /dev/null
+++ b/board/phycore_pcm038/pcm038.c
@@ -0,0 +1,114 @@
+/*
+ * 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 <asm/arch/imx-regs.h>
+#include <asm/arch/gpio.h>
+#include <partition.h>
+#include <fs.h>
+#include <fcntl.h>
+
+static struct device_d cfi_dev = {
+ .name = "cfi_flash",
+ .id = "nor0",
+
+ .map_base = 0xC0000000,
+ .size = 16 * 1024 * 1024, /* FIXME */
+};
+
+static struct device_d sdram_dev = {
+ .name = "ram",
+ .id = "ram0",
+
+ .map_base = 0xa0000000,
+ .size = 16 * 1024 * 1024, /* FIXME */
+
+ .type = DEVICE_TYPE_DRAM,
+};
+
+static struct device_d fec_dev = {
+ .name = "fec_imx27",
+ .id = "eth0",
+
+ .type = DEVICE_TYPE_ETHER,
+};
+
+static int pcm038_devices_init(void)
+{
+ int i;
+ unsigned short mode[] = {
+ PD12_AOUT_FEC_RXD0,
+ PD5_AOUT_FEC_RXD1,
+ PD6_AOUT_FEC_RXD2,
+ PD7_AOUT_FEC_RXD3,
+ PD4_AOUT_FEC_RX_ER,
+ PD13_AOUT_FEC_RX_DV,
+ PD0_AIN_FEC_TXD0,
+ PD1_AIN_FEC_TXD1,
+ PD2_AIN_FEC_TXD2,
+ PD3_AIN_FEC_TXD3,
+ PD11_AOUT_FEC_TX_CLK,
+ PF23_AIN_FEC_TX_EN,
+ PD8_AF_FEC_MDIO,
+ PD9_AIN_FEC_MDC,
+ PD14_AOUT_FEC_CLR,
+ PD15_AOUT_FEC_COL,
+ PD16_AIN_FEC_TX_ER,
+ PE12_PF_UART1_TXD,
+ PE13_PF_UART1_RXD,
+ PE14_PF_UART1_CTS,
+ PE15_PF_UART1_RTS };
+
+ for (i = 0; i < sizeof(mode) / sizeof(short); i ++)
+ imx_gpio_mode(mode[i]);
+
+ register_device(&cfi_dev);
+ register_device(&sdram_dev);
+ register_device(&fec_dev);
+
+ dev_add_partition(&cfi_dev, 0x00000, 0x20000, "self");
+ dev_add_partition(&cfi_dev, 0x40000, 0x20000, "env");
+ dev_protect(&cfi_dev, 0x20000, 0, 1);
+
+ return 0;
+}
+
+device_initcall(pcm038_devices_init);
+
+static struct device_d pcm038_serial_device = {
+ .name = "imx_serial",
+ .id = "cs0",
+ .map_base = IMX_UART1_BASE,
+ .size = 4096,
+ .type = DEVICE_TYPE_CONSOLE,
+};
+
+static int pcm038_console_init(void)
+{
+ register_device(&pcm038_serial_device);
+ return 0;
+}
+
+console_initcall(pcm038_console_init);
+
diff --git a/board/phycore_pcm038/u-boot.lds.S b/board/phycore_pcm038/u-boot.lds.S
new file mode 100644
index 0000000000..e1f6dd3f90
--- /dev/null
+++ b/board/phycore_pcm038/u-boot.lds.S
@@ -0,0 +1,71 @@
+/*
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * 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
+ *
+ */
+
+#include <asm-generic/u-boot.lds.h>
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+ . = TEXT_BASE;
+
+ . = ALIGN(4);
+ .text :
+ {
+ _stext = .;
+ _text = .;
+ arch/arm/cpu/start-arm920t.o (.text)
+ *(.text)
+ }
+
+ . = ALIGN(4);
+ .rodata : { *(.rodata) }
+
+ _etext = .; /* End of text and rodata section */
+
+ . = ALIGN(4);
+ .data : { *(.data) }
+
+ . = ALIGN(4);
+ .got : { *(.got) }
+
+ . = .;
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { U_BOOT_CMDS }
+ __u_boot_cmd_end = .;
+
+ __u_boot_initcalls_start = .;
+ .u_boot_initcalls : { INITCALLS }
+ __u_boot_initcalls_end = .;
+
+ __usymtab_start = .;
+ __usymtab : { U_BOOT_SYMS }
+ __usymtab_end = .;
+
+ . = ALIGN(4);
+ __bss_start = .;
+ .bss : { *(.bss) }
+ _end = .;
+}