diff options
author | Juergen Beisert <jbe@pengutronix.de> | 2010-10-11 10:58:47 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-11 15:43:05 +0200 |
commit | 7648762e0cc68b5c7230216424d914c78604055d (patch) | |
tree | 271a38796228a59a01382e1ed6be6885ed5be33d | |
parent | c141e5bdd69def655c81b62251aff4ab520e4a30 (diff) | |
download | barebox-7648762e0cc68b5c7230216424d914c78604055d.tar.gz barebox-7648762e0cc68b5c7230216424d914c78604055d.tar.xz |
Add the i.MX23-EVK platform (WIP)
Note: This is work in progress. Use with care.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
-rw-r--r-- | Documentation/boards.dox | 1 | ||||
-rw-r--r-- | arch/arm/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/freescale-mx23-evk/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/freescale-mx23-evk/config.h | 16 | ||||
-rw-r--r-- | arch/arm/boards/freescale-mx23-evk/mx23-evk.c | 96 | ||||
-rw-r--r-- | arch/arm/configs/imx23evk_defconfig | 24 | ||||
-rw-r--r-- | arch/arm/mach-stm/Kconfig | 7 |
7 files changed, 148 insertions, 0 deletions
diff --git a/Documentation/boards.dox b/Documentation/boards.dox index 3eb79b27b7..7b1450e836 100644 --- a/Documentation/boards.dox +++ b/Documentation/boards.dox @@ -14,6 +14,7 @@ ARM type: @li @subpage imx21ads @li @subpage imx27ads @li @subpage the3stack +@li @subpage mx23_evk @li @subpage scb9328 @li @subpage netx @li @subpage dev_omap_arch diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 77b6cf4551..75fa6d33e9 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -41,6 +41,7 @@ CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) machine-$(CONFIG_ARCH_AT91) := at91 machine-$(CONFIG_ARCH_EP93XX) := ep93xx machine-$(CONFIG_ARCH_IMX) := imx +machine-$(CONFIG_ARCH_STM) := stm machine-$(CONFIG_ARCH_NOMADIK) := nomadik machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_OMAP) := omap @@ -80,6 +81,7 @@ board-$(CONFIG_MACH_PCM043) := pcm043 board-$(CONFIG_MACH_PM9263) := pm9263 board-$(CONFIG_MACH_SCB9328) := scb9328 board-$(CONFIG_MACH_NESO) := guf-neso +board-$(CONFIG_MACH_MX23EVK) := freescale-mx23-evk machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) diff --git a/arch/arm/boards/freescale-mx23-evk/Makefile b/arch/arm/boards/freescale-mx23-evk/Makefile new file mode 100644 index 0000000000..cffb561cb6 --- /dev/null +++ b/arch/arm/boards/freescale-mx23-evk/Makefile @@ -0,0 +1,2 @@ +# +obj-y := mx23-evk.o diff --git a/arch/arm/boards/freescale-mx23-evk/config.h b/arch/arm/boards/freescale-mx23-evk/config.h new file mode 100644 index 0000000000..4b3da8f2e5 --- /dev/null +++ b/arch/arm/boards/freescale-mx23-evk/config.h @@ -0,0 +1,16 @@ +/* + * 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 + */ diff --git a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c new file mode 100644 index 0000000000..1ce72be8d7 --- /dev/null +++ b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c @@ -0,0 +1,96 @@ +/* + * (C) Copyright 2010 Juergen Beisert - 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 <init.h> +#include <gpio.h> +#include <environment.h> +#include <asm/armlinux.h> +#include <generated/mach-types.h> +#include <mach/imx-regs.h> + +static struct memory_platform_data ram_pdata = { + .name = "ram0", + .flags = DEVFS_RDWR, +}; + +static struct device_d sdram_dev = { + .name = "mem", + .map_base = IMX_MEMORY_BASE, + .size = 32 * 1024 * 1024, + .platform_data = &ram_pdata, +}; + +static int mx23_evk_devices_init(void) +{ + register_device(&sdram_dev); + + armlinux_add_dram(&sdram_dev); + armlinux_set_bootparams((void*)(sdram_dev.map_base + 0x100)); + armlinux_set_architecture(MACH_TYPE_MX23EVK); + + return 0; +} + +device_initcall(mx23_evk_devices_init); + +static struct device_d mx23_evk_serial_device = { + .name = "stm_serial", + .map_base = IMX_DBGUART_BASE, + .size = 8192, +}; + +static int mx23_evk_console_init(void) +{ + return register_device(&mx23_evk_serial_device); +} + +console_initcall(mx23_evk_console_init); + +/** @page mx23_evk Freescale's i.MX23 evaluation kit + +This CPU card is based on an i.MX23 CPU. The card is shipped with: + +- 32 MiB synchronous dynamic RAM (mobile DDR type) +- ENC28j60 based network (over SPI) + +Memory layout when @b barebox is running: + +- 0x40000000 start of SDRAM +- 0x40000100 start of kernel's boot parameters + - below malloc area: stack area + - below barebox: malloc area +- 0x41000000 start of @b barebox + +@section get_imx23evk_binary How to get the bootloader binary image: + +Using the default configuration: + +@verbatim +make ARCH=arm imx23evk_defconfig +@endverbatim + +Build the bootloader binary image: + +@verbatim +make ARCH=arm CROSS_COMPILE=armv5compiler +@endverbatim + +@note replace the armv5compiler with your ARM v5 cross compiler. +*/ diff --git a/arch/arm/configs/imx23evk_defconfig b/arch/arm/configs/imx23evk_defconfig new file mode 100644 index 0000000000..047a7e1586 --- /dev/null +++ b/arch/arm/configs/imx23evk_defconfig @@ -0,0 +1,24 @@ +CONFIG_ARCH_STM=y +CONFIG_AEABI=y +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y +CONFIG_BROKEN=y +CONFIG_LONGHELP=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +CONFIG_PARTITION=y +# CONFIG_DEFAULT_ENVIRONMENT is not set +CONFIG_DEBUG_INFO=y +CONFIG_CMD_EDIT=y +CONFIG_CMD_SLEEP=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_LOADENV=y +CONFIG_CMD_EXPORT=y +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_MTEST=y +CONFIG_CMD_MTEST_ALTERNATIVE=y +CONFIG_CMD_RESET=y +CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_PARTITION=y +# CONFIG_SPI is not set diff --git a/arch/arm/mach-stm/Kconfig b/arch/arm/mach-stm/Kconfig index 9858d3a961..bbdea5100c 100644 --- a/arch/arm/mach-stm/Kconfig +++ b/arch/arm/mach-stm/Kconfig @@ -2,8 +2,10 @@ if ARCH_STM config ARCH_TEXT_BASE hex + default 0x41000000 if MACH_MX23EVK config BOARDINFO + default "Freescale i.MX23-EVK" if MACH_MX23EVK comment "SigmaTel/Freescale i.MX System-on-Chip" @@ -21,6 +23,11 @@ if ARCH_IMX23 choice prompt "i.MX23 Board Type" +config MACH_MX23EVK + bool "mx23-evk" + help + Say Y here if you are using the Freescale i.MX23-EVK board + endchoice endif |