From b91363cd34061fde84614f64d3c0975ff056d44d Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Sat, 30 Mar 2013 09:26:36 +0000 Subject: mpc512x: remove dead code The prt_mpc512x_clks() function isn't referenced anywhere and its prototype is wrong. Remove it. Signed-off-by: Anatolij Gustschin --- arch/powerpc/cpu/mpc512x/speed.c | 6 ------ include/common.h | 3 --- 2 files changed, 9 deletions(-) diff --git a/arch/powerpc/cpu/mpc512x/speed.c b/arch/powerpc/cpu/mpc512x/speed.c index 9a8f315..6761877 100644 --- a/arch/powerpc/cpu/mpc512x/speed.c +++ b/arch/powerpc/cpu/mpc512x/speed.c @@ -151,9 +151,3 @@ U_BOOT_CMD(clocks, 1, 0, do_clocks, "print clock configuration", " clocks" ); - -int prt_mpc512x_clks (void) -{ - do_clocks (NULL, 0, 0, NULL); - return (0); -} diff --git a/include/common.h b/include/common.h index 28aa4b9..de75da2 100644 --- a/include/common.h +++ b/include/common.h @@ -648,9 +648,6 @@ int prt_8260_clks (void); #elif defined(CONFIG_MPC5xxx) int prt_mpc5xxx_clks (void); #endif -#if defined(CONFIG_MPC512X) -int prt_mpc512xxx_clks (void); -#endif #if defined(CONFIG_MPC8220) int prt_mpc8220_clks (void); #endif -- cgit v1.1 From f8945518ca6af4ee5bfb8156b3897f181f0be1db Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 4 Apr 2013 03:55:42 +0000 Subject: mpc5200: a3m071/a4m2k: Enable flash verify option Signed-off-by: Stefan Roese --- include/configs/a3m071.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h index 13f3226..662d8ca 100644 --- a/include/configs/a3m071.h +++ b/include/configs/a3m071.h @@ -101,6 +101,7 @@ #define CONFIG_SYS_FLASH_CFI #define CONFIG_SYS_FLASH_EMPTY_INFO #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE +#define CONFIG_FLASH_VERIFY /* * Environment settings -- cgit v1.1 From 704afcc43f5937f1b56d17a08cad7d8dc8b68717 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 25 Apr 2013 23:10:02 +0000 Subject: mpc5200: a3m071/a4m2k: Fix problem with increased global_data struct The v2013.04 release has this patch set included: 5cb48582 "Add architecture-specific global data" With this, the global_data struct is now common and new variables have been added. Resulting in a bigger struct. Unfortunately the currently allocated 128 bytes are just a bit too small for this new struct. This patch now uses the automatically generated struct size instead to not run into this problem again. Please note that this problem might hit some other platforms which currently reserve a tight space of 128 bytes for the global_data struct! Signed-off-by: Stefan Roese --- include/configs/a3m071.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h index 662d8ca..1c055a3 100644 --- a/include/configs/a3m071.h +++ b/include/configs/a3m071.h @@ -122,10 +122,8 @@ #define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM #define CONFIG_SYS_INIT_RAM_END MPC5XXX_SRAM_SIZE - -#define CONFIG_SYS_GBL_DATA_SIZE 128 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - \ - CONFIG_SYS_GBL_DATA_SIZE) + GENERATED_GBL_DATA_SIZE) #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE -- cgit v1.1 From 8aa34499727936ede3f85033380720b4a9522aaa Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 25 Apr 2013 23:20:23 +0000 Subject: mpc5200: a3m071/a4m2k: Miscellaneous updates and fixes The changes to a3m071/a4m2k in summary are: - Enable CAN1 on I2C in GPS Port Configuration - Enable SPI on PSC2 - Activate network console - New flash partitioning - Fix some typos - Pass host name to Linux - Change rootfs to squashfs,jffs2 - Enable UBI/UBIFS support - Enable FIT support Signed-off-by: Stefan Roese --- board/a3m071/a3m071.c | 26 +++++++++++---- include/configs/a3m071.h | 87 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 82 insertions(+), 31 deletions(-) diff --git a/board/a3m071/a3m071.c b/board/a3m071/a3m071.c index 0f9f883..c62ba62 100644 --- a/board/a3m071/a3m071.c +++ b/board/a3m071/a3m071.c @@ -8,7 +8,7 @@ * (C) Copyright 2006 * MicroSys GmbH * - * Copyright 2012 Stefan Roese + * Copyright 2012-2013 Stefan Roese * * See file CREDITS for list of people who contributed to this * project. @@ -241,12 +241,26 @@ void spl_board_init(void) /* And write new value back to register */ out_be32(&mm->ipbi_ws_ctrl, val); -#endif - /* - * No need to change the pin multiplexing (MPC5XXX_GPS_PORT_CONFIG) - * as all 3 config versions (failsave level) have the same setup. - */ + + /* Setup pin multiplexing */ + if (failsavelevel == 2) { + /* fpga-version ok */ +#if defined(CONFIG_SYS_GPS_PORT_CONFIG_2) + out_be32(&gpio->port_config, CONFIG_SYS_GPS_PORT_CONFIG_2); +#endif + } else if (failsavelevel == 1) { + /* digiboard-version ok - fpga not */ +#if defined(CONFIG_SYS_GPS_PORT_CONFIG_1) + out_be32(&gpio->port_config, CONFIG_SYS_GPS_PORT_CONFIG_1); +#endif + } else { + /* full failsave-mode */ +#if defined(CONFIG_SYS_GPS_PORT_CONFIG) + out_be32(&gpio->port_config, CONFIG_SYS_GPS_PORT_CONFIG); +#endif + } +#endif /* * Setup gpio_wkup_7 as watchdog AS INPUT to disable it - see diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h index 1c055a3..e9af825 100644 --- a/include/configs/a3m071.h +++ b/include/configs/a3m071.h @@ -1,5 +1,5 @@ /* - * Copyright 2012 Stefan Roese + * Copyright 2012-2013 Stefan Roese * * See file CREDITS for list of people who contributed to this * project. @@ -59,6 +59,38 @@ #define CONFIG_CMD_CACHE #define CONFIG_CMD_MII #define CONFIG_CMD_REGINFO +#define CONFIG_CMD_DHCP +#define CONFIG_BOOTP_SEND_HOSTNAME +#define CONFIG_BOOTP_SERVERIP +#define CONFIG_BOOTP_MAY_FAIL +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_SERVERIP +#define CONFIG_NET_RETRY_COUNT 3 +#define CONFIG_CMD_LINK_LOCAL +#define CONFIG_NETCONSOLE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_CMD_PING +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define CONFIG_MTD_PARTITIONS /* needed for UBI */ +#define CONFIG_FLASH_CFI_MTD +#define MTDIDS_DEFAULT "nor0=fc000000.flash" +#define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:512k(u-boot)," \ + "256k(env)," \ + "128k(hwinfo)," \ + "1M(nvramsim)," \ + "128k(dtb)," \ + "5M(kernel)," \ + "128k(sysinfo)," \ + "7552k(root)," \ + "4M(app)," \ + "13568k(data)" +#define CONFIG_LZO /* needed for UBI */ +#define CONFIG_RBTREE /* needed for UBI */ +#define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_UBI +#define CONFIG_CMD_UBIFS +#define CONFIG_FIT /* * IPB Bus clocking configuration. @@ -88,7 +120,7 @@ */ #define CONFIG_SYS_FLASH_BASE 0xfc000000 #define CONFIG_SYS_FLASH_SIZE 0x02000000 -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000) +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x80000) #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 256 @@ -110,6 +142,8 @@ #define CONFIG_ENV_SIZE 0x10000 #define CONFIG_ENV_SECT_SIZE 0x20000 #define CONFIG_ENV_OVERWRITE +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) /* * Memory map @@ -128,8 +162,8 @@ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_MONITOR_LEN (256 << 10) -#define CONFIG_SYS_MALLOC_LEN (1 << 20) +#define CONFIG_SYS_MONITOR_LEN (512 << 10) +#define CONFIG_SYS_MALLOC_LEN (4 << 20) #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* @@ -155,14 +189,14 @@ */ #ifdef CONFIG_A4M2K -#define CONFIG_SYS_GPS_PORT_CONFIG 0x0005C805 +#define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C805 #else /* for failsave-level 0 - full failsave */ #define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C005 /* for failsave-level 1 - only digiboard ok */ -#define CONFIG_SYS_GPS_PORT_CONFIG_1 0x1005C005 +#define CONFIG_SYS_GPS_PORT_CONFIG_1 0x1005C065 /* for failsave-level 2 - all ok */ -#define CONFIG_SYS_GPS_PORT_CONFIG_2 0x1005C005 +#define CONFIG_SYS_GPS_PORT_CONFIG_2 0x1005C065 #endif #define CONFIG_WDOG_GPIO_PIN GPIO_WKUP_7 @@ -172,10 +206,10 @@ /* * Configuration matrix - * MSB LSB + * MSB LSB * failsave 0 0x1005C005 00010000000001011100000000000101 ( full failsave ) - * failsave 1 0x1005C005 00010000000001011100000000000101 ( digib.-ver ok ) - * failsave 2 0x1005C005 00010000000001011100000000000101 ( all ok ) + * failsave 1 0x1005C065 00010000000001011100000001100101 ( digib.-ver ok ) + * failsave 2 0x1005C065 00010000000001011100000001100101 ( all ok ) * || ||| || | ||| | | | | * || ||| || | ||| | | | | bit rev name * ++-+++-++--+---+++-+---+---+---+- 0 31 CS1 @@ -311,10 +345,12 @@ * Environment Configuration */ -#define CONFIG_BOOTDELAY 0 /* -1 disables auto-boot */ +#define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ #undef CONFIG_BOOTARGS #define CONFIG_ZERO_BOOTDELAY_CHECK +#define CONFIG_SYS_AUTOLOAD "n" + #define CONFIG_PREBOOT "echo;" \ "echo Type \"run flash_mtd\" to boot from flash with mtd filesystem;" \ "echo Type \"run net_nfs\" to boot from tftp with nfs filesystem;" \ @@ -322,11 +358,10 @@ #undef CONFIG_BOOTARGS -#define CONFIG_SYS_OS_BASE 0xfc080000 -#define CONFIG_SYS_FDT_BASE 0xfc060000 +#define CONFIG_SYS_OS_BASE 0xfc200000 +#define CONFIG_SYS_FDT_BASE 0xfc1e0000 #define CONFIG_EXTRA_ENV_SETTINGS \ - "hostname=" __stringify(CONFIG_HOSTNAME) "\0" \ "netdev=eth0\0" \ "verify=no\0" \ "loadaddr=200000\0" \ @@ -343,29 +378,31 @@ "nfsargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath}\0" \ "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "mtdargs=setenv bootargs root=/dev/mtdblock4 rw rootfstype=jffs2\0" \ + "mtdargs=setenv bootargs root=/dev/mtdblock7 " \ + "rootfstype=squashfs,jffs2\0" \ + "addhost=setenv bootargs ${bootargs} " \ + "hostname=${hostname}\0" \ "addip=setenv bootargs ${bootargs} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ ":${hostname}:${netdev}:off panic=1\0" \ "addtty=setenv bootargs ${bootargs} " \ "console=${consoledev},${baudrate}\0" \ - "flash_nfs=run nfsargs addip addtty;" \ - "bootm ${kernel_addr} - ${fdtaddr}\0" \ - "flash_mtd=run mtdargs addip addtty;" \ - "bootm ${kernel_addr} - ${fdtaddr}\0" \ - "flash_self=run ramargs addip addtty;" \ + "flash_nfs=run nfsargs addip addtty addhost;" \ + "bootm ${kernel_addr} - ${fdt_addr}\0" \ + "flash_mtd=run mtdargs addip addtty addhost;" \ + "bootm ${kernel_addr} - ${fdt_addr}\0" \ + "flash_self=run ramargs addip addtty addhost;" \ "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \ "tftp ${fdt_addr_r} ${fdtfile};" \ - "run nfsargs addip addtty;" \ + "run nfsargs addip addtty addhost;" \ "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ "load=tftp ${loadaddr} " __stringify(CONFIG_HOSTNAME) \ "/u-boot-img.bin\0" \ - "update=protect off fc000000 fc03ffff; " \ - "era fc000000 fc03ffff; cp.b ${loadaddr} fc000000 40000\0" \ + "update=protect off fc000000 fc07ffff; " \ + "era fc000000 fc07ffff;" \ + "cp.b ${loadaddr} fc000000 ${filesize}\0" \ "upd=run load;run update\0" \ - "bootdelay=3\0" \ - "bootcmd=run net_nfs\0" \ "" #define CONFIG_BOOTCOMMAND "run flash_mtd" -- cgit v1.1