public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/13] M28EVK: Add SD update command
Date: Tue,  1 May 2012 23:03:42 +0200	[thread overview]
Message-ID: <1335906232-24549-4-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1335906232-24549-1-git-send-email-marex@denx.de>

Add "update_sd_firmware" command to easily reload the SD card of
m28evk kit. This comes handy when the board boots from SD card.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denxde>
Cc: Wolfgang Denk <wd@denx.de>
---
 include/configs/m28evk.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 012381a..c40d2a8 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -286,6 +286,7 @@
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"update_nand_full_filename=u-boot.nand\0"			\
 	"update_nand_firmware_filename=u-boot.sb\0"			\
+	"update_sd_firmware_filename=u-boot.sd\0"			\
 	"update_nand_firmware_maxsz=0x100000\0"				\
 	"update_nand_stride=0x40\0"	/* MX28 datasheet ch. 12.12 */	\
 	"update_nand_count=0x4\0"	/* MX28 datasheet ch. 12.12 */	\
@@ -312,6 +313,14 @@
 		"nand erase ${fcb_sz} ${fw_sz} ; "			\
 		"nand write ${loadaddr} ${fcb_sz} ${filesize} ; "	\
 		"nand write ${loadaddr} ${fw_off} ${filesize} ; "	\
+		"fi\0"							\
+	"update_sd_firmware="		/* Update the SD firmware partition */ \
+		"if mmc rescan ; then "					\
+		"if tftp ${update_sd_firmware_filename} ; then "	\
+		"setexpr fw_sz ${filesize} / 0x200 ; "	/* SD block size */ \
+		"setexpr fw_sz ${fw_sz} + 1 ; "				\
+		"mmc write ${loadaddr} 0x800 ${fw_sz} ; "		\
+		"fi ; "							\
 		"fi\0"
 
 #endif /* __M28_H__ */
-- 
1.7.10

  parent reply	other threads:[~2012-05-01 21:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01 21:03 [U-Boot] [PATCH 00/13] M28EVK/i.MX28 improvements Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 01/13] FEC: Abstract out register setup Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 02/13] M28EVK: Implement support for new board V2.0 Marek Vasut
2012-05-01 21:03 ` Marek Vasut [this message]
2012-05-01 21:03 ` [U-Boot] [PATCH 04/13] i.MX28: Improve passing of data from SPL to U-Boot Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 05/13] i.MX28: Implement boot pads sampling and reporting Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 06/13] i.MX28: Add LCDIF register definitions Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 07/13] i.MX28: Shut down the LCD controller before reset Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 08/13] i.MX28: Add LRADC register definitions Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 09/13] i.MX28: Add LRADC init to i.MX28 SPL Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 10/13] i.MX28: Reorder battery status functions in SPL Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 11/13] i.MX28: Add battery boot components to SPL Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 12/13] i.MX28: Check if WP detection is implemented at all Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 13/13] i.MX28: Avoid redefining serial_put[cs]() Marek Vasut
2012-05-01 21:05 ` [U-Boot] [PATCH 00/13] M28EVK/i.MX28 improvements Marek Vasut
  -- strict thread matches above, loose matches on Subject: below --
2012-05-01 21:09 Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 03/13] M28EVK: Add SD update command Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335906232-24549-4-git-send-email-marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox