[U-Boot] [PATCH v2 4/4] ARM: atmel: at91sam9n12ek: enable spl support
Enable SPL support for at91sam9n12ek boards, now it supports boot up from NAND flash, serial flash. Signed-off-by: Bo Shen voice.s...@atmel.com --- Changes in v2: - Remove the meaningless prefix +S: in configuration file. arch/arm/mach-at91/Kconfig | 1 + arch/arm/mach-at91/Makefile| 1 + arch/arm/mach-at91/include/mach/at91_pmc.h | 4 +- arch/arm/mach-at91/mpddrc.c| 2 +- arch/arm/mach-at91/spl_at91.c | 2 +- board/atmel/at91sam9n12ek/at91sam9n12ek.c | 73 ++ configs/at91sam9n12ek_nandflash_defconfig | 1 + configs/at91sam9n12ek_spiflash_defconfig | 1 + include/configs/at91sam9n12ek.h| 58 +++- 9 files changed, 138 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index bdf87f9..30c4e17 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -75,6 +75,7 @@ config TARGET_PM9G45 config TARGET_AT91SAM9N12EK bool Atmel AT91SAM9N12-EK board select CPU_ARM926EJS + select SUPPORT_SPL config TARGET_AT91SAM9RLEK bool Atmel at91sam9rl reference board diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index ba83616..0d3ee48 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_AT91_WANTS_COMMON_PHY) += phy.o ifneq ($(CONFIG_SPL_BUILD),) obj-$(CONFIG_AT91SAM9G20) += sdram.o spl_at91.o obj-$(CONFIG_AT91SAM9M10G45) += mpddrc.o spl_at91.o +obj-$(CONFIG_AT91SAM9N12) += mpddrc.o spl_at91.o obj-$(CONFIG_AT91SAM9X5) += mpddrc.o spl_at91.o obj-$(CONFIG_SAMA5D3) += mpddrc.o spl_atmel.o obj-$(CONFIG_SAMA5D4) += mpddrc.o spl_atmel.o diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index c903260..ebb7dec 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h @@ -98,7 +98,7 @@ typedef struct at91_pmc { #define AT91_PMC_MCKR_CSS_MASK 0x0003 #if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) || \ - defined(CONFIG_AT91SAM9X5) + defined(CONFIG_AT91SAM9X5) || defined(CONFIG_AT91SAM9N12) #define AT91_PMC_MCKR_PRES_1 0x #define AT91_PMC_MCKR_PRES_2 0x0010 #define AT91_PMC_MCKR_PRES_4 0x0020 @@ -128,7 +128,7 @@ typedef struct at91_pmc { #define AT91_PMC_MCKR_MDIV_1 0x #define AT91_PMC_MCKR_MDIV_2 0x0100 #if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) || \ - defined(CONFIG_AT91SAM9X5) + defined(CONFIG_AT91SAM9X5) || defined(CONFIG_AT91SAM9N12) #define AT91_PMC_MCKR_MDIV_3 0x0300 #endif #define AT91_PMC_MCKR_MDIV_4 0x0200 diff --git a/arch/arm/mach-at91/mpddrc.c b/arch/arm/mach-at91/mpddrc.c index 24d5fcd..e2b6a49 100644 --- a/arch/arm/mach-at91/mpddrc.c +++ b/arch/arm/mach-at91/mpddrc.c @@ -20,7 +20,7 @@ static inline void atmel_mpddr_op(int mode, u32 ram_address) static int ddr2_decodtype_is_seq(u32 cr) { #if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) || \ - defined(CONFIG_AT91SAM9X5) + defined(CONFIG_AT91SAM9X5) || defined(CONFIG_AT91SAM9N12) if (cr ATMEL_MPDDRC_CR_DECOD_INTERLEAVED) return 0; #endif diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index e28e568..a79a9dc 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -115,7 +115,7 @@ void board_init_f(ulong dummy) timer_init(); /* enable clocks for all PIOs */ -#ifdef CONFIG_AT91SAM9X5 +#if defined(CONFIG_AT91SAM9X5) || defined(CONFIG_AT91SAM9N12) at91_periph_clk_enable(ATMEL_ID_PIOAB); at91_periph_clk_enable(ATMEL_ID_PIOCD); #else diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index 9adc992..4f46a03 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -257,3 +257,76 @@ int dram_init(void) CONFIG_SYS_SDRAM_SIZE); return 0; } + +#if defined(CONFIG_SPL_BUILD) +#include spl.h +#include nand.h + +void at91_spl_board_init(void) +{ +#ifdef CONFIG_SYS_USE_MMC + at91_mci_hw_init(); +#elif CONFIG_SYS_USE_NANDFLASH + at91sam9n12ek_nand_hw_init(); +#elif CONFIG_SYS_USE_SPIFLASH + at91_spi0_hw_init(1 4); +#endif +} + +#include asm/arch/atmel_mpddrc.h +static void ddr2_conf(struct atmel_mpddr *ddr2) +{ + ddr2-md = (ATMEL_MPDDRC_MD_DBW_16_BITS | ATMEL_MPDDRC_MD_DDR2_SDRAM); + + ddr2-cr = (ATMEL_MPDDRC_CR_NC_COL_10 | + ATMEL_MPDDRC_CR_NR_ROW_13 | + ATMEL_MPDDRC_CR_CAS_DDR_CAS3 | + ATMEL_MPDDRC_CR_NB_8BANKS | + ATMEL_MPDDRC_CR_DECOD_INTERLEAVED); + + ddr2-rtr = 0x411; + + ddr2-tpr0 = (6 ATMEL_MPDDRC_TPR0_TRAS_OFFSET
[U-Boot] [PATCH v2 1/4] ARM: atmel: arm926ejs: fix clock configuration
Config MCKR according to the datasheet sequence, or else it will cause the MCKR configuration failed. Remove timeout checking for clock configuration, if configure the clock failed, let the system hang while not run in wrong clock configuration. Signed-off-by: Bo Shen voice.s...@atmel.com Tested-by: Heiko Schocher h...@denx.de --- Changes in v2: None arch/arm/mach-at91/arm926ejs/clock.c | 54 +++- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-at91/arm926ejs/clock.c b/arch/arm/mach-at91/arm926ejs/clock.c index f363982..8d6934e 100644 --- a/arch/arm/mach-at91/arm926ejs/clock.c +++ b/arch/arm/mach-at91/arm926ejs/clock.c @@ -195,50 +195,52 @@ int at91_clock_init(unsigned long main_clock) void at91_plla_init(u32 pllar) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; - int timeout = AT91_PLL_LOCK_TIMEOUT; writel(pllar, pmc-pllar); - while (!(readl(pmc-sr) (AT91_PMC_LOCKA | AT91_PMC_MCKRDY))) { - timeout--; - if (timeout == 0) - break; - } + while (!(readl(pmc-sr) AT91_PMC_LOCKA)) + ; } void at91_pllb_init(u32 pllbr) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; - int timeout = AT91_PLL_LOCK_TIMEOUT; writel(pllbr, pmc-pllbr); - while (!(readl(pmc-sr) (AT91_PMC_LOCKB | AT91_PMC_MCKRDY))) { - timeout--; - if (timeout == 0) - break; - } + while (!(readl(pmc-sr) AT91_PMC_LOCKB)) + ; } void at91_mck_init(u32 mckr) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; - int timeout = AT91_PLL_LOCK_TIMEOUT; u32 tmp; tmp = readl(pmc-mckr); - tmp = ~(AT91_PMC_MCKR_PRES_MASK | -AT91_PMC_MCKR_MDIV_MASK | -AT91_PMC_MCKR_PLLADIV_MASK | -AT91_PMC_MCKR_CSS_MASK); - tmp |= mckr (AT91_PMC_MCKR_PRES_MASK | - AT91_PMC_MCKR_MDIV_MASK | - AT91_PMC_MCKR_PLLADIV_MASK | - AT91_PMC_MCKR_CSS_MASK); + tmp = ~AT91_PMC_MCKR_PRES_MASK; + tmp |= mckr AT91_PMC_MCKR_PRES_MASK; writel(tmp, pmc-mckr); + while (!(readl(pmc-sr) AT91_PMC_MCKRDY)) + ; - while (!(readl(pmc-sr) AT91_PMC_MCKRDY)) { - timeout--; - if (timeout == 0) - break; - } + tmp = readl(pmc-mckr); + tmp = ~AT91_PMC_MCKR_MDIV_MASK; + tmp |= mckr AT91_PMC_MCKR_MDIV_MASK; + writel(tmp, pmc-mckr); + while (!(readl(pmc-sr) AT91_PMC_MCKRDY)) + ; + + tmp = readl(pmc-mckr); + tmp = ~AT91_PMC_MCKR_PLLADIV_MASK; + tmp |= mckr AT91_PMC_MCKR_PLLADIV_MASK; + writel(tmp, pmc-mckr); + while (!(readl(pmc-sr) AT91_PMC_MCKRDY)) + ; + + tmp = readl(pmc-mckr); + tmp = ~AT91_PMC_MCKR_CSS_MASK; + tmp |= mckr AT91_PMC_MCKR_CSS_MASK; + writel(tmp, pmc-mckr); + while (!(readl(pmc-sr) AT91_PMC_MCKRDY)) + ; } void at91_periph_clk_enable(int id) -- 2.3.3.220.g9ab698f ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/4] ARM: atmel: at91sam9m10g45ek: enable spl support
Supports boot up from NAND flash with software ECC eanbled. And supports boot up from SD/MMC card with FAT file system. As the boot from SD/MMC card with FAT file system, the BSS segment is too big to fit into SRAM, so, use the lds to put it into SDRAM. Signed-off-by: Bo Shen voice.s...@atmel.com --- Changes in v2: - Remove the meaningless prefix +S: in configuration file. arch/arm/mach-at91/Kconfig | 1 + arch/arm/mach-at91/arm926ejs/u-boot-spl.lds | 48 +++ arch/arm/mach-at91/spl_at91.c | 6 +- board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 80 + configs/at91sam9m10g45ek_mmc_defconfig | 1 + configs/at91sam9m10g45ek_nandflash_defconfig| 1 + include/configs/at91sam9m10g45ek.h | 58 ++ 7 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-at91/arm926ejs/u-boot-spl.lds diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 30945c1..25da926 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -66,6 +66,7 @@ config TARGET_STAMP9G20 config TARGET_AT91SAM9M10G45EK bool Atmel AT91SAM9M10G45-EK board select CPU_ARM926EJS + select SUPPORT_SPL config TARGET_PM9G45 bool Ronetix pm9g45 board diff --git a/arch/arm/mach-at91/arm926ejs/u-boot-spl.lds b/arch/arm/mach-at91/arm926ejs/u-boot-spl.lds new file mode 100644 index 000..acadd1d --- /dev/null +++ b/arch/arm/mach-at91/arm926ejs/u-boot-spl.lds @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2015 Atmel Corporation + * Bo Shen voice.s...@atmel.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE, \ + LENGTH = CONFIG_SPL_MAX_SIZE } +MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ + LENGTH = CONFIG_SPL_BSS_MAX_SIZE } + +OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm) +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + .text : + { + __start = .; + *(.vectors) + arch/arm/cpu/arm926ejs/start.o (.text*) + *(.text*) + } .sram + + . = ALIGN(4); + .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } .sram + + . = ALIGN(4); + .data : { *(SORT_BY_ALIGNMENT(.data*)) } .sram + + . = ALIGN(4); + __image_copy_end = .; + + .end : + { + *(.__end) + } .sram + + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + __bss_end = .; + } .sdram +} diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index 89f588b..af6fc0d 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -71,7 +71,11 @@ void __weak at91_spl_board_init(void) { } -void spl_board_init(void) +void __weak spl_board_init(void) +{ +} + +void board_init_f(ulong dummy) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c index b807ef9..4289179 100644 --- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c @@ -8,6 +8,7 @@ #include common.h #include asm/io.h +#include asm/arch/clk.h #include asm/arch/at91sam9g45_matrix.h #include asm/arch/at91sam9_smc.h #include asm/arch/at91_common.h @@ -15,6 +16,7 @@ #include asm/arch/gpio.h #include asm/arch/clk.h #include lcd.h +#include linux/mtd/nand.h #include atmel_lcdc.h #include atmel_mci.h #if defined(CONFIG_RESET_PHY_R) defined(CONFIG_MACB) @@ -71,6 +73,84 @@ void at91sam9m10g45ek_nand_hw_init(void) } #endif +#if defined(CONFIG_SPL_BUILD) +#include spl.h +#include nand.h + +void at91_spl_board_init(void) +{ + /* +* On the at91sam9m10g45ek board, the chip wm9711 stays in the +* test mode, so it needs do some action to exit test mode. +*/ + at91_periph_clk_enable(ATMEL_ID_PIODE); + at91_set_gpio_output(AT91_PIN_PD7, 0); + at91_set_gpio_output(AT91_PIN_PD8, 0); + at91_set_pio_pullup(AT91_PIO_PORTD, 7, 1); + at91_set_pio_pullup(AT91_PIO_PORTD, 8, 1); + +#ifdef CONFIG_SYS_USE_MMC + at91_mci_hw_init(); +#elif CONFIG_SYS_USE_NANDFLASH + at91sam9m10g45ek_nand_hw_init(); +#endif +} + +#include asm/arch/atmel_mpddrc.h +static void ddr2_conf(struct atmel_mpddr *ddr2) +{ + ddr2-md = (ATMEL_MPDDRC_MD_DBW_16_BITS | ATMEL_MPDDRC_MD_DDR2_SDRAM); + + ddr2-cr = (ATMEL_MPDDRC_CR_NC_COL_10 | + ATMEL_MPDDRC_CR_NR_ROW_14 | + ATMEL_MPDDRC_CR_DQMS_SHARED | + ATMEL_MPDDRC_CR_CAS_DDR_CAS3); + + ddr2-rtr = 0x24b; + + ddr2-tpr0 = (6 ATMEL_MPDDRC_TPR0_TRAS_OFFSET |/* 6*7.5 = 45 ns */ + 2
Re: [U-Boot] Regression in usb-storage in u-boot 2015.04 ???
Hi Hans, On 03/27/2015 03:08 AM, Hans de Goede wrote: Hi, First of all I'm not sure this is a regression, but I'm afraid I do not have time to dig deeper so I thought I should report it anyways and then others can try to reproduce it. I'm seeing the following happen when using a usb stick with a musb-new otg controller in host mode on an allwinner tablet: sunxi# usb reset resetting USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... error in inquiry 0 Storage Device(s) found The interesting thing is that, the first usb start works fine, this only happens on the second usb start (triggered through a usb reset). This may be specific to using musb on sunxi, or to the flashdrive I have but I thought I should report this anyways. Esp. since usb otherwise works fine after a usb reset, other devices (usb keyboards) continue to work, and the descriptors of the usb drive do get read correctly: sunxi# usb info 1: Mass Storage, USB Revision 2.0 - USB Flash Disk 4C0E960F - Class: (from Interface) Mass Storage - PacketSize: 64 Configurations: 1 - Vendor: 0x058f Product 0x6387 Version 1.3 Configuration: 1 - Interfaces: 1 Bus Powered 100mA Interface: 0 - Alternate Setting 0, Endpoints: 2 - Class Mass Storage, Transp. SCSI, Bulk only - Endpoint 1 Out Bulk MaxPacket 512 - Endpoint 2 In Bulk MaxPacket 512 Perhaps someone can test the reproducer on another board with usb: 1) plug in a usb drive 2) do usb start 3) should print that 1 storage device is found 4) do usb reset 5) should still print that 1 storage device is found, but for me gives the error I mentioned above. I tested it OK with EHCI on Atmel sama5d4ek board. The following information for your reference. ---8--- U-Boot SPL 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49) U-Boot 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49) CPU: SAMA5D44 Crystal frequency: 12 MHz CPU clock: 528 MHz Master clock : 176 MHz DRAM: 512 MiB NAND: 512 MiB MMC: mci: 0 In:serial Out: serial Err: serial Net: gmac0, usb_ether Error: usb_ether address not set. Hit any key to stop autoboot: 0 U-Boot usb start starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found U-Boot usb reset resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found U-Boot ---8--- Regards, Hans Best Regards, Bo Shen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/4] common/lcd_console: cleanup lcd_drawchars/lcd_putc_xy
From: Hannes Petermaier hannes.peterma...@br-automation.com the capability of drawing some *str with count from lcd_drawchars is unnary. It is always called from lcd_putc_xy with one character of and count = 1. So we simply rename lcd_drawchars into lcd_putc_xy and remove the loops inside. Signed-off-by: Hannes Petermaier hannes.peterma...@br-automation.com Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- Changes in v4: None Changes in v3: None Changes in v2: None common/lcd_console.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/common/lcd_console.c b/common/lcd_console.c index 8bf83b9..243b7c5 100644 --- a/common/lcd_console.c +++ b/common/lcd_console.c @@ -55,18 +55,17 @@ int lcd_get_screen_columns(void) return console_cols; } -static void lcd_drawchars(ushort x, ushort y, uchar *str, int count) +static void lcd_putc_xy(ushort x, ushort y, char c) { uchar *dest; ushort row; int fg_color, bg_color; + int i; dest = (uchar *)(lcd_console_address + y * lcd_line_length + x * NBITS(LCD_BPP) / 8); for (row = 0; row VIDEO_FONT_HEIGHT; ++row, dest += lcd_line_length) { - uchar *s = str; - int i; #if LCD_BPP == LCD_COLOR16 ushort *d = (ushort *)dest; #elif LCD_BPP == LCD_COLOR32 @@ -77,25 +76,17 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, int count) fg_color = lcd_getfgcolor(); bg_color = lcd_getbgcolor(); - for (i = 0; i count; ++i) { - uchar c, bits; - c = *s++; - bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row]; + uchar bits; + bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row]; - for (c = 0; c 8; ++c) { - *d++ = (bits 0x80) ? fg_color : bg_color; - bits = 1; - } + for (i = 0; i 8; ++i) { + *d++ = (bits 0x80) ? fg_color : bg_color; + bits = 1; } } } -static inline void lcd_putc_xy(ushort x, ushort y, uchar c) -{ - lcd_drawchars(x, y, c, 1); -} - static void console_scrollup(void) { const int rows = CONFIG_CONSOLE_SCROLL_LINES; -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/4] common/lcd_console: ask only one-time for bg/fg-color per call
From: Hannes Petermaier hannes.peterma...@br-automation.com Don't call the lcd_getfgcolor and lcd_getbgcolor within the draw-loop, this only wastes time. Signed-off-by: Hannes Petermaier hannes.peterma...@br-automation.com Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- Changes in v4: None Changes in v3: None Changes in v2: None common/lcd_console.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/lcd_console.c b/common/lcd_console.c index 243b7c5..b7dda7a 100644 --- a/common/lcd_console.c +++ b/common/lcd_console.c @@ -59,7 +59,8 @@ static void lcd_putc_xy(ushort x, ushort y, char c) { uchar *dest; ushort row; - int fg_color, bg_color; + int fg_color = lcd_getfgcolor(); + int bg_color = lcd_getbgcolor(); int i; dest = (uchar *)(lcd_console_address + @@ -73,10 +74,6 @@ static void lcd_putc_xy(ushort x, ushort y, char c) #else uchar *d = dest; #endif - - fg_color = lcd_getfgcolor(); - bg_color = lcd_getbgcolor(); - uchar bits; bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row]; -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 3/4] common/lcd_console: move single static variables into common (static) structure
From: Hannes Petermaier hannes.peterma...@br-automation.com For coming implementation of lcd_console rotation, we will need some more variables for holding information about framebuffer size, rotation, ... For better readability we catch all them into a common structure. Signed-off-by: Hannes Petermaier hannes.peterma...@br-automation.com Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- Changes in v4: None Changes in v3: None Changes in v2: None common/lcd_console.c | 76 +- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/common/lcd_console.c b/common/lcd_console.c index b7dda7a..cac77be 100644 --- a/common/lcd_console.c +++ b/common/lcd_console.c @@ -11,48 +11,49 @@ #include video_font.h/* Get font data, width and height */ #define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * lcd_line_length) -#define CONSOLE_ROW_FIRST lcd_console_address -#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * console_rows) +#define CONSOLE_ROW_FIRST cons.lcd_address +#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * cons.rows) -static short console_curr_col; -static short console_curr_row; -static short console_cols; -static short console_rows; -static void *lcd_console_address; +struct console_t { + short curr_col, curr_row; + short cols, rows; + void *lcd_address; +}; +static struct console_t cons; void lcd_init_console(void *address, int rows, int cols) { - console_curr_col = 0; - console_curr_row = 0; - console_cols = cols; - console_rows = rows; - lcd_console_address = address; + memset(cons, 0, sizeof(cons)); + cons.cols = cols; + cons.rows = rows; + cons.lcd_address = address; + } void lcd_set_col(short col) { - console_curr_col = col; + cons.curr_col = col; } void lcd_set_row(short row) { - console_curr_row = row; + cons.curr_row = row; } void lcd_position_cursor(unsigned col, unsigned row) { - console_curr_col = min_t(short, col, console_cols - 1); - console_curr_row = min_t(short, row, console_rows - 1); + cons.curr_col = min_t(short, col, cons.cols - 1); + cons.curr_row = min_t(short, row, cons.rows - 1); } int lcd_get_screen_rows(void) { - return console_rows; + return cons.rows; } int lcd_get_screen_columns(void) { - return console_cols; + return cons.cols; } static void lcd_putc_xy(ushort x, ushort y, char c) @@ -63,7 +64,7 @@ static void lcd_putc_xy(ushort x, ushort y, char c) int bg_color = lcd_getbgcolor(); int i; - dest = (uchar *)(lcd_console_address + + dest = (uchar *)(cons.lcd_address + y * lcd_line_length + x * NBITS(LCD_BPP) / 8); for (row = 0; row VIDEO_FONT_HEIGHT; ++row, dest += lcd_line_length) { @@ -91,7 +92,7 @@ static void console_scrollup(void) /* Copy up rows ignoring those that will be overwritten */ memcpy(CONSOLE_ROW_FIRST, - lcd_console_address + CONSOLE_ROW_SIZE * rows, + cons.lcd_address + CONSOLE_ROW_SIZE * rows, CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows); /* Clear the last rows */ @@ -99,7 +100,7 @@ static void console_scrollup(void) memset(lcd_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows, bg_color, CONSOLE_ROW_SIZE * rows); #else - u32 *ppix = lcd_console_address + + u32 *ppix = cons.lcd_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows; u32 i; for (i = 0; @@ -109,27 +110,27 @@ static void console_scrollup(void) } #endif lcd_sync(); - console_curr_row -= rows; + cons.curr_row -= rows; } static inline void console_back(void) { - if (--console_curr_col 0) { - console_curr_col = console_cols - 1; - if (--console_curr_row 0) - console_curr_row = 0; + if (--cons.curr_col 0) { + cons.curr_col = cons.cols - 1; + if (--cons.curr_row 0) + cons.curr_row = 0; } - lcd_putc_xy(console_curr_col * VIDEO_FONT_WIDTH, - console_curr_row * VIDEO_FONT_HEIGHT, ' '); + lcd_putc_xy(cons.curr_col * VIDEO_FONT_WIDTH, + cons.curr_row * VIDEO_FONT_HEIGHT, ' '); } static inline void console_newline(void) { - console_curr_col = 0; + cons.curr_col = 0; /* Check if we need to scroll the terminal */ - if (++console_curr_row = console_rows) + if (++cons.curr_row = cons.rows) console_scrollup(); else lcd_sync(); @@ -145,18 +146,17 @@ void lcd_putc(const char c) switch (c) { case '\r': - console_curr_col = 0; - + cons.curr_col = 0; return; case '\n':
[U-Boot] [PATCH v2 3/4] ARM: atmel: at91sam9x5ek: enable spl support
Enable SPL support for at91sam9x5ek board. Now, it supports boot up from NAND flash and SPI flash. Signed-off-by: Bo Shen voice.s...@atmel.com --- Changes in v2: - Remove the meaningless prefix +S: in configuration file. arch/arm/mach-at91/Kconfig | 1 + arch/arm/mach-at91/Makefile | 1 + arch/arm/mach-at91/include/mach/at91_pmc.h | 6 ++- arch/arm/mach-at91/include/mach/at91sam9x5.h | 10 arch/arm/mach-at91/mpddrc.c | 3 +- arch/arm/mach-at91/spl.c | 2 +- arch/arm/mach-at91/spl_at91.c| 5 ++ board/atmel/at91sam9x5ek/at91sam9x5ek.c | 74 configs/at91sam9x5ek_nandflash_defconfig | 1 + configs/at91sam9x5ek_spiflash_defconfig | 1 + include/configs/at91sam9x5ek.h | 57 + 11 files changed, 157 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 25da926..bdf87f9 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -83,6 +83,7 @@ config TARGET_AT91SAM9RLEK config TARGET_AT91SAM9X5EK bool Atmel AT91SAM9X5-EK board select CPU_ARM926EJS + select SUPPORT_SPL config TARGET_SAMA5D3_XPLAINED bool SAMA5D3 Xplained board diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index e596ba6..ba83616 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_AT91_WANTS_COMMON_PHY) += phy.o ifneq ($(CONFIG_SPL_BUILD),) obj-$(CONFIG_AT91SAM9G20) += sdram.o spl_at91.o obj-$(CONFIG_AT91SAM9M10G45) += mpddrc.o spl_at91.o +obj-$(CONFIG_AT91SAM9X5) += mpddrc.o spl_at91.o obj-$(CONFIG_SAMA5D3) += mpddrc.o spl_atmel.o obj-$(CONFIG_SAMA5D4) += mpddrc.o spl_atmel.o obj-y += spl.o diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index 65691ab..c903260 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h @@ -97,7 +97,8 @@ typedef struct at91_pmc { #define AT91_PMC_MCKR_CSS_PLLB 0x0003 #define AT91_PMC_MCKR_CSS_MASK 0x0003 -#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) +#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) || \ + defined(CONFIG_AT91SAM9X5) #define AT91_PMC_MCKR_PRES_1 0x #define AT91_PMC_MCKR_PRES_2 0x0010 #define AT91_PMC_MCKR_PRES_4 0x0020 @@ -126,7 +127,8 @@ typedef struct at91_pmc { #else #define AT91_PMC_MCKR_MDIV_1 0x #define AT91_PMC_MCKR_MDIV_2 0x0100 -#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) +#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) || \ + defined(CONFIG_AT91SAM9X5) #define AT91_PMC_MCKR_MDIV_3 0x0300 #endif #define AT91_PMC_MCKR_MDIV_4 0x0200 diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h index 36a5cdf..d18c936 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9x5.h +++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h @@ -124,6 +124,16 @@ #define ATMEL_BASE_EHCI0x0070 /* USB Host controller (EHCI) */ #endif +/* + * External memory + */ +#define ATMEL_BASE_CS0 0x1000 +#define ATMEL_BASE_CS1 0x2000 +#define ATMEL_BASE_CS2 0x3000 +#define ATMEL_BASE_CS3 0x4000 +#define ATMEL_BASE_CS4 0x5000 +#define ATMEL_BASE_CS5 0x6000 + /* 9x5 series chip id definitions */ #define ARCH_ID_AT91SAM9X5 0x819a05a0 #define ARCH_ID_VERSION_MASK 0x1f diff --git a/arch/arm/mach-at91/mpddrc.c b/arch/arm/mach-at91/mpddrc.c index beec13d..24d5fcd 100644 --- a/arch/arm/mach-at91/mpddrc.c +++ b/arch/arm/mach-at91/mpddrc.c @@ -19,7 +19,8 @@ static inline void atmel_mpddr_op(int mode, u32 ram_address) static int ddr2_decodtype_is_seq(u32 cr) { -#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) +#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4) || \ + defined(CONFIG_AT91SAM9X5) if (cr ATMEL_MPDDRC_CR_DECOD_INTERLEAVED) return 0; #endif diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c index aaa5eec..27a405a 100644 --- a/arch/arm/mach-at91/spl.c +++ b/arch/arm/mach-at91/spl.c @@ -29,7 +29,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_MMC1; #elif CONFIG_SYS_USE_NANDFLASH return BOOT_DEVICE_NAND; -#elif CONFIG_SYS_USE_SERIALFLASH +#elif CONFIG_SYS_USE_SERIALFLASH || CONFIG_SYS_USE_SPIFLASH return BOOT_DEVICE_SPI; #endif return BOOT_DEVICE_NONE; diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index af6fc0d..e28e568 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -115,9 +115,14 @@ void board_init_f(ulong dummy) timer_init(); /* enable clocks for all PIOs */
[U-Boot] [PATCH v2 0/4] ARM: atmel: boards: enable SPL support
This patch series enable SPL support for following boards: - at91sam9m10g45ek - NAND flash boot support - SD card boot support - at91sam9n12ek - NAND flash boot support - SPI flash boot support - at91sam9x5ek - NAND flash boot support - SPI flash boot support Changes in v2: - Remove the meaningless prefix +S: in configuration file. Bo Shen (4): ARM: atmel: arm926ejs: fix clock configuration ARM: atmel: at91sam9m10g45ek: enable spl support ARM: atmel: at91sam9x5ek: enable spl support ARM: atmel: at91sam9n12ek: enable spl support arch/arm/mach-at91/Kconfig | 3 + arch/arm/mach-at91/Makefile | 2 + arch/arm/mach-at91/arm926ejs/clock.c| 54 + arch/arm/mach-at91/arm926ejs/u-boot-spl.lds | 48 +++ arch/arm/mach-at91/include/mach/at91_pmc.h | 6 +- arch/arm/mach-at91/include/mach/at91sam9x5.h| 10 arch/arm/mach-at91/mpddrc.c | 3 +- arch/arm/mach-at91/spl.c| 2 +- arch/arm/mach-at91/spl_at91.c | 11 +++- board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 80 + board/atmel/at91sam9n12ek/at91sam9n12ek.c | 73 ++ board/atmel/at91sam9x5ek/at91sam9x5ek.c | 74 +++ configs/at91sam9m10g45ek_mmc_defconfig | 1 + configs/at91sam9m10g45ek_nandflash_defconfig| 1 + configs/at91sam9n12ek_nandflash_defconfig | 1 + configs/at91sam9n12ek_spiflash_defconfig| 1 + configs/at91sam9x5ek_nandflash_defconfig| 1 + configs/at91sam9x5ek_spiflash_defconfig | 1 + include/configs/at91sam9m10g45ek.h | 58 ++ include/configs/at91sam9n12ek.h | 58 +- include/configs/at91sam9x5ek.h | 57 ++ 21 files changed, 513 insertions(+), 32 deletions(-) create mode 100644 arch/arm/mach-at91/arm926ejs/u-boot-spl.lds -- 2.3.3.220.g9ab698f ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/board_f: move board_init_f_mem() from #else CONFIG_X86
Hi Simon, Tom, On Tue, 2015-03-24 at 11:12 +0300, Alexey Brodkin wrote: Purpose of this change is to make it possible to re-use code currently used on X86 solely for other architectures. For example: * init_sequence_f_r * board_init_f_r Even though board_init_f_mem() has nothing to do with any particular architecture it won't work (at least in current implementation) for X86. This is because on X86 gd is an alias to function get_fs_gd_ptr(), thus we cannot assign anything to it. So this change separates selection of board_init_f_mem() from X86 while keeping it disabled for X86 still. Signed-off-by: Alexey Brodkin abrod...@synopsys.com Cc: Simon Glass s...@chromium.org Cc: Tom Rini tr...@konsulko.com If there're no objections on this one could it be applied? This patch is a pre-requisite for ARC-update series, in particular for this patch - http://patchwork.ozlabs.org/patch/450963/ -Alexey ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] m68k: 3 boards are broken
Hi Alison, Angelo I found 3 m68k boards are broken: eb_cpu5282_defconfig eb_cpu5282_internal_defconfig M53017EVB_defconfig LD u-boot common/built-in.o: In function `reserve_video': /home/yamada/workspace/u-boot/common/board_f.c:501: undefined reference to `video_setmem' make: *** [u-boot] Error 1 Can you figure it out, please? -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] powerpc/t2080rdb: update ddr to support 1866MT/s
Support SODIMM D3XP12081XL10AA 1866MT/s on T2080RDB. Enable CONFIG_CMD_MEMTEST as well. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- v2: refined commit description. board/freescale/t208xrdb/ddr.h | 4 ++-- include/configs/T208xRDB.h | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/board/freescale/t208xrdb/ddr.h b/board/freescale/t208xrdb/ddr.h index b6d4062..08cbb60 100644 --- a/board/freescale/t208xrdb/ddr.h +++ b/board/freescale/t208xrdb/ddr.h @@ -32,12 +32,12 @@ static const struct board_specific_parameters udimm0[] = { {2, 1500, 2, 5, 6, 0x07070809, 0x0a0b0b09}, {2, 1600, 2, 5, 8, 0x0808070b, 0x0c0d0e0a}, {2, 1700, 2, 4, 7, 0x080a0a0c, 0x0c0d0e0a}, - {2, 1900, 2, 5, 9, 0x0a0b0c0e, 0x0f10120c}, + {2, 1900, 0, 5, 7, 0x0808080c, 0x0b0c0c09}, {1, 1200, 2, 5, 7, 0x0808090a, 0x0b0c0c0a}, {1, 1500, 2, 5, 6, 0x07070809, 0x0a0b0b09}, {1, 1600, 2, 5, 8, 0x0808070b, 0x0c0d0e0a}, {1, 1700, 2, 4, 7, 0x080a0a0c, 0x0c0d0e0a}, - {1, 1900, 2, 5, 9, 0x0a0b0c0e, 0x0f10120c}, + {1, 1900, 0, 5, 7, 0x0808080c, 0x0b0c0c09}, {} }; diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 81bc51c..73b8d88 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -140,6 +140,11 @@ #define CONFIG_MEM_INIT_VALUE 0xdeadbeef #endif +#define CONFIG_CMD_MEMTEST +#define CONFIG_SYS_MEMTEST_START 0x0020 /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END 0x0040 +#define CONFIG_SYS_ALT_MEMTEST + #ifndef CONFIG_SYS_NO_FLASH #define CONFIG_FLASH_CFI_DRIVER #define CONFIG_SYS_FLASH_CFI -- 2.1.0.27.g96db324 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 4/4] common/lcd_console: introduce display/framebuffer rotation
From: Hannes Petermaier hannes.peterma...@br-automation.com Sometimes, for example if the display is mounted in portrait mode or even if it mounted landscape but rotated by 180 degrees, we need to rotate our content of the display respectively the framebuffer, so that user can read the messages who are printed out. For this we introduce the feature called CONFIG_LCD_ROTATION, this may be defined in the board-configuration if needed. After this the lcd_console will be initialized with a given rotation from vl_rot out of vidinfo_t which is provided by the board specific code. If CONFIG_LCD_ROTATION is not defined, the console will be initialized with 0 degrees rotation. Signed-off-by: Hannes Petermaier hannes.peterma...@br-automation.com Signed-off-by: Hannes Petermaier oe5...@oevsv.at --- Changes in v4: - cosmetic changes to README - avoid code-duplication (reuse console_calc_rowcol within rotation code). Changes in v3: - rename lcd_address to fbbase for better readability. - remove empty line lcd_console.c - use printf instead puts to inform about invalid-fb rotation. - avoid code-duplication (move define of fbptr_t into lcd.h) Changes in v2: - cleanup README text for feature - don't make code cleanups (lcd_console.c) within this patch - remove (unnary) comment in lcd_console.h - update year to 2015 within copyright in lcd_console.c - move rotation related code into separate file lcd_console_rotation.c - rework rotation code - change meaning of vl_rot to match fbcon=rotate:n from the linux-kernel README| 20 + common/Makefile |1 + common/lcd.c | 15 ++-- common/lcd_console.c | 160 ++--- common/lcd_console_rotation.c | 195 + include/lcd.h |9 ++ include/lcd_console.h | 28 +- 7 files changed, 344 insertions(+), 84 deletions(-) create mode 100644 common/lcd_console_rotation.c diff --git a/README b/README index b0124d6..317c380 100644 --- a/README +++ b/README @@ -1947,6 +1947,26 @@ CBFS (Coreboot Filesystem) support the console jump but can help speed up operation when scrolling is slow. + CONFIG_LCD_ROTATION + + Sometimes, for example if the display is mounted in portrait + mode or even if it's mounted landscape but rotated by 180degree, + we need to rotate our content of the display relative to the + framebuffer, so that user can read the messages which are + printed out. + Once CONFIG_LCD_ROTATION is defined, the lcd_console will be + initialized with a given rotation from vl_rot out of + vidinfo_t which is provided by the board specific code. + The value for vl_rot is coded as following (matching to + fbcon=rotate:n linux-kernel commandline): + 0 = no rotation respectively 0 degree + 1 = 90 degree rotation + 2 = 180 degree rotation + 3 = 270 degree rotation + + If CONFIG_LCD_ROTATION is not defined, the console will be + initialized with 0degree rotation. + CONFIG_LCD_BMP_RLE8 Support drawing of RLE8-compressed bitmaps on the LCD. diff --git a/common/Makefile b/common/Makefile index 7216a13..a1b3c09 100644 --- a/common/Makefile +++ b/common/Makefile @@ -200,6 +200,7 @@ obj-$(CONFIG_KALLSYMS) += kallsyms.o obj-y += splash.o obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o obj-$(CONFIG_LCD) += lcd.o lcd_console.o +obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o obj-$(CONFIG_LYNXKDI) += lynxkdi.o obj-$(CONFIG_MENU) += menu.o diff --git a/common/lcd.c b/common/lcd.c index f33942c..d1b4ca7 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -167,7 +167,6 @@ int drv_lcd_init(void) void lcd_clear(void) { - short console_rows, console_cols; int bg_color; char *s; ulong addr; @@ -211,16 +210,14 @@ void lcd_clear(void) } #endif #endif + /* setup text-console */ + debug([LCD] setting up console...\n); + lcd_init_console(lcd_base, +panel_info.vl_col, +panel_info.vl_row, +panel_info.vl_rot); /* Paint the logo and retrieve LCD base address */ debug([LCD] Drawing the logo...\n); -#if defined(CONFIG_LCD_LOGO) !defined(CONFIG_LCD_INFO_BELOW_LOGO) - console_rows = (panel_info.vl_row - BMP_LOGO_HEIGHT); - console_rows /= VIDEO_FONT_HEIGHT; -#else - console_rows = panel_info.vl_row / VIDEO_FONT_HEIGHT; -#endif - console_cols = panel_info.vl_col / VIDEO_FONT_WIDTH; - lcd_init_console(lcd_base, console_rows, console_cols); if (do_splash) { s = getenv(splashimage);
[U-Boot] [PATCH v4 0/4] common/lcd_console: introduce display/framebuffer rotation
Sometimes, for example if the display is mounted in portrait mode or even if it mounted landscape but rotated by 180 degree, we need to rotate our content of the display respectively the framebuffer, so that user can read the messages who are printed out. For this we introduce the feature called CONFIG_LCD_ROTATION, this may be defined in the board-configuration if needed. After this the lcd_console will be initialized with a given rotation from vl_rot out of vidinfo_t which is provided by the board specific code. The value for vl_rot is coded as following (matching to fbcon=rotate:n linux- kernel commandline): 0 = no rotation respectively 0 degree 1 = 90 degree rotation 2 = 180 degree rotation 3 = 270 degree rotation If CONFIG_LCD_ROTATION is not defined, the console will be initialized with 0 degrees rotation. Patch 1-3 make preparations to the code. Patch 4 implements the new feature Changes in v4: - cosmetic changes to README - avoid code-duplication (reuse console_calc_rowcol within rotation code). Changes in v3: - rename lcd_address to fbbase for better readability. - remove empty line lcd_console.c - use printf instead puts to inform about invalid-fb rotation. - avoid code-duplication (move define of fbptr_t into lcd.h) Changes in v2: - cleanup README text for feature - don't make code cleanups (lcd_console.c) within this patch - remove (unnary) comment in lcd_console.h - update year to 2015 within copyright in lcd_console.c - move rotation related code into separate file lcd_console_rotation.c - rework rotation code - change meaning of vl_rot to match fbcon=rotate:n from the linux-kernel Hannes Petermaier (4): common/lcd_console: cleanup lcd_drawchars/lcd_putc_xy common/lcd_console: ask only one-time for bg/fg-color per call common/lcd_console: move single static variables into common (static) structure common/lcd_console: introduce display/framebuffer rotation README| 20 + common/Makefile |1 + common/lcd.c | 15 ++-- common/lcd_console.c | 200 + common/lcd_console_rotation.c | 195 include/lcd.h |9 ++ include/lcd_console.h | 28 +- 7 files changed, 358 insertions(+), 110 deletions(-) create mode 100644 common/lcd_console_rotation.c -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] serial atag tag in devicetree ?
Hi, On 27-03-15 05:30, Rob Herring wrote: On Thu, Mar 26, 2015 at 4:11 AM, Paul Kocialkowski cont...@paulk.fr wrote: Le jeudi 26 mars 2015 à 09:53 +0100, Hans de Goede a écrit : Hi, On 25-03-15 23:35, Paul Kocialkowski wrote: Le mardi 24 mars 2015 à 09:01 +0100, Hans de Goede a écrit : Hi, On 24-03-15 00:12, Rob Herring wrote: On Mon, Mar 23, 2015 at 6:30 AM, Hans de Goede hdego...@redhat.com wrote: Hi, On 22-03-15 22:01, Rob Herring wrote: snip There is already serial-number (a string) which exists for OpenFirmware. Also, copyright corresponds to vendor/manufacturer string. Both of these are supported by lshw already. Ok, so if I understand you correctly then you're saying that we should set a serial-number string property at the dt root level and that this may contain pretty much anything, e.g. in the sunxi case the full 128 bit SID in hex. Right. Is the use of the serial-number string property already documented somewhere? If not I'll submit a kernel patch to document it. Not that I'm aware of. It is something that predates our documentation requirements. It could be in OpenFirmware specs. Documenting it in the DT bindings does not hurt. Ok. And for older kernels we should not set any serial atag (u-boot always sets it, so this leaves it at 0) and old kernel users are out of luck wrt getting to the serial ? If there is sufficient reason to support this on old kernels you could. One problem with supporting this for older kernels is that if a non 0 serial gets shown in /proc/cpuinfo with older atag booted kernels, we should really show the same number in /proc/cpuinfo which means adding code to the kernel to get the devicetree serial-number string property and somehow put that into the 64 bits which we have in /proc/cpuinfo, but given that the serial-number string could be hex or decimal or what ever and 64 bits that will likely require a platform specific solution. All doable, but the question then becomes is this worth the effort ? After investigating a bit more, I found out that the USB serial number is expected to be a string of 32 bytes, so a 128 bit numeric serial doesn't fit (it takes 32 bytes for the hex representation of 128 bits, so there is no room left for the terminating null byte), hence it makes sense to keep a 64 bit limitation for the serial number, if users are going to rely on it as USB serial string. Moreover, it seems that Android devices are mostly used 64 bit numbers for serial numbers/ I was initially going to suggest that we set it in stone that serial must be 64 numeric bits (as it was in the ATAGs days) and that bootloaders would pass it that way to the kernel through device tree (with two 32 bits numeric integers), but Hans talked me out of it. I just want to expose the situation (especially the USB and Android thing) here to double-check that everyone still is convinced that a string approach in device tree is best (which is fine with me). There are already existing users of the serial-number property in devicetree, and these already use a free-format string, so AFAICT we have no choice but to do the same as the existing users. But Rob is the expert here, so lets see what Rob has to say. This way, users that still want to use the serial passed through device tree as a USB serial number will have to use a string of 32 bits, including the null terminating byte (which is what I'll suggest for sunxi by using only 64 bits for the serial number). Also, I suggest that we show that serial-number string as-is in cpuinfo as well We cannot do that because we must guarantee that the serial shown in cpu info is a 64 bits / 16 hex values (0 padded) number, anything else would break the kernel - userspace API and potentially break userspace apps. So we must do the devicetree - serialnumber low/high - /proc/cpinfo version to guarantee that this format does not change. And as discussed before if you want a non 0 serial in cpuinfo then the devicetree - serialnumber low/high should be done in sunxi specific kernel code, as on sunxi we will know that the string in devicetree will be a hex value, but we've no such guarantee for other platforms, so we cannot simply have a generic function to populate erialnumber low/high from the devicetree serial-number string. and instead make a string out of the serial ATAG in the kernel prior to showing it in cpuinfo (as opposed to translating the string coming from device tree to a numeric value that cpuinfo will end up showing as a string at the end of the day). Thus, the serial number coming from device tree will still be shown in cpuinfo as well and no ABI gets broken. You're forgetting the userspace - kernel ABI here, the serial line in /proc/cpuinfo is not a free form string it is a 64 bit int shown as 0 padded hex, and we cannot change that as changing that would be an ABI break. IMHO this really is all about interpretation. If you consider that the serial is already a *string* and not a
Re: [U-Boot] Adding support for red pitaya zynq board; is zynq working?
Hi, On 03/27/2015 11:58 AM, Jeremy Herbert wrote: Hi Michal, Yes, it's a shame that the software is lagging so far behind, as it is an interesting board for DSP experiments. yes - it is quite interesting board. I will work on this next week. Could you please tell me what you mean by revup? Do you mean I should use vivado to generate an updated DTS for the board? You have some options - update hw design to the latest vivado and use the latest DTG. Or just use the latest zynq-7000,dtsi from the kernel and add difference for this board. My expectation is that we will switch u-boot to be fully dtb driven till the end of this year. Keep in your mind that it was agreed that only fixed part description should be available in open source projects. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] serial atag tag in devicetree ?
Le jeudi 26 mars 2015 à 23:30 -0500, Rob Herring a écrit : On Thu, Mar 26, 2015 at 4:11 AM, Paul Kocialkowski cont...@paulk.fr wrote: Le jeudi 26 mars 2015 à 09:53 +0100, Hans de Goede a écrit : Hi, On 25-03-15 23:35, Paul Kocialkowski wrote: Le mardi 24 mars 2015 à 09:01 +0100, Hans de Goede a écrit : Hi, On 24-03-15 00:12, Rob Herring wrote: On Mon, Mar 23, 2015 at 6:30 AM, Hans de Goede hdego...@redhat.com wrote: Hi, On 22-03-15 22:01, Rob Herring wrote: snip There is already serial-number (a string) which exists for OpenFirmware. Also, copyright corresponds to vendor/manufacturer string. Both of these are supported by lshw already. Ok, so if I understand you correctly then you're saying that we should set a serial-number string property at the dt root level and that this may contain pretty much anything, e.g. in the sunxi case the full 128 bit SID in hex. Right. Is the use of the serial-number string property already documented somewhere? If not I'll submit a kernel patch to document it. Not that I'm aware of. It is something that predates our documentation requirements. It could be in OpenFirmware specs. Documenting it in the DT bindings does not hurt. Ok. And for older kernels we should not set any serial atag (u-boot always sets it, so this leaves it at 0) and old kernel users are out of luck wrt getting to the serial ? If there is sufficient reason to support this on old kernels you could. One problem with supporting this for older kernels is that if a non 0 serial gets shown in /proc/cpuinfo with older atag booted kernels, we should really show the same number in /proc/cpuinfo which means adding code to the kernel to get the devicetree serial-number string property and somehow put that into the 64 bits which we have in /proc/cpuinfo, but given that the serial-number string could be hex or decimal or what ever and 64 bits that will likely require a platform specific solution. All doable, but the question then becomes is this worth the effort ? After investigating a bit more, I found out that the USB serial number is expected to be a string of 32 bytes, so a 128 bit numeric serial doesn't fit (it takes 32 bytes for the hex representation of 128 bits, so there is no room left for the terminating null byte), hence it makes sense to keep a 64 bit limitation for the serial number, if users are going to rely on it as USB serial string. Moreover, it seems that Android devices are mostly used 64 bit numbers for serial numbers/ I was initially going to suggest that we set it in stone that serial must be 64 numeric bits (as it was in the ATAGs days) and that bootloaders would pass it that way to the kernel through device tree (with two 32 bits numeric integers), but Hans talked me out of it. I just want to expose the situation (especially the USB and Android thing) here to double-check that everyone still is convinced that a string approach in device tree is best (which is fine with me). There are already existing users of the serial-number property in devicetree, and these already use a free-format string, so AFAICT we have no choice but to do the same as the existing users. But Rob is the expert here, so lets see what Rob has to say. This way, users that still want to use the serial passed through device tree as a USB serial number will have to use a string of 32 bits, including the null terminating byte (which is what I'll suggest for sunxi by using only 64 bits for the serial number). Also, I suggest that we show that serial-number string as-is in cpuinfo as well We cannot do that because we must guarantee that the serial shown in cpu info is a 64 bits / 16 hex values (0 padded) number, anything else would break the kernel - userspace API and potentially break userspace apps. So we must do the devicetree - serialnumber low/high - /proc/cpinfo version to guarantee that this format does not change. And as discussed before if you want a non 0 serial in cpuinfo then the devicetree - serialnumber low/high should be done in sunxi specific kernel code, as on sunxi we will know that the string in devicetree will be a hex value, but we've no such guarantee for other platforms, so we cannot simply have a generic function to populate erialnumber low/high from the devicetree serial-number string. and instead make a string out of the serial ATAG in the kernel prior to showing it in cpuinfo (as opposed to translating the string coming from device tree to a numeric value that cpuinfo will end up showing as a string at the end of the day). Thus, the serial number coming from device tree will still be shown in cpuinfo as well and no ABI gets broken. You're forgetting the userspace - kernel ABI here, the serial line in
Re: [U-Boot] Adding support for red pitaya zynq board; is zynq working?
Hi Michal, Yes, it's a shame that the software is lagging so far behind, as it is an interesting board for DSP experiments. I will work on this next week. Could you please tell me what you mean by revup? Do you mean I should use vivado to generate an updated DTS for the board? Thanks, Jeremy On Fri, 27 Mar 2015 at 18:15 Michal Simek mon...@monstr.eu wrote: Hi Jeremy, First of all please send the patch via git send-email command. On 03/26/2015 10:08 AM, Jeremy Herbert wrote: Hi all, I just tried to build the latest master mainline u-boot for a xilinx zynq 7010 board called the red pitaya. I'm not affiliated at all with the board, just trying to use it with a recent version of u-boot (and linux). Unfortunately it gets stuck in a reset loop (I wasn't able to nail down why, but it was definitely something in u-boot). However, I was able to successfully build u-boot using the xilinx fork here: https://github.com/Xilinx/u-boot-xlnx and have it work fine. Interesting board - have to get a sample to be able to play with. I've attached the patch I made to add minimal support for the red pitaya (SD boot only, no ethernet as it uses an unsupported lantiq chipset). It is the policy of the xilinx u-boot fork that board support should be pushed straight upstream, but I'm not sure if this is the right place seeing as the upstream version doesn't currently work. Could someone please give me some advice on what to do with this patch? The reason why upstream version is not working for you is that you are probably running version without DTB that's why it is not initialized properly. It means you should load u-boot-dtb.bin instead. XMD script for example connect arm hw -debugdevice cpunr 1 dow -data u-boot-dtb.bin 0x400 rwr pc 0x400 con exit Then everything should just run correctly. I have briefly looked at the code and the whole red pitaya code needs to be updated because it is pretty ancient old. For pushing this to mainline you should revup DTB which targets 14.6 version which is pretty old too. That's why update to the latestgreatest needs to be done. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/8] m68k: stop grepping and refactor CPU flags
arch/m68k/cpu/mcf52x2/config.mk arch/m68k/cpu/mcf530x/config.mk arch/m68k/cpu/mcf532x/config.mk are not very nice. They use grep to decide the CPU type. They can be tidied up by moving the CPU type CONFIGs to Kconfig. I built all the M68k boards and compared MD5SUM for each of them. I confirmed this series still produces the same output binaries. Masahiro Yamada (8): m68k: mcf52x2: move CPU type to Kconfig and refactor config.mk m68k: mcf530x: move CPU type to Kconfig and refactor config.mk m68k: mcf532x: move CPU type to Kconfig and refactor config.mk m68k: mcf5445x: move CPU type to Kconfig and refactor config.mk m68k: mcf5227x: move CPU type to Kconfig and refactor config.mk m68k: mcf523x: move CPU type to Kconfig and refactor config.mk m68k: mcf547x_8x: move CPU type to Kconfig and refactor config.mk m68k: merge per-CPU config.mk into arch/m68k/Makefile arch/m68k/Kconfig | 129 + arch/m68k/Makefile | 29 + arch/m68k/cpu/mcf5227x/config.mk | 10 --- arch/m68k/cpu/mcf523x/config.mk| 10 --- arch/m68k/cpu/mcf52x2/config.mk| 39 --- arch/m68k/cpu/mcf530x/config.mk| 12 arch/m68k/cpu/mcf532x/config.mk| 19 -- arch/m68k/cpu/mcf5445x/config.mk | 25 --- arch/m68k/cpu/mcf547x_8x/config.mk | 16 - include/configs/M5208EVBE.h| 3 - include/configs/M52277EVB.h| 2 - include/configs/M5235EVB.h | 2 - include/configs/M5249EVB.h | 3 - include/configs/M5253DEMO.h| 2 - include/configs/M5253EVBE.h| 2 - include/configs/M5272C3.h | 3 - include/configs/M5275EVB.h | 2 - include/configs/M5282EVB.h | 3 - include/configs/M53017EVB.h| 2 - include/configs/M5329EVB.h | 2 - include/configs/M5373EVB.h | 2 - include/configs/M54418TWR.h| 2 - include/configs/M54451EVB.h| 2 - include/configs/M54455EVB.h| 2 - include/configs/M5475EVB.h | 3 - include/configs/M5485EVB.h | 3 - include/configs/amcore.h | 3 - include/configs/astro_mcf5373l.h | 10 --- include/configs/cobra5272.h| 10 --- include/configs/eb_cpu5282.h | 3 - 30 files changed, 158 insertions(+), 197 deletions(-) delete mode 100644 arch/m68k/cpu/mcf5227x/config.mk delete mode 100644 arch/m68k/cpu/mcf523x/config.mk delete mode 100644 arch/m68k/cpu/mcf52x2/config.mk delete mode 100644 arch/m68k/cpu/mcf530x/config.mk delete mode 100644 arch/m68k/cpu/mcf532x/config.mk delete mode 100644 arch/m68k/cpu/mcf5445x/config.mk delete mode 100644 arch/m68k/cpu/mcf547x_8x/config.mk -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/8] m68k: mcf530x: move CPU type to Kconfig and refactor config.mk
This commit intends to stop grepping CPU type in arch/m68k/cpu/mcf530x/config.mk. Move the CPU type config options from include/configs/amcore.h to arch/m68k/Kconfig and refactor the CPU flags select in arch/m68k/cpu/mcf530x/config.mk. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Kconfig | 8 arch/m68k/cpu/mcf530x/config.mk | 7 ++- include/configs/amcore.h| 3 --- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 0bd780a..8f9b4a7 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -11,6 +11,9 @@ config MCF520x config MCF52x2 bool +config MCF530x + bool + # processor type config M5208 bool @@ -40,6 +43,10 @@ config M5282 bool select MCF52x2 +config M5307 + bool + select MCF530x + choice prompt Target select @@ -114,6 +121,7 @@ config TARGET_M5485EVB config TARGET_AMCORE bool Support AMCORE + select M5307 endchoice diff --git a/arch/m68k/cpu/mcf530x/config.mk b/arch/m68k/cpu/mcf530x/config.mk index aef72d7..25845aa 100644 --- a/arch/m68k/cpu/mcf530x/config.mk +++ b/arch/m68k/cpu/mcf530x/config.mk @@ -4,9 +4,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:%=%).h -is5307:=$(shell grep CONFIG_M5307 $(cfg)) +cpuflags-$(CONFIG_M5307) := -mcpu=5307 -ifneq (,$(findstring CONFIG_M5307,$(is5307))) -PLATFORM_CPPFLAGS += -mcpu=5307 -endif +PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/include/configs/amcore.h b/include/configs/amcore.h index 37aa124..229fa5a 100644 --- a/include/configs/amcore.h +++ b/include/configs/amcore.h @@ -12,9 +12,6 @@ #define CONFIG_AMCORE #define CONFIG_HOSTNAMEAMCORE -#define CONFIG_MCF530x -#define CONFIG_M5307 - #define CONFIG_MCFTMR #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT 0 -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/8] m68k: mcf52x2: move CPU type to Kconfig and refactor config.mk
This commit intends to stop grepping CPU type in arch/m68k/cpu/mcf52x2/config.mk. Move the CPU type config options from include/configs/*.h to arch/m68k/Kconfig and refactor the CPU flags select in arch/m68k/cpu/mcf52x2/config.mk. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Kconfig | 45 + arch/m68k/cpu/mcf52x2/config.mk | 37 - include/configs/M5208EVBE.h | 3 --- include/configs/M5249EVB.h | 3 --- include/configs/M5253DEMO.h | 2 -- include/configs/M5253EVBE.h | 2 -- include/configs/M5272C3.h | 3 --- include/configs/M5275EVB.h | 2 -- include/configs/M5282EVB.h | 3 --- include/configs/cobra5272.h | 10 - include/configs/eb_cpu5282.h| 3 --- 11 files changed, 53 insertions(+), 60 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 53c4aab..0bd780a 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -4,6 +4,42 @@ menu M68000 architecture config SYS_ARCH default m68k +# processor family +config MCF520x + bool + +config MCF52x2 + bool + +# processor type +config M5208 + bool + select MCF520x + +config M5249 + bool + select MCF52x2 + +config M5253 + bool + select MCF52x2 + +config M5271 + bool + select MCF52x2 + +config M5272 + bool + select MCF52x2 + +config M5275 + bool + select MCF52x2 + +config M5282 + bool + select MCF52x2 + choice prompt Target select @@ -15,30 +51,39 @@ config TARGET_M5235EVB config TARGET_COBRA5272 bool Support cobra5272 + select M5272 config TARGET_EB_CPU5282 bool Support eb_cpu5282 + select M5282 config TARGET_M5208EVBE bool Support M5208EVBE + select M5208 config TARGET_M5249EVB bool Support M5249EVB + select M5249 config TARGET_M5253DEMO bool Support M5253DEMO + select M5253 config TARGET_M5253EVBE bool Support M5253EVBE + select M5253 config TARGET_M5272C3 bool Support M5272C3 + select M5272 config TARGET_M5275EVB bool Support M5275EVB + select M5275 config TARGET_M5282EVB bool Support M5282EVB + select M5282 config TARGET_ASTRO_MCF5373L bool Support astro_mcf5373l diff --git a/arch/m68k/cpu/mcf52x2/config.mk b/arch/m68k/cpu/mcf52x2/config.mk index f66000b..f8fdefd 100644 --- a/arch/m68k/cpu/mcf52x2/config.mk +++ b/arch/m68k/cpu/mcf52x2/config.mk @@ -7,33 +7,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:%=%).h -is5208:=$(shell grep CONFIG_M5208 $(cfg)) -is5249:=$(shell grep CONFIG_M5249 $(cfg)) -is5253:=$(shell grep CONFIG_M5253 $(cfg)) -is5271:=$(shell grep CONFIG_M5271 $(cfg)) -is5272:=$(shell grep CONFIG_M5272 $(cfg)) -is5275:=$(shell grep CONFIG_M5275 $(cfg)) -is5282:=$(shell grep CONFIG_M5282 $(cfg)) +cpuflags-$(CONFIG_M5208) := -mcpu=5208 +cpuflags-$(CONFIG_M5249) := -mcpu=5249 +cpuflags-$(CONFIG_M5253) := -mcpu=5253 +cpuflags-$(CONFIG_M5271) := -mcpu=5271 +cpuflags-$(CONFIG_M5272) := -mcpu=5272 +cpuflags-$(CONFIG_M5275) := -mcpu=5275 +cpuflags-$(CONFIG_M5282) := -mcpu=5282 -ifneq (,$(findstring CONFIG_M5208,$(is5208))) -PLATFORM_CPPFLAGS += -mcpu=5208 -endif -ifneq (,$(findstring CONFIG_M5249,$(is5249))) -PLATFORM_CPPFLAGS += -mcpu=5249 -endif -ifneq (,$(findstring CONFIG_M5253,$(is5253))) -PLATFORM_CPPFLAGS += -mcpu=5253 -endif -ifneq (,$(findstring CONFIG_M5271,$(is5271))) -PLATFORM_CPPFLAGS += -mcpu=5271 -endif -ifneq (,$(findstring CONFIG_M5272,$(is5272))) -PLATFORM_CPPFLAGS += -mcpu=5272 -endif -ifneq (,$(findstring CONFIG_M5275,$(is5275))) -PLATFORM_CPPFLAGS += -mcpu=5275 -endif -ifneq (,$(findstring CONFIG_M5282,$(is5282))) -PLATFORM_CPPFLAGS += -mcpu=5282 -endif +PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h index 6630377..9390464 100644 --- a/include/configs/M5208EVBE.h +++ b/include/configs/M5208EVBE.h @@ -14,9 +14,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF520x /* define processor family */ -#define CONFIG_M5208 /* define processor type */ - #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT (0) #define CONFIG_BAUDRATE115200 diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h index ae4fe45..60e5b45 100644 --- a/include/configs/M5249EVB.h +++ b/include/configs/M5249EVB.h @@ -18,9 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF52x2 /* define processor family */ -#define CONFIG_M5249 /* define processor type */ - #define CONFIG_MCFTMR #define CONFIG_MCFUART diff --git
[U-Boot] [PATCH 6/8] m68k: mcf523x: move CPU type to Kconfig and refactor config.mk
Move the CPU type config options from include/configs/M5235EVB.h to arch/m68k/Kconfig and refactor the CPU flags select in arch/m68k/cpu/mcf523x/config.mk. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Kconfig | 8 arch/m68k/cpu/mcf523x/config.mk | 4 +++- include/configs/M5235EVB.h | 2 -- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index a645d95..a3f0cbc 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -11,6 +11,9 @@ config MCF520x config MCF52x2 bool +config MCF523x + bool + config MCF530x bool @@ -37,6 +40,10 @@ config M5208 bool select MCF520x +config M5235 + bool + select MCF523x + config M5249 bool select MCF52x2 @@ -103,6 +110,7 @@ config TARGET_M52277EVB config TARGET_M5235EVB bool Support M5235EVB + select M5235 config TARGET_COBRA5272 bool Support cobra5272 diff --git a/arch/m68k/cpu/mcf523x/config.mk b/arch/m68k/cpu/mcf523x/config.mk index c9435ab..4795f6a 100644 --- a/arch/m68k/cpu/mcf523x/config.mk +++ b/arch/m68k/cpu/mcf523x/config.mk @@ -7,4 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC +cpuflags-$(CONFIG_M5235) := -mcpu=5235 -fPIC + +PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h index 0f6e2f7..883347b 100644 --- a/include/configs/M5235EVB.h +++ b/include/configs/M5235EVB.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF523x /* define processor family */ -#define CONFIG_M5235 /* define processor type */ #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT (0) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Regression in usb-storage in u-boot 2015.04 ???
On 26/03/15 19:08, Hans de Goede wrote: Perhaps someone can test the reproducer on another board with usb: on an A20-OLinuXino-lime2 U-Boot SPL 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) DRAM: 1024 MiB CPU: 91200Hz, AXI/AHB/APB: 3/2/2 U-Boot 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) Allwinner Technology CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c5 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi# usb start sunxi# usb reset resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found that EHCI timeout appears to be random, it pops up maybe 20% of the time. tried with a few different usb sticks and couldn't reproduce it. Rgds, Iain ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Regression in usb-storage in u-boot 2015.04 ???
Hi, On 27-03-15 09:42, Iain Paton wrote: On 26/03/15 19:08, Hans de Goede wrote: Perhaps someone can test the reproducer on another board with usb: on an A20-OLinuXino-lime2 U-Boot SPL 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) DRAM: 1024 MiB CPU: 91200Hz, AXI/AHB/APB: 3/2/2 U-Boot 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) Allwinner Technology CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c5 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi# usb start sunxi# usb reset resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found that EHCI timeout appears to be random, it pops up maybe 20% of the time. tried with a few different usb sticks and couldn't reproduce it. Thanks that confirms that it is a musb issue, and likely one which has been around for ages. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 8/8] m68k: merge per-CPU config.mk into arch/m68k/Makefile
Collect CPU specific flags into the single place. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Makefile | 29 + arch/m68k/cpu/mcf5227x/config.mk | 12 arch/m68k/cpu/mcf523x/config.mk| 12 arch/m68k/cpu/mcf52x2/config.mk| 18 -- arch/m68k/cpu/mcf530x/config.mk| 9 - arch/m68k/cpu/mcf532x/config.mk| 13 - arch/m68k/cpu/mcf5445x/config.mk | 19 --- arch/m68k/cpu/mcf547x_8x/config.mk | 18 -- 8 files changed, 29 insertions(+), 101 deletions(-) delete mode 100644 arch/m68k/cpu/mcf5227x/config.mk delete mode 100644 arch/m68k/cpu/mcf523x/config.mk delete mode 100644 arch/m68k/cpu/mcf52x2/config.mk delete mode 100644 arch/m68k/cpu/mcf530x/config.mk delete mode 100644 arch/m68k/cpu/mcf532x/config.mk delete mode 100644 arch/m68k/cpu/mcf5445x/config.mk delete mode 100644 arch/m68k/cpu/mcf547x_8x/config.mk diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index aa3d2fa..e6f3b48 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -6,3 +6,32 @@ head-y := arch/m68k/cpu/$(CPU)/start.o libs-y += arch/m68k/cpu/$(CPU)/ libs-y += arch/m68k/lib/ + +cpuflags-$(CONFIG_M5208) := -mcpu=5208 +cpuflags-$(CONFIG_M5235) := -mcpu=5235 -fPIC +cpuflags-$(CONFIG_M52277) := -mcpu=52277 -fPIC +cpuflags-$(CONFIG_M5249) := -mcpu=5249 +cpuflags-$(CONFIG_M5253) := -mcpu=5253 +cpuflags-$(CONFIG_M5271) := -mcpu=5271 +cpuflags-$(CONFIG_M5272) := -mcpu=5272 +cpuflags-$(CONFIG_M5275) := -mcpu=5275 +cpuflags-$(CONFIG_M5282) := -mcpu=5282 +cpuflags-$(CONFIG_M5307) := -mcpu=5307 +cpuflags-$(CONFIG_MCF5301x):= -mcpu=53015 -fPIC +cpuflags-$(CONFIG_MCF532x) := -mcpu=5329 -fPIC +cpuflags-$(CONFIG_MCF5441x):= -mcpu=54418 -fPIC +cpuflags-$(CONFIG_MCF5445x):= -mcpu=54455 -fPIC +cpuflags-$(CONFIG_MCF547x_8x) := -mcpu=5485 -fPIC + +PLATFORM_CPPFLAGS += $(cpuflags-y) + + +ldflags-$(CONFIG_MCF5441x) := --got=single +ldflags-$(CONFIG_MCF5445x) := --got=single +ldflags-$(CONFIG_MCF547x_8x) := --got=single + +ifneq (,$(findstring -linux-,$(shell $(CC) --version))) +ifneq (,$(findstring GOT,$(shell $(LD) --help))) +PLATFORM_LDFLAGS += $(ldflags-y) +endif +endif diff --git a/arch/m68k/cpu/mcf5227x/config.mk b/arch/m68k/cpu/mcf5227x/config.mk deleted file mode 100644 index a6814d8..000 --- a/arch/m68k/cpu/mcf5227x/config.mk +++ /dev/null @@ -1,12 +0,0 @@ -# -# (C) Copyright 2003 Josef Baumgartner josef.baumgart...@telex.de -# -# (C) Copyright 2000-2004 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -cpuflags-$(CONFIG_M52277) := -mcpu=52277 -fPIC - -PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/arch/m68k/cpu/mcf523x/config.mk b/arch/m68k/cpu/mcf523x/config.mk deleted file mode 100644 index 4795f6a..000 --- a/arch/m68k/cpu/mcf523x/config.mk +++ /dev/null @@ -1,12 +0,0 @@ -# -# (C) Copyright 2003 Josef Baumgartner josef.baumgart...@telex.de -# -# (C) Copyright 2000-2004 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -cpuflags-$(CONFIG_M5235) := -mcpu=5235 -fPIC - -PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/arch/m68k/cpu/mcf52x2/config.mk b/arch/m68k/cpu/mcf52x2/config.mk deleted file mode 100644 index f8fdefd..000 --- a/arch/m68k/cpu/mcf52x2/config.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# (C) Copyright 2003 Josef Baumgartner josef.baumgart...@telex.de -# -# (C) Copyright 2000-2004 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -cpuflags-$(CONFIG_M5208) := -mcpu=5208 -cpuflags-$(CONFIG_M5249) := -mcpu=5249 -cpuflags-$(CONFIG_M5253) := -mcpu=5253 -cpuflags-$(CONFIG_M5271) := -mcpu=5271 -cpuflags-$(CONFIG_M5272) := -mcpu=5272 -cpuflags-$(CONFIG_M5275) := -mcpu=5275 -cpuflags-$(CONFIG_M5282) := -mcpu=5282 - -PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/arch/m68k/cpu/mcf530x/config.mk b/arch/m68k/cpu/mcf530x/config.mk deleted file mode 100644 index 25845aa..000 --- a/arch/m68k/cpu/mcf530x/config.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# (C) Copyright 2014 Angelo Dureghello ang...@sysam.it -# -# SPDX-License-Identifier: GPL-2.0+ -# - -cpuflags-$(CONFIG_M5307) := -mcpu=5307 - -PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/arch/m68k/cpu/mcf532x/config.mk b/arch/m68k/cpu/mcf532x/config.mk deleted file mode 100644 index 470d22f..000 --- a/arch/m68k/cpu/mcf532x/config.mk +++ /dev/null @@ -1,13 +0,0 @@ -# -# (C) Copyright 2003 Josef Baumgartner josef.baumgart...@telex.de -# -# (C) Copyright 2000-2004 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -cpuflags-$(CONFIG_MCF5301x) := -mcpu=53015 -fPIC -cpuflags-$(CONFIG_MCF532x) := -mcpu=5329
Re: [U-Boot] Adding support for red pitaya zynq board; is zynq working?
Hi Jeremy, First of all please send the patch via git send-email command. On 03/26/2015 10:08 AM, Jeremy Herbert wrote: Hi all, I just tried to build the latest master mainline u-boot for a xilinx zynq 7010 board called the red pitaya. I'm not affiliated at all with the board, just trying to use it with a recent version of u-boot (and linux). Unfortunately it gets stuck in a reset loop (I wasn't able to nail down why, but it was definitely something in u-boot). However, I was able to successfully build u-boot using the xilinx fork here: https://github.com/Xilinx/u-boot-xlnx and have it work fine. Interesting board - have to get a sample to be able to play with. I've attached the patch I made to add minimal support for the red pitaya (SD boot only, no ethernet as it uses an unsupported lantiq chipset). It is the policy of the xilinx u-boot fork that board support should be pushed straight upstream, but I'm not sure if this is the right place seeing as the upstream version doesn't currently work. Could someone please give me some advice on what to do with this patch? The reason why upstream version is not working for you is that you are probably running version without DTB that's why it is not initialized properly. It means you should load u-boot-dtb.bin instead. XMD script for example connect arm hw -debugdevice cpunr 1 dow -data u-boot-dtb.bin 0x400 rwr pc 0x400 con exit Then everything should just run correctly. I have briefly looked at the code and the whole red pitaya code needs to be updated because it is pretty ancient old. For pushing this to mainline you should revup DTB which targets 14.6 version which is pretty old too. That's why update to the latestgreatest needs to be done. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4] powerpc/t1023rdb: Add T1023 RDB board support
T1023RDB is a Freescale Reference Design Board that hosts the T1023 SoC. T1023RDB board Overview --- - T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz - CoreNet fabric supporting coherent and noncoherent transactions with prioritization and bandwidth allocation - Memory: 2GB Micron MT40A512M8HX unbuffered 32-bit fixed DDR4 without ECC - Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC - Ethernet interfaces: - one 1G RGMII port on-board(RTL8211F PHY) - one 1G SGMII port on-board(RTL8211F PHY) - one 2.5G SGMII port on-board(AQR105 PHY) - PCIe: Two Mini-PCIe connectors on-board. - SerDes: 4 lanes up to 10.3125GHz - NOR: 128MB S29GL01GS110TFIV10 Spansion NOR Flash - NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash - eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash. - USB: one Type-A USB 2.0 port with internal PHY - eSDHC: support SD/MMC card and eMMC on-board - 256Kbit M24256 I2C EEPROM - RTC: Real-time clock DS1339 on I2C bus - UART: one serial port on-board with RJ45 connector - Debugging: JTAG/COP for T1023 debugging As well updated T1024RDB to add T1023RDB. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- v4: squashed ddr patch to this one. v3: updated readme. v2: updated the printout of serdes refclk. board/freescale/t102xrdb/MAINTAINERS| 5 ++ board/freescale/t102xrdb/Makefile | 2 +- board/freescale/t102xrdb/README | 97 ++--- board/freescale/t102xrdb/ddr.c | 78 +- board/freescale/t102xrdb/eth_t102xrdb.c | 27 - board/freescale/t102xrdb/t1023_rcw.cfg | 8 +++ board/freescale/t102xrdb/t102xrdb.c | 93 ++- board/freescale/t102xrdb/t102xrdb.h | 4 +- configs/T1023RDB_NAND_defconfig | 5 ++ configs/T1023RDB_SDCARD_defconfig | 5 ++ configs/T1023RDB_SECURE_BOOT_defconfig | 4 ++ configs/T1023RDB_SPIFLASH_defconfig | 5 ++ configs/T1023RDB_defconfig | 4 ++ configs/T1024RDB_NAND_defconfig | 2 +- configs/T1024RDB_SDCARD_defconfig | 2 +- configs/T1024RDB_SECURE_BOOT_defconfig | 2 +- configs/T1024RDB_SPIFLASH_defconfig | 2 +- configs/T1024RDB_defconfig | 2 +- include/configs/T102xRDB.h | 79 +++ 19 files changed, 382 insertions(+), 44 deletions(-) create mode 100644 board/freescale/t102xrdb/t1023_rcw.cfg create mode 100644 configs/T1023RDB_NAND_defconfig create mode 100644 configs/T1023RDB_SDCARD_defconfig create mode 100644 configs/T1023RDB_SECURE_BOOT_defconfig create mode 100644 configs/T1023RDB_SPIFLASH_defconfig create mode 100644 configs/T1023RDB_defconfig diff --git a/board/freescale/t102xrdb/MAINTAINERS b/board/freescale/t102xrdb/MAINTAINERS index dc554d4..297e63a 100644 --- a/board/freescale/t102xrdb/MAINTAINERS +++ b/board/freescale/t102xrdb/MAINTAINERS @@ -8,3 +8,8 @@ F: configs/T1024RDB_NAND_defconfig F: configs/T1024RDB_SDCARD_defconfig F: configs/T1024RDB_SPIFLASH_defconfig F: configs/T1024RDB_SECURE_BOOT_defconfig +F: configs/T1023RDB_defconfig +F: configs/T1023RDB_NAND_defconfig +F: configs/T1023RDB_SDCARD_defconfig +F: configs/T1023RDB_SPIFLASH_defconfig +F: configs/T1023RDB_SECURE_BOOT_defconfig diff --git a/board/freescale/t102xrdb/Makefile b/board/freescale/t102xrdb/Makefile index a0cf8f6..0520066 100644 --- a/board/freescale/t102xrdb/Makefile +++ b/board/freescale/t102xrdb/Makefile @@ -8,7 +8,7 @@ ifdef CONFIG_SPL_BUILD obj-y += spl.o else obj-y += t102xrdb.o -obj-y += cpld.o +obj-$(CONFIG_T1024RDB) += cpld.o obj-y += eth_t102xrdb.o obj-$(CONFIG_PCI) += pci.o endif diff --git a/board/freescale/t102xrdb/README b/board/freescale/t102xrdb/README index 2b17f50..922450e 100644 --- a/board/freescale/t102xrdb/README +++ b/board/freescale/t102xrdb/README @@ -98,6 +98,30 @@ T1024RDB board Overview - Four I2C ports +T1023RDB board Overview +--- +- T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz +- CoreNet fabric supporting coherent and noncoherent transactions with + prioritization and bandwidth allocation +- SDRAM memory: 2GB Micron MT40A512M8HX unbuffered 32-bit DDR4 w/o ECC +- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC +- Ethernet interfaces: + - one 1G RGMII port on-board(RTL8211FS PHY) + - one 1G SGMII port on-board(RTL8211FS PHY) + - one 2.5G SGMII port on-board(AQR105 PHY) +- PCIe: Two Mini-PCIe connectors on-board. +- SerDes: 4 lanes up to 10.3125GHz +- NOR: 128MB S29GL01GS110TFIV10 Spansion NOR Flash +- NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash +- eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash. +- USB: one Type-A USB 2.0 port with internal PHY +- eSDHC: support SD/MMC and eMMC card +- 256Kbit M24256 I2C EEPROM +- RTC: Real-time clock DS1339U on I2C bus +- UART: one serial port on-board with RJ45 connector +- Debugging: JTAG/COP
[U-Boot] [PATCH 3/8] m68k: mcf532x: move CPU type to Kconfig and refactor config.mk
This commit intends to stop grepping CPU type in arch/m68k/cpu/mcf532x/config.mk. Move the CPU type config options from include/configs/*.h to arch/m68k/Kconfig and refactor the CPU flags select in arch/m68k/cpu/mcf532x/config.mk. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Kconfig| 26 ++ arch/m68k/cpu/mcf532x/config.mk | 12 +++- include/configs/M53017EVB.h | 2 -- include/configs/M5329EVB.h | 2 -- include/configs/M5373EVB.h | 2 -- include/configs/astro_mcf5373l.h | 10 -- 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 8f9b4a7..67308eb 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -14,6 +14,15 @@ config MCF52x2 config MCF530x bool +config MCF5301x + bool + +config MCF532x + bool + +config MCF537x + bool + # processor type config M5208 bool @@ -47,6 +56,19 @@ config M5307 bool select MCF530x +config M53015 + bool + select MCF5301x + +config M5329 + bool + select MCF532x + +config M5373 + bool + select MCF532x + select MCF537x + choice prompt Target select @@ -94,15 +116,19 @@ config TARGET_M5282EVB config TARGET_ASTRO_MCF5373L bool Support astro_mcf5373l + select M5373 config TARGET_M53017EVB bool Support M53017EVB + select M53015 config TARGET_M5329EVB bool Support M5329EVB + select M5329 config TARGET_M5373EVB bool Support M5373EVB + select M5373 config TARGET_M54418TWR bool Support M54418TWR diff --git a/arch/m68k/cpu/mcf532x/config.mk b/arch/m68k/cpu/mcf532x/config.mk index 2efb60f..470d22f 100644 --- a/arch/m68k/cpu/mcf532x/config.mk +++ b/arch/m68k/cpu/mcf532x/config.mk @@ -7,13 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:%=%).h -is5301x:=$(shell grep CONFIG_MCF5301x $(cfg)) -is532x:=$(shell grep CONFIG_MCF532x $(cfg)) +cpuflags-$(CONFIG_MCF5301x) := -mcpu=53015 -fPIC +cpuflags-$(CONFIG_MCF532x) := -mcpu=5329 -fPIC -ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x))) -PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC -endif -ifneq (,$(findstring CONFIG_MCF532x,$(is532x))) -PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC -endif +PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h index a100d9f..83ac70f 100644 --- a/include/configs/M53017EVB.h +++ b/include/configs/M53017EVB.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF5301x/* define processor family */ -#define CONFIG_M53015 /* define processor type */ #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT (0) diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index 78ea384..795f359 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF532x /* define processor family */ -#define CONFIG_M5329 /* define processor type */ #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT (0) diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index 849c265..d75b43c 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF532x /* define processor family */ -#define CONFIG_M5373 /* define processor type */ #define CONFIG_MCFUART #define CONFIG_SYS_UART_PORT (0) diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h index fa64a68..de837cf 100644 --- a/include/configs/astro_mcf5373l.h +++ b/include/configs/astro_mcf5373l.h @@ -39,16 +39,6 @@ #error No card type defined! #endif -/* - * Define processor - * possible values for Urmel board: only Coldfire M5373 processor supported - * (please do not change) - */ - -/* it seems not clear yet which processor defines we should use */ -#define CONFIG_MCF537x /* define processor family */ -#define CONFIG_MCF532x /* define processor family */ -#define CONFIG_M5373 /* define processor type */ #define CONFIG_ASTRO5373L /* define board type */ /* Command line configuration */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/8] m68k: mcf5227x: move CPU type to Kconfig and refactor config.mk
Move the CPU type config options from include/configs/M52277EVB.h to arch/m68k/Kconfig and refactor the CPU flags select in arch/m68k/cpu/mcf5227x/config.mk. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Kconfig| 8 arch/m68k/cpu/mcf5227x/config.mk | 4 +++- include/configs/M52277EVB.h | 2 -- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index eecef95..a645d95 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -29,6 +29,9 @@ config MCF5441x config MCF5445x bool +config MCF5227x + bool + # processor type config M5208 bool @@ -87,11 +90,16 @@ config M54455 bool select MCF5445x +config M52277 + bool + select MCF5227x + choice prompt Target select config TARGET_M52277EVB bool Support M52277EVB + select M52277 config TARGET_M5235EVB bool Support M5235EVB diff --git a/arch/m68k/cpu/mcf5227x/config.mk b/arch/m68k/cpu/mcf5227x/config.mk index b5c26e4..a6814d8 100644 --- a/arch/m68k/cpu/mcf5227x/config.mk +++ b/arch/m68k/cpu/mcf5227x/config.mk @@ -7,4 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -PLATFORM_CPPFLAGS += -mcpu=52277 -fPIC +cpuflags-$(CONFIG_M52277) := -mcpu=52277 -fPIC + +PLATFORM_CPPFLAGS += $(cpuflags-y) diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h index cde7305..e9424b4 100644 --- a/include/configs/M52277EVB.h +++ b/include/configs/M52277EVB.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF5227x/* define processor family */ -#define CONFIG_M52277 /* define processor type */ #define CONFIG_M52277EVB /* M52277EVB board */ #define CONFIG_MCFUART -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/8] m68k: mcf5445x: move CPU type to Kconfig and refactor config.mk
This commit intends to stop grepping CPU type in arch/m68k/cpu/mcf5445x/config.mk. Move the CPU type config options from include/configs/*.h to arch/m68k/Kconfig and refactor the CPU flags select in arch/m68k/cpu/mcf5445x/config.mk. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Kconfig| 21 + arch/m68k/cpu/mcf5445x/config.mk | 10 ++ include/configs/M54418TWR.h | 2 -- include/configs/M54451EVB.h | 2 -- include/configs/M54455EVB.h | 2 -- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 67308eb..eecef95 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -23,6 +23,12 @@ config MCF532x config MCF537x bool +config MCF5441x + bool + +config MCF5445x + bool + # processor type config M5208 bool @@ -69,6 +75,18 @@ config M5373 select MCF532x select MCF537x +config M54418 + bool + select MCF5441x + +config M54451 + bool + select MCF5445x + +config M54455 + bool + select MCF5445x + choice prompt Target select @@ -132,12 +150,15 @@ config TARGET_M5373EVB config TARGET_M54418TWR bool Support M54418TWR + select M54418 config TARGET_M54451EVB bool Support M54451EVB + select M54451 config TARGET_M54455EVB bool Support M54455EVB + select M54455 config TARGET_M5475EVB bool Support M5475EVB diff --git a/arch/m68k/cpu/mcf5445x/config.mk b/arch/m68k/cpu/mcf5445x/config.mk index 13f8a9f..c3923c6 100644 --- a/arch/m68k/cpu/mcf5445x/config.mk +++ b/arch/m68k/cpu/mcf5445x/config.mk @@ -9,14 +9,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:%=%).h -is5441x:=$(shell grep CONFIG_MCF5441x $(cfg)) - -ifneq (,$(findstring CONFIG_MCF5441x,$(is5441x))) -PLATFORM_CPPFLAGS += -mcpu=54418 -fPIC -else -PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC -endif +cpuflags-$(CONFIG_MCF5441x) := -mcpu=54418 -fPIC +cpuflags-$(CONFIG_MCF5445x) := -mcpu=54455 -fPIC ifneq (,$(findstring -linux-,$(shell $(CC) --version))) ifneq (,$(findstring GOT,$(shell $(LD) --help))) diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h index 3d7dc1f..be1750f 100644 --- a/include/configs/M54418TWR.h +++ b/include/configs/M54418TWR.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF5441x/* define processor family */ -#define CONFIG_M54418 /* define processor type */ #define CONFIG_M54418TWR /* M54418TWR board */ #define CONFIG_MCFUART diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h index 734a77f..1b3598a 100644 --- a/include/configs/M54451EVB.h +++ b/include/configs/M54451EVB.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF5445x/* define processor family */ -#define CONFIG_M54451 /* define processor type */ #define CONFIG_M54451EVB /* M54451EVB board */ #define CONFIG_DISPLAY_BOARDINFO diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h index 2faf581..2288bff 100644 --- a/include/configs/M54455EVB.h +++ b/include/configs/M54455EVB.h @@ -18,8 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF5445x/* define processor family */ -#define CONFIG_M54455 /* define processor type */ #define CONFIG_M54455EVB /* M54455EVB board */ #define CONFIG_DISPLAY_BOARDINFO -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/8] m68k: mcf547x_8x: move CPU type to Kconfig and refactor config.mk
Move the CPU type config options from include/configs/*.h to arch/m68k/Kconfig and refactor the CPU flags select in arch/m68k/cpu/mcf547x_8x/config.mk. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Cc: Alison Wang alison.w...@freescale.com Cc: Angelo Dureghello ang...@sysam.it --- arch/m68k/Kconfig | 13 + arch/m68k/cpu/mcf547x_8x/config.mk | 4 +++- include/configs/M5475EVB.h | 3 --- include/configs/M5485EVB.h | 3 --- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index a3f0cbc..69cb0f7 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -35,6 +35,9 @@ config MCF5445x config MCF5227x bool +config MCF547x_8x + bool + # processor type config M5208 bool @@ -101,6 +104,14 @@ config M52277 bool select MCF5227x +config M547x + bool + select MCF547x_8x + +config M548x + bool + select MCF547x_8x + choice prompt Target select @@ -178,9 +189,11 @@ config TARGET_M54455EVB config TARGET_M5475EVB bool Support M5475EVB + select M547x config TARGET_M5485EVB bool Support M5485EVB + select M548x config TARGET_AMCORE bool Support AMCORE diff --git a/arch/m68k/cpu/mcf547x_8x/config.mk b/arch/m68k/cpu/mcf547x_8x/config.mk index 825f6cc..240dd27 100644 --- a/arch/m68k/cpu/mcf547x_8x/config.mk +++ b/arch/m68k/cpu/mcf547x_8x/config.mk @@ -7,7 +7,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC +cpuflags-$(CONFIG_MCF547x_8x) := -mcpu=5485 -fPIC + +PLATFORM_CPPFLAGS += $(cpuflags-y) ifneq (,$(findstring -linux-,$(shell $(CC) --version))) ifneq (,$(findstring GOT,$(shell $(LD) --help))) diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h index 2f4549f..91d6a1a 100644 --- a/include/configs/M5475EVB.h +++ b/include/configs/M5475EVB.h @@ -18,9 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF547x_8x /* define processor family */ -#define CONFIG_M547x /* define processor type */ -#define CONFIG_M5475 /* define processor type */ #define CONFIG_DISPLAY_BOARDINFO diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h index 9aa02f7..ce9f3b0 100644 --- a/include/configs/M5485EVB.h +++ b/include/configs/M5485EVB.h @@ -18,9 +18,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_MCF547x_8x /* define processor family */ -#define CONFIG_M548x /* define processor type */ -#define CONFIG_M5485 /* define processor type */ #define CONFIG_DISPLAY_BOARDINFO -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 14/28] drivers/fsl-mc: Changed MC firmware loading for new boot architecture
-Original Message- From: Kim Phillips [mailto:kim.phill...@freescale.com] Sent: Wednesday, March 25, 2015 4:13 PM To: Stuart Yoder Cc: Rivera Jose-B46482; Sun York-R58495; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH 14/28] drivers/fsl-mc: Changed MC firmware loading for new boot architecture On Tue, 24 Mar 2015 21:32:56 -0500 Stuart Yoder b08...@gmail.com wrote: Kim, why is this being taken off-list? Adding it back. Also, please don't top-post. I think it is premature to start focusing on saving single digit milliseconds in u-boot. The 35 second boot time you are seeing on some ls2085 boards is due to the fact that the MC was running with it's CPU caches off until a few weeks ago. DDR is still running at the slowest speed, which will affect the MC's performance. It's still early in hardware bringup and things are not even stable yet. I'm still convinced that the MC itself probably has significant performance work. The 1ms delay used polling for MC to boot has nothing to do with DPL size. DPL processing is a separate, later initialization step. We're just waiting for the MC to initialize here. The MC boot time shouldn't vary. My visual reading watching things boot is that the MC boot takes a few hundred milliseconds. I don't see what's wrong with a 1 ms polling delay here. On a system with the MC running with caches on, u-boot took 20 seconds to boot. The MC took about 5 seconds of that, most of that in DPL processing. We would welcome help analyzing u-boot boot time and where the time is going. But, seriously, saving 1 ms is not going to help at all. I did a quick experiment and saved ~50ms when setting both udelays down to 50, which, sure, isn't a big deal given it's out of the order of 10sec, but it's something, and, like I said, development time for our users can be seriously helped if MC initialization were omitted from the main u-boot boot sequence, and occurred only when necessary, i.e., when users want to use one of the DP net interfaces. Most of the time when we boot today, we don't use DP net interfaces, so MC init - with or without DPL processing - is just a waste of our time! The 50ms improvement you claim will not make any difference to save time For development users, since 50ms is not something humans can perceive. As Stuart said, we (the MC team) should first analyze where is the bulk of The DPL processing by the MC fw is being spent, to see how much we can reduce the 5 seconds spent there. That is, we should be concerned first about where we can save big bucks, before being concerned about where we can save one penny or two. Thanks, German Thanks, Kim Thanks, Stuart On Tue, Mar 24, 2015 at 10:35 AM, Kim Phillips kim.phill...@freescale.com wrote: On Tue, 24 Mar 2015 10:14:39 -0500 Rivera Jose-B46482 german.riv...@freescale.com wrote: From: Kim Phillips [mailto:kim.phill...@freescale.com] Sent: Monday, March 23, 2015 5:06 PM On Mon, 23 Mar 2015 16:15:56 -0500 Rivera Jose-B46482 german.riv...@freescale.com wrote: From: Kim Phillips [mailto:kim.phill...@freescale.com] Sent: Monday, March 23, 2015 3:34 PM On Mon, 23 Mar 2015 15:06:11 -0500 Rivera Jose-B46482 german.riv...@freescale.com wrote: From: Kim Phillips [mailto:kim.phill...@freescale.com] Sent: Thursday, March 19, 2015 12:53 PM On Thu, 19 Mar 2015 09:45:45 -0700 York Sun york...@freescale.com wrote: From: J. German Rivera german.riv...@freescale.com Changed MC firmware loading to comply with the new MC boot architecture. Flush D-cache hierarchy after loading MC images. Add environment variables mcboottimeout for MC boot timeout in milliseconds, mcmemsize for MC DRAM block size. Check MC boot status before calling flib functions. Can we just assign actual and/or optimal values for 'mcboottimeout' and 'mcmemsize' instead of making them environment variables? Having environment variables gives us the flexibility if these values need to be changed for a given customer configuration. The actual what defines a 'customer configuration,' and how does that manifest itself at u-boot boot time? A DPL (data path layout - a device-tree-like structure describing The DPAA2 objects created at boot time and their connections) Is it the amount of time it takes to load (and execute?) firmare? Yes, bigger DPLs take longer to process by the MC. Why isn't customer-specific firmware being loaded via linux? All u-boot needs is basic networking, pretty static setup: fixed numbers for both memsize timeout. This is not customer-specific firmware. What is customer-specific is just the DPL.
Re: [U-Boot] Regression in usb-storage in u-boot 2015.04 ???
Hi, On 27-03-15 07:36, Bo Shen wrote: Hi Hans, On 03/27/2015 03:08 AM, Hans de Goede wrote: Hi, First of all I'm not sure this is a regression, but I'm afraid I do not have time to dig deeper so I thought I should report it anyways and then others can try to reproduce it. I'm seeing the following happen when using a usb stick with a musb-new otg controller in host mode on an allwinner tablet: sunxi# usb reset resetting USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... error in inquiry 0 Storage Device(s) found The interesting thing is that, the first usb start works fine, this only happens on the second usb start (triggered through a usb reset). This may be specific to using musb on sunxi, or to the flashdrive I have but I thought I should report this anyways. Esp. since usb otherwise works fine after a usb reset, other devices (usb keyboards) continue to work, and the descriptors of the usb drive do get read correctly: sunxi# usb info 1: Mass Storage, USB Revision 2.0 - USB Flash Disk 4C0E960F - Class: (from Interface) Mass Storage - PacketSize: 64 Configurations: 1 - Vendor: 0x058f Product 0x6387 Version 1.3 Configuration: 1 - Interfaces: 1 Bus Powered 100mA Interface: 0 - Alternate Setting 0, Endpoints: 2 - Class Mass Storage, Transp. SCSI, Bulk only - Endpoint 1 Out Bulk MaxPacket 512 - Endpoint 2 In Bulk MaxPacket 512 Perhaps someone can test the reproducer on another board with usb: 1) plug in a usb drive 2) do usb start 3) should print that 1 storage device is found 4) do usb reset 5) should still print that 1 storage device is found, but for me gives the error I mentioned above. I tested it OK with EHCI on Atmel sama5d4ek board. The following information for your reference. ---8--- U-Boot SPL 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49) U-Boot 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49) CPU: SAMA5D44 Crystal frequency: 12 MHz CPU clock: 528 MHz Master clock : 176 MHz DRAM: 512 MiB NAND: 512 MiB MMC: mci: 0 In:serial Out: serial Err: serial Net: gmac0, usb_ether Error: usb_ether address not set. Hit any key to stop autoboot: 0 U-Boot usb start starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found U-Boot usb reset resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found U-Boot ---8--- Ok, thanks for testing then at least this is not something which hits all boards, likely is some musb in host mode issue, which we probably have had for a long time now but I just noticed. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NAND Flash with Internal Hardware ECC
Hi Josh, That worked! Many thanks. The next issue is that the Kernel now needs to be re-built, we are using 2.6.xx, do you have any ideas on what to change in the Kernel to make it work with the HW ECC NAND? Regards Rajiv Dave Disign Consultants t: +44 (0) 207 544 8486 w: www.disignconsultants.com This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. From: Josh Wu josh...@atmel.com Date: Fri, 27 Mar 2015 10:52:29 +0800 To: Rajiv Dave raj...@disignconsultants.com, u-boot@lists.denx.de Subject: Re: [U-Boot] NAND Flash with Internal Hardware ECC Hello, Dave On 3/26/2015 4:45 PM, Rajiv Dave wrote: Hi, We are using an Atmel AT91SAM9263 processor which supports 1 Bit ECC flash devices that have Block 0 Valid with no ECC. These devices are now obsolete. We have fitted a board with a MT29F2G08ABAEWP-E-E, which has an internal Hardware ECC engine. Would you know how provide support for this device within U-Boot? As your flash have internal ecc, you should disable the AT91SAM9263 ecc. it means you need to set the nand-ecc.mode to NAME_ECC_NONE in the U-Boot if you already enabled internal Hardware ECC. Best Regards, Josh Wu The following output is generated by a board fitted with the NAND Flash with Internal Hardware ECC RomBOOT U-Boot 1.3.4 (Sep 19 2013 - 15:10:38) DRAM: 64 MB NAND: 256 MiB No Valid Environment Area Found In:serial Out: serial Err: serial Net: macb0 macb0: Starting autonegotiation... macb0: Autonegotiation timed out (status=0x7849) macb0: link down (status: 0x7849) Hit any key to stop autoboot: 3 2 1 0 NAND read: device 0 offset 0x20, size 0x17e16c 1565036 bytes read: ERROR ## Booting kernel from Legacy Image at 2220 ... Image Name: Linux-2.6.30 Image Type: ARM Linux Kernel Image (uncompressed) Data Size:1564972 Bytes = 1.5 MB Load Address: 20008000 Entry Point: 20008000 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image! U-Boot Regards Rajiv Dave Disign Consultants t: +44 (0) 207 544 8486 w: www.disignconsultants.com This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. ___ 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 2/3] sunxi: promote CONFIG_CLK_FULL_SPEED to be selectable through Kconfig
Hi, On 27-03-15 01:12, Iain Paton wrote: in order to allow for this to be set differently per board, remove the define from the associated soc headers and allow the user to choose a value through a Kconfig setting Signed-off-by: Iain Paton ipat...@gmail.com Thanks, but if we're going to do this, then can you please rename CLK_FULL_SPEED to SYS_CLK_FREQ, as that is already defined in ./Kconfig Change the depends on ARC in .Kconfig to depends on ARC || ARCH_SUNXI, and add an entry for it to board/sunxi/Kconfig only setting a default, like we do for SYS_CONFIG_NAME / SYS_BOARD / SYS_SOC already Regards, Hans --- board/sunxi/Kconfig | 8 include/configs/sun4i.h | 1 - include/configs/sun5i.h | 1 - include/configs/sun6i.h | 1 - include/configs/sun7i.h | 1 - include/configs/sun8i.h | 1 - 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 9d0eb91..d0905a7 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -33,6 +33,14 @@ config MACH_SUN8I endchoice +config CLK_FULL_SPEED + int sunxi cpu clock speed + default 91200 if MACH_SUN7I + default 100800 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I + ---help--- + Set the cpu clock speed in Hz, valid values 384, 768, 912, 1008 MHz + must be a multiple of 48MHz + config DRAM_CLK int sunxi dram clock speed default 312 if MACH_SUN6I || MACH_SUN8I diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h index 1537e53..7cd5c69 100644 --- a/include/configs/sun4i.h +++ b/include/configs/sun4i.h @@ -11,7 +11,6 @@ /* * A10 specific configuration */ -#define CONFIG_CLK_FULL_SPEED 100800 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI diff --git a/include/configs/sun5i.h b/include/configs/sun5i.h index e755531..e0470d4 100644 --- a/include/configs/sun5i.h +++ b/include/configs/sun5i.h @@ -11,7 +11,6 @@ /* * High Level Configuration Options */ -#define CONFIG_CLK_FULL_SPEED 100800 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h index f5e11dd..617c1cd 100644 --- a/include/configs/sun6i.h +++ b/include/configs/sun6i.h @@ -14,7 +14,6 @@ /* * A31 specific configuration */ -#define CONFIG_CLK_FULL_SPEED 100800 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h index f817f73..0bb756f 100644 --- a/include/configs/sun7i.h +++ b/include/configs/sun7i.h @@ -12,7 +12,6 @@ /* * A20 specific configuration */ -#define CONFIG_CLK_FULL_SPEED 91200 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h index 3bdedb3..79796d7 100644 --- a/include/configs/sun8i.h +++ b/include/configs/sun8i.h @@ -12,7 +12,6 @@ /* * A23 specific configuration */ -#define CONFIG_CLK_FULL_SPEED 100800 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] bootcount: Add dcache flush to bootcount_store()
Hi! (added a few more people to the Cc list) On 17.03.2015 10:00, Holger Brunck wrote: Hi Tom, On 03/13/2015 03:34 PM, Tom Rini wrote: On Fri, Mar 13, 2015 at 09:48:56AM -0400, Tom Rini wrote: On Wed, Mar 11, 2015 at 09:51:38AM +0100, Stefan Roese wrote: Without this dcache_flush the updated bootcounter may not be saved to its location. This was detected on an iMX.6 platform using the OCRAM (internal SRAM) as bootcounter storage area. And issuing reset from within U-Boot cause the bootcounter to stay on its initial value. Signed-off-by: Stefan Roese s...@denx.de Reviewed-by: Tom Rini tr...@konsulko.com OK, this breaks some platforms: powerpc: + TQM850L +(TQM850L) drivers/built-in.o: In function `bootcount_store': +(TQM850L) build/../drivers/bootcount/bootcount.c:64: undefined reference to `flush_dcache_range' +(TQM850L) make[1]: *** [u-boot] Error 1 +(TQM850L) make: *** [sub-make] Error 2 We'll see how many others have the same problem soon and then I'll decide on nuking the old platforms of holding off on this change. Aside from the TQM 8xx family that Wolfgang owns we have mgcoge and mgcoge3ne also breaking from this (http://patchwork.ozlabs.org/patch/448849/) change. Wolfgang, Holger, how do you want to proceed? We either need cache operations or dropping bootcount from the platforms or dropping the platforms. we still would like to keep mgcoge and mgcoge3ne support. These boards are still in maintenance. Unfortunately this week we are very busy. Next week Valentin or myself have planned to find some time to look at this. I just yesterday noticed this code for mx6: - arch/arm/cpu/armv7/mx6/soc.c - void enable_caches(void) { ... /* Enable caching on OCRAM and ROM */ mmu_set_region_dcache_behaviour(ROMCP_ARB_BASE_ADDR, ROMCP_ARB_END_ADDR, option); mmu_set_region_dcache_behaviour(IRAM_BASE_ADDR, IRAM_SIZE, option); So we definitely have the dcache enabled on mx6 in the OCRAM. And this of course explains, why I need the cache flush operations in the bootcounter code. I'm not really sure if we want this area to be cached though. This got introduced with this patch: Author: Nitin Garg nitin.g...@freescale.com 2014-09-16 20:33:25 Committer: Stefano Babic sba...@denx.de 2014-09-22 16:21:04 imx: Support i.MX6 High Assurance Boot authentication When CONFIG_SECURE_BOOT is enabled, the signed images like kernel and dtb can be authenticated using iMX6 CAAM. The added command hab_auth_img can be used for HAB authentication of images. The command takes the image DDR location, IVT (Image Vector Table) offset inside image as parameters. Detailed info about signing images can be found in Freescale AppNote AN4581. Signed-off-by: Nitin Garg nitin.g...@freescale.com The cache stuff is not mentioned here in this commit log. Nitin, why did you enable the cache here? Performance reason only? If the OCRAM was uncached (again), we could really drop my patch (this mail thread) with those flush calls. So how should we proceed? Make this OCRAM area uncached again? Comments welcome... Thanks, Stefan BTW: I'm on vacation now until 8th April, so please don't expect any replies in this time. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] bootcount: Add dcache flush to bootcount_store()
Hi Stefan, On 03/27/2015 08:18 AM, Stefan Roese wrote: Hi! (added a few more people to the Cc list) On 17.03.2015 10:00, Holger Brunck wrote: Hi Tom, On 03/13/2015 03:34 PM, Tom Rini wrote: On Fri, Mar 13, 2015 at 09:48:56AM -0400, Tom Rini wrote: On Wed, Mar 11, 2015 at 09:51:38AM +0100, Stefan Roese wrote: Without this dcache_flush the updated bootcounter may not be saved to its location. This was detected on an iMX.6 platform using the OCRAM (internal SRAM) as bootcounter storage area. And issuing reset from within U-Boot cause the bootcounter to stay on its initial value. Signed-off-by: Stefan Roese s...@denx.de Reviewed-by: Tom Rini tr...@konsulko.com OK, this breaks some platforms: powerpc: + TQM850L +(TQM850L) drivers/built-in.o: In function `bootcount_store': +(TQM850L) build/../drivers/bootcount/bootcount.c:64: undefined reference to `flush_dcache_range' +(TQM850L) make[1]: *** [u-boot] Error 1 +(TQM850L) make: *** [sub-make] Error 2 We'll see how many others have the same problem soon and then I'll decide on nuking the old platforms of holding off on this change. Aside from the TQM 8xx family that Wolfgang owns we have mgcoge and mgcoge3ne also breaking from this (http://patchwork.ozlabs.org/patch/448849/) change. Wolfgang, Holger, how do you want to proceed? We either need cache operations or dropping bootcount from the platforms or dropping the platforms. we still would like to keep mgcoge and mgcoge3ne support. These boards are still in maintenance. Unfortunately this week we are very busy. Next week Valentin or myself have planned to find some time to look at this. I just yesterday noticed this code for mx6: - arch/arm/cpu/armv7/mx6/soc.c - void enable_caches(void) { ... /* Enable caching on OCRAM and ROM */ mmu_set_region_dcache_behaviour(ROMCP_ARB_BASE_ADDR, ROMCP_ARB_END_ADDR, option); mmu_set_region_dcache_behaviour(IRAM_BASE_ADDR, IRAM_SIZE, option); So we definitely have the dcache enabled on mx6 in the OCRAM. And this of course explains, why I need the cache flush operations in the bootcounter code. I'm not really sure if we want this area to be cached though. This got introduced with this patch: Author: Nitin Garg nitin.g...@freescale.com 2014-09-16 20:33:25 Committer: Stefano Babic sba...@denx.de 2014-09-22 16:21:04 imx: Support i.MX6 High Assurance Boot authentication When CONFIG_SECURE_BOOT is enabled, the signed images like kernel and dtb can be authenticated using iMX6 CAAM. The added command hab_auth_img can be used for HAB authentication of images. The command takes the image DDR location, IVT (Image Vector Table) offset inside image as parameters. Detailed info about signing images can be found in Freescale AppNote AN4581. Signed-off-by: Nitin Garg nitin.g...@freescale.com The cache stuff is not mentioned here in this commit log. Nitin, why did you enable the cache here? Performance reason only? Seems like I missed mentioning this in the commit log, sorry. We enabled the OCRAM d-cache since it helped HAB to execute faster when authenticating OS image. The time taken to complete HAB improved by 3 times with d-cache enabled for ROM and OCRAM. This is because the HAB uses various regions of the OCRAM for data. If the OCRAM was uncached (again), we could really drop my patch (this mail thread) with those flush calls. So how should we proceed? Make this OCRAM area uncached again? Comments welcome... Thanks, Stefan BTW: I'm on vacation now until 8th April, so please don't expect any replies in this time. Regards, Nitin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Fix mxc_hab documenation for DEK blob generation
From: Ulises Cardenas ulises.carde...@freescale.com Include/fsl_sec.h defines sec_in and sec_out, according to the platform's endianess. Therefore, CONFIG_SYS_FSL_LE needs to be declared in the configuration file of the target, in order to use enable the DEK blob generation command. This requirement is not explicit in the README.mxc_hab. Signed-off-by: Ulises Cardenas ulises.carde...@freescale.com --- doc/README.mxc_hab | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/README.mxc_hab b/doc/README.mxc_hab index e9340dd..a1b1d34 100644 --- a/doc/README.mxc_hab +++ b/doc/README.mxc_hab @@ -69,6 +69,7 @@ CONFIG_SECURE_BOOT CONFIG_SYS_FSL_SEC_COMPAT4 /* HAB version */ CONFIG_FSL_CAAM CONFIG_CMD_DEKBLOB +CONFIG_SYS_FSL_LE Note: The encrypted boot feature is only supported by HABv4 or greater. -- 2.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] sunxi: sun4i: add missing 912MHz clock divisors
On Fri, 2015-03-27 at 00:10 +, Iain Paton wrote: clock divisors table was missing an entry for 912MHz. The same table is used for sun7i where the default boot clock is 912MHz, resulting in A20 boards being overclocked to 960MHz Apart from the missing entry, should it not be the case that we pick the highest frequency = than the requested frequency, rather than the next available (potentially higher) frequency? IOW I'd expect things to be underclocked at 768MHz without this change, which would mean that clock_set_pll1 is buggy. Ian. Signed-off-by: Iain Paton ipat...@gmail.com --- arch/arm/cpu/armv7/sunxi/clock_sun4i.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c index 49f4032..c720e96 100644 --- a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c +++ b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c @@ -102,6 +102,7 @@ static struct { /* This array must be ordered by frequency. */ { PLL1_CFG(16, 0, 0, 0), 38400 }, { PLL1_CFG(16, 1, 0, 0), 76800 }, + { PLL1_CFG(19, 1, 0, 0), 91200 }, { PLL1_CFG(20, 1, 0, 0), 96000 }, { PLL1_CFG(21, 1, 0, 0), 100800}, { PLL1_CFG(22, 1, 0, 0), 105600}, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] ARM: Merge v7 and v8 outer cache operations
Hello Mark, On Thu, 12 Feb 2015 15:56:52 +, Mark Rutland mark.rutl...@arm.com wrote: On Sat, Jan 31, 2015 at 03:08:54AM +, feng...@phytium.com.cn wrote: From: David Feng feng...@phytium.com.cn Armv7 and Armv8 allow outer cache exist, it is outside of the architecture defined cache hierarchy and can not be manipulated by architecture defined instructions. It's processor specific. This patch merge v7_outer_cache_* and v8 l3_cache_*. This commit message is a little misleading, though it probably makes sense to have something of this sort ARMv8. Info dump below. Recently the ARMv8 architecture reference manual was clarified to mention that any such system caches _must_ respect maintenance by VA, and are affected by the architected instructions for this. The arm64 Linux port relies on this property. Set/Way maintenance will not affect system caches. So if you want to flush/empty the entire cache hierarchy, you will need to rely on a mechanism specific to the outer cache implementation (rather than one specific to the processor). Additionally, the interconnect and cache hierarchies in ARMv8 implementations are becoming more complex, and it is more likely that dirty lines may migrate arbitrarily between CPUs and the system caches. Due to this you will need to ensure that CPU caches are disabled and empty before system cache maintenance is performed (I don't know whether your current sequences for ARMv7 ensure that). So, does the commit message require rewriting? Thanks, Mark. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-sunxi master
On Thu, Mar 26, 2015 at 01:24:44PM +0100, Hans de Goede wrote: Hi Tom, Please pull u-boot-sunxi/master into master for a small 2 bugfixes for v2015.04: The following changes since commit f643d9294f45487f22e8f33d6572530f17eff4e9: config_distro_bootcmd.h: Prefer booting from bootable paritions (2015-03-25 12:15:18 -0400) are available in the git repository at: http://git.denx.de/u-boot-sunxi.git master for you to fetch changes up to 99deda1dff206d679fcc87949b7151df0d47ea73: sunxi: axp209: fix incorrect limits on ldo3 (2015-03-26 13:17:46 +0100) Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-dm
On Wed, Mar 25, 2015 at 04:45:52PM -0600, Simon Glass wrote: Hi Tom, The following changes since commit b81bdf62e0cf9b5c64d30284d01658a851f142f7: bav335x: Update defconfigs and fix typo in EEPROM config format (2015-03-24 10:56:35 -0400) are available in the git repository at: http://git.denx.de/u-boot-dm.git for you to fetch changes up to 891ee87e2b4586012ce5bacd9149177f61de4ad5: dm: serial: remove bogus include ns16550.h (2015-03-25 16:33:27 -0600) Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-x86.git
On Wed, Mar 25, 2015 at 04:33:00PM -0600, Simon Glass wrote: Hi Tom, These are improvements to a new board and some code clean-ups that I requested, so I think it is probably reasonable to take these now. The following changes since commit b81bdf62e0cf9b5c64d30284d01658a851f142f7: bav335x: Update defconfigs and fix typo in EEPROM config format (2015-03-24 10:56:35 -0400) are available in the git repository at: http://git.denx.de/u-boot-x86.git for you to fetch changes up to 6f1eba49a558421e3fcb06ab0addc12b9a3804c6: x86: Add ramboot and nfsboot commands in x86-common.h (2015-03-24 21:22:38 -0600) Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot
On Wed, Mar 25, 2015 at 04:04:50AM +0530, Dileep Katta wrote: - Fastboot is enable by default for DRA7XX - This is based on following patch modified accordingly http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=b2e04f92b5d91c708b6fd6b79d2266966ac51f4b Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org Reviewed-by: Tom Rini tr...@konsulko.com -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable
On Wed, Mar 25, 2015 at 04:04:51AM +0530, Dileep Katta wrote: This patch populates serial number environment variable from die_id_0 and die_id_1 register values for DRA7xx boards. The function is added in omap common code so that this can be re-used. Serial# environment variable will be useful to show correct information in fastboot devices commands. Ref: http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=a6bcaaf67f6e4bcd97808f53d0ceb4b0c04d583c Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org Reviewed-by: Tom Rini tr...@konsulko.com -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
On Wed, Mar 25, 2015 at 04:04:52AM +0530, Dileep Katta wrote: Implemented fb_set_reboot_flag() for OMAP5 to set an environment variable 'dofastboot' when reboot-bootloader called. This environment variable will be checked in boot command and fastboot will be called if the variable is set. If the bootcmd env variable of OMAP5 common is overwritten with board-specific command, then these changes will not apply. [snip] + printf(Setting reboot to fastboot flag ...\n); + setenv(dofastboot, 1); + saveenv(); + udelay(60); [snip] #define CONFIG_BOOTCOMMAND \ + if test ${dofastboot} -eq 1; then \ + echo Boot fastboot requested, resetting dofastboot ...; \ + setenv dofastboot 0; saveenv; sleep 1; \ + echo Booting into fastboot ...; fastboot; \ No. When saveenv returns environment is saved. If it doesn't there's a bug that must be addressed. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-boot and UBI problem with vexpress board.
Hi, I want to test some UBI fs behavior in U-Boot using qemu and vexpress_ca9x4 board ( U-Boot 2015.1) To tst UBI I added lines to vexpress_ca9x4.h: #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define CONFIG_MTD_PARTITIONS /* needed for UBI */ #define CONFIG_FLASH_CFI_MTD #define MTDIDS_DEFAULT nor0=flash0-0 #define MTDPARTS_DEFAULTmtdparts=flash0-0:1m(empty),10m(ubi),-(rest) #define CONFIG_LZO /* needed for UBI */ #define CONFIG_RBTREE /* needed for UBI */ #define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS #define CONFIG_FIT also I've changed malloc pool size to 512kB in vexpress_common.h: #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 512 * 1024) Also I enabled debugs in UBI and MTD driver I'm running my test commands like that: qemu-system-arm -M vexpress-a9 -kernel u-boot -m 1024M -nographic -pflash flash1.bin -pflash flash2.bin Than in u-boot console: mtd default ubi part ubi results are: UBI: attaching mtd2 to ubi0 UBI: scanning is finished UBI: empty MTD device detected UBI: attached mtd2 (name mtd=1, size 10 MiB) to ubi0 UBI: PEB size: 524288 bytes (512 KiB), LEB size: 524160 bytes UBI: min./max. I/O unit sizes: 1/1, sub-page size 1 UBI: VID header offset: 64 (aligned 64), data offset: 128 UBI: good PEBs: 20, bad PEBs: 0, corrupted PEBs: 0 UBI: user volume: 0, internal volumes: 1, max. volumes count: 128 UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 0 UBI: available PEBs: 16, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 So it is ok flash was empty (file wit only ff's). I am quting qemu, starting it again ant now I can not mount ubi. Logs are here: UBI: attaching mtd2 to ubi0 UBI: scanning is finished UBI error: vtbl_check: bad CRC at record 0: 0x88cdfb6, not 0x UBI error: vtbl_check: bad CRC at record 0: 0x88cdfb6, not 0x UBI error: process_lvol: both volume tables are corrupted UBI error: ubi_attach_mtd_dev: failed to attach mtd2, error -22 UBI error: ubi_init: cannot attach mtd2 UBI error: ubi_init: cannot initialize UBI, error -22 ubi_init UBI init error 22 In flash imgae besides UBI! and UBI# headers I've got some other written sectors in this partition, is that ok? I thing i should have only those two headers ant their copy at this staete. I also thing about changing pool size, maybe there is something wrong with SP and that is why I've got this strange behaviour? I've tested qemu flash emulation, and all seems to work fine (writing and reading after reboots). Regards, Marcin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mpc85xx gpio related header files changes to compile common cmd_gpio.c
Extra gpio bank argument at low level may be discussable, but IMPO we should not brake standard int gpio_set_value(unsigned gpio, int value) definition. And the reason of this patch is to fix: 1. Incompatibility in functions gpio_free() and gpio_set_value() definitions between asm/gpio.h and asm-generic/gpio.h (void vs int) 2. Compilation error when build common/cmd_gpio.c for mpc85xx (p1020) On 03/26/2015 08:26 PM, Joakim Tjernlund wrote: On Thu, 2015-03-26 at 17:16 -0400, Oleksandr G Zhadan wrote: From: Oleksandr Zhadan ol...@arcturusnetworks.com Signed-off-by: Oleksandr Zhadan ol...@arcturusnetworks.com Signed-off-by: Michael Durrant mdurr...@arcturusnetworks.com --- arch/powerpc/include/asm/arch-mpc85xx/gpio.h |2 ++ arch/powerpc/include/asm/mpc85xx_gpio.h |6 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h index 8beed30..71794a8 100644 --- a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h +++ b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h @@ -12,4 +12,6 @@ #ifndef __ASM_ARCH_MX85XX_GPIO_H #define __ASM_ARCH_MX85XX_GPIO_H +#include asm/mpc85xx_gpio.h + #endif diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h b/arch/powerpc/include/asm/mpc85xx_gpio.h index 87bb4a0..1d0dad4 100644 --- a/arch/powerpc/include/asm/mpc85xx_gpio.h +++ b/arch/powerpc/include/asm/mpc85xx_gpio.h @@ -72,9 +72,10 @@ static inline int gpio_request(unsigned gpio, const char *label) return 0; } -static inline void gpio_free(unsigned gpio) +static inline int gpio_free(unsigned gpio) { /* Compatibility shim */ +return 0; } static inline int gpio_direction_input(unsigned gpio) @@ -97,12 +98,13 @@ static inline int gpio_get_value(unsigned gpio) return !!mpc85xx_gpio_get(1U gpio); } -static inline void gpio_set_value(unsigned gpio, int value) +static inline int gpio_set_value(unsigned gpio, int value) { if (value) mpc85xx_gpio_set_high(1U gpio); else mpc85xx_gpio_set_low(1U gpio); +return 0; } mpc85xx_gpio_xxx really needs an extra bank argument such as: static inline void my_mpc85xx_gpio_set(unsigned int bank, unsigned int mask, unsigned int dir, unsigned int val) { ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR + bank * 0x1000); so one can choose which GPIO bank to use Jocke -- Oleksandr Zhadan Arcturus Networks T 416 621-0125 x235 F 416 621-0190 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-boot and UBI problem with vexpress board.
Hi Marcin, On 27.03.2015 13:59, Marcin Krzemiński wrote: I want to test some UBI fs behavior in U-Boot using qemu and vexpress_ca9x4 board ( U-Boot 2015.1) To tst UBI I added lines to vexpress_ca9x4.h: #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define CONFIG_MTD_PARTITIONS /* needed for UBI */ #define CONFIG_FLASH_CFI_MTD #define MTDIDS_DEFAULT nor0=flash0-0 #define MTDPARTS_DEFAULTmtdparts=flash0-0:1m(empty),10m(ubi),-(rest) #define CONFIG_LZO /* needed for UBI */ #define CONFIG_RBTREE /* needed for UBI */ #define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS #define CONFIG_FIT also I've changed malloc pool size to 512kB in vexpress_common.h: #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 512 * 1024) Without looking deeper into your mail, I would recommend to increase the malloc size to at least 2MiB and test again. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC] powerpc: add 2 common dcache assembly functions
This patch defines the 2 flush_dcache_range and invalidate_dcache_range functions for all the powerpc architecture. Their implementation is borrowed from the kernel's misc_32.S file and replace the ones from mpc86xx and ppc4xx since they were equivalent. This is a fix for the problem introduced by this patch: http://patchwork.ozlabs.org/patch/448849/ Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com --- arch/powerpc/cpu/mpc512x/Makefile | 3 --- arch/powerpc/cpu/mpc512x/cache.c | 17 -- arch/powerpc/cpu/mpc5xxx/Makefile | 1 - arch/powerpc/cpu/mpc5xxx/cache.c | 15 arch/powerpc/cpu/mpc83xx/Makefile | 3 --- arch/powerpc/cpu/mpc83xx/cache.c | 17 -- arch/powerpc/cpu/mpc85xx/Makefile | 3 --- arch/powerpc/cpu/mpc85xx/cache.c | 17 -- arch/powerpc/cpu/mpc86xx/cache.S | 45 arch/powerpc/cpu/ppc4xx/cache.S | 43 --- arch/powerpc/lib/ppccache.S | 48 +++ 11 files changed, 48 insertions(+), 164 deletions(-) delete mode 100644 arch/powerpc/cpu/mpc512x/cache.c delete mode 100644 arch/powerpc/cpu/mpc5xxx/cache.c delete mode 100644 arch/powerpc/cpu/mpc83xx/cache.c delete mode 100644 arch/powerpc/cpu/mpc85xx/cache.c diff --git a/arch/powerpc/cpu/mpc512x/Makefile b/arch/powerpc/cpu/mpc512x/Makefile index a4934ef..98991c6 100644 --- a/arch/powerpc/cpu/mpc512x/Makefile +++ b/arch/powerpc/cpu/mpc512x/Makefile @@ -17,6 +17,3 @@ obj-y += speed.o obj-$(CONFIG_FSL_DIU_FB) += diu.o obj-$(CONFIG_CMD_IDE) += ide.o obj-$(CONFIG_PCI) += pci.o - -# Stub implementations of cache management functions for USB -obj-$(CONFIG_USB_EHCI) += cache.o diff --git a/arch/powerpc/cpu/mpc512x/cache.c b/arch/powerpc/cpu/mpc512x/cache.c deleted file mode 100644 index 66384f9..000 --- a/arch/powerpc/cpu/mpc512x/cache.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2012 Marek Vasut ma...@denx.de - * - * This file contains stub implementation of - * invalidate_dcache_range() - * flush_dcache_range() - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -void invalidate_dcache_range(unsigned long start, unsigned long stop) -{ -} - -void flush_dcache_range(unsigned long start, unsigned long stop) -{ -} diff --git a/arch/powerpc/cpu/mpc5xxx/Makefile b/arch/powerpc/cpu/mpc5xxx/Makefile index d122b29..5c67e1d 100644 --- a/arch/powerpc/cpu/mpc5xxx/Makefile +++ b/arch/powerpc/cpu/mpc5xxx/Makefile @@ -7,7 +7,6 @@ extra-y= start.o extra-y += traps.o -obj-y += cache.o obj-y += io.o obj-y += firmware_sc_task_bestcomm.impl.o obj-y += i2c.o diff --git a/arch/powerpc/cpu/mpc5xxx/cache.c b/arch/powerpc/cpu/mpc5xxx/cache.c deleted file mode 100644 index 5d674bc..000 --- a/arch/powerpc/cpu/mpc5xxx/cache.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This file contains stub implementation of - * invalidate_dcache_range() - * flush_dcache_range() - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -void invalidate_dcache_range(unsigned long start, unsigned long stop) -{ -} - -void flush_dcache_range(unsigned long start, unsigned long stop) -{ -} diff --git a/arch/powerpc/cpu/mpc83xx/Makefile b/arch/powerpc/cpu/mpc83xx/Makefile index cf91162..a93cf13 100644 --- a/arch/powerpc/cpu/mpc83xx/Makefile +++ b/arch/powerpc/cpu/mpc83xx/Makefile @@ -35,9 +35,6 @@ obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PCIE) += pcie.o obj-$(CONFIG_OF_LIBFDT) += fdt.o -# Stub implementations of cache management functions for USB -obj-y += cache.o - ifndef CONFIG_SYS_FSL_DDRC_GEN2 obj-y += spd_sdram.o endif diff --git a/arch/powerpc/cpu/mpc83xx/cache.c b/arch/powerpc/cpu/mpc83xx/cache.c deleted file mode 100644 index 66384f9..000 --- a/arch/powerpc/cpu/mpc83xx/cache.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2012 Marek Vasut ma...@denx.de - * - * This file contains stub implementation of - * invalidate_dcache_range() - * flush_dcache_range() - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -void invalidate_dcache_range(unsigned long start, unsigned long stop) -{ -} - -void flush_dcache_range(unsigned long start, unsigned long stop) -{ -} diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile index b93158b..65c26c0 100644 --- a/arch/powerpc/cpu/mpc85xx/Makefile +++ b/arch/powerpc/cpu/mpc85xx/Makefile @@ -114,7 +114,4 @@ endif obj-y += tlb.o obj-y += traps.o -# Stub implementations of cache management functions for USB -obj-y += cache.o - endif # not minimal diff --git a/arch/powerpc/cpu/mpc85xx/cache.c b/arch/powerpc/cpu/mpc85xx/cache.c deleted file mode 100644 index 66384f9..000 --- a/arch/powerpc/cpu/mpc85xx/cache.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2012 Marek Vasut ma...@denx.de - * - * This file contains stub implementation of - * invalidate_dcache_range() - * flush_dcache_range() - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -void invalidate_dcache_range(unsigned long
Re: [U-Boot] [PATCH v2] ARM: move -march=* and -mtune= options to arch/arm/Makefile
Hello Masahiro, On Fri, 27 Feb 2015 02:40:33 +0900, Masahiro Yamada yamad...@jp.panasonic.com wrote: My main motivations for this commit are: [1] Follow the arch/arm/Makefile style of Linux Kernel [2] Maintain compiler options systematically Currently, we give -march=* and -mtune=* options inconsistently: Only some of the CPUs pass -march=* and -mtune=* options. By collecting such options into the single place arch/arm/Makefile we can tell which options are missing at a glance. [3] Prepare for deprecating arch/*/cpu/*/config.mk Note: This commit just moves the compiler options so as not to change the behavior at all. It does not care about the correctness of the given options. Fox example, -march=armv5te might be better than -march=armv4 for ARM946EJS, but it is beyond the scope this commit. Also, filling the missing -march=* and -tune=* is left to follow-up patches. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Acked-by: Marek Vasut ma...@denx.de Acked-by: Stefan Roese s...@denx.de --- Changes in v2: - Rebased onto u-boot-arm/master (commit 419fa9ae) arch/arm/Makefile| 32 arch/arm/cpu/arm1136/config.mk | 9 - arch/arm/cpu/arm1176/config.mk | 9 - arch/arm/cpu/arm720t/config.mk | 9 - arch/arm/cpu/arm920t/config.mk | 8 arch/arm/cpu/arm926ejs/config.mk | 8 arch/arm/cpu/arm946es/config.mk | 8 arch/arm/cpu/armv7/config.mk | 5 - arch/arm/cpu/armv8/config.mk | 2 -- arch/arm/cpu/pxa/config.mk | 2 -- arch/arm/cpu/sa1100/config.mk| 9 - 11 files changed, 32 insertions(+), 69 deletions(-) delete mode 100644 arch/arm/cpu/arm1136/config.mk delete mode 100644 arch/arm/cpu/arm1176/config.mk delete mode 100644 arch/arm/cpu/arm720t/config.mk delete mode 100644 arch/arm/cpu/arm920t/config.mk delete mode 100644 arch/arm/cpu/arm926ejs/config.mk delete mode 100644 arch/arm/cpu/arm946es/config.mk delete mode 100644 arch/arm/cpu/sa1100/config.mk diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 878ae26..275c817 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -2,6 +2,38 @@ # SPDX-License-Identifier: GPL-2.0+ # +# This selects which instruction set is used. +arch-$(CONFIG_CPU_ARM720T) =-march=armv4 +arch-$(CONFIG_CPU_ARM920T) =-march=armv4 +arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te +arch-$(CONFIG_CPU_ARM946ES) =-march=armv4 +arch-$(CONFIG_CPU_SA1100)=-march=armv4 +arch-$(CONFIG_CPU_PXA) = +arch-$(CONFIG_CPU_ARM1136) =-march=armv5 +arch-$(CONFIG_CPU_ARM1176) =-march=armv5t +arch-$(CONFIG_CPU_V7)=$(call cc-option, -march=armv7-a, -march=armv5) +arch-$(CONFIG_ARM64) =-march=armv8-a + +# Evaluate arch cc-option calls now +arch-y := $(arch-y) + +# This selects how we optimise for the processor. +tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi +tune-$(CONFIG_CPU_ARM920T) = +tune-$(CONFIG_CPU_ARM926EJS) = +tune-$(CONFIG_CPU_ARM946ES) = +tune-$(CONFIG_CPU_SA1100)=-mtune=strongarm1100 +tune-$(CONFIG_CPU_PXA) =-mcpu=xscale +tune-$(CONFIG_CPU_ARM1136) = +tune-$(CONFIG_CPU_ARM1176) = +tune-$(CONFIG_CPU_V7)= +tune-$(CONFIG_ARM64) = + +# Evaluate tune cc-option calls now +tune-y := $(tune-y) + +PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) + # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name. machine-$(CONFIG_ARCH_AT91) += at91 diff --git a/arch/arm/cpu/arm1136/config.mk b/arch/arm/cpu/arm1136/config.mk deleted file mode 100644 index a82c6ce..000 --- a/arch/arm/cpu/arm1136/config.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, ga...@denx.de -# -# SPDX-License-Identifier: GPL-2.0+ -# - -# Make ARMv5 to allow more compilers to work, even though its v6. -PLATFORM_CPPFLAGS += -march=armv5 diff --git a/arch/arm/cpu/arm1176/config.mk b/arch/arm/cpu/arm1176/config.mk deleted file mode 100644 index 5dc2ebb..000 --- a/arch/arm/cpu/arm1176/config.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, ga...@denx.de -# -# SPDX-License-Identifier: GPL-2.0+ -# - -# Make ARMv5 to allow more compilers to work, even though its v6. -PLATFORM_CPPFLAGS += -march=armv5t diff --git a/arch/arm/cpu/arm720t/config.mk b/arch/arm/cpu/arm720t/config.mk deleted file mode 100644 index 772fb41..000 --- a/arch/arm/cpu/arm720t/config.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# (C) Copyright 2002 -# Sysgo Real-Time Solutions, GmbH www.elinos.com -# Marius Groeger mgroe...@sysgo.de -# -# SPDX-License-Identifier: GPL-2.0+ -# - -PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi diff --git a/arch/arm/cpu/arm920t/config.mk b/arch/arm/cpu/arm920t/config.mk
Re: [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
On 27/03/2015, Tom Rini tr...@konsulko.com wrote: On Wed, Mar 25, 2015 at 04:04:52AM +0530, Dileep Katta wrote: Implemented fb_set_reboot_flag() for OMAP5 to set an environment variable 'dofastboot' when reboot-bootloader called. This environment variable will be checked in boot command and fastboot will be called if the variable is set. If the bootcmd env variable of OMAP5 common is overwritten with board-specific command, then these changes will not apply. [snip] +printf(Setting reboot to fastboot flag ...\n); +setenv(dofastboot, 1); +saveenv(); +udelay(60); [snip] #define CONFIG_BOOTCOMMAND \ +if test ${dofastboot} -eq 1; then \ +echo Boot fastboot requested, resetting dofastboot ...; \ +setenv dofastboot 0; saveenv; sleep 1; \ +echo Booting into fastboot ...; fastboot; \ No. When saveenv returns environment is saved. If it doesn't there's a bug that must be addressed. sleep/udelay not required. Will remove and send an updated patch. -- Tom Thanks for the comment. Regards, Dileep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] T104xD4RDB: Enable L2 Switch on T104xD4RDB board
This patch enables L2 Switch support for board T104xRDB by defining CONFIG_VSC9953(_CMD) and the addresses for QSGMII Ethernet PHYs. This patch depends on patch: mpc85xx/T104xD4RDB: Add T104xD4RDB boards support Signed-off-by: Codrin Ciubotariu codrin.ciubota...@freescale.com --- include/configs/T104xRDB.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index f11db1d..f4006ee 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -746,11 +746,16 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_rcw.cfg #endif /* Enable VSC9953 L2 Switch driver on T1040 SoC */ -#ifdef CONFIG_T1040RDB +#if defined(CONFIG_T1040RDB) || defined(CONFIG_T1040D4RDB) #define CONFIG_VSC9953 #define CONFIG_VSC9953_CMD +#ifdef CONFIG_T1040RDB #define CONFIG_SYS_FM1_QSGMII11_PHY_ADDR 0x04 #define CONFIG_SYS_FM1_QSGMII21_PHY_ADDR 0x08 +#else +#define CONFIG_SYS_FM1_QSGMII11_PHY_ADDR 0x08 +#define CONFIG_SYS_FM1_QSGMII21_PHY_ADDR 0x0c +#endif #endif #define CONFIG_MII /* MII PHY management */ -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 2/3] Kconfig: i2c: fix help message related to dm i2c
Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Cc: Masahiro Yamada yamada.masah...@socionext.com Cc: Mike Frysinger vap...@gentoo.org Cc: Simon Glass s...@chromium.org Cc: Heiko Schocher h...@denx.de Changes V2: - add i2c uclass description --- drivers/i2c/Kconfig | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 692810d..979522f 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -2,16 +2,13 @@ config DM_I2C bool Enable Driver Model for I2C drivers depends on DM help - Enable driver model for I2C. This SPI flash interface - (spi_flash_probe(), spi_flash_write(), etc.) is then - implemented by the SPI flash uclass. There is one standard - SPI flash driver which knows how to probe most chips - supported by U-Boot. The uclass interface is defined in - include/spi_flash.h, but is currently fully compatible - with the old interface to avoid confusion and duplication - during the transition parent. SPI and SPI flash must be - enabled together (it is not possible to use driver model - for one and not the other). + Enable driver model for I2C. The I2C uclass interface: probe, read, + write or speed, is implemented with the bus drivers uclass operations, + which provides methods for bus setting and data transfer. Each chip + device (bus child) info is kept as parent platdata. The interface is + defined in include/i2c.h. When i2c bus driver supports the i2c uclass, + but the device drivers not, then DM_I2C_COMPAT config can be used as + compatibility layer. config DM_I2C_COMPAT bool Enable I2C compatibility layer -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 0/3] dm: i2c: enable driver model for i2c gpio
This patchset enables driver model support for software i2c bus driver. It was tested on Trats2 and Odroid U3 devices. It can be tested on any other device by just modifying the dts file, first by disabling the hardware i2c bus and then, as it is described in the doc binding file, add i2c-gpio node. The drivers, which are using the old api are not converted with this patchset. I hope that maintainers will do this if required. Probably the software i2c is used for PMIC devices not only for Trats2, or Universal C210, so I suggest to wait with moving the drivers until the pmic is done - this will prevent adding temporary code. Przemyslaw Marczak (3): dm: gpio: request list: return the count if requests max_count reached Kconfig: i2c: fix help message related to dm i2c dm: i2c: add i2c-gpio driver doc/device-tree-bindings/i2c/i2c-gpio.txt | 37 drivers/gpio/gpio-uclass.c| 6 +- drivers/i2c/Kconfig | 26 ++- drivers/i2c/Makefile | 1 + drivers/i2c/i2c-gpio.c| 353 ++ 5 files changed, 408 insertions(+), 15 deletions(-) create mode 100644 doc/device-tree-bindings/i2c/i2c-gpio.txt create mode 100644 drivers/i2c/i2c-gpio.c -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
Implemented fb_set_reboot_flag() for OMAP5 to set an environment variable 'dofastboot' when reboot-bootloader called. This environment variable will be checked in boot command and fastboot will be called if the variable is set. If the bootcmd env variable of OMAP5 common is overwritten with board-specific command, then these changes will not apply. This was originally intended for DRA7 platform, but now applies to all OMAP5. Ref: http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - None Changes in v3: - Changed the implementation to be more abstract - Used environment variable instead of board-specific registers - Moved the code to OMAP5 Changes in v4: - Removed udelay and sleep after saveenv arch/arm/cpu/armv7/omap-common/boot-common.c | 10 ++ include/configs/ti_omap5_common.h| 7 +++ 2 files changed, 17 insertions(+) diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c index 17500f2..55ca94d 100644 --- a/arch/arm/cpu/armv7/omap-common/boot-common.c +++ b/arch/arm/cpu/armv7/omap-common/boot-common.c @@ -162,3 +162,13 @@ void arch_preboot_os(void) ahci_reset(DWC_AHSATA_BASE); } #endif + +#ifdef CONFIG_CMD_FASTBOOT +int fb_set_reboot_flag(void) +{ + printf(Setting reboot to fastboot flag ...\n); + setenv(dofastboot, 1); + saveenv(); + return 0; +} +#endif diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index cd92454..24f8021 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -141,13 +141,20 @@ loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0 \ DFUARGS \ + #define CONFIG_BOOTCOMMAND \ + if test ${dofastboot} -eq 1; then \ + echo Boot fastboot requested, resetting dofastboot ...; \ + setenv dofastboot 0; saveenv; \ + echo Booting into fastboot ...; fastboot; \ + fi; \ run findfdt; \ run mmcboot; \ setenv mmcdev 1; \ setenv bootpart 1:2; \ setenv mmcroot /dev/mmcblk0p2 rw; \ run mmcboot; \ + /* -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 3/3] dm: i2c: add i2c-gpio driver
This commit adds driver model support to software emulated i2c bus driver. The device-tree node is compatible with the kernel i2c-gpio driver. It means, that boards device-tree i2c-gpio node, should be the same as in the kernel. For operating, it requires proper compatible and gpio pins dts description. Added: - Config: CONFIG_DM_I2C_GPIO - File: drivers/i2c/i2c-gpio.c - File: doc/device-tree-bindings/i2c/i2c-gpio.txt Driver base code is taken from: drivers/i2c/soft-i2c.c, changes: - update comments style, - move preprocesor macros into functions, - add device-tree support, - add driver model i2c support. - add Kconfig entry Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com CC: Masahiro Yamada yamada.masah...@socionext.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Mike Frysinger vap...@gentoo.org Cc: Simon Glass s...@chromium.org Cc: Heiko Schocher h...@denx.de Changes V2: - new file for software i2c driver: i2c-gpio.c - update driver naming: use of i2c-gpio - add full compatibility with the kernels device-tree i2c-gpio node - fix Kconfig entry --- doc/device-tree-bindings/i2c/i2c-gpio.txt | 37 drivers/i2c/Kconfig | 9 + drivers/i2c/Makefile | 1 + drivers/i2c/i2c-gpio.c| 353 ++ 4 files changed, 400 insertions(+) create mode 100644 doc/device-tree-bindings/i2c/i2c-gpio.txt create mode 100644 drivers/i2c/i2c-gpio.c diff --git a/doc/device-tree-bindings/i2c/i2c-gpio.txt b/doc/device-tree-bindings/i2c/i2c-gpio.txt new file mode 100644 index 000..3978381 --- /dev/null +++ b/doc/device-tree-bindings/i2c/i2c-gpio.txt @@ -0,0 +1,37 @@ +I2C gpio device binding +=== + +Driver: +- drivers/i2c/i2c-gpio.c + +Software i2c device-tree node properties: +Required: +* #address-cells = 1; +* #size-cells = 0; +* compatible = i2c-gpio; +* gpios = sda ..., scl ...; + +Optional: +* i2c-gpio,delay-us = 5; + The resulting transfer speed can be adjusted by setting the delay[us] + between gpio-toggle operations. Speed [Hz] = 1us / 4 * udelay, + It not defined, then default is 5us (~50KHz). + +Example: + +i2c-gpio@1 { + #address-cells = 1; + #size-cells = 0; + + compatible = i2c-gpio; + gpios = gpd1 0 GPIO_ACTIVE_HIGH, /* SDA */ + gpd1 1 GPIO_ACTIVE_HIGH; /* CLK */ + + i2c-gpio,delay-us = 5; + + some_device@5 { + compatible = some_device; + reg = 0x5; + ... + }; +}; diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 979522f..22e4a7c 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -19,6 +19,15 @@ config DM_I2C_COMPAT to convert all code for a board in a single commit. It should not be enabled for any board in an official release. +config DM_I2C_GPIO + bool Enable Driver Model for software emulated I2C bus driver + depends on DM_I2C DM_GPIO + help + Enable the i2c bus driver emulation by using the GPIO. + The bus gpio configuration is given by the device-tree. + Kernel style device-tree node for i2c-gpio is supported. + Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt + config SYS_I2C_UNIPHIER bool UniPhier I2C driver depends on ARCH_UNIPHIER DM_I2C diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 774bc94..d9e9f3a 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -6,6 +6,7 @@ # obj-$(CONFIG_DM_I2C) += i2c-uclass.o obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o +obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o obj-$(CONFIG_SYS_I2C_ADI) += adi_i2c.o obj-$(CONFIG_I2C_MV) += mv_i2c.o diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c new file mode 100644 index 000..8e9ed6b --- /dev/null +++ b/drivers/i2c/i2c-gpio.c @@ -0,0 +1,353 @@ +/* + * (C) Copyright 2015, Samsung Electronics + * Przemyslaw Marczak p.marc...@samsung.com + * Add driver-model support as a separated driver file + * + * (C) Copyright 2009 + * Heiko Schocher, DENX Software Engineering, h...@denx.de. + * Changes for multibus/multiadapter I2C support. + * + * (C) Copyright 2001, 2002 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * SPDX-License-Identifier:GPL-2.0+ + * + * This has been changed substantially by Gerald Van Baren, Custom IDEAS, + * vanba...@cideas.com. It was heavily influenced by LiMon, written by + * Neil Russell. + */ +#include common.h +#include errno.h +#include dm.h +#include i2c.h +#include div64.h +#include asm/gpio.h + +#define DEFAULT_UDELAY 5 +#define RETRIES0 +#define I2C_ACK0 +#define I2C_NOACK 1 + +#ifdef DEBUG_I2C +#define PRINTD(fmt, args...) do {\ + printf (fmt, ##args); \ + } while (0) +#else +#define PRINTD(fmt, args...) +#endif + +DECLARE_GLOBAL_DATA_PTR; + +enum { + PIN_SDA = 0, + PIN_SCL, +}; + +struct i2c_gpio_bus { +
[U-Boot] [PATCH V2 1/3] dm: gpio: request list: return the count if requests max_count reached
The function gpio_request_list_by_name_nodev() returned -ENOSPC error, when the loop count was greater than requested count. This was wrong, because function should return the requested gpio count, when meets the call request without errors. Now, the loop ends on requested max_count. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Cc: Simon Glass s...@chromium.org --- drivers/gpio/gpio-uclass.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index a69bbd2..4b63025 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -590,11 +590,7 @@ int gpio_request_list_by_name_nodev(const void *blob, int node, int count; int ret; - for (count = 0; ; count++) { - if (count = max_count) { - ret = -ENOSPC; - goto err; - } + for (count = 0; count max_count; count++) { ret = _gpio_request_by_name_nodev(blob, node, list_name, count, desc[count], flags, true); if (ret == -ENOENT) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
Experts, Please send your valuable comments if this patch needs any change. Regards, Dileep On 14/03/2015, Lukasz Majewski l.majew...@majess.pl wrote: On Sat, 14 Mar 2015 00:58:51 +0530 Dileep Katta dileep.ka...@linaro.org wrote: Hi Lukasz, On 13 March 2015 at 13:23, Lukasz Majewski l.majew...@samsung.com wrote: Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \nLukasz Majewski l.majew...@samsung.com - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); Acked-by: Lukasz Majewski l.majew...@samsung.com Since I'm not CC'ed to all patches, I assume that this work would go via other tree? Other patches are TI board specific and I am working on next version of the patches as per the review comments. I felt that this is generic functionality and hence sent it separately. Do you want me send all patches? No, it is not necessary. Regarding above, I assume that Tom will probably fetch those patches. I was just concern about tree to which this patch should belong. Regards, Lukasz Regards, Dileep -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ 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: HYP/non-sec: relocation before enable secondary cores
Hello Tom, On Fri, 13 Feb 2015 13:09:33 -0500, Tom Rini tr...@ti.com wrote: On Fri, Feb 13, 2015 at 09:37:23AM +0800, Peng Fan wrote: Hi, Albert and Tom On 2/4/2015 7:02 PM, Marc Zyngier wrote: On 04/02/15 10:15, Peng Fan wrote: If CONFIG_ARMV7_PSCI is not defined and CONFIG_ARMV7_SECURE_BASE is defined, smp_kicl_all_cpus may enable secondary cores and runs into secure_ram_addr( _smp_pen), before code is relocated to secure ram. So need relocation to secure ram before enable secondary cores. Signed-off-by: Peng Fan peng@freescale.com --- arch/arm/cpu/armv7/virt-v7.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c index b69fd37..4cb8806 100644 --- a/arch/arm/cpu/armv7/virt-v7.c +++ b/arch/arm/cpu/armv7/virt-v7.c @@ -112,13 +112,20 @@ int armv7_init_nonsec(void) for (i = 1; i = itlinesnr; i++) writel((unsigned)-1, gic_dist_addr + GICD_IGROUPRn + 4 * i); + /* + * Relocate secure section before any cpu runs in secure ram. + * smp_kick_all_cpus may enable other cores and runs into secure + * ram, so need to relocate secure section before enabling other + * cores. + */ + relocate_secure_section(); + #ifndef CONFIG_ARMV7_PSCI smp_set_core_boot_addr((unsigned long)secure_ram_addr(_smp_pen), -1); smp_kick_all_cpus(); #endif /* call the non-sec switching code on this CPU also */ - relocate_secure_section(); secure_ram_addr(_nonsec_init)(); return 0; } Seems like a sensible thing to do. FWIW: Acked-by: Marc Zyngier marc.zyng...@arm.com Just kindly remind. Will this patch be merged into u-boot-arm git repo or directly into u-boot master git repo? This is a core ARM thing so I'm expecting Albert to pick it up. Albert? Thanks! -- Tom Applied (for a while now, actually) 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] ARMv8: bug fix of mmu setup and code optimization
Hello feng...@phytium.com.cn, On Sat, 31 Jan 2015 17:02:17 +0800, feng...@phytium.com.cn feng...@phytium.com.cn wrote: From: David Feng feng...@phytium.com.cn 1. Fix a bug of mmu_setup that variable i and j should be type long instead of int. 2. Give mmu_setup weak attribute so that other implementation can redfine it. 3. A more common set_pgtable_section(). 4. Give device memory PXN and UXN attribute. CPU may speculatively prefetch instructions from device memory, but the IO subsystem of some implementation may not support this operation. The two attributes prevent this behavior. Signed-off-by: David Feng feng...@phytium.com.cn --- arch/arm/cpu/armv8/cache_v8.c | 73 +++- arch/arm/cpu/armv8/fsl-lsch3/cpu.c | 22 +-- arch/arm/include/asm/armv8/mmu.h | 71 +++ 3 files changed, 95 insertions(+), 71 deletions(-) This patch does not apply on current ARM tree; at least part of it must be rewritten. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mpc85xx gpio related header files changes to compile common cmd_gpio.c
Yes, here locally we have some additional changes/fixes in some places as well. And if talk about mpc85xx gpio support it's better to have driver in drivers/gpio vs static definitions in header file and I have it. But currently I need this minimal patch to be accepted to send our board support patch based on this one. Oleks On 03/27/2015 11:46 AM, Joakim Tjernlund wrote: On Fri, 2015-03-27 at 10:51 -0400, Oleksandr G Zhadan wrote: Extra gpio bank argument at low level may be discussable, but IMPO we should not brake standard int gpio_set_value(unsigned gpio, int value) definition. And the reason of this patch is to fix: 1. Incompatibility in functions gpio_free() and gpio_set_value() definitions between asm/gpio.h and asm-generic/gpio.h (void vs int) 2. Compilation error when build common/cmd_gpio.c for mpc85xx (p1020) Sure, when I saw mpc85xx gpio .. I remembered seeing this flaw so I figured I point it out before I forget again. This also makes me remember, drivers/spi/fsl_espi.c is broken for anything but reading an EEPROM. Jocke ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] powerpc/t2080rdb: update ddr to support 1866MT/s
Shengzhou, On 03/27/2015 12:53 AM, Shengzhou Liu wrote: Support SODIMM D3XP12081XL10AA 1866MT/s on T2080RDB. Enable CONFIG_CMD_MEMTEST as well. Did you find this test helpful? FYI, I have new test for DDR4. It is DDR controller built-in test. It catches more issues than memtest. But still it doesn't catch 100%. http://patchwork.ozlabs.org/patch/452026/ York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ARMv8: enable pre-allocation malloc
Hello feng...@phytium.com.cn, On Sat, 31 Jan 2015 11:55:28 +0800, feng...@phytium.com.cn feng...@phytium.com.cn wrote: From: David Feng feng...@phytium.com.cn Allocate memory space for pre-allocation malloc and zero global data. This code is partly from crt0.S. Signed-off-by: David Feng feng...@phytium.com.cn --- arch/arm/include/asm/config.h |4 arch/arm/lib/crt0_64.S| 13 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h index be80434..7a34a01 100644 --- a/arch/arm/include/asm/config.h +++ b/arch/arm/include/asm/config.h @@ -7,10 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#ifdef __aarch64__ -#define CONFIG_SYS_GENERIC_GLOBAL_DATA -#endif - #define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index 7756396..1654011 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -62,9 +62,18 @@ ENTRY(_main) * Set up initial C runtime environment and call board_init_f(0). */ ldr x0, =(CONFIG_SYS_INIT_SP_ADDR) - sub x0, x0, #GD_SIZE/* allocate one GD above SP */ + sub x18, x0, #GD_SIZE /* allocate one GD above SP */ + bic x18, x18, #0x7 /* 8-byte alignment for GD */ +zero_gd: + sub x0, x0, #0x8 + str xzr, [x0] + cmp x0, x18 + b.gtzero_gd +#if defined(CONFIG_SYS_MALLOC_F_LEN) + sub x0, x18, #CONFIG_SYS_MALLOC_F_LEN + str x0, [x18, #GD_MALLOC_BASE] +#endif bic sp, x0, #0xf/* 16-byte alignment for ABI compliance */ - mov x18, sp /* GD is above SP */ mov x0, #0 bl board_init_f -- 1.7.9.5 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 14/28] drivers/fsl-mc: Changed MC firmware loading for new boot architecture
On Thu, 26 Mar 2015 18:57:02 -0500 Rivera Jose-B46482 german.riv...@freescale.com wrote: From: Kim Phillips [mailto:kim.phill...@freescale.com] Sent: Wednesday, March 25, 2015 4:13 PM On Tue, 24 Mar 2015 21:32:56 -0500 Stuart Yoder b08...@gmail.com wrote: On a system with the MC running with caches on, u-boot took 20 seconds to boot. The MC took about 5 seconds of that, most of that in DPL processing. We would welcome help analyzing u-boot boot time and where the time is going. But, seriously, saving 1 ms is not going to help at all. I did a quick experiment and saved ~50ms when setting both udelays down to 50, which, sure, isn't a big deal given it's out of the order of 10sec, but it's something, and, like I said, development time for our users can be seriously helped if MC initialization were omitted from the main u-boot boot sequence, and occurred only when necessary, i.e., when users want to use one of the DP net interfaces. Most of the time when we boot today, we don't use DP net interfaces, so MC init - with or without DPL processing - is just a waste of our time! The 50ms improvement you claim will not make any difference to save time For development users, since 50ms is not something humans can perceive. As Stuart said, we (the MC team) should first analyze where is the bulk of The DPL processing by the MC fw is being spent, to see how much we can reduce the 5 seconds spent there. That is, we should be concerned first about where we can save big bucks, before being concerned about where we can save one penny or two. my point is that all 10 seconds of MC processing should be removed from u-boot startup time, and moved to only when u-boot needs to use MC-based ethernet, e.g., when a tftp command is invoked. and, fwiw, the 50ms figure will improve as MC firmware performance improves. Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] ARMv8: enable DM in vexpress64 board
Hello feng...@phytium.com.cn, On Sat, 31 Jan 2015 11:55:29 +0800, feng...@phytium.com.cn feng...@phytium.com.cn wrote: From: David Feng feng...@phytium.com.cn Signed-off-by: David Feng feng...@phytium.com.cn --- board/armltd/vexpress64/vexpress64.c | 13 + include/configs/vexpress_aemv8a.h| 14 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c index 5897318..4171c6e 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/board/armltd/vexpress64/vexpress64.c @@ -12,9 +12,22 @@ #include asm/io.h #include linux/compiler.h #include asm/semihosting.h +#include dm/platdata.h +#include dm/platform_data/serial_pl01x.h DECLARE_GLOBAL_DATA_PTR; +static const struct pl01x_serial_platdata serial_platdata = { + .base = V2M_UART0, + .type = TYPE_PL011, + .clock = 2400 * 1000, +}; + +U_BOOT_DEVICE(vexpress_serials) = { + .name = serial_pl01x, + .platdata = serial_platdata, +}; + int board_init(void) { return 0; diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index 027d78b..9b31c2d 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -8,6 +8,8 @@ #ifndef __VEXPRESS_AEMV8A_H #define __VEXPRESS_AEMV8A_H +#define CONFIG_DM + /* We use generic board for v8 Versatile Express */ #define CONFIG_SYS_GENERIC_BOARD @@ -52,7 +54,6 @@ /* Flat Device Tree Definitions */ #define CONFIG_OF_LIBFDT - /* SMP Spin Table Definitions */ #ifdef CONFIG_BASE_FVP #define CPU_RELEASE_ADDR (CONFIG_SYS_SDRAM_BASE + 0x03f0) @@ -132,6 +133,7 @@ #define CONFIG_SYS_MEMTEST_END (V2M_BASE + 0x8000) /* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_F_LEN 0x2000 #define CONFIG_SYS_MALLOC_LEN(CONFIG_ENV_SIZE + (8 20)) /* SMSC91C111 Ethernet Configuration */ @@ -139,11 +141,19 @@ #define CONFIG_SMC9_BASE (0x01A00) /* PL011 Serial Configuration */ +#define CONFIG_BAUDRATE 115200 +#ifdef CONFIG_DM +#define CONFIG_DM_SERIAL +#define CONFIG_PL01X_SERIAL +#else +#define CONFIG_SYS_SERIAL0 V2M_UART0 +#define CONFIG_SYS_SERIAL1 V2M_UART1 +#define CONFIG_CONS_INDEX0 #define CONFIG_PL011_SERIAL #define CONFIG_PL011_CLOCK 2400 #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ (void *)CONFIG_SYS_SERIAL1} -#define CONFIG_CONS_INDEX0 +#endif #define CONFIG_BAUDRATE 115200 #define CONFIG_SYS_SERIAL0 V2M_UART0 -- 1.7.9.5 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 1/2] mpc85xx gpio related header files changes to compile common cmd_gpio.c
On Fri, 2015-03-27 at 10:51 -0400, Oleksandr G Zhadan wrote: Extra gpio bank argument at low level may be discussable, but IMPO we should not brake standard int gpio_set_value(unsigned gpio, int value) definition. And the reason of this patch is to fix: 1. Incompatibility in functions gpio_free() and gpio_set_value() definitions between asm/gpio.h and asm-generic/gpio.h (void vs int) 2. Compilation error when build common/cmd_gpio.c for mpc85xx (p1020) Sure, when I saw mpc85xx gpio .. I remembered seeing this flaw so I figured I point it out before I forget again. This also makes me remember, drivers/spi/fsl_espi.c is broken for anything but reading an EEPROM. Jocke ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-boot and UBI problem with vexpress board.
Hi Stefan, I've changed malloc pool size to 2MiB and nothing changed. I've also disabled UBIFS support and that does not make any changes. Still after qemu restart u-boot can not attach to ubi device. Regards, Marcin W dniu 27.03.2015 o 16:01, Stefan Roese pisze: Hi Marcin, On 27.03.2015 13:59, Marcin Krzemiński wrote: I want to test some UBI fs behavior in U-Boot using qemu and vexpress_ca9x4 board ( U-Boot 2015.1) To tst UBI I added lines to vexpress_ca9x4.h: #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define CONFIG_MTD_PARTITIONS /* needed for UBI */ #define CONFIG_FLASH_CFI_MTD #define MTDIDS_DEFAULT nor0=flash0-0 #define MTDPARTS_DEFAULT mtdparts=flash0-0:1m(empty),10m(ubi),-(rest) #define CONFIG_LZO /* needed for UBI */ #define CONFIG_RBTREE /* needed for UBI */ #define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS #define CONFIG_FIT also I've changed malloc pool size to 512kB in vexpress_common.h: #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 512 * 1024) Without looking deeper into your mail, I would recommend to increase the malloc size to at least 2MiB and test again. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: implement find_next_zero_bit function
Hello Vitaly, On Wed, 11 Feb 2015 14:11:12 -0500, Vitaly Andrianov vita...@ti.com wrote: On 02/05/2015 12:52 PM, Albert ARIBAUD wrote: Hello Vitaly, On Thu, 5 Feb 2015 11:24:46 -0500, Vitaly Andrianov vita...@ti.com wrote: This commit copies implementation of the find_next_zero_bit() from git://git.denx.de/u-boot.git/arch/mips/include/asm/bitops.h. v2014.07 The function is required to enable MCAST_TFTP support for ARM platforms. Which mainline board needs this? TI Keystone2 EVMs Just to make sure: this is actually replacing a 'normal' function with an inline one. So the function /was/ available before this patch, right? -Vitaly Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: implement find_next_zero_bit function
Hello Vitaly, On Fri, 27 Mar 2015 15:06:15 -0400, Vitaly Andrianov vita...@ti.com wrote: Hello Albert, On 03/27/2015 11:54 AM, Albert ARIBAUD wrote: Hello Vitaly, On Wed, 11 Feb 2015 14:11:12 -0500, Vitaly Andrianov vita...@ti.com wrote: On 02/05/2015 12:52 PM, Albert ARIBAUD wrote: Hello Vitaly, On Thu, 5 Feb 2015 11:24:46 -0500, Vitaly Andrianov vita...@ti.com wrote: This commit copies implementation of the find_next_zero_bit() from git://git.denx.de/u-boot.git/arch/mips/include/asm/bitops.h. v2014.07 The function is required to enable MCAST_TFTP support for ARM platforms. Which mainline board needs this? TI Keystone2 EVMs Just to make sure: this is actually replacing a 'normal' function with an inline one. So the function /was/ available before this patch, right? What inline function are you talking about? The one you are adding with this patch. I couldn't find this function for ARM. That is why I copied it from MIPS. Thanks -- I had noticed that you were removing extern declarations for find_first_zero_bit() and find_next_zero_bit() and I was surprised that this removal was not explained in the commit message, and I had not realized that the corresponding function definitions did not exist. I'll apply your patch and add a note in the commit message explaining the removal. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 5/7] malloc_f: enable SYS_MALLOC_F by default if DM is on
Hello Masahiro-san, On Mon, 2015-03-23 at 15:33 -0600, Simon Glass wrote: On 19 March 2015 at 04:42, Masahiro Yamada yamada.masah...@socionext.com wrote: This option has a bool type, not hex. Fix it and enable it if CONFIG_DM is on because Driver Model always requires malloc memory. Devices are scanned twice, before/after relocation. CONFIG_SYS_MALLOC_F should be enabled to use malloc memory before relocation. As it is board-independent, handle it globally. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Acked-by: Stephen Warren swar...@wwwdotorg.org --- Changes in v2: - Fix a typo s/not board-independent/board-independent/ Reviewed-by: Simon Glass s...@chromium.org I'm wondering if your series Some improvements related to build system is going to be applied to u-boot master branch anytime soon? I have pending update series for ARC where I'm enabling use of Device Model. For this I need to use SYS_MALLOC_F (is required by CONFIG_DM_SERIAL). So I'm interested in your patch [PATCH v3 5/7] malloc_f: enable SYS_MALLOC_F by default if DM is on in particular. Without it I'll need to add SYS_MALLOC_F in arch/arc/Kconfig. -Alexey ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mmc: fix OCR Polling
Hi Andrew, Peng, On Mar 23, 2015, at 01:23 , Andrew Gabbasov andrew_gabba...@mentor.com wrote: Hi Peng, From: Peng Fan [mailto:peng@freescale.com] Sent: Saturday, March 21, 2015 1:34 PM To: Gabbasov, Andrew; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] mmc: fix OCR Polling [skipped] After this patch, if the busy flag is indeed already set (so that the loop body is not executed), and it is not an SPI case (mmc_host_is_spi(mmc) is false), the cmd structure (which is local to mmc_complete_op_cond() function) is left uninitialized, and using cmd.response[0] later in the function becomes incorrect. And the OCR register value and the high capacity flag may be set incorrectly. Yeah. you are right. Maybe the following piece of code should be added to replace mmc-ocr = cmd.response[0]: if (mmc_host_is_spi(mmc)) mmc-ocr = cmd.response[0]; else mmc-ocr = mmc-op_cond_response; Thanks for correcting me. Well, there can be several ways to correct that. The easiest would be something similar to what you propose, but, just to avoid extra if, we could add mmc-op_cond_response = cmd.response[0]; to the end of existing if(mmc_host_is_spi(mmc)) and change mmc-ocr = cmd.response[0]; to mmc-ocr = mmc-op_cond_response; at the end of function. Since op_cond_response should be already set from the function beginning, this can be used immediately. And, going further, since op_cond_response is actually the same contents as mmc-ocr, we could combine them and use mmc-ocr at once, from the beginning of polling loops. This is a little more complex, but makes the code cleaner. This is what is done in one of other patches in my series ;-) This does seem like a case where a simple accessor structure would help until we figure out how to process. Something like mmc_get_ocr() as a private API perhaps? Thanks. Best regards, Andrew Regards — Pantelis ___ 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 2/2] Add new Arcturus Networks Inc. board support - uCP1020
Oleks, On 03/27/2015 11:21 AM, Oleksandr G Zhadan wrote: Hi York, New, with fixed errors and much less warnings, patch is here. It should be a new email. Otherwise, anything above the --- under signed-off-by will be treated as commit message. On 03/26/2015 05:25 PM, York Sun wrote: On 03/26/2015 02:14 PM, Oleksandr G Zhadan wrote: From: Oleksandr Zhadan ol...@arcturusnetworks.com Please add commit message to explain what you are doing. Please run checkpatch before sending it. You have tons of issues there. York From: Oleksandr Zhadan ol...@arcturusnetworks.com Date: Fri, 27 Mar 2015 14:04:21 -0400 Subject: [PATCH 2/2] New Arcturus Networks board support. Missing commit message here. Signed-off-by: Oleksandr Zhadan ol...@ivyking.arcturusnetworks.com Signed-off-by: Michael Durrant mdurr...@arcturusnetworks.com --- arch/powerpc/cpu/mpc85xx/Kconfig |4 + board/Arcturus/ucp1020/Kconfig | 44 ++ board/Arcturus/ucp1020/MAINTAINERS |7 + board/Arcturus/ucp1020/Makefile | 33 + board/Arcturus/ucp1020/README| 54 ++ board/Arcturus/ucp1020/cmd_arc.c | 261 board/Arcturus/ucp1020/ddr.c | 162 + board/Arcturus/ucp1020/law.c | 25 + board/Arcturus/ucp1020/spl.c | 126 board/Arcturus/ucp1020/spl_minimal.c | 67 ++ board/Arcturus/ucp1020/tlb.c | 101 board/Arcturus/ucp1020/ucp1020.c | 393 configs/UCP1020_SPIFLASH_defconfig |6 + configs/UCP1020_defconfig|5 + include/configs/UCP1020.h| 1096 ++ 15 files changed, 2384 insertions(+), 0 deletions(-) create mode 100644 board/Arcturus/ucp1020/Kconfig create mode 100644 board/Arcturus/ucp1020/MAINTAINERS create mode 100644 board/Arcturus/ucp1020/Makefile create mode 100644 board/Arcturus/ucp1020/README create mode 100644 board/Arcturus/ucp1020/cmd_arc.c create mode 100644 board/Arcturus/ucp1020/ddr.c create mode 100644 board/Arcturus/ucp1020/law.c create mode 100644 board/Arcturus/ucp1020/spl.c create mode 100644 board/Arcturus/ucp1020/spl_minimal.c create mode 100644 board/Arcturus/ucp1020/tlb.c create mode 100644 board/Arcturus/ucp1020/ucp1020.c create mode 100644 configs/UCP1020_SPIFLASH_defconfig create mode 100644 configs/UCP1020_defconfig create mode 100644 include/configs/UCP1020.h I think it is best to generate this patch with -M -C --find-copies-harder flag. There is a lot of copy and paste from existing board. snip diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c new file mode 100644 index 000..13ac25e --- /dev/null +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -0,0 +1,261 @@ +/* + * Command for accessing Arcturus factory environment. + * + * Copyright 2013-2015 Arcturus Networks Inc. + * http://www.arcturusnetworks.com/products/ucp1020/ + * by Oleksandr G Zhadan et al. + * + * SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause + * + */ + +#include common.h +#include div64.h +#include malloc.h +#include spi_flash.h + +#include asm/io.h + +#ifndef CONFIG_SF_DEFAULT_SPEED +# define CONFIG_SF_DEFAULT_SPEED 100 +#endif +#ifndef CONFIG_SF_DEFAULT_MODE +# define CONFIG_SF_DEFAULT_MODESPI_MODE0 +#endif +#ifndef CONFIG_SF_DEFAULT_CS +# define CONFIG_SF_DEFAULT_CS 0 +#endif +#ifndef CONFIG_SF_DEFAULT_BUS +# define CONFIG_SF_DEFAULT_BUS 0 +#endif + +static struct spi_flash *flash; +char smac[4][18]; + +static int set_arc_product(int argc, char *const argv[]) +{ + int err = 0; + + if (argc != 5) + return -1; + + if (strlen(argv[1]) != 15) + return -1; + + if (strlen(argv[2]) != 17) + return -1; + + if (strlen(argv[3]) != 17) + return -1; + + if (strlen(argv[4]) != 17) + return -1; + Are these magical number documented? It will be more understandable if using macros or with comments. + if (argv[2][2] + != ':' || argv[2][5] + != ':' || argv[2][8] != ':' || argv[2][11] != ':' || + argv[2][14] != ':') + return -1; + + if (argv[3][2] + != ':' || argv[3][5] + != ':' || argv[3][8] != ':' || argv[3][11] != ':' || + argv[3][14] != ':') + return -1; + + if (argv[4][2] + != ':' || argv[4][5] + != ':' || argv[4][8] != ':' || argv[4][11] != ':' || + argv[4][14] != ':') + return -1; + + strcpy(smac[3], argv[1]); + strcpy(smac[2], argv[2]); + strcpy(smac[1], argv[3]); + strcpy(smac[0], argv[4]); + + flash = + spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, + CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); + + if (spi_flash_write(flash, (0x200 - sizeof(smac)),
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Friday, March 27, 2015 at 07:15:18 PM, Tom Rini wrote: On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote: Experts, Please send your valuable comments if this patch needs any change. Assuming everything has acks I'll pick it up for the next release, thanks. Lukasz can pick it through the correct tree for next release just fine I think. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote: Experts, Please send your valuable comments if this patch needs any change. Assuming everything has acks I'll pick it up for the next release, thanks. Regards, Dileep On 14/03/2015, Lukasz Majewski l.majew...@majess.pl wrote: On Sat, 14 Mar 2015 00:58:51 +0530 Dileep Katta dileep.ka...@linaro.org wrote: Hi Lukasz, On 13 March 2015 at 13:23, Lukasz Majewski l.majew...@samsung.com wrote: Hi Dileep, g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running cmd_fastboot. Calling board_usb_init() to fix this. fastboot command is now added with an optional controller index argument with default value as 0, to facilitate configurable controller index. Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Changed fastboot command to facilitate passing controller index - Added board_usb_cleanup() This patch considers the following change by Inha Song, without which the build will be broken on BeagleBone Black platform https://patchwork.ozlabs.org/patch/430303/ common/cmd_fastboot.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..9ca4a2f 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,19 @@ #include common.h #include command.h #include g_dnl.h +#include usb.h static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; + int controller_index = 0; + if (argc == 2) { + char *usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + } + + board_usb_init(controller_index, USB_INIT_DEVICE); g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_fastboot); if (ret) @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) g_dnl_unregister(); g_dnl_clear_detach(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); return CMD_RET_SUCCESS; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 0, do_fastboot, use USB Fastboot protocol, - \nLukasz Majewski l.majew...@samsung.com - - run as a fastboot usb device + [USB_controller]\n + - run as a fastboot usb device via USB_controller ); Acked-by: Lukasz Majewski l.majew...@samsung.com Since I'm not CC'ed to all patches, I assume that this work would go via other tree? Other patches are TI board specific and I am working on next version of the patches as per the review comments. I felt that this is generic functionality and hence sent it separately. Do you want me send all patches? No, it is not necessary. Regarding above, I assume that Tom will probably fetch those patches. I was just concern about tree to which this patch should belong. Regards, Lukasz Regards, Dileep -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ 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 -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mpc85xx gpio related header files changes to compile common cmd_gpio.c
On 03/27/2015 11:27 AM, Oleksandr G Zhadan wrote: Hi York, I add explanation and re-send the same patch. Whenever you make changes to the patch, please add a change log under the --- line. Please also see my comments on previous patch sent 5 minutes before this. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Add new Arcturus Networks Inc. board support - uCP1020
Hi York, New, with fixed errors and much less warnings, patch is here. On 03/26/2015 05:25 PM, York Sun wrote: On 03/26/2015 02:14 PM, Oleksandr G Zhadan wrote: From: Oleksandr Zhadan ol...@arcturusnetworks.com Please add commit message to explain what you are doing. Please run checkpatch before sending it. You have tons of issues there. York From: Oleksandr Zhadan ol...@arcturusnetworks.com Date: Fri, 27 Mar 2015 14:04:21 -0400 Subject: [PATCH 2/2] New Arcturus Networks board support. Signed-off-by: Oleksandr Zhadan ol...@ivyking.arcturusnetworks.com Signed-off-by: Michael Durrant mdurr...@arcturusnetworks.com --- arch/powerpc/cpu/mpc85xx/Kconfig |4 + board/Arcturus/ucp1020/Kconfig | 44 ++ board/Arcturus/ucp1020/MAINTAINERS |7 + board/Arcturus/ucp1020/Makefile | 33 + board/Arcturus/ucp1020/README| 54 ++ board/Arcturus/ucp1020/cmd_arc.c | 261 board/Arcturus/ucp1020/ddr.c | 162 + board/Arcturus/ucp1020/law.c | 25 + board/Arcturus/ucp1020/spl.c | 126 board/Arcturus/ucp1020/spl_minimal.c | 67 ++ board/Arcturus/ucp1020/tlb.c | 101 board/Arcturus/ucp1020/ucp1020.c | 393 configs/UCP1020_SPIFLASH_defconfig |6 + configs/UCP1020_defconfig|5 + include/configs/UCP1020.h| 1096 ++ 15 files changed, 2384 insertions(+), 0 deletions(-) create mode 100644 board/Arcturus/ucp1020/Kconfig create mode 100644 board/Arcturus/ucp1020/MAINTAINERS create mode 100644 board/Arcturus/ucp1020/Makefile create mode 100644 board/Arcturus/ucp1020/README create mode 100644 board/Arcturus/ucp1020/cmd_arc.c create mode 100644 board/Arcturus/ucp1020/ddr.c create mode 100644 board/Arcturus/ucp1020/law.c create mode 100644 board/Arcturus/ucp1020/spl.c create mode 100644 board/Arcturus/ucp1020/spl_minimal.c create mode 100644 board/Arcturus/ucp1020/tlb.c create mode 100644 board/Arcturus/ucp1020/ucp1020.c create mode 100644 configs/UCP1020_SPIFLASH_defconfig create mode 100644 configs/UCP1020_defconfig create mode 100644 include/configs/UCP1020.h diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index adb5bd3..e481ab4 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -153,6 +153,9 @@ config TARGET_XPEDITE537X config TARGET_XPEDITE550X bool Support xpedite550x +config TARGET_UCP1020 + bool Support uCP1020 + endchoice source board/freescale/b4860qds/Kconfig @@ -194,5 +197,6 @@ source board/stx/stxssa/Kconfig source board/xes/xpedite520x/Kconfig source board/xes/xpedite537x/Kconfig source board/xes/xpedite550x/Kconfig +source board/Arcturus/ucp1020/Kconfig endmenu diff --git a/board/Arcturus/ucp1020/Kconfig b/board/Arcturus/ucp1020/Kconfig new file mode 100644 index 000..feca03a --- /dev/null +++ b/board/Arcturus/ucp1020/Kconfig @@ -0,0 +1,44 @@ +if TARGET_UCP1020 + +config SYS_BOARD + string + default ucp1020 + +config SYS_VENDOR + string + default Arcturus + +config SYS_CONFIG_NAME + string + default UCP1020 + +config SPI_FLASH + bool + default y + +config SPI_PCI + bool + default y + +choice + prompt Target image select + +config TARGET_UCP1020_NOR + bool NOR flash u-boot image + +config TARGET_UCP1020_SPIFLASH + bool SPI flash u-boot image + +endchoice + +if TARGET_UCP1020_SPIFLASH +config UCBOOT + bool + default y + +config SPIFLASH + bool + default y +endif + +endif diff --git a/board/Arcturus/ucp1020/MAINTAINERS b/board/Arcturus/ucp1020/MAINTAINERS new file mode 100644 index 000..e4a4718 --- /dev/null +++ b/board/Arcturus/ucp1020/MAINTAINERS @@ -0,0 +1,7 @@ +UCP1020 BOARD +M: Oleksandr Zhadan and Michael Durrant arcsupp...@arcturusnetworks.com +S: Maintained +F: board/Arcturus/ucp1020/ +F: include/configs/UCP1020.h +F: configs/UCP1020_defconfig +F: configs/UCP1020_SPIFLASH_defconfig diff --git a/board/Arcturus/ucp1020/Makefile b/board/Arcturus/ucp1020/Makefile new file mode 100644 index 000..35c88b9 --- /dev/null +++ b/board/Arcturus/ucp1020/Makefile @@ -0,0 +1,33 @@ +# +# Copyright 2013-2015 Arcturus Networks, Inc. +# based on board/freescale/p1_p2_rdb_pc/Makefile +# original copyright follows: +# Copyright 2010-2011 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +MINIMAL= + +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_INIT_MINIMAL +MINIMAL=y +endif +endif + +ifdef MINIMAL + +obj-y += spl_minimal.o tlb.o law.o + +else +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +endif + +obj-y+= ucp1020.o +obj-y+= ddr.o +obj-y+= law.o +obj-y+= tlb.o +obj-y+= cmd_arc.o + +endif diff --git a/board/Arcturus/ucp1020/README b/board/Arcturus/ucp1020/README new file mode 100644 index 000..555c4ef --- /dev/null +++
Re: [U-Boot] [PATCH] arm: implement find_next_zero_bit function
Hello Albert, On 03/27/2015 11:54 AM, Albert ARIBAUD wrote: Hello Vitaly, On Wed, 11 Feb 2015 14:11:12 -0500, Vitaly Andrianov vita...@ti.com wrote: On 02/05/2015 12:52 PM, Albert ARIBAUD wrote: Hello Vitaly, On Thu, 5 Feb 2015 11:24:46 -0500, Vitaly Andrianov vita...@ti.com wrote: This commit copies implementation of the find_next_zero_bit() from git://git.denx.de/u-boot.git/arch/mips/include/asm/bitops.h. v2014.07 The function is required to enable MCAST_TFTP support for ARM platforms. Which mainline board needs this? TI Keystone2 EVMs Just to make sure: this is actually replacing a 'normal' function with an inline one. So the function /was/ available before this patch, right? What inline function are you talking about? I couldn't find this function for ARM. That is why I copied it from MIPS. -Vitaly Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
On Fri, Mar 27, 2015 at 11:06:57PM +0530, Dileep Katta wrote: Implemented fb_set_reboot_flag() for OMAP5 to set an environment variable 'dofastboot' when reboot-bootloader called. This environment variable will be checked in boot command and fastboot will be called if the variable is set. If the bootcmd env variable of OMAP5 common is overwritten with board-specific command, then these changes will not apply. This was originally intended for DRA7 platform, but now applies to all OMAP5. Ref: http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c Signed-off-by: Angela Stegmaier angelaba...@ti.com Signed-off-by: Dileep Katta dileep.ka...@linaro.org Reviewed-by: Tom Rini tr...@konsulko.com -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mpc85xx gpio related header files changes to compile common cmd_gpio.c
Hi York, I add explanation and re-send the same patch. On 03/26/2015 05:20 PM, York Sun wrote: On 03/26/2015 02:16 PM, Oleksandr G Zhadan wrote: From: Oleksandr Zhadan ol...@arcturusnetworks.com Please add commit message to explain why and what you are changing. Signed-off-by: Oleksandr Zhadan ol...@arcturusnetworks.com Signed-off-by: Michael Durrant mdurr...@arcturusnetworks.com --- If you resend the same patch, please add a comment under the --- line. If you make a new version, please add change log. York From: Oleksandr Zhadan ol...@arcturusnetworks.com 1. Fix Incompatibility in functions gpio_free() and gpio_set_value() definitions between asm/gpio.h and asm-generic/gpio.h (void vs int) 2. Fix Compilation error when build common/cmd_gpio.c for mpc85xx (p1020) Signed-off-by: Oleksandr Zhadan ol...@arcturusnetworks.com Signed-off-by: Michael Durrant mdurr...@arcturusnetworks.com --- arch/powerpc/include/asm/arch-mpc85xx/gpio.h |2 ++ arch/powerpc/include/asm/mpc85xx_gpio.h |6 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h index 8beed30..71794a8 100644 --- a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h +++ b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h @@ -12,4 +12,6 @@ #ifndef __ASM_ARCH_MX85XX_GPIO_H #define __ASM_ARCH_MX85XX_GPIO_H +#include asm/mpc85xx_gpio.h + #endif diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h b/arch/powerpc/include/asm/mpc85xx_gpio.h index 87bb4a0..1d0dad4 100644 --- a/arch/powerpc/include/asm/mpc85xx_gpio.h +++ b/arch/powerpc/include/asm/mpc85xx_gpio.h @@ -72,9 +72,10 @@ static inline int gpio_request(unsigned gpio, const char *label) return 0; } -static inline void gpio_free(unsigned gpio) +static inline int gpio_free(unsigned gpio) { /* Compatibility shim */ +return 0; } static inline int gpio_direction_input(unsigned gpio) @@ -97,12 +98,13 @@ static inline int gpio_get_value(unsigned gpio) return !!mpc85xx_gpio_get(1U gpio); } -static inline void gpio_set_value(unsigned gpio, int value) +static inline int gpio_set_value(unsigned gpio, int value) { if (value) mpc85xx_gpio_set_high(1U gpio); else mpc85xx_gpio_set_low(1U gpio); +return 0; } static inline int gpio_is_valid(int gpio) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect
Hi, On 23-03-15 17:38, Hans de Goede wrote: Hi, On 23-03-15 17:33, Paul Kocialkowski wrote: Le lundi 23 mars 2015 à 17:28 +0100, Hans de Goede a écrit : vbus-usable does not get set if power is provided through the power barrel connector, even if external 5v is also present on the otg connector. vbus-available correctly always reflects if there is 5v present on the otg connector. You (or I) could submit the very same change for the AXP209. It's the same bit for available (1 5). Yes I was about to mail you about that when I noticed that this seems to break actual host mode support on the otg connector, it seems that plugging in a micro-b to usb-a receptacle (aka host) convertor + a device plugged into the usb-a receptacle also causes bit 5 to get set :| So my patch is no good, but powering the otg port while external 5v is present also is not good (one side effect is that the tablet will power up immediately after sending a power-off command to the axp221). If you've some time to tinker with this I would appreciate any ideas you may have (assuming the same problem exists on the axp209) simply plug in 5v power into the power barrel, as well as 5v power (e.g. simply from your pc) and boot up the tablet, at least in my case then it does not properly give the charger plugged in error. Ok, so it took me a while but here is a follow up to this: 1) My original patch is correct, but it took me a while to reproduce the original problem, I'll send an updated patch with the reproducer clearly spelled out in the commit msg as it is non obvious 2) My original patch does introduce a *new* problem, or rather exposes an existing problem when turning of vusb to the otg port (when in hostmode, so vusb coming from the board) it takes a while for vusb to discharge and if we are to quick with reading vusb-detect after a reset when the vusb was on we see the residual charge and assume we've an external vusb, this is worse when vbus gets not only sensed, but also controller by the pmic, as then it does not get turned of on reset at all. I've patches fixing all of this now, which I will include in the patch-set which I'm about to send out. I'll put the fixes before this patch in the patch set so that the bug it exposes gets fixed before it is exposed. I think this all does not have much influence on the axp209, because AFAICT we only ever do vbus sense through the pmic there and never vbus control. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 5/7] malloc_f: enable SYS_MALLOC_F by default if DM is on
Hi Tom, Can you apply this series to u-boot/master soon? It's got some Reviewed-by and Acked-by credits, and also, Alexey wants to use 5/7 to enable DM for ARC. Thanks. 2015-03-28 5:10 GMT+09:00 Alexey Brodkin alexey.brod...@synopsys.com: Hello Masahiro-san, On Mon, 2015-03-23 at 15:33 -0600, Simon Glass wrote: On 19 March 2015 at 04:42, Masahiro Yamada yamada.masah...@socionext.com wrote: This option has a bool type, not hex. Fix it and enable it if CONFIG_DM is on because Driver Model always requires malloc memory. Devices are scanned twice, before/after relocation. CONFIG_SYS_MALLOC_F should be enabled to use malloc memory before relocation. As it is board-independent, handle it globally. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Acked-by: Stephen Warren swar...@wwwdotorg.org --- Changes in v2: - Fix a typo s/not board-independent/board-independent/ Reviewed-by: Simon Glass s...@chromium.org I'm wondering if your series Some improvements related to build system is going to be applied to u-boot master branch anytime soon? I have pending update series for ARC where I'm enabling use of Device Model. For this I need to use SYS_MALLOC_F (is required by CONFIG_DM_SERIAL). So I'm interested in your patch [PATCH v3 5/7] malloc_f: enable SYS_MALLOC_F by default if DM is on in particular. Without it I'll need to add SYS_MALLOC_F in arch/arc/Kconfig. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv2 15/20] arm: socfpga: spl: adjust SPL_MALLOC_SIZE to 256
Hi Marek, On 03/04/2015 07:16 AM, Marek Vasut wrote: On Monday, March 02, 2015 at 05:28:03 PM, dingu...@opensource.altera.com wrote: From: Dinh Nguyen dingu...@opensource.altera.com Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Why did you do this change please ? Sorry that it's taken me a while to get back to you on this, but this is why I had to adjust the SPL_MALLOC_SIZE to 256: #define CONFIG_SYS_INIT_RAM_SIZE(0x1 - 0x100) #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE - \ GENERATED_GBL_DATA_SIZE) Because of the above define I only have 0x100 left for SPL_MALLOC_SIZE. I think I should rework this patch to be like this: --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -41,7 +41,7 @@ #define CONFIG_SYS_MEMTEST_END PHYS_SDRAM_1_SIZE #define CONFIG_SYS_INIT_RAM_ADDR 0x -#define CONFIG_SYS_INIT_RAM_SIZE (0x1 - 0x100) +#define CONFIG_SYS_INIT_RAM_SIZE (0x1 - CONFIG_SYS_SPL_MALLOC_SIZE) Dinh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Fix compiler error when build common/cmd_gpio.c for mpc85xx (p1020) when CONFIG_CMD_GPIO is defined
From 33dc654a90fd648d070513d640b161fcd3eda9bd Mon Sep 17 00:00:00 2001 From: Oleksandr Zhadan ol...@arcturusnetworks.com Date: Fri, 27 Mar 2015 16:59:11 -0400 Fix compiler error when build common/cmd_gpio.c for mpc85xx (p1020) when CONFIG_CMD_GPIO is defined and incompatibility in functions gpio_free() and gpio_set_value() definitions between asm/gpio.h and asm-generic/gpio.h Signed-off-by: Oleksandr Zhadan ol...@arcturusnetworks.com Signed-off-by: Michael Durrant mdurr...@arcturusnetworks.com --- arch/powerpc/include/asm/arch-mpc85xx/gpio.h |2 ++ arch/powerpc/include/asm/mpc85xx_gpio.h |6 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h index 8beed30..71794a8 100644 --- a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h +++ b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h @@ -12,4 +12,6 @@ #ifndef __ASM_ARCH_MX85XX_GPIO_H #define __ASM_ARCH_MX85XX_GPIO_H +#include asm/mpc85xx_gpio.h + #endif diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h b/arch/powerpc/include/asm/mpc85xx_gpio.h index 87bb4a0..1d0dad4 100644 --- a/arch/powerpc/include/asm/mpc85xx_gpio.h +++ b/arch/powerpc/include/asm/mpc85xx_gpio.h @@ -72,9 +72,10 @@ static inline int gpio_request(unsigned gpio, const char *label) return 0; } -static inline void gpio_free(unsigned gpio) +static inline int gpio_free(unsigned gpio) { /* Compatibility shim */ + return 0; } static inline int gpio_direction_input(unsigned gpio) @@ -97,12 +98,13 @@ static inline int gpio_get_value(unsigned gpio) return !!mpc85xx_gpio_get(1U gpio); } -static inline void gpio_set_value(unsigned gpio, int value) +static inline int gpio_set_value(unsigned gpio, int value) { if (value) mpc85xx_gpio_set_high(1U gpio); else mpc85xx_gpio_set_low(1U gpio); + return 0; } static inline int gpio_is_valid(int gpio) -- 1.6.4.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] sunxi: various musb host related fixes
Hi All, Here is a bunch of sunxi musb fixes, note I plan to send a pull-req for the first patch for inclusion in v2015.04 as soon as it is acked, the other 3 depend on the axp vbus-det / vbus-ctrl - gpio changes currently in next, and since they fix only a few corner cases I plan to add them to next, and merge them the next cycle. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot