Re: [U-Boot] [PATCH v2 02/10] MIPS: qemu-malta: add reset support
2013.02.02. 20:35 keltezéssel, Daniel Schwierzeck írta: diff --git a/board/qemu-malta/qemu-malta.c b/board/qemu-malta/qemu-malta.c index 9ba711d..9333242 100644 --- a/board/qemu-malta/qemu-malta.c +++ b/board/qemu-malta/qemu-malta.c @@ -8,6 +8,9 @@ #include common.h +#include asm/io.h +#include asm/malta.h + phys_size_t initdram(int board_type) { return CONFIG_SYS_MEM_SIZE; @@ -18,3 +21,11 @@ int checkboard(void) puts(Board: MIPS Malta CoreLV (Qemu)\n); return 0; } + +void _machine_restart(void) +{ + void __iomem *reset_base; + + reset_base = (void __iomem *) CKSEG1ADDR(MALTA_RESET_BASE); + __raw_writel(le32_to_cpu(GORESET), reset_base); don't you need to swap from CPU endianess to register/bus endinaness? I think regisers/bus are always BE and only CPU changes between LE/BE. So we either need __raw_writel(cpu_to_be32(v),a) or writel_be32(v,a). The register uses the same endianness as the CPU, so we have to write either a LE or BE value depending on the CPU endianness. This means that we should use the __raw_writel accessor with a plain GORESET value. That method works in Linux but does not work in U-Boot. The Malta board needs the CONFIG_SWAP_IO_SPACE for PCI device acccess. If this config options is set then the __raw_writel accessor will swap the given value on BE systems. So I have to pre-swap the value with le32_to_cpu to make it working correctly. The relevant definitions from 'arch/mips/include/asm/io.h': #if defined(CONFIG_SWAP_IO_SPACE) defined(__MIPSEB__) #define __ioswab8(x) (x) #define __ioswab16(x) swab16(x) #define __ioswab32(x) swab32(x) #else ... #define writeb(b,addr) (*(volatile unsigned char *)(addr)) = (b) #define writew(b,addr) (*(volatile unsigned short *)(addr)) = (__ioswab16(b)) #define writel(b,addr) (*(volatile unsigned int *)(addr)) = (__ioswab32(b)) #define __raw_writeb writeb #define __raw_writew writew #define __raw_writel writel Maybe here is the time to fix these accessors in asm/io.h? -Gabor ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 05/10] MIPS: qemu-malta: setup GT64120 registers as done by YAMON
2013.02.02. 20:39 keltezéssel, Daniel Schwierzeck írta: 2013/2/2 Gabor Juhos juh...@openwrt.org: Move the GT64120 register base to 0x1be0 and setup PCI BAR registers as done by the original YAMON bootloader. This is needed for running Linux kernel. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- Changes since v1: - rebased against mips/testing Changes since RFC: --- --- arch/mips/include/asm/malta.h|4 ++- board/qemu-malta/lowlevel_init.S | 51 ++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/malta.h b/arch/mips/include/asm/malta.h index ab951e6..d4d44a2 100644 --- a/arch/mips/include/asm/malta.h +++ b/arch/mips/include/asm/malta.h @@ -9,10 +9,12 @@ #ifndef _MIPS_ASM_MALTA_H #define _MIPS_ASM_MALTA_H -#define MALTA_IO_PORT_BASE 0x1000 +#define MALTA_IO_PORT_BASE 0x1800 #define MALTA_UART_BASE(MALTA_IO_PORT_BASE + 0x3f8) +#define MALTA_GT_BASE 0x1be0 + #define MALTA_RESET_BASE 0x1f000500 #define GORESET0x42 diff --git a/board/qemu-malta/lowlevel_init.S b/board/qemu-malta/lowlevel_init.S index c5c5bd9..11544a8 100644 --- a/board/qemu-malta/lowlevel_init.S +++ b/board/qemu-malta/lowlevel_init.S @@ -6,7 +6,19 @@ * by the Free Software Foundation. */ +#include config.h +#include asm/addrspace.h #include asm/regdef.h +#include asm/gt64120.h +#include asm/malta.h + +#ifdef CONFIG_SYS_BIG_ENDIAN +#define CPU_TO_GT32(_x)((_x)) +#else +#define CPU_TO_GT32(_x) ( \ + (((_x) 0xff) 24) | (((_x) 0xff00) 8) |\ + (((_x) 0xff) 8) | (((_x) 0xff00) 24)) +#endif .text .set noreorder @@ -15,5 +27,44 @@ .globl lowlevel_init lowlevel_init: + /* +* Load BAR registers of GT64120 as done by YAMON +* +* based on a patch sent by Antony Pavlov antonynpav...@gmail.com +* to the barebox mailing list. +* The subject of the original patch: +* 'MIPS: qemu-malta: add YAMON-style GT64120 memory map' +* URL: +* http://www.mail-archive.com/barebox@lists.infradead.org/msg06128.html +* +* based on write_bootloader() in qemu.git/hw/mips_malta.c +* see GT64120 manual and qemu.git/hw/gt64xxx.c for details +*/ + + /* move GT64120 registers from 0x1400 to 0x1be0 */ + li t1, KSEG1ADDR(GT_DEF_BASE) + li t0, CPU_TO_GT32(0xdf00) + sw t0, GT_ISD_OFS(t1) + + /* setup MEM-to-PCI0 mapping */ + li t1, KSEG1ADDR(MALTA_GT_BASE) + + /* setup PCI0 io window to 0x1800-0x181f */ + li t0, CPU_TO_GT32(0xc000) + sw t0, GT_PCI0IOLD_OFS(t1) + li t0, CPU_TO_GT32(0x4000) + sw t0, GT_PCI0IOHD_OFS(t1) + + /* setup PCI0 mem windows */ + li t0, CPU_TO_GT32(0x8000) + sw t0, GT_PCI0M0LD_OFS(t1) + li t0, CPU_TO_GT32(0x3f00) + sw t0, GT_PCI0M0HD_OFS(t1) + + li t0, CPU_TO_GT32(0xc100) + sw t0, GT_PCI0M1LD_OFS(t1) + li t0, CPU_TO_GT32(0x5e00) + sw t0, GT_PCI0M1HD_OFS(t1) + jr ra nop -- 1.7.10 is this initialization really needed before relocation? If not this should be moved to pci_init_board() After this initialization, the UART uses a different base address. If we want UART output before the relocation then we have to initialize it here. -Gabor ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 06/10] MIPS: qemu-malta: add PCI support
2013.02.02. 20:37 keltezéssel, Daniel Schwierzeck írta: I think this should be implemented as separate driver in drivers/pci/ Ok, i will move it. -Gabor ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd_mem.c: Fix simple typoes, no functional changes.
On Sat, 2 Feb 2013, Jeroen Hofstee wrote: On 02/02/2013 05:04 PM, Robert P. J. Day wrote: Signed-off-by: Robert P. J. Day rpj...@crashcourse.ca --- based on perusal of entire file as i was reading code. undoubtedly more of these file-wide proofreads coming if no objections ... diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 0f3ffc8..2568c04 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -462,7 +462,7 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc, if (argc 3) return CMD_RET_USAGE; - /* Check for a size spefication. + /* Check for a size specification. * Defaults to long if no or incorrect specification. */ if ((size = cmd_get_data_size(argv[0], 4)) 0) .. snip ... nitpicking: the summary line should not end with a dot. point taken, i can resubmit. multi line comments in u-boot are commonly /* * I span * multiple lines */ So while at it, you might want to add the empty opening line as well. in cases like this, it's kind of a judgment call. if that's truly a strict standard, then sure. but i'm pretty sure there's a *lot* of the above type of comment in the source and when i'm just fixing comments, i prefer to make as unobtrusive a change as possible. i'll let wolfgang decide, and i'll go with whatever he chooses. note carefully that you used the phrase commonly, without claiming that it's a hard and fast standard, which is why i left it alone. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 1/3] MIPS: add .dyn.rel section to u-boot.lds
This section contain the table needed for dynamic relocation. Also provide symbols for the relocation code to access the table. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- arch/mips/cpu/u-boot.lds | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/mips/cpu/u-boot.lds b/arch/mips/cpu/u-boot.lds index 58a49b2..3d9d82a 100644 --- a/arch/mips/cpu/u-boot.lds +++ b/arch/mips/cpu/u-boot.lds @@ -70,11 +70,36 @@ SECTIONS uboot_end_data = .; . = ALIGN(4); + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .deadcode : { + /* +* Workaround for a binutils feature (or bug?). +* +* The GNU ld from binutils puts the dynamic relocation +* entries into the .rel.dyn section. Sometimes it +* allocates more dynamic relocation entries than it needs +* and the unused slots are set to R_MIPS_NONE entries. +* +* However the size of the .rel.dyn section in the ELF +* section header does not cover the unused entries, so +* objcopy removes those during stripping. +* +* Create a small section here to avoid that. +*/ + LONG(0x); + } + + . = ALIGN(4); .sbss : { *(.sbss*) } - .bss : { + .bss __rel_dyn_start (OVERLAY) : { *(.bss*) . = ALIGN(4); } -- 1.7.10 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 2/3] MIPS: add -pie flag to LDFLAGS_FINAL
This ensures that the linker generates the .rel.dyn fixup table, which will be applied to the relocated image before transferring control to it. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- arch/mips/config.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/config.mk b/arch/mips/config.mk index de9140b..57f2338 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -65,4 +65,4 @@ PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic $(ENDIANNESS) PLATFORM_CPPFLAGS += -msoft-float PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib $(ENDIANNESS) PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -LDFLAGS_FINAL += --gc-sections +LDFLAGS_FINAL += --gc-sections -pie -- 1.7.10 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 3/3] MIPS: add dynamic relocation support
The code handles relocation entries with the following relocation types only: mips32: R_MIPS_REL32 mips64: R_MIPS_REL+R_MIPS_64 xburst: R_MIPS_REL32 Other relocation entries are skipped without processing. The code must be extended if other relocation types must be upported, however my toolchains uses these types only. The CONFIG_NEEDS_MANUAL_RELOC is not needed after the patch, so remove that as well. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- arch/mips/cpu/mips32/start.S | 31 +-- arch/mips/cpu/mips64/start.S | 39 +-- arch/mips/cpu/xburst/start.S | 31 +-- arch/mips/include/asm/config.h |2 -- 4 files changed, 95 insertions(+), 8 deletions(-) diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S index 7373d4e..4db06a0 100644 --- a/arch/mips/cpu/mips32/start.S +++ b/arch/mips/cpu/mips32/start.S @@ -201,6 +201,8 @@ relocate_code: jr t0 nop + .word __rel_dyn_end + .word __rel_dyn_start .word _GLOBAL_OFFSET_TABLE_ .word uboot_end_data .word uboot_end @@ -228,11 +230,36 @@ in_ram: blt t2, t3, 1b addi t4, 4 + /* Update dynamic relocations. */ + lw t1, -20(t0) # t1 -- __rel_dyn_start + lw t2, -24(t0) # t2 -- __rel_dyn_end + + /* The first relocation entry is reserved, skip it. */ + b 2f +addi t1, 8 + +1: + lw t3, -4(t1) # t4 -- relocation info + + sub t3, 3 + bnezt3, 2f # skip non R_MIPS_REL32 entries +nop + + lw t3, -8(t1) # t3 -- location to fix up in FLASH + + lw t4, 0(t3) # t4 -- original pointer + add t4, s1 # t4 -- adjusted pointer + + add t3, s1 # t3 -- location to fix up in RAM + sw t4, 0(t3) + +2: + blt t1, t2, 1b +addi t1, 8 # each rel.dyn entry is 8 bytes + /* Clear BSS */ lw t1, -12(t0) # t1 -- uboot_end_data lw t2, -8(t0) # t2 -- uboot_end - add t1, s1 # adjust pointers - add t2, s1 sub t1, 4 1: diff --git a/arch/mips/cpu/mips64/start.S b/arch/mips/cpu/mips64/start.S index c0ae41a..3479d77 100644 --- a/arch/mips/cpu/mips64/start.S +++ b/arch/mips/cpu/mips64/start.S @@ -31,6 +31,14 @@ #define CONFIG_SYS_MIPS_CACHE_MODE CONF_CM_CACHABLE_NONCOHERENT #endif +#ifdef CONFIG_SYS_LITTLE_ENDIAN +#define MIPS64_R_INFO(ssym, r_type3, r_type2, r_type) \ + (((r_type) 24) | ((r_type2) 16) | ((r_type3) 8) | (ssym)) +#else +#define MIPS64_R_INFO(ssym, r_type3, r_type2, r_type) \ + ((r_type) | ((r_type2) 8) | ((r_type3) 16) | (ssym) 24) +#endif + /* * For the moment disable interrupts, mark the kernel mode and * set ST0_KX so that the CPU does not spit fire when using @@ -193,6 +201,8 @@ relocate_code: jr t0 nop + .dword __rel_dyn_end + .dword __rel_dyn_start .dword _GLOBAL_OFFSET_TABLE_ .dword uboot_end_data .dword uboot_end @@ -220,11 +230,36 @@ in_ram: blt t2, t3, 1b daddi t8, 8 + /* update dynamic relocation entries */ + ld t1, -40(t0) # t1 -- __rel_dyn_start + ld t2, -48(t0) # t2 -- __rel_dyn_end + + /* The first relocation entry is reserved, skip it. */ + b 2f +daddi t1, 16 + +1: + lw t8, -4(t1) # t8 -- r_info + + dli t3, MIPS64_R_INFO(0x00, 0x00, 0x12, 0x03) + bne t8, t3, 2f # skip non R_MIPS_REL32 entries +nop + + ld t3, -16(t1) # t3 -- location to fix up in FLASH + + ld t8, 0(t3) # t8 -- original pointer + daddt8, s1 # t8 -- adjusted pointer + + daddt3, s1 # t3 -- location to fix up in RAM + sd t8, 0(t3) + +2: + blt t1, t2, 1b +daddi t1, 16 # each rel.dyn entry is 16 bytes + /* Clear BSS */ ld t1, -24(t0) # t1 -- uboot_end_data ld t2, -16(t0) # t2 -- uboot_end - daddt1, s1 # adjust pointers - daddt2, s1 dsubt1, 8 1: diff --git a/arch/mips/cpu/xburst/start.S b/arch/mips/cpu/xburst/start.S index 50b7fb1..e669061 100644 --- a/arch/mips/cpu/xburst/start.S +++ b/arch/mips/cpu/xburst/start.S @@ -116,6 +116,8 @@ relocate_code: jr t0 nop + .word __rel_dyn_end + .word __rel_dyn_start .word _GLOBAL_OFFSET_TABLE_ .word
[U-Boot] [RFC 0/3] MIPS: add automatic relocation support
This series adds dynamic relocation support for MIPS. The patches are against the testing branch of the MIPS custodian tree. The patch-set depends on the following patches: http://patchwork.ozlabs.org/patch/214352/ (malloc: make malloc_bin_reloc static) http://patchwork.ozlabs.org/patch/217651/ (MIPS: compute num_got_entries from .got section's size) Gabor Juhos (3): MIPS: add .dyn.rel section to u-boot.lds MIPS: add -pie flag to LDFLAGS_FINAL MIPS: add dynamic relocation support arch/mips/config.mk|2 +- arch/mips/cpu/mips32/start.S | 31 +-- arch/mips/cpu/mips64/start.S | 39 +-- arch/mips/cpu/u-boot.lds | 27 ++- arch/mips/cpu/xburst/start.S | 31 +-- arch/mips/include/asm/config.h |2 -- 6 files changed, 122 insertions(+), 10 deletions(-) -- 1.7.10 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] cmd_mem.c: Fix simple typoes, no functional changes
Signed-off-by: Robert P. J. Day rpj...@crashcourse.ca --- i'm going to leave the comment format as it is since it matches all of the other brief comments in that file. diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 0f3ffc8..2568c04 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -462,7 +462,7 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc, if (argc 3) return CMD_RET_USAGE; - /* Check for a size spefication. + /* Check for a size specification. * Defaults to long if no or incorrect specification. */ if ((size = cmd_get_data_size(argv[0], 4)) 0) @@ -531,7 +531,7 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (argc 4) return CMD_RET_USAGE; - /* Check for a size spefication. + /* Check for a size specification. * Defaults to long if no or incorrect specification. */ if ((size = cmd_get_data_size(argv[0], 4)) 0) @@ -683,7 +683,7 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, * Data line test: write a pattern to the first * location, write the 1's complement to a 'parking' * address (changes the state of the data bus so a -* floating bus doen't give a false OK), and then +* floating bus doesn't give a false OK), and then * read the value back. Note that we read it back * into a variable because the next time we read it, * it might be right (been there, tough to explain to @@ -747,7 +747,7 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, * 1's test on the relevant bits of the * address and checking for aliasing. * This test will find single-bit -* address failures such as stuck -high, +* address failures such as stuck-high, * stuck-low, and shorted pins. The base * address and size of the region are * selected by the caller. -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd_mem.c: Fix simple typoes, no functional changes.
Dear Robert, In message alpine.DEB.2.02.1302030404210.5835@oneiric you wrote: multi line comments in u-boot are commonly /* * I span * multiple lines */ So while at it, you might want to add the empty opening line as well. in cases like this, it's kind of a judgment call. if that's truly a strict standard, then sure. but i'm pretty sure there's a *lot* of the above type of comment in the source and when i'm just fixing comments, i prefer to make as unobtrusive a change as possible. If you are editing these, then please also fix the multi-line comment style as suggested. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de God runs electromagnetics by wave theory on Monday, Wednesday, and Friday, and the Devil runs them by quantum theory on Tuesday, Thurs- day, and Saturday. -- William Bragg ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd_mem.c: Fix simple typoes, no functional changes.
On Sun, 3 Feb 2013, Wolfgang Denk wrote: Dear Robert, In message alpine.DEB.2.02.1302030404210.5835@oneiric you wrote: multi line comments in u-boot are commonly /* * I span * multiple lines */ So while at it, you might want to add the empty opening line as well. in cases like this, it's kind of a judgment call. if that's truly a strict standard, then sure. but i'm pretty sure there's a *lot* of the above type of comment in the source and when i'm just fixing comments, i prefer to make as unobtrusive a change as possible. If you are editing these, then please also fix the multi-line comment style as suggested. Thanks. so what is the actual standard? besides the above, line space above? line space below? because i see all sorts of variations in the code, the most common of which is: ... snip ... static int mod_mem(cmd_tbl_t *, int, int, int, char * const []); /* Display values from last command. * Memory modify remembered values are different from display memory. */ static uint dp_last_addr, dp_last_size; ... snip ... which, as you can see, has a leading blank line but not a following one. so what's correct? is this written down somewhere? rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Drivers PATCH 14/19] net/macb: workaround for transmission hang issue
Hi Vipin, On Fri, 2 Nov 2012 23:09:59 +0530, Vipin Kumar vipin.ku...@st.com wrote: From: Shiraz Hashim shiraz.has...@st.com It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state. It comes out if this situation only when Transmission is disabled and enabled again. Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor. Signed-off-by: Shiraz Hashim shiraz.has...@st.com --- drivers/net/macb.c | 38 ++ 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index ac25b52..17bad33 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -55,7 +55,7 @@ #define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096 #define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1 #define CONFIG_SYS_MACB_TX_TIMEOUT 1000 #define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 500 @@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb-tx_ring[tx_head].ctrl = ctrl; macb-tx_ring[tx_head].addr = paddr; barrier(); - macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART)); + /* + * Due to issues on SPEAr320 RMII, disable TE first so that + * controller can come out if it is hanged during transmission + */ + macb_writel(macb, NCR, macb_readl(macb, NCR) ~MACB_BIT(TE)); + macb_writel(macb, NCR, macb_readl(macb, NCR) | + MACB_BIT(TE) | MACB_BIT(TSTART)); /* * I guess this is necessary because the networking core may @@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw(struct macb_device *bp) +{ + /* Make sure we have the write buffer for ourselves */ + barrier(); + /* + * Disable RX and TX (XXX: Should we halt the transmission + * more gracefully?) and we should not close the mdio port + */ + macb_writel(bp, NCR, 0); + + /* Clear the stats registers (XXX: Update stats first?) */ + macb_writel(bp, NCR, MACB_BIT(CLRSTAT)); + + /* keep the mdio port , otherwise other eth will not work */ + macb_writel(bp, NCR, MACB_BIT(MPE)); + + /* Clear all status flags */ + macb_writel(bp, TSR, ~0UL); + macb_writel(bp, RSR, ~0UL); + + /* Disable all interrupts */ + macb_writel(bp, IDR, ~0UL); + macb_readl(bp, ISR); +} + static int macb_init(struct eth_device *netdev, bd_t *bd) { struct macb_device *macb = to_macb(netdev); @@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr = macb_readl(macb, TSR); } while (tsr MACB_BIT(TGO)); - /* Disable TX and RX, and clear statistics */ - macb_writel(macb, NCR, MACB_BIT(CLRSTAT)); + macb_reset_hw(macb); } static int macb_write_hwaddr(struct eth_device *dev) This patch did not reappear in later versions of the series, and no other standalone patch seems to match it. Was it dropped? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 REPOST 6/7] mmc: add bcm2835 driver
On Tue, 15 Jan 2013 19:26:58 -0700, Stephen Warren swar...@wwwdotorg.org wrote: This adds a simple driver for the BCM2835's SD controller. Workarounds are implemented for: * Register writes can't be too close to each-other in time, or they will be lost. * Register accesses must all be 32-bit, so implement custom accessors. This code was extracted from: git://github.com/gonzoua/u-boot-pi.git master which was created by Oleksandr Tymoshenko. Portions of the code there were obviously based on the Linux kernel at: git://github.com/raspberrypi/linux.git rpi-3.6.y commit f5b930b Main bcm2708 linux port signed-off-by Dom Cobley. swarren changed the following for upstream: * Removed hack udelay()s in bcm2835_sdhci_raw_writel(); setting SDHCI_QUIRK_WAIT_SEND_CMD appears to solve the issues. * Remove register logging from read*/write* functions. * Sort out confusion with min/max_freq values passed to add_sdhci(). * Use more descriptive variable names and calculations in IO accessors. * Simplified and commented twoticks_delay calculation. * checkpatch fixes. Cc: Andy Fleming aflem...@gmail.com Signed-off-by: Oleksandr Tymoshenko go...@bluezbox.com Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- Andy, could you please ack this so Albert can take it through the ARM tree; patch 7/7 depends is an ARM patch and depends on this. Thanks. v5: Invent struct bcm2835_sdhci_host to avoid static/global variables. v4: * Merged with video patch series due to dependencies in rpi_b.h. * Rebased onto latest u-boot-arm/master; no real changes. v3: No such version was posted. v2: * Use more descriptive variable names and calculations in IO accessors. * Add Oleksandr's S-o-b. * Rewrite commit description to note that the Linux code this was derived from was S-o-b Dom Cobley. --- arch/arm/include/asm/arch-bcm2835/sdhci.h | 24 drivers/mmc/Makefile |1 + drivers/mmc/bcm2835_sdhci.c | 189 + 3 files changed, 214 insertions(+) create mode 100644 arch/arm/include/asm/arch-bcm2835/sdhci.h create mode 100644 drivers/mmc/bcm2835_sdhci.c diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h b/arch/arm/include/asm/arch-bcm2835/sdhci.h new file mode 100644 index 000..a4f867b --- /dev/null +++ b/arch/arm/include/asm/arch-bcm2835/sdhci.h @@ -0,0 +1,24 @@ +/* + * (C) Copyright 2012 Stephen Warren + * + * 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 + * version 2 as published by the Free Software Foundation. + * + * 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. + */ + +#ifndef _BCM2835_SDHCI_H_ +#define _BCM2835_SDHCI_H_ + +#define BCM2835_SDHCI_BASE 0x2030 + +int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq); + +#endif diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index 65791aa..1d6faa2 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile @@ -43,6 +43,7 @@ COBJS-$(CONFIG_MXS_MMC) += mxsmmc.o COBJS-$(CONFIG_OMAP_HSMMC) += omap_hsmmc.o COBJS-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o COBJS-$(CONFIG_SDHCI) += sdhci.o +COBJS-$(CONFIG_BCM2835_SDHCI) += bcm2835_sdhci.o COBJS-$(CONFIG_S5P_SDHCI) += s5p_sdhci.o COBJS-$(CONFIG_SH_MMCIF) += sh_mmcif.o COBJS-$(CONFIG_TEGRA_MMC) += tegra_mmc.o diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c new file mode 100644 index 000..b0afc3c --- /dev/null +++ b/drivers/mmc/bcm2835_sdhci.c @@ -0,0 +1,189 @@ +/* + * This code was extracted from: + * git://github.com/gonzoua/u-boot-pi.git master + * and hence presumably (C) 2012 Oleksandr Tymoshenko + * + * Tweaks for U-Boot upstreaming + * (C) 2012 Stephen Warren + * + * Portions (e.g. read/write macros, concepts for back-to-back register write + * timing workarounds) obviously extracted from the Linux kernel at: + * https://github.com/raspberrypi/linux.git rpi-3.6.y + * + * The Linux kernel code has the following (c) and license, which is hence + * propagated to Oleksandr's tree and here: + * + * Support for SDHCI device on 2835 + * Based on sdhci-bcm2708.c (c) 2010 Broadcom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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
Re: [U-Boot] [PATCH] cmd_mem.c: Fix simple typoes, no functional changes.
Dear Robert, In message alpine.DEB.2.02.1302030522480.6448@oneiric you wrote: so what is the actual standard? besides the above, line space above? line space below? because i see all sorts of variations in the code, the most common of which is: The standard is the Linux CodingStyle: - snip -- The preferred style for long (multi-line) comments is: /* * This is the preferred style for multi-line * comments in the Linux kernel source code. * Please use it consistently. * * Description: A column of asterisks on the left side, * with beginning and ending almost-blank lines. */ - snip -- Regarding the space above and blow, I'm not aware of any standard. Please apply common sense. which, as you can see, has a leading blank line but not a following one. so what's correct? is this written down somewhere? Not that I'm aware of. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de A year spent in artificial intelligence is enough to make one believe in God. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] cmd_mem.c: Fix some typoes, no functional changes
Signed-off-by: Robert P. J. Day rpj...@crashcourse.ca --- fixing a few simple typoes should not represent this much grief. diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 0f3ffc8..d44aa1d 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -462,7 +462,8 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc, if (argc 3) return CMD_RET_USAGE; - /* Check for a size spefication. + /* +* Check for a size specification. * Defaults to long if no or incorrect specification. */ if ((size = cmd_get_data_size(argv[0], 4)) 0) @@ -531,7 +532,8 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (argc 4) return CMD_RET_USAGE; - /* Check for a size spefication. + /* +* Check for a size specification. * Defaults to long if no or incorrect specification. */ if ((size = cmd_get_data_size(argv[0], 4)) 0) @@ -683,7 +685,7 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, * Data line test: write a pattern to the first * location, write the 1's complement to a 'parking' * address (changes the state of the data bus so a -* floating bus doen't give a false OK), and then +* floating bus doesn't give a false OK), and then * read the value back. Note that we read it back * into a variable because the next time we read it, * it might be right (been there, tough to explain to @@ -747,7 +749,7 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, * 1's test on the relevant bits of the * address and checking for aliasing. * This test will find single-bit -* address failures such as stuck -high, +* address failures such as stuck-high, * stuck-low, and shorted pins. The base * address and size of the region are * selected by the caller. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] should config_cmd_all.h list *all* possible commands?
i ask since i glanced at it and it clearly doesn't reference the gpio command: ... snip ... #define CONFIG_CMD_FLASH/* flinfo, erase, protect */ #define CONFIG_CMD_FPGA /* FPGA configuration Support */ #define CONFIG_CMD_GETTIME /* Get time since boot */ #define CONFIG_CMD_HASH /* calculate hash / digest */ #define CONFIG_CMD_HWFLOW /* RTS/CTS hw flow control */ ... snip ... i didn't look any further, just thought i'd ask about that first. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] README.scrapyard: add missing commit IDs
Hi Graeme, Wolfgang, On Fri, 30 Nov 2012 17:30:08 +1100, Graeme Russ graeme.r...@gmail.com wrote: Hi Wolfgang, On 30/11/2012, at 5:20 PM, Wolfgang Denk w...@denx.de wrote: Dear Graeme Russ, In message calbutcjo15hswnydpuyppsxyngvx6s9h2xp0_dq+x4rpny+...@mail.gmail.com you wrote: Board ArchCPU removed Commit last known maintainer/contact = apollon arm omap24xx 535c74f 2012-09-18Kyungmin Park kyungmin.p...@samsung.com tb0229 mipsmips32 3f3110d 2011-12-12 'removed' and 'Commit' don't match the order of the header Sorry, I don't get what you mean? Which header? Which order? The order of the field list on the first line doesn't match the order of the fields pf the entries From gitk it seems the order as always been consistently 'wrong' from day one, with header placing date before commit ID, and content doing the reverse. As 1/2 has landed on me (I suspect it is due to 2/2 being somewhat ARM), and as I need 1/2 to be able to apply 2/2, I suggest that I take 1/2 in and fix the header order on-the-fly. Wolfgang, is that Ok or do you prefer to formally submit a V2? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH resend] armv7/ltimer: Add support for local timer on armv7 cpus
Hi Vipin, On Thu, 6 Dec 2012 14:52:55 +0530, Vipin Kumar vipin.ku...@st.com wrote: Certain ARMV7 cpus eg. CortexA9 contains a local and a global timer within the CPU core itself. This patch adds generic support for local timer. Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/cpu/armv7/Makefile | 11 ++- arch/arm/cpu/armv7/ca9_ltimer.c | 152 ++ arch/arm/include/asm/ca9_ltimer.h | 40 ++ 3 files changed, 199 insertions(+), 4 deletions(-) create mode 100644 arch/arm/cpu/armv7/ca9_ltimer.c create mode 100644 arch/arm/include/asm/ca9_ltimer.h diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile index 4fdbee4..3ef01f6 100644 --- a/arch/arm/cpu/armv7/Makefile +++ b/arch/arm/cpu/armv7/Makefile @@ -27,15 +27,18 @@ LIB = $(obj)lib$(CPU).o START:= start.o -COBJS+= cache_v7.o +COBJS-y += cache_v7.o -COBJS+= cpu.o -COBJS+= syslib.o +COBJS-y += cpu.o +COBJS-y += syslib.o +COBJS-$(CONFIG_ARMV7_CA9LTIMER) += ca9_ltimer.o ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA20),) -SOBJS+= lowlevel_init.o +SOBJS-y += lowlevel_init.o endif +COBJS:= $(sort $(COBJS-y)) +SOBJS:= $(sort $(SOBJS-y)) SRCS := $(START:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) START:= $(addprefix $(obj),$(START)) diff --git a/arch/arm/cpu/armv7/ca9_ltimer.c b/arch/arm/cpu/armv7/ca9_ltimer.c new file mode 100644 index 000..cbf1552 --- /dev/null +++ b/arch/arm/cpu/armv7/ca9_ltimer.c @@ -0,0 +1,152 @@ +/* + * (C) Copyright 2012 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include asm/io.h +#include asm/ca9_ltimer.h +#include asm/arch/hardware.h + +#define READ_TIMER() readl(ca9_timer_p-count) + +static struct ca9_timer_regs *const ca9_timer_p = + (struct ca9_timer_regs *)CONFIG_ARMV7_LTIMER_BASE; + +DECLARE_GLOBAL_DATA_PTR; + +#define timestampgd-tbl +#define lastdec gd-lastinc +#define tickshz gd-timer_rate_hz +#define ticksper10usec gd-tbu + +int timer_init(void) +{ + u32 prescaler, timertickshz; + /* + * Genrally, CortexA9 MPUs are operating from 500MHz to 1500MHz which + * means that CA9 local timer clock would be in the range of 250 MHz to + * 750MHz. + * Try to find a prescaler which can perfectly divide the local timer + * clock. Take prescaler as 200 if nothing is found + */ + for (prescaler = 255; prescaler 1; prescaler--) { + if (CONFIG_ARMV7_LTMR_CLK == + (CONFIG_ARMV7_LTMR_CLK / prescaler) * prescaler) + break; + } + + if (prescaler == 1) + prescaler = 200; + timertickshz = CONFIG_ARMV7_LTMR_CLK / prescaler; + ticksper10usec = timertickshz / (100 * 1000); + tickshz = timertickshz / CONFIG_SYS_HZ; + + /* disable timers */ + writel(((prescaler - 1) 8) | AUTO_RELOAD, ca9_timer_p-control); + + /* load value for free running */ + writel(FREE_RUNNING, ca9_timer_p-load); + + /* auto reload, start timer */ + setbits_le32(ca9_timer_p-control, TIMER_ENABLE); + + reset_timer_masked(); + + return 0; +} + +/* + * timer without interrupts + */ + +void reset_timer(void) +{ + reset_timer_masked(); +} + +ulong get_timer(ulong base) +{ + return (get_timer_masked() / tickshz) - base; +} + +void set_timer(ulong t) +{ + timestamp = t; +} + +void __udelay(unsigned long usec) +{ + ulong tmo; + ulong start = get_timer_masked(); + ulong rndoff; + + rndoff = (usec % 10) ? 1 : 0; + tmo = ((usec / 10) + rndoff) * ticksper10usec; + + while ((ulong) (get_timer_masked() - start) tmo); +} + +void reset_timer_masked(void) +{ + /* reset time */ + lastdec = READ_TIMER(); + timestamp = 0; +} + +ulong get_timer_masked(void) +{ + ulong now = READ_TIMER(); + + if (now =
Re: [U-Boot] [PATCH 0/2] ARM: mmu: Set domain permissions to client access
Hi R Sicharan, Vincent, On Tue, 8 Jan 2013 23:38:22 +0530, R Sricharan r.sricha...@ti.com wrote: Currently for ARM based cpu's, mmu pagetable attributes are set with manager permissions for all 4GB address space. Because of this the 'execute never (XN)' permission is never checked on read sensitive regions which results in speculative aborts. This series changes the domain permissions of the full 4GB space to client access for OMAP socs. This avoids all the speculative aborts that are currently seen on OMAP5 secure devices. Tested on OMAP5 SDP (HS) soc. This series depends on [1] the patch sent by Vincent Stehle v-ste...@ti.com [1] http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html R Sricharan (2): ARM: mmu: Introduce weak dram_bank_setup function ARM: mmu: Set domain permissions to client access arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/cache.h |1 + arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c | 13 - 5 files changed, 65 insertions(+), 1 deletion(-) Does that mean the rest of Vincent's patch set is not needed any more? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] ARM: mmu: Set domain permissions to client access
Hi, On Sunday 03 February 2013 07:47 PM, Albert ARIBAUD wrote: Hi R Sicharan, Vincent, On Tue, 8 Jan 2013 23:38:22 +0530, R Sricharan r.sricha...@ti.com wrote: Currently for ARM based cpu's, mmu pagetable attributes are set with manager permissions for all 4GB address space. Because of this the 'execute never (XN)' permission is never checked on read sensitive regions which results in speculative aborts. This series changes the domain permissions of the full 4GB space to client access for OMAP socs. This avoids all the speculative aborts that are currently seen on OMAP5 secure devices. Tested on OMAP5 SDP (HS) soc. This series depends on [1] the patch sent by Vincent Stehle v-ste...@ti.com [1] http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html R Sricharan (2): ARM: mmu: Introduce weak dram_bank_setup function ARM: mmu: Set domain permissions to client access arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/cache.h |1 + arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c | 13 - 5 files changed, 65 insertions(+), 1 deletion(-) Does that mean the rest of Vincent's patch set is not needed any more? Except for one patch that i have mentioned, rest are needed http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html Regards, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] in cmd_df.c, why does U_BOOT_CMD reference cmd not defined in that file?
always willing to embarrass myself with silly questions, what is going on in cmd_df.c? note the command defined is apparently sf, which invokes something called do_serial_flash, which is nowhere to be seen here: /* * Command for accessing DataFlash. * * Copyright (C) 2008 Atmel Corporation */ #include common.h #include df.h static int do_df(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { const char *cmd; /* need at least two arguments */ if (argc 2) goto usage; cmd = argv[1]; if (strcmp(cmd, init) == 0) { df_init(0, 0, 100); return 0; } if (strcmp(cmd, info) == 0) { df_show_info(); return 0; } usage: return CMD_RET_USAGE; } U_BOOT_CMD( sf, 2, 1, do_serial_flash, Serial flash sub-system, probe [bus:]cs - init flash device on given SPI bus and CS) i'm confused ... rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] ARM: mmu: Set domain permissions to client access
Hi, On Sunday 03 February 2013 07:49 PM, R Sricharan wrote: Hi, On Sunday 03 February 2013 07:47 PM, Albert ARIBAUD wrote: Hi R Sicharan, Vincent, On Tue, 8 Jan 2013 23:38:22 +0530, R Sricharan r.sricha...@ti.com wrote: i meant Currently for ARM based cpu's, mmu pagetable attributes are set with manager permissions for all 4GB address space. Because of this the 'execute never (XN)' permission is never checked on read sensitive regions which results in speculative aborts. This series changes the domain permissions of the full 4GB space to client access for OMAP socs. This avoids all the speculative aborts that are currently seen on OMAP5 secure devices. Tested on OMAP5 SDP (HS) soc. This series depends on [1] the patch sent by Vincent Stehle v-ste...@ti.com [1] http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html R Sricharan (2): ARM: mmu: Introduce weak dram_bank_setup function ARM: mmu: Set domain permissions to client access arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/cache.h |1 + arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c | 13 - 5 files changed, 65 insertions(+), 1 deletion(-) Does that mean the rest of Vincent's patch set is not needed any more? Except for one patch that i have mentioned, rest are needed http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html Sorry.. i meant Except for one patch, rest are not needed Regards, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ARM: add wfi assembly macro
Hi Rob, On Sun, 2 Dec 2012 21:06:21 -0600, Rob Herring robherri...@gmail.com wrote: From: Rob Herring rob.herr...@calxeda.com Since wfi instruction is only available on ARMv7, add a conditional macro for it. Signed-off-by: Rob Herring rob.herr...@calxeda.com --- arch/arm/include/asm/system.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 2b28a26..2f6aecd 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -61,6 +61,12 @@ #define nop() __asm__ __volatile__(mov\tr0,r0\t@ nop\n\t); +#ifdef __ARM_ARCH_7A__ +#define wfi() __asm__ __volatile__ (wfi : : : memory) +#else +#define wfi() +#endif + static inline unsigned int get_cr(void) { unsigned int val; Applied to u-boot-arm/master, thanks! Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] ARM: highbank: use wfi macro instead of inline asm
Hi Rob, On Sun, 2 Dec 2012 21:06:22 -0600, Rob Herring robherri...@gmail.com wrote: From: Rob Herring rob.herr...@calxeda.com Older compilers don't recognize v7 wfi instruction, so use wfi macro to fix builds on old compilers. Signed-off-by: Rob Herring rob.herr...@calxeda.com --- board/highbank/highbank.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index f41bf05..09cd45d 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -88,5 +88,6 @@ void dram_init_banksize(void) void reset_cpu(ulong addr) { writel(HB_PWR_HARD_RESET, HB_SREG_A9_PWR_REQ); - asm( wfi); + + wfi(); } Applied to u-boot-arm/master, thanks! Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] ARM: mmu: Set domain permissions to client access
Hi R, On Sun, 3 Feb 2013 19:52:04 +0530, R Sricharan r.sricha...@ti.com wrote: Hi, On Sunday 03 February 2013 07:49 PM, R Sricharan wrote: Hi, On Sunday 03 February 2013 07:47 PM, Albert ARIBAUD wrote: Hi R Sicharan, Vincent, On Tue, 8 Jan 2013 23:38:22 +0530, R Sricharan r.sricha...@ti.com wrote: i meant Currently for ARM based cpu's, mmu pagetable attributes are set with manager permissions for all 4GB address space. Because of this the 'execute never (XN)' permission is never checked on read sensitive regions which results in speculative aborts. This series changes the domain permissions of the full 4GB space to client access for OMAP socs. This avoids all the speculative aborts that are currently seen on OMAP5 secure devices. Tested on OMAP5 SDP (HS) soc. This series depends on [1] the patch sent by Vincent Stehle v-ste...@ti.com [1] http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html R Sricharan (2): ARM: mmu: Introduce weak dram_bank_setup function ARM: mmu: Set domain permissions to client access arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/cache.h |1 + arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c | 13 - 5 files changed, 65 insertions(+), 1 deletion(-) Does that mean the rest of Vincent's patch set is not needed any more? Except for one patch that i have mentioned, rest are needed http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html Sorry.. i meant Except for one patch, rest are not needed Sorry, I may not have made myself clear enough. Does your patchset replace Vincent's patches 2/3 and 3/3 and should I consider them superseded? Regards, Sricharan Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cmd_load.c: Add #endif comments to reduce confusion
Signed-off-by: Robert P. J. Day rpj...@crashcourse.ca --- i think i got this right ... those chunks are just long enough that comments are useful. diff --git a/common/cmd_load.c b/common/cmd_load.c index 2c8dab1..46db962 100644 --- a/common/cmd_load.c +++ b/common/cmd_load.c @@ -1064,8 +1064,8 @@ U_BOOT_CMD( - save S-Record file over serial line with offset 'off' and size 'size' ); #endif /* CONFIG_SYS_LOADS_BAUD_CHANGE */ -#endif -#endif +#endif /* CONFIG_CMD_SAVES */ +#endif /* CONFIG_CMD_LOADS */ #if defined(CONFIG_CMD_LOADB) @@ -1085,7 +1085,7 @@ U_BOOT_CMD( with offset 'off' and baudrate 'baud' ); -#endif +#endif /* CONFIG_CMD_LOADB */ /* */ @@ -1115,4 +1115,4 @@ U_BOOT_CMD( [on|off] ); -#endif +#endif /* CONFIG_CMD_HWFLOW */ -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] ARM: mmu: Set domain permissions to client access
On Sunday 03 February 2013 08:55 PM, Albert ARIBAUD wrote: Hi R, On Sun, 3 Feb 2013 19:52:04 +0530, R Sricharan r.sricha...@ti.com wrote: Hi, On Sunday 03 February 2013 07:49 PM, R Sricharan wrote: Hi, On Sunday 03 February 2013 07:47 PM, Albert ARIBAUD wrote: Hi R Sicharan, Vincent, On Tue, 8 Jan 2013 23:38:22 +0530, R Sricharan r.sricha...@ti.com wrote: i meant Currently for ARM based cpu's, mmu pagetable attributes are set with manager permissions for all 4GB address space. Because of this the 'execute never (XN)' permission is never checked on read sensitive regions which results in speculative aborts. This series changes the domain permissions of the full 4GB space to client access for OMAP socs. This avoids all the speculative aborts that are currently seen on OMAP5 secure devices. Tested on OMAP5 SDP (HS) soc. This series depends on [1] the patch sent by Vincent Stehle v-ste...@ti.com [1] http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html R Sricharan (2): ARM: mmu: Introduce weak dram_bank_setup function ARM: mmu: Set domain permissions to client access arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/cache.h |1 + arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c | 13 - 5 files changed, 65 insertions(+), 1 deletion(-) Does that mean the rest of Vincent's patch set is not needed any more? Except for one patch that i have mentioned, rest are needed http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html Sorry.. i meant Except for one patch, rest are not needed Sorry, I may not have made myself clear enough. Does your patchset replace Vincent's patches 2/3 and 3/3 and should I consider them superseded? Yes, you are correct. Regards, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] #if defined(CONFIG_CMD_REGINFO) in cmd_reginfo.c redundant?
another simple clarification -- i realize that a lot of the source files of the form common/cmd_*.c might contain more than just the command code, they might contain infrastructure code that's necessary apart from the commands themselves. but in the case of cmd_reginfo.c, this code at the very end: #if defined(CONFIG_CMD_REGINFO) U_BOOT_CMD( reginfo,2, 1, do_reginfo, print register information, ); #endif it seems that that preprocessor check is superfluous since the entire file is nothing more than the implementation of the reginfo command, and the relevant test is already being done in the Makefile: COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o am i understanding that correctly? thanks. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] u-boot command list, grouped by source file
while i was scouring the source code in the common/ directory, i put together this lengthy list of all of the possible commands, grouped by their source file and annotated by whatever *additional* CONFIG settings they require: http://www.crashcourse.ca/wiki/index.php/U-Boot_command/file_reference not perfect, but it gives me a quick way to know what source files provide which commands, and under what circumstances. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] 答复: [U-boot] mkimage -F parameter
Hi, Simon: Thanks for your answer! I have a PandaBoard (OMAP 4460). I am studying Uboot code. If uboot integrates this verifying kernel function, then it would have a security feature.(seams as UEFI firmware supported) Best wishes, -邮件原件- 发件人: s...@google.com [mailto:s...@google.com] 代表 Simon Glass 发送时间: 2013年2月1日 22:25 收件人: Tiger Liu 抄送: u-boot@lists.denx.de 主题: Re: [U-Boot] [U-boot] mkimage -F parameter Hi Tiger, On Thu, Jan 31, 2013 at 3:36 AM, tiger...@viatech.com.cn wrote: Hi, experts: It seems mkimage has supported signing a image. This code is not yet merged, as you have discovered. So, I have a question about signed linux kernel image: 1. if kernel image is signed by mkimage tool. Could uboot verify this signed linux kernel image bf jumping to its entry point function? Yes the bootm command will do this automatically. 2. if uboot could verify the signed linux kernel image how to management these different vendors' public keys in uboot code? Using env variable? The keys are not easily kept in an environment variable as we have several bits of information. In the current implementation the device tree is used, so you need to enable CONFIG_OF_CONTROL. Then mkimage will put the public keys in the FDT, and you attach that to U-Boot. Multiple keys are supported and it is possible to sign the same image with several different keys. Keys can be marked 'required' so that they must verify. What platform/board are you using? Regards, Simon Best wishes, ___ 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] 答复: [U-boot] mkimage -F parameter
Hi Tiger, On Sun, Feb 3, 2013 at 5:52 PM, tiger...@viatech.com.cn wrote: Hi, Simon: Thanks for your answer! I have a PandaBoard (OMAP 4460). I am studying Uboot code. If uboot integrates this verifying kernel function, then it would have a security feature.(seams as UEFI firmware supported) Yes. It can be used to verify a kernel, and also to verify a second-stage firmware (if upgradable firmware is required and you want to always avoid bricking the device). It can verify any image that can be put in a FIT, and any combination of images that can be put in a FIT configuration. Regards, Simon Best wishes, -邮件原件- 发件人: s...@google.com [mailto:s...@google.com] 代表 Simon Glass 发送时间: 2013年2月1日 22:25 收件人: Tiger Liu 抄送: u-boot@lists.denx.de 主题: Re: [U-Boot] [U-boot] mkimage -F parameter Hi Tiger, On Thu, Jan 31, 2013 at 3:36 AM, tiger...@viatech.com.cn wrote: Hi, experts: It seems mkimage has supported signing a image. This code is not yet merged, as you have discovered. So, I have a question about signed linux kernel image: 1. if kernel image is signed by mkimage tool. Could uboot verify this signed linux kernel image bf jumping to its entry point function? Yes the bootm command will do this automatically. 2. if uboot could verify the signed linux kernel image how to management these different vendors' public keys in uboot code? Using env variable? The keys are not easily kept in an environment variable as we have several bits of information. In the current implementation the device tree is used, so you need to enable CONFIG_OF_CONTROL. Then mkimage will put the public keys in the FDT, and you attach that to U-Boot. Multiple keys are supported and it is possible to sign the same image with several different keys. Keys can be marked 'required' so that they must verify. What platform/board are you using? Regards, Simon Best wishes, ___ 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 1/2] README.scrapyard: add missing commit IDs
Dear Albert, In message 20130203143650.1e1e7508@lilith you wrote: As 1/2 has landed on me (I suspect it is due to 2/2 being somewhat ARM), and as I need 1/2 to be able to apply 2/2, I suggest that I take 1/2 in and fix the header order on-the-fly. Wolfgang, is that Ok or do you prefer to formally submit a V2? It's OK with me. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Command, n.: Statement presented by a human and accepted by a computer in such a manner as to make the human feel as if he is in control. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3 V2] EXYNOS5: Add gpio pin numbering feature
Hi Simon, Thank you for comments On Sun, Jan 27, 2013 at 1:22 AM, Simon Glass s...@chromium.org wrote: Hi, On Wed, Jan 23, 2013 at 2:48 AM, Rajeshwari Shinde rajeshwar...@samsung.com wrote: This patch adds support for gpio pin numbering support on EXYNOS5 pinmux. Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com --- Changes in V2: - none. arch/arm/cpu/armv7/exynos/pinmux.c | 148 + arch/arm/include/asm/arch-exynos/gpio.h | 360 ++- 2 files changed, 413 insertions(+), 95 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index cfe1024..af882dd 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -272,15 +272,355 @@ void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode); - EXYNOS5_GPIO_PART3_BASE) / sizeof(struct s5p_gpio_bank)) \ * GPIO_PER_BANK) + pin) + EXYNOS5_GPIO_PART2_MAX) +/* A list of valid GPIO numbers for the asm-generic/gpio.h interface */ +enum exynos5_gpio_pin { + /* GPIO_PART1_STARTS */ + GPIO_A00, + GPIO_A01, + GPIO_A02, + GPIO_A03, [snip] + GPIO_V44, + GPIO_V45, + GPIO_V46, + GPIO_V47, + + /* GPIO_PART4_STARTS */ + GPIO_PART3_MAX, + GPIO_Z0 = GPIO_PART3_MAX, + GPIO_Z1, + GPIO_Z2, + GPIO_Z3, + GPIO_Z4, + GPIO_Z5, + GPIO_Z6, + GPIO_MAX_PORT +}; + static inline unsigned int s5p_gpio_base(int nr) { if (cpu_is_exynos5()) { - if (nr EXYNOS5_GPIO_PART1_MAX) + if (nr GPIO_PART1_MAX) return EXYNOS5_GPIO_PART1_BASE; - else if (nr EXYNOS5_GPIO_PART2_MAX) + else if (nr GPIO_PART2_MAX) return EXYNOS5_GPIO_PART2_BASE; - else + else if (nr GPIO_PART3_MAX) return EXYNOS5_GPIO_PART3_BASE; + else + return EXYNOS5_GPIO_PART4_BASE; } else if (cpu_is_exynos4()) { if (nr EXYNOS4_GPIO_PART1_MAX) @@ -295,12 +635,14 @@ static inline unsigned int s5p_gpio_base(int nr) static inline unsigned int s5p_gpio_part_max(int nr) { if (cpu_is_exynos5()) { - if (nr EXYNOS5_GPIO_PART1_MAX) + if (nr GPIO_PART1_MAX) return 0; - else if (nr EXYNOS5_GPIO_PART2_MAX) - return EXYNOS5_GPIO_PART1_MAX; + else if (nr GPIO_PART2_MAX) + return GPIO_PART1_MAX; + else if (nr GPIO_PART3_MAX) + return GPIO_PART2_MAX; else - return EXYNOS5_GPIO_PART2_MAX; + return GPIO_PART3_MAX; } else if (cpu_is_exynos4()) { if (nr EXYNOS4_GPIO_PART1_MAX) @@ -311,6 +653,10 @@ static inline unsigned int s5p_gpio_part_max(int nr) return 0; } Do these functions need to be inline in the header file, or could they move to the GPIO driver? We use a generic GPIO driver across S5P platform and these changes being specific to EXYNOS it would not be good to move them to driver. + +void gpio_cfg_pin(int gpio, int cfg); +void gpio_set_pull(int gpio, int mode); +void gpio_set_drv(int gpio, int mode); #endif /* Pin configurations */ -- 1.7.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Regards, Rajeshwari Shinde ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3 V2] EXYNOS5: GPIO: Enable GPIO Command for EXYNOS5
Hi Simon, Thank you for comments. On Sun, Jan 27, 2013 at 1:29 AM, Simon Glass s...@chromium.org wrote: Hi Rajeshwari, On Wed, Jan 23, 2013 at 2:48 AM, Rajeshwari Shinde rajeshwar...@samsung.com wrote: This patch enables GPIO Command for EXYNOS5. Function has been added to asm/gpio.h to decode the input gpio name to gpio number. example: gpio set gpa00 GPIO_INPUT in cmd_gpio.c has been modified to GPIO_DIRECTION_INPUT as GPIO_INPUT is alraedy defined in exynos5 and leading to a error. Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com Great to see this - some comments below. --- Chnages in V2: - New patch arch/arm/include/asm/arch-exynos/gpio.h | 88 +++ common/cmd_gpio.c |6 +- include/configs/exynos5250-dt.h |1 + 3 files changed, 92 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index af882dd..66e4a8e 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -657,6 +657,94 @@ static inline unsigned int s5p_gpio_part_max(int nr) void gpio_cfg_pin(int gpio, int cfg); void gpio_set_pull(int gpio, int mode); void gpio_set_drv(int gpio, int mode); + +#include common.h + +static inline int name_to_gpio(const char *name) +{ + int num; + + name++; + + if (*name == 'p') { + ++name; + + switch (*name) { + case 'a': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_A00 + num; + break; + case 'b': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_B00 + num; + break; + case 'c': + name++; + num = simple_strtoul(name, NULL, 10); + if (num = 40) + num = GPIO_C40 + (num - 40); + else { + num = simple_strtoul(name, NULL, 8); + num = GPIO_C00 + num; + } + break; + case 'd': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_D00 + num; + break; + case 'y': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_Y00 + num; + break; + case 'x': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_X00 + num; + break; + case 'e': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_E00 + num; + break; + case 'f': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_F00 + num; + break; + case 'g': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_G00 + num; + break; + case 'h': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_H00 + num; + break; + case 'v': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_V00 + num; + break; + case 'z': + name++; + num = simple_strtoul(name, NULL, 8); + num = GPIO_Z0 + num; + break; + default: It seems like you need a table (C struct) containing the GPIO letter and the associated GPIO_... value. Then this code could become a for() loop to search for the match. This would reduce code duplication. 'c' would presumable still be a special case. -Okay + return -1; + } + } else + return -1; + + return num; +} + +#define name_to_gpio(n) name_to_gpio(n) #endif /* Pin configurations */ diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c index 47eee89..450e6d1 100644 --- a/common/cmd_gpio.c +++ b/common/cmd_gpio.c @@ -16,7 +16,7 @@ #endif enum gpio_cmd { - GPIO_INPUT, + GPIO_DIRECTION_INPUT, Actually I think it is exynos that should change - perhaps put an EXYNOS prefix on that one. Ya but since we
[U-Boot] Watchdog Handlers
Hi Everyone, I know how to initialise watchdog registers and how to change delay using WLDR reg, but I'm not getting how to use pre-scalar(i.e. WCLR reg), and one more thing is I want to stop the counter register of watchdog after it has reached certain point I want to know what is the procedure to stop watchdog counter after initialisation. Please guide me in this issue. Thanks Regards, Guru Charan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot Bug with newer GCC
Hello, So it seems to be, that patch at least solves this issue. Sebastian: can you check if this is resolved also resolved for your board after applying http://patchwork.ozlabs.org/patch/217695/ Apperently we are still working with v2012.10. Could someone be so kind and provide a patch for v2012.10? We plan to upgrade to v2013.01, but not before the end of Februay. Then this smells like a tool chain issue. You might contact Pengutronix support for help with their tool chain. We already asked Pengutronix. They use barebox with their toolchains and didn't have any problem with their new toolchain, yet. In their barebox.lds they have: __barebox_cmd_start = .; __barebox_cmd : { KEEP(*(SORT_BY_NAME(.barebox_cmd*))) } __barebox_cmd_end = .; And they thought __u_boot_cmd_start = .; .u_boot_cmd : { KEEP(*(.u_boot_cmd)) } __u_boot_cmd_end = .; would solve the problem. But it didn't. Best regards. Sebastian == CADCON Ingenieurgesellschaft mbH Co. KG Geschaeftsfuehrer: Robert Bauer, Andreas Gundel Sitz der Gesellschaft: D-86368 Gersthofen Registergericht: Amtsgericht Augsburg HRA 14521 == -Ursprüngliche Nachricht- Von: Jeroen Hofstee [mailto:jer...@myspectrum.nl] Gesendet: Samstag, 2. Februar 2013 22:45 An: Wolfgang Denk Cc: Jeroen Hofstee; Marek Vasut; Heiko Schocher; Priebe, Sebastian; u-boot@lists.denx.de Betreff: Re: [U-Boot] U-Boot Bug with newer GCC On 02/02/2013 10:22 PM, Wolfgang Denk wrote: Dear Jeroen Hofstee, In message 510d1d1e.7080...@myspectrum.nl you wrote: yes, it is confusing. The following patch will e.g. make the trap go away on the twister. Yet there is nothing wrong with the original code it touches (or I fail to see what it is). Note that your patch breaks commands that use length modifiers ... Best regards, Wolfgang Denk I'm aware of that. This is not a patch to be applied, just to illustrate the weirdness encountered (it explicitly says the code is fine before this). This is resolved for now, see http://patchwork.ozlabs.org/patch/217695/ Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot