Re: [U-Boot] [PATCH] net: ll_temac: Add LL TEMAC driver to u-boot
Mike Frysinger wrote: On Monday, August 29, 2011 07:34:12 Michal Simek wrote: --- /dev/null +++ b/drivers/net/xilinx_ll_temac.c +#include asm/processor.h what do you need from this header ? dcr for ppc. +#ifdef SDMA_MODE +static unsigned char tx_buffer[PKTSIZE_ALIGN ] __attribute((aligned(32))); +#endif +static unsigned char rx_buffer[PKTSIZE_ALIGN ] __attribute((aligned(32))); no space before that ] done. +static inline void temac_out_be32(u32 addr, u32 offset, u32 val) +{ +out_be32((u32 *)(addr + offset), val); +} + +static inline u32 temac_in_be32(u32 addr, u32 offset) +{ +return in_be32((u32 *)(addr + offset)); +} write a C struct describing the register layout, then your code can simply do: in_be32(regs-lsw0) and you don't need these two helpers Agree that there is elegant way to fix it. Look at my v2. +static int xps_ll_temac_addr_setup(struct eth_device *dev) +{ +int val; + +/* set up unicast MAC address filter */ +val = ((dev-enetaddr[3] 24) | (dev-enetaddr[2] 16) | +(dev-enetaddr[1] 8) | (dev-enetaddr[0])); +xps_ll_temac_indirect_set(dev, 0, UAW0, val); +val = (dev-enetaddr[5] 8) | dev-enetaddr[4] ; +xps_ll_temac_indirect_set(dev, 0, UAW1, val); + +return 0; +} this should be set to dev-write_hwaddr in the initialize func done. Have to look at axi_ethernet version if possible to use it. +int xilinx_ll_temac_initialize(bd_t *bis, int base_addr) the register base address really should be unsigned long and not int Agree. Probably good to fix all network devices too. Have sent v2 for ll_temac and the first version for axi_emac. Thanks, Michal P.S.: Forget to send it yesterday. -- 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] Anything missing?
Is there anything missing for this patch to be accepted? Helmut -- Scanned by MailScanner. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Anything missing?
Dear Helmut Raiger, In message 4e5de5a2.70...@hale.at you wrote: Is there anything missing for this patch to be accepted? Yes, definitely. for example, you fail to mention which patch you are talking about. 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 Quote from the Boss... I didn't say it was your fault. I said I was going to blame it on you. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] serial: uartlite: Support for SERIAL_MULTI
Add support for SERIAL MULTI for Microblaze. It can be used by other archs too. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/board.c |4 + common/serial.c | 14 drivers/serial/serial_xuartlite.c| 138 +- include/configs/microblaze-generic.h |2 + include/serial.h |9 ++- 5 files changed, 148 insertions(+), 19 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index c00d96b..3b671b8 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -31,6 +31,7 @@ #include watchdog.h #include stdio_dev.h #include net.h +#include serial.h DECLARE_GLOBAL_DATA_PTR; @@ -111,6 +112,9 @@ void board_init (void) monitor_flash_len = __end - __text_start; +#ifdef CONFIG_SERIAL_MULTI + serial_initialize(); +#endif /* * The Malloc area is immediately below the monitor copy in DRAM * aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off diff --git a/common/serial.c b/common/serial.c index 995d268..df02fa5 100644 --- a/common/serial.c +++ b/common/serial.c @@ -108,6 +108,20 @@ void serial_initialize (void) #if defined(CONFIG_SYS_BFIN_UART) serial_register_bfin_uart(); #endif +#if defined(CONFIG_XILINX_UARTLITE) +# ifdef XILINX_UARTLITE_BASEADDR + serial_register(uartlite_serial0_device); +# endif /* XILINX_UARTLITE_BASEADDR */ +# ifdef XILINX_UARTLITE_BASEADDR1 + serial_register(uartlite_serial1_device); +# endif /* XILINX_UARTLITE_BASEADDR1 */ +# ifdef XILINX_UARTLITE_BASEADDR2 + serial_register(uartlite_serial2_device); +# endif /* XILINX_UARTLITE_BASEADDR2 */ +# ifdef XILINX_UARTLITE_BASEADDR3 + serial_register(uartlite_serial3_device); +# endif /* XILINX_UARTLITE_BASEADDR3 */ +#endif /* CONFIG_XILINX_UARTLITE */ serial_assign (default_serial_console ()-name); } diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c index 00d0eaa..3e83217 100644 --- a/drivers/serial/serial_xuartlite.c +++ b/drivers/serial/serial_xuartlite.c @@ -25,20 +25,76 @@ */ #include config.h +#include common.h #include asm/io.h - -#define RX_FIFO_OFFSET 0 /* receive FIFO, read only */ -#define TX_FIFO_OFFSET 4 /* transmit FIFO, write only */ -#define STATUS_REG_OFFSET 8 /* status register, read only */ +#include linux/compiler.h +#include serial.h #define SR_TX_FIFO_FULL0x08 /* transmit FIFO full */ #define SR_RX_FIFO_VALID_DATA 0x01 /* data in receive FIFO */ #define SR_RX_FIFO_FULL0x02 /* receive FIFO full */ -#define UARTLITE_STATUS(CONFIG_SERIAL_BASE + STATUS_REG_OFFSET) -#define UARTLITE_TX_FIFO (CONFIG_SERIAL_BASE + TX_FIFO_OFFSET) -#define UARTLITE_RX_FIFO (CONFIG_SERIAL_BASE + RX_FIFO_OFFSET) +struct uartlite { + volatile u32 rx_fifo; + volatile u32 tx_fifo; + volatile u32 status; +}; + +static struct uartlite *userial_ports[4] = { +#ifdef XILINX_UARTLITE_BASEADDR + (struct uartlite *)XILINX_UARTLITE_BASEADDR, +#else + NULL, +#endif +#ifdef XILINX_UARTLITE_BASEADDR1 + (struct uartlite *)XILINX_UARTLITE_BASEADDR1, +#else + NULL, +#endif +#ifdef XILINX_UARTLITE_BASEADDR2 + (struct uartlite *)XILINX_UARTLITE_BASEADDR2, +#else + NULL, +#endif +#ifdef XILINX_UARTLITE_BASEADDR3 + (struct uartlite *)XILINX_UARTLITE_BASEADDR3 +#else + NULL +#endif +}; + +void uartlite_serial_putc(const char c, const int port) +{ + struct uartlite *regs = userial_ports[port]; + if (c == '\n') + uartlite_serial_putc('\r', port); + while (regs-status SR_TX_FIFO_FULL) + ; + regs-tx_fifo = (unsigned char) (c 0xff); +} + +void uartlite_serial_puts(const char * s, const int port) +{ + while (*s) { + uartlite_serial_putc(*s++, port); + } +} + +int uartlite_serial_getc(const int port) +{ + struct uartlite *regs = userial_ports[port]; + while (!(regs-status SR_RX_FIFO_VALID_DATA)) + ; + return regs-rx_fifo 0xff; +} + +int uartlite_serial_tstc(const int port) +{ + struct uartlite *regs = userial_ports[port]; + return regs-status SR_RX_FIFO_VALID_DATA; +} +#if !defined(CONFIG_SERIAL_MULTI) int serial_init(void) { /* FIXME: Nothing for now. We should initialize fifo, etc */ @@ -52,26 +108,72 @@ void serial_setbrg(void) void serial_putc(const char c) { - if (c == '\n') - serial_putc('\r'); - while (in_be32((u32 *) UARTLITE_STATUS) SR_TX_FIFO_FULL); - out_be32((u32 *) UARTLITE_TX_FIFO, (unsigned char) (c 0xff)); + uartlite_serial_putc(c, 0); } -void serial_puts(const char * s) +void serial_puts(const char *s) { - while (*s) { - serial_putc(*s++); - } + uartlite_serial_puts(s, 0); } int
[U-Boot] Microblaze changes
Hi, I am sending some Microblaze changes. 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 01/10] microblaze: Fix in/out_be8/16/32 functions
Use inline functions instead of macros because of typechecking. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/include/asm/io.h | 33 +++-- 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index 7e190d1..a35700e 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h @@ -46,14 +46,35 @@ #define outl(x, addr) ((void) writel (x, addr)) /* Some #definitions to keep strange Xilinx code happy */ -#define in_8(addr) readb (addr) -#define in_be16(addr) readw (addr) -#define in_be32(addr) readl (addr) +extern inline int in_8(volatile unsigned char *addr) +{ + return readb(addr); +} + +extern inline int in_be16(volatile unsigned short *addr) +{ + return readw(addr); +} -#define out_8(addr,x ) outb (x,addr) -#define out_be16(addr,x ) outw (x,addr) -#define out_be32(addr,x ) outl (x,addr) +extern inline int in_be32(volatile unsigned int *addr) +{ + return readl(addr); +} +extern inline void out_8(volatile unsigned char *addr, char val) +{ + outb (val, addr); +} + +extern inline void out_be16(volatile unsigned short *addr, short val) +{ + outw (val, addr); +} + +extern inline void out_be32(volatile unsigned int *addr, int val) +{ + outl (val, addr); +} #define inb_p(port)inb((port)) #define outb_p(val, port) outb((val), (port)) -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/10] microblaze: Support CTRL+C when tftp is running
Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/board.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index d97543b..5510c12 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -68,6 +68,7 @@ typedef int (init_fnc_t) (void); init_fnc_t *init_sequence[] = { env_init, serial_init, + console_init_f, #ifdef CONFIG_SYS_GPIO_0 gpio_init, #endif -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses
Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/board.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 5510c12..ab1cbab 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -84,6 +84,10 @@ init_fnc_t *init_sequence[] = { NULL, }; +unsigned long monitor_flash_len; +extern char *__end; +extern char *__text_start; + void board_init (void) { bd_t *bd; @@ -105,6 +109,8 @@ void board_init (void) bd-bi_memsize = CONFIG_SYS_SDRAM_SIZE; gd-flags |= GD_FLG_RELOC; /* tell others: relocation done */ + monitor_flash_len = __end - __text_start; + /* * The Malloc area is immediately below the monitor copy in DRAM * aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 04/10] microblaze: Add netconsole support
Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/board.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index ab1cbab..e8f4c5b 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -167,6 +167,12 @@ void board_init (void) /* Initialize stdio devices */ stdio_init (); + /* Initialize the jump table for applications */ + jumptable_init (); + + /* Initialize the console (after the relocation and devices init) */ + console_init_r (); + if ((s = getenv (loadaddr)) != NULL) { load_addr = simple_strtoul (s, NULL, 16); } -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 06/10] microblaze: Copy bootfile from variables
Setup bootfile. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/lib/board.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index e8f4c5b..c00d96b 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -187,6 +187,10 @@ void board_init (void) uchar enetaddr[6]; eth_getenv_enetaddr(ethaddr, enetaddr); printf(MAC: %pM\n, enetaddr); + + if ((s = getenv (bootfile)) != NULL) { + copy_filename (BootFile, s, sizeof (BootFile)); + } #endif /* main_loop */ -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians
Based on ARM unaligned.h. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/include/asm/unaligned.h | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/microblaze/include/asm/unaligned.h b/arch/microblaze/include/asm/unaligned.h index 785c2e9..faf1b02 100644 --- a/arch/microblaze/include/asm/unaligned.h +++ b/arch/microblaze/include/asm/unaligned.h @@ -1,16 +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 linux/unaligned/access_ok.h +#include linux/unaligned/le_byteshift.h +#include linux/unaligned/be_byteshift.h #include linux/unaligned/generic.h -#define get_unaligned __get_unaligned_be -#define put_unaligned __put_unaligned_be +#ifdef __MICROBLAZEEL__ +# define get_unaligned __get_unaligned_le +# define put_unaligned __put_unaligned_le +#else +# define get_unaligned __get_unaligned_be +# define put_unaligned __put_unaligned_be +#endif -#endif /* __KERNEL__ */ #endif /* _ASM_MICROBLAZE_UNALIGNED_H */ -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 07/10] microblaze: Remove debug saving value
Forget to remove debug code. Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/start.S |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 93a9efd..d3370c4 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -46,8 +46,6 @@ _start: addik r6, r0, 0x2 /* BIG/LITTLE endian offset */ swi r6, r0, 0 lbuir10, r0, 0 - swi r6, r0, 0x40 - swi r10, r0, 0x50 /* add opcode instruction for 32bit jump - 2 instruction imm brai*/ addir6, r0, 0xb000 /* hex b000 opcode imm */ -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/10] microblaze: Setup MB vectors if feature is enable for u-boot
For example: Setup reset vectors if reset address is setup. Setup user exception vector if user exception is enabled Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/start.S | 33 + 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index d3370c4..34b07d8 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -30,6 +30,12 @@ .text .global _start _start: + /* reserve registers: +* r10: Stores little/big endian offset for vectors +* r2: Stores imm opcode +* r3: Stores brai opcode +*/ + mts rmsr, r0/* disable cache */ addir1, r0, CONFIG_SYS_INIT_SP_OFFSET addir1, r1, -4 /* Decrement SP to top of memory */ @@ -47,21 +53,15 @@ _start: swi r6, r0, 0 lbuir10, r0, 0 - /* add opcode instruction for 32bit jump - 2 instruction imm brai*/ - addir6, r0, 0xb000 /* hex b000 opcode imm */ - swi r6, r0, 0x0 /* reset address */ - swi r6, r0, 0x8 /* user vector exception */ - swi r6, r0, 0x10/* interrupt */ - swi r6, r0, 0x20/* hardware exception */ - - addir6, r0, 0xb808 /* hew b808 opcode brai*/ - swi r6, r0, 0x4 /* reset address */ - swi r6, r0, 0xC /* user vector exception */ - swi r6, r0, 0x14/* interrupt */ - swi r6, r0, 0x24/* hardware exception */ + /* add opcode instruction for 32bit jump - 2 instruction imm brai */ + addir2, r0, 0xb000 /* hex b000 opcode imm */ + addir3, r0, 0xb808 /* hew b808 opcode brai */ #ifdef CONFIG_SYS_RESET_ADDRESS /* reset address */ + swi r2, r0, 0x0 /* reset address - imm opcode */ + swi r3, r0, 0x4 /* reset address - brai opcode */ + addik r6, r0, CONFIG_SYS_RESET_ADDRESS sw r6, r1, r0 lhu r7, r1, r0 @@ -88,6 +88,9 @@ _start: #ifdef CONFIG_SYS_USR_EXCEP /* user_vector_exception */ + swi r2, r0, 0x8 /* user vector exception - imm opcode */ + swi r3, r0, 0xC /* user vector exception - brai opcode */ + addik r6, r0, _exception_handler sw r6, r1, r0 /* @@ -119,6 +122,9 @@ _start: #ifdef CONFIG_SYS_INTC_0 /* interrupt_handler */ + swi r2, r0, 0x10/* interrupt - imm opcode */ + swi r3, r0, 0x14/* interrupt - brai opcode */ + addik r6, r0, _interrupt_handler sw r6, r1, r0 lhu r7, r1, r10 @@ -129,6 +135,9 @@ _start: #endif /* hardware exception */ + swi r2, r0, 0x20/* hardware exception - imm opcode */ + swi r3, r0, 0x24/* hardware exception - brai opcode */ + addik r6, r0, _hw_exception_handler sw r6, r1, r0 lhu r7, r1, r10 -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/10] microblaze: Save and restore first unused vector
Use one memory space to detect little/big endian platforms. The first unused address(0x28) is used instead 0x0 address (reset vectors). Detection rewrited reset vector setup from first stage bootloader. Workflow: 1. Store 0x28 to r7 2. Do little/big endian test 3. Restore r7 to 0x28 Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/start.S |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 34b07d8..97dd757 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -50,8 +50,10 @@ _start: * 4b) BIG endian - r10 contains 0x0 because 0x2 offset is on addr 0x3 */ addik r6, r0, 0x2 /* BIG/LITTLE endian offset */ - swi r6, r0, 0 - lbuir10, r0, 0 + lwi r7, r0, 0x28 + swi r6, r0, 0x28 /* used first unused MB vector */ + lbuir10, r0, 0x28 /* used first unused MB vector */ + swi r7, r0, 0x28 /* add opcode instruction for 32bit jump - 2 instruction imm brai */ addir2, r0, 0xb000 /* hex b000 opcode imm */ -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/10] microblaze: Clean up reset asm code
- Remove code copying - Reset address is setup from first stage bootloader - Support reset vector setup on little endian Signed-off-by: Michal Simek mon...@monstr.eu --- arch/microblaze/cpu/start.S | 25 + 1 files changed, 5 insertions(+), 20 deletions(-) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 97dd757..492ad93 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -66,26 +66,11 @@ _start: addik r6, r0, CONFIG_SYS_RESET_ADDRESS sw r6, r1, r0 - lhu r7, r1, r0 - shi r7, r0, 0x2 - shi r6, r0, 0x6 -/* - * Copy U-Boot code to CONFIG_SYS_TEXT_BASE - * solve problem with sbrk_base - */ -#if (CONFIG_SYS_RESET_ADDRESS != CONFIG_SYS_TEXT_BASE) - addir4, r0, __end - addir5, r0, __text_start - rsubr4, r5, r4 /* size = __end - __text_start */ - addir6, r0, CONFIG_SYS_RESET_ADDRESS/* source address */ - addir7, r0, 0 /* counter */ -4: - lw r8, r6, r7 - sw r8, r5, r7 - addir7, r7, 0x4 - cmp r8, r4, r7 - bltir8, 4b -#endif + lhu r7, r1, r10 + rsubi r8, r10, 0x2 + sh r7, r0, r8 + rsubi r8, r10, 0x6 + sh r6, r0, r8 #endif #ifdef CONFIG_SYS_USR_EXCEP -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] How to reduce manufacturing cost/Better LED PCBPCBA Choice
Dear Purchasing Manager, Good Day! Do you think your PCBPCBA cost is too high than other competitors? There might be Achilles' heel on your manufacturing cost. This is Allan of PCBPCBA Solutions in Taiwan. We Export PCBPCBA service to many overseas countries every year and help many companies reduce manufacturing cost and capture competitive advantage. Why they choose us repeatedly: 1. 20 years experience on PCB Solutions. 2. ISO9001:2008 Certification 3. Pilot run/small-volume with varieties. 4. Global Components Fast Source Team. 5. Prompt Delivery Time. 6. All process quality report. 7. Stable competitive price. If you are interested in our service,please don’t miss our 25th anniversary promotion: 100 Eearly Birds get our VIP Service,please contact me to stay ahead of your competitors. ……… If you don’t want to receive the Email ever again,please reply me to remove my email list,thank you! Best Regards, Allan Chang Albewell EletronicsTechnology Co.,Ltd. TEL:886-3-322-9977#265 tel:886-3-322-9977#265 FAX:886-3-353-0131 Email:sa...@albewell.com MSN:outstanding0...@hotmail.com msn:outstanding0...@hotmail.com Skype at:albewell_allan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] s5p-mmc: Fix ambiguous setting of data transfer width
Hi Chander. this patch is correct. Acked-by: Jaehoon Chung jh80.ch...@samsung.com Chander Kashyap wrote: mmc data transfer width is set as following: WIDE8[5]: 0 = Depend on WIDE4 1 = 8-bit mode WIDE4[1]: 1 = 4-bit mode 0 = 1-bit mode In case of 4-bit mode reset 8-bit mode and in case of 1-bit mode reset 8-bit mode and 4-bit mode Signed-off-by: Chander Kashyap chander.kash...@linaro.org --- drivers/mmc/s5p_mmc.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/s5p_mmc.c b/drivers/mmc/s5p_mmc.c index 7786ecf..6e6ad08 100644 --- a/drivers/mmc/s5p_mmc.c +++ b/drivers/mmc/s5p_mmc.c @@ -368,12 +368,16 @@ static void mmc_set_ios(struct mmc *mmc) * 1 = 4-bit mode * 0 = 1-bit mode */ - if (mmc-bus_width == 8) + if (mmc-bus_width == 8) { ctrl |= (1 5); - else if (mmc-bus_width == 4) + ctrl = ~(1 1); + } else if (mmc-bus_width == 4) { ctrl |= (1 1); - else + ctrl = ~(1 5); + } else { ctrl = ~(1 1); + ctrl = ~(1 5); + } /* * OUTEDGEINV[2] ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] da830: add support for NAND boot mode
On 30/08/11 13:15, nagabhushana.netagu...@ti.com wrote: From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com Add support for enabling NAND boot mode in configuration file and add correspanding pinmux support, nand initialize function in board file. Since the environment variable are stored in first block My environment variables are not stored in the first block. Where does your assumption stem from? If I use this patch on my boards here, they will all loose their environment. By moving env you are creating a compatibility issue for boards that already use NAND. CONFIG_ENV_OFFSET is set to offset 0 from (512 10) and also the size required for environment variables not more than 10KB the CONFIG_ENV_SIZE is set to 10KB from (512 10). ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] bdinfo: Fix bdinfo to show all MACs for Microblaze and ARM
- Show all ethernet MACs in the system. - Show current ethernet device Signed-off-by: Michal Simek mon...@monstr.eu --- common/cmd_bdinfo.c | 32 ++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 6051120..01441de 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -153,6 +153,11 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { +#if defined(CONFIG_CMD_NET) + struct eth_device *dev; + int i; +#endif + bd_t *bd = gd-bd; print_num(mem start ,(ulong)bd-bi_memstart); print_lnum(mem size , (u64)bd-bi_memsize); @@ -164,7 +169,17 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_num(sram size ,(ulong)bd-bi_sramsize); #endif #if defined(CONFIG_CMD_NET) - print_eth(0); + i = 0; + while (1) { + dev = eth_get_dev_by_index(i); + if (dev) { + printf(eth%dname= %s\n, i, dev-name); + print_eth(i); + } else + break; + i++; + } + printf(current eth = %s\n, eth_get_name()); printf(ip_addr = %pI4\n, bd-bi_ip_addr); #endif printf(baudrate= %ld bps\n, (ulong)bd-bi_baudrate); @@ -330,6 +345,9 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; bd_t *bd = gd-bd; +#if defined(CONFIG_CMD_NET) + struct eth_device *dev; +#endif print_num(arch_number,bd-bi_arch_number); print_num(boot_params,(ulong)bd-bi_boot_params); @@ -341,7 +359,17 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } #if defined(CONFIG_CMD_NET) - print_eth(0); + i = 0; + while (1) { + dev = eth_get_dev_by_index(i) + if (dev) { + printf(eth%dname= %s\n, i, dev-name); + print_eth(i); + } else + break; + i++; + } + printf(current eth = %s\n, eth_get_name()); printf(ip_addr = %pI4\n, bd-bi_ip_addr); #endif printf(baudrate= %d bps\n, bd-bi_baudrate); -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] da830: disable cache usage due to coherency issues
On 31/08/11 06:40, Netagunte, Nagabhushana wrote: Mike, We will address cache coherency issues soon after these patches. Earlier also, chache was disabled. Only due to new cache management Framework which was added recently, it is explicitly needed to be indicated to turn off cache. Since fixing the cache coherency issues with EMAC will take some time, I want this patch to go in mainline so that issue doesn't crop up for People who use u-boot. Regards, Nag Which device(s) does this occur on? I have a lot of OMAP-L137 (EVM and custom) boards with cache enabled and no problems tftp'ing the kernel. On the other hand tftp and kernel CRC checking are much faster with cache enabled. Nick. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tools/env: add posibility to inject configuration
If one wants to use fw_printenv/fw_setenv in special variants (eg compiled in MTD parameters without configuration file) he needs to change the sources. This patch add the posibillity to change the behaviour of fw_printenv by defining a specific configuration header at compile time. Signed-off-by: Andreas Bießmann biessm...@corscience.de --- This patch was generated after http://patchwork.ozlabs.org/patch/112349/ without that patch auto-merge may fail. .gitignore |2 + tools/env/Makefile | 12 ++- tools/env/fw_env.h | 28 +++--- tools/env/fw_env_config.h.in | 65 ++ 4 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 tools/env/fw_env_config.h.in diff --git a/.gitignore b/.gitignore index 34a2ca9..351397f 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,8 @@ /include/generated/ /lib/asm-offsets.s +/tools/env/fw_env_config.h + # stgit generated dirs patches-* .stgit-edit.txt diff --git a/tools/env/Makefile b/tools/env/Makefile index 28b73da..2109c83 100644 --- a/tools/env/Makefile +++ b/tools/env/Makefile @@ -24,12 +24,14 @@ include $(TOPDIR)/config.mk HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c -HEADERS:= fw_env.h +HEADERS:= fw_env.h $(obj)fw_env_config.h +FW_ENV_CONFIG_IN := $(if $(FW_ENV_CONFIG),$(FW_ENV_CONFIG),fw_env_config.h.in) # Compile for a hosted environment on the target HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ -idirafter $(OBJTREE)/include2 \ -idirafter $(OBJTREE)/include \ + -I $(obj) \ -DUSE_HOSTCC ifeq ($(MTD_VERSION),old) @@ -42,8 +44,14 @@ all: $(obj)fw_printenv $(obj)fw_printenv: $(HOSTSRCS) $(HEADERS) $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS) +$(obj)fw_env_config.h: $(FW_ENV_CONFIG_IN) + @cp -f $ $@ + +# add additional dependency for .depend +$(obj).depend: $(obj)fw_env_config.h + clean: - rm -f $(obj)fw_printenv + rm -f $(obj)fw_printenv $(obj)fw_env_config.h # diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 9258c79..bc67c02 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -20,30 +20,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#ifndef _FW_ENV_H_ +#define _FW_ENV_H_ -/* - * To build the utility with the run-time configuration - * uncomment the next line. - * See included fw_env.config sample file - * for notes on configuration. - */ -#define CONFIG_FILE /etc/fw_env.config - -#define HAVE_REDUND /* For systems with 2 env sectors */ -#define DEVICE1_NAME /dev/mtd1 -#define DEVICE2_NAME /dev/mtd2 -#define DEVICE1_OFFSET0x -#define ENV1_SIZE 0x4000 -#define DEVICE2_OFFSET0x -#define ENV2_SIZE 0x4000 - -#define CONFIG_BAUDRATE115200 -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ -#define CONFIG_BOOTCOMMAND \ - bootp; \ - setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} \ - ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; \ - bootm +#include fw_env_config.h extern int fw_printenv(int argc, char *argv[]); extern char *fw_getenv (char *name); @@ -54,3 +34,5 @@ extern int fw_env_write(char *name, char *value); extern int fw_env_close(void); extern unsignedlong crc32 (unsigned long, const unsigned char *, unsigned); + +#endif // _FW_ENV_H_ diff --git a/tools/env/fw_env_config.h.in b/tools/env/fw_env_config.h.in new file mode 100644 index 000..3336af9 --- /dev/null +++ b/tools/env/fw_env_config.h.in @@ -0,0 +1,65 @@ +/* + * (C) Copyright 2002-2008 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * (C) Copyright 2011 + * Andreas Bießmann, Corscience GmbHCo.KG, biessm...@corscience.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 + */ + +/* + * This is an example configuration
[U-Boot] Pull request: u-boot-arm/master
Hi Woldfgang, The following changes since commit bd061a5214e60c9d1bb24393933323bd1a2dae19: Merge branch 'master' of git://git.denx.de/u-boot-sh (2011-08-26 15:55:03 +0200) are available in the git repository at: git://git.denx.de/u-boot-arm.git master Anton Staaf (1): mmc: S5P: Support DMA restarts at buffer boundaries Asen Dimov (3): pm9261: compiles with the AT91 reworked scheme make pm9263 buildable for v2011.06 release make pm9g45 buildable for v2011.06 release Chander Kashyap (3): SMDKV310: Fix build error for smdkv310 board SMDKV310: Fix undefined reference error SMDKV310: MMC SPL: Remove unwanted dummy functions David Jander (1): ARM: MX51: PLL errata workaround Dirk Behme (3): MAKEALL ARMv7: Use boards.cfg SMDKV310: Fix host compilation of mkv310_image mkimage: Fix 'Unknown OMAP image type - 5' Fabio Estevam (1): mx53: ddr3: Update DD3 initialization Heiko Schocher (1): arm, lib/board.c: use gd-ram_size instead of bd-bi_memsize Igor Grinberg (3): arm: nvidia and smdk6400: use common code for machine type arm: omap: innovator: use common code for machine type arm: fix bd pointer dereference prior initialization Jason Liu (1): mx5: Remove CONFIG_L2_OFF and CONFIG_SYS_L2CACHE_OFF Linus Walleij (7): integratorap: make the compile work again integratorap: support relocation integratorap: support the hush shell integratorap: support some rudimentary commands integratorap: remove hardcoded 32MB memory cmdline integratorcp: make the board compile integrator: convert to new build system Matthias Fuchs (1): at91: reworked support for meesc board Matthias Weisser (1): arm: lib: memcpy: Do not copy to same address Reinhard Meyer (1): AT91: fix at91sam9g45.h to include USB Host defines Simon Glass (4): Tegra2: Add microsecond timer function Tegra2: Add more clock support Tegra2: Add additional pin multiplexing features Tegra2: Use clock and pinmux functions to simplify code Stefano Babic (23): MX31: removed warnings due to clock.h ARM: versatilepb : drop warnings due to double definitions MX35: MX35PDK: support additional RAM on CSD1 MX: MX35 / MX5: uniform clock command with powerpc IMX: uniform GPIO interface using GPIO framework MX25: make use of GPIO framework for MX25 processor MX31: make use of GPIO framework for MX31 processor MX5: make use of GPIO framework for MX5 processor MX35: make use of GPIO framework for MX35 processor MX31: QONG: make use of GPIO framework MX5: efikamx: make use of GPIO framework MX25: zmx25: make use of GPIO framework MX5: mx53ard: make use of GPIO framework MX5: mx53smd: make use of GPIO framework MX5: vision2: make use of GPIO framework MX5: mx53evk: make use of GPIO framework MX5: mx53loco: make use of GPIO framework MX35: mx35pdk: make use of GPIO framework MX5: mx51evk: make use of GPIO framework MX31: mx31ads: make use of GPIO framework MX31: imx31_litekit: make use of GPIO framework IMX: scb9328: drop warnings ARM: versatile: drop warnings Thomas Petazzoni (4): sbc35_a9g20: update board to the new AT91 organization tny_a9260/tny_a9g20: update board to the new AT91 organization atmel: update at91sam9m10g45 SoC support to new style atmel: Update support of board AT91SAM9M10G45-EK to new style Wolfgang Denk (16): ARM: remove broken assabet board ARM: remove broken armadillo board ARM: remove broken B2 board ARM: remove broken edb93xx boards ARM: remove broken lpd7a40x boards ARM: remove broken mx1fs2 board ARM: remove broken netstar board ARM: remove broken sbc2410x board ARM: remove broken smdk2400 board ARM: remove broken voiceblue board ARM: remove broken at91cap9adk board ARM: remove broken cmc_pu2 board ARM: remove broken csb637 board ARM: remove broken kb9202 board ARM: remove broken m501sk board ARM: remove broken at91rm9200dk board aneeshv (3): omap: fix gpio related build breaks omap4: fix build warning due to signed unsigned comparison omap4: increase SRAM budget to fix build error Łukasz Majewski (2): gpio:samsung s5p_ suffix add for GPIO functions gpio:samsung: s5p_ suffix add for GPIO functions (C210_universal) MAINTAINERS| 14 - MAKEALL| 69 +-- Makefile | 84 -- arch/arm/cpu/arm1136/mx35/generic.c|4 +- arch/arm/cpu/arm720t/cpu.c |5 - .../cpu/arm926ejs/at91/at91sam9m10g45_devices.c| 114 ++--
Re: [U-Boot] [STATUS] ARM status as of 2011-08-30
Le 30/08/2011 21:08, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4e5d088b.7090...@aribaud.net you wrote: I have just applied Wolfgang's updated ARM board removal patch set. Currently, u-boot-arm/master builds 182 boards, of which: - ELDK4.2 finds 37 boards with warnings or errors ( dnp1110 gcplus lart I think we should try and separate the errors cases from the warnings only ones - those boards with build errors need to be fixed, or removed. Right, but the current MAKEALL output does not make it easy to sort this out. Maybe we could change MAKEALL to distinguish between error and warning counts (and produce LOG/*.MAKELOG, LOG/*.ERR and LOG/*.WARN accordingly). We can clean up warnings then, as we go on. Agreed. However, I'd prefer it if no ARM board produced any warning -- granted, here it *looks like* many of these warnings are inocuous, and any new toolchain might produce some more, but if we don't keep the warning count at zero, then a less inocuous warning could creep in unnoticed. - CodeSourcery 2010q1 finds 100 (!) boards with warnings or errors ( I guess it's additional warnings. You will see even more when using ELDK 5.x (Cc:ing Rémy for USB stuff; for yaffs, I don't know whom I should Cc:) yeaffs is generic code, i. e. it ends up on my plate. There you are, then. :) For both CS and ELDK, there are a lot of arm-linux-ld: stubs.o: compiled for a big endian system and target is little endian arm-linux-ld: failed to merge target specific data of file stubs.o which I'll look into. You need a big endian ARM compiler for the ixp systems. Got it -- actually, it is not a compiler issue, but a library issue: CS does compile for big-endian as well as little-endian, but does not provide big-endian libs (http://www.codesourcery.com/sgpp/lite/arm/portal/kbentry36, at least as I understand it). Apparently ELDK4.2 does not either. Would ELDK5.0 have them? I haven't gotten around to setting it up. Meanwhile, I suggest that the current u-boot-arm/master be considered rc1-ready, with the effort until rc2 focused on finding and fixing code-wide bugs such as those two above. Agreed. If that is ok, I'll send out a pull request today. Thanks a lot! Done, with a few hour's delay. Best regards, Wolfgang Denk Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] bootp: Fix bug in auto_load function
Patch: Put common autoload code into auto_load() function (sha1: 093498669e77597635a24f326f11efeab213d394) is not simple code cleanup but code change which introduce new bug. If autoload variable is not setup it worked as autoload=yes. Currently if autoload is not setup dhcp sends request in forever loop. There are two options how to fix it: 1. Move TftpStart() which is in this patch 2. Change functionality if autoload is not setup, set NetSate and ends. @@ -165,7 +165,8 @@ static void auto_load(void) } #endif TftpStart(); - } + } else + NetState = NETLOOP_SUCCESS; } CC: Eric Bénard e...@eukrea.com CC: Simon Glass s...@chromium.org Signed-off-by: Michal Simek mon...@monstr.eu --- net/bootp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/bootp.c b/net/bootp.c index 3db08ea..a003c42 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -164,8 +164,8 @@ static void auto_load(void) return; } #endif - TftpStart(); } + TftpStart(); } #if !defined(CONFIG_CMD_DHCP) -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: add 64-64 bit divider
This patch adds a 64-64 bit divider that supports ARMv4 and above. Because clz (count leading zero) instruction is added until ARMv5, the divider implements a clz function for ARMv4 targets. The divider was tested with the following test driver code ran by qemu-arm: int main(void) { uint64_t a, b, q, r; while (scanf(%llx %llx %llx %llx, a, b, q, r) 0) printf(%016llx %016llx %016llx %016llx\n, a, b, a / b, a % b); return 0; } Signed-off-by: Che-Liang Chiou clch...@chromium.org Cc: Albert Aribaud albert.u.b...@aribaud.net --- This patch is alos tested with `MAKEALL -a arm` arch/arm/lib/Makefile|1 + arch/arm/lib/_uldivmod.S | 266 ++ 2 files changed, 267 insertions(+), 0 deletions(-) create mode 100644 arch/arm/lib/_uldivmod.S diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 300c8fa..31770dd 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -33,6 +33,7 @@ GLSOBJS += _divsi3.o GLSOBJS+= _lshrdi3.o GLSOBJS+= _modsi3.o GLSOBJS+= _udivsi3.o +GLSOBJS+= _uldivmod.o GLSOBJS+= _umodsi3.o GLCOBJS+= div0.o diff --git a/arch/arm/lib/_uldivmod.S b/arch/arm/lib/_uldivmod.S new file mode 100644 index 000..9e3a5e6 --- /dev/null +++ b/arch/arm/lib/_uldivmod.S @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * 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 + */ + +/* + * A, Q = r0 + (r1 32) + * B, R = r2 + (r3 32) + * A / B = Q ... R + */ + + .text + .global __aeabi_uldivmod + .type __aeabi_uldivmod, function + .align 0 + +/* armv4 does not support clz (count leading zero) instruction. */ +#if __LINUX_ARM_ARCH__ = 4 +# define CLZ(dst, src)bl L_clz_ ## dst ## _ ## src +# define CLZEQ(dst, src) bleqL_clz_ ## dst ## _ ## src +#else +# define CLZ(dst, src)clz dst, src +# define CLZEQ(dst, src) clzeq dst, src +#endif + +A_0.reqr0 +A_1.reqr1 +B_0.reqr2 +B_1.reqr3 +C_0.reqr4 +C_1.reqr5 +D_0.reqr6 +D_1.reqr7 + +Q_0.reqr0 +Q_1.reqr1 +R_0.reqr2 +R_1.reqr3 + +__aeabi_uldivmod: + stmfd sp!, {r4, r5, r6, r7, lr} + @ Test if B == 0 + orrsip, B_0, B_1@ Z set - B == 0 + beq L_div_by_0 + @ Test if B is power of 2: (B (B - 1)) == 0 + subsC_0, B_0, #1 + sbc C_1, B_1, #0 + tst C_0, B_0 + tsteq B_1, C_1 + beq L_pow2 + @ Test if A_1 == B_1 == 0 + orrsip, A_1, B_1 + beq L_div_32_32 + +L_div_64_64: + mov C_0, #1 + mov C_1, #0 + @ D_0 = clz A + CLZ(D_0, A_1) + teq A_1, #0 + CLZEQ(ip, A_0) + teq A_1, #0 + addeq D_0, D_0, ip + @ D_1 = clz B + CLZ(D_1, B_1) + teq B_1, #0 + CLZEQ(ip, B_0) + teq B_1, #0 + addeq D_1, D_1, ip + @ if clz B - clz A = 0: goto L_done_shift + subsD_0, D_1, D_0 + bls L_done_shift + subsD_1, D_0, #32 + rsb ip, D_0, #32 + @ B = (clz B - clz A) + movmi B_1, B_1, lsl D_0 + orrmi B_1, B_1, B_0, lsr ip + movpl B_1, B_0, lsl D_1 + mov B_0, B_0, lsl D_0 + @ C = 1 (clz B - clz A) + movmi C_1, C_1, lsl D_0 + orrmi C_1, C_1, C_0, lsr ip + movpl C_1, C_0, lsl D_1 + mov C_0, C_0, lsl D_0 +L_done_shift: + mov D_0, #0 + mov D_1, #0 + @ C: current bit; D: result +L_subtract: + @ if A = B + cmp A_1, B_1 + cmpeq A_0, B_0 + bcc L_update + @ A -= B + subsA_0, A_0, B_0 + sbc A_1, A_1, B_1 + @ D |= C + orr D_0, D_0, C_0 + orr D_1, D_1, C_1 +L_update: + @ if A == 0: break + orrsip, A_1, A_0 + beq L_exit + @ C = 1 + movsC_1, C_1, lsr #1 + movsC_0, C_0, rrx + @ if C == 0: break + orrsip, C_1, C_0 + beq L_exit + @ B = 1 + movsB_1, B_1, lsr #1 + mov B_0,
Re: [U-Boot] [PATCH] Correct call to eth_write_hwaddr()
Kumar Gala wrote: On Aug 30, 2011, at 10:51 AM, Simon Glass wrote: This fixes Warning: failed to set MAC address on platforms which rely on an 'ethaddr' environment variable to set the MAC address. This bug was introduced by this commit: 7616e785 Add Ethernet hardware MAC address framework to usbnet Signed-off-by: Simon Glass s...@chromium.org --- net/eth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Tested-by: Kumar Gala ga...@kernel.crashing.org I have made similar patch. Tested-by: Michal Simek mon...@monstr.eu Thanks, Michal -- 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 v10 6/8] nds32: standalone support
Add standalone program related support for nds32 architecture. Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes for v1-v6: - code clean up. Changes for v7-v10: - No change. examples/standalone/nds32.lds | 64 + examples/standalone/stubs.c | 17 +- examples/standalone/x86-testapp.c | 12 +++ 3 files changed, 92 insertions(+), 1 deletions(-) create mode 100644 examples/standalone/nds32.lds diff --git a/examples/standalone/nds32.lds b/examples/standalone/nds32.lds new file mode 100644 index 000..c2ac107 --- /dev/null +++ b/examples/standalone/nds32.lds @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation nobuh...@andestech.com + * Macpaul Lin, Andes Technology Corporation macp...@andestech.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-nds32, elf32-nds32, elf32-nds32) +OUTPUT_ARCH(nds32) +ENTRY(_start) +SECTIONS +{ + . = 0x; + + . = ALIGN(4); + .text : + { + *(.text) + } + + . = ALIGN(4); + .data : { *(.data) } + + . = ALIGN(4); + .data : { *(.data) } + + . = ALIGN(4); + + .got : { + __got_start = .; + *(.got) + __got_end = .; + } + + . = ALIGN(4); + __bss_start = .; + .bss : { *(.bss) } + __bss_end = .; + + . = ALIGN(4); + .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } + + _end = .; + + . = 0x0200; + .u_boot_ohci_data_st : { *(.u_boot_ohci_data_st) } +} diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c index 507d38c..11c7565 100644 --- a/examples/standalone/stubs.c +++ b/examples/standalone/stubs.c @@ -167,8 +167,23 @@ gd_t *global_data; jmp %%g1\n \ nop\n \ : : i(offsetof(gd_t, jt)), i(XF_ ## x * sizeof(void *)) : g1 ); - +#elif defined(CONFIG_NDS32) +/* + * r16 holds the pointer to the global_data. gp is call clobbered. + * not support reduced register (16 GPR). + */ +#define EXPORT_FUNC(x) \ + asm volatile ( \ + .globl #x \n\ +#x :\n \ + lwi $r16, [$gp + (%0)]\n \ + lwi $r16, [$r16 + (%1)]\n \ + jr $r16\n \ + : : i(offsetof(gd_t, jt)), i(XF_ ## x * sizeof(void *)) : $r16); #else +/*addi$sp, $sp, -24\n\ + br $r16\n \*/ + #error stubs definition missing for this architecture #endif diff --git a/examples/standalone/x86-testapp.c b/examples/standalone/x86-testapp.c index e8603d9..a4ac6f8 100644 --- a/examples/standalone/x86-testapp.c +++ b/examples/standalone/x86-testapp.c @@ -52,6 +52,16 @@ asm volatile ( \ lw $25, %1($25)\n \ jr $25\n \ : : i(offsetof(xxx_t, pfunc)), i(XF_ ## x * sizeof(void *)) : t9); +#elif defined(__nds32__) +#define EXPORT_FUNC(x) \ +asm volatile ( \ + .globl mon_ #x \n\ +mon_ #x :\n\ + lwi $r16, [$gp + (%0)]\n \ + lwi $r16, [$r16 + (%1)]\n \ + jr $r16\n \ + : : i(offsetof(xxx_t, pfunc)), i(XF_ ## x * sizeof(void *)) : $r16); + #else #error [No stub code for this arch] #endif @@ -72,6 +82,8 @@ int main(void) register volatile xxx_t *pq asm(r8); #elif defined(__mips__) register volatile xxx_t *pq asm(k0); +#elif defined(__nds32__) + register volatile xxx_t *pq asm($r16); #endif char buf[32]; -- 1.7.3.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v10 7/8] nds32: common bdinfo, bootm, image support
Add support of NDS32 to common commands bdinfo, bootm, and image format. Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes for v1-v6: - Code clean up Changes for v7-v9: - No Change. Changes for v10: - fix up according to the changes in master tree. common/cmd_bdinfo.c | 26 ++ common/cmd_bootm.c |2 ++ common/image.c |1 + include/image.h |5 + 4 files changed, 34 insertions(+), 0 deletions(-) diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 6051120..52102db 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -413,6 +413,32 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#elif defined(CONFIG_NDS32) + +int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + bd_t *bd = gd-bd; + + print_num(arch_number,bd-bi_arch_number); + print_num(env_t, (ulong)bd-bi_env); + print_num(boot_params,(ulong)bd-bi_boot_params); + + for (i = 0; i CONFIG_NR_DRAM_BANKS; ++i) { + print_num(DRAM bank, i); + print_num(- start, bd-bi_dram[i].start); + print_num(- size,bd-bi_dram[i].size); + } + +#if defined(CONFIG_CMD_NET) + print_eth(0); + printf(ip_addr = %pI4\n, bd-bi_ip_addr); +#endif + printf(baudrate= %d bps\n, bd-bi_baudrate); + + return 0; +} + #else #error a case for this architecture does not exist! #endif diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 272d879..99ec547 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -187,6 +187,8 @@ void arch_preboot_os(void) __attribute__((weak, alias(__arch_preboot_os))); #define IH_INITRD_ARCH IH_ARCH_SH #elif defined(__sparc__) #define IH_INITRD_ARCH IH_ARCH_SPARC +#elif defined(__nds32__) + #define IH_INITRD_ARCH IH_ARCH_NDS32 #else # error Unknown CPU type #endif diff --git a/common/image.c b/common/image.c index 5eea2a1..95e16b8 100644 --- a/common/image.c +++ b/common/image.c @@ -93,6 +93,7 @@ static const table_entry_t uimage_arch[] = { { IH_ARCH_SPARC64,sparc64, SPARC 64 Bit, }, { IH_ARCH_BLACKFIN, blackfin, Blackfin, }, { IH_ARCH_AVR32, avr32,AVR32,}, + { IH_ARCH_NDS32, nds32,NDS32,}, { -1, , , }, }; diff --git a/include/image.h b/include/image.h index 352e4a0..dcbbc8b 100644 --- a/include/image.h +++ b/include/image.h @@ -106,6 +106,7 @@ #define IH_ARCH_BLACKFIN 16 /* Blackfin */ #define IH_ARCH_AVR32 17 /* AVR32*/ #define IH_ARCH_ST200 18 /* STMicroelectronics ST200 */ +#define IH_ARCH_NDS32 19 /* ANDES Technology - NDS32 */ /* * Image Types @@ -506,6 +507,8 @@ static inline int image_check_target_arch (const image_header_t *hdr) if (!image_check_arch (hdr, IH_ARCH_SH)) #elif defined(__sparc__) if (!image_check_arch (hdr, IH_ARCH_SPARC)) +#elif defined(__nds32__) + if (!image_check_arch(hdr, IH_ARCH_NDS32)) #else # error Unknown CPU type #endif @@ -658,6 +661,8 @@ static inline int fit_image_check_target_arch (const void *fdt, int node) if (!fit_image_check_arch (fdt, node, IH_ARCH_SH)) #elif defined(__sparc__) if (!fit_image_check_arch (fdt, node, IH_ARCH_SPARC)) +#elif defined(__nds32__) + if (!fit_image_check_arch(fdt, node, IH_ARCH_NDS32)) #else # error Unknown CPU type #endif -- 1.7.3.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v10 4/8] nds32/ag101: cpu and init funcs of SoC ag101
SoC ag101 is the first chip using NDS32 N1213 cpu core. Add header file of device offset support for SoC ag101. Add main function of SoC ag101 based on NDS32 n1213 core. cpu.c According to the bootstrap procedure in n1213 Core, to turn off watchdog timer is suggested after the cpu is in superuser mdoe. 1. bootstrap 1.1 reset - start of Andesboot 1.2 to superuser mode - as is when reset 1.3 Turn off watchdog timer If you take look into the start.S in n1213, you will find that system will turn off watchdog after start.S has been retunred from lowlevel_init. Since the watchdog device is depends on the SoC is choosed. It should be belonged to the SoC (ag101) folder. watchdog.S: If you've ran another bootloader before u-boot was started the watchdog might have been enabled already. lowlevel_init.S is a peripheral initial procedure of ag101. It configures onboard dram, clock, and power settings. It also prepars the dram environment before moving u-boot from rom and flash into dram. This version of lowlevel_init.S also replace hardcode value by MARCO defines from the GPL version andesboot for better code quality. Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes for v1-v4: - Code clean up. Changes for v5-v6: - Split watchdog.S from lowlevel_init.S. - Fix hardware reset by using watchdog reset in do_reset() in cpu.c. - reset_cpu was remove inside do_reset(). - lowlevel_init.S - Change hard code value into MARCO definitions. - ftsmc010 - Fix FTSMC020_TPR_AT2 from 1 to 3 (0xff3ff) - ftsdmc021 - Fix hardcoded address of CR1, CR2, TR1, TR2, BANK0 registers. - Fix the default configuration value of FTSDMC and FTSMC controller. - Remove some ftpmu010 and flash probe code to C functions. Changes for v7: - clean up. Changes for v8-v9: - No change. Changes for v10: - asm-offset.c: file added for ag101 use only. - ag101/Makefile: add gen-asm-offset support to ag101 for lowlevel_init.S. - Makefile: add gen-asm-offset support for NDS32 based core and SoCs. - cpu.c: remove unused cpu_init(). - lowlevel_init.S - Introduce SoC specific gen-asm-offset.h to lowlevel_init.S - Replace routings by macros to made code much easier to understand. - Add debug LED support. - Add CONFIG_MEM_REMAP for those boards must do memort remapping. Makefile |3 +- arch/nds32/cpu/n1213/ag101/Makefile| 70 arch/nds32/cpu/n1213/ag101/asm-offsets.c | 43 + arch/nds32/cpu/n1213/ag101/cpu.c | 200 +++ arch/nds32/cpu/n1213/ag101/lowlevel_init.S | 238 arch/nds32/cpu/n1213/ag101/timer.c | 204 arch/nds32/cpu/n1213/ag101/watchdog.S | 48 ++ arch/nds32/include/asm/arch-ag101/ag101.h | 68 8 files changed, 873 insertions(+), 1 deletions(-) create mode 100644 arch/nds32/cpu/n1213/ag101/Makefile create mode 100644 arch/nds32/cpu/n1213/ag101/asm-offsets.c create mode 100644 arch/nds32/cpu/n1213/ag101/cpu.c create mode 100644 arch/nds32/cpu/n1213/ag101/lowlevel_init.S create mode 100644 arch/nds32/cpu/n1213/ag101/timer.c create mode 100644 arch/nds32/cpu/n1213/ag101/watchdog.S create mode 100644 arch/nds32/include/asm/arch-ag101/ag101.h diff --git a/Makefile b/Makefile index 03d80b7..89aebff 100644 --- a/Makefile +++ b/Makefile @@ -1019,7 +1019,8 @@ clean: $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \ $(obj)u-boot.lds \ $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \ - $(obj)arch/blackfin/cpu/init.{lds,elf} + $(obj)arch/blackfin/cpu/init.{lds,elf} \ + $(obj)arch/nds32/cpu/$(CPU)/$(SOC)/gen-asm-offsets.[chs] @rm -f $(obj)include/bmp_logo.h @rm -f $(obj)lib/asm-offsets.s @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map} diff --git a/arch/nds32/cpu/n1213/ag101/Makefile b/arch/nds32/cpu/n1213/ag101/Makefile new file mode 100644 index 000..40a0fa7 --- /dev/null +++ b/arch/nds32/cpu/n1213/ag101/Makefile @@ -0,0 +1,70 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor www.marvell.com +# Written-by: Prafulla Wadaskar prafu...@marvell.com +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation nobuh...@andestech.com +# Macpaul Lin, Andes Technology Corporation macp...@andestech.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
[U-Boot] [PATCH v10 8/8] adp-ag101: add board adp-ag101 support
Add evaluation board adp-ag101 configuration file adp-ag101.h. Add adp-ag101.c board config and related settings. Add board adp-ag101 into boards.cfg Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes for v1-v4: - code clean up Changes for v5-v6: - Refine the definitions and parameters about CLK, AHB controller, SDRAM controller, Static memory controllers. - Add APB_CLK, AHB_CLK, SYS_CLK definitions for backward compatible. - ftahbc010: - Update include path of ftahbc010. - ftsdmc021: - Update include path of ftsdmc021. - ftsmc020: - Update include path of ftsmc020. - ftwdt010: - Fix WDT define and update include path. - Fix ftwdt010 for hardware reset. - ftpmu010: - Remove duplicate PMU definitions. - Add related configurations. - Fix MAX malloc len and fix saveenv. - clean up. Changes for v7: - clean up. - Move CONFIG_SYS_TEXT_BASE from board/config.mk. - Fix Makefile and remove config.mk Changes for v8: - No change. Changes for v9: - Fix because other boards has been added into boards.cfg and broken this patch. Changes for v10: - adp-ag101.h - Fix lines over 80 characters. - Fix for introducing gen-asm-offset. - Add mmc support for FTSDC010 SD/MMC Controller. - fix flash init. - fix ftsmc010 configuraion for flash probing. - Add SP_INIT related configurations for supporting relocation. - Fix CONFIG_TEXT_BASE for relocation. - Add CONFIG_MEM_REMAP for some hardware boards and non-OS application. - adp-ag101.c - Clean up for braces according to Wolfgang's suggestion. - Add mmc support for FTSDC010 SD/MMC Controller. - fix dram init(), made this more simpler. MAINTAINERS | 11 + MAKEALL |6 + board/AndesTech/adp-ag101/Makefile| 57 + board/AndesTech/adp-ag101/adp-ag101.c | 89 +++ boards.cfg|1 + include/configs/adp-ag101.h | 411 + 6 files changed, 575 insertions(+), 0 deletions(-) create mode 100644 board/AndesTech/adp-ag101/Makefile create mode 100644 board/AndesTech/adp-ag101/adp-ag101.c create mode 100644 include/configs/adp-ag101.h diff --git a/MAINTAINERS b/MAINTAINERS index 7982c36..6b7c664 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1162,5 +1162,16 @@ Chong Huang chu...@ucrobotics.com bf525-ucr2 BF525 # +# NDS32 Systems: # +# # +# Maintainer Name, Email Address # +# Board CPU # +# + +Macpaul Lin macp...@andestech.com + + ADP-AG101 N1213 (AG101 SoC) + +# # End of MAINTAINERS list # # diff --git a/MAKEALL b/MAKEALL index 3b98f03..232ed3b 100755 --- a/MAKEALL +++ b/MAKEALL @@ -600,6 +600,12 @@ LIST_sh=$(boards_by_arch sh) LIST_sparc=$(boards_by_arch sparc) +# +## NDS32 Systems +# + +LIST_nds32=$(boards_by_arch nds32) + #--- build_target() { diff --git a/board/AndesTech/adp-ag101/Makefile b/board/AndesTech/adp-ag101/Makefile new file mode 100644 index 000..5a403b1 --- /dev/null +++ b/board/AndesTech/adp-ag101/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation nobuh...@andestech.com +# Macpaul Lin, Andes Technology Corporation macp...@andestech.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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := adp-ag101.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS
[U-Boot] [PATCH v10 2/8] nds32: add NDS32 support into common header file
Add NDS32 support into common header file. Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes for v1-v7: - No change Changes for v8: - Fix the patch according to dependency of x86's Fix Changes for v9-v10: - No change include/common.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/common.h b/include/common.h index 12a1074..782933d 100644 --- a/include/common.h +++ b/include/common.h @@ -281,6 +281,10 @@ intsetenv (const char *, const char *); #ifdef CONFIG_X86 /* x86 version to be fixed! */ # include asm/u-boot-x86.h #endif /* CONFIG_X86 */ +#ifdef CONFIG_NDS32 +# include asm/mach-types.h +# include asm/u-boot-nds32.h /* NDS32 version to be fixed! */ +#endif /* CONFIG_NDS32 */ #ifdef CONFIG_AUTO_COMPLETE int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf); -- 1.7.3.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v10 3/8] nds32/core N1213: NDS32 N12 core family N1213
Add N1213 cpu core (N12 Core family) support for NDS32 arch. This patch includes start.S for the initialize procedure of N1213. NDS32 Core N1213 has the following hardware features. Core: - 16-/32-bit mixable instruction format - 32 general-purpose 32-bit registers - 8-stage pipeline - Dynamic branch prediction - 32/64/128/256 BTB - Return address stack (RAS) - Vector interrupts for internal/external - 3 HW-level nested interruptions - User and super-user mode support - Memory-mapped I/O - Address space up to 4GB Memory Management Unit: - TLB - Optional hardware page table walker - Two groups of page size support Memory Subsystem: - I D cache - I D local memory (LM) Bus Interface: - Synchronous/Asynchronous AHB bus: 0, 1 or 2 ports Start procedure: start.S will start up the N1213 CPU core at first, then jump to SoC dependent lowlevel_init.S and watchdog.S to configure peripheral devices. Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes v1 to v6: - Style clean up and reorganize code Changes v7-v9: - No Change. Changes v10: - start.S of N1213 CPU has been rewrote for relocation support. - u-boot.lds: - Add got and *(.got.plt) section for support GCC 4 toolchain - Modified for relocation implementation. arch/nds32/cpu/n1213/Makefile | 50 arch/nds32/cpu/n1213/start.S| 523 +++ arch/nds32/cpu/n1213/u-boot.lds | 72 ++ 3 files changed, 645 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/cpu/n1213/Makefile create mode 100644 arch/nds32/cpu/n1213/start.S create mode 100644 arch/nds32/cpu/n1213/u-boot.lds diff --git a/arch/nds32/cpu/n1213/Makefile b/arch/nds32/cpu/n1213/Makefile new file mode 100644 index 000..111d14f --- /dev/null +++ b/arch/nds32/cpu/n1213/Makefile @@ -0,0 +1,50 @@ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation nobuh...@andestech.com +# Macpaul Lin, Andes Technology Corporation macp...@andestech.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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(CPU).o + +START = start.o + +SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) +START := $(addprefix $(obj),$(START)) + +all: $(obj).depend $(START) $(LIB) + +$(LIB):$(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S new file mode 100644 index 000..602067e --- /dev/null +++ b/arch/nds32/cpu/n1213/start.S @@ -0,0 +1,523 @@ +/* + * Andesboot - Startup Code for Whitiger core + * + * Copyright (C) 2006 Andes Technology Corporation + * Copyright (C) 2006 Shawn Lin nobuh...@andestech.com + * Copyright (C) 2011 Macpaul macp...@andestech.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 asm-offsets.h +#include config.h +#include common.h +#include asm/macro.h +#include version.h + +/* + * Jump vector table for EVIC mode + */ +#define ENA_DCAC 2UL +#define DIS_DCAC ~ENA_DCAC
[U-Boot] [PATCH v10 1/8] nds32: add header files support for nds32
Add generic header files support for nds32 architecture. Cache, ptregs, data type and other definitions are included. Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes for v1-v4: - Code cleanup and style formatting. Changes for v5-v6: - This patch also updated the following changes against the change after master tree (v2010.12-rc1). - fix upper case definitions in cache.h - Support GD_FLG_ENV_READY and env_buf vars in nds32 global_data.h. - Add readsb, writesb functions into io.h. Changes for v7: - clean up - volatile: - types.h - remove typedef volatile unsigned char vuchar; - remove typedef volatile unsigned long vulong; - remove typedef volatile unsigned short vushort; - u-boot.h: remove bd_info_ext bi_ext - bitops.h: add accessor function to bit operation with volatile var. - system.h: add system.h for local_irq operation with flag. Changes for v8: - ptrace.h: rewrite the pt_reg structure, and merge ptregs.h. - ptregs.h: removed Changes for v9: - No change. Changes for v10: - macro.h: add writel and setbf macros - u-boot-nds32.h: - Remove obsolete andesboot_* symbols for relocation. - Add _bss_*_offset symbols for relocation. - config.h: add manual relocation support as default. arch/nds32/include/asm/bitops.h | 186 +++ arch/nds32/include/asm/byteorder.h| 36 +++ arch/nds32/include/asm/cache.h| 54 + arch/nds32/include/asm/config.h | 28 +++ arch/nds32/include/asm/global_data.h | 89 +++ arch/nds32/include/asm/io.h | 410 + arch/nds32/include/asm/mach-types.h | 29 +++ arch/nds32/include/asm/macro.h| 96 arch/nds32/include/asm/memory.h | 19 ++ arch/nds32/include/asm/posix_types.h | 84 +++ arch/nds32/include/asm/processor.h| 25 ++ arch/nds32/include/asm/ptrace.h | 88 +++ arch/nds32/include/asm/string.h | 57 + arch/nds32/include/asm/system.h | 88 +++ arch/nds32/include/asm/types.h| 63 + arch/nds32/include/asm/u-boot-nds32.h | 53 + arch/nds32/include/asm/u-boot.h | 63 + arch/nds32/include/asm/unaligned.h| 31 +++ 18 files changed, 1499 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/bitops.h create mode 100644 arch/nds32/include/asm/byteorder.h create mode 100644 arch/nds32/include/asm/cache.h create mode 100644 arch/nds32/include/asm/config.h create mode 100644 arch/nds32/include/asm/global_data.h create mode 100644 arch/nds32/include/asm/io.h create mode 100644 arch/nds32/include/asm/mach-types.h create mode 100644 arch/nds32/include/asm/macro.h create mode 100644 arch/nds32/include/asm/memory.h create mode 100644 arch/nds32/include/asm/posix_types.h create mode 100644 arch/nds32/include/asm/processor.h create mode 100644 arch/nds32/include/asm/ptrace.h create mode 100644 arch/nds32/include/asm/string.h create mode 100644 arch/nds32/include/asm/system.h create mode 100644 arch/nds32/include/asm/types.h create mode 100644 arch/nds32/include/asm/u-boot-nds32.h create mode 100644 arch/nds32/include/asm/u-boot.h create mode 100644 arch/nds32/include/asm/unaligned.h diff --git a/arch/nds32/include/asm/bitops.h b/arch/nds32/include/asm/bitops.h new file mode 100644 index 000..c56f04b --- /dev/null +++ b/arch/nds32/include/asm/bitops.h @@ -0,0 +1,186 @@ +/* + * Copyright 1995, Russell King. + * Various bits and pieces copyrights include: + * Linus Torvalds (test_bit). + * + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation nobuh...@andestech.com + * + * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). + * + * Please note that the code in this file should never be included + * from user space. Many of these are not implemented in assembler + * since they would be too costly. Also, they require priviledged + * instructions (which are not available from user mode) to ensure + * that they are atomic. + */ + +#ifndef __ASM_NDS_BITOPS_H +#define __ASM_NDS_BITOPS_H + +#ifdef __KERNEL__ + +#include asm/system.h + +#define smp_mb__before_clear_bit() do { } while (0) +#define smp_mb__after_clear_bit() do { } while (0) + +/* + * Function prototypes to keep gcc -Wall happy. + */ +extern void set_bit(int nr, volatile void *addr); + +static inline void __set_bit(int nr, volatile void *addr) +{ + int *a = (int *)addr; + int mask; + + a += nr 5; + mask = 1 (nr 0x1f); + *a |= mask; +} + +extern void clear_bit(int nr, volatile void *addr); + +static inline void __clear_bit(int nr, volatile void *addr) +{ + int *a = (int *)addr; + int mask; + unsigned long flags; + + a += nr 5; + mask = 1 (nr 0x1f); + local_irq_save(flags); + *a = ~mask; + local_irq_restore(flags); +} + +extern void change_bit(int nr, volatile void
[U-Boot] [PATCH v10 5/8] nds32/lib: add generic funcs in NDS32 lib
Add Makefile, board.c, interrupts.c and bootm.c functions to nds32 architecture. Signed-off-by: Macpaul Lin macp...@andestech.com --- Changes for v1-v4: - code clean up and formatting style. Changes for v5-v6: - board.c - Do some clean up and add code - Remove display banner which hasn't support. - Add ftpmu010 related power management unit code. - Remove useless LED related code. - Move SDRAM init to board sepecific files. (ex. adp-ag101.c) - Remove CONFIG_SOFT_I2C which hasn't been support. - Remove CONFIG_FSL_ESDHC which hasn't been support. - clean up. Changes for v7: - clean up. - move single file patch arch/nds32/config.mk to this commit. - interrupts.c refine origin interrupt enable and disable. Changes for v8: - interrups.c: fix up for new ptraces.h. Changes for v9: - support CONFIG_STANDALONE_LOAD_ADDR in config.mk Changes for v10: - config.mk: - add -fpie flag. - replace -ffixed-8 to -ffixed-10. - add -mrelax and --gc-sections to LDFLAG - board.c: - fix lib/board.c for relocation. - fix dram init for relocation. arch/nds32/config.mk| 37 arch/nds32/lib/Makefile | 52 + arch/nds32/lib/board.c | 453 +++ arch/nds32/lib/bootm.c | 241 +++ arch/nds32/lib/interrupts.c | 131 + 5 files changed, 914 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/config.mk create mode 100644 arch/nds32/lib/Makefile create mode 100644 arch/nds32/lib/board.c create mode 100644 arch/nds32/lib/bootm.c create mode 100644 arch/nds32/lib/interrupts.c diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk new file mode 100644 index 000..78b4a23 --- /dev/null +++ b/arch/nds32/config.mk @@ -0,0 +1,37 @@ +# +# (C) Copyright 2000-2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2011 +# Shawn Lin, Andes Technology Corporation nobuh...@andestech.com +# Macpaul Lin, Andes Technology Corporation macp...@andestech.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 + +CROSS_COMPILE ?= nds32le-linux- + +CONFIG_STANDALONE_LOAD_ADDR = 0x30 -T nds32.lds + +PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -mrelax +PLATFORM_RELFLAGS += -gdwarf-2 +PLATFORM_CPPFLAGS += -DCONFIG_NDS32 -D__nds32__ -G0 -ffixed-10 -fpie + +LDFLAGS_u-boot = --gc-sections --relax + +LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds diff --git a/arch/nds32/lib/Makefile b/arch/nds32/lib/Makefile new file mode 100644 index 000..eca4324 --- /dev/null +++ b/arch/nds32/lib/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation nobuh...@andestech.com +# Macpaul Lin, Andes Technology Corporation macp...@andestech.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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(ARCH).o + +OBJS := board.o bootm.o interrupts.o + +all: $(LIB) + +$(LIB):$(OBJS) $(SOBJS) + $(AR) crv $@ $^ + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git
[U-Boot] Microblaze platform patches
Hi, here is the second package with platform changes. The first contained microblaze architecture patches. All my patches with new network drivers/fixes, etc are available in my custodian repo. git://git.denx.de/u-boot-microblaze.git Thanks for your review, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/8] microblaze: Do not select NFS for platforms without ethernet
Undefined network functionality for systems without ethernet and disable NFS support. Signed-off-by: Michal Simek mon...@monstr.eu --- include/configs/microblaze-generic.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 8243f8d..0c7c294 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -62,6 +62,7 @@ /*#define CONFIG_SYS_RESET_ADDRESSCONFIG_SYS_TEXT_BASE*/ /* ethernet */ +#undef CONFIG_SYS_ENET #ifdef XILINX_EMACLITE_BASEADDR # define CONFIG_XILINX_EMACLITE1 # define CONFIG_SYS_ENET @@ -245,6 +246,7 @@ #ifndef CONFIG_SYS_ENET # undef CONFIG_CMD_NET # undef CONFIG_NET_MULTI +# undef CONFIG_CMD_NFS #else # define CONFIG_CMD_PING # define CONFIG_CMD_DHCP -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/8] microblaze: Remove address offset for uart16550
U-Boot BSP handle 0x3 offset for big endian systems. Little endian Microblaze systems don't use any offset. Signed-off-by: Michal Simek mon...@monstr.eu --- include/configs/microblaze-generic.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 0c7c294..684f2d6 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -46,7 +46,7 @@ # define CONFIG_SYS_NS16550_REG_SIZE -4 # define CONFIG_CONS_INDEX 1 # define CONFIG_SYS_NS16550_COM1 \ - (XILINX_UART16550_BASEADDR + 0x1000 + 0x3) + (XILINX_UART16550_BASEADDR + 0x1000) # define CONFIG_SYS_NS16550_CLKXILINX_UART16550_CLOCK_HZ # define CONFIG_BAUDRATE 115200 -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/8] microblaze: Fix no return statement from microblaze-generic board
Remove compilation warning for systems without network support. Warning log: microblaze-generic.c: In function 'board_eth_init': microblaze-generic.c:82: warning: no return statement in function returning non-void Signed-off-by: Michal Simek mon...@monstr.eu --- .../xilinx/microblaze-generic/microblaze-generic.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 1a6e568..9b2952f 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -71,11 +71,7 @@ int fsl_init2 (void) { 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. -*/ + int ret = 0; #ifdef CONFIG_XILINX_EMACLITE u32 txpp = 0; u32 rxpp = 0; @@ -85,7 +81,8 @@ int board_eth_init(bd_t *bis) # ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG rxpp = 1; # endif - return xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR, + ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR, txpp, rxpp); #endif + return ret; } -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/8] microblaze: Enable FDT/FIT support
Enable FDT and FIT support. Signed-off-by: Michal Simek mon...@monstr.eu --- include/configs/microblaze-generic.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 684f2d6..c526006 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -329,4 +329,9 @@ # define CONFIG_SYS_PROMPT_HUSH_PS2 #endif +/* Enable flat device tree support */ +#define CONFIG_LMB 1 +#define CONFIG_FIT 1 +#define CONFIG_OF_LIBFDT 1 + #endif /* __CONFIG_H */ -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/8] microblaze: Wire up LL_TEMAC driver initialization
Initialize ll_temac driver. Signed-off-by: Michal Simek mon...@monstr.eu --- .../xilinx/microblaze-generic/microblaze-generic.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 9b2952f..87acc6b 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -84,5 +84,21 @@ int board_eth_init(bd_t *bis) ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR, txpp, rxpp); #endif + +#ifdef CONFIG_XILINX_LL_TEMAC +# ifdef XILINX_LLTEMAC_FIFO_BASEADDR + ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR, + 0, XILINX_LLTEMAC_FIFO_BASEADDR); +# elif XILINX_LLTEMAC_SDMA_CTRL_BASEADDR +# if XILINX_LLTEMAC_SDMA_USE_DCR == 1 + ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR, + 3, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR); +# else + ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR, + 1, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR); +# endif +# endif +#endif + return ret; } -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/8] microblaze: Wire up axi_ethernet driver initialization
Initialize axi_ethernet driver. Signed-off-by: Michal Simek mon...@monstr.eu --- .../xilinx/microblaze-generic/microblaze-generic.c |6 ++ include/configs/microblaze-generic.h |4 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 87acc6b..955cc34 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -72,6 +72,12 @@ int fsl_init2 (void) { int board_eth_init(bd_t *bis) { int ret = 0; + +#ifdef CONFIG_XILINX_AXIEMAC + ret |= xilinx_axiemac_initialize(bis, XILINX_AXIEMAC_BASEADDR, + XILINX_AXIDMA_BASEADDR); +#endif + #ifdef CONFIG_XILINX_EMACLITE u32 txpp = 0; u32 rxpp = 0; diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 4c76afd..f56d0e2 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -71,6 +71,10 @@ # define CONFIG_XILINX_LL_TEMAC1 # define CONFIG_SYS_ENET #endif +#if defined(XILINX_AXIEMAC_BASEADDR) +# define CONFIG_XILINX_AXIEMAC 1 +# define CONFIG_SYS_ENET +#endif #undef ET_DEBUG -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 8/8] microblaze: Enable phylib support
Signed-off-by: Michal Simek mon...@monstr.eu --- include/configs/microblaze-generic.h | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index f56d0e2..d3f0018 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -339,4 +339,23 @@ #define CONFIG_FIT 1 #define CONFIG_OF_LIBFDT 1 +#if defined(CONFIG_XILINX_LL_TEMAC) || defined(CONFIG_XILINX_AXIEMAC) +# define CONFIG_MII1 +# define CONFIG_CMD_MII1 +# define CONFIG_PHY_GIGE 1 +# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 1 +# define CONFIG_PHYLIB 1 +# define CONFIG_PHY_ATHEROS1 +# define CONFIG_PHY_BROADCOM 1 +# define CONFIG_PHY_DAVICOM1 +# define CONFIG_PHY_LXT1 +# define CONFIG_PHY_MARVELL1 +# define CONFIG_PHY_MICREL 1 +# define CONFIG_PHY_NATSEMI1 +# define CONFIG_PHY_REALTEK1 +# define CONFIG_PHY_VITESSE1 +#else +# undef CONFIG_PHYLIB +#endif + #endif /* __CONFIG_H */ -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/8] microblaze: Enable several ethernet driver compilation
NET_MULTI enables to use several ethernet drivers but microblaze-generic platform config file select only one driver. Signed-off-by: Michal Simek mon...@monstr.eu --- include/configs/microblaze-generic.h |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index c526006..4c76afd 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -63,11 +63,12 @@ /* ethernet */ #undef CONFIG_SYS_ENET -#ifdef XILINX_EMACLITE_BASEADDR -# define CONFIG_XILINX_EMACLITE1 +#if defined(XILINX_EMACLITE_BASEADDR) +# define CONFIG_XILINX_EMACLITE1 # define CONFIG_SYS_ENET -#elif XILINX_LLTEMAC_BASEADDR -# define CONFIG_XILINX_LL_TEMAC1 +#endif +#if defined(XILINX_LLTEMAC_BASEADDR) +# define CONFIG_XILINX_LL_TEMAC1 # define CONFIG_SYS_ENET #endif -- 1.5.5.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] (no subject)
Changes for v2: - Remove extern of timer_init ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/5] coldfire: Change timer_init return type from void to int
timer_init protorype change for uniformization with other architectures Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- arch/m68k/cpu/mcf547x_8x/slicetimer.c |4 +++- arch/m68k/lib/board.c |2 -- arch/m68k/lib/time.c |8 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c index 467a807..ee96aad 100644 --- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c +++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c @@ -72,7 +72,7 @@ void dtimer_interrupt(void *not_used) } } -void timer_init(void) +int timer_init(void) { volatile slt_t *timerp = (slt_t *) (CONFIG_SYS_TMR_BASE); @@ -93,6 +93,8 @@ void timer_init(void) /* set a period of 1us, set timer mode to restart and enable timer and interrupt */ timerp-cr = SLT_CR_RUN | SLT_CR_IEN | SLT_CR_TEN; + + return 0; } ulong get_timer(ulong base) diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index 945ab66..1df50f1 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -78,8 +78,6 @@ static char *failed = *** failed ***\n; extern ulong __init_end; extern ulong __bss_end__; -extern void timer_init(void); - #if defined(CONFIG_WATCHDOG) # define INIT_FUNC_WATCHDOG_INIT watchdog_init, # define WATCHDOG_DISABLE watchdog_disable diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index a316cdf..a1eb983 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -91,7 +91,7 @@ void dtimer_interrupt(void *not_used) } } -void timer_init(void) +int timer_init(void) { volatile dtmr_t *timerp = (dtmr_t *) (CONFIG_SYS_TMR_BASE); @@ -114,6 +114,8 @@ void timer_init(void) /* set a period of 1us, set timer mode to restart and enable timer and interrupt */ timerp-tmr = CONFIG_SYS_TIMER_PRESCALER | DTIM_DTMR_CLK_DIV1 | DTIM_DTMR_FRR | DTIM_DTMR_ORRI | DTIM_DTMR_RST_EN; + + return 0; } ulong get_timer(ulong base) @@ -153,7 +155,7 @@ void __udelay(unsigned long usec) } } -void timer_init(void) +int timer_init(void) { volatile pit_t *timerp = (pit_t *) (CONFIG_SYS_PIT_BASE); timestamp = 0; @@ -162,6 +164,8 @@ void timer_init(void) timerp-pcsr = PIT_PCSR_OVW; timerp-pmr = lastinc = 0; timerp-pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN; + + return 0; } ulong get_timer(ulong base) -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] (no subject)
Changes for v2: - Move boards with simple configurations to boards.cfg - Some build corrections ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/5] coldfire: Clean _config rules and move simple ones to boards.cfg
Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- MAKEALL|6 -- Makefile | 126 ++- boards.cfg | 20 +++ include/configs/M5329EVB.h |8 ++-- 4 files changed, 42 insertions(+), 118 deletions(-) diff --git a/MAKEALL b/MAKEALL index 3b98f03..37fe10e 100755 --- a/MAKEALL +++ b/MAKEALL @@ -558,18 +558,12 @@ LIST_microblaze=$(boards_by_arch microblaze) # LIST_coldfire=$(boards_by_arch m68k) - astro_mcf5373l \ - cobra5272 \ EB+MCF-EV123\ EB+MCF-EV123_internal \ M52277EVB \ M5235EVB\ - M5329AFEE \ - M5373EVB\ M54451EVB \ M54455EVB \ - M5475AFE\ - M5485AFE\ # diff --git a/Makefile b/Makefile index 03d80b7..be9f325 100644 --- a/Makefile +++ b/Makefile @@ -591,14 +591,11 @@ ucname= $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/') # ## Coldfire # - -astro_mcf5373l_config \ -astro_mcf5373l_RAM_config :unconfig - @$(MKCONFIG) -n $@ -t $@ astro_mcf5373l m68k mcf532x mcf5373l astro - M52277EVB_config \ M52277EVB_spansion_config \ M52277EVB_stmicro_config : unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m52277evb @case $@ in \ M52277EVB_config) FLASH=SPANSION;; \ M52277EVB_spansion_config) FLASH=SPANSION;; \ @@ -607,19 +604,21 @@ M52277EVB_stmicro_config :unconfig if [ $${FLASH} = SPANSION ] ; then \ echo #define CONFIG_SYS_SPANSION_BOOT $(obj)include/config.h ; \ echo CONFIG_SYS_TEXT_BASE = 0x $(obj)board/freescale/m52277evb/config.tmp ; \ - cp $(obj)board/freescale/m52277evb/u-boot.spa $(obj)board/freescale/m52277evb/u-boot.lds ; \ + cp board/freescale/m52277evb/u-boot.spa board/freescale/m52277evb/u-boot.lds ; \ fi; \ if [ $${FLASH} = STMICRO ] ; then \ echo #define CONFIG_CF_SBF $(obj)include/config.h ; \ echo #define CONFIG_SYS_STMICRO_BOOT $(obj)include/config.h ; \ echo CONFIG_SYS_TEXT_BASE = 0x43E0 $(obj)board/freescale/m52277evb/config.tmp ; \ - cp $(obj)board/freescale/m52277evb/u-boot.stm $(obj)board/freescale/m52277evb/u-boot.lds ; \ + cp board/freescale/m52277evb/u-boot.stm board/freescale/m52277evb/u-boot.lds ; \ fi @$(MKCONFIG) -n $@ -a M52277EVB m68k mcf5227x m52277evb freescale M5235EVB_config \ M5235EVB_Flash16_config \ M5235EVB_Flash32_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m5235evb @case $@ in \ M5235EVB_config)FLASH=16;; \ M5235EVB_Flash16_config)FLASH=16;; \ @@ -628,63 +627,40 @@ M5235EVB_Flash32_config: unconfig if [ $${FLASH} != 16 ] ; then \ echo #define NORFLASH_PS32BIT 1 $(obj)include/config.h ; \ echo CONFIG_SYS_TEXT_BASE = 0xFFC0 $(obj)board/freescale/m5235evb/config.tmp ; \ - cp $(obj)board/freescale/m5235evb/u-boot.32 $(obj)board/freescale/m5235evb/u-boot.lds ; \ + cp board/freescale/m5235evb/u-boot.32 board/freescale/m5235evb/u-boot.lds ; \ else \ echo CONFIG_SYS_TEXT_BASE = 0xFFE0 $(obj)board/freescale/m5235evb/config.tmp ; \ - cp $(obj)board/freescale/m5235evb/u-boot.16 $(obj)board/freescale/m5235evb/u-boot.lds ; \ + cp board/freescale/m5235evb/u-boot.16 board/freescale/m5235evb/u-boot.lds ; \ fi @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale -cobra5272_config : unconfig - @$(MKCONFIG) $@ m68k mcf52x2 cobra5272 - EB+MCF-EV123_config : unconfig - @mkdir -p $(obj)include @mkdir -p $(obj)board/BuS/EB+MCF-EV123 @echo CONFIG_SYS_TEXT_BASE = 0xFFE0|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS EB+MCF-EV123_internal_config : unconfig - @mkdir -p $(obj)include @mkdir -p $(obj)board/BuS/EB+MCF-EV123 @echo CONFIG_SYS_TEXT_BASE = 0xF000|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS -M5329AFEE_config \ -M5329BFEE_config : unconfig - @case $@ in \ - M5329AFEE_config) NAND=0;; \ - M5329BFEE_config)
[U-Boot] (no subject)
0003 Changes for v2: - None ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/5] coldfire: Permit build in a different directory
Add $(obj) before lib$(CPU) to permit build in a different directory Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- arch/m68k/cpu/mcf5227x/Makefile |2 +- arch/m68k/cpu/mcf523x/Makefile|2 +- arch/m68k/cpu/mcf532x/Makefile|2 +- arch/m68k/cpu/mcf5445x/Makefile |2 +- arch/m68k/cpu/mcf547x_8x/Makefile |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/m68k/cpu/mcf5227x/Makefile b/arch/m68k/cpu/mcf5227x/Makefile index eb36264..0490f0e 100644 --- a/arch/m68k/cpu/mcf5227x/Makefile +++ b/arch/m68k/cpu/mcf5227x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf523x/Makefile b/arch/m68k/cpu/mcf523x/Makefile index eb36264..0490f0e 100644 --- a/arch/m68k/cpu/mcf523x/Makefile +++ b/arch/m68k/cpu/mcf523x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf532x/Makefile b/arch/m68k/cpu/mcf532x/Makefile index 257d46d..eb043d9 100644 --- a/arch/m68k/cpu/mcf532x/Makefile +++ b/arch/m68k/cpu/mcf532x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf5445x/Makefile b/arch/m68k/cpu/mcf5445x/Makefile index 047e35d..5b7ddd6 100644 --- a/arch/m68k/cpu/mcf5445x/Makefile +++ b/arch/m68k/cpu/mcf5445x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o pci.o diff --git a/arch/m68k/cpu/mcf547x_8x/Makefile b/arch/m68k/cpu/mcf547x_8x/Makefile index e41ce68..a415aab 100644 --- a/arch/m68k/cpu/mcf547x_8x/Makefile +++ b/arch/m68k/cpu/mcf547x_8x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = COBJS = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] (no subject)
Changes for v2: - Missing Corrections of link files for m54451evb board ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/5] coldfire: Remove link files entries to prevent multiple definitions
Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- board/BuS/EB+MCF-EV123/u-boot.lds|5 - board/astro/mcf5373l/u-boot.lds |4 board/cobra5272/u-boot.lds |5 - board/esd/tasreg/u-boot.lds |4 board/freescale/m5208evbe/u-boot.lds |1 - board/freescale/m5235evb/u-boot.16 |5 - board/freescale/m5235evb/u-boot.32 | 13 - board/freescale/m5249evb/u-boot.lds |4 board/freescale/m5253demo/u-boot.lds |4 board/freescale/m5253evbe/u-boot.lds |4 board/freescale/m5271evb/u-boot.lds |4 board/freescale/m5272c3/u-boot.lds |4 board/freescale/m5275evb/u-boot.lds |3 --- board/freescale/m5282evb/u-boot.lds |4 board/freescale/m53017evb/u-boot.lds |2 -- board/freescale/m5329evb/u-boot.lds |4 board/freescale/m5373evb/u-boot.lds |4 board/freescale/m54451evb/u-boot.spa |9 + board/freescale/m54451evb/u-boot.stm | 12 +--- board/freescale/m54455evb/u-boot.atm |4 board/freescale/m547xevb/u-boot.lds |3 --- board/freescale/m548xevb/u-boot.lds |3 --- board/idmr/u-boot.lds|4 23 files changed, 2 insertions(+), 107 deletions(-) diff --git a/board/BuS/EB+MCF-EV123/u-boot.lds b/board/BuS/EB+MCF-EV123/u-boot.lds index e0359e3..08983c9 100644 --- a/board/BuS/EB+MCF-EV123/u-boot.lds +++ b/board/BuS/EB+MCF-EV123/u-boot.lds @@ -56,11 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf52x2/start.o (.text) -common/dlmalloc.o (.text) -lib/string.o (.text) -lib/vsprintf.o (.text) -lib/crc32.o(.text) -lib/zlib.o (.text) /*. = env_offset; */ common/env_embedded.o(.text) diff --git a/board/astro/mcf5373l/u-boot.lds b/board/astro/mcf5373l/u-boot.lds index a1d8e0f..e628c36 100644 --- a/board/astro/mcf5373l/u-boot.lds +++ b/board/astro/mcf5373l/u-boot.lds @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf532x/start.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/lib/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index da14807..a641452 100644 --- a/board/cobra5272/u-boot.lds +++ b/board/cobra5272/u-boot.lds @@ -55,11 +55,6 @@ SECTIONS /* WARNING - the following is hand-optimized to fit within */ /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf52x2/start.o (.text) -arch/m68k/cpu/mcf52x2/cpu_init.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/cpu/mcf52x2/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/esd/tasreg/u-boot.lds b/board/esd/tasreg/u-boot.lds index 27a6b93..451d721 100644 --- a/board/esd/tasreg/u-boot.lds +++ b/board/esd/tasreg/u-boot.lds @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf52x2/start.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/cpu/mcf52x2/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5208evbe/u-boot.lds b/board/freescale/m5208evbe/u-boot.lds index e5011a6..a7b1eb3 100644 --- a/board/freescale/m5208evbe/u-boot.lds +++ b/board/freescale/m5208evbe/u-boot.lds @@ -58,7 +58,6 @@ SECTIONS arch/m68k/cpu/mcf52x2/start.o (.text) arch/m68k/cpu/mcf52x2/libmcf52x2.o (.text) arch/m68k/lib/libm68k.o(.text) -common/dlmalloc.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5235evb/u-boot.16 b/board/freescale/m5235evb/u-boot.16 index 657cd9d..1df2b07 100644 --- a/board/freescale/m5235evb/u-boot.16 +++ b/board/freescale/m5235evb/u-boot.16 @@ -56,11 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf523x/start.o (.text) -arch/m68k/cpu/mcf523x/cpu_init.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/lib/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5235evb/u-boot.32 b/board/freescale/m5235evb/u-boot.32 index 1f91994..1df2b07 100644 ---
[U-Boot] (no subject)
Changes for v2: - Impacted by the v2 of patch 2/5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/5] coldfire: Remove board with major build issues
Remove boards with a _config rules errors or with missing linker scripts from MAKEALL or boards.cfg. Permit to run the MAKEALL coldfire to the end. Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- boards.cfg |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/boards.cfg b/boards.cfg index 9bb7b4a..02666b1 100644 --- a/boards.cfg +++ b/boards.cfg @@ -298,7 +298,6 @@ M5485EFE m68kmcf547x_8x m548xevb freescale - M5485FFEm68kmcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=1,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=32,SYS_VIDEO,SYS_USBCTRL,SYS_DRAMSZ1=64 M5485GFEm68kmcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=1,SYS_BOOTSZ=4,SYS_DRAMSZ=64 M5485HFEm68kmcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=1,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=16,SYS_VIDEO -EP2500 m68kmcf52x2 ep2500 Mercury astro_mcf5373l m68kmcf532x mcf5373lastro cobra5272m68kmcf52x2 cobra5272 - microblaze-generic microblaze microblaze microblaze-generic xilinx -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] (no subject)
Sorry, Manipulation errors with git send-email. I did not correctly understand the --compose option, and my attempt to use --in-reply-to seams to have also failed. Regards ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] (no subject)
On Wednesday, August 31, 2011 01:32:07 PM Stany MARCEL wrote: Changes for v2: - Missing Corrections of link files for m54451evb board Hi, please wrap this into the patch's diffstat. Cheers ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: add 64-64 bit divider
On Wednesday, August 31, 2011 12:38:50 PM Che-Liang Chiou wrote: This patch adds a 64-64 bit divider that supports ARMv4 and above. Because clz (count leading zero) instruction is added until ARMv5, the divider implements a clz function for ARMv4 targets. The divider was tested with the following test driver code ran by qemu-arm: int main(void) { uint64_t a, b, q, r; while (scanf(%llx %llx %llx %llx, a, b, q, r) 0) printf(%016llx %016llx %016llx %016llx\n, a, b, a / b, a % b); return 0; } Signed-off-by: Che-Liang Chiou clch...@chromium.org Cc: Albert Aribaud albert.u.b...@aribaud.net --- Hi, do you see any kind of a performance hit so you can't use the default C version? Cheers ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-arm/master
On Wednesday, August 31, 2011 12:13:22 PM Albert ARIBAUD wrote: Hi Woldfgang, The following changes since commit bd061a5214e60c9d1bb24393933323bd1a2dae19: Hi Albert, I think you forgot to pull u-boot-pxa pull request I sent you? Cheers ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/5] coldfire: Change timer_init return type from void to int
Dear Stany MARCEL, In message 1314790136-8362-2-git-send-email-stany.mar...@novasys-ingenierie.com you wrote: timer_init protorype change for uniformization with other architectures Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- arch/m68k/cpu/mcf547x_8x/slicetimer.c |4 +++- arch/m68k/lib/board.c |2 -- arch/m68k/lib/time.c |8 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) Missing changelog (for the whole patch series), thus NAK. 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 Brontosaurus Principle: Organizations can grow faster than their brains can manage them in relation to their environment and to their own physiology: when this occurs, they are an endangered species. - Thomas K. Connellan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] (no subject)
Dear Stany MARCEL, In message 1314790136-8362-1-git-send-email-stany.mar...@novasys-ingenierie.com you wrote: Changes for v2: - Remove extern of timer_init What's this message supposed to be? Please ALWAYS provide a reasonable Subject line. And changelogs for patches must be submitted as part of the respective patch, as documented here: http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions 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 Vor allem kein Gedanke! Nichts ist kompromittierender als ein Gedan- ke!- Friedrich Wilhelm Nietzsche _Der Fall Wagner_ (1888) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot
On Tuesday, August 30, 2011 02:05:19 PM Michal Simek wrote: Add the first axi_ethernet driver for little-endian Microblaze. Signed-off-by: Michal Simek mon...@monstr.eu --- drivers/net/Makefile |1 + drivers/net/xilinx_axi_emac.c | 622 + include/netdev.h | 1 + 3 files changed, 624 insertions(+), 0 deletions(-) create mode 100644 drivers/net/xilinx_axi_emac.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 4541eaf..ae9d4cb 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -83,6 +83,7 @@ COBJS-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o +COBJS-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c new file mode 100644 index 000..ce79b80 --- /dev/null +++ b/drivers/net/xilinx_axi_emac.c @@ -0,0 +1,622 @@ +/* + * Copyright (C) 2011 Michal Simek mon...@monstr.eu + * Copyright (C) 2011 PetaLogix + * Copyright (C) 2010 Xilinx, Inc. All rights reserved. + * + * 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 config.h +#include common.h +#include net.h +#include malloc.h +#include asm/io.h +#include phy.h +#include miiphy.h + +/* Axi Ethernet registers offset */ +#define XAE_IS_OFFSET0x000C /* Interrupt status */ +#define XAE_IE_OFFSET0x0014 /* Interrupt enable */ +#define XAE_RCW1_OFFSET 0x0404 /* Rx Configuration Word 1 */ +#define XAE_TC_OFFSET0x0408 /* Tx Configuration */ +#define XAE_EMMC_OFFSET 0x0410 /* EMAC mode configuration */ +#define XAE_MDIO_MC_OFFSET 0x0500 /* MII Management Config */ +#define XAE_MDIO_MCR_OFFSET 0x0504 /* MII Management Control */ +#define XAE_MDIO_MWD_OFFSET 0x0508 /* MII Management Write Data */ +#define XAE_MDIO_MRD_OFFSET 0x050C /* MII Management Read Data */ Please use struct xae_regs {...} as the rest of the u-boot. + +/* Link setup */ +#define XAE_EMMC_LINKSPEED_MASK 0xC000 /* Link speed */ +#define XAE_EMMC_LINKSPD_10 0x /* Link Speed mask for 10 Mbit */ +#define XAE_EMMC_LINKSPD_100 0x4000 /* Link Speed mask for 100 Mbit */ +#define XAE_EMMC_LINKSPD_10000x8000 /* Link Speed mask for 1000 Mbit */ + Use (1 n) ? +/* Interrupt Status/Enable/Mask Registers bit definitions */ +#define XAE_INT_RXRJECT_MASK 0x0008 /* Rx frame rejected */ +#define XAE_INT_MGTRDY_MASK 0x0080 /* MGT clock Lock */ + [...] +#define DMAALIGN 128 + +static u8 RxFrame[PKTSIZE_ALIGN] __attribute((aligned(DMAALIGN))) ; Don't use cammelcase, all lowcase please. Also, can't you allocate this with memalign and hide it in axidma_priv or something ? + +/* reflect dma offsets */ +struct axidma_reg { + u32 control; /* DMACR */ + u32 status; /* DMASR */ + u32 current; /* CURDESC */ + u32 reserved; + u32 tail; /* TAILDESC */ +}; + +/* Private driver structures */ +struct axidma_priv { + struct axidma_reg *dmatx; + struct axidma_reg *dmarx; + int phyaddr; + + struct phy_device *phydev; + struct mii_dev *bus; +}; + +/* BD descriptors */ +struct axidma_bd { + u32 next; /* Next descriptor pointer */ + u32 reserved1; + u32 phys; /* Buffer address */ + u32 reserved2; + u32 reserved3; + u32 reserved4; + u32 cntrl; /* Control */ + u32 status; /* Status */ + u32 app0; + u32 app1; /* TX start 16 | insert */ + u32 app2; /* TX csum seed */ + u32 app3; + u32 app4; + u32 sw_id_offset; + u32 reserved5; + u32 reserved6; +}; + +/* Static BDs - driver uses only one BD */ +static struct axidma_bd tx_bd __attribute((aligned(DMAALIGN))); +static struct axidma_bd rx_bd __attribute((aligned(DMAALIGN))); + +static inline void aximac_out32(u32 addr, u32
[U-Boot] [PATCH v2 2/5] coldfire: Clean _config rules and move simple ones to boards.cfg
From: Stany MARCEL stany.mar...@novasys-ingenierie.com Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- Changes for v2: - Move boards with simple configurations to boards.cfg - Some build corrections MAKEALL|6 -- Makefile | 126 ++- boards.cfg | 20 +++ include/configs/M5329EVB.h |8 ++-- 4 files changed, 42 insertions(+), 118 deletions(-) diff --git a/MAKEALL b/MAKEALL index 3b98f03..37fe10e 100755 --- a/MAKEALL +++ b/MAKEALL @@ -558,18 +558,12 @@ LIST_microblaze=$(boards_by_arch microblaze) # LIST_coldfire=$(boards_by_arch m68k) - astro_mcf5373l \ - cobra5272 \ EB+MCF-EV123\ EB+MCF-EV123_internal \ M52277EVB \ M5235EVB\ - M5329AFEE \ - M5373EVB\ M54451EVB \ M54455EVB \ - M5475AFE\ - M5485AFE\ # diff --git a/Makefile b/Makefile index 03d80b7..be9f325 100644 --- a/Makefile +++ b/Makefile @@ -591,14 +591,11 @@ ucname= $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/') # ## Coldfire # - -astro_mcf5373l_config \ -astro_mcf5373l_RAM_config :unconfig - @$(MKCONFIG) -n $@ -t $@ astro_mcf5373l m68k mcf532x mcf5373l astro - M52277EVB_config \ M52277EVB_spansion_config \ M52277EVB_stmicro_config : unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m52277evb @case $@ in \ M52277EVB_config) FLASH=SPANSION;; \ M52277EVB_spansion_config) FLASH=SPANSION;; \ @@ -607,19 +604,21 @@ M52277EVB_stmicro_config :unconfig if [ $${FLASH} = SPANSION ] ; then \ echo #define CONFIG_SYS_SPANSION_BOOT $(obj)include/config.h ; \ echo CONFIG_SYS_TEXT_BASE = 0x $(obj)board/freescale/m52277evb/config.tmp ; \ - cp $(obj)board/freescale/m52277evb/u-boot.spa $(obj)board/freescale/m52277evb/u-boot.lds ; \ + cp board/freescale/m52277evb/u-boot.spa board/freescale/m52277evb/u-boot.lds ; \ fi; \ if [ $${FLASH} = STMICRO ] ; then \ echo #define CONFIG_CF_SBF $(obj)include/config.h ; \ echo #define CONFIG_SYS_STMICRO_BOOT $(obj)include/config.h ; \ echo CONFIG_SYS_TEXT_BASE = 0x43E0 $(obj)board/freescale/m52277evb/config.tmp ; \ - cp $(obj)board/freescale/m52277evb/u-boot.stm $(obj)board/freescale/m52277evb/u-boot.lds ; \ + cp board/freescale/m52277evb/u-boot.stm board/freescale/m52277evb/u-boot.lds ; \ fi @$(MKCONFIG) -n $@ -a M52277EVB m68k mcf5227x m52277evb freescale M5235EVB_config \ M5235EVB_Flash16_config \ M5235EVB_Flash32_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m5235evb @case $@ in \ M5235EVB_config)FLASH=16;; \ M5235EVB_Flash16_config)FLASH=16;; \ @@ -628,63 +627,40 @@ M5235EVB_Flash32_config: unconfig if [ $${FLASH} != 16 ] ; then \ echo #define NORFLASH_PS32BIT 1 $(obj)include/config.h ; \ echo CONFIG_SYS_TEXT_BASE = 0xFFC0 $(obj)board/freescale/m5235evb/config.tmp ; \ - cp $(obj)board/freescale/m5235evb/u-boot.32 $(obj)board/freescale/m5235evb/u-boot.lds ; \ + cp board/freescale/m5235evb/u-boot.32 board/freescale/m5235evb/u-boot.lds ; \ else \ echo CONFIG_SYS_TEXT_BASE = 0xFFE0 $(obj)board/freescale/m5235evb/config.tmp ; \ - cp $(obj)board/freescale/m5235evb/u-boot.16 $(obj)board/freescale/m5235evb/u-boot.lds ; \ + cp board/freescale/m5235evb/u-boot.16 board/freescale/m5235evb/u-boot.lds ; \ fi @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale -cobra5272_config : unconfig - @$(MKCONFIG) $@ m68k mcf52x2 cobra5272 - EB+MCF-EV123_config : unconfig - @mkdir -p $(obj)include @mkdir -p $(obj)board/BuS/EB+MCF-EV123 @echo CONFIG_SYS_TEXT_BASE = 0xFFE0|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS EB+MCF-EV123_internal_config : unconfig - @mkdir -p $(obj)include @mkdir -p $(obj)board/BuS/EB+MCF-EV123 @echo CONFIG_SYS_TEXT_BASE = 0xF000|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS
[U-Boot] [PATCH v2 3/5] coldfire: Permit build in a different directory
From: Stany MARCEL stany.mar...@novasys-ingenierie.com Add $(obj) before lib$(CPU) to permit build in a different directory Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- Changes for v2: - None arch/m68k/cpu/mcf5227x/Makefile |2 +- arch/m68k/cpu/mcf523x/Makefile|2 +- arch/m68k/cpu/mcf532x/Makefile|2 +- arch/m68k/cpu/mcf5445x/Makefile |2 +- arch/m68k/cpu/mcf547x_8x/Makefile |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/m68k/cpu/mcf5227x/Makefile b/arch/m68k/cpu/mcf5227x/Makefile index eb36264..0490f0e 100644 --- a/arch/m68k/cpu/mcf5227x/Makefile +++ b/arch/m68k/cpu/mcf5227x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf523x/Makefile b/arch/m68k/cpu/mcf523x/Makefile index eb36264..0490f0e 100644 --- a/arch/m68k/cpu/mcf523x/Makefile +++ b/arch/m68k/cpu/mcf523x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf532x/Makefile b/arch/m68k/cpu/mcf532x/Makefile index 257d46d..eb043d9 100644 --- a/arch/m68k/cpu/mcf532x/Makefile +++ b/arch/m68k/cpu/mcf532x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf5445x/Makefile b/arch/m68k/cpu/mcf5445x/Makefile index 047e35d..5b7ddd6 100644 --- a/arch/m68k/cpu/mcf5445x/Makefile +++ b/arch/m68k/cpu/mcf5445x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o pci.o diff --git a/arch/m68k/cpu/mcf547x_8x/Makefile b/arch/m68k/cpu/mcf547x_8x/Makefile index e41ce68..a415aab 100644 --- a/arch/m68k/cpu/mcf547x_8x/Makefile +++ b/arch/m68k/cpu/mcf547x_8x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = COBJS = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/5] coldfire: Remove link files entries to prevent multiple definitions
From: Stany MARCEL stany.mar...@novasys-ingenierie.com Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- Changes for v2: - Missing Corrections of link files for m54451evb board board/BuS/EB+MCF-EV123/u-boot.lds|5 - board/astro/mcf5373l/u-boot.lds |4 board/cobra5272/u-boot.lds |5 - board/esd/tasreg/u-boot.lds |4 board/freescale/m5208evbe/u-boot.lds |1 - board/freescale/m5235evb/u-boot.16 |5 - board/freescale/m5235evb/u-boot.32 | 13 - board/freescale/m5249evb/u-boot.lds |4 board/freescale/m5253demo/u-boot.lds |4 board/freescale/m5253evbe/u-boot.lds |4 board/freescale/m5271evb/u-boot.lds |4 board/freescale/m5272c3/u-boot.lds |4 board/freescale/m5275evb/u-boot.lds |3 --- board/freescale/m5282evb/u-boot.lds |4 board/freescale/m53017evb/u-boot.lds |2 -- board/freescale/m5329evb/u-boot.lds |4 board/freescale/m5373evb/u-boot.lds |4 board/freescale/m54451evb/u-boot.spa |9 + board/freescale/m54451evb/u-boot.stm | 12 +--- board/freescale/m54455evb/u-boot.atm |4 board/freescale/m547xevb/u-boot.lds |3 --- board/freescale/m548xevb/u-boot.lds |3 --- board/idmr/u-boot.lds|4 23 files changed, 2 insertions(+), 107 deletions(-) diff --git a/board/BuS/EB+MCF-EV123/u-boot.lds b/board/BuS/EB+MCF-EV123/u-boot.lds index e0359e3..08983c9 100644 --- a/board/BuS/EB+MCF-EV123/u-boot.lds +++ b/board/BuS/EB+MCF-EV123/u-boot.lds @@ -56,11 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf52x2/start.o (.text) -common/dlmalloc.o (.text) -lib/string.o (.text) -lib/vsprintf.o (.text) -lib/crc32.o(.text) -lib/zlib.o (.text) /*. = env_offset; */ common/env_embedded.o(.text) diff --git a/board/astro/mcf5373l/u-boot.lds b/board/astro/mcf5373l/u-boot.lds index a1d8e0f..e628c36 100644 --- a/board/astro/mcf5373l/u-boot.lds +++ b/board/astro/mcf5373l/u-boot.lds @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf532x/start.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/lib/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index da14807..a641452 100644 --- a/board/cobra5272/u-boot.lds +++ b/board/cobra5272/u-boot.lds @@ -55,11 +55,6 @@ SECTIONS /* WARNING - the following is hand-optimized to fit within */ /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf52x2/start.o (.text) -arch/m68k/cpu/mcf52x2/cpu_init.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/cpu/mcf52x2/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/esd/tasreg/u-boot.lds b/board/esd/tasreg/u-boot.lds index 27a6b93..451d721 100644 --- a/board/esd/tasreg/u-boot.lds +++ b/board/esd/tasreg/u-boot.lds @@ -56,10 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf52x2/start.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/cpu/mcf52x2/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5208evbe/u-boot.lds b/board/freescale/m5208evbe/u-boot.lds index e5011a6..a7b1eb3 100644 --- a/board/freescale/m5208evbe/u-boot.lds +++ b/board/freescale/m5208evbe/u-boot.lds @@ -58,7 +58,6 @@ SECTIONS arch/m68k/cpu/mcf52x2/start.o (.text) arch/m68k/cpu/mcf52x2/libmcf52x2.o (.text) arch/m68k/lib/libm68k.o(.text) -common/dlmalloc.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git a/board/freescale/m5235evb/u-boot.16 b/board/freescale/m5235evb/u-boot.16 index 657cd9d..1df2b07 100644 --- a/board/freescale/m5235evb/u-boot.16 +++ b/board/freescale/m5235evb/u-boot.16 @@ -56,11 +56,6 @@ SECTIONS /* the sector layout of our flash chips! XXX FIXME XXX */ arch/m68k/cpu/mcf523x/start.o (.text) -arch/m68k/cpu/mcf523x/cpu_init.o (.text) -arch/m68k/lib/traps.o (.text) -arch/m68k/lib/interrupts.o (.text) -common/dlmalloc.o (.text) -lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) diff --git
[U-Boot] [PATCH v2 1/5] coldfire: Change timer_init return type from void to int
From: Stany MARCEL stany.mar...@novasys-ingenierie.com timer_init protorype change for uniformization with other architectures Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- Changes for v2: - Remove extern of timer_init arch/m68k/cpu/mcf547x_8x/slicetimer.c |4 +++- arch/m68k/lib/board.c |2 -- arch/m68k/lib/time.c |8 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c index 467a807..ee96aad 100644 --- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c +++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c @@ -72,7 +72,7 @@ void dtimer_interrupt(void *not_used) } } -void timer_init(void) +int timer_init(void) { volatile slt_t *timerp = (slt_t *) (CONFIG_SYS_TMR_BASE); @@ -93,6 +93,8 @@ void timer_init(void) /* set a period of 1us, set timer mode to restart and enable timer and interrupt */ timerp-cr = SLT_CR_RUN | SLT_CR_IEN | SLT_CR_TEN; + + return 0; } ulong get_timer(ulong base) diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index 945ab66..1df50f1 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -78,8 +78,6 @@ static char *failed = *** failed ***\n; extern ulong __init_end; extern ulong __bss_end__; -extern void timer_init(void); - #if defined(CONFIG_WATCHDOG) # define INIT_FUNC_WATCHDOG_INIT watchdog_init, # define WATCHDOG_DISABLE watchdog_disable diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index a316cdf..a1eb983 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -91,7 +91,7 @@ void dtimer_interrupt(void *not_used) } } -void timer_init(void) +int timer_init(void) { volatile dtmr_t *timerp = (dtmr_t *) (CONFIG_SYS_TMR_BASE); @@ -114,6 +114,8 @@ void timer_init(void) /* set a period of 1us, set timer mode to restart and enable timer and interrupt */ timerp-tmr = CONFIG_SYS_TIMER_PRESCALER | DTIM_DTMR_CLK_DIV1 | DTIM_DTMR_FRR | DTIM_DTMR_ORRI | DTIM_DTMR_RST_EN; + + return 0; } ulong get_timer(ulong base) @@ -153,7 +155,7 @@ void __udelay(unsigned long usec) } } -void timer_init(void) +int timer_init(void) { volatile pit_t *timerp = (pit_t *) (CONFIG_SYS_PIT_BASE); timestamp = 0; @@ -162,6 +164,8 @@ void timer_init(void) timerp-pcsr = PIT_PCSR_OVW; timerp-pmr = lastinc = 0; timerp-pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN; + + return 0; } ulong get_timer(ulong base) -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/5] coldfire: Remove board with major build issues
Remove boards with a _config rules errors or with missing linker scripts from MAKEALL or boards.cfg. Permit to run the MAKEALL coldfire to the end. Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- Changes for v2: - Impacted by the v2 of patch 2/5 - only EP2500 removed now boards.cfg |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/boards.cfg b/boards.cfg index 9bb7b4a..02666b1 100644 --- a/boards.cfg +++ b/boards.cfg @@ -298,7 +298,6 @@ M5485EFE m68kmcf547x_8x m548xevb freescale - M5485FFEm68kmcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=1,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=32,SYS_VIDEO,SYS_USBCTRL,SYS_DRAMSZ1=64 M5485GFEm68kmcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=1,SYS_BOOTSZ=4,SYS_DRAMSZ=64 M5485HFEm68kmcf547x_8x m548xevb freescale - M5485EVB:SYS_BUSCLK=1,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=16,SYS_VIDEO -EP2500 m68kmcf52x2 ep2500 Mercury astro_mcf5373l m68kmcf532x mcf5373lastro cobra5272m68kmcf52x2 cobra5272 - microblaze-generic microblaze microblaze microblaze-generic xilinx -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] (no subject)
Date: Mon, 29 Aug 2011 21:04:45 +1000 Subject: [PATCH V3] console: Implement pre-console buffer Allow redirection of console output prior to console initialisation to a temporary buffer. To enable this functionality, the board configuration file must define: - CONFIG_PRE_CONSOLE_BUFFER - Enable pre-console buffer - CONFIG_PRE_CON_BUF_ADDR - Base address of pre-console buffer - CONFIG_PRE_CON_BUF_SZ - Size of pre-console buffer (in bytes) The pre-console buffer will buffer the last CONFIG_PRE_CON_BUF_SZ bytes Any earlier characters are silently dropped. Signed-off-by: Graeme Russ graeme.r...@gmail.com --- Changes since V2 - Cast buffer size to unsigned long to help compilers produce tighter code - Use inline stub functions to reduce #ifdef clutter - Add documentation to README Changes Since V1 - Implemented circular buffer - Trivial code styl corrections README| 14 + arch/arm/include/asm/global_data.h|3 ++ arch/avr32/include/asm/global_data.h |3 ++ arch/blackfin/include/asm/global_data.h |3 ++ arch/m68k/include/asm/global_data.h |3 ++ arch/microblaze/include/asm/global_data.h |3 ++ arch/mips/include/asm/global_data.h |3 ++ arch/nios2/include/asm/global_data.h |3 ++ arch/powerpc/include/asm/global_data.h|3 ++ arch/sh/include/asm/global_data.h |3 ++ arch/sparc/include/asm/global_data.h |3 ++ arch/x86/include/asm/global_data.h|3 ++ common/console.c | 43 +++- 13 files changed, 88 insertions(+), 2 deletions(-) diff --git a/README b/README index 0886987..170e67b 100644 --- a/README +++ b/README @@ -619,6 +619,20 @@ The following options need to be configured: must be defined, to setup the maximum idle timeout for the SMC. +- Pre-Console Buffer: +Prior to the console being initialised (i.e. serial UART +initialised etc) all console output is silently discarded. +Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to +buffer any console messages prior to the console being +initialised to a buffer of size CONFIG_PRE_CON_BUF_SZ +bytes located at CONFIG_PRE_CON_BUF_ADDR. The buffer is +a cicular buffer, so if more than CONFIG_PRE_CON_BUF_SZ +bytes are output before the console is initialised, the +earlier bytes are discarded. + +'Sane' compilers will generate smaller code if +CONFIG_PRE_CON_BUF_SZ is a power of 2 + - Boot Delay: CONFIG_BOOTDELAY - in seconds Delay before automatically booting the default image; set to -1 to disable autoboot. diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 4fc51fd..b85b7fe 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -38,6 +38,9 @@ typedef struct global_data { unsigned long flags; unsigned long baudrate; unsigned long have_console; /* serial_init() was called */ +#ifdef CONFIG_PRE_CONSOLE_BUFFER + unsigned long precon_buf_idx; /* Pre-Console buffer index */ +#endif unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */ unsigned long fb_base;/* base address of frame buffer */ diff --git a/arch/avr32/include/asm/global_data.h b/arch/avr32/include/asm/global_data.h index 4ef8fc5..5c654bd 100644 --- a/arch/avr32/include/asm/global_data.h +++ b/arch/avr32/include/asm/global_data.h @@ -38,6 +38,9 @@ typedef struct global_data { unsigned long baudrate; unsigned long stack_end; /* highest stack address */ unsigned long have_console; /* serial_init() was called */ +#ifdef CONFIG_PRE_CONSOLE_BUFFER + unsigned long precon_buf_idx; /* Pre-Console buffer index */ +#endif unsigned long reloc_off; /* Relocation Offset */ unsigned long env_addr; /* Address of env struct */ unsigned long env_valid; /* Checksum of env valid? */ diff --git a/arch/blackfin/include/asm/global_data.h b/arch/blackfin/include/asm/global_data.h index eba5e93..f7aa711 100644 --- a/arch/blackfin/include/asm/global_data.h +++ b/arch/blackfin/include/asm/global_data.h @@ -45,6 +45,9 @@ typedef struct global_data { unsigned long board_type; unsigned long baudrate; unsigned long have_console; /* serial_init() was called */ +#ifdef CONFIG_PRE_CONSOLE_BUFFER + unsigned long precon_buf_idx; /* Pre-Console buffer index */ +#endif phys_size_t ram_size; /* RAM size */ unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid;
Re: [U-Boot] (no subject)
On 31/08/11 22:35, Graeme Russ wrote: Date: Mon, 29 Aug 2011 21:04:45 +1000 Subject: [PATCH V3] console: Implement pre-console buffer Eep - I do not know what happened to the subject... Let me try again... Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Flush cache after the OS image is loaded into the memory.
From: Diana CRACIUN diana.crac...@freescale.com Since we are loading an executable image into memory we need flush it out of the cache to possible maintain coherence on CPUs with split instruction and data caches. We do this for other executable image loading command. On PowerPC once we do this we no longer need to explicitly flush the dcache on multi-core systems in the BOOTM_STATE_OS_PREP phase. We now treat the BOOTM_STATE_OS_PREP as a no-op to maintain backwards compatibility with the bootm subcommand. Signed-off-by: James Yang james.y...@freescale.com Signed-off-by: Diana CRACIUN diana.crac...@freescale.com Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/lib/bootm.c | 20 ++-- common/cmd_bootm.c |3 +++ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 1375474..8233f1f 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -174,16 +174,6 @@ void arch_lmb_reserve(struct lmb *lmb) return ; } -static void boot_prep_linux(void) -{ -#ifdef CONFIG_MP - /* if we are MP make sure to flush the dcache() to any changes are made -* visibile to all other cores */ - flush_dcache(); -#endif - return ; -} - static int boot_cmdline_linux(bootm_headers_t *images) { ulong of_size = images-ft_len; @@ -339,17 +329,19 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima return 0; } - if (flag BOOTM_STATE_OS_PREP) { - boot_prep_linux(); + /* +* We do nothing report success to retain compatiablity with older +* versions of u-boot in which this use to flush the dcache on MP +* systems +*/ + if (flag BOOTM_STATE_OS_PREP) return 0; - } if (flag BOOTM_STATE_OS_GO) { boot_jump_linux(images); return 0; } - boot_prep_linux(); ret = boot_body_linux(images); if (ret) return ret; diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 272d879..8909ee7 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -432,6 +432,9 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress) printf (Unimplemented compression type %d\n, comp); return BOOTM_ERR_UNIMPLEMENTED; } + + flush_cache(load, (*load_end - load) * sizeof(ulong)); + puts (OK\n); debug ( kernel loaded at 0x%08lx, end = 0x%08lx\n, load, *load_end); if (boot_progress) -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4] console: Implement pre-console buffer
Allow redirection of console output prior to console initialisation to a temporary buffer. To enable this functionality, the board configuration file must define: - CONFIG_PRE_CONSOLE_BUFFER - Enable pre-console buffer - CONFIG_PRE_CON_BUF_ADDR - Base address of pre-console buffer - CONFIG_PRE_CON_BUF_SZ - Size of pre-console buffer (in bytes) The pre-console buffer will buffer the last CONFIG_PRE_CON_BUF_SZ bytes Any earlier characters are silently dropped. Signed-off-by: Graeme Russ graeme.r...@gmail.com --- Changes since V3 - Fixed blank subject caused by gap between the Cc: list and Date: Changes since V2 - Cast buffer size to unsigned long to help compilers produce tighter code - Use inline stub functions to reduce #ifdef clutter - Add documentation to README Changes Since V1 - Implemented circular buffer - Trivial code styl corrections README| 14 + arch/arm/include/asm/global_data.h|3 ++ arch/avr32/include/asm/global_data.h |3 ++ arch/blackfin/include/asm/global_data.h |3 ++ arch/m68k/include/asm/global_data.h |3 ++ arch/microblaze/include/asm/global_data.h |3 ++ arch/mips/include/asm/global_data.h |3 ++ arch/nios2/include/asm/global_data.h |3 ++ arch/powerpc/include/asm/global_data.h|3 ++ arch/sh/include/asm/global_data.h |3 ++ arch/sparc/include/asm/global_data.h |3 ++ arch/x86/include/asm/global_data.h|3 ++ common/console.c | 43 +++- 13 files changed, 88 insertions(+), 2 deletions(-) diff --git a/README b/README index 0886987..170e67b 100644 --- a/README +++ b/README @@ -619,6 +619,20 @@ The following options need to be configured: must be defined, to setup the maximum idle timeout for the SMC. +- Pre-Console Buffer: +Prior to the console being initialised (i.e. serial UART +initialised etc) all console output is silently discarded. +Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to +buffer any console messages prior to the console being +initialised to a buffer of size CONFIG_PRE_CON_BUF_SZ +bytes located at CONFIG_PRE_CON_BUF_ADDR. The buffer is +a cicular buffer, so if more than CONFIG_PRE_CON_BUF_SZ +bytes are output before the console is initialised, the +earlier bytes are discarded. + +'Sane' compilers will generate smaller code if +CONFIG_PRE_CON_BUF_SZ is a power of 2 + - Boot Delay: CONFIG_BOOTDELAY - in seconds Delay before automatically booting the default image; set to -1 to disable autoboot. diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 4fc51fd..b85b7fe 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -38,6 +38,9 @@ typedef struct global_data { unsigned long flags; unsigned long baudrate; unsigned long have_console; /* serial_init() was called */ +#ifdef CONFIG_PRE_CONSOLE_BUFFER + unsigned long precon_buf_idx; /* Pre-Console buffer index */ +#endif unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */ unsigned long fb_base;/* base address of frame buffer */ diff --git a/arch/avr32/include/asm/global_data.h b/arch/avr32/include/asm/global_data.h index 4ef8fc5..5c654bd 100644 --- a/arch/avr32/include/asm/global_data.h +++ b/arch/avr32/include/asm/global_data.h @@ -38,6 +38,9 @@ typedef struct global_data { unsigned long baudrate; unsigned long stack_end; /* highest stack address */ unsigned long have_console; /* serial_init() was called */ +#ifdef CONFIG_PRE_CONSOLE_BUFFER + unsigned long precon_buf_idx; /* Pre-Console buffer index */ +#endif unsigned long reloc_off; /* Relocation Offset */ unsigned long env_addr; /* Address of env struct */ unsigned long env_valid; /* Checksum of env valid? */ diff --git a/arch/blackfin/include/asm/global_data.h b/arch/blackfin/include/asm/global_data.h index eba5e93..f7aa711 100644 --- a/arch/blackfin/include/asm/global_data.h +++ b/arch/blackfin/include/asm/global_data.h @@ -45,6 +45,9 @@ typedef struct global_data { unsigned long board_type; unsigned long baudrate; unsigned long have_console; /* serial_init() was called */ +#ifdef CONFIG_PRE_CONSOLE_BUFFER + unsigned long precon_buf_idx; /* Pre-Console buffer index */ +#endif phys_size_t ram_size; /* RAM size */ unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid;/*
Re: [U-Boot] Pull request: u-boot-arm/master -- please hold
On Wednesday, August 31, 2011 02:57:10 PM Albert ARIBAUD wrote: Le 31/08/2011 13:57, Marek Vasut a écrit : On Wednesday, August 31, 2011 12:13:22 PM Albert ARIBAUD wrote: Hi Woldfgang, The following changes since commit bd061a5214e60c9d1bb24393933323bd1a2dae19: Hi Albert, I think you forgot to pull u-boot-pxa pull request I sent you? Apologies -- I did miss it. Let me pull this and test somewhat. Hi, it was a bit blurry there, it's my fault. Sorry Wolfgang, please hold for now. Cheers Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] add dm9000 eeprom read/write command
On 08/30/2011 11:17 PM, Eric Jarrige wrote: Hi Stefano, Hi Eric, Sorry for the confusion, I did not understood that your remark was not related to the compilation flags. Now, I've checked how to have this U-Boot commands in the driver itself. I think it's doable if I can have a compilation CONFIG_CMD_XXX to enable the command line feature. You could add a CONFIG_DM9000_* switch. This set a switch only for the DM9000 driver and the name remembers that it is used only inside the driver itself, such as CONFIG_DM9000_DEBUG and CONFIG_DM9000_BASE that are currently used in the driver. Without this option, there is a direct impact one memory footprint for every board featuring the DM9000 controller and I failed to find any model of driver with an optional command line interface in a driver. Or you can reuse CONFIG_DM9000_NO_SROM (already in driver) and enable your command if this switch is not defined. If the eeprom is present, it makes sense to have this command enabled. Why do you recommend to put the command interface in drivers as it is seems to be something quite unusual in U-Boot ? Not sure it is so unusual. I see that all commands under common/* are general commands, and they are not related to a specific driver. There are then two commands in drivers, drivers/misc/fsl_pmic.c and drivers/qe/qe.c. These commands are only related to these drivers and make no sense without the driver. I see then a lot of board related commands stored in the board directories. If I understand well the concept, each command resides where it is thought: general commands in common, board commands in board directories, driver commands in the driver itself. If your command is in the driver file, there is also no need to check if CONFIG_DRIVER_DM9000 is set, because the file is simply not compiled if it is unset. Best regards, Stefano -- = 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] [PATCH v3 1/8] da850: indicate cache usage disable in config file
Nagabhushana, On Mon, Aug 29, 2011 at 6:56 AM, Netagunte, Nagabhushana nagabhushana.netagu...@ti.com wrote: Gentlemen, We will address cache coherency issues soon after these patches. Ok -- that's great news; we greatly anticipate U-boot improvements for da850 from TI. Earlier also, chache was disabled. Only due to new cache management Framework which was added recently, it is explicitly needed to be Indicated to turn off cache. My experience with the ARM-relocation changes on da8xx (which enabled caches as I understood it) was very positive. I'm sorry I missed the patch that disabled cache for davinci; git log --decorate u-boot/master -- board/davinci/ arch/arm/cpu/arm926ejs/davinci/ include/configs/davinci_* arch/arm/include/asm/arch-davinci doesn't turn up anything related to caches so the patch (re: 'Earlier also, chache was disabled') is still in mailing lists? Since fixing the cache coherency issues with EMAC will take some time, I want this patch to go in mainline so that issue doesn't crop up for People who use u-boot. I certainly don't want anything less than the best user experience for da850 u-boot. It's possible that I have not been using caches in u-boot as I thought I was -- considering I did not experience corrupted frames from the EMAC. On Wed, Aug 31, 2011 at 1:39 AM, Netagunte, Nagabhushana nagabhushana.netagu...@ti.com wrote: If you have no further comments, can you please ACK patches? for what it's worth: Acked-by: Ben Gardiner bengardi...@nanometrics.ca Best Regards, Ben Gardiner --- Nanometrics Inc. +1 (613) 592-6776 x239 http://www.nanometrics.ca ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/85xx: Enable CMD_REGINFO on corenet boards
Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- include/configs/corenet_ds.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 96810b9..3aa5333 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -577,6 +577,7 @@ #define CONFIG_CMD_MII #define CONFIG_CMD_PING #define CONFIG_CMD_SETEXPR +#define CONFIG_CMD_REGINFO #ifdef CONFIG_PCI #define CONFIG_CMD_PCI -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: add 64-64 bit divider
On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: This patch adds a 64-64 bit divider that supports ARMv4 and above. why ? if you're doing 64 bit divides, chances are you're doing something fundamentally wrong. perhaps you should fix that instead. this is also why we have the do_div() helper macro. so until your changelog documents the actual *reason* for this patch: NAK -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] at91rm9200ek.h: explicitly disable D-Cache
On Wednesday, August 31, 2011 01:36:13 Andreas Bießmann wrote: Commit c2dd0d45540397704de9b13287417d21049d34c6 enabled D-Cache for all arm devices explicitly. This renders at91_emac driver on at91rm9200ek unusable. sounds like the at91_emac driver should get a small patch: #ifndef CONFIG_SYS_DCACHE_OFF # error this driver sucks: define CONFIG_SYS_DCACHE_OFF until it is fixed #endif -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] da830: disable cache usage due to coherency issues
On Wednesday, August 31, 2011 01:40:26 Netagunte, Nagabhushana wrote: We will address cache coherency issues soon after these patches. Earlier also, chache was disabled. Only due to new cache management Framework which was added recently, it is explicitly needed to be indicated to turn off cache. Since fixing the cache coherency issues with EMAC will take some time, I want this patch to go in mainline so that issue doesn't crop up for People who use u-boot. please add something like this to your emac driver then: #ifndef CONFIG_SYS_DCACHE_OFF # error this driver sucks: define CONFIG_SYS_DCACHE_OFF until it is fixed #endif -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tools/env: add posibility to inject configuration
On Wednesday, August 31, 2011 06:06:09 Andreas Bießmann wrote: --- a/tools/env/Makefile +++ b/tools/env/Makefile +FW_ENV_CONFIG_IN := $(if $(FW_ENV_CONFIG),$(FW_ENV_CONFIG),fw_env_config.h.in) sorry, but what is the point of this ? why not just do: FW_ENV_CONFIG ?= fw_env_config.h.in --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h +#endif // _FW_ENV_H_ --- /dev/null +++ b/tools/env/fw_env_config.h.in +#endif // _FW_ENV_CONFIG_H_ no // C++ comments. just delete them and be done. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Common arch-specific header files for SOCs
On Wednesday, August 31, 2011 01:30:56 Simon Glass wrote: On Tue, Aug 30, 2011 at 9:36 PM, Mike Frysinger wrote: On Tuesday, August 30, 2011 17:13:51 Simon Glass wrote: The arch/arm/include/asm/arch symlink needs to point to arch-tegra2 in my case, which is fine, but I also want to be able to include common files. #include asm/arch/clock.h This points to arch/arm/include/asm/arch-tegra2/clock.h but this would not be available from a tegra3 architecture, for example. $ cat arch/arm/include/asm/arch-tegra3/clock.h #include asm/arch-tegra2/clock.h Any other suggestions? It almost feels like we need an 'SOC family' field in boards.cfg (as distinct from SOC). Then we could perhaps have this work automatically. maybe create asm/arch-tegra/ for the common stuff and have the other tegras include that for common stuff ? That sort-of works. My concern is when drivers start doing #include asm/arch-tegra/clock.h Doesn't that break the rule that architecture should be set at config time? Not that it matters much I suppose, since the only drivers including this file are architecture-specific. the driver is broken then ? :) easy to catch this ala bits/ C library headers: arch-tegra2/clock.h: #ifndef _ARCH_TEGRA_CLOCK_H_ #define _ARCH_TEGRA_CLOCK_H_ ... #include asm/arch-tegra/clock.h ... #endif arch-tegra3/clock.h: #ifndef _ARCH_TEGRA_CLOCK_H_ #define _ARCH_TEGRA_CLOCK_H_ ... #include asm/arch-tegra/clock.h ... #endif asm/arch-tegra/clock.h: #ifndef _ARCH_TEGRA_CLOCK_H_ # error do not include this header directly #endif #ifndef _ARCH_TEGRA_COMMON_CLOCK_H_ #define _ARCH_TEGRA_COMMON_CLOCK_H_ ... #endif -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot
Marek Vasut wrote: On Tuesday, August 30, 2011 02:05:19 PM Michal Simek wrote: Add the first axi_ethernet driver for little-endian Microblaze. Signed-off-by: Michal Simek mon...@monstr.eu --- drivers/net/Makefile |1 + drivers/net/xilinx_axi_emac.c | 622 + include/netdev.h | 1 + 3 files changed, 624 insertions(+), 0 deletions(-) create mode 100644 drivers/net/xilinx_axi_emac.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 4541eaf..ae9d4cb 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -83,6 +83,7 @@ COBJS-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o +COBJS-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c new file mode 100644 index 000..ce79b80 --- /dev/null +++ b/drivers/net/xilinx_axi_emac.c @@ -0,0 +1,622 @@ +/* + * Copyright (C) 2011 Michal Simek mon...@monstr.eu + * Copyright (C) 2011 PetaLogix + * Copyright (C) 2010 Xilinx, Inc. All rights reserved. + * + * 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 config.h +#include common.h +#include net.h +#include malloc.h +#include asm/io.h +#include phy.h +#include miiphy.h + +/* Axi Ethernet registers offset */ +#define XAE_IS_OFFSET 0x000C /* Interrupt status */ +#define XAE_IE_OFFSET 0x0014 /* Interrupt enable */ +#define XAE_RCW1_OFFSET 0x0404 /* Rx Configuration Word 1 */ +#define XAE_TC_OFFSET 0x0408 /* Tx Configuration */ +#define XAE_EMMC_OFFSET 0x0410 /* EMAC mode configuration */ +#define XAE_MDIO_MC_OFFSET 0x0500 /* MII Management Config */ +#define XAE_MDIO_MCR_OFFSET 0x0504 /* MII Management Control */ +#define XAE_MDIO_MWD_OFFSET 0x0508 /* MII Management Write Data */ +#define XAE_MDIO_MRD_OFFSET 0x050C /* MII Management Read Data */ Please use struct xae_regs {...} as the rest of the u-boot. struct is not useful here because it will be big with a lot of reserved values. + +/* Link setup */ +#define XAE_EMMC_LINKSPEED_MASK 0xC000 /* Link speed */ +#define XAE_EMMC_LINKSPD_10 0x /* Link Speed mask for 10 Mbit */ +#define XAE_EMMC_LINKSPD_1000x4000 /* Link Speed mask for 100 Mbit */ +#define XAE_EMMC_LINKSPD_1000 0x8000 /* Link Speed mask for 1000 Mbit */ + Use (1 n) ? just another solution - I prefer to use 32bit value - easier when you decode it by md. +/* Interrupt Status/Enable/Mask Registers bit definitions */ +#define XAE_INT_RXRJECT_MASK0x0008 /* Rx frame rejected */ +#define XAE_INT_MGTRDY_MASK 0x0080 /* MGT clock Lock */ + [...] same here.. +#define DMAALIGN128 + +static u8 RxFrame[PKTSIZE_ALIGN] __attribute((aligned(DMAALIGN))) ; Don't use cammelcase, all lowcase please. Agree - will be done in v2. Also, can't you allocate this with memalign and hide it in axidma_priv or something ? There are two things in one. 1. Adding it to axidma_priv means that I will need to dynamically allocate big private structure which is bad thing to do for several eth devices. This is FPGA you can create a lot of MACs that's why I think it is better not to do so. 2. Current style is sharing this rxframe buffer among all controllers because only one MAC works. Others are stopped which means that no packet come to them. BTW: Looking for that memalign function - thanks. + +/* reflect dma offsets */ +struct axidma_reg { +u32 control; /* DMACR */ +u32 status; /* DMASR */ +u32 current; /* CURDESC */ +u32 reserved; +u32 tail; /* TAILDESC */ +}; + +/* Private driver structures */ +struct axidma_priv { +struct axidma_reg *dmatx; +struct axidma_reg *dmarx; +int phyaddr; + +struct phy_device *phydev; +struct mii_dev *bus; +}; + +/* BD descriptors */ +struct
Re: [U-Boot] [PATCH v10 3/8] nds32/core N1213: NDS32 N12 core family N1213
On Wednesday, August 31, 2011 06:25:55 Macpaul Lin wrote: --- /dev/null +++ b/arch/nds32/cpu/n1213/Makefile +LIB = $(obj)lib$(CPU).o + +$(LIB): $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) all your makefiles that call $(AR) are broken. they need to use $(call cmd_link_o_target,...). i see this in multiple nds32 patches here. see arch/blackfin/lib/Makefile as a simple example -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v10 1/8] nds32: add header files support for nds32
On Wednesday, August 31, 2011 06:25:53 Macpaul Lin wrote: --- /dev/null +++ b/arch/nds32/include/asm/unaligned.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2016 Andes Technology Corporation + * Copyright (C) 2011 Macpaul Lin (macp...@andestech.com) + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +#ifndef _ASM_NDS_UNALIGNED_H +#define _ASM_NDS_UNALIGNED_H + +#include compiler.h +/* + * Select endianness + */ +#ifndef __NDSEB__ +#define get_unaligned__get_unaligned_le +#define put_unaligned__put_unaligned_le +#else +#define get_unaligned__get_unaligned_be +#define put_unaligned__put_unaligned_be +#endif /* __NDSEB__ */ + +#include asm/byteorder.h + +#include linux/unaligned/le_byteshift.h +#include linux/unaligned/be_byteshift.h +#include linux/unaligned/generic.h + +#endif /* _ASM_NDS_UNALIGNED_H */ cant you just include asm-generic/unaligned.h ? -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v10 1/8] nds32: add header files support for nds32
(just picking this e-mail because there is no patch summary to reply to) your nds32 port doesnt update the top level README or doc/README.standalone or add a doc/README.nds32. please add some documentation for your port ;). -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/5] coldfire: Remove link files entries to prevent multiple definitions
From: u-boot-boun...@lists.denx.de [u-boot-boun...@lists.denx.de] on behalf of y...@theia.denx.de [y...@theia.denx.de] Sent: Wednesday, August 31, 2011 7:11 AM To: u-boot@lists.denx.de Cc: Stany MARCEL; Jin Zhengxiong-R64188; vap...@gento.org Subject: [U-Boot] [PATCH v2 4/5] coldfire: Remove link files entries to prevent multiple definitions From: Stany MARCEL stany.mar...@novasys-ingenierie.com Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- Changes for v2: - Missing Corrections of link files for m54451evb board board/BuS/EB+MCF-EV123/u-boot.lds|5 - board/astro/mcf5373l/u-boot.lds |4 board/cobra5272/u-boot.lds |5 - board/esd/tasreg/u-boot.lds |4 board/freescale/m5208evbe/u-boot.lds |1 - board/freescale/m5235evb/u-boot.16 |5 - board/freescale/m5235evb/u-boot.32 | 13 - board/freescale/m5249evb/u-boot.lds |4 board/freescale/m5253demo/u-boot.lds |4 board/freescale/m5253evbe/u-boot.lds |4 board/freescale/m5271evb/u-boot.lds |4 board/freescale/m5272c3/u-boot.lds |4 board/freescale/m5275evb/u-boot.lds |3 --- board/freescale/m5282evb/u-boot.lds |4 board/freescale/m53017evb/u-boot.lds |2 -- board/freescale/m5329evb/u-boot.lds |4 board/freescale/m5373evb/u-boot.lds |4 board/freescale/m54451evb/u-boot.spa |9 + board/freescale/m54451evb/u-boot.stm | 12 +--- board/freescale/m54455evb/u-boot.atm |4 board/freescale/m547xevb/u-boot.lds |3 --- board/freescale/m548xevb/u-boot.lds |3 --- board/idmr/u-boot.lds|4 23 files changed, 2 insertions(+), 107 deletions(-) Hi, Stany, Could you please refer to the patchset I sent to the list at 8/23. We've done some of the same work. I'll apply some of the patches to the coldfire custodian tree. Could you please rebase your patches after that? thanks a lot. Jason ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/5] coldfire: Remove link files entries to prevent multiple definitions
On 08/31/2011 04:54 PM, Jin Zhengxiong-R64188 wrote: From: u-boot-boun...@lists.denx.de [u-boot-boun...@lists.denx.de] on behalf of y...@theia.denx.de [y...@theia.denx.de] Sent: Wednesday, August 31, 2011 7:11 AM To: u-boot@lists.denx.de Cc: Stany MARCEL; Jin Zhengxiong-R64188; vap...@gento.org Subject: [U-Boot] [PATCH v2 4/5] coldfire: Remove link files entries to prevent multiple definitions From: Stany MARCEL stany.mar...@novasys-ingenierie.com Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- Changes for v2: - Missing Corrections of link files for m54451evb board board/BuS/EB+MCF-EV123/u-boot.lds|5 - board/astro/mcf5373l/u-boot.lds |4 board/cobra5272/u-boot.lds |5 - board/esd/tasreg/u-boot.lds |4 board/freescale/m5208evbe/u-boot.lds |1 - board/freescale/m5235evb/u-boot.16 |5 - board/freescale/m5235evb/u-boot.32 | 13 - board/freescale/m5249evb/u-boot.lds |4 board/freescale/m5253demo/u-boot.lds |4 board/freescale/m5253evbe/u-boot.lds |4 board/freescale/m5271evb/u-boot.lds |4 board/freescale/m5272c3/u-boot.lds |4 board/freescale/m5275evb/u-boot.lds |3 --- board/freescale/m5282evb/u-boot.lds |4 board/freescale/m53017evb/u-boot.lds |2 -- board/freescale/m5329evb/u-boot.lds |4 board/freescale/m5373evb/u-boot.lds |4 board/freescale/m54451evb/u-boot.spa |9 + board/freescale/m54451evb/u-boot.stm | 12 +--- board/freescale/m54455evb/u-boot.atm |4 board/freescale/m547xevb/u-boot.lds |3 --- board/freescale/m548xevb/u-boot.lds |3 --- board/idmr/u-boot.lds|4 23 files changed, 2 insertions(+), 107 deletions(-) Hi, Stany, Could you please refer to the patchset I sent to the list at 8/23. We've done some of the same work. I'll apply some of the patches to the coldfire custodian tree. Could you please rebase your patches after that? thanks a lot. Jason Hi, Ok I'll rebase my work and resend eventual patches after that. Regards, Stany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4] console: Implement pre-console buffer
On Wednesday, August 31, 2011 08:58:25 Graeme Russ wrote: Allow redirection of console output prior to console initialisation to a temporary buffer. looks good to me. doesnt apply, but that's because this needs your other gd rework patch. Acked-by: Mike Frysinger vap...@gentoo.org -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: add 64-64 bit divider
On Wednesday, August 31, 2011 04:32:52 PM Mike Frysinger wrote: On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: This patch adds a 64-64 bit divider that supports ARMv4 and above. why ? if you're doing 64 bit divides, chances are you're doing something fundamentally wrong. perhaps you should fix that instead. Oh come on Mike, what about too big NAND memories ? this is also why we have the do_div() helper macro. so until your changelog documents the actual *reason* for this patch: NAK The reason is likely it's faster. But I don't think it matters, that's why I commented on this already. If he's fixing something by this (like I mistakenly did some time ago), there's really something wrong. -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot
On Wednesday, August 31, 2011 04:46:22 PM Michal Simek wrote: Marek Vasut wrote: On Tuesday, August 30, 2011 02:05:19 PM Michal Simek wrote: Add the first axi_ethernet driver for little-endian Microblaze. Signed-off-by: Michal Simek mon...@monstr.eu --- drivers/net/Makefile |1 + drivers/net/xilinx_axi_emac.c | 622 + include/netdev.h | 1 + 3 files changed, 624 insertions(+), 0 deletions(-) create mode 100644 drivers/net/xilinx_axi_emac.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 4541eaf..ae9d4cb 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -83,6 +83,7 @@ COBJS-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o +COBJS-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c new file mode 100644 index 000..ce79b80 --- /dev/null +++ b/drivers/net/xilinx_axi_emac.c @@ -0,0 +1,622 @@ +/* + * Copyright (C) 2011 Michal Simek mon...@monstr.eu + * Copyright (C) 2011 PetaLogix + * Copyright (C) 2010 Xilinx, Inc. All rights reserved. + * + * 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 config.h +#include common.h +#include net.h +#include malloc.h +#include asm/io.h +#include phy.h +#include miiphy.h + +/* Axi Ethernet registers offset */ +#define XAE_IS_OFFSET 0x000C /* Interrupt status */ +#define XAE_IE_OFFSET 0x0014 /* Interrupt enable */ +#define XAE_RCW1_OFFSET 0x0404 /* Rx Configuration Word 1 */ +#define XAE_TC_OFFSET 0x0408 /* Tx Configuration */ +#define XAE_EMMC_OFFSET 0x0410 /* EMAC mode configuration */ +#define XAE_MDIO_MC_OFFSET0x0500 /* MII Management Config */ +#define XAE_MDIO_MCR_OFFSET 0x0504 /* MII Management Control */ +#define XAE_MDIO_MWD_OFFSET 0x0508 /* MII Management Write Data */ +#define XAE_MDIO_MRD_OFFSET 0x050C /* MII Management Read Data */ Please use struct xae_regs {...} as the rest of the u-boot. struct is not useful here because it will be big with a lot of reserved values. I see like 10 registers here, you can use uint32_t reserved[n]; + +/* Link setup */ +#define XAE_EMMC_LINKSPEED_MASK 0xC000 /* Link speed */ +#define XAE_EMMC_LINKSPD_10 0x /* Link Speed mask for 10 Mbit */ +#define XAE_EMMC_LINKSPD_100 0x4000 /* Link Speed mask for 100 Mbit */ +#define XAE_EMMC_LINKSPD_1000 0x8000 /* Link Speed mask for 1000 Mbit */ + Use (1 n) ? just another solution - I prefer to use 32bit value - easier when you decode it by md. It's hard to read, really. +/* Interrupt Status/Enable/Mask Registers bit definitions */ +#define XAE_INT_RXRJECT_MASK 0x0008 /* Rx frame rejected */ +#define XAE_INT_MGTRDY_MASK 0x0080 /* MGT clock Lock */ + [...] same here.. +#define DMAALIGN 128 + +static u8 RxFrame[PKTSIZE_ALIGN] __attribute((aligned(DMAALIGN))) ; Don't use cammelcase, all lowcase please. Agree - will be done in v2. Also, can't you allocate this with memalign and hide it in axidma_priv or something ? There are two things in one. 1. Adding it to axidma_priv means that I will need to dynamically allocate big private structure which is bad thing to do for several eth devices. This is FPGA you can create a lot of MACs that's why I think it is better not to do so. 2. Current style is sharing this rxframe buffer among all controllers because only one MAC works. Others are stopped which means that no packet come to them. Ok, I don't think I understand pt. 1. -- you need to keep the state for each of the ethernet devices on the FPGA separate, don't you. As for pt. 2. -- currently, so there's possibility,
[U-Boot] [PATCH v2] tools/env: add posibility to inject configuration
If one wants to use fw_printenv/fw_setenv in special variants (eg compiled in MTD parameters without configuration file) he needs to change the sources. This patch add the posibillity to change the behaviour of fw_printenv by defining a specific configuration header at compile time. Signed-off-by: Andreas Bießmann biessm...@corscience.de --- changes since v1: - use ?= style in Makefile as suggested by Mike - remove c++ style comments in header .gitignore |2 + tools/env/Makefile | 12 ++- tools/env/fw_env.h | 28 +++--- tools/env/fw_env_config.h.in | 65 ++ 4 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 tools/env/fw_env_config.h.in diff --git a/.gitignore b/.gitignore index dbf545f..c822018 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,8 @@ /include/generated/ /lib/asm-offsets.s +/tools/env/fw_env_config.h + # stgit generated dirs patches-* .stgit-edit.txt diff --git a/tools/env/Makefile b/tools/env/Makefile index 28b73da..4daee1a 100644 --- a/tools/env/Makefile +++ b/tools/env/Makefile @@ -24,12 +24,14 @@ include $(TOPDIR)/config.mk HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c -HEADERS:= fw_env.h +HEADERS:= fw_env.h $(obj)fw_env_config.h +FW_ENV_CONFIG ?= fw_env_config.h.in # Compile for a hosted environment on the target HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ -idirafter $(OBJTREE)/include2 \ -idirafter $(OBJTREE)/include \ + -I $(obj) \ -DUSE_HOSTCC ifeq ($(MTD_VERSION),old) @@ -42,8 +44,14 @@ all: $(obj)fw_printenv $(obj)fw_printenv: $(HOSTSRCS) $(HEADERS) $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS) +$(obj)fw_env_config.h: $(FW_ENV_CONFIG) + @cp -f $ $@ + +# add additional dependency for .depend +$(obj).depend: $(obj)fw_env_config.h + clean: - rm -f $(obj)fw_printenv + rm -f $(obj)fw_printenv $(obj)fw_env_config.h # diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 9258c79..c237154 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -20,30 +20,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#ifndef _FW_ENV_H_ +#define _FW_ENV_H_ -/* - * To build the utility with the run-time configuration - * uncomment the next line. - * See included fw_env.config sample file - * for notes on configuration. - */ -#define CONFIG_FILE /etc/fw_env.config - -#define HAVE_REDUND /* For systems with 2 env sectors */ -#define DEVICE1_NAME /dev/mtd1 -#define DEVICE2_NAME /dev/mtd2 -#define DEVICE1_OFFSET0x -#define ENV1_SIZE 0x4000 -#define DEVICE2_OFFSET0x -#define ENV2_SIZE 0x4000 - -#define CONFIG_BAUDRATE115200 -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ -#define CONFIG_BOOTCOMMAND \ - bootp; \ - setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} \ - ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; \ - bootm +#include fw_env_config.h extern int fw_printenv(int argc, char *argv[]); extern char *fw_getenv (char *name); @@ -54,3 +34,5 @@ extern int fw_env_write(char *name, char *value); extern int fw_env_close(void); extern unsignedlong crc32 (unsigned long, const unsigned char *, unsigned); + +#endif diff --git a/tools/env/fw_env_config.h.in b/tools/env/fw_env_config.h.in new file mode 100644 index 000..d4671f0 --- /dev/null +++ b/tools/env/fw_env_config.h.in @@ -0,0 +1,65 @@ +/* + * (C) Copyright 2002-2008 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * (C) Copyright 2011 + * Andreas Bießmann, Corscience GmbHCo.KG, biessm...@corscience.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 + */ + +/* + * This is an example configuration for fw_printenv/fw_setenv + * + * If you like to specialize your
Re: [U-Boot] [PATCH] arm: add 64-64 bit divider
On Wednesday, August 31, 2011 11:11:00 Marek Vasut wrote: On Wednesday, August 31, 2011 04:32:52 PM Mike Frysinger wrote: On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: This patch adds a 64-64 bit divider that supports ARMv4 and above. why ? if you're doing 64 bit divides, chances are you're doing something fundamentally wrong. perhaps you should fix that instead. Oh come on Mike, what about too big NAND memories ? Linux hasnt had a problem supporting large NAND without a 64bit divide routine. why are we special ? this is also why we have the do_div() helper macro. so until your changelog documents the actual *reason* for this patch: NAK The reason is likely it's faster. let's see actual #'s -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: add 64-64 bit divider
On Wednesday, August 31, 2011 05:27:46 PM Mike Frysinger wrote: On Wednesday, August 31, 2011 11:11:00 Marek Vasut wrote: On Wednesday, August 31, 2011 04:32:52 PM Mike Frysinger wrote: On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: This patch adds a 64-64 bit divider that supports ARMv4 and above. why ? if you're doing 64 bit divides, chances are you're doing something fundamentally wrong. perhaps you should fix that instead. Oh come on Mike, what about too big NAND memories ? Linux hasnt had a problem supporting large NAND without a 64bit divide routine. why are we special ? Because someone (?) has to fix the code that uses do_div() ;-) this is also why we have the do_div() helper macro. so until your changelog documents the actual *reason* for this patch: NAK The reason is likely it's faster. let's see actual #'s True, will you make the measurements? ;-) Still, I'd stick with the plain-C version, it doesn't matter I guess. Cheers -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] USB on OMAP3
I'm using v2011.06 on the TI OMAP3 platform (internal, similar to BeagleBoard) I'd like my board to support both EHCI and MUSB in host mode. However, when I define both of these, I get compile errors: drivers/usb/musb/libusb_musb.o: In function `usb_lowlevel_stop': /local/DM3730/u-boot/drivers/usb/musb/musb_hcd.c:1149: multiple definition of `usb_lowlevel_stop' drivers/usb/host/libusb_host.o:/local/DM3730/u-boot/drivers/usb/host/ehci-hcd.c:795: first defined here drivers/usb/musb/libusb_musb.o: In function `submit_int_msg': /local/DM3730/u-boot/drivers/usb/musb/musb_hcd.c:1162: multiple definition of `submit_int_msg' drivers/usb/host/libusb_host.o:/local/DM3730/u-boot/drivers/usb/host/ehci-hcd.c:900: first defined here drivers/usb/musb/libusb_musb.o: In function `submit_bulk_msg': /local/DM3730/u-boot/drivers/usb/musb/musb_hcd.c:949: multiple definition of `submit_bulk_msg' drivers/usb/host/libusb_host.o:/local/DM3730/u-boot/drivers/usb/host/ehci-hcd.c:865: first defined here drivers/usb/musb/libusb_musb.o: In function `submit_control_msg': /local/DM3730/u-boot/drivers/usb/musb/musb_hcd.c:849: multiple definition of `submit_control_msg' drivers/usb/host/libusb_host.o:/local/DM3730/u-boot/drivers/usb/host/ehci-hcd.c:877: first defined here drivers/usb/musb/libusb_musb.o: In function `usb_lowlevel_init': /local/DM3730/u-boot/drivers/usb/musb/musb_hcd.c:1097: multiple definition of `usb_lowlevel_init' drivers/usb/host/libusb_host.o:/local/DM3730/u-boot/drivers/usb/host/ehci-hcd.c:799: first defined here Is this expected to work? If not, any pointers on how I might make both controllers play nice? 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 v5 00/13] Add PXE support
This patch series adds PXE booting support to U-boot. It adds aseries of DHCP options to allow U-boot DHCP requests to be compliant with RFC 4578, and a set of commands to provide PXELINUX like behavior. The pxe commands provide a near subset of the functionality provided by the PXELINUX boot loader. This allows U-boot based systems to be controlled remotely using the same PXE based techniques that many non U-boot based servers use. As an example, support for the pxe commands is enabled for the ca9x4_ct_vxp config. Additional details for the pxe commands are available in the README.pxe file added as part of this patch series. This patch series adds support for RFC 4578 compliant DHCP request options, which enhance the ability of DHCP servers to respond differently to different clients. As an example, the last patch in this series enables support for the PXE DHCP options for the ca9x4_ct_vxp config. v5 of the patch series responds to a couple of comments from Mike Frysinger, and fixes a checkpatch simple_strtoul warning. Details are in the individual patch logs. Jason Hobbs (13): Add generic, reusable menu code common, menu: use abortboot for menu timeout common: add run_command2 for running simple or hush commands Add isblank cosmetic: remove unneeded curly braces Replace space and tab checks with isblank README: document standard image variables lib: add uuid_str_to_bin for use with bootp and PXE uuid Add pxe command net: bootp: add PXE/RFC 4578 DHCP options support Convert ca9x4_ct_vxp to standard env variables arm: ca9x4_ct_vxp: enable pxe command support arm: ca9x4_ct_vxp: enable PXE BOOTP options support README | 19 + board/hymod/env.c|9 +- common/Makefile |2 + common/cmd_pxe.c | 1355 ++ common/command.c |9 +- common/hush.c|2 +- common/main.c| 75 +- common/menu.c| 417 +++ doc/README.menu | 119 +++ doc/README.pxe | 240 ++ drivers/bios_emulator/x86emu/debug.c |7 +- examples/standalone/smc911x_eeprom.c |5 +- include/common.h | 13 + include/configs/ca9x4_ct_vxp.h | 19 +- include/hush.h |2 +- include/linux/ctype.h|6 + include/menu.h | 30 + lib/Makefile |1 + lib/hashtable.c |4 +- lib/uuid.c | 85 +++ net/bootp.c | 40 + 21 files changed, 2402 insertions(+), 57 deletions(-) create mode 100644 common/cmd_pxe.c create mode 100644 common/menu.c create mode 100644 doc/README.menu create mode 100644 doc/README.pxe create mode 100644 include/menu.h create mode 100644 lib/uuid.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 01/13] Add generic, reusable menu code
This will be used first by the pxe code, but is intended to be generic and reusable for other jobs in U-boot. Signed-off-by: Jason Hobbs jason.ho...@calxeda.com --- changes in v2: - new in v2 changes in v3: - move timeout support to later patch - fix NULL case bug in menu_item_key_match - consistently use 'item_key' instead of 'key' - move default/prompt logic into menu code - consistently return int for error propagation - change option setting functions to menu_create parameters - add README.menu changes in v4: - change pxecfg to pxe in commit log - improve the menu documentation changes in v5: - none common/Makefile |1 + common/menu.c | 393 +++ doc/README.menu | 119 + include/menu.h | 30 4 files changed, 543 insertions(+), 0 deletions(-) create mode 100644 common/menu.c create mode 100644 doc/README.menu create mode 100644 include/menu.h diff --git a/common/Makefile b/common/Makefile index d662468..ebe45b8 100644 --- a/common/Makefile +++ b/common/Makefile @@ -169,6 +169,7 @@ COBJS-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o COBJS-$(CONFIG_KALLSYMS) += kallsyms.o COBJS-$(CONFIG_LCD) += lcd.o COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o +COBJS-$(CONFIG_MENU) += menu.o COBJS-$(CONFIG_MODEM_SUPPORT) += modem.o COBJS-$(CONFIG_UPDATE_TFTP) += update.o COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o diff --git a/common/menu.c b/common/menu.c new file mode 100644 index 000..5643937 --- /dev/null +++ b/common/menu.c @@ -0,0 +1,393 @@ +/* + * Copyright 2010-2011 Calxeda, 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. + * + * This program is distributed in the hope 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, see http://www.gnu.org/licenses/. + */ + +#include common.h +#include malloc.h +#include errno.h +#include linux/list.h + +#include menu.h + +/* + * Internally, each item in a menu is represented by a struct menu_item. + * + * These items will be alloc'd and initialized by menu_item_add and destroyed + * by menu_item_destroy, and the consumer of the interface never sees that + * this struct is used at all. + */ +struct menu_item { + char *key; + void *data; + struct list_head list; +}; + +/* + * The menu is composed of a list of items along with settings and callbacks + * provided by the user. An incomplete definition of this struct is available + * in menu.h, but the full definition is here to prevent consumers from + * relying on its contents. + */ +struct menu { + struct menu_item *default_item; + char *title; + int prompt; + void (*item_data_print)(void *); + struct list_head items; +}; + +/* + * An iterator function for menu items. callback will be called for each item + * in m, with m, a pointer to the item, and extra being passed to callback. If + * callback returns a value other than NULL, iteration stops and the value + * return by callback is returned from menu_items_iter. This allows it to be + * used for search type operations. It is also safe for callback to remove the + * item from the list of items. + */ +static inline void *menu_items_iter(struct menu *m, + void *(*callback)(struct menu *, struct menu_item *, void *), + void *extra) +{ + struct list_head *pos, *n; + struct menu_item *item; + void *ret; + + list_for_each_safe(pos, n, m-items) { + item = list_entry(pos, struct menu_item, list); + + ret = callback(m, item, extra); + + if (ret) + return ret; + } + + return NULL; +} + +/* + * Print a menu_item. If the consumer provided an item_data_print function + * when creating the menu, call it with a pointer to the item's private data. + * Otherwise, print the key of the item. + */ +static inline void *menu_item_print(struct menu *m, + struct menu_item *item, + void *extra) +{ + if (!m-item_data_print) + printf(%s\n, item-key); + else + m-item_data_print(item-data); + + return NULL; +} + +/* + * Free the memory used by a menu item. This includes the memory used by its + * key. + */ +static inline void *menu_item_destroy(struct menu *m, + struct menu_item *item, + void *extra) +{ + if (item-key) + free(item-key); + + free(item); + + return NULL; +}
[U-Boot] [PATCH v5 02/13] common, menu: use abortboot for menu timeout
Signed-off-by: Jason Hobbs jason.ho...@calxeda.com --- changes in v2: - expose abortboot externally instead of using a wrapper - expose abortboot externally when CONFIG_MENU is set changes in v3: - simplify the conditional export of abortboot - add timeout support for the menu in this patch - add doc for timeout feature changes in v4: - added more comments to menu.c changes in v5: - none common/main.c| 10 -- common/menu.c| 40 doc/README.menu |6 +++--- include/common.h |3 +++ include/menu.h |2 +- 5 files changed, 47 insertions(+), 14 deletions(-) diff --git a/common/main.c b/common/main.c index 3324d9d..b97d89e 100644 --- a/common/main.c +++ b/common/main.c @@ -88,7 +88,10 @@ extern void mdm_init(void); /* defined in board.c */ */ #if defined(CONFIG_BOOTDELAY) (CONFIG_BOOTDELAY = 0) # if defined(CONFIG_AUTOBOOT_KEYED) -static inline int abortboot(int bootdelay) +#ifndef CONFIG_MENU +static inline +#endif +int abortboot(int bootdelay) { int abort = 0; uint64_t etime = endtick(bootdelay); @@ -202,7 +205,10 @@ static inline int abortboot(int bootdelay) static int menukey = 0; #endif -static inline int abortboot(int bootdelay) +#ifndef CONFIG_MENU +static inline +#endif +int abortboot(int bootdelay) { int abort = 0; diff --git a/common/menu.c b/common/menu.c index 5643937..f004823 100644 --- a/common/menu.c +++ b/common/menu.c @@ -43,6 +43,7 @@ struct menu_item { */ struct menu { struct menu_item *default_item; + int timeout; char *title; int prompt; void (*item_data_print)(void *); @@ -158,13 +159,29 @@ static inline struct menu_item *menu_item_by_key(struct menu *m, } /* + * Wait for the user to hit a key according to the timeout set for the menu. + * Returns 1 if the user hit a key, or 0 if the timeout expired. + */ +static inline int menu_interrupted(struct menu *m) +{ + if (!m-timeout) + return 0; + + if (abortboot(m-timeout/10)) + return 1; + + return 0; +} + +/* * Checks whether or not the default menu item should be used without - * prompting for a user choice. If the menu is set to always prompt, return - * 0. Otherwise, return 1 to indicate we should use the default menu item. + * prompting for a user choice. If the menu is set to always prompt, or the + * user hits a key during the timeout period, return 0. Otherwise, return 1 to + * indicate we should use the default menu item. */ static inline int menu_use_default(struct menu *m) { - return !m-prompt; + return !m-prompt !menu_interrupted(m); } /* @@ -250,7 +267,8 @@ int menu_default_set(struct menu *m, char *item_key) /* * menu_get_choice() - Returns the user's selected menu entry, or the default - * if the menu is set to not prompt. This is safe to call more than once. + * if the menu is set to not prompt or the timeout expires. This is safe to + * call more than once. * * m - Points to a menu created by menu_create(). * @@ -259,8 +277,8 @@ int menu_default_set(struct menu *m, char *item_key) * written at the location it points to. * * Returns 1 if successful, -EINVAL if m or choice is NULL, -ENOENT if no - * default has been set and the menu is set to not prompt, or -EINTR if the - * user exits the menu via ^c. + * default has been set and the menu is set to not prompt or the timeout + * expires, or -EINTR if the user exits the menu via ^c. */ int menu_get_choice(struct menu *m, void **choice) { @@ -330,7 +348,12 @@ int menu_item_add(struct menu *m, char *item_key, void *item_data) * list of menu items. It will be copied to internal storage, and is safe to * discard after passing to menu_create(). * - * prompt - If 0, don't ask for user input. + * timeout - A delay in seconds to wait for user input. If 0, timeout is + * disabled, and the default choice will be returned unless prompt is 1. + * + * prompt - If 0, don't ask for user input unless there is an interrupted + * timeout. If 1, the user will be prompted for input regardless of the value + * of timeout. * * item_data_print - If not NULL, will be called for each item when the menu * is displayed, with the pointer to the item's data passed as the argument. @@ -341,7 +364,7 @@ int menu_item_add(struct menu *m, char *item_key, void *item_data) * Returns a pointer to the menu if successful, or NULL if there is * insufficient memory available to create the menu. */ -struct menu *menu_create(char *title, int prompt, +struct menu *menu_create(char *title, int timeout, int prompt, void (*item_data_print)(void *)) { struct menu *m; @@ -353,6 +376,7 @@ struct menu *menu_create(char *title, int prompt, m-default_item = NULL; m-prompt = prompt; + m-timeout = timeout; m-item_data_print = item_data_print; if (title) { diff --git a/doc/README.menu
[U-Boot] [PATCH v5 03/13] common: add run_command2 for running simple or hush commands
Signed-off-by: Jason Hobbs jason.ho...@calxeda.com Cc: Mike Frysinger vap...@gentoo.org --- changes in v2: - whitespace correction changes in v4: - fix indention of a run_command2 line - make run_command2 static inline changes in v5: - return parse_string_outer value directly common/hush.c |2 +- common/main.c | 56 +++- include/hush.h |2 +- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/common/hush.c b/common/hush.c index 85a6030..940889b 100644 --- a/common/hush.c +++ b/common/hush.c @@ -3217,7 +3217,7 @@ int parse_stream_outer(struct in_str *inp, int flag) #ifndef __U_BOOT__ static int parse_string_outer(const char *s, int flag) #else -int parse_string_outer(char *s, int flag) +int parse_string_outer(const char *s, int flag) #endif /* __U_BOOT__ */ { struct in_str input; diff --git a/common/main.c b/common/main.c index b97d89e..3adadfd 100644 --- a/common/main.c +++ b/common/main.c @@ -83,8 +83,7 @@ extern void mdm_init(void); /* defined in board.c */ /*** * Watch for 'delay' seconds for autoboot stop or autoboot delay string. - * returns: 0 - no key string, allow autoboot - * 1 - got key string, abort + * returns: 0 - no key string, allow autoboot 1 - got key string, abort */ #if defined(CONFIG_BOOTDELAY) (CONFIG_BOOTDELAY = 0) # if defined(CONFIG_AUTOBOOT_KEYED) @@ -266,6 +265,26 @@ int abortboot(int bootdelay) # endif/* CONFIG_AUTOBOOT_KEYED */ #endif /* CONFIG_BOOTDELAY = 0 */ +/* + * Return 0 on success, or != 0 on error. + */ +static inline +int run_command2(const char *cmd, int flag) +{ +#ifndef CONFIG_SYS_HUSH_PARSER + /* +* run_command can return 0 or 1 for success, so clean up its result. +*/ + if (run_command(cmd, flag) == -1) + return 1; + + return 0; +#else + return parse_string_outer(cmd, + FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP); +#endif +} + // void main_loop (void) @@ -332,12 +351,7 @@ void main_loop (void) int prev = disable_ctrlc(1);/* disable Control C checking */ # endif -# ifndef CONFIG_SYS_HUSH_PARSER - run_command (p, 0); -# else - parse_string_outer(p, FLAG_PARSE_SEMICOLON | - FLAG_EXIT_FROM_LOOP); -# endif + run_command2(p, 0); # ifdef CONFIG_AUTOBOOT_KEYED disable_ctrlc(prev);/* restore Control C checking */ @@ -382,12 +396,7 @@ void main_loop (void) int prev = disable_ctrlc(1);/* disable Control C checking */ # endif -# ifndef CONFIG_SYS_HUSH_PARSER - run_command (s, 0); -# else - parse_string_outer(s, FLAG_PARSE_SEMICOLON | - FLAG_EXIT_FROM_LOOP); -# endif + run_command2(s, 0); # ifdef CONFIG_AUTOBOOT_KEYED disable_ctrlc(prev);/* restore Control C checking */ @@ -397,14 +406,8 @@ void main_loop (void) # ifdef CONFIG_MENUKEY if (menukey == CONFIG_MENUKEY) { s = getenv(menucmd); - if (s) { -# ifndef CONFIG_SYS_HUSH_PARSER - run_command(s, 0); -# else - parse_string_outer(s, FLAG_PARSE_SEMICOLON | - FLAG_EXIT_FROM_LOOP); -# endif - } + if (s) + run_command2(s, 0); } #endif /* CONFIG_MENUKEY */ #endif /* CONFIG_BOOTDELAY */ @@ -1403,14 +1406,9 @@ int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) printf (## Error: \%s\ not defined\n, argv[i]); return 1; } -#ifndef CONFIG_SYS_HUSH_PARSER - if (run_command (arg, flag) == -1) - return 1; -#else - if (parse_string_outer(arg, - FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0) + + if (run_command2(arg, flag) != 0) return 1; -#endif } return 0; } diff --git a/include/hush.h b/include/hush.h index 5c566cc..ecf9222 100644 --- a/include/hush.h +++ b/include/hush.h @@ -29,7 +29,7 @@ #define FLAG_REPARSING (1 2)/* =2nd pass */ extern int u_boot_hush_start(void); -extern int parse_string_outer(char *, int); +extern int parse_string_outer(const char *, int); extern int parse_file_outer(void); int set_local_var(const char *s, int flg_export); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 04/13] Add isblank
Existing ctype checks are implemented using a 256 byte lookup table, allowing each character to be in any of 8 character classes. Since there are 8 existing character classes without the blank class, I implemented isblank without using the lookup table. Since there are only two blank characters - tab and space - this is a more reasonable approach than doubling the size of the lookup table to accommodate one more class. Signed-off-by: Jason Hobbs jason.ho...@calxeda.com --- new in v4 changes in v5: - none include/linux/ctype.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/linux/ctype.h b/include/linux/ctype.h index 6dec944..42f9305 100644 --- a/include/linux/ctype.h +++ b/include/linux/ctype.h @@ -31,6 +31,12 @@ extern const unsigned char _ctype[]; #define isupper(c) ((__ismask(c)(_U)) != 0) #define isxdigit(c)((__ismask(c)(_D|_X)) != 0) +/* + * Rather than doubling the size of the _ctype lookup table to hold a 'blank' + * flag, just check for space or tab. + */ +#define isblank(c) (c == ' ' || c == '\t') + #define isascii(c) (((unsigned char)(c))=0x7f) #define toascii(c) (((unsigned char)(c))0x7f) -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 05/13] cosmetic: remove unneeded curly braces
This prevents a checkpatch warning in the patch to use isblank Signed-off-by: Jason Hobbs jason.ho...@calxeda.com --- new in v4 changes in v5: - none common/main.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/common/main.c b/common/main.c index 3adadfd..d812aa1 100644 --- a/common/main.c +++ b/common/main.c @@ -1097,9 +1097,8 @@ int parse_line (char *line, char *argv[]) while (nargs CONFIG_SYS_MAXARGS) { /* skip any white space */ - while ((*line == ' ') || (*line == '\t')) { + while ((*line == ' ') || (*line == '\t')) ++line; - } if (*line == '\0') {/* end of line, no more args*/ argv[nargs] = NULL; @@ -1112,9 +,8 @@ int parse_line (char *line, char *argv[]) argv[nargs++] = line; /* begin of argument string */ /* find end of string */ - while (*line (*line != ' ') (*line != '\t')) { + while (*line (*line != ' ') (*line != '\t')) ++line; - } if (*line == '\0') {/* end of line, no more args*/ argv[nargs] = NULL; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 07/13] README: document standard image variables
With these documented, we can start pushing towards standardizing their use across boards. Signed-off-by: Jason Hobbs jason.ho...@calxeda.com Cc: Mike Frysinger vap...@gentoo.org --- new in v4 changes in v5: - moved the doc into README alongside the other environment variables. README | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/README b/README index 0886987..da4a230 100644 --- a/README +++ b/README @@ -3507,6 +3507,25 @@ List of environment variables (most likely not complete): Ethernet is encapsulated/received over 802.1q VLAN tagged frames. +The following image location variables contain the location of images +used in booting. The Image column gives the role of the image and is +not an environment variable name. The other columns are environment +variable names. File Name gives the name of the file on a TFTP +server, RAM Address gives the location in RAM the image will be +loaded to, and Flash Location gives the image's address in NOR +flash or offset in NAND flash. + +*Note* - these variables don't have to be defined for all boards, some +boards currenlty use other variables for these purposes, and some +boards use these variables for other purposes. + +Image File NameRAM Address Flash Location +- ---- -- +u-boot u-boot u-boot_addr_r u-boot_addr +Linux kernelbootfile kernel_addr_r kernel_addr +device tree blobfdtfile fdt_addr_rfdt_addr +ramdisk ramdiskfile ramdisk_addr_rramdisk_addr + The following environment variables may be used and automatically updated by the network boot commands (bootp and rarpboot), depending the information provided by your boot server: -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 06/13] Replace space and tab checks with isblank
These are various places I found that checked for conditions equivalent to isblank. Signed-off-by: Jason Hobbs jason.ho...@calxeda.com --- new in v4 changes in v5: - none board/hymod/env.c|9 + common/command.c |9 + common/main.c|5 +++-- drivers/bios_emulator/x86emu/debug.c |7 --- examples/standalone/smc911x_eeprom.c |5 +++-- lib/hashtable.c |4 +++- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/board/hymod/env.c b/board/hymod/env.c index c0e2cd5..fde428d 100644 --- a/board/hymod/env.c +++ b/board/hymod/env.c @@ -22,6 +22,7 @@ */ #include common.h +#include linux/ctype.h DECLARE_GLOBAL_DATA_PTR; @@ -45,7 +46,7 @@ env_callback (uchar *name, uchar *value) nn++; } - while (*nn == ' ' || *nn == '\t') + while (isblank(*nn)) nn++; if ((nnl = strlen (nn)) == 0) { @@ -61,7 +62,7 @@ env_callback (uchar *name, uchar *value) nn[--nnl] = '\0'; } - while (nnl 0 ((c = nn[nnl - 1]) == ' ' || c == '\t')) + while (nnl 0 isblank(nn[nnl - 1])) nn[--nnl] = '\0'; if (nnl == 0) { printf (Empty name in global env file\n); @@ -71,11 +72,11 @@ env_callback (uchar *name, uchar *value) p = (char *)value; q = nv; - while ((c = *p) == ' ' || c == '\t') + while (isblank(*p)) p++; nvl = strlen (p); - while (nvl 0 ((c = p[nvl - 1]) == ' ' || c == '\t')) + while (nvl 0 isblank(p[nvl - 1])) p[--nvl] = '\0'; while ((*q = *p++) != '\0') { diff --git a/common/command.c b/common/command.c index ddaed68..85b6424 100644 --- a/common/command.c +++ b/common/command.c @@ -27,6 +27,7 @@ #include common.h #include command.h +#include linux/ctype.h /* * Use puts() instead of printf() to avoid printf buffer overflow @@ -165,7 +166,7 @@ int var_complete(int argc, char * const argv[], char last_char, int maxv, char * static char tmp_buf[512]; int space; - space = last_char == '\0' || last_char == ' ' || last_char == '\t'; + space = last_char == '\0' || isblank(last_char); if (space argc == 1) return env_complete(, maxv, cmdv, sizeof(tmp_buf), tmp_buf); @@ -206,7 +207,7 @@ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv } /* more than one arg or one but the start of the next */ - if (argc 1 || (last_char == '\0' || last_char == ' ' || last_char == '\t')) { + if (argc 1 || (last_char == '\0' || isblank(last_char))) { cmdtp = find_cmd(argv[0]); if (cmdtp == NULL || cmdtp-complete == NULL) { cmdv[0] = NULL; @@ -257,7 +258,7 @@ static int make_argv(char *s, int argvsz, char *argv[]) while (argc argvsz - 1) { /* skip any white space */ - while ((*s == ' ') || (*s == '\t')) + while (isblank(*s)) ++s; if (*s == '\0') /* end of s, no more args */ @@ -266,7 +267,7 @@ static int make_argv(char *s, int argvsz, char *argv[]) argv[argc++] = s; /* begin of argument string */ /* find end of string */ - while (*s (*s != ' ') (*s != '\t')) + while (*s !isblank(*s)) ++s; if (*s == '\0') /* end of s, no more args */ diff --git a/common/main.c b/common/main.c index d812aa1..7be2955 100644 --- a/common/main.c +++ b/common/main.c @@ -40,6 +40,7 @@ #endif #include post.h +#include linux/ctype.h #if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING) DECLARE_GLOBAL_DATA_PTR; @@ -1097,7 +1098,7 @@ int parse_line (char *line, char *argv[]) while (nargs CONFIG_SYS_MAXARGS) { /* skip any white space */ - while ((*line == ' ') || (*line == '\t')) + while (isblank(*line)) ++line; if (*line == '\0') {/* end of line, no more args*/ @@ -,7 +1112,7 @@ int parse_line (char *line, char *argv[]) argv[nargs++] = line; /* begin of argument string */ /* find end of string */ - while (*line (*line != ' ') (*line != '\t')) + while (*line !isblank(*line)) ++line; if (*line == '\0') {/* end of line, no more args*/ diff --git a/drivers/bios_emulator/x86emu/debug.c b/drivers/bios_emulator/x86emu/debug.c index 241acf3..6417d09 100644 --- a/drivers/bios_emulator/x86emu/debug.c +++ b/drivers/bios_emulator/x86emu/debug.c @@ -39,6 +39,7 @@ #include stdarg.h #include common.h +#include linux/ctype.h #include
[U-Boot] [PATCH v5 08/13] lib: add uuid_str_to_bin for use with bootp and PXE uuid
Signed-off-by: Jason Hobbs jason.ho...@calxeda.com --- changes for v2: - Move uuid_str_to_bin's prototype from uuid. to common.h - Place uuid.o make rule in sorted order and conditionalize changes for v3: - check for NULL pointers in uuid conversion function changes for v4: - add a UUID string validator changes in v5: - none include/common.h |4 ++ lib/Makefile |1 + lib/uuid.c | 85 ++ 3 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 lib/uuid.c diff --git a/include/common.h b/include/common.h index 3609acd..3a9d046 100644 --- a/include/common.h +++ b/include/common.h @@ -656,6 +656,10 @@ int strcmp_compar(const void *, const void *); /* lib/time.c */ void udelay(unsigned long); +/* lib/uuid.c */ +void uuid_str_to_bin(const char *uuid, unsigned char *out); +int uuid_str_valid(const char *uuid); + /* lib/vsprintf.c */ ulong simple_strtoul(const char *cp,char **endp,unsigned int base); int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); diff --git a/lib/Makefile b/lib/Makefile index 884f64c..075bb8c 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -55,6 +55,7 @@ COBJS-y += ctype.o COBJS-y += div64.o COBJS-y += string.o COBJS-y += time.o +COBJS-$(CONFIG_BOOTP_PXE) += uuid.o COBJS-y += vsprintf.o COBJS := $(COBJS-y) diff --git a/lib/uuid.c b/lib/uuid.c new file mode 100644 index 000..10b022f --- /dev/null +++ b/lib/uuid.c @@ -0,0 +1,85 @@ +/* + * Copyright 2011 Calxeda, Inc. + * + * 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 linux/ctype.h +#include common.h + +/* + * This is what a UUID string looks like. + * + * x is a hexadecimal character. fields are separated by '-'s. When converting + * to a binary UUID, le means the field should be converted to little endian, + * and be means it should be converted to big endian. + * + * 0914 19 24 + * ---- + *le le le be be + */ + +int uuid_str_valid(const char *uuid) +{ + int i, valid; + + if (uuid == NULL) + return 0; + + for (i = 0, valid = 1; uuid[i] valid; i++) { + switch (i) { + case 8: case 13: case 18: case 23: + valid = (uuid[i] == '-'); + break; + default: + valid = isxdigit(uuid[i]); + break; + } + } + + if (i != 36 || !valid) + return 0; + + return 1; +} + +void uuid_str_to_bin(const char *uuid, unsigned char *out) +{ + uint16_t tmp16; + uint32_t tmp32; + uint64_t tmp64; + + if (!uuid || !out) + return; + + tmp32 = cpu_to_le32(simple_strtoul(uuid, NULL, 16)); + memcpy(out, tmp32, 4); + + tmp16 = cpu_to_le16(simple_strtoul(uuid + 9, NULL, 16)); + memcpy(out + 4, tmp16, 2); + + tmp16 = cpu_to_le16(simple_strtoul(uuid + 14, NULL, 16)); + memcpy(out + 6, tmp16, 2); + + tmp16 = cpu_to_be16(simple_strtoul(uuid + 19, NULL, 16)); + memcpy(out + 8, tmp16, 2); + + tmp64 = cpu_to_be64(simple_strtoull(uuid + 24, NULL, 16)); + memcpy(out + 10, (char *)tmp64 + 2, 6); +} -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot