diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-12-09 17:17:30 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-05 11:31:14 +0100 |
commit | 417116c7835414bf05dec0224f0ee2e818e47c16 (patch) | |
tree | fd498e81d7dc8b8cac4475894dcd14acb6870646 /arch/arm/boards/karo-tx28 | |
parent | ba4ace811029e8a6406330667961443a0326a0bb (diff) | |
download | barebox-417116c7835414bf05dec0224f0ee2e818e47c16.tar.gz barebox-417116c7835414bf05dec0224f0ee2e818e47c16.tar.xz |
ARM: MXS: Update Karo TX28 board support
- enable multiimage support to generate bootstream, sd-card and 2nd
stage images
- Enable new defaultenv support
- Enable more features
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/karo-tx28')
-rw-r--r-- | arch/arm/boards/karo-tx28/env/config | 41 | ||||
-rw-r--r-- | arch/arm/boards/karo-tx28/lowlevel.c | 58 |
2 files changed, 56 insertions, 43 deletions
diff --git a/arch/arm/boards/karo-tx28/env/config b/arch/arm/boards/karo-tx28/env/config deleted file mode 100644 index a6b10255a2..0000000000 --- a/arch/arm/boards/karo-tx28/env/config +++ /dev/null @@ -1,41 +0,0 @@ -# -# - -baseboard=tx28stk5 - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.ethaddr=de:ad:be:ef:00:00 -#eth0.netmask=a.b.c.d -#eth0.serverip=a.b.c.d -#eth0.gateway=a.b.c.d - -# can be either 'nfs' or 'tftp' -kernel_loc=tftp -# can be either 'net' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttyAM0,115200 tx28_base=$baseboard" diff --git a/arch/arm/boards/karo-tx28/lowlevel.c b/arch/arm/boards/karo-tx28/lowlevel.c index aa3b09b2ee..f747f3fd6b 100644 --- a/arch/arm/boards/karo-tx28/lowlevel.c +++ b/arch/arm/boards/karo-tx28/lowlevel.c @@ -1,11 +1,65 @@ +#define pr_fmt(fmt) "KARO TX28: " fmt +#define DEBUG + #include <common.h> #include <sizes.h> #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> #include <mach/imx28-regs.h> +#include <mach/init.h> +#include <io.h> +#include <debug_ll.h> +#include <mach/iomux.h> +#include <stmp-device.h> -void __naked barebox_arm_reset_vector(void) +ENTRY_FUNCTION(start_barebox_karo_tx28, r0, r1, r2) { - arm_cpu_lowlevel_init(); barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, NULL); } + +static const uint32_t iomux_pads[] = { + /* EMI */ + EMI_DATA0, EMI_DATA1, EMI_DATA2, EMI_DATA3, EMI_DATA4, EMI_DATA5, + EMI_DATA6, EMI_DATA7, EMI_DATA8, EMI_DATA9, EMI_DATA10, EMI_DATA11, + EMI_DATA12, EMI_DATA13, EMI_DATA14, EMI_DATA15, EMI_ODT0, EMI_DQM0, + EMI_ODT1, EMI_DQM1, EMI_DDR_OPEN_FB, EMI_CLK, EMI_DSQ0, EMI_DSQ1, + EMI_DDR_OPEN, EMI_A0, EMI_A1, EMI_A2, EMI_A3, EMI_A4, EMI_A5, + EMI_A6, EMI_A7, EMI_A8, EMI_A9, EMI_A10, EMI_A11, EMI_A12, EMI_A13, + EMI_A14, EMI_BA0, EMI_BA1, EMI_BA2, EMI_CASN, EMI_RASN, EMI_WEN, + EMI_CE0N, EMI_CE1N, EMI_CKE, + + /* Debug UART */ + AUART0_RTS_DUART_TX | VE_3_3V | STRENGTH(S8MA), + AUART0_CTS_DUART_RX | VE_3_3V | STRENGTH(S8MA), +}; + +static noinline void karo_tx28_init(void) +{ + int i; + + /* initialize muxing */ + for (i = 0; i < ARRAY_SIZE(iomux_pads); i++) + imx_gpio_mode(iomux_pads[i]); + + pr_debug("initializing power...\n"); + + mx28_power_init_battery_input(); + + pr_debug("initializing SDRAM...\n"); + + mx28_mem_init(); + + pr_debug("DONE\n"); +} + +ENTRY_FUNCTION(prep_start_barebox_karo_tx28, r0, r1, r2) +{ + void (*back)(unsigned long) = (void *)get_lr(); + + relocate_to_current_adr(); + setup_c(); + + karo_tx28_init(); + + back(0); +} |