[U-Boot] [PATCH] microblaze: Consolidate cache code
From: Michal Simek Merge cpu and lib cache code. Flush cache before disabling. Signed-off-by: Michal Simek --- 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 - * - * 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 - -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] 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
[U-Boot] [PATCH 3/8] microblaze: Move FSL initialization to board.c
From: Michal Simek Move FSL out of interrupt controller. Signed-off-by: Michal Simek --- 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] [PATCH 1/8] microblaze: Fix irq.S code
From: Michal Simek It is ancient code. There is possible to save several instructions just if we use offset instead of addik Signed-off-by: Michal Simek --- 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 + lwi r23, r1, -88 +
[U-Boot] [PATCH 2/8] microblaze: Move timer initialization to board.c
From: Michal Simek 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 --- 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 7/8] microblaze: Support system with WB cache
From: Michal Simek 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 --- 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 4/8] microblaze: Fix interrupt handler code
From: Michal Simek 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 --- 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 6/8] microblaze: Change initialization sequence
From: Michal Simek env_relocation should be called first. Added stdio_init too. Signed-off-by: Michal Simek --- 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 #include #include +#include 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 8/8] microblaze: Flush cache before jumping to kernel
From: Michal Simek There is used max cache size on system which doesn't define cache size. Signed-off-by: Michal Simek --- 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 5/8] microblaze: Change cache report messages
From: Michal Simek It is more accurate to show that caches are OFF instead of FAIL. Signed-off-by: Michal Simek --- 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] Microblaze fix
Hi Wolfgang, here are two bug fixes for Microblaze. You can apply them if you are ok with them. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] microblaze: zlib needs asm/unaligned.h
From: Michal Simek Microblaze has own hw unaligned handler if is available. Use big endian version. Signed-off-by: Michal Simek --- include/asm-microblaze/unaligned.h | 16 1 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 include/asm-microblaze/unaligned.h diff --git a/include/asm-microblaze/unaligned.h b/include/asm-microblaze/unaligned.h new file mode 100644 index 000..785c2e9 --- /dev/null +++ b/include/asm-microblaze/unaligned.h @@ -0,0 +1,16 @@ +#ifndef _ASM_MICROBLAZE_UNALIGNED_H +#define _ASM_MICROBLAZE_UNALIGNED_H + +#ifdef __KERNEL__ + +/* + * The Microblaze can do unaligned accesses itself in big endian mode. + */ +#include +#include + +#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be + +#endif /* __KERNEL__ */ +#endif /* _ASM_MICROBLAZE_UNALIGNED_H */ -- 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/2] microblaze: Remove getenv_IPaddr
From: Michal Simek Commit 6a45e384955262882375a2785426dc65aeb636c4 should remove reference from Microblaze too. Signed-off-by: Michal Simek --- lib_microblaze/board.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/lib_microblaze/board.c b/lib_microblaze/board.c index 200ea5d..d4baea9 100644 --- a/lib_microblaze/board.c +++ b/lib_microblaze/board.c @@ -43,7 +43,6 @@ extern int interrupts_init (void); #endif #if defined(CONFIG_CMD_NET) extern int eth_init (bd_t * bis); -extern int getenv_IPaddr (char *); #endif /* -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] microblaze: Correct ffs regression for Microblaze
From: Michal Simek We are using generic implementation of ffs. This should be part of Simon's commit 0413cfecea35eab5e591a0965c3e3ee0ff00 Here is warning message which this patch removes. In file included from /tmp/u-boot-microblaze/include/common.h:38, from cmd_mtdparts.c:87: /tmp/u-boot-microblaze/include/linux/bitops.h:123:1: warning: "ffs" redefined In file included from /tmp/u-boot-microblaze/include/linux/bitops.h:110, from /tmp/u-boot-microblaze/include/common.h:38, from cmd_mtdparts.c:87: /tmp/u-boot-microblaze/include/asm/bitops.h:269:1: warning: this is the location of the previous definition Signed-off-by: Michal Simek --- include/asm-microblaze/bitops.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/asm-microblaze/bitops.h b/include/asm-microblaze/bitops.h index 5d814f0..e8c835f 100644 --- a/include/asm-microblaze/bitops.h +++ b/include/asm-microblaze/bitops.h @@ -266,8 +266,6 @@ found_middle: return result + ffz(tmp); } -#define ffs(x) generic_ffs(x) - /* * hweightN: returns the hamming weight (i.e. the number * of bits set) of a N-bit word -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] net: [V2] Add LL TEMAC driver to u-boot and move Emaclite to NET_MULTI
From: Michal Simek Here are two major changes which should go together. First is adding LL Temac driver to u-boot and the second is changing Emaclite to NET_MULTI api. There are some changes for proper initialization too. Signed-off-by: Michal Simek --- V2: Applied Ben comments --- .../xilinx/microblaze-generic/microblaze-generic.c | 16 + drivers/net/Makefile |1 + drivers/net/xilinx_emaclite.c | 86 ++-- drivers/net/xilinx_ll_temac.c | 558 include/configs/microblaze-generic.h |2 + include/netdev.h |2 + lib_microblaze/board.c | 21 +- 7 files changed, 639 insertions(+), 47 deletions(-) create mode 100644 drivers/net/xilinx_ll_temac.c diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index f388b77..4ad9eb6 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -67,3 +68,18 @@ void fsl_init2 (void) { NULL); } #endif + +int board_eth_init(bd_t *bis) +{ + /* +* This board either has PCI NICs or uses the CPU's TSECs +* pci_eth_init() will return 0 if no NICs found, so in that case +* returning -1 will force cpu_eth_init() to be called. +*/ +#ifdef CONFIG_XILINX_EMACLITE + return xilinx_emaclite_initialize(bis); +#endif +#ifdef CONFIG_XILINX_LL_TEMAC + return xilinx_ll_temac_initialize(bis); +#endif +} diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 67018bb..4fd53f9 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -73,6 +73,7 @@ COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o +COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index cf39573..99b5ae1 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -14,7 +14,7 @@ * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * - * (C) Copyright 2007-2008 Michal Simek + * (C) Copyright 2007-2009 Michal Simek * Michal SIMEK * * (c) Copyright 2003 Xilinx Inc. @@ -25,6 +25,7 @@ #include #include #include +#include #include #undef DEBUG @@ -62,26 +63,19 @@ #define XEL_RSR_RECV_IE_MASK 0x0008UL typedef struct { - unsigned int baseaddress; /* Base address for device (IPIF) */ - unsigned int nexttxbuffertouse; /* Next TX buffer to write to */ - unsigned int nextrxbuffertouse; /* Next RX buffer to read from */ - unsigned char deviceid; /* Unique ID of device - for future */ + u32 baseaddress;/* Base address for device (IPIF) */ + u32 nexttxbuffertouse; /* Next TX buffer to write to */ + u32 nextrxbuffertouse; /* Next RX buffer to read from */ + uchar deviceid; /* Unique ID of device - for future */ } xemaclite; static xemaclite emaclite; static u32 etherrxbuff[PKTSIZE_ALIGN/4]; /* Receive buffer */ -/* hardcoded MAC address for the Xilinx EMAC Core when env is nowhere*/ -#ifdef CONFIG_ENV_IS_NOWHERE -static u8 emacaddr[ENET_ADDR_LENGTH] = { 0x00, 0x0a, 0x35, 0x00, 0x22, 0x01 }; -#else -static u8 emacaddr[ENET_ADDR_LENGTH]; -#endif - -void xemaclite_alignedread (u32 * srcptr, void *destptr, unsigned bytecount) +static void xemaclite_alignedread (u32 * srcptr, void *destptr, u32 bytecount) { - unsigned int i; + u32 i; u32 alignbuffer; u32 *to32ptr; u32 *from32ptr; @@ -106,9 +100,9 @@ void xemaclite_alignedread (u32 * srcptr, void *destptr, unsigned bytecount) } } -void xemaclite_alignedwrite (void *srcptr, u32 destptr, unsigned bytecount) +static void xemaclite_alignedwrite (void *srcptr, u32 destptr, u32 bytecount) { - unsigned i; + u32 i; u32 alignbuffer; u32 *to32ptr = (u32 *) destptr; u32 *from32ptr; @@ -133,23 +127,16 @@ void xemaclite_alignedwrite (void *srcptr, u32 destptr, unsigned bytecount) *to32ptr++ = alignbuffer; } -void eth_halt (void) +static void emaclite_halt(struct eth_device *dev) { debug ("eth_halt\n"); } -int eth_init (bd_t * bis) +static int emaclite_init(struct eth_device *dev, bd_t *bis) { - uchar enetaddr[6]; - debug ("EmacLite Initialization Started\n"); memset (&emaclite, 0, sizeof (xemaclite)); - emaclite.baseaddress = XILINX_EMACLITE_BASEADDR; - - if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { - memcpy(enetaddr, emacaddr, ENET_ADDR_LENGTH); -
[U-Boot] Xilinx LL temac update
Hi Ben, I updated LL-temac driver - all fixes are there. Ad to your point Microblaze uses only one ethernet core. It is possible to use a lot of IPs but I don't have board like this to test it that's why I don't want change it. If you find any other problem please let me know. If is OK - I'll create net branch with these changes (LL_TEMAC/Emaclite + removing old Emac driver) Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/7] net: Remove old Xilinx Emac driver
From: Michal Simek Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- drivers/net/Makefile |1 - drivers/net/xilinx_emac.c| 464 -- include/configs/microblaze-generic.h |5 +- 3 files changed, 1 insertions(+), 469 deletions(-) delete mode 100644 drivers/net/xilinx_emac.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 98cb3a1..4fd53f9 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -72,7 +72,6 @@ COBJS-$(CONFIG_TSEC_ENET) += tsec.o COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o -COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o diff --git a/drivers/net/xilinx_emac.c b/drivers/net/xilinx_emac.c deleted file mode 100644 index a489aa9..000 --- a/drivers/net/xilinx_emac.c +++ /dev/null @@ -1,464 +0,0 @@ -/** - * - * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" - * AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND - * SOLUTIONS FOR XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE, - * OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, - * APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION - * THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT, - * AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE - * FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY - * WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE - * IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR - * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF - * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE. - * - * (C) Copyright 2007-2008 Michal Simek - * Michal SIMEK - * - * (c) Copyright 2003 Xilinx Inc. - * All rights reserved. - * - **/ - -#include -#include -#include -#include - -#include - -#undef DEBUG - -typedef struct { - u32 regbaseaddress; /* Base address of registers */ - u32 databaseaddress;/* Base address of data for FIFOs */ -} xpacketfifov100b; - -typedef struct { - u32 baseaddress;/* Base address (of IPIF) */ - u32 isstarted; /* Device is currently started 0-no, 1-yes */ - xpacketfifov100b recvfifo; /* FIFO used to receive frames */ - xpacketfifov100b sendfifo; /* FIFO used to send frames */ -} xemac; - -#define XIIF_V123B_IISR_OFFSET 32UL /* IP interrupt status register */ -#define XIIF_V123B_RESET_MASK 0xAUL -#define XIIF_V123B_RESETR_OFFSET 64UL /* reset register */ - -/* This constant is used with the Reset Register */ -#define XPF_RESET_FIFO_MASK0x000A -#define XPF_COUNT_STATUS_REG_OFFSET4UL - -/* These constants are used with the Occupancy/Vacancy Count Register. This - * register also contains FIFO status */ -#define XPF_COUNT_MASK 0x -#define XPF_DEADLOCK_MASK 0x2000 - -/* Offset of the MAC registers from the IPIF base address */ -#define XEM_REG_OFFSET 0x1100UL - -/* - * Register offsets for the Ethernet MAC. Each register is 32 bits. - */ -#define XEM_ECR_OFFSET (XEM_REG_OFFSET + 0x4) /* MAC Control */ -#define XEM_SAH_OFFSET (XEM_REG_OFFSET + 0xC) /* Station addr, high */ -#define XEM_SAL_OFFSET (XEM_REG_OFFSET + 0x10) /* Station addr, low */ -#define XEM_RPLR_OFFSET(XEM_REG_OFFSET + 0x1C) /* Rx packet length */ -#define XEM_TPLR_OFFSET(XEM_REG_OFFSET + 0x20) /* Tx packet length */ -#define XEM_TSR_OFFSET (XEM_REG_OFFSET + 0x24) /* Tx status */ - -#define XEM_PFIFO_OFFSET 0x2000UL -/* Tx registers */ -#define XEM_PFIFO_TXREG_OFFSET (XEM_PFIFO_OFFSET + 0x0) -/* Rx registers */ -#define XEM_PFIFO_RXREG_OFFSET (XEM_PFIFO_OFFSET + 0x10) -/* Tx keyhole */ -#define XEM_PFIFO_TXDATA_OFFSET(XEM_PFIFO_OFFSET + 0x100) -/* Rx keyhole */ -#define XEM_PFIFO_RXDATA_OFFSET(XEM_PFIFO_OFFSET + 0x200) - -/* - * EMAC Interrupt Registers (Status and Enable) masks. These registers are - * part of the IPIF IP Interrupt registers - */ -/* A mask for all transmit interrupts, used in polled mode */ -#define XEM_EIR_XMIT_ALL_MASK (XEM_EIR_XMIT_DONE_MASK |\ - XEM_EIR_XMIT_ERROR_MASK | \ - XEM_EIR_XMIT_SFIFO_EMPTY_MASK |\ - XEM_EIR_XMIT_LFIFO_FULL_MASK) - -/* Xmit complete */ -#define XEM_EIR_XMIT_DONE_MASK 0x0001UL -/* Recv complete */ -#define XEM_EIR_RECV_DONE_MASK 0x0002UL -/* Xmit error */ -#define XEM_EIR_XMIT_ERROR_MASK0x0004UL -/* Recv error */ -#define XEM_EIR_RECV_ERROR_MASK0x0008UL -/* Xmit
[U-Boot] Microblaze update repository
Hi All, here are some changes related to Microblaze. The important one is for Ben - adding Xilinx LL_TEMAC driver and changing Emaclite to NET_MULTI interface + changes in microblaze code to support it. And I decided to remove old Xilinx EMAC driver. It is old driver for old IP and none use it. Ben: Can you please review my net changes? The next big change is removing AtmarkTechno Suzaku board from U-BOOT. Yasushi SHOJI agreed with it some month ago too. Shinya: There is one small patch to qemu website. Please add it to your repo. Thanks for review, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/7] microblaze: Remove AtmarkTechno Suzaku board
From: Michal Simek Users should use microblaze-generic platform. This platform is longer not supported. Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- MAINTAINERS |4 - MAKEALL |1 - Makefile |5 -- board/AtmarkTechno/suzaku/Makefile | 44 -- board/AtmarkTechno/suzaku/config.mk | 29 - board/AtmarkTechno/suzaku/flash.c| 46 -- board/AtmarkTechno/suzaku/suzaku.c | 32 -- board/AtmarkTechno/suzaku/u-boot.lds | 68 - include/configs/suzaku.h | 110 -- 9 files changed, 0 insertions(+), 339 deletions(-) delete mode 100644 board/AtmarkTechno/suzaku/Makefile delete mode 100644 board/AtmarkTechno/suzaku/config.mk delete mode 100644 board/AtmarkTechno/suzaku/flash.c delete mode 100644 board/AtmarkTechno/suzaku/suzaku.c delete mode 100644 board/AtmarkTechno/suzaku/u-boot.lds delete mode 100644 include/configs/suzaku.h diff --git a/MAINTAINERS b/MAINTAINERS index 620604c..b5fcb0c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -787,10 +787,6 @@ Scott McNutt # Board CPU # # -Yasushi Shoji - - SUZAKU MicroBlaze - Michal Simek microblaze-generic MicroBlaze diff --git a/MAKEALL b/MAKEALL index edebaea..23f8587 100755 --- a/MAKEALL +++ b/MAKEALL @@ -765,7 +765,6 @@ LIST_nios2="\ LIST_microblaze=" \ microblaze-generic \ - suzaku \ " # diff --git a/Makefile b/Makefile index 329e0f5..44baa66 100644 --- a/Makefile +++ b/Makefile @@ -3452,11 +3452,6 @@ microblaze-generic_config: unconfig @mkdir -p $(obj)include @$(MKCONFIG) -a $(@:_config=) microblaze microblaze microblaze-generic xilinx -suzaku_config: unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_SUZAKU 1" > $(obj)include/config.h - @$(MKCONFIG) -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno - # # Blackfin # diff --git a/board/AtmarkTechno/suzaku/Makefile b/board/AtmarkTechno/suzaku/Makefile deleted file mode 100644 index 109cec2..000 --- a/board/AtmarkTechno/suzaku/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# (C) Copyright 2003-2006 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# 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 - -LIB= $(obj)lib$(BOARD).a - -COBJS = $(BOARD).o flash.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB):$(obj).depend $(OBJS) - $(AR) $(ARFLAGS) $@ $(OBJS) - -# - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -# diff --git a/board/AtmarkTechno/suzaku/config.mk b/board/AtmarkTechno/suzaku/config.mk deleted file mode 100644 index 7bbf2b1..000 --- a/board/AtmarkTechno/suzaku/config.mk +++ /dev/null @@ -1,29 +0,0 @@ -# -# (C) Copyright 2004 Atmark Techno, Inc. -# -# Yasushi SHOJI -# -# 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 Ge
[U-Boot] [PATCH 4/7] microblaze: Add sbss, scommon and COMMON symbols for clearing
From: Michal Simek Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- board/xilinx/microblaze-generic/u-boot.lds |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/board/xilinx/microblaze-generic/u-boot.lds b/board/xilinx/microblaze-generic/u-boot.lds index 5a08680..c20c6dd 100644 --- a/board/xilinx/microblaze-generic/u-boot.lds +++ b/board/xilinx/microblaze-generic/u-boot.lds @@ -60,7 +60,10 @@ SECTIONS .bss ALIGN(0x4): { __bss_start = .; + *(.sbss) + *(.scommon) *(.bss) + *(COMMON) . = ALIGN(4); __bss_end = .; } -- 1.5.4.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/7] microblaze: Enable hush parser
From: Michal Simek With Hush parser is possible to change command line in dtb Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- include/configs/microblaze-generic.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 89e4bcc..beb31d3 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -303,4 +303,10 @@ #define CONFIG_CMDLINE_EDITING +/* Use the HUSH parser */ +#define CONFIG_SYS_HUSH_PARSER +#ifdef CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " +#endif + #endif /* __CONFIG_H */ -- 1.5.4.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/7] net: Add LL TEMAC driver to u-boot and move Emaclite to NET_MULTI
From: Michal Simek Here are two major changes which should go together. First is adding LL Temac driver to u-boot and the second is changing Emaclite to NET_MULTI api. There are some changes for proper initialization too. Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- .../xilinx/microblaze-generic/microblaze-generic.c | 16 + drivers/net/Makefile |1 + drivers/net/xilinx_emaclite.c | 42 ++- drivers/net/xilinx_ll_temac.c | 567 include/configs/microblaze-generic.h |2 + include/netdev.h |2 + lib_microblaze/board.c | 21 +- 7 files changed, 634 insertions(+), 17 deletions(-) create mode 100644 drivers/net/xilinx_ll_temac.c diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index f388b77..4ad9eb6 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -67,3 +68,18 @@ void fsl_init2 (void) { NULL); } #endif + +int board_eth_init(bd_t *bis) +{ + /* +* This board either has PCI NICs or uses the CPU's TSECs +* pci_eth_init() will return 0 if no NICs found, so in that case +* returning -1 will force cpu_eth_init() to be called. +*/ +#ifdef CONFIG_XILINX_EMACLITE + return xilinx_emaclite_initialize(bis); +#endif +#ifdef CONFIG_XILINX_LL_TEMAC + return xilinx_ll_temac_initialize(bis); +#endif +} diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 1c6e402..98cb3a1 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -74,6 +74,7 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o +COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index cf39573..e437d16 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #undef DEBUG @@ -79,7 +80,7 @@ static u8 emacaddr[ENET_ADDR_LENGTH] = { 0x00, 0x0a, 0x35, 0x00, 0x22, 0x01 }; static u8 emacaddr[ENET_ADDR_LENGTH]; #endif -void xemaclite_alignedread (u32 * srcptr, void *destptr, unsigned bytecount) +static void xemaclite_alignedread (u32 * srcptr, void *destptr, unsigned bytecount) { unsigned int i; u32 alignbuffer; @@ -106,7 +107,7 @@ void xemaclite_alignedread (u32 * srcptr, void *destptr, unsigned bytecount) } } -void xemaclite_alignedwrite (void *srcptr, u32 destptr, unsigned bytecount) +static void xemaclite_alignedwrite (void *srcptr, u32 destptr, unsigned bytecount) { unsigned i; u32 alignbuffer; @@ -133,12 +134,12 @@ void xemaclite_alignedwrite (void *srcptr, u32 destptr, unsigned bytecount) *to32ptr++ = alignbuffer; } -void eth_halt (void) +static void emaclite_halt(struct eth_device *dev) { debug ("eth_halt\n"); } -int eth_init (bd_t * bis) +static int emaclite_init(struct eth_device *dev, bd_t *bis) { uchar enetaddr[6]; @@ -193,7 +194,7 @@ int eth_init (bd_t * bis) return 0; } -int xemaclite_txbufferavailable (xemaclite * instanceptr) +static int xemaclite_txbufferavailable (xemaclite * instanceptr) { u32 reg; u32 txpingbusy; @@ -215,8 +216,8 @@ int xemaclite_txbufferavailable (xemaclite * instanceptr) return (!(txpingbusy && txpongbusy)); } -int eth_send (volatile void *ptr, int len) { - +static int emaclite_send (struct eth_device *dev, volatile void *ptr, int len) +{ unsigned int reg; unsigned int baseaddress; @@ -292,7 +293,8 @@ int eth_send (volatile void *ptr, int len) { return 0; } -int eth_rx (void) + +static int emaclite_recv(struct eth_device *dev) { unsigned int length; unsigned int reg; @@ -352,3 +354,27 @@ int eth_rx (void) return 1; } + + +int xilinx_emaclite_initialize (bd_t *bis) +{ + struct eth_device *dev; + + dev = malloc(sizeof(*dev)); + if (dev == NULL) + hang(); + + memset(dev, 0, sizeof(*dev)); + sprintf(dev->name, "Xilinx Emaclite"); + + dev->iobase = 0; + dev->priv = 0; + dev->init = emaclite_init; + dev->halt = emaclite_halt; + dev->send = emaclite_send; + dev->recv = emaclite_recv; + + eth_register(dev); + + return 0; +} diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c new file mode 100644 index 000..4b42b06 --- /dev/null +++ b/drivers/net/xilinx_ll_temac.c @@ -0,0 +1,567 @@ +/* + * + * Xilinx
[U-Boot] [PATCH 1/7] qemu-mips: Fix Qemu website
From: Michal Simek Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- board/qemu-mips/README |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/board/qemu-mips/README b/board/qemu-mips/README index 4c1f8ed..565241b 100644 --- a/board/qemu-mips/README +++ b/board/qemu-mips/README @@ -2,7 +2,7 @@ By Vlad Lungu vlad.lu...@windriver.com 2007-Oct-01 Qemu is a full system emulator. See -http://fabrice.bellard.free.fr/qemu +http://www.nongnu.org/qemu/ Limitations & comments -- -- 1.5.4.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/7] microblaze: Short size of global data and fix malloc size
From: Michal Simek If is full malloc area global, data are rewrite because there was bad size of malloc area. Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- include/configs/microblaze-generic.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index beb31d3..64eb0e0 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -136,13 +136,13 @@ #defineCONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x1000) /* global pointer */ -#defineCONFIG_SYS_GBL_DATA_SIZE0x1000 /* size of global data */ +#defineCONFIG_SYS_GBL_DATA_SIZE128 /* size of global data */ /* start of global data */ #defineCONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE - CONFIG_SYS_GBL_DATA_SIZE) /* monitor code */ #defineSIZE0x4 -#defineCONFIG_SYS_MONITOR_LEN SIZE +#defineCONFIG_SYS_MONITOR_LEN (SIZE - CONFIG_SYS_GBL_DATA_SIZE) #defineCONFIG_SYS_MONITOR_BASE (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_MONITOR_LEN) #defineCONFIG_SYS_MONITOR_END (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) #defineCONFIG_SYS_MALLOC_LEN SIZE -- 1.5.4.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/1] net: Add Xilinx LL Temac driver version2
From: Michal Simek --- v2: Coding style cleanup, use debug() instead of printf in debug messages v1: Initial version Signed-off-by: Michal Simek --- drivers/net/Makefile |1 + drivers/net/xilinx_ll_temac.c | 540 + 2 files changed, 541 insertions(+), 0 deletions(-) create mode 100644 drivers/net/xilinx_ll_temac.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 631336a..1e80698 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -68,6 +68,7 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o +COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o COBJS-$(CONFIG_SH_ETHER) += sh_eth.o COBJS := $(COBJS-y) diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c new file mode 100644 index 000..e17c97e --- /dev/null +++ b/drivers/net/xilinx_ll_temac.c @@ -0,0 +1,540 @@ +/* + * Xilinx xps_ll_temac ethernet driver for u-boot + * + * Author: Yoshio Kashiwagi kashiw...@co-nss.co.jp + * + * Copyright (C) 2008 Nissin Systems Co.,Ltd. + * March 2008 created + * + * Copyright (C) 2008 - 2009 Michal Simek + * June 2008 Microblaze optimalization, FIFO mode support + * + * 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. + */ + +#include +#include +#include +#include +#include +#include + +#ifdef XILINX_LLTEMAC_FIFO_BASEADDR +# define FIFO_MODE 1 +#elif XILINX_LLTEMAC_SDMA_CTRL_BASEADDR +# define SDMA_MODE 1 +#else +# error Unsupported mode +#endif + +#undef ETH_HALTING + +#ifdef SDMA_MODE +/* XPS_LL_TEMAC SDMA registers definition */ +# define TX_NXTDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x00) +# define TX_CURBUF_ADDR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x04) +# define TX_CURBUF_LENGTH (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x08) +# define TX_CURDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x0c) +# define TX_TAILDESC_PTR (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x10) +# define TX_CHNL_CTRL (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x14) +# define TX_IRQ_REG(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x18) +# define TX_CHNL_STS (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x1c) + +# define RX_NXTDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x20) +# define RX_CURBUF_ADDR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x24) +# define RX_CURBUF_LENGTH (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x28) +# define RX_CURDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x2c) +# define RX_TAILDESC_PTR (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x30) +# define RX_CHNL_CTRL (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x34) +# define RX_IRQ_REG(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x38) +# define RX_CHNL_STS (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x3c) + +# define DMA_CONTROL_REG (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x40) +#endif + +/* XPS_LL_TEMAC direct registers definition */ +#define TEMAC_RAF0 (XILINX_LLTEMAC_BASEADDR + 0x00) +#define TEMAC_TPF0 (XILINX_LLTEMAC_BASEADDR + 0x04) +#define TEMAC_IFGP0(XILINX_LLTEMAC_BASEADDR + 0x08) +#define TEMAC_IS0 (XILINX_LLTEMAC_BASEADDR + 0x0c) +#define TEMAC_IP0 (XILINX_LLTEMAC_BASEADDR + 0x10) +#define TEMAC_IE0 (XILINX_LLTEMAC_BASEADDR + 0x14) + +#define TEMAC_MSW0 (XILINX_LLTEMAC_BASEADDR + 0x20) +#define TEMAC_LSW0 (XILINX_LLTEMAC_BASEADDR + 0x24) +#define TEMAC_CTL0 (XILINX_LLTEMAC_BASEADDR + 0x28) +#define TEMAC_RDY0 (XILINX_LLTEMAC_BASEADDR + 0x2c) + +#define XTE_RSE_MIIM_RR_MASK 0x0002 +#define XTE_RSE_MIIM_WR_MASK 0x0004 +#define XTE_RSE_CFG_RR_MASK0x0020 +#define XTE_RSE_CFG_WR_MASK0x0040 + +/* XPS_LL_TEMAC indirect registers offset definition */ + +#define RCW0 0x200 +#define RCW1 0x240 +#define TC 0x280 +#define FCC0x2c0 +#define EMMC 0x300 +#define PHYC 0x320 +#define MC 0x340 +#define UAW0 0x380 +#define UAW1 0x384 +#define MAW0 0x388 +#define MAW1 0x38c +#define AFM0x390 +#define TIS0x3a0 +#define TIE0x3a4 +#define MIIMWD 0x3b0 +#define MIIMAI 0x3b4 + +#define CNTLREG_WRITE_ENABLE_MASK 0x8000 +#define CNTLREG_EMAC1SEL_MASK 0x0400 +#define CNTLREG_ADDRESSCODE_MASK 0x03ff + +#define MDIO_ENABLE_MASK 0x40 +#define MDIO_CLOCK_DIV_MASK0x3F +#define MDIO_CLOCK_DIV_100MHz 0x28 + +#define ETHER_MTU 1520 + +#ifdef SDMA_MODE +/* CDMAC descriptor status bit definitions */ +# define BDSTAT_ERROR_MASK 0x80 +# define BDSTAT_INT_ON_END_MASK0x40 +# define BDSTAT_STO
[U-Boot] [PATCH 1/4] microblaze: Rename ml401 to microblaze-generic
f /* !FLASH */ + +/* system ace */ +#ifdef XILINX_SYSACE_BASEADDR + #define CONFIG_SYSTEMACE + /* #define DEBUG_SYSTEMACE */ + #define SYSTEMACE_CONFIG_FPGA + #define CONFIG_SYS_SYSTEMACE_BASE XILINX_SYSACE_BASEADDR + #define CONFIG_SYS_SYSTEMACE_WIDTH XILINX_SYSACE_MEM_WIDTH + #define CONFIG_DOS_PARTITION +#endif + +/* + * BOOTP options + */ +#define CONFIG_BOOTP_BOOTFILESIZE +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME + +/* + * Command line configuration. + */ +#include + +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_IRQ +#define CONFIG_CMD_MFSL + +#ifndef CONFIG_SYS_ENET + #undef CONFIG_CMD_NET +#else + #define CONFIG_CMD_PING +#endif + +#if defined(CONFIG_SYSTEMACE) + #define CONFIG_CMD_EXT2 + #define CONFIG_CMD_FAT +#endif + +#if defined(FLASH) + #define CONFIG_CMD_ECHO + #define CONFIG_CMD_FLASH + #define CONFIG_CMD_IMLS + #define CONFIG_CMD_JFFS2 + + #if !defined(RAMENV) + #define CONFIG_CMD_ENV + #define CONFIG_CMD_SAVES + #endif +#else + #undef CONFIG_CMD_FLASH +#endif + +#if defined(CONFIG_CMD_JFFS2) +/* JFFS2 partitions */ +#define CONFIG_JFFS2_CMDLINE /* mtdparts command line support */ +#define MTDIDS_DEFAULT "nor0=ml401-0" + +/* default mtd partition table */ +#define MTDPARTS_DEFAULT "mtdparts=ml401-0:256k(u-boot),"\ + "256k(env),3m(kernel),1m(romfs),"\ + "1m(cramfs),-(jffs2)" +#endif + +/* Miscellaneous configurable options */ +#defineCONFIG_SYS_PROMPT "U-Boot-mONStR> " +#defineCONFIG_SYS_CBSIZE 512 /* size of console buffer */ +#defineCONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* print buffer size */ +#defineCONFIG_SYS_MAXARGS 15 /* max number of command args */ +#defineCONFIG_SYS_LONGHELP +#defineCONFIG_SYS_LOAD_ADDR0x1200 /* default load address */ + +#defineCONFIG_BOOTDELAY30 +#defineCONFIG_BOOTARGS "root=romfs" +#defineCONFIG_HOSTNAME "ml401" +#defineCONFIG_BOOTCOMMAND "base 0;tftp 1100 image.img;bootm" +#defineCONFIG_IPADDR 192.168.0.3 +#defineCONFIG_SERVERIP 192.168.0.5 +#defineCONFIG_GATEWAYIP192.168.0.1 +#defineCONFIG_ETHADDR 00:E0:0C:00:00:FD + +/* architecture dependent code */ +#defineCONFIG_SYS_USR_EXCEP/* user exception */ +#define CONFIG_SYS_HZ 1000 + +#defineCONFIG_PREBOOT "echo U-BOOT for ML401;setenv preboot;echo" + +#defineCONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0" /* hardware flash protection */\ + "nor0=ml401-0\0"\ + "mtdparts=mtdparts=ml401-0:"\ + "256k(u-boot),256k(env),3m(kernel),"\ + "1m(romfs),1m(cramfs),-(jffs2)\0" + +#define CONFIG_CMDLINE_EDITING + +#endif /* __CONFIG_H */ diff --git a/include/configs/ml401.h b/include/configs/ml401.h deleted file mode 100644 index c802dcb..000 --- a/include/configs/ml401.h +++ /dev/null @@ -1,281 +0,0 @@ -/* - * (C) Copyright 2007-2008 Michal Simek - * - * Michal SIMEK - * - * 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 - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include "../board/xilinx/ml401/xparameters.h" - -#defineCONFIG_MICROBLAZE 1 /* MicroBlaze CPU */ -#defineMICROBLAZE_V5 1 -#defineCONFIG_ML4011 /* ML401 Board */ - -/* uart */ -#ifdef XILINX_UARTLITE_BASEADDR -#defineCONFIG_XILINX_UARTLITE -#defineCONFIG_SERIAL_BASE XILINX_UARTLITE_BASEADDR -#defineCONFIG_BAUDRATE XILINX_UARTLITE_BAUDRATE -#defineCONFIG_SYS_BAUDRATE_TABLE { CONFIG_BAUDRATE } -#elif XILINX_UART16550_BASEADDR -#define CONFIG_SY
[U-Boot] [PATCH 3/4] microblaze: Add bootup messages to board.c
From: Michal Simek Signed-off-by: Michal Simek --- lib_microblaze/board.c | 31 +-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/lib_microblaze/board.c b/lib_microblaze/board.c index 4f48341..7b0bdc2 100644 --- a/lib_microblaze/board.c +++ b/lib_microblaze/board.c @@ -112,6 +112,10 @@ void board_init (void) #if defined(CONFIG_CMD_FLASH) ulong flash_size = 0; #endif +#if defined(CONFIG_CMD_NET) + char *s, *e; + int i; +#endif asm ("nop");/* FIXME gd is not initialize - wait */ memset ((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE); gd->bd = (bd_t *) (gd + 1); /* At end of global data */ @@ -132,11 +136,35 @@ void board_init (void) } } + puts ("SDRAM :\n"); + puts ("\tEnabling caches :\n"); + printf ("\t\tIcache:%s\n", icache_status() ? "OK" : "FAIL"); + printf ("\t\tDcache:%s\n", dcache_status() ? "OK" : "FAIL"); + printf ("\tU-Boot Start:0x%08lx\n", TEXT_BASE); + #if defined(CONFIG_CMD_FLASH) + puts ("FLASH: "); bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; if (0 < (flash_size = flash_init ())) { bd->bi_flashsize = flash_size; bd->bi_flashoffset = CONFIG_SYS_FLASH_BASE + flash_size; +# ifdef CONFIG_SYS_FLASH_CHECKSUM + print_size (flash_size, ""); + /* +* Compute and print flash CRC if flashchecksum is set to 'y' +* +* NOTE: Maybe we should add some WATCHDOG_RESET()? XXX +*/ + s = getenv ("flashchecksum"); + if (s && (*s == 'y')) { + printf (" CRC: %08X", + crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size) + ); + } + putc ('\n'); +# else /* !CONFIG_SYS_FLASH_CHECKSUM */ + print_size (flash_size, "\n"); +# endif /* CONFIG_SYS_FLASH_CHECKSUM */ } else { puts ("Flash init FAILED"); bd->bi_flashstart = 0; @@ -146,10 +174,9 @@ void board_init (void) #endif #if defined(CONFIG_CMD_NET) - char *s, *e; - int i; /* board MAC address */ s = getenv ("ethaddr"); + printf ("MAC:%s\n",s); for (i = 0; i < 6; ++i) { bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0; if (s) -- 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/4] microblaze: Add cache flush
From: Michal Simek Signed-off-by: Michal Simek --- include/configs/microblaze-generic.h | 19 ++- lib_microblaze/cache.c | 16 ++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 867f885..4c6cc9f 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -194,6 +194,18 @@ #define CONFIG_DOS_PARTITION #endif +#if defined(XILINX_USE_ICACHE) + #define CONFIG_ICACHE +#else + #undef CONFIG_ICACHE +#endif + +#if defined(XILINX_USE_DCACHE) + #define CONFIG_DCACHE +#else + #undef CONFIG_DCACHE +#endif + /* * BOOTP options */ @@ -208,11 +220,16 @@ #include #define CONFIG_CMD_ASKENV -#define CONFIG_CMD_CACHE #define CONFIG_CMD_IRQ #define CONFIG_CMD_MFSL #define CONFIG_CMD_ECHO +#if defined(CONFIG_DCACHE) || defined(CONFIG_ICACHE) + #define CONFIG_CMD_CACHE +#else + #undef CONFIG_CMD_CACHE +#endif + #ifndef CONFIG_SYS_ENET #undef CONFIG_CMD_NET #else diff --git a/lib_microblaze/cache.c b/lib_microblaze/cache.c index a2f7493..4b2e8e3 100644 --- a/lib_microblaze/cache.c +++ b/lib_microblaze/cache.c @@ -26,6 +26,18 @@ void flush_cache (ulong addr, ulong size) { - /* MicroBlaze have write thruough cache. nothing to do. */ - return; + int i; + for (i = 0; i < size; i += 4) + asm volatile ( +#ifdef CONFIG_ICACHE + "wic%0, r0;" +#endif + "nop;" +#ifdef CONFIG_DCACHE + "wdc%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] [PATCH 2/4] microblaze: Change microblaze-generic config file
From: Michal Simek Signed-off-by: Michal Simek --- board/xilinx/microblaze-generic/xparameters.h |2 + include/configs/microblaze-generic.h | 99 + 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/board/xilinx/microblaze-generic/xparameters.h b/board/xilinx/microblaze-generic/xparameters.h index d805061..fae03bf 100644 --- a/board/xilinx/microblaze-generic/xparameters.h +++ b/board/xilinx/microblaze-generic/xparameters.h @@ -25,6 +25,8 @@ * Version: Xilinx EDK 8.2.02 EDK_Im_Sp2.4 */ +#define XILINX_BOARD_NAME microblaze-generic + /* System Clock Frequency */ #define XILINX_CLOCK_FREQ 1 diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index ed4bf6d..867f885 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -32,24 +32,26 @@ /* uart */ #ifdef XILINX_UARTLITE_BASEADDR -#defineCONFIG_XILINX_UARTLITE -#defineCONFIG_SERIAL_BASE XILINX_UARTLITE_BASEADDR -#defineCONFIG_BAUDRATE XILINX_UARTLITE_BAUDRATE -#defineCONFIG_SYS_BAUDRATE_TABLE { CONFIG_BAUDRATE } + #define CONFIG_XILINX_UARTLITE + #define CONFIG_SERIAL_BASE XILINX_UARTLITE_BASEADDR + #define CONFIG_BAUDRATE XILINX_UARTLITE_BAUDRATE + #define CONFIG_SYS_BAUDRATE_TABLE { CONFIG_BAUDRATE } + #define CONSOLE_ARG "console=console=ttyUL0,115200\0" #elif XILINX_UART16550_BASEADDR -#define CONFIG_SYS_NS16550 1 -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE-4 -#define CONFIG_CONS_INDEX 1 -#define CONFIG_SYS_NS16550_COM1(XILINX_UART16550_BASEADDR + 0x1000 + 0x3) -#define CONFIG_SYS_NS16550_CLK XILINX_UART16550_CLOCK_HZ -#defineCONFIG_BAUDRATE 115200 - -/* The following table includes the supported baudrates */ -#define CONFIG_SYS_BAUDRATE_TABLE \ - {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} + #define CONFIG_SYS_NS16550 1 + #define CONFIG_SYS_NS16550_SERIAL + #define CONFIG_SYS_NS16550_REG_SIZE -4 + #define CONFIG_CONS_INDEX 1 + #define CONFIG_SYS_NS16550_COM1 (XILINX_UART16550_BASEADDR + 0x1000 + 0x3) + #define CONFIG_SYS_NS16550_CLK XILINX_UART16550_CLOCK_HZ + #define CONFIG_BAUDRATE 115200 + + /* The following table includes the supported baudrates */ + #define CONFIG_SYS_BAUDRATE_TABLE \ + {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} + #define CONSOLE_ARG "console=console=ttyS0,115200\0" #else -#error Undefined uart + #error Undefined uart #endif /* setting reset address */ @@ -57,44 +59,44 @@ /* ethernet */ #ifdef XILINX_EMAC_BASEADDR -#define CONFIG_XILINX_EMAC 1 -#define CONFIG_SYS_ENET -#else -#ifdef XILINX_EMACLITE_BASEADDR -#define CONFIG_XILINX_EMACLITE 1 -#define CONFIG_SYS_ENET -#endif + #define CONFIG_XILINX_EMAC 1 + #define CONFIG_SYS_ENET +#elif XILINX_EMACLITE_BASEADDR + #define CONFIG_XILINX_EMACLITE 1 + #define CONFIG_SYS_ENET +#elif XILINX_LLTEMAC_BASEADDR + #define CONFIG_XILINX_LL_TEMAC 1 + #define CONFIG_SYS_ENET #endif + #undef ET_DEBUG /* gpio */ #ifdef XILINX_GPIO_BASEADDR -#defineCONFIG_SYS_GPIO_0 1 -#defineCONFIG_SYS_GPIO_0_ADDR XILINX_GPIO_BASEADDR + #define CONFIG_SYS_GPIO_0 1 + #define CONFIG_SYS_GPIO_0_ADDR XILINX_GPIO_BASEADDR #endif /* interrupt controller */ #ifdef XILINX_INTC_BASEADDR -#defineCONFIG_SYS_INTC_0 1 -#defineCONFIG_SYS_INTC_0_ADDR XILINX_INTC_BASEADDR -#defineCONFIG_SYS_INTC_0_NUM XILINX_INTC_NUM_INTR_INPUTS + #define CONFIG_SYS_INTC_0 1 + #define CONFIG_SYS_INTC_0_ADDR XILINX_INTC_BASEADDR + #define CONFIG_SYS_INTC_0_NUM XILINX_INTC_NUM_INTR_INPUTS #endif /* timer */ #ifdef XILINX_TIMER_BASEADDR -#if (XILINX_TIMER_IRQ != -1) -#defineCONFIG_SYS_TIMER_0 1 -#defineCONFIG_SYS_TIMER_0_ADDR XILINX_TIMER_BASEADDR -#defineCONFIG_SYS_TIMER_0_IRQ XILINX_TIMER_IRQ -#defineFREQUENCE XILINX_CLOCK_FREQ -#defineCONFIG_SYS_TIMER_0_PRELOAD ( FREQUENCE/1000 ) -#endif -#else -#ifdef XILINX_CLOCK_FREQ -#defineCONFIG_XILINX_CLOCK_FREQXILINX_CLOCK_FREQ + #if (XILINX_TIMER_IRQ != -1) + #define CONFIG_SYS_TIMER_0 1 + #define CONFIG_SYS_TIMER_0_ADDR XILINX_TIMER_BASEADDR + #define CONFIG_SYS_TIMER_0_IRQ XILINX_TIMER_IRQ + #define FREQUENCE XILINX_CLOCK_FREQ + #define CONFIG_SYS_TIMER_0_PRELOAD ( FREQUENCE/1000 ) + #endif +#elif XILINX_CLOCK_FREQ + #defin
[U-Boot] [PATCH 2/2] net: Add Xilinx LL Temac driver
From: Michal Simek Signed-off-by: Michal Simek --- drivers/net/Makefile |1 + drivers/net/xilinx_ll_temac.c | 543 + 2 files changed, 544 insertions(+), 0 deletions(-) create mode 100644 drivers/net/xilinx_ll_temac.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 128dc11..ed64787 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -69,6 +69,7 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o +COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c new file mode 100644 index 000..d1e63e2 --- /dev/null +++ b/drivers/net/xilinx_ll_temac.c @@ -0,0 +1,543 @@ +/* + * + * Xilinx xps_ll_temac ethernet driver for u-boot + * + * Author: Yoshio Kashiwagi kashiw...@co-nss.co.jp + * + * Copyright (C) 2008 Nissin Systems Co.,Ltd. + * March 2008 created + * + * Copyright (C) 2008 - 2009 Michal Simek + * June 2008 Microblaze optimalization, FIFO mode support + * + * 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. + * + */ + +#include +#include +#include +#include +#include +#include + +#ifdef XILINX_LLTEMAC_FIFO_BASEADDR +# define FIFO_MODE 1 +#elif XILINX_LLTEMAC_SDMA_CTRL_BASEADDR +# define SDMA_MODE 1 +#else +# error Unsupported mode +#endif + +#undef ETH_HALTING + +#ifdef SDMA_MODE +/* XPS_LL_TEMAC SDMA registers definition */ +# define TX_NXTDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x00) +# define TX_CURBUF_ADDR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x04) +# define TX_CURBUF_LENGTH (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x08) +# define TX_CURDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x0c) +# define TX_TAILDESC_PTR (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x10) +# define TX_CHNL_CTRL (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x14) +# define TX_IRQ_REG(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x18) +# define TX_CHNL_STS (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x1c) + +# define RX_NXTDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x20) +# define RX_CURBUF_ADDR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x24) +# define RX_CURBUF_LENGTH (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x28) +# define RX_CURDESC_PTR(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x2c) +# define RX_TAILDESC_PTR (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x30) +# define RX_CHNL_CTRL (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x34) +# define RX_IRQ_REG(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x38) +# define RX_CHNL_STS (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x3c) + +# define DMA_CONTROL_REG (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x40) +#endif + +/* XPS_LL_TEMAC direct registers definition */ +#define TEMAC_RAF0 (XILINX_LLTEMAC_BASEADDR + 0x00) +#define TEMAC_TPF0 (XILINX_LLTEMAC_BASEADDR + 0x04) +#define TEMAC_IFGP0(XILINX_LLTEMAC_BASEADDR + 0x08) +#define TEMAC_IS0 (XILINX_LLTEMAC_BASEADDR + 0x0c) +#define TEMAC_IP0 (XILINX_LLTEMAC_BASEADDR + 0x10) +#define TEMAC_IE0 (XILINX_LLTEMAC_BASEADDR + 0x14) + +#define TEMAC_MSW0 (XILINX_LLTEMAC_BASEADDR + 0x20) +#define TEMAC_LSW0 (XILINX_LLTEMAC_BASEADDR + 0x24) +#define TEMAC_CTL0 (XILINX_LLTEMAC_BASEADDR + 0x28) +#define TEMAC_RDY0 (XILINX_LLTEMAC_BASEADDR + 0x2c) + +#define XTE_RSE_MIIM_RR_MASK 0x0002 +#define XTE_RSE_MIIM_WR_MASK 0x0004 +#define XTE_RSE_CFG_RR_MASK0x0020 +#define XTE_RSE_CFG_WR_MASK0x0040 + +/* XPS_LL_TEMAC indirect registers offset definition */ + +#define RCW0 0x200 +#define RCW1 0x240 +#define TC 0x280 +#define FCC0x2c0 +#define EMMC 0x300 +#define PHYC 0x320 +#define MC 0x340 +#define UAW0 0x380 +#define UAW1 0x384 +#define MAW0 0x388 +#define MAW1 0x38c +#define AFM0x390 +#define TIS0x3a0 +#define TIE0x3a4 +#define MIIMWD 0x3b0 +#define MIIMAI 0x3b4 + +#define CNTLREG_WRITE_ENABLE_MASK 0x8000 +#define CNTLREG_EMAC1SEL_MASK 0x0400 +#define CNTLREG_ADDRESSCODE_MASK 0x03ff + +#define MDIO_ENABLE_MASK 0x40 +#define MDIO_CLOCK_DIV_MASK0x3F +#define MDIO_CLOCK_DIV_100MHz 0x28 + +#define ETHER_MTU 1520 + +#ifdef SDMA_MODE +/* CDMAC descriptor status bit definitions */ +# define BDSTAT_ERROR_MASK 0x80 +# define BDSTAT_INT_ON_END_MASK0x40 +# define BDSTAT_STOP_ON_END_MASK 0x20 +# define BDSTAT_COMPLETED_MASK 0x10 +# define BDSTAT_SOP_MASK
[U-Boot] Xilinx LL-TEMAC driver
Hi Ben and Wolfgang, first patch just sort labels in drivers/net/Makefile I think this patch could be applied directly to Wolfgang tree. The second patch is Xilinx LL Temac driver. This driver was sent to mailing list some month ago by Yoshio Kashiwagi. I clean the driver and add support for Fifo mode. This driver is tested on some Microblaze boards. There is one part which should be rework in future. (FIXME comment) It is about PHY lib which we discussed in past. I believe that this part won't be a problem. Thanks for your comments, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] net: Sort Makefile labels
From: Michal Simek Signed-off-by: Michal Simek --- drivers/net/Makefile |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 631336a..128dc11 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libnet.a COBJS-$(CONFIG_DRIVER_3C589) += 3c589.o +COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o COBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 5701rls.o COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o @@ -54,11 +55,11 @@ COBJS-$(CONFIG_NS8382X) += ns8382x.o COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o COBJS-$(CONFIG_PCNET) += pcnet.o COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o -COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o COBJS-$(CONFIG_RTL8139) += rtl8139.o COBJS-$(CONFIG_RTL8169) += rtl8169.o COBJS-$(CONFIG_DRIVER_S3C4510_ETH) += s3c4510b_eth.o +COBJS-$(CONFIG_SH_ETHER) += sh_eth.o COBJS-$(CONFIG_DRIVER_SMC9) += smc9.o COBJS-$(CONFIG_DRIVER_SMC911X) += smc911x.o COBJS-$(CONFIG_TIGON3) += tigon3.o bcm570x_autoneg.o 5701rls.o @@ -68,7 +69,6 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o -COBJS-$(CONFIG_SH_ETHER) += sh_eth.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) -- 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/1] microblaze: Remove XUPV2P board
XILINX_CLOCK_FREQ -#defineCONFIG_SYS_TIMER_0_PRELOAD ( FREQUENCE/1000 ) -#endif -#else -#ifdef XILINX_CLOCK_FREQ -#defineCONFIG_XILINX_CLOCK_FREQXILINX_CLOCK_FREQ -#else -#error BAD CLOCK FREQ -#endif -#endif -/* - * memory layout - Example - * TEXT_BASE = 0x3600_; - * CONFIG_SYS_SRAM_BASE = 0x3000_; - * CONFIG_SYS_SRAM_SIZE = 0x1000_; - * - * CONFIG_SYS_GBL_DATA_OFFSET = 0x3000_ + 0x1000_ - 0x1000 = 0x3FFF_F000 - * CONFIG_SYS_MONITOR_BASE = 0x3FFF_F000 - 0x4 = 0x3FFB_F000 - * CONFIG_SYS_MALLOC_BASE = 0x3FFB_F000 - 0x4 = 0x3FF7_F000 - * - * 0x3000_ CONFIG_SYS_SDRAM_BASE - * FREE - * 0x3600_ TEXT_BASE - * U-BOOT code - * 0x3602_ - * FREE - * - * STACK - * 0x3FF7_F000 CONFIG_SYS_MALLOC_BASE - * MALLOC_AREA 256kB Alloc - * 0x3FFB_F000 CONFIG_SYS_MONITOR_BASE - * MONITOR_CODE256kB Env - * 0x3FFF_F000 CONFIG_SYS_GBL_DATA_OFFSET - * GLOBAL_DATA 4kB bd, gd - * 0x4000_ CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE - */ - -/* ddr sdram - main memory */ -#defineCONFIG_SYS_SDRAM_BASE XILINX_RAM_START -#defineCONFIG_SYS_SDRAM_SIZE XILINX_RAM_SIZE -#defineCONFIG_SYS_MEMTEST_STARTCONFIG_SYS_SDRAM_BASE -#defineCONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x1000) - -/* global pointer */ -#defineCONFIG_SYS_GBL_DATA_SIZE0x1000 /* size of global data */ -#defineCONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE - CONFIG_SYS_GBL_DATA_SIZE) /* start of global data */ - -/* monitor code */ -#defineSIZE0x4 -#defineCONFIG_SYS_MONITOR_LEN SIZE -#defineCONFIG_SYS_MONITOR_BASE (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_MONITOR_LEN) -#defineCONFIG_SYS_MONITOR_END (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) -#defineCONFIG_SYS_MALLOC_LEN SIZE -#defineCONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN) - -/* stack */ -#defineCONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_MALLOC_BASE - -#defineCONFIG_SYS_NO_FLASH 1 -#defineCONFIG_ENV_IS_NOWHERE 1 -#defineCONFIG_ENV_SIZE 0x1000 -#defineCONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SIZE) - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - -/* - * Command line configuration. - */ -#include - -#undef CONFIG_CMD_FLASH -#undef CONFIG_CMD_JFFS2 -#undef CONFIG_CMD_IMLS - -#define CONFIG_CMD_ASKENV -#define CONFIG_CMD_CACHE -#define CONFIG_CMD_IRQ - -#ifndef CONFIG_SYS_ENET - #undef CONFIG_CMD_NET -#else - #define CONFIG_CMD_PING -#endif - -#ifdef XILINX_SYSACE_BASEADDR -#define CONFIG_CMD_EXT2 -#define CONFIG_CMD_FAT -#endif - -/* Miscellaneous configurable options */ -#defineCONFIG_SYS_PROMPT "U-Boot-mONStR> " -#defineCONFIG_SYS_CBSIZE 512 /* size of console buffer */ -#defineCONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* print buffer size */ -#defineCONFIG_SYS_MAXARGS 15 /* max number of command args */ -#defineCONFIG_SYS_LONGHELP -#defineCONFIG_SYS_LOAD_ADDR0x1200 /* default load address */ - -#defineCONFIG_BOOTDELAY30 -#defineCONFIG_BOOTARGS "root=romfs" -#defineCONFIG_HOSTNAME "xupv2p" -#defineCONFIG_BOOTCOMMAND "base 0;tftp 1100 image.img;bootm" -#defineCONFIG_IPADDR 192.168.0.3 -#defineCONFIG_SERVERIP 192.168.0.5 -#defineCONFIG_GATEWAYIP192.168.0.1 -#defineCONFIG_ETHADDR 00:E0:0C:00:00:FD - -/* architecture dependent code */ -#defineCONFIG_SYS_USR_EXCEP/* user exception */ -#define CONFIG_SYS_HZ 1000 - -#define CONFIG_PREBOOT "echo U-BOOT by mONStR;"\ - "base 0;" \ - "echo" - -/* system ace */ -#ifdef XILINX_SYSACE_BASEADDR -#defineCONFIG_SYSTEMACE -/* #define DEBUG_SYSTEMACE */ -#defineSYSTEMACE_CONFIG_FPGA -#defineCONFIG_SYS_SYSTEMACE_BASE XILINX_SYSACE_BASEADDR -#defineCONFIG_SYS_SYSTEMACE_WIDTH XILINX_SYSACE_MEM_WIDTH -#defineCONFIG_DOS_PARTITION -#endif - -#define CONFIG_CMDLINE_EDITING - -#endif /* __CONFIG_H */ -- 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/1] ppc4xx: ml300 remove Xilinx BSP from ml300 folder
From: Michal Simek <[EMAIL PROTECTED]> --- This BSP should be outside u-boot source tree. The second reason is that xilinx ppc405 was moved to generic platform. Signed-off-by: Michal Simek <[EMAIL PROTECTED]> --- .../ml300/sw_services/uboot_v1_00_a/data/Ltypes| 55 .../uboot_v1_00_a/data/uboot_v2_1_0.mld| 52 --- .../uboot_v1_00_a/data/uboot_v2_1_0.tcl| 325 3 files changed, 0 insertions(+), 432 deletions(-) delete mode 100644 board/xilinx/ml300/sw_services/uboot_v1_00_a/data/Ltypes delete mode 100644 board/xilinx/ml300/sw_services/uboot_v1_00_a/data/uboot_v2_1_0.mld delete mode 100644 board/xilinx/ml300/sw_services/uboot_v1_00_a/data/uboot_v2_1_0.tcl diff --git a/board/xilinx/ml300/sw_services/uboot_v1_00_a/data/Ltypes b/board/xilinx/ml300/sw_services/uboot_v1_00_a/data/Ltypes deleted file mode 100644 index 9daf147..000 --- a/board/xilinx/ml300/sw_services/uboot_v1_00_a/data/Ltypes +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -if [ $# -ne 1 ] -then -echo "usage: Ltypes filename" >&2 -exit 2 -fi - -FILE="$1" -#TMPFILE='mktemp "${FILE}.XX"' || exit 1 -TMPFILE=${FILE}.`date "+%s"` -touch $TMPFILE || exit 1 - -# Change all the Xilinx types to Linux types and put the result into a temp file -sed\ - -e 's/\bXTRUE\b/TRUE/g' \ - -e 's/\bXFALSE\b/FALSE/g' \ - -e 's/\bXNULL\b/NULL/g' \ - -e 's/"xenv.h"//g' \ - -e 's/\bXENV_USLEEP\b/udelay/g' \ - -e 's/\bXuint8\b/u8/g' \ - -e 's/\bXuint16\b/u16/g' \ - -e 's/\bXuint32\b/u32/g' \ - -e 's/\bXint8\b/s8/g' \ - -e 's/\bXint16\b/s16/g' \ - -e 's/\bXint32\b/s32/g' \ - -e 's/\bXboolean\b/u32/g' \ - "${FILE}" > "${TMPFILE}" - -# Overlay the original file with the temp file -mv "${TMPFILE}" "${FILE}" - -# Are we doing xbasic_types.h? -if [ "${FILE##*/}" = xbasic_types.h ] -then -# Remember as you're reading this that we've already gone through the prior -# sed script. We need to do some other things to xbasic_types.h: -# 1) Add ifndefs around TRUE and FALSE defines -# 2) Remove definition of NULL as NULL -# 3) Replace most of the primitive types section with a #include -sed \ - -e '/u32 true/,/#define false/Ic\ -#ifndef TRUE\ -#define TRUE 1\ -#endif\ -#ifndef FALSE\ -#define FALSE 0\ -#endif' \ - -e '/#define[[:space:]][[:space:]]*NULL[[:space:]][[:space:]]*NULL/d' \ - -e '/typedef[[:space:]][[:space:]]*unsigned[[:space:]][[:space:]]*char[[:space:]][[:space:]]*u8/,/typedef[[:space:]][[:space:]]*unsigned[[:space:]][[:space:]]*long[[:space:]][[:space:]]*u32.*boolean/c\ -#include ' \ - "${FILE}" > "${TMPFILE}" - -mv "${TMPFILE}" "${FILE}" -fi diff --git a/board/xilinx/ml300/sw_services/uboot_v1_00_a/data/uboot_v2_1_0.mld b/board/xilinx/ml300/sw_services/uboot_v1_00_a/data/uboot_v2_1_0.mld deleted file mode 100644 index 5169241..000 --- a/board/xilinx/ml300/sw_services/uboot_v1_00_a/data/uboot_v2_1_0.mld +++ /dev/null @@ -1,52 +0,0 @@ -# (c) Copyright 2004 Xilinx Inc. -# Author: Xilinx, Inc. -# -# -# 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. -# -# -# XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A -# COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS -# ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, -# XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE -# FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING -# ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. -# XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO -# THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY -# WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM -# CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND -# FITNESS FOR A PARTICULAR PURPOSE. -# -# -# Xilinx hardware products are not intended for use in life support -# appliances, devices, or systems. Use in such applications is -# expressly prohibited. -# -# -# (c) Copyright 2002-2004 Xilinx Inc. -# All rights reserved. -# -# -# 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., -# 675 Mass Ave, Cambridge, MA 02139, USA. - -OPTION psf_version = 2.1; - -BEGIN LIBRARY uboot OPTION DRC = uboot_drc; - -BEGIN ARRAY connected_periphs PROPERTY desc = "Peripherals connected to U-Boot"; -PROPERTY size = 0; -PARAM name = periph_name, desc = "Name of Peripheral connected", type = string; -END ARRAY -PARAMETER name = TARGET_DIR, desc = "Target Directory for U-Boot BSP", type = st
[U-Boot] [PATCH 4/4] microblaze: ml401, xupv2p, suzaku - add CONFIG_SYS_BOOTMAPSZ and
From: Michal Simek <[EMAIL PROTECTED]> Signed-off-by: Michal Simek <[EMAIL PROTECTED]> --- 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_BARGSIZE256 /* 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 5000 #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_BARGSIZE256 /* 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_BARGSIZE256 /* Boot Argument Buffer Size */ + #endif /* __CONFIG_H */ -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] microblaze: Fix ml401 uart16550 setting
From: Michal Simek <[EMAIL PROTECTED]> Signed-off-by: Michal Simek <[EMAIL PROTECTED]> --- 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 @@ #defineCONFIG_SERIAL_BASE XILINX_UARTLITE_BASEADDR #defineCONFIG_BAUDRATE XILINX_UARTLITE_BAUDRATE #defineCONFIG_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_SIZE4 +#define CONFIG_SYS_NS16550_REG_SIZE-4 #define CONFIG_CONS_INDEX 1 -#define CONFIG_SYS_NS16550_COM1XILINX_UART16550_BASEADDR +#define CONFIG_SYS_NS16550_COM1(XILINX_UART16550_BASEADDR + 0x1000 + 0x3) #define CONFIG_SYS_NS16550_CLK XILINX_UART16550_CLOCK_HZ #defineCONFIG_BAUDRATE 115200 -#defineCONFIG_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 */ -- 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/4] FDT: Enable microblaze cpu in image.c
From: Michal Simek <[EMAIL PROTECTED]> Signed-off-by: Michal Simek <[EMAIL PROTECTED]> --- 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 -- 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/4] microblaze: Set up relocation is done
From: Michal Simek <[EMAIL PROTECTED]> Signed-off-by: Michal Simek <[EMAIL PROTECTED]> --- 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 (); -- 1.5.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot