Re: [U-Boot] [STATUS] Heads-up: Reorganize directory structure
Graeme, I reply to your messages since it gives somehow more information. I'm now not really convinced that reorganizing board directories would be a big step forward, although I still think it would be better. Si, I'm not arguing strongly, just bringing a point of view. Peter, Wolfgang, I'll try to do my homework and show how nhk8815/usb-s8815 would better share files when under cpu/, but I'm not sure to be able to complete it before a week or so. Graeme Russ: Almost - it is more like board/ $VENDOR/ include/ common/ lib(?)/ etc../ $BOARDA/ $BOARDB/ I really like this structure, particularly if the code under $VENDOR/[common, include, lib] is arch independent. Yes, that would be good, if it was a common case. However, arch-independent code is usually under drivers. See at91 and avr32 for example: no common code under board/atmel/ . Even boards/freescale, which has three architectures, has only MPC stuff in common/ (no arm or coldfire files, checked by extracting the CONFIG_ symbols from Makefile and grepping for them in include/configs) If a vendor develops a new board using a different CPU or SOC they can easily re-use all their pre-existing platform independent code for the new board. In theory you are correct. In practice, such platform independent material is using drivers/ . And then there is also board/ $BOARDC $BOARDD I've never liked code existing on multiple depths like this. Agreed. Maybe we move towards: board/ $VENDOR include/ lib/ $BOARDA/ $BOARDB/ $cpu_generic/ $BOARDC/ $BOARDD/ That's an option. But $cpu_generic is inferior to cpu-$cpu. At least listing will all cpu- directories nearby. If there really was vendor-specific cross-platform code, I agree something like you suggest is best. /alessandro ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Move arch/ppc to arch/powerpc
Because of the size of this patch (approx. 350k), here the link to it: http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Move-arch-ppc-to-arch-powerpc.patch And here the patch description and statistics: [PATCH] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. Signed-off-by: Stefan Roese s...@denx.de Cc: Peter Tyser pty...@xes-inc.com Cc: Detlev Zundel d...@denx.de --- MAKEALL|8 +- Makefile | 606 ++-- README | 16 +- api/{api_platform-ppc.c = api_platform-powerpc.c} |0 arch/{ppc = powerpc}/config.mk|0 arch/{ppc = powerpc}/cpu/74xx_7xx/Makefile|0 arch/{ppc = powerpc}/cpu/74xx_7xx/cache.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/config.mk |0 arch/{ppc = powerpc}/cpu/74xx_7xx/cpu.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/cpu_init.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/interrupts.c|0 arch/{ppc = powerpc}/cpu/74xx_7xx/io.S|0 arch/{ppc = powerpc}/cpu/74xx_7xx/kgdb.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/speed.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/start.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/traps.c |2 +- arch/{ppc = powerpc}/cpu/mpc512x/Makefile |0 arch/{ppc = powerpc}/cpu/mpc512x/asm-offsets.h|2 +- arch/{ppc = powerpc}/cpu/mpc512x/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc512x/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc512x/cpu_init.c |0 arch/{ppc = powerpc}/cpu/mpc512x/diu.c|0 arch/{ppc = powerpc}/cpu/mpc512x/fixed_sdram.c|0 arch/{ppc = powerpc}/cpu/mpc512x/i2c.c|0 arch/{ppc = powerpc}/cpu/mpc512x/ide.c|0 arch/{ppc = powerpc}/cpu/mpc512x/iim.c|0 arch/{ppc = powerpc}/cpu/mpc512x/interrupts.c |0 arch/{ppc = powerpc}/cpu/mpc512x/iopin.c |0 arch/{ppc = powerpc}/cpu/mpc512x/pci.c|0 arch/{ppc = powerpc}/cpu/mpc512x/serial.c |0 arch/{ppc = powerpc}/cpu/mpc512x/speed.c |0 arch/{ppc = powerpc}/cpu/mpc512x/start.S |0 arch/{ppc = powerpc}/cpu/mpc512x/traps.c |0 arch/{ppc = powerpc}/cpu/mpc512x/u-boot.lds |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/Makefile |4 +- arch/{ppc = powerpc}/cpu/mpc5xx/config.mk |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/cpu.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/cpu_init.c|0 arch/{ppc = powerpc}/cpu/mpc5xx/interrupts.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/serial.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/speed.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/spi.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/start.S |0 arch/{ppc = powerpc}/cpu/mpc5xx/traps.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/u-boot.lds|2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/Makefile |0 arch/{ppc = powerpc}/cpu/mpc5xxx/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/cpu_init.c |0 .../cpu/mpc5xxx/firmware_sc_task_bestcomm.impl.S |0 arch/{ppc = powerpc}/cpu/mpc5xxx/i2c.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/ide.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/interrupts.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/io.S |0 arch/{ppc = powerpc}/cpu/mpc5xxx/loadtask.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/pci_mpc5200.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/serial.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/speed.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/start.S |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/traps.c |2 +- .../cpu/mpc5xxx/u-boot-customlayout.lds|8 +- arch/{ppc = powerpc}/cpu/mpc5xxx/u-boot.lds |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/usb.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/usb_ohci.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/usb_ohci.h |0 arch/{ppc = powerpc}/cpu/mpc8220/Makefile |0 arch/{ppc = powerpc}/cpu/mpc8220/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc8220/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc8220/cpu_init.c |0 arch/{ppc = powerpc}/cpu/mpc8220/dma.h|0 arch/{ppc = powerpc}/cpu/mpc8220/dramSetup.c |0 arch/{ppc = powerpc}/cpu/mpc8220/dramSetup.h |0 arch/{ppc = powerpc}/cpu/mpc8220/fec.c|0 arch/{ppc = powerpc}/cpu/mpc8220/fec.h|0 arch/{ppc =
Re: [U-Boot] [PATCH] Move arch/ppc to arch/powerpc
Dear Stefan Roese, In message 201004160921.44401...@denx.de you wrote: Because of the size of this patch (approx. 350k), here the link to it: http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Move-arch-ppc-to-arch-powerpc.patch And here the patch description and statistics: [PATCH] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. Can we please keep ppc as alias for the new powerpc entry in MAKEALL, so that old scripts don't break we can adapt these when it is convenient? Except for that: Acked-by: Wolfgang Denk w...@denx.de Best regards, Wolfgang Denk -- 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: w...@denx.de Hi there! This is just a note from me, to you, to tell you, the per- son reading this note, that I can't think up any more famous quotes, jokes, nor bizarre stories, so you may as well go home. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Move arch/ppc to arch/powerpc
Hi Wolfgang, On Friday 16 April 2010 09:33:06 Wolfgang Denk wrote: [PATCH] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. Can we please keep ppc as alias for the new powerpc entry in MAKEALL, so that old scripts don't break we can adapt these when it is convenient? OK, I'll send an updated patch version soon. Except for that: Acked-by: Wolfgang Denk w...@denx.de Thanks. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] Heads-up: Reorganize directory structure
Dear Graeme Russ, In message m2md66caabb1004151942s6ac4f444nac22bdccd128d...@mail.gmail.com you wrote: And then there is also board/ $BOARDC $BOARDD I've never liked code existing on multiple depths like this. Maybe we move towards: But we're just about adding exactly such multi-depth structures to the CPU directory (see recent discussion about ARM: reorganize Cortex directory). If you don't like this you should raise your voice in that thread. board/ $VENDOR include/ lib/ $BOARDA/ $BOARDB/ $cpu_generic/ $BOARDC/ $BOARDD/ I see not much benefit in artificially distributing the misc boards into several directories. Any code that would otherwise live under $cpu_generic/[include, lib] should (by definition) be moved to arch/$cpu/[include, lib] That makes even less sense to me. Such could would usually be highly board specific. [There are of course lots of bad examples, where generic code gets copied pasted from one board directory to the next one and so on, but factoring out such common code is a task that is orthogonal to this discussion, i. e. it could be done in the existing directory structure (or any other) as well. Best regards, Wolfgang Denk -- 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: w...@denx.de A morsel of genuine history is a thing so rare as to be always valuable. - Thomas Jefferson ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] Heads-up: Reorganize directory structure
Dear Alessandro Rubini, In message 20100416065842.ga21...@morgana.gnudd.com you wrote: I really like this structure, particularly if the code under $VENDOR/[common, include, lib] is arch independent. Yes, that would be good, if it was a common case. However, arch-independent code is usually under drivers. See at91 and avr32 for example: no common code under board/atmel/ . Even boards/freescale, The Atmel code is a particularly bad example - I never understood why each of these boards needs it's own copy of led.c or partition.c. We should not use bad examples as reference, I think. In theory you are correct. In practice, such platform independent material is using drivers/ . This is not always true. There are examples for shared code across different CPU families and even architectures. IIRC, board/keymile/ contains common code that is used on ARM and on PowerPC systems. And board/tqc/tqm8xx/load_sernum_ethaddr.c is also used in board/tqc/tqm8260/ - this code predates the creation of vendor directories by many years, but it could/should be moved to a (to be created) board/tqc/common directory. All these examples do not belong into drivers, nor into any arch/cpu directory. If there really was vendor-specific cross-platform code, I agree something like you suggest is best. There is. See examples above. Best regards, Wolfgang Denk -- 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: w...@denx.de May your future be limited only by your dreams. - Christa McAuliffe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-ppc4xx/master
Dear Stefan Roese, In message 201004141036.29317...@denx.de you wrote: The following changes since commit 8d321b81c5441db93425ee37cb79cc51d9ce2fb0: Peter Tyser (1): Update README to reflect new directory structure are available in the git repository at: git://www.denx.de/git/u-boot-ppc4xx.git master Stefan Roese (2): ppc4xx: alpr: Remove some not needed commands to make image fit again ppc4xx: Add option for PPC440SPe ports without old Rev. A support arch/ppc/cpu/ppc4xx/start.S |2 +- include/configs/alpr.h |4 +++- include/configs/katmai.h|1 + include/configs/yucca.h |1 + 4 files changed, 6 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- 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: w...@denx.de Women are more easily and more deeply terrified ... generating more sheer horror than the male of the species. -- Spock, Wolf in the Fold, stardate 3615.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] microblaze: Add FDT support
Arun Bhanu wrote: This patch adds FDT (flattened device tree) support to microblaze arch. Tested with Linux arch/microblaze kernels with and without compiled in FDT on Xilinx ML506 board. Signed-off-by: Arun Bhanu a...@bhanu.net Applied. Thanks, Michal --- arch/microblaze/lib/bootm.c | 39 ++- 1 files changed, 34 insertions(+), 5 deletions(-) diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index bce4774..0c2c5e8 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -35,22 +35,51 @@ DECLARE_GLOBAL_DATA_PTR; int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) { /* First parameter is mapped to $r5 for kernel boot args */ - void(*theKernel) (char *); + void(*theKernel) (char *, ulong, ulong); char*commandline = getenv (bootargs); + ulong rd_data_start, rd_data_end; if ((flag != 0) (flag != BOOTM_STATE_OS_GO)) return 1; - theKernel = (void (*)(char *))images-ep; + int ret; + + char*of_flat_tree = NULL; +#if defined(CONFIG_OF_LIBFDT) + ulong of_size = 0; + + /* find flattened device tree */ + ret = boot_get_fdt (flag, argc, argv, images, of_flat_tree, of_size); + if (ret) + return 1; +#endif + + theKernel = (void (*)(char *, ulong, ulong))images-ep; + + /* find ramdisk */ + ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_MICROBLAZE, + rd_data_start, rd_data_end); + if (ret) + return 1; show_boot_progress (15); + if (!(ulong) of_flat_tree) + of_flat_tree = simple_strtoul (argv[3], NULL, 16); + #ifdef DEBUG - printf (## Transferring control to Linux (at address %08lx) ...\n, - (ulong) theKernel); + printf (## Transferring control to Linux (at address 0x%08lx) \ + ramdisk 0x%08lx, FDT 0x%08lx...\n, + (ulong) theKernel, rd_data_start, (ulong) of_flat_tree); #endif - theKernel (commandline); + /* + * Linux Kernel Parameters (passing device tree): + * r5: pointer to command line + * r6: pointer to ramdisk + * r7: pointer to the fdt, followed by the board info data + */ + theKernel (commandline, rd_data_start, (ulong) of_flat_tree); /* does not return */ return 1; -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/8] microblaze: Change cache report messages
From: Michal Simek mon...@monstr.eu It is more accurate to show that caches are OFF instead of FAIL. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/board.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 1d44a64..41a1db6 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -116,8 +116,8 @@ void board_init (void) } puts (SDRAM :\n); - printf (\t\tIcache:%s\n, icache_status() ? OK : FAIL); - printf (\t\tDcache:%s\n, dcache_status() ? OK : FAIL); + printf (\t\tIcache:%s\n, icache_status() ? ON : OFF); + printf (\t\tDcache:%s\n, dcache_status() ? ON : OFF); printf (\tU-Boot Start:0x%08x\n, TEXT_BASE); #if defined(CONFIG_CMD_FLASH) -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 8/8] microblaze: Flush cache before jumping to kernel
From: Michal Simek mon...@monstr.eu There is used max cache size on system which doesn't define cache size. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/bootm.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 0c2c5e8..8892a7a 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -73,6 +73,14 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) (ulong) theKernel, rd_data_start, (ulong) of_flat_tree); #endif +#ifdef XILINX_USE_DCACHE +#ifdef XILINX_DCACHE_BYTE_SIZE + flush_cache(0, XILINX_DCACHE_BYTE_SIZE); +#else +#warning please rebuild BSPs and update configuration + flush_cache(0, 32768); +#endif +#endif /* * Linux Kernel Parameters (passing device tree): * r5: pointer to command line -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/8] microblaze: Change initialization sequence
From: Michal Simek mon...@monstr.eu env_relocation should be called first. Added stdio_init too. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/board.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 41a1db6..6c03297 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -30,6 +30,7 @@ #include timestamp.h #include version.h #include watchdog.h +#include stdio_dev.h DECLARE_GLOBAL_DATA_PTR; @@ -151,15 +152,22 @@ void board_init (void) } #endif + /* relocate environment function pointers etc. */ + env_relocate (); + + /* Initialize stdio devices */ + stdio_init (); + + if ((s = getenv (loadaddr)) != NULL) { + load_addr = simple_strtoul (s, NULL, 16); + } + #if defined(CONFIG_CMD_NET) /* IP Address */ bd-bi_ip_addr = getenv_IPaddr (ipaddr); eth_init (bd); #endif - /* relocate environment function pointers etc. */ - env_relocate (); - /* main_loop */ for (;;) { WATCHDOG_RESET (); -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/8] microblaze: Fix interrupt handler code
From: Michal Simek mon...@monstr.eu It is better to read ivr and react on it than do long parsing from two regs. Interrupt controller returs actual irq number. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/interrupts.c | 28 +++- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index 0fe9f5c..7a9d022 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -141,8 +141,8 @@ int interrupts_init (void) void interrupt_handler (void) { - int irqs = (intc-isr intc-ier); /* find active interrupt */ - int i = 1; + int irqs = intc-ivr; /* find active interrupt */ + int mask = 1; #ifdef DEBUG_INT int value; printf (INTC isr %x, ier %x, iar %x, mer %x\n, intc-isr, intc-ier, @@ -150,23 +150,17 @@ void interrupt_handler (void) R14(value); printf (Interrupt handler on %x line, r14 %x\n, irqs, value); #endif - struct irq_action *act = vecs; - while (irqs) { - if (irqs 1) { + struct irq_action *act = vecs + irqs; + + intc-iar = mask irqs; + #ifdef DEBUG_INT - printf - (Jumping to interrupt handler rutine addr %x,count %x,arg %x\n, -act-handler, act-count, act-arg); + printf + (Jumping to interrupt handler rutine addr %x,count %x,arg %x\n, +act-handler, act-count, act-arg); #endif - act-handler (act-arg); - act-count++; - intc-iar = i; - return; - } - irqs = 1; - act++; - i = 1; - } + act-handler (act-arg); + act-count++; #ifdef DEBUG_INT printf (Dump INTC reg, isr %x, ier %x, iar %x, mer %x\n, intc-isr, -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/8] microblaze: Support system with WB cache
From: Michal Simek mon...@monstr.eu WB cache use different instruction that WT cache but the major code is that same. That means that wdc.flush on system with WT cache do the same thing as before. You need newer toolchain with wdc.flush support. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/cache.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/microblaze/lib/cache.c b/arch/microblaze/lib/cache.c index 4b2e8e3..9b6b60f 100644 --- a/arch/microblaze/lib/cache.c +++ b/arch/microblaze/lib/cache.c @@ -34,7 +34,7 @@ void flush_cache (ulong addr, ulong size) #endif nop; #ifdef CONFIG_DCACHE - wdc%0, r0; + wdc.flush %0, r0; #endif nop; : -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/8] microblaze: Move timer initialization to board.c
From: Michal Simek mon...@monstr.eu I would like to handle case where system doesn't contain intc that's why I need timer initialization out of intc code. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/interrupts.c |6 -- arch/microblaze/cpu/timer.c |3 ++- arch/microblaze/lib/board.c |7 +++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index a6021c9..b8db68a 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -46,9 +46,6 @@ int disable_interrupts (void) } #ifdef CONFIG_SYS_INTC_0 -#ifdef CONFIG_SYS_TIMER_0 -extern void timer_init (void); -#endif #ifdef CONFIG_SYS_FSL_2 extern void fsl_init2 (void); #endif @@ -142,9 +139,6 @@ int interrupts_init (void) } /* initialize intc controller */ intc_init (); -#ifdef CONFIG_SYS_TIMER_0 - timer_init (); -#endif #ifdef CONFIG_SYS_FSL_2 fsl_init2 (); #endif diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index a91eabc..4936c62 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -60,7 +60,7 @@ void timer_isr (void *arg) tmr-control = tmr-control | TIMER_INTERRUPT; } -void timer_init (void) +int timer_init (void) { tmr-loadreg = CONFIG_SYS_TIMER_0_PRELOAD; tmr-control = TIMER_INTERRUPT | TIMER_RESET; @@ -68,6 +68,7 @@ void timer_init (void) TIMER_ENABLE | TIMER_ENABLE_INTR | TIMER_RELOAD | TIMER_DOWN_COUNT; reset_timer (); install_interrupt_handler (CONFIG_SYS_TIMER_0_IRQ, timer_isr, (void *)tmr); + return 0; } #endif #endif diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index d4baea9..7dfa71c 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -44,6 +44,10 @@ extern int interrupts_init (void); #if defined(CONFIG_CMD_NET) extern int eth_init (bd_t * bis); #endif +#ifdef CONFIG_SYS_TIMER_0 +extern int timer_init (void); +#endif + /* * All attempts to come up with a common initialization sequence @@ -68,6 +72,9 @@ init_fnc_t *init_sequence[] = { #ifdef CONFIG_SYS_INTC_0 interrupts_init, #endif +#ifdef CONFIG_SYS_TIMER_0 + timer_init, +#endif NULL, }; -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/8] microblaze: Fix irq.S code
From: Michal Simek mon...@monstr.eu It is ancient code. There is possible to save several instructions just if we use offset instead of addik Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/irq.S | 182 +++- 1 files changed, 62 insertions(+), 120 deletions(-) diff --git a/arch/microblaze/cpu/irq.S b/arch/microblaze/cpu/irq.S index e1fc190..47bba36 100644 --- a/arch/microblaze/cpu/irq.S +++ b/arch/microblaze/cpu/irq.S @@ -27,129 +27,71 @@ .text .global _interrupt_handler _interrupt_handler: - addir1, r1, -4 - swi r2, r1, 0 - addir1, r1, -4 - swi r3, r1, 0 - addir1, r1, -4 - swi r4, r1, 0 - addir1, r1, -4 - swi r5, r1, 0 - addir1, r1, -4 - swi r6, r1, 0 - addir1, r1, -4 - swi r7, r1, 0 - addir1, r1, -4 - swi r8, r1, 0 - addir1, r1, -4 - swi r9, r1, 0 - addir1, r1, -4 - swi r10, r1, 0 - addir1, r1, -4 - swi r11, r1, 0 - addir1, r1, -4 - swi r12, r1, 0 - addir1, r1, -4 - swi r13, r1, 0 - addir1, r1, -4 - swi r14, r1, 0 - addir1, r1, -4 - swi r15, r1, 0 - addir1, r1, -4 - swi r16, r1, 0 - addir1, r1, -4 - swi r17, r1, 0 - addir1, r1, -4 - swi r18, r1, 0 - addir1, r1, -4 - swi r19, r1, 0 - addir1, r1, -4 - swi r20, r1, 0 - addir1, r1, -4 - swi r21, r1, 0 - addir1, r1, -4 - swi r22, r1, 0 - addir1, r1, -4 - swi r23, r1, 0 - addir1, r1, -4 - swi r24, r1, 0 - addir1, r1, -4 - swi r25, r1, 0 - addir1, r1, -4 - swi r26, r1, 0 - addir1, r1, -4 - swi r27, r1, 0 - addir1, r1, -4 - swi r28, r1, 0 - addir1, r1, -4 - swi r29, r1, 0 - addir1, r1, -4 - swi r30, r1, 0 - addir1, r1, -4 - swi r31, r1, 0 + swi r2, r1, -4 + swi r3, r1, -8 + swi r4, r1, -12 + swi r5, r1, -16 + swi r6, r1, -20 + swi r7, r1, -24 + swi r8, r1, -28 + swi r9, r1, -32 + swi r10, r1, -36 + swi r11, r1, -40 + swi r12, r1, -44 + swi r13, r1, -48 + swi r14, r1, -52 + swi r15, r1, -56 + swi r16, r1, -60 + swi r17, r1, -64 + swi r18, r1, -68 + swi r19, r1, -72 + swi r20, r1, -76 + swi r21, r1, -80 + swi r22, r1, -84 + swi r23, r1, -88 + swi r24, r1, -92 + swi r25, r1, -96 + swi r26, r1, -100 + swi r27, r1, -104 + swi r28, r1, -108 + swi r29, r1, -112 + swi r30, r1, -116 + swi r31, r1, -120 + addik r1, r1, -124 brlid r15, interrupt_handler nop nop - lwi r31, r1, 0 - addir1, r1, 4 - lwi r30, r1, 0 - addir1, r1, 4 - lwi r29, r1, 0 - addir1, r1, 4 - lwi r28, r1, 0 - addir1, r1, 4 - lwi r27, r1, 0 - addir1, r1, 4 - lwi r26, r1, 0 - addir1, r1, 4 - lwi r25, r1, 0 - addir1, r1, 4 - lwi r24, r1, 0 - addir1, r1, 4 - lwi r23, r1, 0 - addir1, r1, 4 - lwi r22, r1, 0 - addir1, r1, 4 - lwi r21, r1, 0 - addir1, r1, 4 - lwi r20, r1, 0 - addir1, r1, 4 - lwi r19, r1, 0 - addir1, r1, 4 - lwi r18, r1, 0 - addir1, r1, 4 - lwi r17, r1, 0 - addir1, r1, 4 - lwi r16, r1, 0 - addir1, r1, 4 - lwi r15, r1, 0 - addir1, r1, 4 - lwi r14, r1, 0 - addir1, r1, 4 - lwi r13, r1, 0 - addir1, r1, 4 - lwi r12, r1, 0 - addir1, r1, 4 - lwi r11, r1, 0 - addir1, r1, 4 - lwi r10, r1, 0 - addir1, r1, 4 - lwi r9, r1, 0 - addir1, r1, 4 - lwi r8, r1, 0 - addir1, r1, 4 - lwi r7, r1, 0 - addir1, r1, 4 - lwi r6, r1, 0 - addir1, r1, 4 - lwi r5, r1, 0 - addir1, r1, 4 - lwi r4, r1, 0 - addir1, r1, 4 - lwi r3, r1, 0 - addir1, r1, 4 - lwi r2, r1, 0 - addir1, r1, 4 + addik r1, r1, 124 + lwi r31, r1, -120 + lwi r30, r1, -116 + lwi r29, r1, -112 + lwi r28, r1, -108 + lwi r27, r1, -104 + lwi r26, r1, -100 + lwi r25, r1, -96 + lwi r24, r1, -92 +
[U-Boot] [PATCH 3/8] microblaze: Move FSL initialization to board.c
From: Michal Simek mon...@monstr.eu Move FSL out of interrupt controller. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/interrupts.c |7 --- arch/microblaze/lib/board.c|7 ++- .../xilinx/microblaze-generic/microblaze-generic.c |7 +++ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index b8db68a..0fe9f5c 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -46,10 +46,6 @@ int disable_interrupts (void) } #ifdef CONFIG_SYS_INTC_0 -#ifdef CONFIG_SYS_FSL_2 -extern void fsl_init2 (void); -#endif - static struct irq_action vecs[CONFIG_SYS_INTC_0_NUM]; @@ -139,9 +135,6 @@ int interrupts_init (void) } /* initialize intc controller */ intc_init (); -#ifdef CONFIG_SYS_FSL_2 - fsl_init2 (); -#endif enable_interrupts (); return 0; } diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 7dfa71c..1d44a64 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -47,7 +47,9 @@ extern int eth_init (bd_t * bis); #ifdef CONFIG_SYS_TIMER_0 extern int timer_init (void); #endif - +#ifdef CONFIG_SYS_FSL_2 +extern void fsl_init2 (void); +#endif /* * All attempts to come up with a common initialization sequence @@ -75,6 +77,9 @@ init_fnc_t *init_sequence[] = { #ifdef CONFIG_SYS_TIMER_0 timer_init, #endif +#ifdef CONFIG_SYS_FSL_2 + fsl_init2, +#endif NULL, }; diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index f388b77..838f131 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -60,10 +60,9 @@ void fsl_isr2 (void *arg) { puts(*); } -void fsl_init2 (void) { +int fsl_init2 (void) { puts(fsl_init2\n); - install_interrupt_handler (FSL_INTR_2,\ - fsl_isr2,\ - NULL); + install_interrupt_handler (FSL_INTR_2, fsl_isr2, NULL); + return 0; } #endif -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Microblaze updates
Hi All, here is bunch of microblaze patches. Thanks for your review, Micha ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] nios2: add nios2-generic board
Thomas Chou wrote: This is a generic approach to port u-boot for nios2 boards. You may find the usage of this approach on the nioswiki, http://nioswiki.com/DasUBoot A fpga parameter file, which contains base address information and drivers declaration, is generated from Altera's hardware system description sopc file using tools. It is much nicer than previous solution. I like it. The example fpga parameter file is compatible with EP1C20, EP1S10 and EP1S40 boards. So these boards can be removed after this commit. Though epcs controller is not included to cut the dependency of altera_spi driver. If is possible to remove it that will be good to create patches and clean the code. Signed-off-by: Thomas Chou tho...@wytron.com.tw Acked-by: Michal Simek mon...@monstr.eu Thanks, Michal --- fix board_eth_init() return. add nios2-generic board template. The fpga parameter file is generated with a script at http://sopc.et.ntust.edu.tw/?p=toolchain-build.git; a=blob_plain;f=tools/sopc-create-config-files;hb=HEAD MAINTAINERS|1 + MAKEALL|1 + Makefile |6 + board/altera/nios2-generic/Makefile| 60 +++ board/altera/nios2-generic/config.mk | 32 ++ board/altera/nios2-generic/custom_fpga.h | 66 board/altera/nios2-generic/nios2-generic.c | 68 board/altera/nios2-generic/text_base.S | 21 board/altera/nios2-generic/u-boot.lds | 136 include/configs/nios2-generic.h| 153 10 files changed, 544 insertions(+), 0 deletions(-) create mode 100644 board/altera/nios2-generic/Makefile create mode 100644 board/altera/nios2-generic/config.mk create mode 100644 board/altera/nios2-generic/custom_fpga.h create mode 100644 board/altera/nios2-generic/nios2-generic.c create mode 100644 board/altera/nios2-generic/text_base.S create mode 100644 board/altera/nios2-generic/u-boot.lds create mode 100644 include/configs/nios2-generic.h diff --git a/MAINTAINERS b/MAINTAINERS index 04c8730..46e051b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -858,6 +858,7 @@ Scott McNutt smcn...@psyent.com EP1C20 Nios-II EP1S10 Nios-II EP1S40 Nios-II + nios2-generic Nios-II # # MicroBlaze Systems: # diff --git a/MAKEALL b/MAKEALL index fb1f7a3..216b89b 100755 --- a/MAKEALL +++ b/MAKEALL @@ -824,6 +824,7 @@ LIST_nios2= \ EP1S40 \ PCI5441 \ PK1C20 \ + nios2-generic \ # diff --git a/Makefile b/Makefile index 5d314c6..752f529 100644 --- a/Makefile +++ b/Makefile @@ -3538,6 +3538,12 @@ PK1C20_config : unconfig PCI5441_config : unconfig @$(MKCONFIG) PCI5441 nios2 nios2 pci5441 psyent +# nios2 generic boards +NIOS2_GENERIC = nios2-generic + +$(NIOS2_GENERIC:%=%_config) : unconfig + @$(MKCONFIG) $(@:_config=) nios2 nios2 nios2-generic altera + # ## Microblaze # diff --git a/board/altera/nios2-generic/Makefile b/board/altera/nios2-generic/Makefile new file mode 100644 index 000..2a6f69b --- /dev/null +++ b/board/altera/nios2-generic/Makefile @@ -0,0 +1,60 @@ +# +# (C) Copyright 2001-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# (C) Copyright 2010, Thomas Chou tho...@wytron.com.tw +# +# 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., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../common) +endif + +LIB = $(obj)lib$(BOARD).a + +COBJS-y := $(BOARD).o +COBJS-$(CONFIG_CMD_IDE) += ../common/cfide.o +COBJS-$(CONFIG_EPLED) += ../common/epled.o +COBJS-$(CONFIG_GPIOLED) += ../common/gpioled.o
[U-Boot] [PATCH] microblaze: Consolidate cache code
From: Michal Simek mon...@monstr.eu Merge cpu and lib cache code. Flush cache before disabling. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/cache.c | 28 +++ arch/microblaze/lib/Makefile |1 - arch/microblaze/lib/cache.c | 43 -- 3 files changed, 28 insertions(+), 44 deletions(-) delete mode 100644 arch/microblaze/lib/cache.c diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c index 3b7c4d4..d258a69 100644 --- a/arch/microblaze/cpu/cache.c +++ b/arch/microblaze/cpu/cache.c @@ -50,6 +50,8 @@ void icache_enable (void) { } void icache_disable(void) { + /* we are not generate ICACHE size - flush whole cache */ + flush_cache(0, 32768); MSRCLR(0x20); } @@ -58,5 +60,31 @@ void dcache_enable (void) { } void dcache_disable(void) { +#ifdef XILINX_USE_DCACHE +#ifdef XILINX_DCACHE_BYTE_SIZE + flush_cache(0, XILINX_DCACHE_BYTE_SIZE); +#else +#warning please rebuild BSPs and update configuration + flush_cache(0, 32768); +#endif +#endif MSRCLR(0x80); } + +void flush_cache (ulong addr, ulong size) +{ + int i; + for (i = 0; i size; i += 4) + asm volatile ( +#ifdef CONFIG_ICACHE + wic%0, r0; +#endif + nop; +#ifdef CONFIG_DCACHE + wdc.flush %0, r0; +#endif + nop; + : + : r (addr + i) + : memory); +} diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index 9b0f296..8176437 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile @@ -29,7 +29,6 @@ SOBJS-y += COBJS-y+= board.o COBJS-y+= bootm.o -COBJS-y+= cache.o COBJS-y+= time.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) diff --git a/arch/microblaze/lib/cache.c b/arch/microblaze/lib/cache.c deleted file mode 100644 index 9b6b60f..000 --- a/arch/microblaze/lib/cache.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright 2004 Atmark Techno, Inc. - * - * Yasushi SHOJI ya...@atmark-techno.com - * - * 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., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#include common.h - -void flush_cache (ulong addr, ulong size) -{ - int i; - for (i = 0; i size; i += 4) - asm volatile ( -#ifdef CONFIG_ICACHE - wic%0, r0; -#endif - nop; -#ifdef CONFIG_DCACHE - wdc.flush %0, r0; -#endif - nop; - : - : r (addr + i) - : memory); -} -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] NAND bootloader, SPL-NUB offset for large page NAND
Hi, I have a question regarding the usage of CPU's with the Freescale ELBC nand controller, in my case a MPC8313, and large page NAND (i.e.pagesize = 2048+64 bytes, blocksize = 128k): In nand_spl/nand_boot_fsl_elbc.c , static void nand_load(unsigned int offs, int uboot_size, uchar *dst) first does a check if the given offset to the NUB part of the bootloader is one block, i.e. 128 k in case of large page NAND. ... if (offs (block_size - 1)) { puts(bad offset\n); for (;;); } ... Is this offset of one block really necessary? AFAIU the SPL bootloader needs to fit into the 4-Kbyte SPL boot block for execute-in-place boot loading. I could imagine to just use the remaining ~124k of the first block (guaranteed to be valid for large page NAND) for a good part of the NUB part of the bootloader. The bad-block skipping part would become effective for the following blocks nevertheless. Is there a reason to have the NUB part start in its own NAND block ? These are my NAND-settings (based on MPC8313ERDB.h, but with large page NAND) #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_MTD_NAND_VERIFY_WRITE #define CONFIG_CMD_NAND 1 #define CONFIG_NAND_FSL_ELBC 1 #define CONFIG_SYS_NAND_PAGE_SIZE (2 10) /* NAND chip page size (large page) */ #define CONFIG_SYS_NAND_BLOCK_SIZE (128 10) /* NAND chip block size (large page) */ #define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */ #define CONFIG_SYS_NAND_U_BOOT_SIZE (512 10) #define CONFIG_SYS_NAND_U_BOOT_DST 0x0010 #define CONFIG_SYS_NAND_U_BOOT_START 0x00100100 #define CONFIG_SYS_NAND_U_BOOT_OFFS (128 10) #define CONFIG_SYS_NAND_U_BOOT_RELOC 0x0001 #define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_RELOC + 0x1) Thanks for any insight best regards -- Peter Vollmer Innominate Security Technologies AG Berlin / Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] Heads-up: Reorganize directory structure
On Fri, Apr 16, 2010 at 5:41 PM, Wolfgang Denk w...@denx.de wrote: Dear Graeme Russ, In message m2md66caabb1004151942s6ac4f444nac22bdccd128d...@mail.gmail.com you wrote: And then there is also board/ $BOARDC $BOARDD I've never liked code existing on multiple depths like this. Maybe we move towards: But we're just about adding exactly such multi-depth structures to the CPU directory (see recent discussion about ARM: reorganize Cortex directory). Hmmm, but this move makes sense unlike the current board/ structure (or lack thereof). In the ARM Cortex case, only cortex 8 code will exist under arch/arm/cpu/cortex/a8. At the moment, nearly every arch has a representative one level below board/ One could go as far as board/$ARCH/$VENDER with a board/$ARCH/generic failover, but that means if a vendor wants to share code between different arch's they are a little hamstrung. Going down this path might lead one to think $ARCH/$BOARD/$VENDOR/ with $ARCH/$BOARD/generic but this is a completely illogical place to look for a vendors board because you should not need to know what CPU/SOC a vendor is using for their board, just the vendor and board ID should be enough. If you don't like this you should raise your voice in that thread. board/ $VENDOR include/ lib/ $BOARDA/ $BOARDB/ $cpu_generic/ $BOARDC/ $BOARDD/ I see not much benefit in artificially distributing the misc boards into several directories. The problem with the current structure is that there is no way of knowing which $BOARD in board/ uses a particular CPU or SOC. Therefore when one goes looking for examples of how to implement their brand spanking new super-duper board using SOC 'x' which does not exist under a $VENDOR/ dir they have to 'go fish'. By moving all boards which use the same CPU or SOC under a common folder, looking for an example board is much easier. Maybe $[cpu, soc]-generic/ might be better Any code that would otherwise live under $cpu_generic/[include, lib] should (by definition) be moved to arch/$cpu/[include, lib] That makes even less sense to me. Such could would usually be highly board specific. [There are of course lots of bad examples, where Board specific code would always live under $[cpu, soc]-generic/$BOARD generic code gets copied pasted from one board directory to the next one and so on, but factoring out such common code is a task that is orthogonal to this discussion, i. e. it could be done in the existing directory structure (or any other) as well. Exactly - Any code that exists under multiple existing $BOARDx dirs which is only duplicated 'by bad example' and is, in reality, CPU or SOC specific should be moved into the appropriate arch/ dir. Once the /board/$[cpu, soc]-generic/$BOARD move has been been done, identifying the duplicate code will be that much easier Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] Move arch/ppc to arch/powerpc
Because of the size of this patch (approx. 350k), here the link to it: http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Move-arch-ppc-to-arch-powerpc.patch And here the patch description and statistics: [PATCH v2] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. But ppc is kept as an alias for now, to not break compatibility with scripts using this name. Signed-off-by: Stefan Roese s...@denx.de Acked-by: Wolfgang Denk w...@denx.de Acked-by: Detlev Zundel d...@denx.de Cc: Peter Tyser pty...@xes-inc.com --- v2: Keep ppc as an alias to powerpc in MAKEALL as suggested by Wolfgang MAKEALL| 14 +- Makefile | 606 ++-- README | 16 +- api/{api_platform-ppc.c = api_platform-powerpc.c} |0 arch/{ppc = powerpc}/config.mk|0 arch/{ppc = powerpc}/cpu/74xx_7xx/Makefile|0 arch/{ppc = powerpc}/cpu/74xx_7xx/cache.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/config.mk |0 arch/{ppc = powerpc}/cpu/74xx_7xx/cpu.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/cpu_init.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/interrupts.c|0 arch/{ppc = powerpc}/cpu/74xx_7xx/io.S|0 arch/{ppc = powerpc}/cpu/74xx_7xx/kgdb.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/speed.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/start.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/traps.c |2 +- arch/{ppc = powerpc}/cpu/mpc512x/Makefile |0 arch/{ppc = powerpc}/cpu/mpc512x/asm-offsets.h|2 +- arch/{ppc = powerpc}/cpu/mpc512x/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc512x/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc512x/cpu_init.c |0 arch/{ppc = powerpc}/cpu/mpc512x/diu.c|0 arch/{ppc = powerpc}/cpu/mpc512x/fixed_sdram.c|0 arch/{ppc = powerpc}/cpu/mpc512x/i2c.c|0 arch/{ppc = powerpc}/cpu/mpc512x/ide.c|0 arch/{ppc = powerpc}/cpu/mpc512x/iim.c|0 arch/{ppc = powerpc}/cpu/mpc512x/interrupts.c |0 arch/{ppc = powerpc}/cpu/mpc512x/iopin.c |0 arch/{ppc = powerpc}/cpu/mpc512x/pci.c|0 arch/{ppc = powerpc}/cpu/mpc512x/serial.c |0 arch/{ppc = powerpc}/cpu/mpc512x/speed.c |0 arch/{ppc = powerpc}/cpu/mpc512x/start.S |0 arch/{ppc = powerpc}/cpu/mpc512x/traps.c |0 arch/{ppc = powerpc}/cpu/mpc512x/u-boot.lds |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/Makefile |4 +- arch/{ppc = powerpc}/cpu/mpc5xx/config.mk |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/cpu.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/cpu_init.c|0 arch/{ppc = powerpc}/cpu/mpc5xx/interrupts.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/serial.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/speed.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/spi.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/start.S |0 arch/{ppc = powerpc}/cpu/mpc5xx/traps.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/u-boot.lds|2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/Makefile |0 arch/{ppc = powerpc}/cpu/mpc5xxx/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/cpu_init.c |0 .../cpu/mpc5xxx/firmware_sc_task_bestcomm.impl.S |0 arch/{ppc = powerpc}/cpu/mpc5xxx/i2c.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/ide.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/interrupts.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/io.S |0 arch/{ppc = powerpc}/cpu/mpc5xxx/loadtask.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/pci_mpc5200.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/serial.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/speed.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/start.S |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/traps.c |2 +- .../cpu/mpc5xxx/u-boot-customlayout.lds|8 +- arch/{ppc = powerpc}/cpu/mpc5xxx/u-boot.lds |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/usb.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/usb_ohci.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/usb_ohci.h |0 arch/{ppc = powerpc}/cpu/mpc8220/Makefile |0 arch/{ppc = powerpc}/cpu/mpc8220/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc8220/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc8220/cpu_init.c |0 arch/{ppc = powerpc}/cpu/mpc8220/dma.h|0 arch/{ppc = powerpc}/cpu/mpc8220/dramSetup.c |0
Re: [U-Boot] [STATUS] Heads-up: Reorganize directory structure
Dear Graeme Russ, In message r2sd66caabb1004160445t8832c707w8ac6c7b903e1f...@mail.gmail.com you wrote: The problem with the current structure is that there is no way of knowing which $BOARD in board/ uses a particular CPU or SOC. Therefore So look it up in the Makefile, or in MAKEALL - what's exactly the problem? Exactly - Any code that exists under multiple existing $BOARDx dirs which is only duplicated 'by bad example' and is, in reality, CPU or SOC specific should be moved into the appropriate arch/ dir. Once the /board/$[cpu, soc]-generic/$BOARD move has been been done, identifying the duplicate code will be that much easier Identification of such code has never been a real problem. The problem is that it needs somebody to come up with patches to clean up the mess. I doubt that the number of volunteers will significantly grow just by reorganizing the directory structure. Best regards, Wolfgang Denk -- 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: w...@denx.de Well, the way I see it, logic is only a way of being ignorant by num- bers. - Terry Pratchett, _Small Gods_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Move arch/ppc to arch/powerpc
[PATCH v2] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. But ppc is kept as an alias for now, to not break compatibility with scripts using this name. Thanks for finishing this up! After a quick once over of the patch a minor nit: Near line 2756: -This should work for arch/ppc and arch/powerpc. Only Linux +This should work for arch/powerpc and arch/powerpc. Only Linux The same thing happens at line 4710 in arch/powerpc/lib/board.c Otherwise things look good to me. Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Move arch/ppc to arch/powerpc
On Apr 16, 2010, at 8:59 AM, Peter Tyser wrote: [PATCH v2] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. But ppc is kept as an alias for now, to not break compatibility with scripts using this name. Thanks for finishing this up! After a quick once over of the patch a minor nit: Near line 2756: -This should work for arch/ppc and arch/powerpc. Only Linux +This should work for arch/powerpc and arch/powerpc. Only Linux The same thing happens at line 4710 in arch/powerpc/lib/board.c Otherwise things look good to me. Peter I'd appreciate this going in ASAP to reduce the churn :) - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Move arch/ppc to arch/powerpc
Hi Stefan, On Fri, 16 Apr 2010 14:37:52 +0200 Stefan Roese s...@denx.de wrote: ... [PATCH v2] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. But ppc is kept as an alias for now, to not break compatibility with scripts using this name. Could you please also merge the patch below into your big patch? MAKEALL ppc reports link errors for MVSMR board without it. Thanks, Anatolij diff --git a/board/matrix_vision/mvsmr/u-boot.lds b/board/matrix_vision/mvsmr/u-boot.lds index cfbb6ef..36f867d 100644 --- a/board/matrix_vision/mvsmr/u-boot.lds +++ b/board/matrix_vision/mvsmr/u-boot.lds @@ -55,11 +55,11 @@ SECTIONS { /* WARNING - the following is hand-optimized to fit within */ /* the first two sectors (=8KB) of our S29GL flash chip */ -cpu/mpc5xxx/start.o (.text) -cpu/mpc5xxx/traps.o (.text) -lib_generic/crc32.o (.text) -lib_ppc/cache.o (.text) -lib_ppc/time.o (.text) +arch/powerpc/cpu/mpc5xxx/start.o (.text) +arch/powerpc/cpu/mpc5xxx/traps.o (.text) +lib/crc32.o(.text) +arch/powerpc/lib/cache.o (.text) +arch/powerpc/lib/time.o(.text) /* This is only needed to force failure if size of above code will ever */ /* increase and grow into reserved space. */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Does U-boot supports Spansion S29GL512P NOR Flash?
Hi, I removed the changes as you suggested and now it is working without modifying the code. Only thing is that I had to add a flag *CONFIG_SYS_WRITE_SWAPPED_DATA* and it works. But here I am getting the error in erasing the sector as well in saveenv. U-Boot $ *saveenv* Saving Environment to Flash... copy old content: sect_addr: FFFA env_addr: FFFA offset: Protect off FFFA ... FFFB Un-Protecting sectors 509..509 in bank 1 Un-Protected 1 sectors Erasing Flash...Erase Flash from 0xfffa to 0xfffb in Bank # 1 fwc addr fffa0aaa cmd aa aa00 16bit x 16 bit fwc addr fffa0554 cmd 55 5500 16bit x 16 bit fwc addr fffa0aaa cmd 80 8000 16bit x 16 bit fwc addr fffa0aaa cmd aa aa00 16bit x 16 bit fwc addr fffa0554 cmd 55 5500 16bit x 16 bit fwc addr fffa cmd 30 3000 16bit x 16 bit *flash_is_busy: 0* . done Erased 1 sectors *Writing to Flash... Flash not Erased* Protecting sectors 509..509 in bank 1 Protected 1 sectors Here the data is not erase but the last erase sector command data is displayed instead of environment parameters. U-Boot $ md 0xfffa fffa: 3000 0... fffa0010: I tired to program the word and erase the sector but here again erase failed. U-Boot $ mw.w 0xfdfa 0xfc00 U-Boot $ mw.w 0xfdfa0aaa 0xaa00 U-Boot $ mw.w 0xfdfa0554 0x5500 U-Boot $ mw.w 0xfdfa0aaa 0xa000 U-Boot $ mw.w 0xfdfa 0x3132 U-Boot $ md.w 0xfdfa fdfa: 3132 12.. fdfa0010: fdfa0020: fdfa0030: fdfa0040: fdfa0050: fdfa0060: fdfa0070: U-Boot $ erase 0xfdfa +0x2 Erase Flash from 0xfdfa to 0xfdfb in Bank # 1 fwc addr fdfa0aaa cmd aa aa00 16bit x 16 bit fwc addr fdfa0554 cmd 55 5500 16bit x 16 bit fwc addr fdfa0aaa cmd 80 8000 16bit x 16 bit fwc addr fdfa0aaa cmd aa aa00 16bit x 16 bit fwc addr fdfa0554 cmd 55 5500 16bit x 16 bit fwc addr fdfa cmd 30 3000 16bit x 16 bit flash_is_busy: 0 . done Erased 1 sectors U-Boot $ erase 0xfdfa +0x2 U-Boot $ md.w 0xfdfa fdfa: *3000* 0... fdfa0010: But, when I program the 0xfcfa address and tried to erase the sector then I am able to erase the sector. U-Boot $ mw.w 0xfcfa 0xfc00 U-Boot $ mw.w 0xfcfa0aaa 0xaa00 U-Boot $ mw.w 0xfcfa0554 0x5500 U-Boot $ mw.w 0xfcfa0aaa 0xa000 U-Boot *$ mw.w 0xfcfa 0x3132* U-Boot $ md.w 0xfcfa fcfa: *3132* 12.. fcfa0010: U-Boot $ *erase 0xfcfa 0x2* Erase Flash from 0xfcfa to 0xfcfb in Bank # 1 fwc addr fcfa0aaa cmd aa aa00 16bit x 16 bit fwc addr fcfa0554 cmd 55 5500 16bit x 16 bit fwc addr fcfa0aaa cmd 80 8000 16bit x 16 bit fwc addr fcfa0aaa cmd aa aa00 16bit x 16 bit fwc addr fcfa0554 cmd 55 5500 16bit x 16 bit fwc addr fcfa cmd 30 3000 16bit x 16 bit flash_is_busy: 1 flash_is_busy: 1 flash_is_busy: 1 . . . flash_is_busy: 1 flash_is_busy: 1 flash_is_busy: 0 . done Erased 1 sectors U-Boot $ md 0xfcfa *fcfa: * fcfa0010: fcfa0020: fcfa0030: I am able to erase 128 sector from flash base i.e. I am able to erase the flash from flash base 0xfc00 upto 16 MB size. But I am not able to erase the remaining 384 sectors from 0xFD00 onwards. My current flash settings /*--- * FLASH related *--*/ #define CONFIG_SYS_FLASH_CFI #define CONFIG_FLASH_CFI_DRIVER #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ #define CONFIG_SYS_FLASH_BASE 0xfc00/* start of FLASH */ #define CONFIG_ENV_IS_IN_FLASH 1 #define CONFIG_SYS_WRITE_SWAPPED_DATA #define CONFIG_SYS_FLASH_CFI_WIDTH (FLASH_CFI_16BIT) #define CONFIG_SYS_FLASH_BANKS_LIST{CONFIG_SYS_FLASH_BASE} #define CONFIG_SYS_MAX_FLASH_BANKS 1/* number of banks */ #define
Re: [U-Boot] [PATCH v2] Move arch/ppc to arch/powerpc
Hi Anatolij, On Friday 16 April 2010 16:35:44 Anatolij Gustschin wrote: [PATCH v2] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. But ppc is kept as an alias for now, to not break compatibility with scripts using this name. Could you please also merge the patch below into your big patch? MAKEALL ppc reports link errors for MVSMR board without it. Yes, I already noticed this failure myself. Will update the patch and resend a new version later today. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] NAND ECC mixup?
I'm having trouble with NAND ECC on my OMAP/3530 platform. It seems that U-Boot and Linux don't agree on the ECC patterns for a given set of data. In particular, if I create the U-Boot environment in NAND, then update it via fw_setconfig in Linux, U-Boot is no longer happy with the ECC bits. I noticed that the file drivers/mtd/nand/nand_ecc.c has changed dramatically in the Linux sources. Could this be the problem? My code is based on git://git.denx.de/u-boot.git 15fba3279b56333bdb65ead366f82c945ed320d1 ppc/85xx: Disable all async interrupt sources when we boot My Linux kernel is 2.6.31 or newer I looked in the latest tree and didn't see anything relevant. Am I missing something? Thanks -- Gary Thomas | Consulting for the MLB Associates |Embedded world ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] POST: Added ECC memory test for mpc83xx.
On Fri, Apr 16, 2010 at 1:25 AM, Kim Phillips kim.phill...@freescale.com wrote: On Thu, 8 Apr 2010 10:37:08 +0200 Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Kim Phillips kim.phill...@freescale.com wrote on 2010-04-08 10:27:03: The documentation is confusing: the e300c2 has its FPU chopped off - the FP registers are simply not there. this is a good catch by Jocke - it would be best if generic 83xx code didn't depend on the ppcDW* accessors. That or one could impl. ppcDW* using normal load/store insns for 832x. Either way the ppcDW* should be inlined as the overhead for doing function calls isn't something you want when looking for speed. another good point, but it seems they were added primarily for code density benefits. I think we can do something like this in the meantime: From 686d3bb7a732ec36beec169c4eaf4882382d3aa2 Mon Sep 17 00:00:00 2001 From: Kim Phillips kim.phill...@freescale.com Date: Thu, 8 Apr 2010 18:22:13 -0500 Subject: [PATCH] mpc83xx: implement ppcDW{load,store} accessors for e300c2 e300c2 core based processors (MPC832x) don't have an FPU: provide alternative, gpr based accessor functions for code compatibility. Suggested-by: Joakim Tjernlund joakim.tjernl...@transmode.se Signed-off-by: Kim Phillips kim.phill...@freescale.com --- arch/ppc/cpu/mpc83xx/start.S | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/ppc/cpu/mpc83xx/start.S b/arch/ppc/cpu/mpc83xx/start.S index 68bb620..6bfce57 100644 --- a/arch/ppc/cpu/mpc83xx/start.S +++ b/arch/ppc/cpu/mpc83xx/start.S @@ -139,14 +139,28 @@ get_pvr: .globl ppcDWstore ppcDWstore: +#if !defined(CONFIG_MPC832x) lfd 1, 0(r4) stfd1, 0(r3) +#else + lwz r5, 0(r4) + stw r5, 0(r3) + lwz r5, 4(r4) + stw r5, 4(r3) +#endif blr .globl ppcDWload ppcDWload: +#if !defined(CONFIG_MPC832x) lfd 1, 0(r3) stfd1, 0(r4) +#else + lwz r5, 0(r3) + stw r5, 0(r4) + lwz r5, 4(r3) + stw r5, 4(r4) +#endif blr #ifndef CONFIG_DEFAULT_IMMR -- 1.7.0.5 Although this is good for most of the cases it does not fit in the algorithm implemented in the post_ecc_test. The first stw in ppcDWstore will generate ecc error (due to read-modify-write) so ecc capture data registers will capture only first word as it was written with flipped injected error bit or without depending on its position in the data_error_inject_hi or data_error_inject_lo injection mask registers. The second ecc capture data word will hold the data that was in the memory right before the ppcDWstore call. Thus, the test validation while working for stfd will fail for stw x 2. So, the algorithm need to be reworked... I also agree with Joakim regarding the routine call overhead and replacing it by inline macro. Please review this code. From 5a64a5c4f480dcea89bc8f13f8464b96b888b73c Mon Sep 17 00:00:00 2001 From: Michael Zaidman michael.zaid...@gmail.com Date: Fri, 16 Apr 2010 18:50:43 +0300 Subject: [U-Boot][PATCH] asm-ppc/io.h - added 64bits I/O accessors for ppc32. Suggested-by: Joakim Tjernlund joakim.tjernl...@transmode.se Signed-off-by: Michael Zaidman michael.zaid...@gmail.com --- include/asm-ppc/io.h | 49 + 1 files changed, 49 insertions(+), 0 deletions(-) diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 4ddad26..0d5e125 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h @@ -231,6 +231,31 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr) return ret; } +/* 64 bits I/O read accessor for ppc32 */ +extern inline void in_be64(volatile unsigned __iomem *addr, volatile unsigned __iomem *ret) +{ +/* FIXME: Add other CPUs without FPU here... */ +#if defined(CONFIG_MPC832x) + __asm__ __volatile__( + sync\n + lwz%U0%X0 0,%0\n + stw%U1%X1 0,%1\n + lwz%U0%X0 0,4+%0\n + stw%U1%X1 0,4+%1\n + isync + :=m (*ret) + :m (*addr), r (addr), r (ret)); +#else + __asm__ __volatile__( + sync\n + lfd%U0%X0 1,%0\n + stfd%U1%X1 1,%1\n + isync + :=m (*ret) + :m (*addr), r (addr), r (ret)); +#endif +} + extern inline void out_le32(volatile unsigned __iomem *addr, int val) { __asm__ __volatile__(sync; stwbrx %1,0,%2 : =m (*addr) : @@ -242,6 +267,30 @@ extern inline void out_be32(volatile unsigned __iomem *addr, int val) __asm__ __volatile__(sync; stw%U0%X0 %1,%0 : =m (*addr) : r (val)); } +/* 64 bits I/O write accessor for ppc32 */ +extern inline void out_be64(volatile unsigned __iomem *addr, volatile unsigned __iomem
[U-Boot] [PATCH v3] Move arch/ppc to arch/powerpc
Because of the size of this patch (approx. 350k), here the link to it: http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Move-arch-ppc-to-arch-powerpc-v3.patch And here the patch description and statistics: [PATCH v3] Move arch/ppc to arch/powerpc As discussed on the list, move arch/ppc to arch/powerpc to better match the Linux directory structure. Please note that this patch also changes the ppc target in MAKEALL to powerpc to match this new infrastructure. But ppc is kept as an alias for now, to not break compatibility with scripts using this name. Signed-off-by: Stefan Roese s...@denx.de Acked-by: Wolfgang Denk w...@denx.de Acked-by: Detlev Zundel d...@denx.de Cc: Peter Tyser pty...@xes-inc.com Cc: Anatolij Gustschin ag...@denx.de --- v3: - Fix compilation problems with MVSMR as suggested by Anatolij - Smaller comment fixes as suggested by Peter v2: - Keep ppc as an alias to powerpc in MAKEALL as suggested by Wolfgang MAKEALL| 14 +- Makefile | 606 ++-- README | 14 +- api/{api_platform-ppc.c = api_platform-powerpc.c} |0 arch/{ppc = powerpc}/config.mk|0 arch/{ppc = powerpc}/cpu/74xx_7xx/Makefile|0 arch/{ppc = powerpc}/cpu/74xx_7xx/cache.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/config.mk |0 arch/{ppc = powerpc}/cpu/74xx_7xx/cpu.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/cpu_init.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/interrupts.c|0 arch/{ppc = powerpc}/cpu/74xx_7xx/io.S|0 arch/{ppc = powerpc}/cpu/74xx_7xx/kgdb.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/speed.c |0 arch/{ppc = powerpc}/cpu/74xx_7xx/start.S |0 arch/{ppc = powerpc}/cpu/74xx_7xx/traps.c |2 +- arch/{ppc = powerpc}/cpu/mpc512x/Makefile |0 arch/{ppc = powerpc}/cpu/mpc512x/asm-offsets.h|2 +- arch/{ppc = powerpc}/cpu/mpc512x/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc512x/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc512x/cpu_init.c |0 arch/{ppc = powerpc}/cpu/mpc512x/diu.c|0 arch/{ppc = powerpc}/cpu/mpc512x/fixed_sdram.c|0 arch/{ppc = powerpc}/cpu/mpc512x/i2c.c|0 arch/{ppc = powerpc}/cpu/mpc512x/ide.c|0 arch/{ppc = powerpc}/cpu/mpc512x/iim.c|0 arch/{ppc = powerpc}/cpu/mpc512x/interrupts.c |0 arch/{ppc = powerpc}/cpu/mpc512x/iopin.c |0 arch/{ppc = powerpc}/cpu/mpc512x/pci.c|0 arch/{ppc = powerpc}/cpu/mpc512x/serial.c |0 arch/{ppc = powerpc}/cpu/mpc512x/speed.c |0 arch/{ppc = powerpc}/cpu/mpc512x/start.S |0 arch/{ppc = powerpc}/cpu/mpc512x/traps.c |0 arch/{ppc = powerpc}/cpu/mpc512x/u-boot.lds |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/Makefile |4 +- arch/{ppc = powerpc}/cpu/mpc5xx/config.mk |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/cpu.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/cpu_init.c|0 arch/{ppc = powerpc}/cpu/mpc5xx/interrupts.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/serial.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/speed.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/spi.c |0 arch/{ppc = powerpc}/cpu/mpc5xx/start.S |0 arch/{ppc = powerpc}/cpu/mpc5xx/traps.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xx/u-boot.lds|2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/Makefile |0 arch/{ppc = powerpc}/cpu/mpc5xxx/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/cpu.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/cpu_init.c |0 .../cpu/mpc5xxx/firmware_sc_task_bestcomm.impl.S |0 arch/{ppc = powerpc}/cpu/mpc5xxx/i2c.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/ide.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/interrupts.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/io.S |0 arch/{ppc = powerpc}/cpu/mpc5xxx/loadtask.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/pci_mpc5200.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/serial.c |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/speed.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/start.S |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/traps.c |2 +- .../cpu/mpc5xxx/u-boot-customlayout.lds|8 +- arch/{ppc = powerpc}/cpu/mpc5xxx/u-boot.lds |2 +- arch/{ppc = powerpc}/cpu/mpc5xxx/usb.c|0 arch/{ppc = powerpc}/cpu/mpc5xxx/usb_ohci.c |0 arch/{ppc = powerpc}/cpu/mpc5xxx/usb_ohci.h |0 arch/{ppc = powerpc}/cpu/mpc8220/Makefile |0 arch/{ppc = powerpc}/cpu/mpc8220/config.mk|2 +- arch/{ppc = powerpc}/cpu/mpc8220/cpu.c|0 arch/{ppc =
Re: [U-Boot] [PATCH 3/3] mpc83xx: turn on icache in core initialization to improve u-boot boot time
On Fri, Apr 16, 2010 at 1:36 AM, Kim Phillips kim.phill...@freescale.com wrote: before, MPC8349ITX boots u-boot in 4.3sec: [snip] after, MPC8349ITX boots u-boot in 3.0sec: Thanks for the good news! Memory POST test on my board with icach disabled was lasting for hours until I enabled icach locally before and disabled it after time consuming tests. BTW is there any reason that you enable icach in board specific rather than in common code? -michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NAND ECC mixup?
On 04/16/2010 09:55 AM, Gary Thomas wrote: I'm having trouble with NAND ECC on my OMAP/3530 platform. It seems that U-Boot and Linux don't agree on the ECC patterns for a given set of data. In particular, if I create the U-Boot environment in NAND, then update it via fw_setconfig in Linux, U-Boot is no longer happy with the ECC bits. I noticed that the file drivers/mtd/nand/nand_ecc.c has changed dramatically in the Linux sources. Could this be the problem? My code is based on git://git.denx.de/u-boot.git 15fba3279b56333bdb65ead366f82c945ed320d1 ppc/85xx: Disable all async interrupt sources when we boot My Linux kernel is 2.6.31 or newer I looked in the latest tree and didn't see anything relevant. Am I missing something? This turns out to a misconfiguration of 'CONFIG_MTD_NAND_ECC_SMC' My Linux configuration had it, U-Boot did not. That said, CONFIG_MTD_NAND_ECC_SMC is incompatible with the version of X-Loader I'm running, so it's just a matter of disabling this in Linux. Thanks -- Gary Thomas | Consulting for the MLB Associates |Embedded world ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] nios2: Move individual board linker scripts to common script in cpu tree.
Signed-off-by: Scott McNutt smcn...@psyent.com --- arch/nios2/config.mk|2 + arch/nios2/cpu/u-boot.lds | 135 ++ board/altera/ep1c20/u-boot.lds | 135 -- board/altera/ep1s10/u-boot.lds | 135 -- board/altera/ep1s40/u-boot.lds | 135 -- board/psyent/pci5441/u-boot.lds | 136 --- board/psyent/pk1c20/u-boot.lds | 136 --- 7 files changed, 137 insertions(+), 677 deletions(-) create mode 100644 arch/nios2/cpu/u-boot.lds delete mode 100644 board/altera/ep1c20/u-boot.lds delete mode 100644 board/altera/ep1s10/u-boot.lds delete mode 100644 board/altera/ep1s40/u-boot.lds delete mode 100644 board/psyent/pci5441/u-boot.lds delete mode 100644 board/psyent/pk1c20/u-boot.lds diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk index be40639..f455982 100644 --- a/arch/nios2/config.mk +++ b/arch/nios2/config.mk @@ -28,3 +28,5 @@ STANDALONE_LOAD_ADDR = 0x0200 -L $(gcclibdir) PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__ PLATFORM_CPPFLAGS += -ffixed-r15 -G0 + +LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds diff --git a/arch/nios2/cpu/u-boot.lds b/arch/nios2/cpu/u-boot.lds new file mode 100644 index 000..fe4a2eb --- /dev/null +++ b/arch/nios2/cpu/u-boot.lds @@ -0,0 +1,135 @@ +/* + * (C) Copyright 2004, Psyent Corporation www.psyent.com + * Scott McNutt smcn...@psyent.com + * + * 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., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + + +OUTPUT_FORMAT(elf32-littlenios2) +OUTPUT_ARCH(nios2) +ENTRY(_start) + +SECTIONS +{ + .text : + { + arch/nios2/cpu/start.o (.text) + *(.text) + *(.text.*) + *(.gnu.linkonce.t*) + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) + *(.gnu.linkonce.r*) + } + . = ALIGN (4); + _etext = .; + PROVIDE (etext = .); + + /* CMD TABLE - sandwich this in between text and data so +* the initialization code relocates the command table as +* well -- admittedly, this is just pure laziness ;-) +*/ + __u_boot_cmd_start = .; + .u_boot_cmd : + { + *(.u_boot_cmd) + } + . = ALIGN(4); + __u_boot_cmd_end = .; + + /* INIT DATA sections - Small data (see the gcc -G option) +* is always gp-relative. Here we make all init data sections +* adjacent to simplify the startup code -- and provide +* the global pointer for gp-relative access. +*/ + _data = .; + .data : + { + *(.data) + *(.data.*) + *(.gnu.linkonce.d*) + } + + . = ALIGN(16); + _gp = .;/* Global pointer addr */ + PROVIDE (gp = .); + + .sdata : + { + *(.sdata) + *(.sdata.*) + *(.gnu.linkonce.s.*) + } + . = ALIGN(4); + + _edata = .; + PROVIDE (edata = .); + + /* UNINIT DATA - Small uninitialized data is first so it's +* adjacent to sdata and can be referenced via gp. The normal +* bss follows. We keep it adjacent to simplify init code. +*/ + __bss_start = .; + .sbss (NOLOAD) : + { + *(.sbss) + *(.sbss.*) + *(.gnu.linkonce.sb.*) + *(.scommon) + } + . = ALIGN(4); + .bss (NOLOAD) : + { + *(.bss) + *(.bss.*) + *(.dynbss) + *(COMMON) + *(.scommon) + } + . = ALIGN(4); + _end = .; + PROVIDE (end = .); + + /* DEBUG -- symbol table, string table, etc. etc. +*/ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + .debug_aranges 0 :
[U-Boot] [Nios] Pull Request
Wolfgang, These changes also fix a broken build for all nios2 boards due to a typographic error introduced in the directory restructuring. The following changes since commit 2a72e9ed18d2164eb7fe569119342eb631b568da: Stefan Roese (1): ppc4xx: Add option for PPC440SPe ports without old Rev. A support are available in the git repository at: git://git.denx.de/u-boot-nios.git master Scott McNutt (1): nios2: Move individual board linker scripts to common script in cpu tree. arch/nios2/config.mk |2 + {board/altera/ep1c20 = arch/nios2/cpu}/u-boot.lds |2 +- board/altera/ep1s10/u-boot.lds | 135 --- board/altera/ep1s40/u-boot.lds | 135 --- board/psyent/pci5441/u-boot.lds| 136 board/psyent/pk1c20/u-boot.lds | 136 6 files changed, 3 insertions(+), 543 deletions(-) rename {board/altera/ep1c20 = arch/nios2/cpu}/u-boot.lds (98%) delete mode 100644 board/altera/ep1s10/u-boot.lds delete mode 100644 board/altera/ep1s40/u-boot.lds delete mode 100644 board/psyent/pci5441/u-boot.lds delete mode 100644 board/psyent/pk1c20/u-boot.lds Regards, --Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NAND bootloader, SPL-NUB offset for large page NAND
On Fri, Apr 16, 2010 at 01:29:26PM +0200, Peter Vollmer wrote: Hi, I have a question regarding the usage of CPU's with the Freescale ELBC nand controller, in my case a MPC8313, and large page NAND (i.e.pagesize = 2048+64 bytes, blocksize = 128k): In nand_spl/nand_boot_fsl_elbc.c , static void nand_load(unsigned int offs, int uboot_size, uchar *dst) first does a check if the given offset to the NUB part of the bootloader is one block, i.e. 128 k in case of large page NAND. ... if (offs (block_size - 1)) { puts(bad offset\n); for (;;); } ... Is this offset of one block really necessary? Without it we'd need to special-case the bad block handling. AFAIU the SPL bootloader needs to fit into the 4-Kbyte SPL boot block for execute-in-place boot loading. I could imagine to just use the remaining ~124k of the first block (guaranteed to be valid for large page NAND) for a good part of the NUB part of the bootloader. The bad-block skipping part would become effective for the following blocks nevertheless. Is there a reason to have the NUB part start in its own NAND block ? We do use the remaining 124 KiB for the payload -- see e.g. MPC8536DS.h. We just set CONFIG_SYS_NAND_U_BOOT_OFFS to zero, and CONFIG_SYS_NAND_U_BOOT_START to 4KiB after the destination. The SPL will be loaded twice, but who cares? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot