All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alshine Mondesir <alshinem@xgtechnology.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ppc4xx: ML507: Environment in flash and MTD	Support
Date: Wed, 23 Jul 2008 13:47:33 -0400	[thread overview]
Message-ID: <004201c8ecec$2ff2afd0$8fd80f70$@com> (raw)
In-Reply-To: <1216833082-7513-1-git-send-email-ricardo.ribalda@uam.es>

Any of you guys have experience with u-boot loading a standalone app?

Alshine Mondesir
Firmware Engineer
xG Technology Inc.
7771 W. Oakland Park Blvd, Sunrise, FL 33351
Tel: 954-572-0395 ext 3323
Fax: 954-572-0397
http://www.xgtechnology.com

-----Original Message-----
From: u-boot-users-bounces@lists.sourceforge.net
[mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf Of Ricardo
Ribalda Delgado
Sent: Wednesday, July 23, 2008 1:11 PM
To: u-boot-users; Stefan Roese
Subject: [U-Boot-Users] [PATCH] ppc4xx: ML507: Environment in flash and MTD
Support

-Relocate the location of u-boot in the flash
-Save the environment in one sector of the flash memory
-MTD Support

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
---
 Makefile                         |    2 +-
 board/xilinx/ml507/xparameters.h |    2 +-
 common/cmd_load.c                |    2 +-
 include/configs/ml507.h          |   15 +++++++++++----
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 8f4fdd0..ea572cf 100644
--- a/Makefile
+++ b/Makefile
@@ -1352,7 +1352,7 @@ ml300_config:	unconfig
 ml507_flash_config:	unconfig
 	@mkdir -p $(obj)include $(obj)board/xilinx/ml507
 	@cp $(obj)board/xilinx/ml507/u-boot-rom.lds
$(obj)board/xilinx/ml507/u-boot.lds
-	@echo "TEXT_BASE = 0xFE3E0000" > $(obj)board/xilinx/ml507/config.tmp
+	@echo "TEXT_BASE = 0xFE360000" > $(obj)board/xilinx/ml507/config.tmp
 	@$(MKCONFIG) $(@:_flash_config=) ppc ppc4xx ml507 xilinx
 
 ml507_config:	unconfig
diff --git a/board/xilinx/ml507/xparameters.h
b/board/xilinx/ml507/xparameters.h
index 6a8e183..77d2ddf 100644
--- a/board/xilinx/ml507/xparameters.h
+++ b/board/xilinx/ml507/xparameters.h
@@ -24,7 +24,7 @@
 #define XPAR_DDR2_SDRAM_MEM_BASEADDR 	0x00000000
 #define XPAR_IIC_EEPROM_BASEADDR 	0x81600000
 #define XPAR_INTC_0_BASEADDR 		0x81800000
-#define XPAR_LLTEMAC_0_BASEADDR 	0x81c00000
+#define XPAR_LLTEMAC_0_BASEADDR 	0x81C00000
 #define XPAR_UARTLITE_0_BASEADDR 	0x84000000
 #define XPAR_FLASH_MEM0_BASEADDR 	0xFE000000
 #define XPAR_PLB_CLOCK_FREQ_HZ 		100000000
diff --git a/common/cmd_load.c b/common/cmd_load.c
index 1b75a7b..89f6403 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -38,7 +38,7 @@ static ulong load_serial_ymodem (ulong offset);
 #endif
 
 #if defined(CONFIG_CMD_LOADS)
-static ulong load_serial (ulong offset);
+static ulong load_serial (long offset);
 static int read_record (char *buf, ulong len);
 # if defined(CONFIG_CMD_SAVES)
 static int save_serial (ulong offset, ulong size);
diff --git a/include/configs/ml507.h b/include/configs/ml507.h
index a79bc1e..c653a51 100644
--- a/include/configs/ml507.h
+++ b/include/configs/ml507.h
@@ -33,7 +33,7 @@
 #define CFG_SDRAM_SIZE_MB	256
 #define CFG_MONITOR_BASE	TEXT_BASE
 #define CFG_MONITOR_LEN		( 192 * 1024 )
-#define CFG_MALLOC_LEN		( 128 * 1024 )
+#define CFG_MALLOC_LEN		( CFG_ENV_SIZE + 128 * 1024 )
 
 /*Uart*/
 #define CONFIG_XILINX_UARTLITE
@@ -49,6 +49,8 @@
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_REGINFO
+#define CONFIG_CMD_JFFS2
+#define CONFIG_JFFS2_CMDLINE
 #undef CONFIG_CMD_I2C
 #undef CONFIG_CMD_DTT
 #undef CONFIG_CMD_NET
@@ -58,9 +60,11 @@
 #undef CONFIG_CMD_IMLS
 
 /*Env*/
-#define	CFG_ENV_IS_NOWHERE
-#define	CFG_ENV_SIZE		0x200
-#define CFG_ENV_OFFSET 		0x100
+#define	CFG_ENV_IS_IN_FLASH
+#define	CFG_ENV_SIZE		0x20000
+#define	CFG_ENV_SECT_SIZE	0x20000
+#define CFG_ENV_OFFSET 		0x340000
+#define CFG_ENV_ADDR 		(XPAR_FLASH_MEM0_BASEADDR+CFG_ENV_OFFSET)
 
 /*Misc*/
 #define CONFIG_BOOTDELAY	5		/* autoboot after 5 seconds
*/
@@ -111,5 +115,8 @@
 #define	CFG_MAX_FLASH_BANKS	1
 #define	CFG_MAX_FLASH_SECT	259
 #define	CFG_FLASH_PROTECTION
+#define MTDIDS_DEFAULT		"nor0=ml507-flash"
+#define MTDPARTS_DEFAULT	"mtdparts=ml507-flash:-(user)"
+
 
 #endif						/* __CONFIG_H */
-- 
1.5.6.3


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

  reply	other threads:[~2008-07-23 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 17:11 [U-Boot-Users] [PATCH] ppc4xx: ML507: Environment in flash and MTD Support Ricardo Ribalda Delgado
2008-07-23 17:47 ` Alshine Mondesir [this message]
2008-07-30  9:35 ` Stefan Roese

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='004201c8ecec$2ff2afd0$8fd80f70$@com' \
    --to=alshinem@xgtechnology.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.