[U-Boot] [PATCH 1/4] microblaze: Set up relocation is done

From: Michal Simek monstr@monstr.eu
Signed-off-by: Michal Simek monstr@monstr.eu --- lib_microblaze/board.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib_microblaze/board.c b/lib_microblaze/board.c index cd61918..0e35734 100644 --- a/lib_microblaze/board.c +++ b/lib_microblaze/board.c @@ -119,6 +119,7 @@ void board_init (void) bd->bi_baudrate = CONFIG_BAUDRATE; bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; + gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
/* Initialise malloc() area */ mem_malloc_init ();

From: Michal Simek monstr@monstr.eu
Signed-off-by: Michal Simek monstr@monstr.eu --- common/image.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/common/image.c b/common/image.c index 866edf6..1459024 100644 --- a/common/image.c +++ b/common/image.c @@ -982,7 +982,8 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, return 0; }
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) +#if defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_PPC) \ + || defined(CONFIG_SPARC) /** * boot_ramdisk_high - relocate init ramdisk * @lmb: pointer to lmb handle, will be used for memory mgmt

From: Michal Simek monstr@monstr.eu
Signed-off-by: Michal Simek monstr@monstr.eu --- include/configs/ml401.h | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/include/configs/ml401.h b/include/configs/ml401.h index 63d07ff..b31c4b5 100644 --- a/include/configs/ml401.h +++ b/include/configs/ml401.h @@ -37,17 +37,20 @@ #define CONFIG_SERIAL_BASE XILINX_UARTLITE_BASEADDR #define CONFIG_BAUDRATE XILINX_UARTLITE_BAUDRATE #define CONFIG_SYS_BAUDRATE_TABLE { CONFIG_BAUDRATE } -#else -#ifdef XILINX_UART16550_BASEADDR -#define CONFIG_SYS_NS16550 +#elif XILINX_UART16550_BASEADDR +#define CONFIG_SYS_NS16550 1 #define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE 4 +#define CONFIG_SYS_NS16550_REG_SIZE -4 #define CONFIG_CONS_INDEX 1 -#define CONFIG_SYS_NS16550_COM1 XILINX_UART16550_BASEADDR +#define CONFIG_SYS_NS16550_COM1 (XILINX_UART16550_BASEADDR + 0x1000 + 0x3) #define CONFIG_SYS_NS16550_CLK XILINX_UART16550_CLOCK_HZ #define CONFIG_BAUDRATE 115200 -#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 115200 } -#endif + +/* The following table includes the supported baudrates */ +#define CONFIG_SYS_BAUDRATE_TABLE \ + {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} +#else +#error Undefined uart #endif
/* setting reset address */

From: Michal Simek monstr@monstr.eu
Signed-off-by: Michal Simek monstr@monstr.eu --- include/configs/ml401.h | 8 ++++++++ include/configs/suzaku.h | 9 +++++++++ include/configs/xupv2p.h | 8 ++++++++ 3 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/include/configs/ml401.h b/include/configs/ml401.h index b31c4b5..f4dbf5d 100644 --- a/include/configs/ml401.h +++ b/include/configs/ml401.h @@ -279,4 +279,12 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_OF_LIBFDT 1
+/*----------------------------------------------------------------------- + * For booting Linux, the board info and command line data + * have to be in the first 8 MB of memory, since this is + * the maximum mapped by the Linux kernel during initialization. + */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ +#define CONFIG_SYS_BARGSIZE 256 /* Boot Argument Buffer Size */ + #endif /* __CONFIG_H */ diff --git a/include/configs/suzaku.h b/include/configs/suzaku.h index b702de0..b7e5515 100644 --- a/include/configs/suzaku.h +++ b/include/configs/suzaku.h @@ -107,4 +107,13 @@ #define XILINX_CLOCK_FREQ 50000000 #define CONFIG_XILINX_CLOCK_FREQ XILINX_CLOCK_FREQ
+/*----------------------------------------------------------------------- + * For booting Linux, the board info and command line data + * have to be in the first 8 MB of memory, since this is + * the maximum mapped by the Linux kernel during initialization. + */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ +#define CONFIG_SYS_BARGSIZE 256 /* Boot Argument Buffer Size */ + + #endif /* __CONFIG_H */ diff --git a/include/configs/xupv2p.h b/include/configs/xupv2p.h index 6a92703..4e406fb 100644 --- a/include/configs/xupv2p.h +++ b/include/configs/xupv2p.h @@ -224,4 +224,12 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_OF_LIBFDT 1 /* flat device tree */
+/*----------------------------------------------------------------------- + * For booting Linux, the board info and command line data + * have to be in the first 8 MB of memory, since this is + * the maximum mapped by the Linux kernel during initialization. + */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ +#define CONFIG_SYS_BARGSIZE 256 /* Boot Argument Buffer Size */ + #endif /* __CONFIG_H */

Dear Michal,
In message 3ef2f793487258a2c06115525afc08e63dd3a222.1227524159.git.monstr@monstr.eu you wrote:
From: Michal Simek monstr@monstr.eu
Signed-off-by: Michal Simek monstr@monstr.eu
common/image.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/common/image.c b/common/image.c index 866edf6..1459024 100644 --- a/common/image.c +++ b/common/image.c @@ -982,7 +982,8 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, return 0; }
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) +#if defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_PPC) \
- || defined(CONFIG_SPARC)
/**
- boot_ramdisk_high - relocate init ramdisk
- @lmb: pointer to lmb handle, will be used for memory mgmt
I reject this patch.
I know this is not your fault - you just add to existing code. But the existing code is wrong, and we should not add even more bad code (and rather fix the current, incorrect one).
The thing is that the code we are #ifdef'ing here depends on a *feature* (FDT boot support), and thus can be selected on a board level. It is *not* an architecture thing, so it is incorrect to enable or disable it depending on the current arch settings.
Best regards,
Wolfgang Denk

Hi Wolfgang,
Dear Michal,
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) +#if defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_PPC) \
- || defined(CONFIG_SPARC)
/**
- boot_ramdisk_high - relocate init ramdisk
- @lmb: pointer to lmb handle, will be used for memory mgmt
I reject this patch.
I know this is not your fault - you just add to existing code. But the existing code is wrong, and we should not add even more bad code (and rather fix the current, incorrect one).
The thing is that the code we are #ifdef'ing here depends on a *feature* (FDT boot support), and thus can be selected on a board level. It is *not* an architecture thing, so it is incorrect to enable or disable it depending on the current arch settings.
I understand. When will be remove this part of code? Because without any fix all Microblaze boards can't be successfully compiled.
Thanks, Michal
Best regards,
Wolfgang Denk

On 13:57 Mon 24 Nov , Michal Simek wrote:
Hi Wolfgang,
Dear Michal,
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) +#if defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_PPC) \
- || defined(CONFIG_SPARC)
/**
- boot_ramdisk_high - relocate init ramdisk
- @lmb: pointer to lmb handle, will be used for memory mgmt
I reject this patch.
I know this is not your fault - you just add to existing code. But the existing code is wrong, and we should not add even more bad code (and rather fix the current, incorrect one).
The thing is that the code we are #ifdef'ing here depends on a *feature* (FDT boot support), and thus can be selected on a board level. It is *not* an architecture thing, so it is incorrect to enable or disable it depending on the current arch settings.
I understand. When will be remove this part of code? Because without any fix all Microblaze boards can't be successfully compiled.
try my patch
[PATCH V3] Fix FIT and fdt blob support to have CONFIG_OF_LIBFDT and CONFIG_FIT independant
Best Regards, J.

Hi Jean-Christophe,
Hi Wolfgang,
Dear Michal,
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) +#if defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_PPC) \
- || defined(CONFIG_SPARC)
/**
- boot_ramdisk_high - relocate init ramdisk
- @lmb: pointer to lmb handle, will be used for memory mgmt
I reject this patch.
I know this is not your fault - you just add to existing code. But the existing code is wrong, and we should not add even more bad code (and rather fix the current, incorrect one).
The thing is that the code we are #ifdef'ing here depends on a *feature* (FDT boot support), and thus can be selected on a board level. It is *not* an architecture thing, so it is incorrect to enable or disable it depending on the current arch settings.
I understand. When will be remove this part of code? Because without any fix all Microblaze boards can't be successfully compiled.
try my patch
[PATCH V3] Fix FIT and fdt blob support to have CONFIG_OF_LIBFDT and CONFIG_FIT independant
I'll disable FDT support in all MB boards. This is straight forward to me. Microblaze FDT support for bootm command is not there yet. I have it in my internal repo.
Thanks, Michal
Best Regards, J. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
participants (5)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Michal Simek
-
Michal Simek
-
monstr@seznam.cz
-
Wolfgang Denk