Trying again: DNS323
Subsystems (4)
Hi folks,
After a bit of a hiatus, I am trying again to get my DNS323 config working properly. This is a Marvell Orion5x based device, very similar to the EDMiniv2.
Unfortunately, I am having some difficulty in forward porting it to the new relocation scheme. I have it working based on a point after 2010.06, prior to the introduction of all the relocation rework. My configuration was based on that of the edminiv2, and I basically reapplied my changes to current mainline, comparing them to the current edminiv2 configuration.
Unfortunately, it simply doesn't boot.
Note that I have not yet tried to flash the image to the device, it is configured for chain loading from the current vendor U-Boot, using the CONFIG_SKIP_LOWLEVEL_INIT option.
I would have thought that this would have eliminated the relocation code completely, since relocation should only happen when booting directly from flash, I would think?
Has anyone tested to verify whether CONFIG_SKIP_LOWLEVEL_INIT still works?
As an aside, it seems that there are differences in gcc 4.3 and gcc 4.5 that prevent images compiled with 4.5 from working. Compiling my working config with 4.3 results in a working image, compiling with 4.5 results in a non-working image. If anyone wants to work out what the differences are, and how to get 4.5 to build successfully, please let me know.
Regards,
Rogan
[U-Boot] Working DNS323 config
This patch series contains a functional DNS323 configuration, and other required changes. This is based on a point prior to the relocation work.
This version is configured to be chained from the existing vendor U-Boot, and is NOT intended to be flashed to NOR.
[U-Boot] Working DNS323 config
Quoted 6 lines · rogan at dawes.za.net
This patch series contains a functional DNS323 configuration, and other required changes. This is based on a point prior to the relocation work.
This version is configured to be chained from the existing vendor U-Boot, and is NOT intended to be flashed to NOR.
My sincere apologies to everyone who wasted their time reviewing the patches in the "working config 1-11" series.
I'm still learning about the etiquette of patch sending, and am truly sorry for any confusion I have caused.
Rogan
PATCH 1/11 Orion5x: Correct DRAM bank detection
In reply to Rogan DawesFrom: Rogan Dawes <Rogan Dawes [email protected]>
--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- arch/arm/include/asm/arch-orion5x/orion5x.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/dram.c +1 -1
@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank) {struct orion5x_ddr_addr_decode_registers *winregs = (struct orion5x_ddr_addr_decode_registers *) -ORION5X_CPU_WIN_BASE ; +ORION5X_DRAM_BASE ;u32 result =0 ;u32 enable =0x01 & winregs[bank].size;
arch/arm/include/asm/arch-orion5x/orion5x.h +1 -0
@@ -42,6 +42,7 @@#define ORION5X_REGISTER (x) (ORION5X_REGS_PHY_BASE + x)/* Documented registers */ +#define ORION5X_DRAM_BASE (ORION5X_REGISTER(0x01500))#define ORION5X_TWSI_BASE (ORION5X_REGISTER(0x11000))#define ORION5X_UART0_BASE (ORION5X_REGISTER(0x12000))#define ORION5X_UART1_BASE (ORION5X_REGISTER(0x12100))
Signature · 1 line
1.7.1
PATCH 2/11 IDE: Don't assume there are always two devices per bus
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
Some SATA controllers can operate in an IDE compatible mode (e.g. mvsata) but will only ever have a single device per bus.
This allows the upcoming DNS323 port to properly identify and use a drive on both SATA interfaces.
--- include/ide.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/ide.h +2 -1
@@ -24,7 +24,8 @@#ifndef _IDE_H#define _IDE_H -#define IDE_BUS (dev) (dev >> 1) +#define IDE_BUS (dev) (dev >> ((CONFIG_SYS_IDE_MAXDEVICE / \ + CONFIG_SYS_IDE_MAXBUS) - 1))#define ATA_CURR_BASE (dev) (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
Signature · 1 line
1.7.1
PATCH 2/11 IDE: Don't assume there are always two devices per bus
Dear rogan at dawes.za.net,
Quoted 16 lines · In message <[email protected]> you wrote:
From: Rogan Dawes <[email protected]>
Some SATA controllers can operate in an IDE compatible mode (e.g. mvsata) but will only ever have a single device per bus.
This allows the upcoming DNS323 port to properly identify and use a drive on both SATA interfaces.
--- include/ide.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)include/ide.h +0
-0
include/ide.h line 28
Quoted 6 lines
include/ide.h +2
-1@@ -24,7 +24,8 @@#ifndef _IDE_H#define _IDE_H -#define IDE_BUS (dev) (dev >> 1) +#define IDE_BUS (dev) (dev >> ((CONFIG_SYS_IDE_MAXDEVICE / \ + CONFIG_SYS_IDE_MAXBUS) - 1))
I am still not convinced this is a correct approach. Can we not have mixed configurations, with 1 device on one controller (bus) and 2 devices on another controller (bus) ?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Q: How many IBM CPU's does it take to execute a job? A: Four; three to hold it down, and one to rip its head off.
PATCH 3/11 Align linebuf to avoid misaligned aliases of it
In reply to Rogan DawesFrom: Albert Aribaud <[email protected]>
Commit 64419e47518bbba059c80b77558f93ad4804145c aliases the uint16_t usp and uint32_t uip variables in print_buffer() to uint8_t variable linebuf without aligning it to an uint32_t address, thus causing data aborts on ARM when doing md.l on 32-bit wide area (and probably 16-bit wide as well).
Aligning linebuf fixes the issue.
--- lib/display_options.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
lib/display_options.c +2 -1
@@ -101,7 +101,8 @@ void print_size(unsigned long long size, const char *s)#define DEFAULT_LINE_LENGTH_BYTES (16)int print_buffer (ulong addr,void * data,uint width,uint count,uint linelen) { -uint8_t linebuf[MAX_LINE_LENGTH_BYTES +1 ]; + uint8_t linebuf[MAX_LINE_LENGTH_BYTES + 1] + __attribute__((__aligned__(sizeof(uint32_t))));uint32_t *uip = (void *)linebuf;uint16_t *usp = (void *)linebuf;uint8_t *ucp = (void *)linebuf;
Signature · 1 line
1.7.1
PATCH 4/11 Orion5x: bugfix: window size (mis)calculation
In reply to Rogan DawesFrom: Albert Aribaud <[email protected]>
Fix orion5x_winctrl_calcsize() off-by-1 bug which caused mapping windows to be cut by half. This afected all windows including NOR flash (causing half the flash to be unaccessible) but DRAM was and still is fine as its size is determined otherwise.
--- arch/arm/cpu/arm926ejs/orion5x/cpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/cpu.c +1 -1
@@ -61,7 +61,7 @@ unsigned int orion5x_winctrl_calcsize(unsigned int sizeval)unsigned int j =0 ;u32 val = sizeval >>1 ; -for (i =0 ; val >0x10000 ; i++) { +for (i =0 ; val >=0x10000 ; i++) { j |= (1 << i); val = val >>1 ; }
Signature · 1 line
1.7.1
PATCH 4/11 Orion5x: bugfix: window size (mis)calculation
Quoted 11 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:35 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 04/11] Orion5x: bugfix: window size (mis)calculationFrom: Albert Aribaud <[email protected]>
BTW: who has send this patch? I think not Albert?
Regards..
Prafulla . .
PATCH 5/11 I2C: add Marvell TWSI simple driver
In reply to Rogan DawesFrom: Albert Aribaud <[email protected]>
This driver is for the Marvell TWSI/I2C module found in the orion and kirkwood families among others.
--- drivers/i2c/Makefile | 1 + drivers/i2c/mvtwsi.c | 419 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 420 insertions(+), 0 deletions(-) create mode 100644 drivers/i2c/mvtwsi.c
drivers/i2c/Makefile +1 -0
@@ -30,6 +30,7 @@ COBJS-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o COBJS-$(CONFIG_I2C_KIRKWOOD) += kirkwood_i2c.o COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o +COBJS-$(CONFIG_I2C_DRIVER_MVTWSI) += mvtwsi.o COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += omap24xx_i2c.o
drivers/i2c/mvtwsi.c new file +419 -0
419 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 5/11 I2C: add Marvell TWSI simple driver
Hello rogan at dawes.za.net,
Quoted 17 lines · rogan at dawes.za.net
From: Albert Aribaud <[email protected]>
This driver is for the Marvell TWSI/I2C module found in the orion and kirkwood families among others.
Signed-off-by Albert Aribaud <[email protected]>--- drivers/i2c/Makefile | 1 + drivers/i2c/mvtwsi.c | 419 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 420 insertions(+), 0 deletions(-) create mode 100644 drivers/i2c/mvtwsi.cdrivers/i2c/Makefile +0
-0
drivers/i2c/Makefile COBJS-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o · line 31
Quoted 2 lines
drivers/i2c/Makefile +0
-0@@ -30,6 +30,7 @@ COBJS-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o COBJS-$(CONFIG_I2C_KIRKWOOD) += kirkwood_i2c.o
This patch could not be against current head! There is no more this CONFIG_I2C_KIRKWOOD define. Instead this driver was renamed to mvtwsi.c from Albert Aribaud, see commits:
01ec99d9693929fc56e630c10499b1bfce3e3693
and
306563a773f1111c6beff8d1855d5b2a2137aebd
So, sorry, Nack for this patch. But could you rebase to current head and try the existing driver?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 5/11 I2C: add Marvell TWSI simple driver
Quoted 11 lines · Heiko Schocher
Hello rogan at dawes.za.net,
This patch could not be against current head! There is no more this
CONFIG_I2C_KIRKWOODdefine. Instead this driver was renamed tomvtwsi.cfrom Albert Aribaud, see commits:
01ec99d9693929fc56e630c10499b1bfce3e3693and
Quoted 7 lines
306563a773f1111c6beff8d1855d5b2a2137aebdSo, sorry, Nack for this patch. But could you rebase to current head and try the existing driver?
bye,
Heiko
Hi Heiko,
Sorry, I'm afraid you misunderstood the intention of the posting. My cover letter stated that it was a functional port of U-Boot to the DNS323, based on a (VERY) old starting point, prior to the relocation work. I was posting it to show that I DO have a working port for the DNS323, and to contrast that with the non-working post-relocation port, which I am asking for help with.
Regards,
Rogan
PATCH 5/11 I2C: add Marvell TWSI simple driver
Hello Rogan,
Quoted 20 lines · Rogan Dawes
Quoted 11 lines · Heiko Schocher
Hello rogan at dawes.za.net,
This patch could not be against current head! There is no more this
CONFIG_I2C_KIRKWOODdefine. Instead this driver was renamed tomvtwsi.cfrom Albert Aribaud, see commits:
01ec99d9693929fc56e630c10499b1bfce3e3693and
Quoted 7 lines
306563a773f1111c6beff8d1855d5b2a2137aebdSo, sorry, Nack for this patch. But could you rebase to current head and try the existing driver?
bye,
Heiko
Quoted 8 lines
Hi Heiko,
Sorry, I'm afraid you misunderstood the intention of the posting. My cover letter stated that it was a functional port of U-Boot to the DNS323, based on a (VERY) old starting point, prior to the relocation work. I was posting it to show that I DO have a working port for the DNS323, and to contrast that with the non-working post-relocation port, which I am asking for help with.
Ah, I see.
Sorry I only parsed the i2c patch ;-)
Hmm.. I couldn;t find a config file for your dns323 port, nor an "dns323" or "DNS323" entry in boards.cfg. Which board config file do you use?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 5/11 I2C: add Marvell TWSI simple driver
Quoted 34 lines · Heiko Schocher
Hello Rogan,
Quoted 20 lines · Rogan Dawes
Quoted 11 lines · Heiko Schocher
Hello rogan at dawes.za.net,
This patch could not be against current head! There is no more this
CONFIG_I2C_KIRKWOODdefine. Instead this driver was renamed tomvtwsi.cfrom Albert Aribaud, see commits:
01ec99d9693929fc56e630c10499b1bfce3e3693and
Quoted 7 lines
306563a773f1111c6beff8d1855d5b2a2137aebdSo, sorry, Nack for this patch. But could you rebase to current head and try the existing driver?
bye,
HeikoQuoted 8 lines
Hi Heiko,
Sorry, I'm afraid you misunderstood the intention of the posting. My cover letter stated that it was a functional port of U-Boot to the DNS323, based on a (VERY) old starting point, prior to the relocation work. I was posting it to show that I DO have a working port for the DNS323, and to contrast that with the non-working post-relocation port, which I am asking for help with.
Ah, I see.
Quoted 8 lines
Sorry I only parsed the i2c patch ;-)
Hmm.. I couldn;t find a config file for your dns323 port, nor an "dns323" or "DNS323" entry in boards.cfg. Which board config file do you use?
bye,
Heiko
Introduced in patch 11 of that series, or patch 7 or the "non-working" series.
They've both been held up by the list because they are larger than 100kB. Any moderators around?
Rogan
PATCH 5/11 I2C: add Marvell TWSI simple driver
In reply to Rogan DawesDear Rogan Dawes,
Quoted 2 lines · In message <[email protected]> you wrote:
Sorry, I'm afraid you misunderstood the intention of the posting. My
You made it difficult NOT to misunderstand it.
A posting with "[PATCH]" in the subject _is_ supposed to be apatch against current mainline.
If you post it for other purpoesen, then you must not use "PATCH" in the subject.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Man is the best computer we can put aboard a spacecraft ... and the
only one that can be mass produced with unskilled labor.
-- Wernher von BraunPATCH 6/11 edminiv2: add I2C support using mvtwsi driver
In reply to Rogan DawesFrom: Albert Aribaud <[email protected]>
--- include/configs/edminiv2.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
include/configs/edminiv2.h +9 -0
@@ -182,6 +182,15 @@#endif /* CMD_IDE */ /* +* I2C related stuff +*/ +#define CONFIG_I2C_DRIVER_MVTWSI +#define CONFIG_I2C_MVTWSI_BASE ORION5X_TWSI_BASE +#define CONFIG_SYS_I2C_SLAVE 0x0 +#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_CMD_I2C + +/* * Environment variables configurations */ #define CONFIG_ENV_IS_IN_FLASH 1
Signature · 1 line
1.7.1
PATCH 6/11 edminiv2: add I2C support using mvtwsi driver
Quoted 22 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:35 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 06/11] edminiv2: add I2C support using mvtwsi driverFrom: Albert Aribaud <[email protected]>
Signed-off-by Albert Aribaud <[email protected]>--- include/configs/edminiv2.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)include/configs/edminiv2.h +0
-0
include/configs/edminiv2.h line 191
Quoted 10 lines
include/configs/edminiv2.h +7
-0@@ -182,6 +182,15 @@#endif /* CMD_IDE */ /* +* I2C related stuff +*/ +#define CONFIG_I2C_DRIVER_MVTWSI +#define CONFIG_I2C_MVTWSI_BASE ORION5X_TWSI_BASE +#define CONFIG_SYS_I2C_SLAVE 0x0 +#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_CMD_I2C
Pls defind _CMD_I2C above with other enabled commands and #ifdefed this stuff in it.
Regards..
Prafulla . .
PATCH 6/11 edminiv2: add I2C support using mvtwsi driver
Quoted 35 lines · Prafulla Wadaskar
Quoted 22 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:35 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 06/11] edminiv2: add I2C support using mvtwsi driverFrom: Albert Aribaud <[email protected]>
Signed-off-by Albert Aribaud <[email protected]>--- include/configs/edminiv2.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)include/configs/edminiv2.h +0
-0include/configs/edminiv2.h line 191
Quoted 10 lines
include/configs/edminiv2.h +7
-0@@ -182,6 +182,15 @@#endif /* CMD_IDE */ /* +* I2C related stuff +*/ +#define CONFIG_I2C_DRIVER_MVTWSI +#define CONFIG_I2C_MVTWSI_BASE ORION5X_TWSI_BASE +#define CONFIG_SYS_I2C_SLAVE 0x0 +#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_CMD_I2C Pls defind
_CMD_I2Cabove with other enabled commands and #ifdefed this stuff in it.
Quoted 2 lines
Regards..
Prafulla . .
Hi Prafulla,
I only posted this series to have a record of a working config in the archives. This patch is against 2010.06-something, and is not intended for applying.
Sorry, I should have made it more clear in the individual patches.
Rogan
PATCH 7/11 Allow setting CONFIG_NR_DRAM_BANKS to a larger value
In reply to Rogan DawesFrom: [email protected] <[email protected]>
This allows us to match the exact behaviour of the vendor U-boot in the kernel boot logs
--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- common/memsize.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/dram.c +1 -1
@@ -44,7 +44,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank)u32 enable =0x01 & winregs[bank].size;if ((!enable) || (bank >BANK3 )) -return 0 ; +return -1 ; result = winregs[bank].base;return result;
common/memsize.c +3 -0
@@ -46,6 +46,9 @@ long get_ram_size(volatile long *base, long maxsize)long size;int i =0 ; +if (base ==-1 ) +return 0 ; +for (cnt = (maxsize /sizeof (long )) >>1 ; cnt >0 ; cnt >>=1 ) { addr = base + cnt;/* pointer arith! */ sync ();
Signature · 1 line
1.7.1
PATCH 7/11 Allow setting CONFIG_NR_DRAM_BANKS to a larger value
Dear rogan at dawes.za.net,
Quoted 3 lines · In message <[email protected]> you wrote:
From: rogan at dawes.za.net <[email protected]>
This allows us to match the exact behaviour of the vendor U-boot in the kernel boot logs
Please note that the behaviour of some out of tree port is not exactly a criterion for how U-Boot should behave.
Could you please describe what exactly you consider wrong witrh the current implementation?
common/memsize.c long get_ram_size(volatile long *base, long maxsize) · line 51
Quoted 9 lines
common/memsize.c +3
-0@@ -46,6 +46,9 @@ long get_ram_size(volatile long *base, long maxsize)long size;int i =0 ; +if (base ==-1 ) +return 0 ; +
You should never call get_ram_size() with invalid parameters in the first place.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Operating-system software is the program that orchestrates all the basic functions of a computer. - The Wall Street Journal, Tuesday, September 15, 1987, page 40
PATCH 8/11 DNS323 CFI driver changes (hacks, testing only)
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
--- drivers/mtd/cfi_flash.c | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-)
drivers/mtd/cfi_flash.c +21 -1
@@ -262,6 +262,9 @@ static inline uchar flash_read_uchar (flash_info_t * info, uint offset)uchar *cp;uchar retval; +#if 1 // test-only + offset = offset *2 ; +#endif cp =flash_map (info,0 , offset);#if defined(__LITTLE_ENDIAN) || defined(CONFIG_SYS_WRITE_SWAPPED_DATA ) retval =flash_read8 (cp);
@@ -279,6 +282,9 @@ static inline ushort flash_read_word (flash_info_t * info, uint offset) {ushort *addr, retval; +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info,0 , offset); retval =flash_read16 (addr);flash_unmap (info,0 , offset, addr);
@@ -299,6 +305,9 @@ static ulong flash_read_long (flash_info_t * info, flash_sect_t sect,#ifdef DEBUG int x;#endif +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info, sect, offset);#ifdef DEBUG
@@ -334,6 +343,9 @@ void flash_write_cmd (flash_info_t * info, flash_sect_t sect,void *addr;cfiword_t cword; +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info, sect, offset);flash_make_cmd (info, cmd, &cword);switch (info->portwidth) {
@@ -391,6 +403,9 @@ static int flash_isequal (flash_info_t * info, flash_sect_t sect,cfiword_t cword;int retval; +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info, sect, offset);flash_make_cmd (info, cmd, &cword);
@@ -1728,6 +1743,7 @@ static int __flash_detect_cfi (flash_info_t * info, struct cfi_qry *qry) info->addr_unlock1 =0x555 ; info->addr_unlock2 =0x2aa ; +#if 0 // test-only /* * modify the unlock address if we are * in compatibility mode
@@ -1742,6 +1758,7 @@ static int __flash_detect_cfi (flash_info_t * info, struct cfi_qry *qry) info->addr_unlock1 =0xaaa ; info->addr_unlock2 = 0x555; } +#endif info->name ="CFI conformant" ;return 1 ;
@@ -1907,11 +1924,13 @@ ulong flash_get_size (phys_addr_t base, int banknum)debug ("cfi version is 0x%04x\n" , info->cfi_version); size_ratio = info->portwidth / info->chipwidth; +#if 0 // test-only /* if the chip is x8/x16 reduce the ratio by half */ if ((info->interface ==FLASH_CFI_X8X16 ) && (info->chipwidth ==FLASH_CFI_BY8 )) { size_ratio >>=1 ; } +#endif debug ("size_ratio %d port %d bits chip %d bits\n" , size_ratio, info->portwidth <<CFI_FLASH_SHIFT_WIDTH , info->chipwidth <<CFI_FLASH_SHIFT_WIDTH );
@@ -1985,12 +2004,13 @@ ulong flash_get_size (phys_addr_t base, int banknum)/* round up when converting to ms */ info->write_tout = (tmp +999 ) /1000 ; info->flash_id =FLASH_MAN_CFI ; +#if 0 if ((info->interface ==FLASH_CFI_X8X16 ) && (info->chipwidth ==FLASH_CFI_BY8 )) {/* XXX - Need to test on x8/x16 in parallel. */ info->portwidth >>=1 ; } - +#endif flash_write_cmd (info,0 ,0 , info->cmd_reset); }
Signature · 1 line
1.7.1
PATCH 9/11 Support passing a Marvell-specific ATAG
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
--- arch/arm/include/asm/setup.h | 18 ++++++++++++++++++ arch/arm/lib/bootm.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 0 deletions(-)
arch/arm/include/asm/setup.h +18 -0
@@ -198,6 +198,19 @@ struct tag_acorn {u8 adfsdrives; }; +/* Marvell specific information +* requred for compatability with vendor kernels +*/ +#define ATAG_MV_UBOOT 0x41000403 + +struct tag_mv_uboot { +u32 uboot_version; +u32 tclk; +u32 sysclk; +u32 isUsbHost; +u32 overEthAddr; +}; +/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ #define ATAG_MEMCLK 0x41000402
@@ -227,6 +240,11 @@ struct tag {* DC21285 specific */ struct tag_memclk memclk; + +/* +* Marvell specific +*/ +struct tag_mv_uboot mv_uboot; } u; };
arch/arm/lib/bootm.c +30 -0
@@ -45,6 +45,11 @@ static void setup_commandline_tag (bd_t *bd, char *commandline);static void setup_initrd_tag (bd_t *bd,ulong initrd_start,ulong initrd_end);# endif + +#ifdef CONFIG_MARVELL_TAG +static void setup_marvell_tag (void ); +#endif +static void setup_end_tag (bd_t *bd);static struct tag *params;
@@ -80,6 +85,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ defined (CONFIG_CMDLINE_TAG ) || \ defined (CONFIG_INITRD_TAG ) || \ + defined (CONFIG_MARVELL_TAG ) || \ defined (CONFIG_SERIAL_TAG ) || \ defined (CONFIG_REVISION_TAG )setup_start_tag (bd);
@@ -99,6 +105,9 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *imaif (images->rd_start && images->rd_end)setup_initrd_tag (bd, images->rd_start, images->rd_end);#endif +#ifdef CONFIG_MARVELL_TAG +setup_marvell_tag (); +#endif setup_end_tag (bd);#endif
@@ -232,6 +241,27 @@ void setup_revision_tag(struct tag **in_params) }#endif /* CONFIG_REVISION_TAG */ +#ifdef CONFIG_MARVELL_TAG +#define ATAG_MARVELL 0x41000403 +#define VER_NUM 0x01070300 + +void setup_marvell_tag (void ) { +debug ("Setting up Marvell tag\n" ); + params->hdr.tag =ATAG_MARVELL ; + params->hdr.size =tag_size (tag_mv_uboot); + + params->u.mv_uboot.uboot_version =VER_NUM ; + params->u.mv_uboot.uboot_version |=0xB ;// RD_88F5182_2XSATA + params->u.mv_uboot.tclk =166000000 ; + params->u.mv_uboot.sysclk =166000000 ; + params->u.mv_uboot.isUsbHost =1 ; + params->u.mv_uboot.isUsbHost |=2 ; + + params->u.mv_uboot.overEthAddr =0 ; + + params =tag_next (params); +} +#endif static void setup_end_tag (bd_t *bd) {
Signature · 1 line
1.7.1
PATCH 9/11 Support passing a Marvell-specific ATAG
Dear rogan at dawes.za.net,
Quoted 6 lines · In message <[email protected]> you wrote:
From: Rogan Dawes <[email protected]>
--- arch/arm/include/asm/setup.h | 18 ++++++++++++++++++ arch/arm/lib/bootm.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 0 deletions(-)
...
Quoted 3 lines
+/* Marvell specific information
+ * requred for compatability with vendor kernels
+ */
Incorrect multiline comment style.
arch/arm/include/asm/setup.h struct tag_acorn { · line 212
Quoted 9 lines
arch/arm/include/asm/setup.h +9
-0+#define ATAG_MV_UBOOT 0x41000403 + +struct tag_mv_uboot { +u32 uboot_version; +u32 tclk; +u32 sysclk; +u32 isUsbHost; +u32 overEthAddr; +};
NAK for now. Please resubmit after this ATAG has been accepted to the mainline Linux kernel tree.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Don't put off for tomorrow what you can do today, because if you enjoy it today you can do it again tomorrow.
PATCH 10/11 Copy the ramdisk from flash for the DNS323
In reply to Rogan DawesFrom: [email protected] <[email protected]>
--- common/image.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
common/image.c +2 -2
@@ -949,7 +949,7 @@ int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,return 1 ; } -#if defined(CONFIG_B2 ) || defined(CONFIG_EVB4510 ) || defined(CONFIG_ARMADILLO ) +#if defined(CONFIG_B2 ) || defined(CONFIG_EVB4510 ) || defined(CONFIG_ARMADILLO ) || defined(CONFIG_MACH_DNS323 )/* * We need to copy the ramdisk to SRAM to let Linux boot */
@@ -957,7 +957,7 @@ int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,memmove ((void *)rd_load, (uchar *)rd_data, rd_len); rd_data = rd_load; } -#endif /* CONFIG_B2 || CONFIG_EVB4510 || CONFIG_ARMADILLO */ +#endif /* CONFIG_B2 || CONFIG_EVB4510 || CONFIG_ARMADILLO || CONFIG_MACH_DNS323 */ }else if (images->legacy_hdr_valid &&image_check_type (&images->legacy_hdr_os_copy,IH_TYPE_MULTI )) {
Signature · 1 line
1.7.1
PATCH 10/11 Copy the ramdisk from flash for the DNS323
Dear rogan at dawes.za.net,
Quoted 5 lines · In message <[email protected]> you wrote:
From: rogan at dawes.za.net <[email protected]>
--- common/image.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
This is the wrong approach.
Rather fix the Linux kernel to accept a ramdisk address in NOR flash. See the mailing list archives (both u-boot and linux-arm-kernel) for details.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Quotation, n. The act of repeating erroneously the words of another.
The words erroneously repeated.
- Ambrose Bierce _The Devil's Dictionary_PATCH 10/11 Copy the ramdisk from flash for the DNS323
Quoted 11 lines · Wolfgang Denk
Dear rogan at dawes.za.net,
Quoted 5 lines · In message<[email protected]> you wrote:
From: rogan at dawes.za.net<[email protected]>
--- common/image.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)This is the wrong approach.
Quoted 8 lines
Rather fix the Linux kernel to accept a ramdisk address in NOR flash. See the mailing list archives (both u-boot and linux-arm-kernel) for details.
Best regards,
Wolfgang Denk
Hi Wolfgang,
Thanks for your comments on my patches.
Unfortunately, I seem to have toasted my board properly this time, and will not likely need them in future. I guess I will end up buying a different NAS next time (faster, bigger, cheaper), which will come with a different set of problems.
Thanks for all your help while I learned about U-Boot, JTAG, debugging, contributing, etc.
Regards,
Rogan
[U-Boot] Non-working Relocated DNS323 config
In reply to Rogan DawesThis patch series contains the previous working configuration for the DNS323, forward-ported to mainline, taking into account changes made to the EDMiniV2 configuration on which this is based.
Unfortunately, this does not boot at all. I get:
Marvell>> bootm
## Booting image at 00100000 ...
Image Name: UBoot dns323 Image Type: ARM U-Boot Kernel Image (uncompressed) Data Size: 170100 Bytes = 166.1 kB
Load Address: 03000000
Entry Point: 03000000
Verifying Checksum ... OK
OK
Starting kernel ...
and that is the end of it.
Any hints and suggestions as to what I may be doing wrong are gratefully received.
Regards,
Rogan
[U-Boot] Non-working Relocated DNS323 config
Quoted 20 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:40 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] Non-working Relocated DNS323 configThis patch series contains the previous working configuration for the DNS323, forward-ported to mainline, taking into account changes made to the EDMiniV2 configuration on which this is based.
Unfortunately, this does not boot at all. I get:
Marvell>> bootm
## Booting image at 00100000 ...Image Name: UBoot dns323 Image Type: ARM U-Boot Kernel Image (uncompressed) Data Size: 170100 Bytes = 166.1 kB
Quoted 6 lines
Load Address: 03000000
Entry Point: 03000000
Verifying Checksum ... OK
OKStarting kernel ...
There might be machine id mismatch in the kernel and programmed in u-boot for this board.
Regards..
Prafulla . .
Quoted 14 lines
and that is the end of it.
Any hints and suggestions as to what I may be doing wrong are gratefully received.
Regards,
Rogan
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Non-working Relocated DNS323 config
Quoted 23 lines · Prafulla Wadaskar
Quoted 23 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:40 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] Non-working Relocated DNS323 configThis patch series contains the previous working configuration for the DNS323, forward-ported to mainline, taking into account changes made to the EDMiniV2 configuration on which this is based.
Unfortunately, this does not boot at all. I get:
Marvell>> bootm
## Booting image at 00100000 ...Image Name: UBoot dns323 Image Type: ARM U-Boot Kernel Image (uncompressed) Data Size: 170100 Bytes = 166.1 kBLoad Address: 03000000
Entry Point: 03000000
Verifying Checksum ... OK
OK
Quoted 6 lines
Quoted 1 line
Starting kernel ...
There might be machine id mismatch in the kernel and programmed in u-boot for this board.
Regards..
Prafulla . .
Hi Prafulla,
That log is of me trying to chain load the new U-Boot from the vendor U-Boot. I am not yet ready to try flashing images, because my JTAG adapter has not yet arrived and been proved working :-)
What I was expecting to see after the "Starting kernel ..." was the new U-Boot starting up. Instead, it simply hung.
The "working config" gives me:
Starting kernel ...
U-Boot 2010.06 (Mar 18 2011 - 13:24:33) DNS323B1
SoC: Orion5x MV88F5182-A2 DRAM: 64 MiB Flash: 8 MiB
*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial Net: egiga0
88E1116 Initialized on egiga0
DNS323B1>
The non-working one just hangs.
Regards,
Rogan
PATCH 1/7 Orion5x: Correct DRAM bank detection
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- arch/arm/include/asm/arch-orion5x/orion5x.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/dram.c +1 -1
@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank) {struct orion5x_ddr_addr_decode_registers *winregs = (struct orion5x_ddr_addr_decode_registers *) -ORION5X_CPU_WIN_BASE ; +ORION5X_DRAM_BASE ;u32 result =0 ;u32 enable =0x01 & winregs[bank].size;
arch/arm/include/asm/arch-orion5x/orion5x.h +1 -0
@@ -42,6 +42,7 @@#define ORION5X_REGISTER (x) (ORION5X_REGS_PHY_BASE + x)/* Documented registers */ +#define ORION5X_DRAM_BASE (ORION5X_REGISTER(0x01500))#define ORION5X_TWSI_BASE (ORION5X_REGISTER(0x11000))#define ORION5X_UART0_BASE (ORION5X_REGISTER(0x12000))#define ORION5X_UART1_BASE (ORION5X_REGISTER(0x12100))
Signature · 1 line
1.7.1
PATCH 1/7 Orion5x: Correct DRAM bank detection
Quoted 9 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:40 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 1/7] Orion5x: Correct DRAM bank detection
Some more explanation about the patch may find help full. Please have a practice to provide some detailed comments.
Quoted 13 lines
From: Rogan Dawes <[email protected]>
--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- arch/arm/include/asm/arch-orion5x/orion5x.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)arch/arm/cpu/arm926ejs/orion5x/dram.c +0
-0
arch/arm/cpu/arm926ejs/orion5x/dram.c u32 orion5x_sdram_bar(enum memory_bank bank) · line 41
Quoted 5 lines
arch/arm/cpu/arm926ejs/orion5x/dram.c +1
-1@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank) {struct orion5x_ddr_addr_decode_registers *winregs = (struct orion5x_ddr_addr_decode_registers *) -ORION5X_CPU_WIN_BASE ; +ORION5X_DRAM_BASE ;
Any explanation about previous definition was wrong?
Does struct orion5x_ddr_addr_decode_registers still valid for this change?
Regards..
Prafulla . .
PATCH 1/7 Orion5x: Correct DRAM bank detection
Quoted 10 lines · Prafulla Wadaskar
Quoted 9 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:40 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 1/7] Orion5x: Correct DRAM bank detection
Quoted 2 lines
Some more explanation about the patch may find help full. Please have a practice to provide some detailed comments.
Hi Prafulla,
My apologies.
The register which was being read was the wrong register entirely.
For the common case where there was just one bank, it coincidentally returned the right answer anyway (0), but if we tried to detect multiple banks, the rest were totally wrong.
There is a parallel patch from Michael Spang, which does basically the same thing. See message-id:
AANLkTinpqD97sYeLQKiGnB05PtJHUFUBh=T+Nx1+THau at mail.gmail.com
Regards,
Rogan
PATCH 1/7 Orion5x: Correct DRAM bank detection
In reply to rogan at dawes.za.netQuoted 44 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:40 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 1/7] Orion5x: Correct DRAM bank detectionFrom: Rogan Dawes <[email protected]>
--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- arch/arm/include/asm/arch-orion5x/orion5x.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)arch/arm/cpu/arm926ejs/orion5x/dram.c +1
-1@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank) {struct orion5x_ddr_addr_decode_registers *winregs = (struct orion5x_ddr_addr_decode_registers *) -ORION5X_CPU_WIN_BASE ; +ORION5X_DRAM_BASE ;u32 result =0 ;u32 enable =0x01 & winregs[bank].size;arch/arm/include/asm/arch-orion5x/orion5x.h +1
-1@@ -42,6 +42,7 @@#define ORION5X_REGISTER (x) (ORION5X_REGS_PHY_BASE + x)/* Documented registers */ +#define ORION5X_DRAM_BASE (ORION5X_REGISTER(0x01500))#define ORION5X_TWSI_BASE (ORION5X_REGISTER(0x11000))#define ORION5X_UART0_BASE (ORION5X_REGISTER(0x12000))#define ORION5X_UART1_BASE (ORION5X_REGISTER(0x12100)) --
Quoted 1 line
1.7.1
Applied to u-boot-marvell.git master branch
Regards..
Prafulla . .
PATCH 2/7 IDE: Don't assume there are always two devices per bus
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
Some SATA controllers can operate in an IDE compatible mode (e.g. mvsata) but will only ever have a single device per bus.
This allows the upcoming DNS323 port to properly identify and use a drive on both SATA interfaces.
--- include/ide.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/ide.h +2 -1
@@ -24,7 +24,8 @@#ifndef _IDE_H#define _IDE_H -#define IDE_BUS (dev) (dev >> 1) +#define IDE_BUS (dev) (dev >> ((CONFIG_SYS_IDE_MAXDEVICE / \ + CONFIG_SYS_IDE_MAXBUS) - 1))#define ATA_CURR_BASE (dev) (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
Signature · 1 line
1.7.1
PATCH 3/7 Allow setting CONFIG_NR_DRAM_BANKS to a larger value
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
This allows us to match the exact behaviour of the vendor U-boot in the kernel boot logs
--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- common/memsize.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/dram.c +1 -1
@@ -44,7 +44,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank)u32 enable =0x01 & winregs[bank].size;if ((!enable) || (bank >BANK3 )) -return 0 ; +return -1 ; result = winregs[bank].base;return result;
common/memsize.c +3 -0
@@ -46,6 +46,9 @@ long get_ram_size(volatile long *base, long maxsize)long size;int i =0 ; +if (base ==-1 ) +return 0 ; +for (cnt = (maxsize /sizeof (long )) >>1 ; cnt >0 ; cnt >>=1 ) { addr = base + cnt;/* pointer arith! */ sync ();
Signature · 1 line
1.7.1
PATCH 4/7 DNS323 CFI driver changes (hacks, testing only)
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
--- drivers/mtd/cfi_flash.c | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-)
drivers/mtd/cfi_flash.c +21 -1
@@ -291,6 +291,9 @@ static inline uchar flash_read_uchar (flash_info_t * info, uint offset)uchar *cp;uchar retval; +#if 1 // test-only + offset = offset *2 ; +#endif cp =flash_map (info,0 , offset);#if defined(__LITTLE_ENDIAN) || defined(CONFIG_SYS_WRITE_SWAPPED_DATA ) retval =flash_read8 (cp);
@@ -308,6 +311,9 @@ static inline ushort flash_read_word (flash_info_t * info, uint offset) {ushort *addr, retval; +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info,0 , offset); retval =flash_read16 (addr);flash_unmap (info,0 , offset, addr);
@@ -328,6 +334,9 @@ static ulong flash_read_long (flash_info_t * info, flash_sect_t sect,#ifdef DEBUG int x;#endif +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info, sect, offset);#ifdef DEBUG
@@ -363,6 +372,9 @@ void flash_write_cmd (flash_info_t * info, flash_sect_t sect,void *addr;cfiword_t cword; +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info, sect, offset);flash_make_cmd (info, cmd, &cword);switch (info->portwidth) {
@@ -420,6 +432,9 @@ static int flash_isequal (flash_info_t * info, flash_sect_t sect,cfiword_t cword;int retval; +#if 1 // test-only + offset = offset *2 ; +#endif addr =flash_map (info, sect, offset);flash_make_cmd (info, cmd, &cword);
@@ -1762,6 +1777,7 @@ static int __flash_detect_cfi (flash_info_t * info, struct cfi_qry *qry) info->addr_unlock1 =0x555 ; info->addr_unlock2 =0x2aa ; +#if 0 // test-only /* * modify the unlock address if we are * in compatibility mode
@@ -1776,6 +1792,7 @@ static int __flash_detect_cfi (flash_info_t * info, struct cfi_qry *qry) info->addr_unlock1 =0xaaa ; info->addr_unlock2 = 0x555; } +#endif info->name ="CFI conformant" ;return 1 ;
@@ -1942,11 +1959,13 @@ ulong flash_get_size (phys_addr_t base, int banknum)debug ("cfi version is 0x%04x\n" , info->cfi_version); size_ratio = info->portwidth / info->chipwidth; +#if 0 // test-only /* if the chip is x8/x16 reduce the ratio by half */ if ((info->interface ==FLASH_CFI_X8X16 ) && (info->chipwidth ==FLASH_CFI_BY8 )) { size_ratio >>=1 ; } +#endif debug ("size_ratio %d port %d bits chip %d bits\n" , size_ratio, info->portwidth <<CFI_FLASH_SHIFT_WIDTH , info->chipwidth <<CFI_FLASH_SHIFT_WIDTH );
@@ -2034,12 +2053,13 @@ ulong flash_get_size (phys_addr_t base, int banknum)/* round up when converting to ms */ info->write_tout = (tmp +999 ) /1000 ; info->flash_id =FLASH_MAN_CFI ; +#if 0 if ((info->interface ==FLASH_CFI_X8X16 ) && (info->chipwidth ==FLASH_CFI_BY8 )) {/* XXX - Need to test on x8/x16 in parallel. */ info->portwidth >>=1 ; } - +#endif flash_write_cmd (info,0 ,0 , info->cmd_reset); }
Signature · 1 line
1.7.1
PATCH 5/7 Support passing a Marvell-specific ATAG
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
--- arch/arm/include/asm/setup.h | 18 ++++++++++++++++++ arch/arm/lib/bootm.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 0 deletions(-)
arch/arm/include/asm/setup.h +18 -0
@@ -198,6 +198,19 @@ struct tag_acorn {u8 adfsdrives; }; +/* Marvell specific information +* requred for compatability with vendor kernels +*/ +#define ATAG_MV_UBOOT 0x41000403 + +struct tag_mv_uboot { +u32 uboot_version; +u32 tclk; +u32 sysclk; +u32 isUsbHost; +u32 overEthAddr; +}; +/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ #define ATAG_MEMCLK 0x41000402
@@ -227,6 +240,11 @@ struct tag {* DC21285 specific */ struct tag_memclk memclk; + +/* +* Marvell specific +*/ +struct tag_mv_uboot mv_uboot; } u; };
arch/arm/lib/bootm.c +31 -0
@@ -48,6 +48,11 @@ static void setup_commandline_tag (bd_t *bd, char *commandline);static void setup_initrd_tag (bd_t *bd,ulong initrd_start,ulong initrd_end);# endif + +#ifdef CONFIG_MARVELL_TAG +static void setup_marvell_tag (void ); +#endif +static void setup_end_tag (bd_t *bd);static struct tag *params;
@@ -128,6 +133,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ defined (CONFIG_CMDLINE_TAG ) || \ defined (CONFIG_INITRD_TAG ) || \ + defined (CONFIG_MARVELL_TAG ) || \ defined (CONFIG_SERIAL_TAG ) || \ defined (CONFIG_REVISION_TAG )setup_start_tag (bd);
@@ -147,6 +153,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)if (images->rd_start && images->rd_end)setup_initrd_tag (bd, images->rd_start, images->rd_end);#endif +#ifdef CONFIG_MARVELL_TAG +setup_marvell_tag (); +#endif setup_end_tag (bd);#endif
@@ -327,6 +336,28 @@ void setup_revision_tag(struct tag **in_params) }#endif /* CONFIG_REVISION_TAG */ +#ifdef CONFIG_MARVELL_TAG +#define ATAG_MARVELL 0x41000403 +#define VER_NUM 0x01070300 + +void setup_marvell_tag (void ) { +debug ("Setting up Marvell tag\n" ); + params->hdr.tag =ATAG_MARVELL ; + params->hdr.size =tag_size (tag_mv_uboot); + + params->u.mv_uboot.uboot_version =VER_NUM ; + params->u.mv_uboot.uboot_version |=0xB ;// RD_88F5182_2XSATA + params->u.mv_uboot.tclk =166000000 ; + params->u.mv_uboot.sysclk =166000000 ; + params->u.mv_uboot.isUsbHost =1 ; + params->u.mv_uboot.isUsbHost |=2 ; + + params->u.mv_uboot.overEthAddr =0 ; + + params =tag_next (params); +} +#endif +static void setup_end_tag (bd_t *bd) { params->hdr.tag =ATAG_NONE ;
Signature · 1 line
1.7.1
PATCH 5/7 Support passing a Marvell-specific ATAG
Quoted 21 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of rogan at dawes.za.net
Sent: Friday, March 18, 2011 1:40 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 5/7] Support passing a Marvell-specific ATAGFrom: Rogan Dawes <[email protected]>
--- arch/arm/include/asm/setup.h | 18 ++++++++++++++++++ arch/arm/lib/bootm.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 0 deletions(-)arch/arm/include/asm/setup.h +0
-0
arch/arm/include/asm/setup.h struct tag_acorn { · line 204
Quoted 7 lines
arch/arm/include/asm/setup.h +4
-0@@ -198,6 +198,19 @@ struct tag_acorn {u8 adfsdrives; }; +/* Marvell specific information +* requred for compatability with vendor kernels +*/ +#define ATAG_MV_UBOOT 0x41000403
What is a need for this ATAG?
Open source Linux Kernel does not have any implementation to support this ATAG. Nor u-boot have any vendor specific ATAGs
NACK, if this is specific to support any custom implementation.
Regards..
Prafulla . .
PATCH 5/7 Support passing a Marvell-specific ATAG
Quoted 10 lines · Prafulla Wadaskar
arch/arm/include/asm/setup.h struct tag_acorn { · line 204
Quoted 5 lines
arch/arm/include/asm/setup.h +4
-0+/* Marvell specific information +* requred for compatability with vendor kernels +*/ +#define ATAG_MV_UBOOT 0x41000403What is a need for this ATAG?
Open source Linux Kernel does not have any implementation to support this ATAG. Nor u-boot have any vendor specific ATAGs
Quoted 4 lines
NACK, if this is specific to support any custom implementation.
Regards..
Prafulla . .
Hi Prafulla,
I was simply trying to mirror what the vendor U-Boot was passing to the vendor kernel flashed on the device. My theory was that by comparing the boot logs of the vendor U-Boot and vendor kernel, with the boot logs of custom U-Boot and vendor kernel, I could make sure that my custom U-Boot was doing the right thing. Including this ATAG allowed my to obtain identical kernel boot logs.
That said, I'm happy to leave this portion out if it is not acceptable. Especially if mainline kernel doesn't recognise that ATAG anyway.
Regards,
Rogan
PATCH 6/7 Copy the ramdisk from flash for the DNS323
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
--- common/image.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
common/image.c +2 -2
@@ -950,7 +950,7 @@ int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,return 1 ; } -#if defined(CONFIG_B2 ) || defined(CONFIG_EVB4510 ) || defined(CONFIG_ARMADILLO ) +#if defined(CONFIG_B2 ) || defined(CONFIG_EVB4510 ) || defined(CONFIG_ARMADILLO ) || defined(CONFIG_MACH_DNS323 )/* * We need to copy the ramdisk to SRAM to let Linux boot */
@@ -958,7 +958,7 @@ int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,memmove ((void *)rd_load, (uchar *)rd_data, rd_len); rd_data = rd_load; } -#endif /* CONFIG_B2 || CONFIG_EVB4510 || CONFIG_ARMADILLO */ +#endif /* CONFIG_B2 || CONFIG_EVB4510 || CONFIG_ARMADILLO || CONFIG_MACH_DNS323 */ }else if (images->legacy_hdr_valid &&image_check_type (&images->legacy_hdr_os_copy,IH_TYPE_MULTI )) {
Signature · 1 line
1.7.1
PATCH 11/11 DNS323 configuration
In reply to Rogan DawesFrom: Rogan Dawes <rogan@rogan-desktop.(none)>
Based on that of the edminiv2, with a few additions
The image is configured to boot vendor kernels seamlessly. i.e. the kernel boot logs should be identical between the vendor bootloader and this mainline version.
Note that the vendor flash layout does not allow space for saving environment variables. All env variables are compiled in to the vendor bootloader, and saveenv is not provided.
According to the flash layout, the smallest segments are at the start of the flash chip, which conflicts with mtd0, used to save the NAS configuration by the vendor firmware. Consequently, if you intend to keep the vendor firmware, do not save any additional environment variables, or change existing ones.
GPIO pins are not configured, as they do not match the layout for the EDMiniv2. That configuration causes the kernel to shutdown, as it detects that the power button is pressed.
--- board/D-Link/dns323_b1/Makefile | 53 +++++++ board/D-Link/dns323_b1/config.mk | 27 ++++ board/D-Link/dns323_b1/dns323_b1.c | 78 +++++++++++ board/D-Link/dns323_b1/dns323_b1.h | 41 ++++++ boards.cfg | 1 + include/configs/dns323_b1.h | 265 ++++++++++++++++++++++++++++++++++++ 6 files changed, 465 insertions(+), 0 deletions(-) create mode 100644 board/D-Link/dns323_b1/Makefile create mode 100644 board/D-Link/dns323_b1/config.mk create mode 100644 board/D-Link/dns323_b1/dns323_b1.c create mode 100644 board/D-Link/dns323_b1/dns323_b1.h create mode 100644 include/configs/dns323_b1.h
board/D-Link/dns323_b1/Makefile new file +53 -0
@@ -0,0 +1,53 @@ +# +# Copyright (C) 2010 Albert ARIBAUD <[email protected]> +# +# Based on original Kirkwood support which is +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS := dns323_b1.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/D-Link/dns323_b1/config.mk new file +27 -0
@@ -0,0 +1,27 @@ +# +# Copyright (C) 2010 Albert ARIBAUD <[email protected]> +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +TEXT_BASE = 0x03000000
board/D-Link/dns323_b1/dns323_b1.c new file +78 -0
78 lines not on this page · raw message
board/D-Link/dns323_b1/dns323_b1.h new file +41 -0
41 lines not on this page · raw message
boards.cfg +1 -0
@@ -253,6 +253,7 @@ sheevaplug arm arm926ejs - Marvell kirkwood imx27lite arm arm926ejs imx27lite logicpd mx27 magnesium arm arm926ejs imx27lite logicpd mx27 omap5912osk arm arm926ejs - ti omap +dns323_b1 arm arm926ejs - D-Link orion5x edminiv2 arm arm926ejs - LaCie orion5x omap3_overo arm armv7 overo - omap3 omap3_pandora arm armv7 pandora - omap3
include/configs/dns323_b1.h new file +265 -0
265 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 7/7 DNS323 configuration
In reply to Rogan DawesFrom: Rogan Dawes <[email protected]>
Based on that of the edminiv2, with a few additions
The image is configured to boot vendor kernels seamlessly. i.e. the kernel boot logs should be identical between the vendor bootloader and this mainline version.
Note that the vendor flash layout does not allow space for saving environment variables. All env variables are compiled in to the vendor bootloader, and saveenv is not provided.
According to the flash layout, the smallest segments are at the start of the flash chip, which conflicts with mtd0, used to save the NAS configuration by the vendor firmware. Consequently, if you intend to keep the vendor firmware, do not save any additional environment variables, or change existing ones.
GPIO pins are not configured, as they do not match the layout for the EDMiniv2. That configuration causes the kernel to shutdown, as it detects that the power button is pressed.
--- board/D-Link/dns323_b1/Makefile | 53 +++++++ board/D-Link/dns323_b1/config.mk | 28 ++++ board/D-Link/dns323_b1/dns323_b1.c | 78 +++++++++++ board/D-Link/dns323_b1/dns323_b1.h | 41 ++++++ boards.cfg | 1 + include/configs/dns323_b1.h | 270 ++++++++++++++++++++++++++++++++++++ 6 files changed, 471 insertions(+), 0 deletions(-) create mode 100644 board/D-Link/dns323_b1/Makefile create mode 100644 board/D-Link/dns323_b1/config.mk create mode 100644 board/D-Link/dns323_b1/dns323_b1.c create mode 100644 board/D-Link/dns323_b1/dns323_b1.h create mode 100644 include/configs/dns323_b1.h
board/D-Link/dns323_b1/Makefile new file +53 -0
@@ -0,0 +1,53 @@ +# +# Copyright (C) 2010 Albert ARIBAUD <[email protected]> +# +# Based on original Kirkwood support which is +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := dns323_b1.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/D-Link/dns323_b1/config.mk new file +28 -0
@@ -0,0 +1,28 @@ +# +# Copyright (C) 2010 Albert ARIBAUD <[email protected]> +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +# TEXT_BASE must equal the intended FLASH location of u-boot. +CONFIG_SYS_TEXT_BASE = 0xfffd0000
board/D-Link/dns323_b1/dns323_b1.c new file +78 -0
78 lines not on this page · raw message
board/D-Link/dns323_b1/dns323_b1.h new file +41 -0
41 lines not on this page · raw message
boards.cfg +1 -0
@@ -104,6 +104,7 @@ jadecpu arm arm926ejs jadecpu syteco imx27lite arm arm926ejs imx27lite logicpd mx27 magnesium arm arm926ejs imx27lite logicpd mx27 omap5912osk arm arm926ejs - ti omap +dns323_b1 arm arm926ejs - D-Link orion5x edminiv2 arm arm926ejs - LaCie orion5x dkb arm arm926ejs - Marvell pantheon ca9x4_ct_vxp arm armv7 vexpress armltd
include/configs/dns323_b1.h new file +270 -0
270 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 7/7 DNS323 configuration
Hello Rogan,
Quoted 3 lines · rogan at dawes.za.net
From: Rogan Dawes <[email protected]>
Based on that of the edminiv2, with a few additions
[...]
Quoted 34 lines
board/D-Link/dns323_b1/config.mk new file +28
-0@@ -0,0 +1,28 @@ +# +# Copyright (C) 2010 Albert ARIBAUD <[email protected]> +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +# TEXT_BASE must equal the intended FLASH location of u-boot. +CONFIG_SYS_TEXT_BASE = 0xfffd0000
Quoted 7 lines · You also
Unfortunately, this does not boot at all. I get:
Marvell>> bootm
## Booting image at 00100000 ...Image Name: UBoot dns323 Image Type: ARM U-Boot Kernel Image (uncompressed) Data Size: 170100 Bytes = 166.1 kB
Quoted 6 lines
Load Address: 03000000
Entry Point: 03000000
Verifying Checksum ... OK
OKStarting kernel ...
With relocation, you must set TEXT_BASE to the value you start the image, so please try to set TEXT_BASE = load_addr.
Also, if you do a ram image, don;t forget that with relocation the u-boot image gets relocated to the end of ram, so don;t choose a TEXT_BASE near the end of ram.
If that not helps, you maybe need a debugger ...
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 7/7 DNS323 configuration
Quoted 15 lines · Heiko Schocher
Quoted 11 lines
Marvell>> bootm
## Booting image at 00100000 ...Image Name: UBoot dns323 Image Type: ARM U-Boot Kernel Image (uncompressed) Data Size: 170100 Bytes = 166.1 kBLoad Address: 03000000
Entry Point: 03000000
Verifying Checksum ... OK
OKStarting kernel ...
With relocation, you must set
TEXT_BASEto the value you start the image, so please try to setTEXT_BASE=load_addr.
Quoted 8 lines
Also, if you do a ram image, don;t forget that with relocation the u-boot image gets relocated to the end of ram, so don;t choose a
TEXT_BASEnear the end of ram.If that not helps, you maybe need a debugger ...
bye,
Heiko
Hi Heiko,
I did see that, and thought it might have something to do with it. I also tried building a version with the TEXT_BASE at 0x100000, but had exactly the same result.
It sounds like a debugger will be my only option. Fortunately, I should be getting a Segger J-Link JTAG adapter on Tuesday, and then maybe I can figure out what is going on.
Regards,
Rogan
PATCH 7/7 DNS323 configuration
Quoted 32 lines · Rogan Dawes
Quoted 15 lines · Heiko Schocher
Quoted 11 lines
Marvell>> bootm
## Booting image at 00100000 ...Image Name: UBoot dns323 Image Type: ARM U-Boot Kernel Image (uncompressed) Data Size: 170100 Bytes = 166.1 kBLoad Address: 03000000
Entry Point: 03000000
Verifying Checksum ... OK
OKStarting kernel ...
With relocation, you must set
TEXT_BASEto the value you start the image, so please try to setTEXT_BASE=load_addr.Quoted 8 lines
Also, if you do a ram image, don;t forget that with relocation the u-boot image gets relocated to the end of ram, so don;t choose a
TEXT_BASEnear the end of ram.If that not helps, you maybe need a debugger ...
bye,
HeikoHi Heiko,
I did see that, and thought it might have something to do with it. I also tried building a version with the
TEXT_BASEat0x100000, but had exactly the same result.
Quoted 7 lines
It sounds like a debugger will be my only option. Fortunately, I should be getting a Segger J-Link JTAG adapter on Tuesday, and then maybe I can figure out what is going on.
Regards,
Rogan
Hi Heiko,
It is clear now that I *am* an idiot.
I was loading the uImage to 0x100000, but the uImage was configured to be copied to 0x3000000 before being started by the vendor u-boot.
Setting TEXT_BASE to 0x3000000 allowed me to start my chainloaded "on top of master" u-boot.
Now all I need is to figure out the right way to patch the CFI code to handle my 8-bit/16-bit configuration, and I should be ready to submit a working configuration.
Thanks for your help.
Rogan
Heiko Schocher
NAKPATCH 7/7 DNS323 configuration
Hello Rogan,
Quoted 35 lines · Rogan Dawes
Quoted 34 lines · Rogan Dawes
Quoted 14 lines · Heiko Schocher
Quoted 11 lines
Marvell>> bootm
## Booting image at 00100000 ...Image Name: UBoot dns323 Image Type: ARM U-Boot Kernel Image (uncompressed) Data Size: 170100 Bytes = 166.1 kBLoad Address: 03000000
Entry Point: 03000000
Verifying Checksum ... OK
OKStarting kernel ...
With relocation, you must set
TEXT_BASEto the value you start the image, so please try to setTEXT_BASE=load_addr.Quoted 8 lines
Also, if you do a ram image, don;t forget that with relocation the u-boot image gets relocated to the end of ram, so don;t choose a
TEXT_BASEnear the end of ram.If that not helps, you maybe need a debugger ...
bye,
HeikoHi Heiko,
I did see that, and thought it might have something to do with it. I also tried building a version with the
TEXT_BASEat0x100000, but had exactly the same result.It sounds like a debugger will be my only option. Fortunately, I should be getting a Segger J-Link JTAG adapter on Tuesday, and then maybe I can figure out what is going on.
Quoted 7 lines
Quoted 3 lines
Regards,
Rogan
Hi Heiko,
It is clear now that I *am* an idiot.
Nack.
Quoted 2 lines
I was loading the uImage to
0x100000, but the uImage was configured to be copied to0x3000000before being started by the vendor u-boot.
Ok.
Quoted 2 lines
Setting
TEXT_BASEto0x3000000allowed me to start my chainloaded "on top of master" u-boot.
:-) Great!
Quoted 3 lines
Now all I need is to figure out the right way to patch the CFI code to handle my 8-bit/16-bit configuration, and I should be ready to submit a working configuration.
Ok, thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[U-Boot] how does Linux call the function from u-boot?
In reply to Rogan Dawes[U-Boot] how does Linux call the function from u-boot?
Dear "sywang",
Quoted 2 lines · In message <E20D124831AF42E094DEFD4F59B45E9E@sywangPC> you wrote:
how does Linux call the function from u-boot?
Simply: it does not.
When Linux starts running, U-Boot is gone and dead; nothing of it survives the boot of Linux except for the parameters passed to the Linux kernel.
Linux has no idea which boot loader has been used to start it, nor can Linux call any functions from the boot loader.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Punishment becomes ineffective after a certain point. Men become in- sensitive. -- Eneg, "Patterns of Force", stardate 2534.7
[U-Boot] how does Linux call the function from u-boot?
Thanks for your reply very much.
In my scenario, I want to write the panic info into the flash, but the panic is caused by interrupt routine, I cannot access the flash, so I think that if the flash-write function from u-boot can be called, the issue should be resolved.
Any other comments?
Thanks!
Shuyou
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: 2011?3?31? 18:01
To: sywang
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] how does Linux call the function from u-boot?
Dear "sywang",
Quoted 2 lines · In message <E20D124831AF42E094DEFD4F59B45E9E@sywangPC> you wrote:
how does Linux call the function from u-boot?
Simply: it does not.
When Linux starts running, U-Boot is gone and dead; nothing of it survives the boot of Linux except for the parameters passed to the Linux kernel.
Linux has no idea which boot loader has been used to start it, nor can Linux call any functions from the boot loader.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Punishment becomes ineffective after a certain point. Men become in- sensitive. -- Eneg, "Patterns of Force", stardate 2534.7
[U-Boot] how does Linux call the function from u-boot?
Dear "sywang",
Quoted 2 lines · In message <E1A60D3A6B5245C9B642C3CC81EACF61@sywangPC> you wrote:
In my scenario, I want to write the panic info into the flash, but the panic
If the system panics, you must not assume that there is any working code left that is capable of writing to flash memory.
Quoted 3 lines
is caused by interrupt routine, I cannot access the flash, so I think that if the flash-write function from u-boot can be called, the issue should be resolved.
I told you before that there is no U-Boot code available anywhere once Linux started execution.
You may look into the shared log buffer feature - if Linux dumps it's log messages into it's log buffer, this information can be picked up by U-Boot from there, and even passed on to the next booting Linux kernel.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Forty two.