From patchwork Sat Jun 22 14:16:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 253416 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A56CC2C0437 for ; Sun, 23 Jun 2013 00:17:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 77AB14A13F; Sat, 22 Jun 2013 16:16:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Krw7YuT7InJM; Sat, 22 Jun 2013 16:16:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A19D44A12F; Sat, 22 Jun 2013 16:16:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6E3874A12F for ; Sat, 22 Jun 2013 16:16:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fNzQH+Sj+euJ for ; Sat, 22 Jun 2013 16:16:36 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.181]) by theia.denx.de (Postfix) with ESMTP id 1B7514A125 for ; Sat, 22 Jun 2013 16:16:29 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub40Q/uAFj+9EbzeUT+D0e8= X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (pD9FFA912.dip0.t-ipconnect.de [217.255.169.18]) by smtp.strato.de (jorabe mo28) (RZmta 31.28 DYNA|AUTH) with ESMTPA id 307135p5MD662G ; Sat, 22 Jun 2013 16:16:27 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Sat, 22 Jun 2013 16:16:25 +0200 Message-Id: <1371910585-17583-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.8.3.1 Subject: [U-Boot] [PATCH] mpc5200: Misc updates to a3m071 config header X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This patch changes some features of the a3m071/a4m2k board support: - Add bootcounter support - Update MTD env default to correct values - Add mtdparts to bootargs for mtd partitioning via kernel cmdline - Added some default env variables for easy updating (kernel, dtb) - Change README to the updated flash locations Signed-off-by: Stefan Roese --- board/a3m071/README | 10 +++++----- include/configs/a3m071.h | 31 +++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/board/a3m071/README b/board/a3m071/README index a0fe832..112c47b 100644 --- a/board/a3m071/README +++ b/board/a3m071/README @@ -57,13 +57,13 @@ the following command: => fdt print 5. Save fdt to NOR flash: -=> erase fc060000 fc07ffff -=> cp.b 1800000 fc060000 10000 +=> erase fc180000 fc07ffff +=> cp.b 1800000 fc180000 10000 All this can be integrated into an environment command: -=> setenv upd_fdt 'tftp 1800000 a3m071/a3m071.dtb;run mtdargs addip2 addtty; \ - fdt addr 1800000;fdt boardsetup;fdt chosen;erase fc060000 fc07ffff; \ - cp.b 1800000 fc060000 10000' +=> setenv upd_fdt 'tftp 1800000 a3m071/a3m071.dtb;run mtdargs addip addtty; \ + fdt addr 1800000;fdt boardsetup;fdt chosen;erase fc180000 fc07ffff; \ + cp.b 1800000 fc180000 10000' => saveenv After this, only "run upd_fdt" needs to get called to load, patch diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h index e9af825..905702d 100644 --- a/include/configs/a3m071.h +++ b/include/configs/a3m071.h @@ -42,6 +42,8 @@ #define CONFIG_HOSTNAME a3m071 #endif +#define CONFIG_BOOTCOUNT_LIMIT + /* * Serial console configuration */ @@ -76,7 +78,8 @@ #define CONFIG_FLASH_CFI_MTD #define MTDIDS_DEFAULT "nor0=fc000000.flash" #define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:512k(u-boot)," \ - "256k(env)," \ + "128k(env1)," \ + "128k(env2)," \ "128k(hwinfo)," \ "1M(nvramsim)," \ "128k(dtb)," \ @@ -84,7 +87,9 @@ "128k(sysinfo)," \ "7552k(root)," \ "4M(app)," \ - "13568k(data)" + "5376k(data)," \ + "8M(install)" + #define CONFIG_LZO /* needed for UBI */ #define CONFIG_RBTREE /* needed for UBI */ #define CONFIG_CMD_MTDPARTS @@ -378,7 +383,7 @@ "nfsargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath}\0" \ "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "mtdargs=setenv bootargs root=/dev/mtdblock7 " \ + "mtdargs=setenv bootargs root=/dev/mtdblock8 " \ "rootfstype=squashfs,jffs2\0" \ "addhost=setenv bootargs ${bootargs} " \ "hostname=${hostname}\0" \ @@ -387,22 +392,32 @@ ":${hostname}:${netdev}:off panic=1\0" \ "addtty=setenv bootargs ${bootargs} " \ "console=${consoledev},${baudrate}\0" \ - "flash_nfs=run nfsargs addip addtty addhost;" \ + "flash_nfs=run nfsargs addip addtty addmtd addhost;" \ "bootm ${kernel_addr} - ${fdt_addr}\0" \ - "flash_mtd=run mtdargs addip addtty addhost;" \ + "flash_mtd=run mtdargs addip addtty addmtd addhost;" \ "bootm ${kernel_addr} - ${fdt_addr}\0" \ - "flash_self=run ramargs addip addtty addhost;" \ + "flash_self=run ramargs addip addtty addmtd 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 addhost;" \ + "run nfsargs addip addtty addmtd addhost;" \ "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ "load=tftp ${loadaddr} " __stringify(CONFIG_HOSTNAME) \ "/u-boot-img.bin\0" \ - "update=protect off fc000000 fc07ffff; " \ + "update=protect off fc000000 fc07ffff;" \ "era fc000000 fc07ffff;" \ "cp.b ${loadaddr} fc000000 ${filesize}\0" \ "upd=run load;run update\0" \ + "upd_fdt=tftp 1800000 a3m071/a3m071.dtb;" \ + "run mtdargs addip addtty addmtd addhost;" \ + "fdt addr 1800000;fdt boardsetup;fdt chosen;" \ + "erase fc1e0000 fc1fffff;cp.b 1800000 fc1e0000 20000" \ + "upd_kernel=tftp 1000000 a3m071/uImage-uncompressed;" \ + "erase fc200000 fc6fffff;" \ + "cp.b 1000000 fc200000 ${filesize}" \ + "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ + "mtdids=" MTDIDS_DEFAULT "\0" \ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ "" #define CONFIG_BOOTCOMMAND "run flash_mtd"