Re: [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem
Hi Simon, > Hi Lukasz, > > On Mon, Jan 7, 2013 at 1:23 AM, Lukasz Majewski > wrote: > > This commit makes the video subsystem code cache aware. > > Memory allocated for decompressed BMP memory is now cache line > > aligned. > > > > Tested-by: Lukasz Majewski > > Signed-off-by: Lukasz Majewski > > Signed-off-by: Kyungmin Park > > Cc: Anatolij Gustschin > > --- > > common/cmd_bmp.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c > > index 5a52edd..57f3eb5 100644 > > --- a/common/cmd_bmp.c > > +++ b/common/cmd_bmp.c > > @@ -55,7 +55,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr, > > unsigned long *lenp) > > * Decompress bmp image > > */ > > len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE; > > - dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE); > > + dst = memalign(CONFIG_SYS_CACHELINE_SIZE, len); > > if (dst == NULL) { > > puts("Error: malloc in gunzip failed!\n"); > > return NULL; > > Sorry, I still have a question. Does this 'dst' address get used as > the actual LCD frame buffer on your board, or is it just copied to the > frame buffer? > I must admit, that I've misunderstood the LCD code a bit. Reply to this post from Anatolij helped me. The buffer (dst) is only the "internal" buffer from which we are assigning BMP data to actual frame buffer area. Then only the frame buffer (pointed by fb pointer) area needs cache flush (which is done at lcd_sync()). To sum up - this patch shall be dropped. However the second patch - [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem is crucial to fix the BMP image display distortion. > Regards, > Simon > > > -- > > 1.7.2.3 > > -- Best regards, Lukasz Majewski Samsung R&D Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/3] EXYNOS5: Add device node for USB.
Hi Marek, On Tue, Jan 8, 2013 at 12:36 PM, Marek Vasut wrote: > Dear Vivek Gautam, > >> From: Rajeshwari Shinde >> >> This patch adds the device node required for USB >> >> Signed-off-by: Vivek Gautam > > Please rebase on u-boot-usb/next. > "exynos5250.dtsi" seems to be missing in u-boot-usb tree. :-( I can't find the exynos5250 side basic device tree support which is already been applied on u-boot-samsung-mainline. Set of five patches from Hatim Ali mentioned below, needs to be pulled for exysno5250 side device tree support. - EXYNOS5: FDT: add initial dts file for EXYNOS5250, SMDK5250 - fdt: exynos5: Add DT node definition for SROM and SMSC9215 - exynos5: Add DT based driver for SMC911X ethernet - exynos5: config: Rename the smdk5250.h to exynos5250-dt.h - SMDK5250: config: Add configuration file for SMDK5250 board Please suggest. -- Thanks & Regards Vivek ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/3] EXYNOS5: Add device node for USB.
Dear Vivek Gautam, > Hi Marek, > > On Tue, Jan 8, 2013 at 12:36 PM, Marek Vasut wrote: > > Dear Vivek Gautam, > > > >> From: Rajeshwari Shinde > >> > >> This patch adds the device node required for USB > >> > >> Signed-off-by: Vivek Gautam > > > > Please rebase on u-boot-usb/next. > > "exynos5250.dtsi" seems to be missing in u-boot-usb tree. :-( > I can't find the exynos5250 side basic device tree support which is already > been applied on u-boot-samsung-mainline. Ok, let's change how to do this then. Apply all four on u-boot-samsung/next. > Set of five patches from Hatim Ali mentioned below, needs to be pulled for > exysno5250 side device tree support. > - EXYNOS5: FDT: add initial dts file for EXYNOS5250, SMDK5250 > - fdt: exynos5: Add DT node definition for SROM and SMSC9215 > - exynos5: Add DT based driver for SMC911X ethernet > - exynos5: config: Rename the smdk5250.h to exynos5250-dt.h > - SMDK5250: config: Add configuration file for SMDK5250 board > > Please suggest. 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 v3 2/3] EXYNOS5: Add device node for USB.
On Tue, Jan 8, 2013 at 2:20 PM, Marek Vasut wrote: > Dear Vivek Gautam, > >> Hi Marek, >> >> On Tue, Jan 8, 2013 at 12:36 PM, Marek Vasut wrote: >> > Dear Vivek Gautam, >> > >> >> From: Rajeshwari Shinde >> >> >> >> This patch adds the device node required for USB >> >> >> >> Signed-off-by: Vivek Gautam >> > >> > Please rebase on u-boot-usb/next. >> >> "exynos5250.dtsi" seems to be missing in u-boot-usb tree. :-( >> I can't find the exynos5250 side basic device tree support which is already >> been applied on u-boot-samsung-mainline. > > Ok, let's change how to do this then. Apply all four on u-boot-samsung/next. > Ok, sure. I shall post all 4 patches including 3 for ehci fdt support and 1 patch for usb vbus rebased on top of u-boot-samsung/master. -- Thanks & Regards Vivek ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/3] EXYNOS5: Add device node for USB.
Dear Vivek Gautam, > On Tue, Jan 8, 2013 at 2:20 PM, Marek Vasut wrote: > > Dear Vivek Gautam, > > > >> Hi Marek, > >> > >> On Tue, Jan 8, 2013 at 12:36 PM, Marek Vasut wrote: > >> > Dear Vivek Gautam, > >> > > >> >> From: Rajeshwari Shinde > >> >> > >> >> This patch adds the device node required for USB > >> >> > >> >> Signed-off-by: Vivek Gautam > >> > > >> > Please rebase on u-boot-usb/next. > >> > >> "exynos5250.dtsi" seems to be missing in u-boot-usb tree. :-( > >> I can't find the exynos5250 side basic device tree support which is > >> already been applied on u-boot-samsung-mainline. > > > > Ok, let's change how to do this then. Apply all four on > > u-boot-samsung/next. > > Ok, sure. I shall post all 4 patches including 3 for ehci fdt support > and 1 patch > for usb vbus rebased on top of u-boot-samsung/master. I think the -samsung custodian shall just pick your series as is. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/3] EHCI: Exynos: Add fdt support
From: Rajeshwari Shinde Adding fdt support to ehci-exynos in order to parse register base addresses from the device node. Signed-off-by: Vivek Gautam Signed-off-by: Rajeshwari Shinde --- Changes in v4: - Rebased on top of u-boot-samsung/master. Changes in v3: - Using macros for error no. - Using a common function exynos_usb_parse_dt() to parse all DT related data. - Using a global structure "exynos_ehci" to store register base addresses and thereby using it. Changes in v2: - Removed checkpatch errors. drivers/usb/host/ehci-exynos.c | 92 +--- 1 files changed, 85 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 9f0ed06..3ca4c5c 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -21,13 +21,71 @@ */ #include +#include +#include +#include #include #include #include #include #include +#include +#include #include "ehci.h" +/* Declare global data pointer */ +DECLARE_GLOBAL_DATA_PTR; + +/** + * Contains pointers to register base addresses + * for the usb controller. + */ +struct exynos_ehci { + struct exynos_usb_phy *usb; + unsigned int *hcd; +}; + +static int exynos_usb_parse_dt(const void *blob, struct exynos_ehci *exynos) +{ + unsigned int node; + int depth; + + node = fdtdec_next_compatible(blob, 0, COMPAT_SAMSUNG_EXYNOS_EHCI); + if (node <= 0) { + debug("EHCI: Can't get device node for ehci\n"); + return -ENODEV; + } + + /* +* Get the base address for EHCI controller from the device node +*/ + exynos->hcd = (unsigned int *)fdtdec_get_addr(blob, node, "reg"); + if (exynos->hcd == NULL) { + debug("Can't get the EHCI register address\n"); + return -ENXIO; + } + + depth = 0; + node = fdtdec_next_compatible_subnode(blob, node, + COMPAT_SAMSUNG_EXYNOS_USB_PHY, &depth); + if (node <= 0) { + debug("EHCI: Can't get device node for usb-phy controller\n"); + return -ENODEV; + } + + /* +* Get the base address for usbphy from the device node +*/ + exynos->usb = (struct exynos_usb_phy *)fdtdec_get_addr(blob, node, + "reg"); + if (exynos->usb == NULL) { + debug("Can't get the usbphy register address\n"); + return -ENXIO; + } + + return 0; +} + /* Setup the EHCI host controller. */ static void setup_usb_phy(struct exynos_usb_phy *usb) { @@ -86,12 +144,20 @@ static void reset_usb_phy(struct exynos_usb_phy *usb) */ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { - struct exynos_usb_phy *usb; + struct exynos_ehci *exynos = NULL; + + exynos = (struct exynos_ehci *) + kzalloc(sizeof(struct exynos_ehci), GFP_KERNEL); + if (!exynos) { + debug("failed to allocate exynos ehci context\n"); + return -ENOMEM; + } - usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy(); - setup_usb_phy(usb); + exynos_usb_parse_dt(gd->fdt_blob, exynos); - *hccr = (struct ehci_hccr *)samsung_get_base_usb_ehci(); + setup_usb_phy(exynos->usb); + + *hccr = (struct ehci_hccr *)(exynos->hcd); *hcor = (struct ehci_hcor *)((uint32_t) *hccr + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); @@ -99,6 +165,8 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); + kfree(exynos); + return 0; } @@ -108,10 +176,20 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) */ int ehci_hcd_stop(int index) { - struct exynos_usb_phy *usb; + struct exynos_ehci *exynos = NULL; + + exynos = (struct exynos_ehci *) + kzalloc(sizeof(struct exynos_ehci), GFP_KERNEL); + if (!exynos) { + debug("failed to allocate exynos ehci context\n"); + return -ENOMEM; + } + + exynos_usb_parse_dt(gd->fdt_blob, exynos); + + reset_usb_phy(exynos->usb); - usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy(); - reset_usb_phy(usb); + kfree(exynos); return 0; } -- 1.7.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/3] EXYNOS5: Add device node for USB.
From: Rajeshwari Shinde This patch adds the device node required for USB Signed-off-by: Vivek Gautam --- Changes in v4: - Rebased on top of u-boot-samsung/master. Changes in v3: - Using a sub-node under ehci node for phy which provides "compatible" and "reg" information. Changes in v2: - None. arch/arm/dts/exynos5250.dtsi | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/arm/dts/exynos5250.dtsi b/arch/arm/dts/exynos5250.dtsi index 1008797..ed8c8dd 100644 --- a/arch/arm/dts/exynos5250.dtsi +++ b/arch/arm/dts/exynos5250.dtsi @@ -138,4 +138,17 @@ reg = <0x131b 0x30>; interrupts = <0 130 0>; }; + + ehci@1211 { + compatible = "samsung,exynos-ehci"; + reg = <0x1211 0x100>; + #address-cells = <1>; + #size-cells = <1>; + + phy { + compatible = "samsung,exynos-usb-phy"; + reg = <0x1213 0x100>; + }; + }; + }; -- 1.7.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 3/3] EXYNOS5: FDT: Add compatible strings for USB
From: Rajeshwari Shinde Add required compatible information for USB Signed-off-by: Vivek Gautam Acked-by: Simon Glass --- Changes in v4: - Rebased on top of u-boot-samsung/master. Changes in v3: - Added compatible string for USB PHY controller. Changes in v2: - None. include/fdtdec.h |2 ++ lib/fdtdec.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/fdtdec.h b/include/fdtdec.h index ce10bf4..0d3417b 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -76,6 +76,8 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS5_SOUND, /* Exynos Sound */ COMPAT_WOLFSON_WM8994_CODEC,/* Wolfson WM8994 Sound Codec */ COMPAT_SAMSUNG_EXYNOS_SPI, /* Exynos SPI */ + COMPAT_SAMSUNG_EXYNOS_EHCI, /* Exynos EHCI controller */ + COMPAT_SAMSUNG_EXYNOS_USB_PHY, /* Exynos phy controller for usb2.0 */ COMPAT_COUNT, }; diff --git a/lib/fdtdec.c b/lib/fdtdec.c index aa75710..4416670 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -51,6 +51,8 @@ static const char * const compat_names[COMPAT_COUNT] = { COMPAT(SAMSUNG_EXYNOS5_SOUND, "samsung,exynos-sound"), COMPAT(WOLFSON_WM8994_CODEC, "wolfson,wm8994-codec"), COMPAT(SAMSUNG_EXYNOS_SPI, "samsung,exynos-spi"), + COMPAT(SAMSUNG_EXYNOS_EHCI, "samsung,exynos-ehci"), + COMPAT(SAMSUNG_EXYNOS_USB_PHY, "samsung,exynos-usb-phy"), }; const char *fdtdec_get_compatible(enum fdt_compat_id id) -- 1.7.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4] SMDK5250: Enable VBus for USB 2.0 controller
This patch enables Vbus required for USB 2.0 controller. Signed-off-by: Vivek Gautam Signed-off-by: Rajeshwari Shinde --- Changes from v3: - Rebased on top of u-boot-samsung/master. Changes from v2: - Rebased on top of u-boot-usb/next - Enclosed the function definition for board_usb_vbus_init() inside "CONFIG_USB_EHCI_EXYNOS" Changes from v1: - Using the old school method of setting up gpio instead of using the pinmux method, since the required gpio line here is board specific. board/samsung/smdk5250/smdk5250.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 73c3ec0..d80f75d 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -35,12 +35,31 @@ DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_USB_EHCI_EXYNOS +int board_usb_vbus_init(void) +{ + struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *) + samsung_get_base_gpio_part1(); + + /* Enable VBUS power switch */ + s5p_gpio_direction_output(&gpio1->x2, 6, 1); + + /* VBUS turn ON time */ + mdelay(3); + + return 0; +} +#endif + int board_init(void) { gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); #ifdef CONFIG_EXYNOS_SPI spi_init(); #endif +#ifdef CONFIG_USB_EHCI_EXYNOS + board_usb_vbus_init(); +#endif return 0; } -- 1.7.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/3] EXYNOS5: Add device node for USB.
Hello, On 08/01/13 18:14, Marek Vasut wrote: > Dear Vivek Gautam, > >> On Tue, Jan 8, 2013 at 2:20 PM, Marek Vasut wrote: >>> Dear Vivek Gautam, >>> Hi Marek, On Tue, Jan 8, 2013 at 12:36 PM, Marek Vasut wrote: > Dear Vivek Gautam, > >> From: Rajeshwari Shinde >> >> This patch adds the device node required for USB >> >> Signed-off-by: Vivek Gautam > > Please rebase on u-boot-usb/next. "exynos5250.dtsi" seems to be missing in u-boot-usb tree. :-( I can't find the exynos5250 side basic device tree support which is already been applied on u-boot-samsung-mainline. >>> >>> Ok, let's change how to do this then. Apply all four on >>> u-boot-samsung/next. >> >> Ok, sure. I shall post all 4 patches including 3 for ehci fdt support >> and 1 patch >> for usb vbus rebased on top of u-boot-samsung/master. > > I think the -samsung custodian shall just pick your series as is. > Then, I will pick up following patches. [U-Boot,v3,1/3] EHCI: Exynos: Add fdt support [U-Boot,v3,2/3] EXYNOS5: Add device node for USB. [U-Boot,v3,3/3] EXYNOS5: FDT: Add compatible strings for USB [U-Boot,v2] SMDK5250: Enable VBus for USB 2.0 controller (V2! not V3) Is it right? Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] mxc nand: Add support for i.MX5
From: Benoît Thébaudeau Signed-off-by: Benoît Thébaudeau Cc: Scott Wood Cc: Stefano Babic --- arch/arm/include/asm/arch-mx5/imx-regs.h |9 ++ drivers/mtd/nand/mxc_nand.c | 219 ++ include/fsl_nfc.h| 149 +--- nand_spl/nand_boot_fsl_nfc.c | 114 4 files changed, 364 insertions(+), 127 deletions(-) NOTE: I'm seeing issues when this is compiled into U-Boot. U-Boot won't boot on my MX53 board and will hang right after printing "DRAM:" and before printing the CPU info. I suspect it's some kind of unaligned access. NOTE2: I fixed a few complaints from GCC and rebased on top of master. diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h index 1d060fd..6821e75 100644 --- a/arch/arm/include/asm/arch-mx5/imx-regs.h +++ b/arch/arm/include/asm/arch-mx5/imx-regs.h @@ -234,6 +234,15 @@ #define CS0_32M_CS1_32M_CS2_32M_CS3_32M3 /* + * SRC register definitions + */ +#if defined(CONFIG_MX51) +#define SRC_SBMR_NF16B (1 << 2) +#elif defined(CONFIG_MX53) +#define SRC_SBMR_NF16B (1 << 13) +#endif + +/* * CSPI register definitions */ #define MXC_ECSPI diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index d0ded48..cead757 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -22,7 +22,8 @@ #include #include #include -#if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX35) +#if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX35) || \ + defined(CONFIG_MX51) || defined(CONFIG_MX53) #include #endif #include @@ -36,6 +37,9 @@ struct mxc_nand_host { struct nand_chip*nand; struct fsl_nfc_regs __iomem *regs; +#ifdef MXC_NFC_V3_2 + struct fsl_nfc_ip_regs __iomem *ip_regs; +#endif int spare_only; int status_request; int pagesize_2k; @@ -77,7 +81,7 @@ static struct nand_ecclayout nand_hw_eccoob2k = { .oobfree = { {2, 4}, {11, 11}, {27, 11}, {43, 11}, {59, 5} }, }; #endif -#elif defined(MXC_NFC_V2_1) +#elif defined(MXC_NFC_V2_1) || defined(MXC_NFC_V3_2) #ifndef CONFIG_SYS_NAND_LARGEPAGE static struct nand_ecclayout nand_hw_eccoob = { .eccbytes = 9, @@ -130,6 +134,16 @@ static int is_16bit_nand(void) else return 0; } +#elif defined(CONFIG_MX51) || defined(CONFIG_MX53) +static int is_16bit_nand(void) +{ + struct src *src = (struct src *)SRC_BASE_ADDR; + + if (readl(&src->sbmr) & SRC_SBMR_NF16B) + return 1; + else + return 0; +} #else #warning "8/16 bit NAND autodetection not supported" static int is_16bit_nand(void) @@ -150,7 +164,7 @@ static uint32_t *mxc_nand_memcpy32(uint32_t *dest, uint32_t *source, size_t size /* * This function polls the NANDFC to wait for the basic operation to - * complete by checking the INT bit of config2 register. + * complete by checking the INT bit. */ static void wait_op_done(struct mxc_nand_host *host, int max_retries, uint16_t param) @@ -158,10 +172,17 @@ static void wait_op_done(struct mxc_nand_host *host, int max_retries, uint32_t tmp; while (max_retries-- > 0) { - if (readw(&host->regs->config2) & NFC_INT) { - tmp = readw(&host->regs->config2); - tmp &= ~NFC_INT; - writew(tmp, &host->regs->config2); +#if defined(MXC_NFC_V1) || defined(MXC_NFC_V2_1) + tmp = readnfc(&host->regs->config2); + if (tmp & NFC_V1_V2_CONFIG2_INT) { + tmp &= ~NFC_V1_V2_CONFIG2_INT; + writenfc(tmp, &host->regs->config2); +#elif defined(MXC_NFC_V3_2) + tmp = readnfc(&host->ip_regs->ipc); + if (tmp & NFC_V3_IPC_INT) { + tmp &= ~NFC_V3_IPC_INT; + writenfc(tmp, &host->ip_regs->ipc); +#endif break; } udelay(1); @@ -180,8 +201,8 @@ static void send_cmd(struct mxc_nand_host *host, uint16_t cmd) { MTDDEBUG(MTD_DEBUG_LEVEL3, "send_cmd(host, 0x%x)\n", cmd); - writew(cmd, &host->regs->flash_cmd); - writew(NFC_CMD, &host->regs->config2); + writenfc(cmd, &host->regs->flash_cmd); + writenfc(NFC_CMD, &host->regs->operation); /* Wait for operation to complete */ wait_op_done(host, TROP_US_DELAY, cmd); @@ -196,8 +217,8 @@ static void send_addr(struct mxc_nand_host *host, uint16_t addr) { MTDDEBUG(MTD_DEBUG_LEVEL3, "send_addr(host, 0x%x)\n", addr); - writew(addr, &host->regs->flash_addr); - writew(NFC_ADDR, &host->regs->config2); + writenfc(addr, &host->regs->flash_addr); + writenfc(
Re: [U-Boot] [PATCH v3 2/3] EXYNOS5: Add device node for USB.
Dear Minkyu Kang, > Hello, > > On 08/01/13 18:14, Marek Vasut wrote: > > Dear Vivek Gautam, > > > >> On Tue, Jan 8, 2013 at 2:20 PM, Marek Vasut wrote: > >>> Dear Vivek Gautam, > >>> > Hi Marek, > > On Tue, Jan 8, 2013 at 12:36 PM, Marek Vasut wrote: > > Dear Vivek Gautam, > > > >> From: Rajeshwari Shinde > >> > >> This patch adds the device node required for USB > >> > >> Signed-off-by: Vivek Gautam > > > > Please rebase on u-boot-usb/next. > > "exynos5250.dtsi" seems to be missing in u-boot-usb tree. :-( > I can't find the exynos5250 side basic device tree support which is > already been applied on u-boot-samsung-mainline. > >>> > >>> Ok, let's change how to do this then. Apply all four on > >>> u-boot-samsung/next. > >> > >> Ok, sure. I shall post all 4 patches including 3 for ehci fdt support > >> and 1 patch > >> for usb vbus rebased on top of u-boot-samsung/master. > > > > I think the -samsung custodian shall just pick your series as is. > > Then, I will pick up following patches. > > [U-Boot,v3,1/3] EHCI: Exynos: Add fdt support > [U-Boot,v3,2/3] EXYNOS5: Add device node for USB. > [U-Boot,v3,3/3] EXYNOS5: FDT: Add compatible strings for USB > [U-Boot,v2] SMDK5250: Enable VBus for USB 2.0 controller (V2! not V3) > > Is it right? Yes, thanks man! > Thanks, > Minkyu Kang. 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 v3 2/3] EXYNOS5: Add device node for USB.
Hi Minkyu Kang, On Tue, Jan 8, 2013 at 3:03 PM, Marek Vasut wrote: > Dear Minkyu Kang, > >> Hello, >> >> On 08/01/13 18:14, Marek Vasut wrote: >> > Dear Vivek Gautam, >> > >> >> On Tue, Jan 8, 2013 at 2:20 PM, Marek Vasut wrote: >> >>> Dear Vivek Gautam, >> >>> >> Hi Marek, >> >> On Tue, Jan 8, 2013 at 12:36 PM, Marek Vasut wrote: >> > Dear Vivek Gautam, >> > >> >> From: Rajeshwari Shinde >> >> >> >> This patch adds the device node required for USB >> >> >> >> Signed-off-by: Vivek Gautam >> > >> > Please rebase on u-boot-usb/next. >> >> "exynos5250.dtsi" seems to be missing in u-boot-usb tree. :-( >> I can't find the exynos5250 side basic device tree support which is >> already been applied on u-boot-samsung-mainline. >> >>> >> >>> Ok, let's change how to do this then. Apply all four on >> >>> u-boot-samsung/next. >> >> >> >> Ok, sure. I shall post all 4 patches including 3 for ehci fdt support >> >> and 1 patch >> >> for usb vbus rebased on top of u-boot-samsung/master. >> > >> > I think the -samsung custodian shall just pick your series as is. >> >> Then, I will pick up following patches. >> >> [U-Boot,v3,1/3] EHCI: Exynos: Add fdt support >> [U-Boot,v3,2/3] EXYNOS5: Add device node for USB. >> [U-Boot,v3,3/3] EXYNOS5: FDT: Add compatible strings for USB >> [U-Boot,v2] SMDK5250: Enable VBus for USB 2.0 controller (V2! not V3) >> >> Is it right? > > Yes, thanks man! > I have just sent the v4 for these patches. [U-Boot] [PATCH v4 1/3] EHCI: Exynos: Add fdt support [U-Boot] [PATCH v4 2/3] EXYNOS5: Add device node for USB. [U-Boot] [PATCH v4 3/3] EXYNOS5: FDT: Add compatible strings for USB [U-Boot] [PATCH v4] SMDK5250: Enable VBus for USB 2.0 controller Please apply the same. these are rebased on top of tree of u-boot-samsung. -- Thanks & Regards Vivek ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem
Dear Lukasz, On 07/01/13 18:23, Lukasz Majewski wrote: > lcd_set_flush_dcache(1) function is called from trats configuration file > to enable lcd_sync function. > > Tested-at: TRATS (Exynos 4210) > Tested-by: Lukasz Majewski > Signed-off-by: Lukasz Majewski > Signed-off-by: Kyungmin Park > Cc: Minkyu Kang > --- > board/samsung/trats/trats.c |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c > index 88d193d..5d0fdd0 100644 > --- a/board/samsung/trats/trats.c > +++ b/board/samsung/trats/trats.c > @@ -789,5 +789,8 @@ void init_panel_info(vidinfo_t *vid) > s6e8ax0_init(); > exynos_set_dsim_platform_data(&s6e8ax0_platform_data); > > + /* Enable flushing after LCD writes if requested */ > + lcd_set_flush_dcache(1); Please move it into exynos_fb.c (lcd_ctrl_init? or somewhere) > + > setenv("lcdinfo", "lcd=s6e8ax0"); > } > Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] video:cache:fix: Enable dcache flush at LCD subsystem for Exynos based boards
lcd_set_flush_dcache(1) function is called from exynos_fb.c (exynos_lcd_init()) file to enable lcd_sync() function. Tested-at: TRATS (Exynos 4210) Tested-by: Lukasz Majewski Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park Cc: Minkyu Kang --- drivers/video/exynos_fb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index d9a3f9a..17e1069 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -63,6 +63,8 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid) static void exynos_lcd_init(vidinfo_t *vid) { exynos_fimd_lcd_init(vid); + /* Enable flushing after LCD writes if requested */ + lcd_set_flush_dcache(1); } static void draw_logo(void) -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mxc nand: Add support for i.MX5
On Tue, Jan 8, 2013 at 7:33 AM, Marek Vasut wrote: > From: Benoît Thébaudeau > > Signed-off-by: Benoît Thébaudeau > Cc: Scott Wood > Cc: Stefano Babic > --- > arch/arm/include/asm/arch-mx5/imx-regs.h |9 ++ > drivers/mtd/nand/mxc_nand.c | 219 > ++ > include/fsl_nfc.h| 149 +--- > nand_spl/nand_boot_fsl_nfc.c | 114 > 4 files changed, 364 insertions(+), 127 deletions(-) > > NOTE: I'm seeing issues when this is compiled into U-Boot. U-Boot won't boot > on > my MX53 board and will hang right after printing "DRAM:" and before printing > the > CPU info. I suspect it's some kind of unaligned access. I was seeing the same problem and this patch fixed it: http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commit;h=1411fb37b5a8d56bececc5e6ea09d2e0670b9810 Let me know if this fixes the issue you are seeing. Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mxc nand: Add support for i.MX5
Dear Marek Vasut, On Tuesday, January 8, 2013 10:33:29 AM, Marek Vasut wrote: > Subject: [PATCH 1/2] mxc nand: Add support for i.MX5 Where is the 2/2? > > From: Benoît Thébaudeau > > Signed-off-by: Benoît Thébaudeau > Cc: Scott Wood > Cc: Stefano Babic > --- > arch/arm/include/asm/arch-mx5/imx-regs.h |9 ++ > drivers/mtd/nand/mxc_nand.c | 219 > ++ > include/fsl_nfc.h| 149 +--- > nand_spl/nand_boot_fsl_nfc.c | 114 > 4 files changed, 364 insertions(+), 127 deletions(-) > > NOTE: I'm seeing issues when this is compiled into U-Boot. U-Boot > won't boot on > my MX53 board and will hang right after printing "DRAM:" and before > printing the > CPU info. I suspect it's some kind of unaligned access. OK. I'm waiting for your test results. It works for me on i.MX51 with 2012.07. > > NOTE2: I fixed a few complaints from GCC Which ones? I don't see any such change in this new version. > and rebased on top of > master. OK. [--snip--] > @@ -698,7 +757,7 @@ static int mxc_nand_correct_data(struct mtd_info > *mtd, u_char *dat, >* additional correction. 2-Bit errors cannot be corrected by >* HW ECC, so we need to return failure >*/ > - uint16_t ecc_status = readw(&host->regs->ecc_status_result); > + uint32_t ecc_status = readnfc(&host->regs->ecc_status_result); ^ Here it was uint16_t in my last version, and this was correct since this is code for MXC_NFC_V1. This change should not hurt, but it was not necessary. Is this change related to the GCC complaints that you mentioned? > > if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) { > MTDDEBUG(MTD_DEBUG_LEVEL0, [--snip--] The other changes (i.e. the rebase) are fine with me. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mxc nand: Add support for i.MX5
Dear Benoît Thébaudeau, > Dear Marek Vasut, > > On Tuesday, January 8, 2013 10:33:29 AM, Marek Vasut wrote: > > Subject: [PATCH 1/2] mxc nand: Add support for i.MX5 > > Where is the 2/2? Nowhere, it's a typo. > > From: Benoît Thébaudeau > > > > Signed-off-by: Benoît Thébaudeau > > Cc: Scott Wood > > Cc: Stefano Babic > > --- > > > > arch/arm/include/asm/arch-mx5/imx-regs.h |9 ++ > > drivers/mtd/nand/mxc_nand.c | 219 > > ++ > > include/fsl_nfc.h| 149 +--- > > nand_spl/nand_boot_fsl_nfc.c | 114 > > 4 files changed, 364 insertions(+), 127 deletions(-) > > > > NOTE: I'm seeing issues when this is compiled into U-Boot. U-Boot > > won't boot on > > my MX53 board and will hang right after printing "DRAM:" and before > > printing the > > CPU info. I suspect it's some kind of unaligned access. > > OK. I'm waiting for your test results. It works for me on i.MX51 with > 2012.07. It works with 2013.01-rc1, but I have issues. When I boot the board from SD, it hangs. When I load via JTAG, it doesn't hang. I suspect it's something related to the MXC NAND driver, since if the driver is not compiled in, it works like charm both ways. Otherwise, when booted, the NAND works fine. I wonder if there's some unaligned access or something happening in the NAND driver. Or maybe some other issue where the code is miscompiled. > > NOTE2: I fixed a few complaints from GCC > > Which ones? I don't see any such change in this new version. This one I think: 354 @@ -1167,8 +1226,8 @@ static struct nand_bbt_descr bbt_mirror_descr = { 355 int board_nand_init(struct nand_chip *this) 356 { 357 struct mtd_info *mtd; 358 -#ifdef MXC_NFC_V2_1 359 - uint16_t tmp; 360 +#if defined(MXC_NFC_V2_1) || defined(MXC_NFC_V3_2) 361 + uint32_t tmp; 362 #endif 363 364 #ifdef CONFIG_SYS_NAND_USE_FLASH_BBT > > and rebased on top of > > master. > > OK. > > [--snip--] > > > @@ -698,7 +757,7 @@ static int mxc_nand_correct_data(struct mtd_info > > *mtd, u_char *dat, > > > > * additional correction. 2-Bit errors cannot be corrected by > > * HW ECC, so we need to return failure > > */ > > > > - uint16_t ecc_status = readw(&host->regs->ecc_status_result); > > + uint32_t ecc_status = readnfc(&host->regs->ecc_status_result); > > ^ > Here it was uint16_t in my last version, and this was correct since this is > code for MXC_NFC_V1. This change should not hurt, but it was not > necessary. But in case readnfc() results in readl(), u16 is too small. > Is this change related to the GCC complaints that you mentioned? No, there's one more, see above. > > if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) { > > > > MTDDEBUG(MTD_DEBUG_LEVEL0, > > [--snip--] > > The other changes (i.e. the rebase) are fine with me. I hope I didn't screw up the attribution. I used "From:" which I hope is correct. > Best regards, > Benoît 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 1/2] mxc nand: Add support for i.MX5
Dear Fabio Estevam, > On Tue, Jan 8, 2013 at 7:33 AM, Marek Vasut wrote: > > From: Benoît Thébaudeau > > > > Signed-off-by: Benoît Thébaudeau > > Cc: Scott Wood > > Cc: Stefano Babic > > --- > > > > arch/arm/include/asm/arch-mx5/imx-regs.h |9 ++ > > drivers/mtd/nand/mxc_nand.c | 219 > > ++ include/fsl_nfc.h > > | 149 +--- nand_spl/nand_boot_fsl_nfc.c | > > 114 4 files changed, 364 insertions(+), 127 > > deletions(-) > > > > NOTE: I'm seeing issues when this is compiled into U-Boot. U-Boot won't > > boot on my MX53 board and will hang right after printing "DRAM:" and > > before printing the CPU info. I suspect it's some kind of unaligned > > access. > > I was seeing the same problem and this patch fixed it: > http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commit;h=1411fb37b5a8d56becec > c5e6ea09d2e0670b9810 > > Let me know if this fixes the issue you are seeing. I have that applied, but still seeing the issue. Maybe there's some additional problem with the NAND driver ? 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 1/2] mxc nand: Add support for i.MX5
Dear Marek Vasut, On Tuesday, January 8, 2013 11:38:39 AM, Marek Vasut wrote: > Dear Benoît Thébaudeau, > > > Dear Marek Vasut, > > > > On Tuesday, January 8, 2013 10:33:29 AM, Marek Vasut wrote: > > > Subject: [PATCH 1/2] mxc nand: Add support for i.MX5 > > > > Where is the 2/2? > > Nowhere, it's a typo. OK. > > > From: Benoît Thébaudeau > > > > > > Signed-off-by: Benoît Thébaudeau > > > Cc: Scott Wood > > > Cc: Stefano Babic > > > --- > > > > > > arch/arm/include/asm/arch-mx5/imx-regs.h |9 ++ > > > drivers/mtd/nand/mxc_nand.c | 219 > > > ++ > > > include/fsl_nfc.h| 149 > > > +--- > > > nand_spl/nand_boot_fsl_nfc.c | 114 > > > 4 files changed, 364 insertions(+), 127 deletions(-) > > > > > > NOTE: I'm seeing issues when this is compiled into U-Boot. U-Boot > > > won't boot on > > > my MX53 board and will hang right after printing "DRAM:" and > > > before > > > printing the > > > CPU info. I suspect it's some kind of unaligned access. > > > > OK. I'm waiting for your test results. It works for me on i.MX51 > > with > > 2012.07. > > It works with 2013.01-rc1, but I have issues. When I boot the board > from SD, it > hangs. When I load via JTAG, it doesn't hang. I suspect it's > something related > to the MXC NAND driver, since if the driver is not compiled in, it > works like > charm both ways. > > Otherwise, when booted, the NAND works fine. > > I wonder if there's some unaligned access or something happening in > the NAND > driver. Or maybe some other issue where the code is miscompiled. Or there is something wrong with the Flash header or SPL? > > > NOTE2: I fixed a few complaints from GCC > > > > Which ones? I don't see any such change in this new version. > > This one I think: > > 354 @@ -1167,8 +1226,8 @@ static struct nand_bbt_descr > bbt_mirror_descr = { > 355 int board_nand_init(struct nand_chip *this) > 356 { > 357 struct mtd_info *mtd; > 358 -#ifdef MXC_NFC_V2_1 > 359 - uint16_t tmp; > 360 +#if defined(MXC_NFC_V2_1) || defined(MXC_NFC_V3_2) > 361 + uint32_t tmp; > 362 #endif > 363 > 364 #ifdef CONFIG_SYS_NAND_USE_FLASH_BBT This is just the rebase. Or perhaps you started from http://patchwork.ozlabs.org/patch/177098/ instead of http://patchwork.ozlabs.org/patch/179176/. > > > and rebased on top of > > > master. > > > > OK. > > > > [--snip--] > > > > > @@ -698,7 +757,7 @@ static int mxc_nand_correct_data(struct > > > mtd_info > > > *mtd, u_char *dat, > > > > > >* additional correction. 2-Bit errors cannot be corrected by > > >* HW ECC, so we need to return failure > > >*/ > > > > > > - uint16_t ecc_status = readw(&host->regs->ecc_status_result); > > > + uint32_t ecc_status = readnfc(&host->regs->ecc_status_result); > > > > ^ > > Here it was uint16_t in my last version, and this was correct since > > this is > > code for MXC_NFC_V1. This change should not hurt, but it was not > > necessary. > > But in case readnfc() results in readl(), u16 is too small. readnfc() always results in readw() for MXC_NFC_V1, so u16 is just fine here. > > Is this change related to the GCC complaints that you mentioned? > > No, there's one more, see above. > > > > if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) { > > > > > > MTDDEBUG(MTD_DEBUG_LEVEL0, > > > > [--snip--] > > > > The other changes (i.e. the rebase) are fine with me. > > I hope I didn't screw up the attribution. I used "From:" which I hope > is > correct. It's correctly filled, but I don't know if it's used by U-Boot's Git process. I have already seen this "From:" used before. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mxc nand: Add support for i.MX5
Dear Benoît Thébaudeau, [...] > > > > NOTE: I'm seeing issues when this is compiled into U-Boot. U-Boot > > > > won't boot on > > > > my MX53 board and will hang right after printing "DRAM:" and > > > > before > > > > printing the > > > > CPU info. I suspect it's some kind of unaligned access. > > > > > > OK. I'm waiting for your test results. It works for me on i.MX51 > > > with > > > 2012.07. > > > > It works with 2013.01-rc1, but I have issues. When I boot the board > > from SD, it > > hangs. When I load via JTAG, it doesn't hang. I suspect it's > > something related > > to the MXC NAND driver, since if the driver is not compiled in, it > > works like > > charm both ways. > > > > Otherwise, when booted, the NAND works fine. > > > > I wonder if there's some unaligned access or something happening in > > the NAND > > driver. Or maybe some other issue where the code is miscompiled. > > Or there is something wrong with the Flash header or SPL? Flash header? SPL is not used, I boot from SD. > > > > NOTE2: I fixed a few complaints from GCC > > > > > > Which ones? I don't see any such change in this new version. > > > > This one I think: > > > > 354 @@ -1167,8 +1226,8 @@ static struct nand_bbt_descr > > bbt_mirror_descr = { > > 355 int board_nand_init(struct nand_chip *this) > > 356 { > > 357 struct mtd_info *mtd; > > 358 -#ifdef MXC_NFC_V2_1 > > 359 - uint16_t tmp; > > 360 +#if defined(MXC_NFC_V2_1) || defined(MXC_NFC_V3_2) > > 361 + uint32_t tmp; > > 362 #endif > > 363 > > 364 #ifdef CONFIG_SYS_NAND_USE_FLASH_BBT > > This is just the rebase. Or perhaps you started from > http://patchwork.ozlabs.org/patch/177098/ instead of > http://patchwork.ozlabs.org/patch/179176/. Lemme try the V2, thanks. [...] ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] ARM: OMAP5: redefine arm_setup_identity_mapping
Hi Vincent, On Monday 07 January 2013 08:14 PM, Vincent Stehlé wrote: We introduce an OMAP5 specific version of arm_setup_identity_mapping(), which makes the first page of the identity mapping invalid. We want to unmap the region near address zero on HS OMAP devices, to avoid speculative accesses. Accessing this region causes security violations, which we want to avoid. Signed-off-by: Vincent Stehlé Cc: Tom Rini --- Changes for v4: - Protect functions according to cache config - Remove page_table argument - Declare global data ptr and use it to retrieve page_table Changes for v3: - Use definition of __arm_setup_identity_mapping() from asm/cache.h Changes for v2: - Fix missing page_table argument - Add extern definition to fix compilation warning arch/arm/cpu/armv7/omap5/Makefile |1 + arch/arm/cpu/armv7/omap5/cache-cp15.c | 52 + 2 files changed, 53 insertions(+) create mode 100644 arch/arm/cpu/armv7/omap5/cache-cp15.c diff --git a/arch/arm/cpu/armv7/omap5/Makefile b/arch/arm/cpu/armv7/omap5/Makefile index 9b261c4..49c454c 100644 --- a/arch/arm/cpu/armv7/omap5/Makefile +++ b/arch/arm/cpu/armv7/omap5/Makefile @@ -29,6 +29,7 @@ COBJS += hwinit.o COBJS += clocks.o COBJS += emif.o COBJS += sdram.o +COBJS += cache-cp15.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) diff --git a/arch/arm/cpu/armv7/omap5/cache-cp15.c b/arch/arm/cpu/armv7/omap5/cache-cp15.c new file mode 100644 index 000..a9666f7 --- /dev/null +++ b/arch/arm/cpu/armv7/omap5/cache-cp15.c @@ -0,0 +1,52 @@ +/* + * (C) Copyright 2002 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * (C) Copyright 2012 + * Vincent Stehlé, Texas Instruments, v-ste...@ti.com. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include + +#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) + +DECLARE_GLOBAL_DATA_PTR; + +/* OMAP5 specific function to set up the identity mapping. */ +void arm_setup_identity_mapping(void) +{ + u32 *page_table = (u32 *)gd->tlb_addr; + + /* +* Perform default mapping, which sets up an identity-mapping for all +* 4GB, rw for everyone. +*/ + __arm_setup_identity_mapping(); + + /* +* First page (starting at 0x0) is made invalid to avoid speculative +* accesses in secure rom. +* TODO: use second level descriptors for finer grained mapping. +*/ + page_table[0] = 0; +} First, really sorry for the late response on this. We had this problem of speculative aborts in the kernel uncompress code as well, which maps all of 4GB address space. It was solved by setting the non-DRAM region as non-executable(XN) and with client permissions to the domain in the DACR register. This way speculative prefetches are avoided not only to the page 0, but also to other read sensitive I/O regions. I have created a similar patch in u-boot and posted a RFC now. I was using your first patch [1] and rest from me. [1] http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html Please let me know your take on that. Regards, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mxc nand: Add support for i.MX5
Dear Marek Vasut, On Tuesday, January 8, 2013 12:05:26 PM, Marek Vasut wrote: > Dear Benoît Thébaudeau, > > [...] > > > > > > NOTE: I'm seeing issues when this is compiled into U-Boot. > > > > > U-Boot > > > > > won't boot on > > > > > my MX53 board and will hang right after printing "DRAM:" and > > > > > before > > > > > printing the > > > > > CPU info. I suspect it's some kind of unaligned access. > > > > > > > > OK. I'm waiting for your test results. It works for me on > > > > i.MX51 > > > > with > > > > 2012.07. > > > > > > It works with 2013.01-rc1, but I have issues. When I boot the > > > board > > > from SD, it > > > hangs. When I load via JTAG, it doesn't hang. I suspect it's > > > something related > > > to the MXC NAND driver, since if the driver is not compiled in, > > > it > > > works like > > > charm both ways. > > > > > > Otherwise, when booted, the NAND works fine. > > > > > > I wonder if there's some unaligned access or something happening > > > in > > > the NAND > > > driver. Or maybe some other issue where the code is miscompiled. > > > > Or there is something wrong with the Flash header or SPL? > > Flash header? The IVT from imximage stuff. > SPL is not used, I boot from SD. OK. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 1/2] ARM: cache: Introduce weak dram_bank_setup function
Introduce a weak version of dram_bank_setup function to allow a platform specific redefinition. This is used in the subsequent patch to setup dram region without 'XN' attribute in order to enable the region under client permissions. Signed-off-by: R Sricharan Cc: Vincent Stehle Cc: Tom Rini --- arch/arm/include/asm/cache.h |1 + arch/arm/lib/cache-cp15.c|7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index eef6a5a..93811d2 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h @@ -42,6 +42,7 @@ static inline void invalidate_l2_cache(void) void l2_cache_enable(void); void l2_cache_disable(void); +void dram_bank_mmu_setup(int bank); /* * The current upper bound for ARM L1 data cache line sizes is 64 bytes. We * use that value for aligning DMA buffers unless the board config has specified diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 6edf815..843078e 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -23,6 +23,8 @@ #include #include +#include +#include #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) @@ -77,7 +79,7 @@ void mmu_set_region_dcache_behaviour(u32 start, int size, mmu_page_table_flush((u32)&page_table[start], (u32)&page_table[end]); } -static inline void dram_bank_mmu_setup(int bank) +void __dram_bank_mmu_setup(int bank) { bd_t *bd = gd->bd; int i; @@ -94,6 +96,9 @@ static inline void dram_bank_mmu_setup(int bank) } } +void dram_bank_mmu_setup(int bank) + __attribute__((weak, alias("__dram_bank_mmu_setup"))); + /* to activate the MMU we need to set up virtual memory: use 1M areas */ static inline void mmu_setup(void) { -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 2/2] ARM: mmu: Set domain permissions to client access
The 'XN' execute never bit is set in the pagetables. This will prevent speculative prefetches to non executable regions. But the domain permissions are set as master in the DACR register. So the pagetable attribute for 'XN' is not effective. Change the permissions to client. This fixes lot of speculative prefetch aborts seen with CORTEX A15 otherwise. Signed-off-by: R Sricharan Cc: Vincent Stehle Cc: Tom Rini --- arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c |9 ++ 4 files changed, 61 insertions(+) diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c index 5f6d039..8748c14 100644 --- a/arch/arm/cpu/armv7/cache_v7.c +++ b/arch/arm/cpu/armv7/cache_v7.c @@ -340,6 +340,9 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop) { } +void arm_init_domains(void) +{ +} #endif /* #ifndef CONFIG_SYS_DCACHE_OFF */ #ifndef CONFIG_SYS_ICACHE_OFF diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index 9ef10bd..4eaf75b 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -32,6 +32,12 @@ #include #include #include +#include +#include + +#define ARMV7_DCACHE_WRITEBACK 0xe +#defineARMV7_DOMAIN_CLIENT 1 +#define ARMV7_DOMAIN_MASK (0x3 << 0) DECLARE_GLOBAL_DATA_PTR; @@ -258,4 +264,33 @@ void enable_caches(void) /* Enable D-cache. I-cache is already enabled in start.S */ dcache_enable(); } + +void dram_bank_mmu_setup(int bank) +{ + bd_t *bd = gd->bd; + int i; + + u32 start = bd->bi_dram[bank].start >> 20; + u32 size = bd->bi_dram[bank].size >> 20; + u32 end = start + size; + + debug("%s: bank: %d\n", __func__, bank); + for (i = start; i < end; i++) + set_section_dcache(i, ARMV7_DCACHE_WRITEBACK); + +} + +void arm_init_domains(void) +{ + u32 reg; + + reg = get_dacr(); + /* + * Set DOMAIN to client access so that all permissions + * set in pagetables are validated by the mmu. + */ + reg &= ~ARMV7_DOMAIN_MASK; + reg |= ARMV7_DOMAIN_CLIENT; + set_dacr(reg); +} #endif diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 78ca8e0..9cfbb17 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -75,6 +75,20 @@ static inline void set_cr(unsigned int val) isb(); } +static inline unsigned int get_dacr(void) +{ + unsigned int val; + asm("mrc p15, 0, %0, c3, c0, 0 @ get DACR" : "=r" (val) : : "cc"); + return val; +} + +static inline void set_dacr(unsigned int val) +{ + asm volatile("mcr p15, 0, %0, c3, c0, 0 @ set DACR" + : : "r" (val) : "cc"); + isb(); +} + /* options available for data cache on each page */ enum dcache_option { DCACHE_OFF = 0x12, diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 843078e..2149677 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -36,6 +36,12 @@ void __arm_init_before_mmu(void) void arm_init_before_mmu(void) __attribute__((weak, alias("__arm_init_before_mmu"))); +void __arm_init_domains(void) +{ +} +void arm_init_domains(void) + __attribute__((weak, alias("__arm_init_domains"))); + static void cp_delay (void) { volatile int i; @@ -120,6 +126,9 @@ static inline void mmu_setup(void) /* Set the access control to all-supervisor */ asm volatile("mcr p15, 0, %0, c3, c0, 0" : : "r" (~0)); + + arm_init_domains(); + /* and enable the mmu */ reg = get_cr(); /* get control reg. */ cp_delay(); -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request for u-boot-marvell.git
Dear Prafulla Wadaskar, On 07.01.2013 13:26, Prafulla Wadaskar wrote: > > >> -Original Message- >> From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] >> Sent: 23 December 2012 20:40 >> To: Prafulla Wadaskar >> Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; >> 'Wolfgang Denk'; Andreas Bießmann >> Subject: Re: Pull request for u-boot-marvell.git >> >> Hi Prafulla, >> >> On Thu, 20 Dec 2012 02:05:36 -0800, Prafulla Wadaskar >> wrote: >>> Dear Albert >>> Please discard my earlier pull request and please pull >>> The following changes since commit >> b8a7c467960ffb4d5a5e1eef5f7783fb6f594542: >>> andreas.de...@googlemail.com (1): >>> mv-common.h: increase malloc arena to 4MiB >> >> Is that last commit really supposed to be with Andreas Bießmann's >> e-mail only, without his name? > > Hi Albert, > Sorry for the late reply, > Yes, it is with Andreas Bießmann' email only, I wonder how his name is > removed from this commit. > I will check and let you know. maybe this is again some encoding issue. The original 'From' is like that: ---8<--- From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= --->8--- Maybe somehow your toolchain removed the coded string. Git however can work with this like a charm. So this is just an asumption, I do not know your toolchain. Best regards Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] uboot and Ethernet Controller issue
Hi, I have developed a PowerPC MPC7410 based processor board with Tsi107 as the Host bridge and intel 82551 the ethernet controller. We have ported u-boot-1.3.1 into it as its boot loader. The issue is as follows: When the board is powered on, i can ping to the host system through the ethernet port. I can do the tftp, i can do an nfs boot. But if I remain in uboot prompt for 90 minutes, then try to do a ping to the host machine, it says "Cannot reset the ethernet controller". The timing of this issue is about 90 minutes everytime. Is it something to do with the config of ethernet controller? Please advice. Thanks and Regards, Sandeep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 1/2] ARM: cache: Introduce weak dram_bank_setup function
On 01/08/2013 12:18 PM, R Sricharan wrote: > Introduce a weak version of dram_bank_setup function > to allow a platform specific redefinition. > > This is used in the subsequent patch to setup dram region > without 'XN' attribute in order to enable the region > under client permissions. > > Signed-off-by: R Sricharan > Cc: Vincent Stehle > Cc: Tom Rini > --- > arch/arm/include/asm/cache.h |1 + > arch/arm/lib/cache-cp15.c|7 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h > index eef6a5a..93811d2 100644 > --- a/arch/arm/include/asm/cache.h > +++ b/arch/arm/include/asm/cache.h > @@ -42,6 +42,7 @@ static inline void invalidate_l2_cache(void) > void l2_cache_enable(void); > void l2_cache_disable(void); > > +void dram_bank_mmu_setup(int bank); > /* > * The current upper bound for ARM L1 data cache line sizes is 64 bytes. We > * use that value for aligning DMA buffers unless the board config has > specified > diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c > index 6edf815..843078e 100644 > --- a/arch/arm/lib/cache-cp15.c > +++ b/arch/arm/lib/cache-cp15.c > @@ -23,6 +23,8 @@ > > #include > #include > +#include > +#include > > #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) > > @@ -77,7 +79,7 @@ void mmu_set_region_dcache_behaviour(u32 start, int size, > mmu_page_table_flush((u32)&page_table[start], (u32)&page_table[end]); > } > > -static inline void dram_bank_mmu_setup(int bank) > +void __dram_bank_mmu_setup(int bank) > { > bd_t *bd = gd->bd; > int i; > @@ -94,6 +96,9 @@ static inline void dram_bank_mmu_setup(int bank) > } > } > > +void dram_bank_mmu_setup(int bank) > + __attribute__((weak, alias("__dram_bank_mmu_setup"))); Please use this instead (you already included linux/compiler.h for this): __weak void dram_bank_mmu_setup(int bank) { ... Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/3] EHCI: Exynos: Add fdt support
On 08/01/13 18:35, Vivek Gautam wrote: > From: Rajeshwari Shinde > > Adding fdt support to ehci-exynos in order to parse > register base addresses from the device node. > > Signed-off-by: Vivek Gautam > Signed-off-by: Rajeshwari Shinde > --- > > Changes in v4: > - Rebased on top of u-boot-samsung/master. > > Changes in v3: > - Using macros for error no. > - Using a common function exynos_usb_parse_dt() to > parse all DT related data. > - Using a global structure "exynos_ehci" to store > register base addresses and thereby using it. > > Changes in v2: > - Removed checkpatch errors. > > drivers/usb/host/ehci-exynos.c | 92 > +--- > 1 files changed, 85 insertions(+), 7 deletions(-) > applied to u-boot-samsung. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/3] EXYNOS5: Add device node for USB.
On 08/01/13 18:35, Vivek Gautam wrote: > From: Rajeshwari Shinde > > This patch adds the device node required for USB > > Signed-off-by: Vivek Gautam > --- > > Changes in v4: > - Rebased on top of u-boot-samsung/master. > > Changes in v3: > - Using a sub-node under ehci node for phy which provides > "compatible" and "reg" information. > > Changes in v2: > - None. > > arch/arm/dts/exynos5250.dtsi | 13 + > 1 files changed, 13 insertions(+), 0 deletions(-) > applied to u-boot-samsung. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] EXYNOS5: FDT: Add compatible strings for USB
On 08/01/13 18:35, Vivek Gautam wrote: > From: Rajeshwari Shinde > > Add required compatible information for USB > > Signed-off-by: Vivek Gautam > Acked-by: Simon Glass > --- > > Changes in v4: > - Rebased on top of u-boot-samsung/master. > > Changes in v3: > - Added compatible string for USB PHY controller. > > Changes in v2: > - None. > > include/fdtdec.h |2 ++ > lib/fdtdec.c |2 ++ > 2 files changed, 4 insertions(+), 0 deletions(-) > applied to u-boot-samsung. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4] SMDK5250: Enable VBus for USB 2.0 controller
On 08/01/13 18:37, Vivek Gautam wrote: > This patch enables Vbus required for USB 2.0 controller. > > Signed-off-by: Vivek Gautam > Signed-off-by: Rajeshwari Shinde > --- > > Changes from v3: > - Rebased on top of u-boot-samsung/master. > > Changes from v2: > - Rebased on top of u-boot-usb/next > - Enclosed the function definition for board_usb_vbus_init() > inside "CONFIG_USB_EHCI_EXYNOS" > > Changes from v1: > - Using the old school method of setting up gpio instead > of using the pinmux method, since the required gpio line > here is board specific. > > board/samsung/smdk5250/smdk5250.c | 19 +++ > 1 files changed, 19 insertions(+), 0 deletions(-) > applied to u-boot-samsung. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] board/qemu-mips: fix a typo in README
The 'Limitations & comments' section refers to the '-m mips' switch which is not valid. The '-m' switch can be used for setting the virtual RAM size: $qemu-system-mips --help | grep '^-m ' -m megs set virtual RAM size to megs MB [default=128] $ The correct switch for specifying the machine type is '-M'. Fix the text to refer to that. Signed-off-by: Gabor Juhos Cc: Daniel Schwierzeck Cc: Vlad Lungu --- board/qemu-mips/README |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/qemu-mips/README b/board/qemu-mips/README index 9fd97e1..b2c2b54 100644 --- a/board/qemu-mips/README +++ b/board/qemu-mips/README @@ -6,7 +6,7 @@ http://www.nongnu.org/qemu/ Limitations & comments -- -Supports the "-m mips" configuration of qemu: serial,NE2000,IDE. +Supports the "-M mips" configuration of qemu: serial,NE2000,IDE. Support is big endian only for now (or at least this is what I tested). Derived from au1x00 with a lot of things cut out. -- 1.7.10 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] board/qemu-mips: add '-M mips' switch to the example usage command
Using the example command from the README file does not work as expected. qemu shows a text similar to the one below and it hangs. $ qemu-system-mips -L . -nographic Could not open option rom 'pxe-pcnet.rom': No such file or directory qemu-system-mips: pci_add_option_rom: failed to find romfile "vgabios-cirrus.bin" qemu: terminating on signal 15 from pid 19726 This happens because qemu emulates a Malta board by default if the machine type is not defined explicitely on the command line. For a working test, the '-M mips' switch is required: $ qemu-system-mips -M mips -L . -nographic Could not open option rom 'vgabios.bin': No such file or directory U-Boot 2013.01-rc2-00132-g1e8e648-dirty (Jan 08 2013 - 09:06:42) Board: Qemu -M mips CPU: 24Kf proc_id=0x19300 DRAM: 128 MiB ## Unknown flash on Bank 1 - Size = 0x = 0 MB Flash: 0 Bytes *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial Net: NE2000 Hit any key to stop autoboot: 0 qemu-mips # Signed-off-by: Gabor Juhos Cc: Daniel Schwierzeck Cc: Vlad Lungu --- board/qemu-mips/README |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/qemu-mips/README b/board/qemu-mips/README index b2c2b54..ec58ce4 100644 --- a/board/qemu-mips/README +++ b/board/qemu-mips/README @@ -23,7 +23,7 @@ I) Example usage: # ln -s u-boot.bin mips_bios.bin start it: -qemu-system-mips -L . /dev/null -nographic +qemu-system-mips -M mips -L . /dev/null -nographic or -- 1.7.10 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] ARM: OMAP5: redefine arm_setup_identity_mapping
On 01/08/2013 12:14 PM, R Sricharan wrote: (..) > We had this problem of speculative aborts in the kernel uncompress code > as well, which maps all of 4GB address space. It was solved by setting > the non-DRAM region as non-executable(XN) and with client permissions > to the domain in the DACR register. > > This way speculative prefetches are avoided not only to the page 0, > but also to other read sensitive I/O regions. > > I have created a similar patch in u-boot and posted a RFC now. > I was using your first patch [1] and rest from me. (..) > > Please let me know your take on that. Hi Sricharan, Your solution to this issue looks more elegant to me than my unmapping page 0 completely. I tested your patches and they work for me on both GP (without security) and EMU (with security) OMAP5 ES1.0 devices. I'll keep them, thanks :) You can add my 'Tested-by' if you want: Tested-by: Vincent Stehlé Best regards, V. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] video:cache:fix: Enable dcache flush at LCD subsystem for Exynos based boards
On 08/01/13 18:59, Lukasz Majewski wrote: > lcd_set_flush_dcache(1) function is called from exynos_fb.c > (exynos_lcd_init()) file > to enable lcd_sync() function. > > Tested-at: TRATS (Exynos 4210) > Tested-by: Lukasz Majewski > Signed-off-by: Lukasz Majewski > Signed-off-by: Kyungmin Park > Cc: Minkyu Kang > --- > drivers/video/exynos_fb.c |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c > index d9a3f9a..17e1069 100644 > --- a/drivers/video/exynos_fb.c > +++ b/drivers/video/exynos_fb.c > @@ -63,6 +63,8 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t > *vid) > static void exynos_lcd_init(vidinfo_t *vid) > { > exynos_fimd_lcd_init(vid); please add blank line here. > + /* Enable flushing after LCD writes if requested */ > + lcd_set_flush_dcache(1); > } > > static void draw_logo(void) > Thanks. Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 4/4] EXYNOS5: Add support for FIMD and DP
Dear Donghwa and Ajay, On 08/01/13 16:32, Ajay Kumar wrote: > Add panel_info structure required by LCD driver > and DP panel platdata for SMDK5250. > Add GPIO configuration for LCD. > Enable FIMD and DP support on SMDK5250. > DP Panel size: 2560x1600. > We use 16BPP resolution to get LCD console. > > changes in V2: > -- Move LCD GPIO confiration from exynos common file to board file. > changes in V3: > -- Remove explicit call for cfg_lcd_gpio and add it as callback. > changes in V4: > -- use logo_on = 1 for smdk5250 panel_info structure. > changes in V5: > -- Move CONFIGS from smdk5250.h to exynos5250-dt.h. > -- Added changelog in commit message. > > Signed-off-by: Ajay Kumar > Acked-by: Simon Glass > --- > board/samsung/smdk5250/smdk5250.c | 97 > +++ > include/configs/exynos5250-dt.h | 8 > 2 files changed, 105 insertions(+) > > diff --git a/board/samsung/smdk5250/smdk5250.c > b/board/samsung/smdk5250/smdk5250.c > index 73c3ec0..80fb43c 100644 > --- a/board/samsung/smdk5250/smdk5250.c > +++ b/board/samsung/smdk5250/smdk5250.c > @@ -24,13 +24,16 @@ > #include > #include > #include > +#include > #include > #include > #include > #include > #include > #include > +#include > #include > +#include > #include > > DECLARE_GLOBAL_DATA_PTR; > @@ -258,3 +261,97 @@ int board_early_init_f(void) > return err; > } > #endif > + > +void cfg_lcd_gpio(void) > +{ > + struct exynos5_gpio_part1 *gpio1 = > + (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1(); > + > + /* For Backlight */ > + s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT); > + s5p_gpio_set_value(&gpio1->b2, 0, 1); > + > + /* LCD power on */ > + s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT); > + s5p_gpio_set_value(&gpio1->x1, 5, 1); > + > + /* Set Hotplug detect for DP */ > + s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3)); > +} > + > +vidinfo_t panel_info = { > + .vl_freq= 60, > + .vl_col = 2560, > + .vl_row = 1600, > + .vl_width = 2560, > + .vl_height = 1600, > + .vl_clkp= CONFIG_SYS_LOW, > + .vl_hsp = CONFIG_SYS_LOW, > + .vl_vsp = CONFIG_SYS_LOW, > + .vl_dp = CONFIG_SYS_LOW, > + .vl_bpix= 4,/* LCD_BPP = 2^4, for output conosle on LCD */ > + > + /* wDP panel timing infomation */ > + .vl_hspw= 32, > + .vl_hbpd= 80, > + .vl_hfpd= 48, > + > + .vl_vspw= 6, > + .vl_vbpd= 37, > + .vl_vfpd= 3, > + .vl_cmd_allow_len = 0xf, > + > + .win_id = 3, > + .cfg_gpio = cfg_lcd_gpio, > + .backlight_on = NULL, > + .lcd_power_on = NULL, > + .reset_lcd = NULL, > + .dual_lcd_enabled = 0, > + > + .init_delay = 0, > + .power_on_delay = 0, > + .reset_delay= 0, > + .interface_mode = FIMD_RGB_INTERFACE, > + .dp_enabled = 1, > +}; > + > +static struct edp_device_info edp_info = { > + .disp_info = { > + .h_res = 2560, > + .h_sync_width = 32, > + .h_back_porch = 80, > + .h_front_porch = 48, > + .v_res = 1600, > + .v_sync_width = 6, > + .v_back_porch = 37, > + .v_front_porch = 3, > + .v_sync_rate = 60, > + }, > + .lt_info = { > + .lt_status = DP_LT_NONE, > + }, > + .video_info = { > + .master_mode = 0, > + .bist_mode = DP_DISABLE, > + .bist_pattern = NO_PATTERN, > + .h_sync_polarity = 0, > + .v_sync_polarity = 0, > + .interlaced = 0, > + .color_space = COLOR_RGB, > + .dynamic_range = VESA, > + .ycbcr_coeff = COLOR_YCBCR601, > + .color_depth = COLOR_8, > + }, > +}; > + > +static struct exynos_dp_platform_data dp_platform_data = { > + .phy_enable = set_dp_phy_ctrl, > + .edp_dev_info = &edp_info, > +}; > + > +void init_panel_info(vidinfo_t *vid) > +{ > + vid->rgb_mode = MODE_RGB_P, > + > + exynos_set_dp_platform_data(&dp_platform_data); Compiler warning is occurred. smdk5250.c: In function 'init_panel_info': smdk5250.c:375: warning: implicit declaration of function 'exynos_set_dp_platform_data' > +} > diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h > index 59182f4..07bca1d 100644 > --- a/include/configs/exynos5250-dt.h > +++ b/include/configs/exynos5250-dt.h > @@ -297,4 +297,12 @@ > #define CONFIG_SHA1 > #define CONFIG_SHA256 > > +/* Display */ > +#define CONFIG_LCD > +#define CONFIG_EXYNOS_FB > +#define CONFIG_EXYNOS_DP > +#define LCD_XRES 2560 > +#define LCD_YRES 1600 > +#define LCD_BPP LCD_COLOR16 > + > #endif /* __CONFIG_H */ > Thanks. Minkyu Kang. __
Re: [U-Boot] [RFC PATCH 1/2] ARM: cache: Introduce weak dram_bank_setup function
Hi Stefan, On Tuesday 08 January 2013 05:22 PM, Stefan Roese wrote: On 01/08/2013 12:18 PM, R Sricharan wrote: Introduce a weak version of dram_bank_setup function to allow a platform specific redefinition. This is used in the subsequent patch to setup dram region without 'XN' attribute in order to enable the region under client permissions. Signed-off-by: R Sricharan Cc: Vincent Stehle Cc: Tom Rini --- arch/arm/include/asm/cache.h |1 + arch/arm/lib/cache-cp15.c|7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index eef6a5a..93811d2 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h @@ -42,6 +42,7 @@ static inline void invalidate_l2_cache(void) void l2_cache_enable(void); void l2_cache_disable(void); +void dram_bank_mmu_setup(int bank); /* * The current upper bound for ARM L1 data cache line sizes is 64 bytes. We * use that value for aligning DMA buffers unless the board config has specified diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 6edf815..843078e 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -23,6 +23,8 @@ #include #include +#include +#include #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) @@ -77,7 +79,7 @@ void mmu_set_region_dcache_behaviour(u32 start, int size, mmu_page_table_flush((u32)&page_table[start], (u32)&page_table[end]); } -static inline void dram_bank_mmu_setup(int bank) +void __dram_bank_mmu_setup(int bank) { bd_t *bd = gd->bd; int i; @@ -94,6 +96,9 @@ static inline void dram_bank_mmu_setup(int bank) } } +void dram_bank_mmu_setup(int bank) + __attribute__((weak, alias("__dram_bank_mmu_setup"))); Please use this instead (you already included linux/compiler.h for this): __weak void dram_bank_mmu_setup(int bank) { ... Ok, will correct this and repost. Regards, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] ARM: OMAP5: redefine arm_setup_identity_mapping
Hi Vincent, On Tuesday 08 January 2013 05:57 PM, Vincent Stehlé wrote: On 01/08/2013 12:14 PM, R Sricharan wrote: (..) We had this problem of speculative aborts in the kernel uncompress code as well, which maps all of 4GB address space. It was solved by setting the non-DRAM region as non-executable(XN) and with client permissions to the domain in the DACR register. This way speculative prefetches are avoided not only to the page 0, but also to other read sensitive I/O regions. I have created a similar patch in u-boot and posted a RFC now. I was using your first patch [1] and rest from me. (..) Please let me know your take on that. Hi Sricharan, Your solution to this issue looks more elegant to me than my unmapping page 0 completely. I tested your patches and they work for me on both GP (without security) and EMU (with security) OMAP5 ES1.0 devices. I'll keep them, thanks :) You can add my 'Tested-by' if you want: Thanks for the testing and confirming. Will add your in the re post. Regards, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-ti/master
Hi Tom, On Mon, 10 Dec 2012 13:18:48 -0700, Tom Rini wrote: > Hello, > > The following changes since commit b8a7c467960ffb4d5a5e1eef5f7783fb6f594542: > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' (2012-11-25 > 13:01:58 +0100) > > are available in the git repository at: > > > git://git.denx.de/u-boot-ti.git master > > for you to fetch changes up to 9bd5c1ad0db802c9f8d49d72b443f03431cf6a89: > > cm-t35: enable zero bootdelay check (2012-12-10 12:45:35 -0700) > > > Andreas Bießmann (1): > omap3/mem.c: remove unused defines > > Davide Bonfanti (1): > davinci: fixed cpu reset > > Ilya Yanok (6): > OMAP: include sys_proto.h from boot-common > am335x_evm: add nand pinmux definition > am33xx: NAND support > am335x_evm: enable NAND support > am33xx_spl_bch: simple SPL nand loader for AM33XX > am335x_evm: enable SPL NAND support > > Lokesh Vutla (1): > omap: emif: configure emif only when required > > Mansoor Ahamed (2): > am33xx: add ELM support > omap_gpmc: BCH8 support (ELM based) > > Nikita Kiryanov (2): > gpio: add gpio_is_valid() to omap_gpio API > cm-t35: enable zero bootdelay check > > Peter Barada (1): > Pass sdrc timing values through board_sdrc_timings structure > > Robert P. J. Day (4): > omap3_beagle.h: Fix comment for true/false return value. > omap3: Add a few comments to "#endif"s for readability. > omap4: Add comments on some "#endif"s for readability. > OMAP: Tweak omap-common/Makefile since reset.S -> reset.c > > Stefano Babic (2): > OMAP3: fix panel timing on the mt_ventoux board > OMAP3: TAM3517: add macros for reading eeprom > > Thomas Weber (1): > OMAP3: Remove unused PHYS_SDRAM_1_SIZE > > Vincent Stehlé (2): > omap24xx_i2c: Handle wait_for_bb error > power: twl6035: complain on LDO9 error > > Yegor Yefremov (2): > am335x: disable internal delay for RGMII mode > am335x: cpsw: make phy address configurable > > ajoy (1): > OMAP3 SPI : Fixed bugs related to SPI transfer > > arch/arm/cpu/arm926ejs/davinci/reset.c |2 +- > arch/arm/cpu/armv7/am33xx/Makefile |2 + > arch/arm/cpu/armv7/am33xx/board.c|1 + > arch/arm/cpu/armv7/am33xx/clock.c| 10 + > arch/arm/cpu/armv7/am33xx/elm.c | 212 ++ > arch/arm/cpu/armv7/am33xx/mem.c | 101 +++ > arch/arm/cpu/armv7/omap-common/Makefile |5 +- > arch/arm/cpu/armv7/omap-common/boot-common.c |1 + > arch/arm/cpu/armv7/omap-common/emif-common.c | 41 ++- > arch/arm/cpu/armv7/omap3/board.c |4 +- > arch/arm/cpu/armv7/omap3/mem.c | 18 +- > arch/arm/cpu/armv7/omap3/sdrc.c | 36 +-- > arch/arm/cpu/armv7/omap4/clocks.c|2 +- > arch/arm/cpu/armv7/omap4/hwinit.c|4 +- > arch/arm/include/asm/arch-am33xx/cpu.h | 53 > arch/arm/include/asm/arch-am33xx/elm.h | 93 ++ > arch/arm/include/asm/arch-am33xx/hardware.h |3 + > arch/arm/include/asm/arch-am33xx/mem.h | 83 ++ > arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 120 > arch/arm/include/asm/arch-am33xx/sys_proto.h |3 + > arch/arm/include/asm/arch-omap3/sys_proto.h | 13 +- > arch/arm/include/asm/omap_gpio.h |7 + > board/corscience/tricorder/tricorder.c | 13 +- > board/isee/igep0020/igep0020.c | 29 +- > board/isee/igep0030/igep0030.c | 29 +- > board/overo/overo.c | 37 ++- > board/technexion/twister/twister.c | 10 +- > board/teejet/mt_ventoux/mt_ventoux.c | 23 +- > board/ti/am335x/board.c |4 +- > board/ti/am335x/mux.c| 22 ++ > board/ti/beagle/beagle.c | 53 ++-- > board/ti/evm/evm.c | 19 +- > board/timll/devkit8000/devkit8000.c | 13 +- > drivers/gpio/omap_gpio.c | 10 +- > drivers/i2c/omap24xx_i2c.c | 20 +- > drivers/mtd/nand/Makefile|1 + > drivers/mtd/nand/am335x_spl_bch.c| 238 +++ > drivers/mtd/nand/omap_gpmc.c | 403 > +- > drivers/net/cpsw.c |5 +- > drivers/power/twl6035.c | 17 +- > drivers/spi/omap3_spi.c | 76 +++-- > drivers/spi/omap3_spi.h |1 + > include/configs/am335x_evm.h | 47 +++ > include/configs/cm_t35.h |2 +- > include/configs/dig297.h |1 - > include/configs/igep00x0.h |1 - > include/configs/mcx.h|1 - > include/configs/om
[U-Boot] [PATCH v2] video:cache:fix: Enable dcache flush at LCD subsystem for Exynos based boards
lcd_set_flush_dcache(1) function is called from exynos_fb.c configuration file to enable lcd_sync function. Tested-at: TRATS (Exynos 4210) Tested-by: Lukasz Majewski Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park Cc: Minkyu Kang --- Changes for v2: - Blank line added --- drivers/video/exynos_fb.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index d9a3f9a..aac74a3 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -63,6 +63,9 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid) static void exynos_lcd_init(vidinfo_t *vid) { exynos_fimd_lcd_init(vid); + + /* Enable flushing after LCD writes if requested */ + lcd_set_flush_dcache(1); } static void draw_logo(void) -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm:exynos4:pinmux: Modify the gpio function for mmc
Hi Minkyu, On Tue, 08 Jan 2013 10:50:58 +0900, Minkyu Kang wrote: > On 03/01/13 16:31, Piotr Wilczek wrote: > > This patch add pinmux settings for Exynos4 for mmc0 and mmc2 > > > > Signed-off-by: Piotr Wilczek > > Signed-off-by: Kyungmin Park > > CC: Minkyu Kang > > CC: Albert ARIBAUD > > --- > > arch/arm/cpu/armv7/exynos/pinmux.c | 45 > > > > 1 file changed, 45 insertions(+) > > > > applied to u-boot-samsung. So I guess you'll be sending out a pull request for the Samung tree soon, right? > Thanks, > Minkyu Kang. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] calimain: Generate random MAC address for factory tests
Signed-off-by: Christian Riesch --- board/omicron/calimain/calimain.c | 31 ++- include/configs/calimain.h|2 ++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/board/omicron/calimain/calimain.c b/board/omicron/calimain/calimain.c index 1060a1f..80e3893 100644 --- a/board/omicron/calimain/calimain.c +++ b/board/omicron/calimain/calimain.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 OMICRON electronics GmbH + * Copyright (C) 2011-2013 OMICRON electronics GmbH * * Based on da850evm.c. Original Copyrights follow: * @@ -136,6 +136,35 @@ int board_init(void) return 0; } +/* seed random number generator with uninitialized SRAM content */ +static void srand_sram(void) +{ + int *p; + int seed = 0; + + for (p = (int *) 0x8000; p < (int *) 0x8001; p++) + seed ^= *p; + + srand(seed); +} + +int board_late_init(void) +{ + uchar enetaddr[6]; + + if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { + srand_sram(); + eth_random_enetaddr(enetaddr); + if (eth_setenv_enetaddr("ethaddr", enetaddr)) { + printf("Failed to set random ethernet address\n"); + } else { + printf("Setting random ethernet address %pM.\n", + enetaddr); + } + } + return 0; +} + #ifdef CONFIG_DRIVER_TI_EMAC /* * Initializes on-board ethernet controllers. diff --git a/include/configs/calimain.h b/include/configs/calimain.h index 5c2b35d..8cea0d9 100644 --- a/include/configs/calimain.h +++ b/include/configs/calimain.h @@ -30,6 +30,7 @@ #define CONFIG_DRIVER_TI_EMAC #define MACH_TYPE_CALIMAIN 3528 #define CONFIG_MACH_TYPE MACH_TYPE_CALIMAIN +#define CONFIG_BOARD_LATE_INIT /* * SoC Configuration @@ -202,6 +203,7 @@ #define CONFIG_BOOTP_DNS2 #define CONFIG_BOOTP_SEND_HOSTNAME #define CONFIG_NET_RETRY_COUNT 10 +#define CONFIG_RANDOM_MACADDR #endif /* -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] net: Remove call of srand from eth_random_enetaddr()
Currently eth_random_enetaddr() seeds the random number generator with get_timer(0). Some boards might want to use other sources for the seed, therefore move the call of srand() to the board specific code. Signed-off-by: Christian Riesch Cc: Michael Walle Cc: Joe Hershberger --- board/buffalo/lsxl/lsxl.c |1 + include/net.h |3 +++ net/eth.c |2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 57776fb..b7eb0dc 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -248,6 +248,7 @@ static void rescue_mode(void) printf("Entering rescue mode..\n"); #ifdef CONFIG_RANDOM_MACADDR if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { + srand(get_timer(0)); eth_random_enetaddr(enetaddr); if (eth_setenv_enetaddr("ethaddr", enetaddr)) { printf("Failed to set ethernet address\n"); diff --git a/include/net.h b/include/net.h index 970d4d1..5fc3693 100644 --- a/include/net.h +++ b/include/net.h @@ -141,6 +141,9 @@ extern int eth_getenv_enetaddr_by_index(const char *base_name, int index, * * In these cases, we generate a random locally administered ethernet address. * + * Remember to seed the random number generator with srand() before calling + * this functon. + * * Args: * enetaddr - returns 6 byte hardware address */ diff --git a/net/eth.c b/net/eth.c index 321d5b1..dc4cc20 100644 --- a/net/eth.c +++ b/net/eth.c @@ -84,8 +84,6 @@ void eth_random_enetaddr(uchar *enetaddr) { uint32_t rval; - srand(get_timer(0)); - rval = rand(); enetaddr[0] = rval & 0xff; enetaddr[1] = (rval >> 8) & 0xff; -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/2] calimain: Generate random MAC address for factory testing
Hi, This patchset allows the calimain board to use a random MAC address if no MAC address has been set yet. We use this feature for tests during production of our boards. Later, official MAC addresses are assigned to the boards. To seed the random number generator I use the content of the uninitialized SRAM of the AM1808 SoC. Regards, Christian Cc: Tom Rini Cc: Joe Hershberger Cc: Michael Walle Christian Riesch (2): net: Remove call of srand from eth_random_enetaddr() calimain: Generate random MAC address for factory tests board/buffalo/lsxl/lsxl.c |1 + board/omicron/calimain/calimain.c | 31 ++- include/configs/calimain.h|2 ++ include/net.h |3 +++ net/eth.c |2 -- 5 files changed, 36 insertions(+), 3 deletions(-) -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PULL] : Please pull u-boot-imx
Hi Stefano, On Sat, 05 Jan 2013 18:36:50 +0100, Stefano Babic wrote: > Hi Albert, > > please pull from u-boot-imx, thanks. > > The following changes since commit b874df74afc986b069738b180763f2464ac3f5f4: > > mx25pdk: Allow booting a device tree kernel (2012-12-13 09:23:59 +0100) > > are available in the git repository at: > > git://www.denx.de/git/u-boot-imx.git master > > for you to fetch changes up to 1411fb37b5a8d56bececc5e6ea09d2e0670b9810: > > tools: imximage: Load a size that is multiple of 512 (2013-01-05 > 18:09:00 +0100) > > > Ashok (1): > mx35pdk:Use IMX_GPIO_NR macro > > Fabio Estevam (6): > mx35pdk: Allow booting of a device tree kernel > mx53loco: Call PMIC related functions from board_late_init() > mx51evk: Remove unneeded comment > mx53loco: Remove unneeded 'retval' variable > mx53loco: Improve error handling on power_init() > tools: imximage: Load a size that is multiple of 512 > > Marek Vasut (1): > mxs: Add NAND fdt and ramdisk partition to m28evk > > Otavio Salvador (4): > mx53loco: We shouldn't hardcode a rootfs filesystem type > mx53loco: Change default loadaddr to 0x7200 > mx6qsabrelite: Change default loadaddr to 0x1200 > mx6qsabre_common: Change default loadaddr to 0x1200 > > Shawn Guo (3): > fsl_esdhc: add MMC_MODE_HC host_caps > mx6qsabresd: add usdhc2 and usdhc4 support > mx6qsabresd: use on-board eMMC to store environment > > board/freescale/mx35pdk/mx35pdk.c |2 +- > board/freescale/mx53loco/mx53loco.c | 84 > ++--- > board/freescale/mx6qsabresd/mx6qsabresd.c | 80 > --- > drivers/mmc/fsl_esdhc.c |2 +- > include/configs/m28evk.h |2 + > include/configs/mx35pdk.h |1 + > include/configs/mx51evk.h |4 -- > include/configs/mx53loco.h| 10 ++-- > include/configs/mx6qsabre_common.h|4 +- > include/configs/mx6qsabreauto.h |5 ++ > include/configs/mx6qsabrelite.h |2 +- > include/configs/mx6qsabresd.h |6 +++ > include/image.h |3 ++ > tools/imximage.c |9 +++- > 14 files changed, 172 insertions(+), 42 deletions(-) > 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] video:cache:fix: Proper buffer alignment for lcd subsystem
Hi Lukasz, On Tue, Jan 8, 2013 at 12:28 AM, Lukasz Majewski wrote: > Hi Simon, > >> Hi Lukasz, >> >> On Mon, Jan 7, 2013 at 1:23 AM, Lukasz Majewski >> wrote: >> > This commit makes the video subsystem code cache aware. >> > Memory allocated for decompressed BMP memory is now cache line >> > aligned. >> > >> > Tested-by: Lukasz Majewski >> > Signed-off-by: Lukasz Majewski >> > Signed-off-by: Kyungmin Park >> > Cc: Anatolij Gustschin >> > --- >> > common/cmd_bmp.c |2 +- >> > 1 files changed, 1 insertions(+), 1 deletions(-) >> > >> > diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c >> > index 5a52edd..57f3eb5 100644 >> > --- a/common/cmd_bmp.c >> > +++ b/common/cmd_bmp.c >> > @@ -55,7 +55,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr, >> > unsigned long *lenp) >> > * Decompress bmp image >> > */ >> > len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE; >> > - dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE); >> > + dst = memalign(CONFIG_SYS_CACHELINE_SIZE, len); >> > if (dst == NULL) { >> > puts("Error: malloc in gunzip failed!\n"); >> > return NULL; >> >> Sorry, I still have a question. Does this 'dst' address get used as >> the actual LCD frame buffer on your board, or is it just copied to the >> frame buffer? >> > > I must admit, that I've misunderstood the LCD code a bit. Reply to this > post from Anatolij helped me. > The buffer (dst) is only the "internal" buffer from which we are > assigning BMP data to actual frame buffer area. Then only the frame > buffer (pointed by fb pointer) area needs cache flush (which is done at > lcd_sync()). OK that makes sense, thanks. > > To sum up - this patch shall be dropped. > However the second patch - > > [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS > board's LCD subsystem > > is crucial to fix the BMP image display distortion. Yes I agree. Regards, Simon > -- > Best regards, > > Lukasz Majewski > > Samsung R&D Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request for u-boot-marvell.git
Hi Prafulla, On Mon, 7 Jan 2013 04:26:09 -0800, Prafulla Wadaskar wrote: > > > > -Original Message- > > From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] > > Sent: 23 December 2012 20:40 > > To: Prafulla Wadaskar > > Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; > > 'Wolfgang Denk'; Andreas Bießmann > > Subject: Re: Pull request for u-boot-marvell.git > > > > Hi Prafulla, > > > > On Thu, 20 Dec 2012 02:05:36 -0800, Prafulla Wadaskar > > wrote: > > > Dear Albert > > > Please discard my earlier pull request and please pull > > > The following changes since commit > > b8a7c467960ffb4d5a5e1eef5f7783fb6f594542: > > > Albert ARIBAUD (1): > > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' > > > > > > are available in the git repository at: > > > > > > u-boot-marvell.git master branch. > > > > > > Albert ARIBAUD (3): > > > mv88e61xx: refactor PHY and SWITCH level-code > > > kirkwood: make MPP arrays static const > > > ARM: lacie_kw: add support for WIRELESS_SPACE > > > > > > Holger Brunck (3): > > > arm/km: fix memory settings > > > km/common: drop unneeded std* environment variables > > > km/common: cosmetic change reported from checkpatch > > > > > > Luke Lowrey (1): > > > arch-kirkwood: Ethernet port macro returning incorrect address > > > > > > Michael Walle (1): > > > lsxl: unset ncip for rescue mode > > > > > > Valentin Longchamp (1): > > > arm/km: remove duplicate code > > > > > > andreas.de...@googlemail.com (1): > > > mv-common.h: increase malloc arena to 4MiB > > > > Is that last commit really supposed to be with Andreas Bießmann's > > e-mail only, without his name? > > Hi Albert, > Sorry for the late reply, > Yes, it is with Andreas Bießmann' email only, I wonder how his name is > removed from this commit. > I will check and let you know. Ok - note that meanwhile, I have merged in TI and IMX. > Regards... > Prafulla . . . Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request: u-boot-arm/master
Hello Tom, The following changes since commit 96764df1b47ddebfb50fadf5af72530b07b5fc89: Merge samsung, imx, tegra into u-boot-arm/master (2012-12-22 11:59:14 +0100) are available in the git repository at: git://git.denx.de/u-boot-arm.git master for you to fetch changes up to 7528cf5f016b5b8b8b12b373f6f31a10bf89233d: Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' (2013-01-08 14:59:37 +0100) Albert ARIBAUD (2): Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' Andreas Bießmann (1): omap3/mem.c: remove unused defines Ashok (1): mx35pdk:Use IMX_GPIO_NR macro Davide Bonfanti (1): davinci: fixed cpu reset Fabio Estevam (6): mx35pdk: Allow booting of a device tree kernel mx53loco: Call PMIC related functions from board_late_init() mx51evk: Remove unneeded comment mx53loco: Remove unneeded 'retval' variable mx53loco: Improve error handling on power_init() tools: imximage: Load a size that is multiple of 512 Ilya Yanok (6): OMAP: include sys_proto.h from boot-common am335x_evm: add nand pinmux definition am33xx: NAND support am335x_evm: enable NAND support am33xx_spl_bch: simple SPL nand loader for AM33XX am335x_evm: enable SPL NAND support Lokesh Vutla (1): omap: emif: configure emif only when required Mansoor Ahamed (2): am33xx: add ELM support omap_gpmc: BCH8 support (ELM based) Marek Vasut (1): mxs: Add NAND fdt and ramdisk partition to m28evk Nikita Kiryanov (2): gpio: add gpio_is_valid() to omap_gpio API cm-t35: enable zero bootdelay check Otavio Salvador (4): mx53loco: We shouldn't hardcode a rootfs filesystem type mx53loco: Change default loadaddr to 0x7200 mx6qsabrelite: Change default loadaddr to 0x1200 mx6qsabre_common: Change default loadaddr to 0x1200 Peter Barada (1): Pass sdrc timing values through board_sdrc_timings structure Robert P. J. Day (4): omap3_beagle.h: Fix comment for true/false return value. omap3: Add a few comments to "#endif"s for readability. omap4: Add comments on some "#endif"s for readability. OMAP: Tweak omap-common/Makefile since reset.S -> reset.c Shawn Guo (3): fsl_esdhc: add MMC_MODE_HC host_caps mx6qsabresd: add usdhc2 and usdhc4 support mx6qsabresd: use on-board eMMC to store environment Stefano Babic (2): OMAP3: fix panel timing on the mt_ventoux board OMAP3: TAM3517: add macros for reading eeprom Thomas Weber (1): OMAP3: Remove unused PHYS_SDRAM_1_SIZE Vincent Stehlé (2): omap24xx_i2c: Handle wait_for_bb error power: twl6035: complain on LDO9 error Yegor Yefremov (2): am335x: disable internal delay for RGMII mode am335x: cpsw: make phy address configurable ajoy (1): OMAP3 SPI : Fixed bugs related to SPI transfer arch/arm/cpu/arm926ejs/davinci/reset.c |2 +- arch/arm/cpu/armv7/am33xx/Makefile |2 + arch/arm/cpu/armv7/am33xx/board.c|1 + arch/arm/cpu/armv7/am33xx/clock.c| 10 + arch/arm/cpu/armv7/am33xx/elm.c | 212 ++ arch/arm/cpu/armv7/am33xx/mem.c | 101 +++ arch/arm/cpu/armv7/omap-common/Makefile |5 +- arch/arm/cpu/armv7/omap-common/boot-common.c |1 + arch/arm/cpu/armv7/omap-common/emif-common.c | 41 ++- arch/arm/cpu/armv7/omap3/board.c |4 +- arch/arm/cpu/armv7/omap3/mem.c | 18 +- arch/arm/cpu/armv7/omap3/sdrc.c | 36 +-- arch/arm/cpu/armv7/omap4/clocks.c|2 +- arch/arm/cpu/armv7/omap4/hwinit.c|4 +- arch/arm/include/asm/arch-am33xx/cpu.h | 53 arch/arm/include/asm/arch-am33xx/elm.h | 93 ++ arch/arm/include/asm/arch-am33xx/hardware.h |3 + arch/arm/include/asm/arch-am33xx/mem.h | 83 ++ arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 120 arch/arm/include/asm/arch-am33xx/sys_proto.h |3 + arch/arm/include/asm/arch-omap3/sys_proto.h | 13 +- arch/arm/include/asm/omap_gpio.h |7 + board/corscience/tricorder/tricorder.c | 13 +- board/freescale/mx35pdk/mx35pdk.c|2 +- board/freescale/mx53loco/mx53loco.c | 84 -- board/freescale/mx6qsabresd/mx6qsabresd.c| 80 - board/isee/igep0020/igep0020.c | 29 +- board/isee/igep0030/igep0030.c | 29 +- board/overo/overo.c | 37 ++- board/technexion/twister/twister.c | 10 +- board/teejet/mt_ventoux/mt_ventoux.c | 23 +- board/ti/am335x/board.c |4 +- board/ti/am335x/mux.c| 22 ++ board/ti/beagle/beagle.c | 53 ++-- board/ti/evm/e
[U-Boot] [PATCH] mxs: Use __weak annotation to simplify code
Using the __weak annotation can make the code cleaner. Signed-off-by: Fabio Estevam --- arch/arm/cpu/arm926ejs/mxs/mxs.c |6 ++ arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c |5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index 6ce8019..741ae38 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -35,6 +35,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -276,7 +277,7 @@ int cpu_eth_init(bd_t *bis) } #endif -static void __mx28_adjust_mac(int dev_id, unsigned char *mac) +__weak void mx28_adjust_mac(int dev_id, unsigned char *mac) { mac[0] = 0x00; mac[1] = 0x04; /* Use FSL vendor MAC address by default */ @@ -285,9 +286,6 @@ static void __mx28_adjust_mac(int dev_id, unsigned char *mac) mac[5] += 1; } -void mx28_adjust_mac(int dev_id, unsigned char *mac) - __attribute__((weak, alias("__mx28_adjust_mac"))); - #ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP #defineMXS_OCOTP_MAX_TIMEOUT 100 diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c index 401c513..a3ff3fa 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "mxs_init.h" @@ -88,11 +89,9 @@ static uint32_t dram_vals[] = { #endif }; -void __mxs_adjust_memory_params(uint32_t *dram_vals) +__weak void mxs_adjust_memory_params(uint32_t *dram_vals) { } -void mxs_adjust_memory_params(uint32_t *dram_vals) - __attribute__((weak, alias("__mxs_adjust_memory_params"))); static void initialize_dram_values(void) { -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mxs: Use __weak annotation to simplify code
Dear Fabio Estevam, > Using the __weak annotation can make the code cleaner. > > Signed-off-by: Fabio Estevam Acked-by: Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code
Using the __weak annotation can make the code cleaner. Signed-off-by: Fabio Estevam --- common/env_mmc.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/env_mmc.c b/common/env_mmc.c index ce21671..02bd5ae 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -46,13 +46,11 @@ DECLARE_GLOBAL_DATA_PTR; #define CONFIG_ENV_OFFSET 0 #endif -static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) +__weak int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) { *env_addr = CONFIG_ENV_OFFSET; return 0; } -int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) - __attribute__((weak, alias("__mmc_get_env_addr"))); int env_init(void) { -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code
Dear Fabio Estevam, > Using the __weak annotation can make the code cleaner. > > Signed-off-by: Fabio Estevam Just a quickie -- have you checked that noone is using the "default" versions of all these functions you annotate with __weak? Other than that: Acked-by: Marek Vasut > --- > common/env_mmc.c |4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/common/env_mmc.c b/common/env_mmc.c > index ce21671..02bd5ae 100644 > --- a/common/env_mmc.c > +++ b/common/env_mmc.c > @@ -46,13 +46,11 @@ DECLARE_GLOBAL_DATA_PTR; > #define CONFIG_ENV_OFFSET 0 > #endif > > -static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) > +__weak int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) > { > *env_addr = CONFIG_ENV_OFFSET; > return 0; > } > -int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) > - __attribute__((weak, alias("__mmc_get_env_addr"))); > > int env_init(void) > { Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Selecting from multiple device trees at runtime
On 01/07/2013 08:16 PM, Simon Glass wrote: > Hi, > > On Mon, Jan 7, 2013 at 2:21 PM, Curt Brune wrote: >> >> >> On 01/07/2013 12:12 PM, Wolfgang Denk wrote: >>> >>> Dear Curt Brune, >>> >>> In message <50eb0d92.2020...@cumulusnetworks.com> you wrote: What I would love is to have a single multi-file uImage I could use on all my platforms. The idea is to introduce a new image type that is a list of device tree blobs. >>> >>> >>> In addition to the file system based approach suggested by Stephen, >>> you should have a look into using FIT images (see doc/uImage.FIT/ ). >>> One of the reasons for creating these was to deal with situations >>> exactly as you describe... >> >> >> I think that will work perfectly. Thank you for the suggestion. > > Note also there is code in mainline now to select the correct FDT from > a list of them in a FIT. based on the model name. Then it can pass > this to the kernel. So if you have a way of getting the model name in > U-Boot, it might just work. Hmmm. What's the model name compared against? U-Boot board name variable would be nice! As a general comment here, I think the main issue Curt is facing is how to select the correct DT in U-Boot. Whether the n DTBs to be selected between are stored in a single FIT file, or stored in separate *.dtb files, seems pretty irrelevant to that core problem of how to select between them. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Selecting from multiple device trees at runtime
Hi Stephen, On Tue, Jan 8, 2013 at 8:42 AM, Stephen Warren wrote: > On 01/07/2013 08:16 PM, Simon Glass wrote: >> Hi, >> >> On Mon, Jan 7, 2013 at 2:21 PM, Curt Brune wrote: >>> >>> >>> On 01/07/2013 12:12 PM, Wolfgang Denk wrote: Dear Curt Brune, In message <50eb0d92.2020...@cumulusnetworks.com> you wrote: > > > What I would love is to have a single multi-file uImage I could use on > all my platforms. The idea is to introduce a new image type that is a > list of device tree blobs. In addition to the file system based approach suggested by Stephen, you should have a look into using FIT images (see doc/uImage.FIT/ ). One of the reasons for creating these was to deal with situations exactly as you describe... >>> >>> >>> I think that will work perfectly. Thank you for the suggestion. >> >> Note also there is code in mainline now to select the correct FDT from >> a list of them in a FIT. based on the model name. Then it can pass >> this to the kernel. So if you have a way of getting the model name in >> U-Boot, it might just work. > > Hmmm. What's the model name compared against? U-Boot board name variable > would be nice! At the moment it compares against the model in the U-Boot FDT (CONFIG_OF_CONTROL). When flashing a board, you pack u-boot.bin with the selected .dtb file containing this model name. Then when U-Boot runs it knows what its model is. You could do what you describe, but it is then a compile-time check, I think. There could be other ways to decide on the model name, such as looking at strapping GPIOs, for example: static const char *detect_model(void) { if (gpio_get_value(36)) return "snow"; else return "flax"; } > > As a general comment here, I think the main issue Curt is facing is how > to select the correct DT in U-Boot. Whether the n DTBs to be selected > between are stored in a single FIT file, or stored in separate *.dtb > files, seems pretty irrelevant to that core problem of how to select > between them. FIT selects between them already if you know the model - define CONFIG_FIT_BEST_MATCH and it should work. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
On Mon, Jan 7, 2013 at 4:39 PM, Wolfgang Denk wrote: > > This seems broken to me. Can we rather try8 and get rid of all this > "bool" stuff instead? It's just obfuscating the code... Like Scott said, we sometimes copy code from Linux that uses 'bool', so it's simpler if we just retain this commonly-used type. If it's part of the language, how is it obfuscating? Maybe the Linux developers should have used _Bool instead of bool, but they didn't, and so here we are. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] MIPS: qemu-mips: update and fix example usage in README
From: Daniel Schwierzeck By now U-Boot supports Qemu MIPS for little and big endian as well as 32 bit and 64 bit. Update and fix the example usage in the README to reflect this. Signed-off-by: Daniel Schwierzeck --- board/qemu-mips/README | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/board/qemu-mips/README b/board/qemu-mips/README index ec58ce4..1fdfbab 100644 --- a/board/qemu-mips/README +++ b/board/qemu-mips/README @@ -7,7 +7,7 @@ http://www.nongnu.org/qemu/ Limitations & comments -- Supports the "-M mips" configuration of qemu: serial,NE2000,IDE. -Support is big endian only for now (or at least this is what I tested). +Supports little and big endian as well as 32 bit and 64 bit. Derived from au1x00 with a lot of things cut out. Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with @@ -21,19 +21,33 @@ Notes for the Qemu MIPS port I) Example usage: -# ln -s u-boot.bin mips_bios.bin -start it: -qemu-system-mips -M mips -L . /dev/null -nographic +Using u-boot.bin as ROM (replaces Qemu monitor): -or +32 bit, big endian: +# make qemu_mips +# qemu-system-mips -M mips -bios u-boot.bin -nographic + +32 bit, little endian: +# make qemu_mipsel +# qemu-system-mipsel -M mips -bios u-boot.bin -nographic + +64 bit, big endian: +# make qemu_mips64 +# qemu-system-mips64 -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic + +64 bit, little endian: +# make qemu_mips64el +# qemu-system-mips64el -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic + +or using u-boot.bin from emulated flash: if you use a qemu version after commit 4224 create image: # dd of=flash bs=1k count=4k if=/dev/zero # dd of=flash bs=1k conv=notrunc if=u-boot.bin -start it: -# qemu-system-mips -M mips -pflash flash -monitor null -nographic +start it (see above): +# qemu-system-mips[64][el] [-cpu MIPS64R2-generic] -M mips -pflash flash -nographic 2) Download kernel + initrd -- 1.8.0.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/2] Factorize ARM startup code as mush as possible.
On Tue, 27 Nov 2012 13:43:24 +0100, Albert ARIBAUD wrote: > The goal of this series is to scrub the start.S files > which have proliferated across arch/arm and eliminate > code redundancy. > > This series only factorizes the C runtime framework, > that is, the assembly code responsible for setting up > the C environments needed by board_init_*() and > relocate_code(). > > Further factorization is possible: relocate_code() can > be moved out and possibly rewritten in C now that it > has plain C function semantics; exception handlers > should also be pretty much cpu-independent. > > Also, SPL currently makes board_init_f() perform all > of the setting up, including BSS clearing and chain- > loading. This could be streamlined by only putting > basic inits in board_init_f(), letting crt0 do the > BSS initialization and chain-loading U-Boot from > inside board_init_r(). > > Eventually, start.S files should disappear or contain > CPU-specific code only. > > The new C runtime setup sequence has been validated step by > step on targets versatileqemu using gcc version 4.2.2 from > the ELDK4.2 toolchain, and wireless_space using gcc version > 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1). > > The whole changes have been build-tested across all ARM > targets using MAKEALL -a arm. > > Changes in v4: > - fixed bhs into blo in BSS init loop > - switched from explicit literals to '=target' notation > - fixed location of GD in initial environment > - stopped SPL boot sequence at calling board_init_f > > Changes in v3: > - various clarifications and typo fixes > - fixed wrong LED calls conditional > - fixed open comment eating some code > - fixed code overrun in SPL case > > Changes in v2: > - moved description from cover letter to patch commit msg > - added note about tests in the cover letter > - fixed baords with CONFIG_SPL but not CONFIG_SPL_STACK > - removed useless includes in arm926ejs and arm925t > > Albert ARIBAUD (2): > arm: move C runtime setup code in crt0.S > arm: remove useless code in start.S files > > arch/arm/cpu/arm1136/start.S | 71 +++- > arch/arm/cpu/arm1176/start.S | 62 ++- > arch/arm/cpu/arm720t/start.S | 53 ++--- > arch/arm/cpu/arm920t/start.S | 61 ++ > arch/arm/cpu/arm925t/start.S | 65 ++- > arch/arm/cpu/arm926ejs/start.S| 86 ++ > arch/arm/cpu/arm946es/start.S | 56 ++ > arch/arm/cpu/arm_intcm/start.S| 63 ++- > arch/arm/cpu/armv7/start.S| 58 +++--- > arch/arm/cpu/ixp/start.S | 55 ++--- > arch/arm/cpu/pxa/start.S | 63 ++- > arch/arm/cpu/s3c44b0/start.S | 55 ++--- > arch/arm/cpu/sa1100/start.S | 50 ++--- > arch/arm/lib/Makefile |2 + > arch/arm/lib/board.c | 11 -- > arch/arm/lib/crt0.S | 173 > + > include/common.h |2 +- > include/configs/socfpga_cyclone5.h|2 +- > lib/asm-offsets.c | 10 ++ > nand_spl/board/freescale/mx31pdk/Makefile |6 +- > nand_spl/board/karo/tx25/Makefile |6 +- > 21 files changed, 322 insertions(+), 688 deletions(-) > create mode 100644 arch/arm/lib/crt0.S > Applied to u-boot-arm/master. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC] mmc:fix: Increase the timeout value for SDHCI_send_command()
I'd like to ask for your opinion about the following problem: TRATS # saveenv Saving Environment to MMC... Writing to MMC(0)... Controller never released inhibit bit(s). Controller never released inhibit bit(s). Controller never released inhibit bit(s). ... failed The same is for e.g. ext4. The provided patch seems to solve the problem, but I DO NOT think that increasing delay is an acceptable solution to any problem. >From a brief checking I can say that it happens when we are doing consecutive MMC operations (i.e. many reads), and the 10ms timeout might be too short when eMMC firmware is forced to do some internal time consuming operations (e.g. flash blocks management, wear leveling). In this situation, the SDHCI_CMD_INHIBIT bit is set, which means that SDHCI controller didn't received response from eMMC. One proposition would be to define the per device/per memory chip specific timeouts, to replace those defined at ./drivers/mmc/sdhci.c file. I also assume, that timeouts cannot be removed, since we must detect if user pulls out a SD card or transmission has been broken. I'm also wondering if we can tune the sdhci code to improve cooperation with eMMC devices (despite of the fact that this is NOT really needed at u-boot :-) ). Signed-off-by: Lukasz Majewski Cc: Jaehoon Chung Cc: Andy Fleming --- drivers/mmc/sdhci.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index b9cbe34..0fd1337 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -137,8 +137,8 @@ int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, unsigned int timeout, start_addr = 0; unsigned int retry = 1; - /* Wait max 10 ms */ - timeout = 10; + /* Wait max 100 ms */ + timeout = 100; sdhci_writel(host, SDHCI_INT_ALL_MASK, SDHCI_INT_STATUS); mask = SDHCI_CMD_INHIBIT | SDHCI_DATA_INHIBIT; -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] am33xx: add a pulldown macro to pinmux config
From: Lars Poeschel Signed-off-by: Lars Poeschel --- arch/arm/include/asm/arch-am33xx/mux.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-am33xx/mux.h b/arch/arm/include/asm/arch-am33xx/mux.h index aed6b00..460ac1c 100644 --- a/arch/arm/include/asm/arch-am33xx/mux.h +++ b/arch/arm/include/asm/arch-am33xx/mux.h @@ -25,7 +25,8 @@ /* PAD Control Fields */ #define SLEWCTRL (0x1 << 6) #define RXACTIVE (0x1 << 5) -#define PULLUP_EN (0x1 << 4) /* Pull UP Selection */ +#define PULLDOWN_EN(0x0 << 4) /* Pull Down Selection */ +#define PULLUP_EN (0x1 << 4) /* Pull Up Selection */ #define PULLUDEN (0x0 << 3) /* Pull up enabled */ #define PULLUDDIS (0x1 << 3) /* Pull up disabled */ #define MODE(val) val /* used for Readability */ -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] pcm051: Add support for Phytec phyCORE-AM335x
From: Lars Poeschel The board is named pcm051 and has this hardware: SOC: TI AM3359 DDR3-RAM: 2x MT41J256M8HX-15EIT:D 512MiB ETH 1: LAN8710AI SPI-Flash: W25Q64BVSSIG RTC: RV-4162-C7 I2C-EEPROM: CAT32WC32 NAND: MT29F4G08_VFPGA63 PMIC: TPS65910A3 LCD Supported: UART 1 MMC/SD ETH 1 USB I2C SPI Not yet supported: NAND RTC LCD Signed-off-by: Lars Poeschel --- arch/arm/include/asm/arch-am33xx/ddr_defs.h | 18 ++ board/phytec/pcm051/Makefile| 46 board/phytec/pcm051/board.c | 271 +++ board/phytec/pcm051/board.h | 33 +++ board/phytec/pcm051/mux.c | 133 boards.cfg |1 + include/configs/pcm051.h| 308 +++ 7 files changed, 810 insertions(+) create mode 100644 board/phytec/pcm051/Makefile create mode 100644 board/phytec/pcm051/board.c create mode 100644 board/phytec/pcm051/board.h create mode 100644 board/phytec/pcm051/mux.c create mode 100644 include/configs/pcm051.h diff --git a/arch/arm/include/asm/arch-am33xx/ddr_defs.h b/arch/arm/include/asm/arch-am33xx/ddr_defs.h index 8e69fb6..f95b332 100644 --- a/arch/arm/include/asm/arch-am33xx/ddr_defs.h +++ b/arch/arm/include/asm/arch-am33xx/ddr_defs.h @@ -65,6 +65,24 @@ #define MT41J128MJT125_PHY_FIFO_WE 0x100 #define MT41J128MJT125_IOCTRL_VALUE0x18B +/* Micron MT41J256M8HX-15E */ +#define MT41J256M8HX15E_EMIF_READ_LATENCY 0x06 +#define MT41J256M8HX15E_EMIF_TIM1 0x0888A39B +#define MT41J256M8HX15E_EMIF_TIM2 0x26337FDA +#define MT41J256M8HX15E_EMIF_TIM3 0x501F830F +#define MT41J256M8HX15E_EMIF_SDCFG 0x61C04B32 +#define MT41J256M8HX15E_EMIF_SDREF 0x093B +#define MT41J256M8HX15E_ZQ_CFG 0x50074BE4 +#define MT41J256M8HX15E_DLL_LOCK_DIFF 0x1 +#define MT41J256M8HX15E_RATIO 0x40 +#define MT41J256M8HX15E_INVERT_CLKOUT 0x1 +#define MT41J256M8HX15E_RD_DQS 0x3B +#define MT41J256M8HX15E_WR_DQS 0x85 +#define MT41J256M8HX15E_PHY_WR_DATA0xC1 +#define MT41J256M8HX15E_PHY_FIFO_WE0x100 +#define MT41J256M8HX15E_IOCTRL_VALUE 0x18B + + /** * Configure SDRAM */ diff --git a/board/phytec/pcm051/Makefile b/board/phytec/pcm051/Makefile new file mode 100644 index 000..67a87a1 --- /dev/null +++ b/board/phytec/pcm051/Makefile @@ -0,0 +1,46 @@ +# +# Makefile +# +# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed "as is" WITHOUT ANY WARRANTY of any +# kind, whether express or implied; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +ifdef CONFIG_SPL_BUILD +COBJS := mux.o +endif + +COBJS += board.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c new file mode 100644 index 000..d2fb60d --- /dev/null +++ b/board/phytec/pcm051/board.c @@ -0,0 +1,271 @@ +/* + * board.c + * + * Board functions for Phytec phyCORE-AM335x (pcm051) based boards + * + * Copyright (C) 2013 Lemonage Software GmbH + * Author Lars Poeschel + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "board.h" + +DECLARE_GLOBAL_DATA_PTR; + +static struct wd_timer *wdtimer = (struct wd_timer *)WDT_
Re: [U-Boot] Pull request for u-boot-marvell.git
Dear Albert Please pull The following changes since commit 7528cf5f016b5b8b8b12b373f6f31a10bf89233d: Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' (2013-01-08 14:59:37 +0100) are available in the git repository at: u-boot-marvell.git master branch. Albert ARIBAUD (3): mv88e61xx: refactor PHY and SWITCH level-code kirkwood: make MPP arrays static const ARM: lacie_kw: add support for WIRELESS_SPACE Andreas Bießmann (1): mv-common.h: increase malloc arena to 4MiB Holger Brunck (3): arm/km: fix memory settings km/common: drop unneeded std* environment variables km/common: cosmetic change reported from checkpatch Luke Lowrey (1): arch-kirkwood: Ethernet port macro returning incorrect address Michael Walle (1): lsxl: unset ncip for rescue mode Valentin Longchamp (1): arm/km: remove duplicate code arch/arm/cpu/arm926ejs/kirkwood/mpp.c |2 +- arch/arm/include/asm/arch-kirkwood/cpu.h|2 +- arch/arm/include/asm/arch-kirkwood/mpp.h|2 +- board/LaCie/net2big_v2/net2big_v2.c |2 +- board/LaCie/netspace_v2/netspace_v2.c |2 +- board/LaCie/wireless_space/Makefile | 46 +++ board/LaCie/wireless_space/kwbimage.cfg | 82 board/LaCie/wireless_space/wireless_space.c | 176 board/Marvell/dreamplug/dreamplug.c |2 +- board/Marvell/guruplug/guruplug.c |2 +- board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c |2 +- board/Marvell/openrd/openrd.c |2 +- board/Marvell/rd6281a/rd6281a.c |2 +- board/Marvell/sheevaplug/sheevaplug.c |2 +- board/Seagate/dockstar/dockstar.c |2 +- board/buffalo/lsxl/lsxl.c |7 +- board/cloudengines/pogo_e02/pogo_e02.c |2 +- board/d-link/dns325/dns325.c|2 +- board/iomega/iconnect/iconnect.c|2 +- board/karo/tk71/tk71.c |2 +- board/keymile/common/common.c |2 +- board/keymile/km_arm/km_arm.c | 16 +- board/keymile/km_arm/kwbimage-memphis.cfg |6 +- board/keymile/km_arm/kwbimage.cfg |6 +- board/keymile/km_arm/kwbimage_128M16_1.cfg | 25 +- board/keymile/km_arm/kwbimage_256M8_1.cfg | 25 +- board/raidsonic/ib62x0/ib62x0.c |2 +- boards.cfg |1 + drivers/net/phy/mv88e61xx.c | 495 ++ drivers/net/phy/mv88e61xx.h | 39 ++- drivers/spi/kirkwood_spi.c | 12 +- include/configs/km/keymile-common.h |3 - include/configs/lsxl.h |2 +- include/configs/mv-common.h |2 +- include/configs/wireless_space.h| 194 + include/netdev.h| 21 +- 36 files changed, 896 insertions(+), 298 deletions(-) create mode 100644 board/LaCie/wireless_space/Makefile create mode 100644 board/LaCie/wireless_space/kwbimage.cfg create mode 100644 board/LaCie/wireless_space/wireless_space.c create mode 100644 include/configs/wireless_space.h Regards... Prafulla . . . From: Albert ARIBAUD [albert.u.b...@aribaud.net] Sent: Tuesday, January 08, 2013 8:33 PM To: Prafulla Wadaskar Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; 'Wolfgang Denk'; Andreas Bießmann Subject: Re: Pull request for u-boot-marvell.git Hi Prafulla, On Mon, 7 Jan 2013 04:26:09 -0800, Prafulla Wadaskar wrote: > > > > -Original Message- > > From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] > > Sent: 23 December 2012 20:40 > > To: Prafulla Wadaskar > > Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; > > 'Wolfgang Denk'; Andreas Bießmann > > Subject: Re: Pull request for u-boot-marvell.git > > > > Hi Prafulla, > > > > On Thu, 20 Dec 2012 02:05:36 -0800, Prafulla Wadaskar > > wrote: > > > Dear Albert > > > Please discard my earlier pull request and please pull > > > The following changes since commit > > b8a7c467960ffb4d5a5e1eef5f7783fb6f594542: > > > Albert ARIBAUD (1): > > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' > > > > > > are available in the git repository at: > > > > > > u-boot-marvell.git master branch. > > > > > > Albert ARIBAUD (3): > > > mv88e61xx: refactor PHY and SWITCH level-code > > > kirkwood: make MPP arrays static const > > > ARM: lacie_kw: add support for WIRELESS_SPACE > > > > > > Holger Brunck (3): > > > arm/km: fix memory settings > > > km/common: drop unneeded std* environment variables > > > km/common: cosmetic change reported from checkpatch > > > > > > Luke Lowrey (1): > > > arch-kirkwood: Ethernet port macro returning
Re: [U-Boot] [PATCH 1/2] board/qemu-mips: fix a typo in README
2013/1/8 Gabor Juhos : > The 'Limitations & comments' section refers to the > '-m mips' switch which is not valid. The '-m' switch > can be used for setting the virtual RAM size: > > $qemu-system-mips --help | grep '^-m ' > -m megs set virtual RAM size to megs MB [default=128] > $ > > The correct switch for specifying the machine type is '-M'. > Fix the text to refer to that. > > Signed-off-by: Gabor Juhos > Cc: Daniel Schwierzeck > Cc: Vlad Lungu > --- > board/qemu-mips/README |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) applied to u-boot-mips/next, thanks -- Best regards, Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] board/qemu-mips: add '-M mips' switch to the example usage command
2013/1/8 Gabor Juhos : > Using the example command from the README file does > not work as expected. qemu shows a text similar to > the one below and it hangs. > > $ qemu-system-mips -L . -nographic > Could not open option rom 'pxe-pcnet.rom': No such file or directory > qemu-system-mips: pci_add_option_rom: failed to find romfile > "vgabios-cirrus.bin" > qemu: terminating on signal 15 from pid 19726 > > This happens because qemu emulates a Malta board by > default if the machine type is not defined explicitely > on the command line. > > For a working test, the '-M mips' switch is required: > > $ qemu-system-mips -M mips -L . -nographic > Could not open option rom 'vgabios.bin': No such file or directory > > U-Boot 2013.01-rc2-00132-g1e8e648-dirty (Jan 08 2013 - 09:06:42) > > Board: Qemu -M mips CPU: 24Kf proc_id=0x19300 > DRAM: 128 MiB > ## Unknown flash on Bank 1 - Size = 0x = 0 MB > Flash: 0 Bytes > *** Warning - bad CRC, using default environment > > In:serial > Out: serial > Err: serial > Net: NE2000 > Hit any key to stop autoboot: 0 > qemu-mips # > > Signed-off-by: Gabor Juhos > Cc: Daniel Schwierzeck > Cc: Vlad Lungu > --- > board/qemu-mips/README |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) applied to u-boot-mips/next, thanks -- Best regards, Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot and Ethernet Controller issue
Dear Sandeep C R, In message you wrote: > > I have developed a PowerPC MPC7410 based processor board with Tsi107 as the > Host bridge and intel 82551 the ethernet controller. We have ported > u-boot-1.3.1 into it as its boot loader. U-Boot v1.3.1? But this is more than 5 years old!! Why did you chose such a prehistoric version? > about 90 minutes everytime. Is it something to do with the config of > ethernet controller? Please advice. Please update to current code (like v2013.01-rc2 or so), and try again. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Sometimes, too long is too long. - Joe Crowe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Selecting from multiple device trees at runtime
On 01/08/2013 09:51 AM, Simon Glass wrote: > Hi Stephen, > > On Tue, Jan 8, 2013 at 8:42 AM, Stephen Warren wrote: >> On 01/07/2013 08:16 PM, Simon Glass wrote: >>> Hi, >>> >>> On Mon, Jan 7, 2013 at 2:21 PM, Curt Brune wrote: On 01/07/2013 12:12 PM, Wolfgang Denk wrote: > > Dear Curt Brune, > > In message <50eb0d92.2020...@cumulusnetworks.com> you wrote: >> >> >> What I would love is to have a single multi-file uImage I could use on >> all my platforms. The idea is to introduce a new image type that is a >> list of device tree blobs. > > > In addition to the file system based approach suggested by Stephen, > you should have a look into using FIT images (see doc/uImage.FIT/ ). > One of the reasons for creating these was to deal with situations > exactly as you describe... I think that will work perfectly. Thank you for the suggestion. >>> >>> Note also there is code in mainline now to select the correct FDT from >>> a list of them in a FIT. based on the model name. Then it can pass >>> this to the kernel. So if you have a way of getting the model name in >>> U-Boot, it might just work. >> >> Hmmm. What's the model name compared against? U-Boot board name variable >> would be nice! > > At the moment it compares against the model in the U-Boot FDT > (CONFIG_OF_CONTROL). When flashing a board, you pack u-boot.bin with > the selected .dtb file containing this model name. Then when U-Boot > runs it knows what its model is. > > You could do what you describe, but it is then a compile-time check, I think. > > There could be other ways to decide on the model name, such as looking > at strapping GPIOs, for example: > > static const char *detect_model(void) > { > if (gpio_get_value(36)) > return "snow"; > else > return "flax"; > } Right - I believe the TI guys introduced the board_name variable or similar to indicate the runtime-detected board ID for this purpose (whereas the board variable I introduced is the board U-Boot was compiled for). It'd be nice to be able to select a DTB from FIT based on $board_name instead of U-Boot's own DTB's model given all this. Do the sub-images in the FIT image have filenames that could be selected as e.g. ${soc}-${board}.dtb? Using $board or $board_name would also help where U-Boot doesn't use a DT itself. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] net: Remove call of srand from eth_random_enetaddr()
Dear Christian Riesch, In message <419e5c6e-b2ef-44c2-a4c1-bb25c50fc...@mary.at.omicron.at> you wrote: > Currently eth_random_enetaddr() seeds the random number generator with > get_timer(0). Some boards might want to use other sources for the seed, > therefore move the call of srand() to the board specific code. > > Signed-off-by: Christian Riesch > Cc: Michael Walle > Cc: Joe Hershberger I don't like this change. What exactly is wrong with using the timer here? It is probably much more random that the (so-called) "un-initialized" memory you suggest to use instead. If there is really need to use another inital valu, only this should be fixed - but the srand() call itself should remain as is. You cannot do this. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de You can observe a lot just by watchin'. - Yogi Berra ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] calimain: Generate random MAC address for factory tests
Dear Christian Riesch, In message <6cc4810c-1e2e-4ebf-912a-96936f035...@mary.at.omicron.at> you wrote: > Signed-off-by: Christian Riesch > --- > board/omicron/calimain/calimain.c | 31 ++- > include/configs/calimain.h|2 ++ > 2 files changed, 32 insertions(+), 1 deletion(-) > > diff --git a/board/omicron/calimain/calimain.c > b/board/omicron/calimain/calimain.c > index 1060a1f..80e3893 100644 > --- a/board/omicron/calimain/calimain.c > +++ b/board/omicron/calimain/calimain.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (C) 2011 OMICRON electronics GmbH > + * Copyright (C) 2011-2013 OMICRON electronics GmbH > * > * Based on da850evm.c. Original Copyrights follow: > * > @@ -136,6 +136,35 @@ int board_init(void) > return 0; > } > > +/* seed random number generator with uninitialized SRAM content */ > +static void srand_sram(void) > +{ > + int *p; > + int seed = 0; > + > + for (p = (int *) 0x8000; p < (int *) 0x8001; p++) > + seed ^= *p; > + > + srand(seed); > +} Note that your "uninitialized" SRAM content is probably not so much random at all - I guess, it is much less random than the originally used timer value. What exactly is your justification for such a change? Please elucidate... > +int board_late_init(void) > +{ > + uchar enetaddr[6]; > + > + if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { > + srand_sram(); > + eth_random_enetaddr(enetaddr); > + if (eth_setenv_enetaddr("ethaddr", enetaddr)) { > + printf("Failed to set random ethernet address\n"); > + } else { > + printf("Setting random ethernet address %pM.\n", > +enetaddr); > + } > + } > + return 0; > +} NAK! You are but duplicating the code already present in net/eth.c This makes no sense. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de It is dangerous to be right on a subject on which the established authorities are wrong.-- Voltaire ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
Dear Tabi Timur-B04825, In message <6ae080b68d46fc4ba2d2769e68d765b708205...@039-sn2mpn1-023.039d.mgd.msft.net> you wrote: > > > > This seems broken to me. Can we rather try8 and get rid of all this > > "bool" stuff instead? It's just obfuscating the code... > > Like Scott said, we sometimes copy code from Linux that uses 'bool', > so it's simpler if we just retain this commonly-used type. If it's > part of the language, how is it obfuscating? Maybe the Linux _Bool has been introduced very late to any C standard, and you can still see this from the ugly, unnatural name. It is my personal firm conviction that the people pushed it were not the ones who have been using C right from the beginning, say from the times of Unix v6 or so. IMHO it is much better to rely on '0' meaning "false" and anything else meaning "true" instead of insisting on one specific value of "true". Yes, people claim the code is easier to read and understand, but these are the same people who claim drop-down menues are easier to work wit than a CLI. And I've seen more than one case where bugs were caused by using "proper bool types" like this: i = 0; j = 0; k = 2; if ((i | j | k) == true) ... > developers should have used _Bool instead of bool, but they didn't, > and so here we are. Well, I raised my concerns, but I do not intend to formally NAK it. In any case, I insist on using the standard header file. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Lispers are among the best grads of the Sweep-It-Under-Someone- Else's-Carpet School of Simulated Simplicity. [Was that sufficiently incendiary? :-)] - Larry Wall in <1992jan10.201804.11...@netlabs.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
Wolfgang Denk wrote: > Dear Tabi Timur-B04825, > > In message > <6ae080b68d46fc4ba2d2769e68d765b708205...@039-sn2mpn1-023.039d.mgd.msft.net> > you wrote: >>> >>> This seems broken to me. Can we rather try8 and get rid of all this >>> "bool" stuff instead? It's just obfuscating the code... >> >> Like Scott said, we sometimes copy code from Linux that uses 'bool', >> so it's simpler if we just retain this commonly-used type. If it's >> part of the language, how is it obfuscating? Maybe the Linux > > _Bool has been introduced very late to any C standard, and you can > still see this from the ugly, unnatural name. It was introduced in C99, which is over 12 years old. > It is my personal firm conviction that the people pushed it were not > the ones who have been using C right from the beginning, say from the > times of Unix v6 or so. > > IMHO it is much better to rely on '0' meaning "false" and anything > else meaning "true" instead of insisting on one specific value of > "true". Yes, people claim the code is easier to read and understand, > but these are the same people who claim drop-down menues are easier to > work wit than a CLI. And I've seen more than one case where bugs were > caused by using "proper bool types" like this: > > i = 0; > j = 0; > k = 2; > > if ((i | j | k) == true) ... Ok, but this is just wrong. i, j, and k are not boolean types, so they should not be compared with 'true' or 'false'. I don't think you'll find any disagreement with that. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Selecting from multiple device trees at runtime
Hi Stephen, On Tue, Jan 8, 2013 at 9:37 AM, Stephen Warren wrote: > On 01/08/2013 09:51 AM, Simon Glass wrote: >> Hi Stephen, >> >> On Tue, Jan 8, 2013 at 8:42 AM, Stephen Warren wrote: >>> On 01/07/2013 08:16 PM, Simon Glass wrote: Hi, On Mon, Jan 7, 2013 at 2:21 PM, Curt Brune wrote: > > > On 01/07/2013 12:12 PM, Wolfgang Denk wrote: >> >> Dear Curt Brune, >> >> In message <50eb0d92.2020...@cumulusnetworks.com> you wrote: >>> >>> >>> What I would love is to have a single multi-file uImage I could use on >>> all my platforms. The idea is to introduce a new image type that is a >>> list of device tree blobs. >> >> >> In addition to the file system based approach suggested by Stephen, >> you should have a look into using FIT images (see doc/uImage.FIT/ ). >> One of the reasons for creating these was to deal with situations >> exactly as you describe... > > > I think that will work perfectly. Thank you for the suggestion. Note also there is code in mainline now to select the correct FDT from a list of them in a FIT. based on the model name. Then it can pass this to the kernel. So if you have a way of getting the model name in U-Boot, it might just work. >>> >>> Hmmm. What's the model name compared against? U-Boot board name variable >>> would be nice! >> >> At the moment it compares against the model in the U-Boot FDT >> (CONFIG_OF_CONTROL). When flashing a board, you pack u-boot.bin with >> the selected .dtb file containing this model name. Then when U-Boot >> runs it knows what its model is. >> >> You could do what you describe, but it is then a compile-time check, I think. >> >> There could be other ways to decide on the model name, such as looking >> at strapping GPIOs, for example: >> >> static const char *detect_model(void) >> { >> if (gpio_get_value(36)) >> return "snow"; >> else >> return "flax"; >> } > > Right - I believe the TI guys introduced the board_name variable or > similar to indicate the runtime-detected board ID for this purpose > (whereas the board variable I introduced is the board U-Boot was > compiled for). It'd be nice to be able to select a DTB from FIT based on > $board_name instead of U-Boot's own DTB's model given all this. Do the > sub-images in the FIT image have filenames that could be selected as > e.g. ${soc}-${board}.dtb? Using $board or $board_name would also help > where U-Boot doesn't use a DT itself. Actually I had this a bit wrong - it's actually the compatible strings that are compared - the model is just a friendly name of course. So we use compatible = "nvidia,seaboard", etc. So the snow device tree has something like: { compatible = "google,snow", "google,daisy", "samsung,smdk5250", "samsung,exynos5250"; ... }; and we put a similar string in the kernel FDTs. U-Boot then picks up the correct FDT based on preference (google,snow is the best, google,daisy the next best...) FITs don't have filenames, although I suppose you are free to add any properties you want. To my mind, a compatible name is more device-tree friendly than introducing filenames to specify this info. We already have things like nvidia,seaboard and the like, so that should be good enough. As you know FIT images do have a 'configurations' section, so you can do things like: images { kernel@1 { ... }; fdt@1 { incbin ... (binary contains: compatible = "google,snow";) }; fdt@2 { incbin ... (binary contains: compatible = "google,flax";) }; }; configurations { conf@1 { kernel = "kernel@1"; fdt = "fdt@1"; }; conf@2 { kernel = "kernel@1"; fdt = "fdt@2"; }; ... }; At present it looks at the compatible property in each of the fdt@ nodes and compares it against the compatible string in U-Boot. It would be easy enough to add a feature to look up an FDT based on an environment variable, but keep in mind that the bootm command already mostly supports this. You can specify the configuration name to bootm and it will boot with that configuration. We need to make sure we don't create too many ways to do the same thing. In other words, people can probably script this today if they want to. Perhaps for your use case what is missing is a bootm command to specify a compatible string to search for (rather than pulling it out of the control FDT). But for Tegra at least, the current approach should work OK. I quite like the idea of detected an FDT compatible string from the board where auto-detection is required, because then there is only one concept of what a board is and only one way of describing it. Also, it is ultimately the compatible string which selects which FDT we pass to the kernel, and the kernel understands the compatible strings too. I happen to be fiddling with the FIT code at present and am working on a series to tidy up the code
[U-Boot] [PATCH 0/2] ARM: mmu: Set domain permissions to client access
Currently for ARM based cpu's, mmu pagetable attributes are set with manager permissions for all 4GB address space. Because of this the 'execute never (XN)' permission is never checked on read sensitive regions which results in speculative aborts. This series changes the domain permissions of the full 4GB space to client access for OMAP socs. This avoids all the speculative aborts that are currently seen on OMAP5 secure devices. Tested on OMAP5 SDP (HS) soc. This series depends on [1] the patch sent by [1] http://www.mail-archive.com/u-boot@lists.denx.de/msg102709.html R Sricharan (2): ARM: mmu: Introduce weak dram_bank_setup function ARM: mmu: Set domain permissions to client access arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/cache.h |1 + arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c | 13 - 5 files changed, 65 insertions(+), 1 deletion(-) -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] ARM: mmu: Set domain permissions to client access
The 'XN' execute never bit is set in the pagetables. This will prevent speculative prefetches to non executable regions. But the domain permissions are set as master in the DACR register. So the pagetable attribute for 'XN' is not effective. Change the permissions to client. This fixes lot of speculative prefetch aborts seen on OMAP5 secure devices. Signed-off-by: R Sricharan Tested-by: Vincent Stehle Cc: Vincent Stehle Cc: Tom Rini --- arch/arm/cpu/armv7/cache_v7.c |3 ++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 35 arch/arm/include/asm/system.h | 14 ++ arch/arm/lib/cache-cp15.c |7 + 4 files changed, 59 insertions(+) diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c index 5f6d039..8748c14 100644 --- a/arch/arm/cpu/armv7/cache_v7.c +++ b/arch/arm/cpu/armv7/cache_v7.c @@ -340,6 +340,9 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop) { } +void arm_init_domains(void) +{ +} #endif /* #ifndef CONFIG_SYS_DCACHE_OFF */ #ifndef CONFIG_SYS_ICACHE_OFF diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index 9ef10bd..4eaf75b 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -32,6 +32,12 @@ #include #include #include +#include +#include + +#define ARMV7_DCACHE_WRITEBACK 0xe +#defineARMV7_DOMAIN_CLIENT 1 +#define ARMV7_DOMAIN_MASK (0x3 << 0) DECLARE_GLOBAL_DATA_PTR; @@ -258,4 +264,33 @@ void enable_caches(void) /* Enable D-cache. I-cache is already enabled in start.S */ dcache_enable(); } + +void dram_bank_mmu_setup(int bank) +{ + bd_t *bd = gd->bd; + int i; + + u32 start = bd->bi_dram[bank].start >> 20; + u32 size = bd->bi_dram[bank].size >> 20; + u32 end = start + size; + + debug("%s: bank: %d\n", __func__, bank); + for (i = start; i < end; i++) + set_section_dcache(i, ARMV7_DCACHE_WRITEBACK); + +} + +void arm_init_domains(void) +{ + u32 reg; + + reg = get_dacr(); + /* + * Set DOMAIN to client access so that all permissions + * set in pagetables are validated by the mmu. + */ + reg &= ~ARMV7_DOMAIN_MASK; + reg |= ARMV7_DOMAIN_CLIENT; + set_dacr(reg); +} #endif diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 78ca8e0..9cfbb17 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -75,6 +75,20 @@ static inline void set_cr(unsigned int val) isb(); } +static inline unsigned int get_dacr(void) +{ + unsigned int val; + asm("mrc p15, 0, %0, c3, c0, 0 @ get DACR" : "=r" (val) : : "cc"); + return val; +} + +static inline void set_dacr(unsigned int val) +{ + asm volatile("mcr p15, 0, %0, c3, c0, 0 @ set DACR" + : : "r" (val) : "cc"); + isb(); +} + /* options available for data cache on each page */ enum dcache_option { DCACHE_OFF = 0x12, diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 3e5de55..0852f40 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -36,6 +36,10 @@ void __arm_init_before_mmu(void) void arm_init_before_mmu(void) __attribute__((weak, alias("__arm_init_before_mmu"))); +__weak void arm_init_domains(void) +{ +} + static void cp_delay (void) { volatile int i; @@ -117,6 +121,9 @@ static inline void mmu_setup(void) /* Set the access control to all-supervisor */ asm volatile("mcr p15, 0, %0, c3, c0, 0" : : "r" (~0)); + + arm_init_domains(); + /* and enable the mmu */ reg = get_cr(); /* get control reg. */ cp_delay(); -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] ARM: mmu: Introduce weak dram_bank_setup function
Introduce a weak version of dram_bank_setup function to allow a platform specific function. This is used in the subsequent patch to setup dram region without 'XN' attribute in order to enable the region under client permissions. Signed-off-by: R Sricharan Cc: Vincent Stehle Cc: Tom Rini --- arch/arm/include/asm/cache.h |1 + arch/arm/lib/cache-cp15.c|4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index eef6a5a..93811d2 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h @@ -42,6 +42,7 @@ static inline void invalidate_l2_cache(void) void l2_cache_enable(void); void l2_cache_disable(void); +void dram_bank_mmu_setup(int bank); /* * The current upper bound for ARM L1 data cache line sizes is 64 bytes. We * use that value for aligning DMA buffers unless the board config has specified diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 6edf815..3e5de55 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -23,6 +23,8 @@ #include #include +#include +#include #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) @@ -77,7 +79,7 @@ void mmu_set_region_dcache_behaviour(u32 start, int size, mmu_page_table_flush((u32)&page_table[start], (u32)&page_table[end]); } -static inline void dram_bank_mmu_setup(int bank) +__weak void dram_bank_mmu_setup(int bank) { bd_t *bd = gd->bd; int i; -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] ARM: mmu: Introduce weak dram_bank_setup function
Introduce a weak version of dram_bank_setup function to allow a platform specific function. This is used in the subsequent patch to setup dram region without 'XN' attribute in order to enable the region under client permissions. Signed-off-by: R Sricharan Cc: Vincent Stehle Cc: Tom Rini --- arch/arm/include/asm/cache.h |1 + arch/arm/lib/cache-cp15.c|4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index eef6a5a..93811d2 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h @@ -42,6 +42,7 @@ static inline void invalidate_l2_cache(void) void l2_cache_enable(void); void l2_cache_disable(void); +void dram_bank_mmu_setup(int bank); /* * The current upper bound for ARM L1 data cache line sizes is 64 bytes. We * use that value for aligning DMA buffers unless the board config has specified diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 6edf815..3e5de55 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -23,6 +23,8 @@ #include #include +#include +#include #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) @@ -77,7 +79,7 @@ void mmu_set_region_dcache_behaviour(u32 start, int size, mmu_page_table_flush((u32)&page_table[start], (u32)&page_table[end]); } -static inline void dram_bank_mmu_setup(int bank) +__weak void dram_bank_mmu_setup(int bank) { bd_t *bd = gd->bd; int i; -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
* Wolfgang Denk [2013-01-08 18:49]: > In message > <6ae080b68d46fc4ba2d2769e68d765b708205...@039-sn2mpn1-023.039d.mgd.msft.net> > you wrote: > > > > > > This seems broken to me. Can we rather try8 and get rid of all this > > > "bool" stuff instead? It's just obfuscating the code... > > > > Like Scott said, we sometimes copy code from Linux that uses 'bool', > > so it's simpler if we just retain this commonly-used type. If it's > > part of the language, how is it obfuscating? Maybe the Linux > > _Bool has been introduced very late to any C standard, and you can > still see this from the ugly, unnatural name. But C99 (well, that's 12 years now!) also includes that defines 'bool', 'true' and 'false'. Regards, Bernhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mxc nand: Add support for i.MX5
On 01/08/2013 04:54:43 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Tuesday, January 8, 2013 11:38:39 AM, Marek Vasut wrote: > I hope I didn't screw up the attribution. I used "From:" which I hope > is > correct. It's correctly filled, but I don't know if it's used by U-Boot's Git process. I have already seen this "From:" used before. It is used by git. git format-patch generates it when the patch author is different from the e-mail sender, and git am uses it as the commit author if present. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] pcm051: Add support for Phytec phyCORE-AM335x
Dear Lars, In message <1357663926-15937-2-git-send-email-la...@wh2.tu-dresden.de> you wrote: ... > arch/arm/include/asm/arch-am33xx/ddr_defs.h | 18 ++ > board/phytec/pcm051/Makefile| 46 > board/phytec/pcm051/board.c | 271 +++ > board/phytec/pcm051/board.h | 33 +++ > board/phytec/pcm051/mux.c | 133 > boards.cfg |1 + > include/configs/pcm051.h| 308 > +++ Please add an entry to the MAINTAINERS file. Also, please run your patch through checkpatch - it complains about a number of style errors: WARNING: Whitespace before semicolon > +/* DDR RAM defines */ > +#define DDR_CLK_MHZ 303 Is this really correct? 303 ?? > +static void rtc32k_enable(void) > +{ > + struct rtc_regs *rtc = (struct rtc_regs *)AM335X_RTC_BASE; > + > + /* > + * Unlock the RTC's registers. For more details please see the > + * RTC_SS section of the TRM. In order to unlock we need to > + * write these specific values (keys) in this order. > + */ > + writel(0x83e70b13, &rtc->kick0r); > + writel(0x95a4f1e0, &rtc->kick1r); These magic numbers should probbly be moved to some header file ? > +void s_init(void) > +{ > + /* WDT1 is already running when the bootloader gets control > + * Disable it to avoid "random" resets > + */ Incorrect multiline comment style. > + writel(0x, &wdtimer->wdtwspr); More hard-wired magic values? > + while (readl(&wdtimer->wdtwwps) != 0x0) > + ; No timeout? > + writel(0x, &wdtimer->wdtwspr); More hard-wired magic values? > + while (readl(&wdtimer->wdtwwps) != 0x0) > + ; No timeout? > + while ((readl(&uart_base->uartsyssts) & > + UART_CLK_RUNNING_MASK) != UART_CLK_RUNNING_MASK) > + ; Braces needed for multiline statement. > +#ifdef CONFIG_BOARD_LATE_INIT > +int board_late_init(void) > +{ > + return 0; > +} > +#endif Do you plan to use this? Otherwise please just omit such dead code. > +#ifdef CONFIG_DRIVER_TI_CPSW > +static void cpsw_control(int enabled) > +{ > + /* VTP can be added here */ > + > + return; > +} Ditto... > + if (!eth_getenv_enetaddr("ethaddr", mac_addr)) { > + debug(" not set. Reading from E-fuse\n"); This should be a printf(). Any such automatic changes are always worth to be told explicitly. > + goto try_usbether; ... > +#endif > +try_usbether: Did you ever try building without CONFIG_DRIVER_TI_CPSW set? I bet this causes a few compiler warnings. [Hint: You define a label, but don't use it anywhere.] > +#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ Does this really make sense? I doubt you will ever need more than 10% of this size - so you are just wasting a lot of time for checksumming unused memory... > +#define CONFIG_ENV_OVERWRITE 1 Please do not define values for logical variables like this one; please fix globally. > +#define CONFIG_ENV_IS_NOWHERE Really? Thanks! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month. - Wernher von Braun ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
Dear Timur Tabi, In message <50ec5d29.1070...@freescale.com> you wrote: > > > _Bool has been introduced very late to any C standard, and you can > > still see this from the ugly, unnatural name. > > It was introduced in C99, which is over 12 years old. And how old is C? I think the "official" announcment was 1972, so that's more than twice as long without that addition. > > work wit than a CLI. And I've seen more than one case where bugs were > > caused by using "proper bool types" like this: > > > > i = 0; > > j = 0; > > k = 2; > > > > if ((i | j | k) == true) ... > > Ok, but this is just wrong. i, j, and k are not boolean types, so they > should not be compared with 'true' or 'false'. I don't think you'll find > any disagreement with that. You are right. And I wrote that it's a bug. But this is what you can easily get from using boolean types. This is example has not been invented by me. I don't even claim that this was good programming style - all I want to say is that from what I have seen the boolean types are not a panacea; they cause new problems as well. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de A modem is a baudy house. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
Dear Bernhard Walle, In message <20130108183424.ga2...@regiomontanus.your-server.de> you wrote: > > > _Bool has been introduced very late to any C standard, and you can > > still see this from the ugly, unnatural name. > > But C99 (well, that's 12 years now!) also includes that > defines 'bool', 'true' and 'false'. That's strange - you make the same mistake as Timur. For me 2013 - 1999 != 12 :-P Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de : ... and it's got weird formatting - Notepad, Write, Works 3 can't : decipher it, and it's too big to go in DOS Edit. Help! Install an operating system. :-) -- Tom Christiansen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
Wolfgang Denk wrote: > You are right. And I wrote that it's a bug. But this is what you can > easily get from using boolean types. This is example has not been > invented by me. I don't even claim that this was good programming > style - all I want to say is that from what I have seen the boolean > types are not a panacea; they cause new problems as well. I don't disagree with any of that, but I don't see what your point is. Every time you use a new feature, there are also new ways to use it incorrectly. By your logic, we should use no new features of the C language that were invented in the past 20 years. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 2/3] MIPS: bootm_qemu_mips.c: separate linux jump code
Move the actual jump code into a separate function. This is just a cosmetic change. The function will be remved by a subsequent change. Signed-off-by: Gabor Juhos Cc: Daniel Schwierzeck --- This is compile tested only. I don't have suitable kernel images for mips,mipsel,mips64,mipsel64 systems to try it yet. -Gabor --- arch/mips/lib/bootm_qemu_mips.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c index 2350a54..a920305 100644 --- a/arch/mips/lib/bootm_qemu_mips.c +++ b/arch/mips/lib/bootm_qemu_mips.c @@ -59,8 +59,7 @@ static void boot_prep_linux_qemu(bootm_headers_t *images) } } -int do_bootm_linux(int flag, int argc, char * const argv[], - bootm_headers_t *images) +static void boot_jump_linux_qemu(bootm_headers_t *images) { void (*theKernel) (int, char **, char **, int *); @@ -72,12 +71,17 @@ int do_bootm_linux(int flag, int argc, char * const argv[], debug("## Transferring control to Linux (at address %08lx) ...\n", (ulong) theKernel); - boot_prep_linux_qemu(images); - /* we assume that the kernel is in place */ printf("\nStarting kernel ...\n\n"); theKernel(0, NULL, NULL, 0); +} + +int do_bootm_linux(int flag, int argc, char * const argv[], + bootm_headers_t *images) +{ + boot_prep_linux_qemu(images); + boot_jump_linux_qemu(images); /* does not return */ return 1; -- 1.7.10 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 3/3] MIPS: bootm.c: integrate QEMU specific functions
The linux starting code of the qemu specific bootm implementation is very similar to the one which is used for regular boards. The preparation code is different but it makes no sense to keep that in a separate file. The pach moves the qemu specific code into bootm.c, and removes the custom file. This allows to get rid of some duplicated code, and it collects bootm specific code into a single file. Additionaly, this allows to use the prep,go subcommands in qemu as well. Signed-off-by: Gabor Juhos Cc: Daniel Schwierzeck --- This is compile tested only. I don't have suitable kernel images for mips,mipsel,mips64,mipsel64 systems to try it yet. -Gabor --- arch/mips/lib/Makefile |4 -- arch/mips/lib/bootm.c | 54 +++- arch/mips/lib/bootm_qemu_mips.c | 88 --- 3 files changed, 52 insertions(+), 94 deletions(-) delete mode 100644 arch/mips/lib/bootm_qemu_mips.c diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile index 967e98a..a68a564 100644 --- a/arch/mips/lib/Makefile +++ b/arch/mips/lib/Makefile @@ -35,11 +35,7 @@ LGOBJS := $(addprefix $(obj),$(GLSOBJS)) SOBJS-y+= COBJS-y+= board.o -ifeq ($(CONFIG_QEMU_MIPS),y) -COBJS-y+= bootm_qemu_mips.o -else COBJS-y+= bootm.o -endif SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index a36154a..71bd456 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -2,6 +2,9 @@ * (C) Copyright 2003 * Wolfgang Denk, DENX Software Engineering, w...@denx.de. * + * (C) Copyright 2008 + * Jean-Christophe PLAGNIOL-VILLARD + * * See file CREDITS for list of people who contributed to this * project. * @@ -33,6 +36,12 @@ DECLARE_GLOBAL_DATA_PTR; #defineLINUX_MAX_ENVS 256 #defineLINUX_MAX_ARGS 256 +#ifdef CONFIG_QEMU_MIPS +#define board_is_mips_qemu 1 +#else +#define board_is_mips_qemu 0 +#endif + static int linux_argc; static char **linux_argv; @@ -43,7 +52,7 @@ static int linux_env_idx; static void linux_params_init(ulong start, char *commandline); static void linux_env_set(char *env_name, char *env_val); -static void boot_prep_linux(bootm_headers_t *images) +static void boot_prep_linux_legacy(bootm_headers_t *images) { char *commandline = getenv("bootargs"); char env_buf[12]; @@ -83,6 +92,44 @@ static void boot_prep_linux(bootm_headers_t *images) linux_env_set("eth1addr", cp); } +static void boot_prep_linux_qemu(bootm_headers_t *images) +{ + char *bootargs = getenv("bootargs"); + char *start; + uint len; + + gd->bd->bi_boot_params = gd->bd->bi_memstart + (16 << 20) - 256; + debug("%-12s= 0x%08lX\n", "boot_params", (ulong)gd->bd->bi_boot_params); + + /* set Magic */ + *(int32_t *)(gd->bd->bi_boot_params - 4) = 0x12345678; + /* set ram_size */ + *(int32_t *)(gd->bd->bi_boot_params - 8) = gd->ram_size; + + start = (char *)gd->bd->bi_boot_params; + + len = strlen(bootargs); + + strncpy(start, bootargs, len + 1); + + start += len; + + len = images->rd_end - images->rd_start; + if (len > 0) { + start += sprintf(start, " rd_start=0x%08X rd_size=0x%0X", + (uint) UNCACHED_SDRAM(images->rd_start), + (uint) len); + } +} + +static void boot_prep_linux(bootm_headers_t *images) +{ + if (board_is_mips_qemu) + boot_prep_linux_qemu(images); + else + boot_prep_linux_legacy(images); +} + static void boot_jump_linux(bootm_headers_t *images) { void (*theKernel) (int, char **, char **, int *); @@ -98,7 +145,10 @@ static void boot_jump_linux(bootm_headers_t *images) /* we assume that the kernel is in place */ printf("\nStarting kernel ...\n\n"); - theKernel(linux_argc, linux_argv, linux_env, 0); + if (board_is_mips_qemu) + theKernel(0, NULL, NULL, 0); + else + theKernel(linux_argc, linux_argv, linux_env, 0); } int do_bootm_linux(int flag, int argc, char * const argv[], diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c deleted file mode 100644 index a920305..000 --- a/arch/mips/lib/bootm_qemu_mips.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * (C) Copyright 2008 - * Jean-Christophe PLAGNIOL-VILLARD - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - *
[U-Boot] [RFC 1/3] MIPS: bootm_qemu_mips.c: separate linux preparation code
Move the preparation code into a separate function. This is just a cosmetic change. The function will be moved into bootm.c by a subsequent change. Signed-off-by: Gabor Juhos Cc: Daniel Schwierzeck --- This is compile tested only. I don't have suitable kernel images for mips,mipsel,mips64,mipsel64 systems to try it yet. -Gabor --- arch/mips/lib/bootm_qemu_mips.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c index 0815c9c..2350a54 100644 --- a/arch/mips/lib/bootm_qemu_mips.c +++ b/arch/mips/lib/bootm_qemu_mips.c @@ -29,22 +29,12 @@ DECLARE_GLOBAL_DATA_PTR; -int do_bootm_linux(int flag, int argc, char * const argv[], - bootm_headers_t *images) +static void boot_prep_linux_qemu(bootm_headers_t *images) { - void (*theKernel) (int, char **, char **, int *); char *bootargs = getenv("bootargs"); char *start; uint len; - /* find kernel entry point */ - theKernel = (void (*)(int, char **, char **, int *))images->ep; - - bootstage_mark(BOOTSTAGE_ID_RUN_OS); - - debug("## Transferring control to Linux (at address %08lx) ...\n", - (ulong) theKernel); - gd->bd->bi_boot_params = gd->bd->bi_memstart + (16 << 20) - 256; debug("%-12s= 0x%08lX\n", "boot_params", (ulong)gd->bd->bi_boot_params); @@ -67,6 +57,22 @@ int do_bootm_linux(int flag, int argc, char * const argv[], (uint) UNCACHED_SDRAM(images->rd_start), (uint) len); } +} + +int do_bootm_linux(int flag, int argc, char * const argv[], + bootm_headers_t *images) +{ + void (*theKernel) (int, char **, char **, int *); + + /* find kernel entry point */ + theKernel = (void (*)(int, char **, char **, int *))images->ep; + + bootstage_mark(BOOTSTAGE_ID_RUN_OS); + + debug("## Transferring control to Linux (at address %08lx) ...\n", + (ulong) theKernel); + + boot_prep_linux_qemu(images); /* we assume that the kernel is in place */ printf("\nStarting kernel ...\n\n"); -- 1.7.10 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request for u-boot-marvell.git
Hi Prafulla, On Tue, 8 Jan 2013 09:21:40 -0800, Prafulla Wadaskar wrote: > Dear Albert > Please pull > > The following changes since commit 7528cf5f016b5b8b8b12b373f6f31a10bf89233d: > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' (2013-01-08 > 14:59:37 +0100) > > are available in the git repository at: > > u-boot-marvell.git master branch. > > Albert ARIBAUD (3): > mv88e61xx: refactor PHY and SWITCH level-code > kirkwood: make MPP arrays static const > ARM: lacie_kw: add support for WIRELESS_SPACE > > Andreas Bießmann (1): > mv-common.h: increase malloc arena to 4MiB > > Holger Brunck (3): > arm/km: fix memory settings > km/common: drop unneeded std* environment variables > km/common: cosmetic change reported from checkpatch > > Luke Lowrey (1): > arch-kirkwood: Ethernet port macro returning incorrect address > > Michael Walle (1): > lsxl: unset ncip for rescue mode > > Valentin Longchamp (1): > arm/km: remove duplicate code > > arch/arm/cpu/arm926ejs/kirkwood/mpp.c |2 +- > arch/arm/include/asm/arch-kirkwood/cpu.h|2 +- > arch/arm/include/asm/arch-kirkwood/mpp.h|2 +- > board/LaCie/net2big_v2/net2big_v2.c |2 +- > board/LaCie/netspace_v2/netspace_v2.c |2 +- > board/LaCie/wireless_space/Makefile | 46 +++ > board/LaCie/wireless_space/kwbimage.cfg | 82 > board/LaCie/wireless_space/wireless_space.c | 176 > board/Marvell/dreamplug/dreamplug.c |2 +- > board/Marvell/guruplug/guruplug.c |2 +- > board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c |2 +- > board/Marvell/openrd/openrd.c |2 +- > board/Marvell/rd6281a/rd6281a.c |2 +- > board/Marvell/sheevaplug/sheevaplug.c |2 +- > board/Seagate/dockstar/dockstar.c |2 +- > board/buffalo/lsxl/lsxl.c |7 +- > board/cloudengines/pogo_e02/pogo_e02.c |2 +- > board/d-link/dns325/dns325.c|2 +- > board/iomega/iconnect/iconnect.c|2 +- > board/karo/tk71/tk71.c |2 +- > board/keymile/common/common.c |2 +- > board/keymile/km_arm/km_arm.c | 16 +- > board/keymile/km_arm/kwbimage-memphis.cfg |6 +- > board/keymile/km_arm/kwbimage.cfg |6 +- > board/keymile/km_arm/kwbimage_128M16_1.cfg | 25 +- > board/keymile/km_arm/kwbimage_256M8_1.cfg | 25 +- > board/raidsonic/ib62x0/ib62x0.c |2 +- > boards.cfg |1 + > drivers/net/phy/mv88e61xx.c | 495 ++ > drivers/net/phy/mv88e61xx.h | 39 ++- > drivers/spi/kirkwood_spi.c | 12 +- > include/configs/km/keymile-common.h |3 - > include/configs/lsxl.h |2 +- > include/configs/mv-common.h |2 +- > include/configs/wireless_space.h| 194 + > include/netdev.h| 21 +- > 36 files changed, 896 insertions(+), 298 deletions(-) > create mode 100644 board/LaCie/wireless_space/Makefile > create mode 100644 board/LaCie/wireless_space/kwbimage.cfg > create mode 100644 board/LaCie/wireless_space/wireless_space.c > create mode 100644 include/configs/wireless_space.h > > Regards... > Prafulla . . . > > > From: Albert ARIBAUD [albert.u.b...@aribaud.net] > Sent: Tuesday, January 08, 2013 8:33 PM > To: Prafulla Wadaskar > Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; 'Wolfgang > Denk'; Andreas Bießmann > Subject: Re: Pull request for u-boot-marvell.git > > Hi Prafulla, > > On Mon, 7 Jan 2013 04:26:09 -0800, Prafulla Wadaskar > wrote: > > > > > > > -Original Message- > > > From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] > > > Sent: 23 December 2012 20:40 > > > To: Prafulla Wadaskar > > > Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; > > > 'Wolfgang Denk'; Andreas Bießmann > > > Subject: Re: Pull request for u-boot-marvell.git > > > > > > Hi Prafulla, > > > > > > On Thu, 20 Dec 2012 02:05:36 -0800, Prafulla Wadaskar > > > wrote: > > > > Dear Albert > > > > Please discard my earlier pull request and please pull > > > > The following changes since commit > > > b8a7c467960ffb4d5a5e1eef5f7783fb6f594542: > > > > Albert ARIBAUD (1): > > > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' > > > > > > > > are available in the git repository at: > > > > > > > > u-boot-marvell.git master branch. > > > > > > > > Albert ARIBAUD (3): > > > > mv88e61xx: refactor PHY and SWITCH level-code > > > > kirkwood: make MPP arrays static const > > > > ARM: lacie_kw:
[U-Boot] setting the environment address
How does uboot decide where in NAND the configuration will be found? I'm getting the classic errors: *** Warning - bad CRC or NAND, using default environment I am writing my environment to nand, with crc, but how do I know that uboot is looking for it in the right place? Is that a compile time only setting? Ultimately I'd like to have 2 copies of the environment. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] powerpc/mpc8xxx: Enable entering DDR debugging by key press
On 01/07/2013 10:35 PM, Wolfgang Denk wrote: > Dear York Sun, > > In message <1357323245-12455-1-git-send-email-york...@freescale.com> you > wrote: >> ... >> CONFIG_FSL_DDR_INTERACTIVE needs to be defined in header file. To enter the >> debug mode by key press, press key 'd' shortly after reset, like one would >> do to abort auto booting. It is fixed to lower case 'd' at this moment. > ... >> --- a/doc/README.fsl-ddr >> +++ b/doc/README.fsl-ddr >> @@ -268,6 +268,13 @@ be activated by saving an environment variable >> "ddr_interactive". The value >> doesn't matter. Once activated, U-boot prompts "FSL DDR>" before enabling >> DDR >> controller. The available commands can be seen by typing "help". >> >> +Another way to enter debug mode without using environment variable is to >> send >> +a key press during boot, like one would do to abort auto boot. To save >> booting >> +time, no additioal delay is added so the window to send the key press is >> very >> +short. For example, user can send the key press using reset command >> followed by >> +hitting enter key twice. In case of power on reset, user can keep hitting >> any >> +key while applying the power. > > The documentation here does not mention the 'd' key at all. Guess it > should? > > It should. And James found my error and fixed in the patch 5/7 in this series. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] arm: move C runtime setup code in crt0.S
On Tue, Nov 27, 2012 at 01:43:25PM +0100, Albert ARIBAUD wrote: > Move all the C runtime setup code from every start.S > in arch/arm into arch/arm/lib/crt0.S. This covers > the code sequence from setting up the initial stack > to calling into board_init_r(). > > Also, rewrite the C runtime setup and make functions > board_init_*() and relocate_code() behave according to > normal C semantics (no jumping across the C stack any > more, etc). > > Some SPL targets had to be touched because they use > start.S explicitly or for some reason; the relevant > maintainers and custodians are cc:ed. > > Signed-off-by: Albert ARIBAUD > --- > Changes in v4: > - fixed bhs into blo in BSS init loop > - switched from explicit literals to '=target' notation > - fixed location of GD in initial environment > - stopped SPL boot sequence at calling board_init_f > > Changes in v3: > - various clarifications and typo fixes > - fixed wrong LED calls conditional > - fixed open comment eating some code > - fixed code overrun in SPL case > > Changes in v2: > - moved description from cover letter to patch commit msg > - added note about tests in the cover letter > - fixed baords with CONFIG_SPL but not CONFIG_SPL_STACK This change breaks sandbox, powerpc, mips and m68k. I suspect fixing sandbox will be the easiest test-case and catch all of the others. -- 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 v4 1/2] arm: move C runtime setup code in crt0.S
Hi Tom, On Tue, 8 Jan 2013 12:26:07 -0700, Tom Rini wrote: > On Tue, Nov 27, 2012 at 01:43:25PM +0100, Albert ARIBAUD wrote: > > > Move all the C runtime setup code from every start.S > > in arch/arm into arch/arm/lib/crt0.S. This covers > > the code sequence from setting up the initial stack > > to calling into board_init_r(). > > > > Also, rewrite the C runtime setup and make functions > > board_init_*() and relocate_code() behave according to > > normal C semantics (no jumping across the C stack any > > more, etc). > > > > Some SPL targets had to be touched because they use > > start.S explicitly or for some reason; the relevant > > maintainers and custodians are cc:ed. > > > > Signed-off-by: Albert ARIBAUD > > --- > > Changes in v4: > > - fixed bhs into blo in BSS init loop > > - switched from explicit literals to '=target' notation > > - fixed location of GD in initial environment > > - stopped SPL boot sequence at calling board_init_f > > > > Changes in v3: > > - various clarifications and typo fixes > > - fixed wrong LED calls conditional > > - fixed open comment eating some code > > - fixed code overrun in SPL case > > > > Changes in v2: > > - moved description from cover letter to patch commit msg > > - added note about tests in the cover letter > > - fixed baords with CONFIG_SPL but not CONFIG_SPL_STACK > > This change breaks sandbox, powerpc, mips and m68k. I suspect fixing > sandbox will be the easiest test-case and catch all of the others. > > -- > Tom Ok, then, rolling back ARM and pushing v5 to fix breakage on non-ARM arches. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request for u-boot-marvell.git
On Tue, 8 Jan 2013 20:14:44 +0100, Albert ARIBAUD wrote: > Hi Prafulla, > > On Tue, 8 Jan 2013 09:21:40 -0800, Prafulla Wadaskar > wrote: > > > Dear Albert > > Please pull > > > > The following changes since commit 7528cf5f016b5b8b8b12b373f6f31a10bf89233d: > > > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' (2013-01-08 > > 14:59:37 +0100) > > > > are available in the git repository at: > > > > u-boot-marvell.git master branch. > > > > Albert ARIBAUD (3): > > mv88e61xx: refactor PHY and SWITCH level-code > > kirkwood: make MPP arrays static const > > ARM: lacie_kw: add support for WIRELESS_SPACE > > > > Andreas Bießmann (1): > > mv-common.h: increase malloc arena to 4MiB > > > > Holger Brunck (3): > > arm/km: fix memory settings > > km/common: drop unneeded std* environment variables > > km/common: cosmetic change reported from checkpatch > > > > Luke Lowrey (1): > > arch-kirkwood: Ethernet port macro returning incorrect address > > > > Michael Walle (1): > > lsxl: unset ncip for rescue mode > > > > Valentin Longchamp (1): > > arm/km: remove duplicate code > > > > arch/arm/cpu/arm926ejs/kirkwood/mpp.c |2 +- > > arch/arm/include/asm/arch-kirkwood/cpu.h|2 +- > > arch/arm/include/asm/arch-kirkwood/mpp.h|2 +- > > board/LaCie/net2big_v2/net2big_v2.c |2 +- > > board/LaCie/netspace_v2/netspace_v2.c |2 +- > > board/LaCie/wireless_space/Makefile | 46 +++ > > board/LaCie/wireless_space/kwbimage.cfg | 82 > > board/LaCie/wireless_space/wireless_space.c | 176 > > board/Marvell/dreamplug/dreamplug.c |2 +- > > board/Marvell/guruplug/guruplug.c |2 +- > > board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c |2 +- > > board/Marvell/openrd/openrd.c |2 +- > > board/Marvell/rd6281a/rd6281a.c |2 +- > > board/Marvell/sheevaplug/sheevaplug.c |2 +- > > board/Seagate/dockstar/dockstar.c |2 +- > > board/buffalo/lsxl/lsxl.c |7 +- > > board/cloudengines/pogo_e02/pogo_e02.c |2 +- > > board/d-link/dns325/dns325.c|2 +- > > board/iomega/iconnect/iconnect.c|2 +- > > board/karo/tk71/tk71.c |2 +- > > board/keymile/common/common.c |2 +- > > board/keymile/km_arm/km_arm.c | 16 +- > > board/keymile/km_arm/kwbimage-memphis.cfg |6 +- > > board/keymile/km_arm/kwbimage.cfg |6 +- > > board/keymile/km_arm/kwbimage_128M16_1.cfg | 25 +- > > board/keymile/km_arm/kwbimage_256M8_1.cfg | 25 +- > > board/raidsonic/ib62x0/ib62x0.c |2 +- > > boards.cfg |1 + > > drivers/net/phy/mv88e61xx.c | 495 > > ++ > > drivers/net/phy/mv88e61xx.h | 39 ++- > > drivers/spi/kirkwood_spi.c | 12 +- > > include/configs/km/keymile-common.h |3 - > > include/configs/lsxl.h |2 +- > > include/configs/mv-common.h |2 +- > > include/configs/wireless_space.h| 194 + > > include/netdev.h| 21 +- > > 36 files changed, 896 insertions(+), 298 deletions(-) > > create mode 100644 board/LaCie/wireless_space/Makefile > > create mode 100644 board/LaCie/wireless_space/kwbimage.cfg > > create mode 100644 board/LaCie/wireless_space/wireless_space.c > > create mode 100644 include/configs/wireless_space.h > > > > Regards... > > Prafulla . . . > > > > > > From: Albert ARIBAUD [albert.u.b...@aribaud.net] > > Sent: Tuesday, January 08, 2013 8:33 PM > > To: Prafulla Wadaskar > > Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; 'Wolfgang > > Denk'; Andreas Bießmann > > Subject: Re: Pull request for u-boot-marvell.git > > > > Hi Prafulla, > > > > On Mon, 7 Jan 2013 04:26:09 -0800, Prafulla Wadaskar > > wrote: > > > > > > > > > > -Original Message- > > > > From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] > > > > Sent: 23 December 2012 20:40 > > > > To: Prafulla Wadaskar > > > > Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik; > > > > 'Wolfgang Denk'; Andreas Bießmann > > > > Subject: Re: Pull request for u-boot-marvell.git > > > > > > > > Hi Prafulla, > > > > > > > > On Thu, 20 Dec 2012 02:05:36 -0800, Prafulla Wadaskar > > > > wrote: > > > > > Dear Albert > > > > > Please discard my earlier pull request and please pull > > > > > The following changes since commit > > > > b8a7c467960ffb4d5a5e1eef5f7783fb6f594542: > > > > > Albert ARIBAUD (1): > > > > > Merge branch 'u-boot-imx/master' into 'u-boot-arm
Re: [U-Boot] [PATCH] Introduce a global bool type
On 01/08/2013 11:07 AM, Wolfgang Denk wrote: > Dear Timur Tabi, > > In message <50ec5d29.1070...@freescale.com> you wrote: >> >>> _Bool has been introduced very late to any C standard, and you can >>> still see this from the ugly, unnatural name. >> >> It was introduced in C99, which is over 12 years old. > > And how old is C? I think the "official" announcment was 1972, so > that's more than twice as long without that addition. > >>> work wit than a CLI. And I've seen more than one case where bugs were >>> caused by using "proper bool types" like this: >>> >>> i = 0; >>> j = 0; >>> k = 2; >>> >>> if ((i | j | k) == true) ... >> >> Ok, but this is just wrong. i, j, and k are not boolean types, so they >> should not be compared with 'true' or 'false'. I don't think you'll find >> any disagreement with that. > > You are right. And I wrote that it's a bug. But this is what you can > easily get from using boolean types. This is example has not been > invented by me. I don't even claim that this was good programming > style - all I want to say is that from what I have seen the boolean > types are not a panacea; they cause new problems as well. > No disagree. How shall we close this? Will some change like below acceptable? diff --git a/include/linux/types.h b/include/linux/types.h index 925ece7..f07ba41 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -7,6 +7,7 @@ #include #include +#include #ifndef __KERNEL_STRICT_NAMES @@ -113,10 +114,6 @@ typedef__u64 u_int64_t; typedef__s64 int64_t; #endif -typedef _Bool bool; -#define false 0 -#define true 1 - #endif /* __KERNEL_STRICT_NAMES */ /* York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] MPC8555 pci issue
On 01/03/2013 07:03:49 AM, Ashok Kumar Kacham wrote: Dear Wolfgang Denk > Dear "Ashok Kumar Kacham", > > In message <0969b5bdd1b15922721db142831c3b02.squir...@mail.bel.co.in> you > wrote: >> >> Hi all, >> >> we have a pci-to-usb controller(32bit,33MHZ,PCI1 controller, IDSEL 18) >> on >> pci bus, we disabled PCI and tried to read the configuration data(vendor >> and >> device id) of the usb controller by giving following commands. >> (0xe000 is the CCSR base address) What happens if you don't disable PCI? same thing is working in one of our MPC8540 based board, where we are able to read the vendor id and device id of the pci device properly. With PCI disabled? Are you sure you have the right IDSEL? Do you have PCI errors disabled so that you'll get 0x rather than a machine check if nothing responds? Oh, and there's this comment in arch/powerpc/cpu/mpc85xx/pci.c: #if defined(CONFIG_MPC8555CDS) || defined(CONFIG_MPC8541CDS) /* * This is a SW workaround for an apparent HW problem * in the PCI controller on the MPC8/41 CDS boards. * The first config cycle must be to a valid, known * device on the PCI bus in order to trick the PCI * controller state machine into a known valid state. * Without this, the first config cycle has the chance * of hanging the controller permanently, just leaving * it in a semi-working state, or leaving it working. * * Pick on the Tundra, Device 17, to get it right. */ { u8 header_type; pci_hose_read_config_byte(hose, PCI_BDF(0,BRIDGE_ID,0), PCI_HEADER_TYPE, &header_type); } #endif -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 0/2] Factorize ARM startup code as much as possible.
The goal of this series is to scrub the start.S files which have proliferated across arch/arm and eliminate code redundancy. This series only factorizes the C runtime framework, that is, the assembly code responsible for setting up the C environments needed by board_init_*() and relocate_code(). Further factorization is possible: relocate_code() can be moved out and possibly rewritten in C now that it has plain C function semantics; exception handlers should also be pretty much cpu-independent. Also, SPL currently makes board_init_f() perform all of the setting up, including BSS clearing and chain- loading. This could be streamlined by only putting basic inits in board_init_f(), letting crt0 do the BSS initialization and chain-loading U-Boot from inside board_init_r(). Eventually, start.S files should disappear or contain CPU-specific code only. The new C runtime setup sequence has been validated step by step on targets versatileqemu using gcc version 4.2.2 from the ELDK4.2 toolchain, and wireless_space using gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1). The whole changes have been build-tested across all ARM targets using MAKEALL -a arm. Changes in v5: - Fixed build on non-ARM architectures Changes in v4: - fixed bhs into blo in BSS init loop - switched from explicit literals to '=target' notation - fixed location of GD in initial environment - stopped SPL boot sequence at calling board_init_f Changes in v3: - various clarifications and typo fixes - fixed wrong LED calls conditional - fixed open comment eating some code - fixed code overrun in SPL case Changes in v2: - moved description from cover letter to patch commit msg - added note about tests in the cover letter - fixed baords with CONFIG_SPL but not CONFIG_SPL_STACK - removed useless includes in arm926ejs and arm925t Albert ARIBAUD (2): arm: move C runtime setup code in crt0.S arm: remove useless code in start.S files arch/arm/cpu/arm1136/start.S | 71 +++- arch/arm/cpu/arm1176/start.S | 62 ++- arch/arm/cpu/arm720t/start.S | 53 ++--- arch/arm/cpu/arm920t/start.S | 61 ++ arch/arm/cpu/arm925t/start.S | 65 ++- arch/arm/cpu/arm926ejs/start.S| 86 ++ arch/arm/cpu/arm946es/start.S | 56 ++ arch/arm/cpu/arm_intcm/start.S| 63 ++- arch/arm/cpu/armv7/start.S| 58 +++--- arch/arm/cpu/ixp/start.S | 55 ++--- arch/arm/cpu/pxa/start.S | 63 ++- arch/arm/cpu/s3c44b0/start.S | 55 ++--- arch/arm/cpu/sa1100/start.S | 50 ++--- arch/arm/lib/Makefile |2 + arch/arm/lib/board.c | 11 -- arch/arm/lib/crt0.S | 173 + include/common.h |2 +- include/configs/socfpga_cyclone5.h|2 +- lib/asm-offsets.c | 14 +++ nand_spl/board/freescale/mx31pdk/Makefile |6 +- nand_spl/board/karo/tx25/Makefile |6 +- 21 files changed, 326 insertions(+), 688 deletions(-) create mode 100644 arch/arm/lib/crt0.S -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 2/2] arm: remove useless code in start.S files
Remove code such as unneeded includes or labels. These removals have no functional effect. Signed-off-by: Albert ARIBAUD --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: - removed useless includes in arm926ejs and arm925t arch/arm/cpu/arm925t/start.S |4 arch/arm/cpu/arm926ejs/start.S |6 -- 2 files changed, 10 deletions(-) diff --git a/arch/arm/cpu/arm925t/start.S b/arch/arm/cpu/arm925t/start.S index 82f5b8b..e8d6d71 100644 --- a/arch/arm/cpu/arm925t/start.S +++ b/arch/arm/cpu/arm925t/start.S @@ -34,10 +34,6 @@ #include #include -#if defined(CONFIG_OMAP1510) -#include <./configs/omap1510.h> -#endif - /* * * diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 3cdecd9..66a8b65 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -36,12 +36,6 @@ #include #include -#if defined(CONFIG_OMAP1610) -#include <./configs/omap1510.h> -#elif defined(CONFIG_OMAP730) -#include <./configs/omap730.h> -#endif - /* * * -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 1/2] arm: move C runtime setup code in crt0.S
Move all the C runtime setup code from every start.S in arch/arm into arch/arm/lib/crt0.S. This covers the code sequence from setting up the initial stack to calling into board_init_r(). Also, rewrite the C runtime setup and make functions board_init_*() and relocate_code() behave according to normal C semantics (no jumping across the C stack any more, etc). Some SPL targets had to be touched because they use start.S explicitly or for some reason; the relevant maintainers and custodians are cc:ed. Signed-off-by: Albert ARIBAUD --- Changes in v5: - Fixed build on non-ARM architectures Changes in v4: - fixed bhs into blo in BSS init loop - switched from explicit literals to '=target' notation - fixed location of GD in initial environment - stopped SPL boot sequence at calling board_init_f Changes in v3: - various clarifications and typo fixes - fixed wrong LED calls conditional - fixed open comment eating some code - fixed code overrun in SPL case Changes in v2: - moved description from cover letter to patch commit msg - added note about tests in the cover letter - fixed baords with CONFIG_SPL but not CONFIG_SPL_STACK arch/arm/cpu/arm1136/start.S | 71 +++- arch/arm/cpu/arm1176/start.S | 62 ++- arch/arm/cpu/arm720t/start.S | 53 ++--- arch/arm/cpu/arm920t/start.S | 61 ++ arch/arm/cpu/arm925t/start.S | 61 ++ arch/arm/cpu/arm926ejs/start.S| 80 ++--- arch/arm/cpu/arm946es/start.S | 56 ++ arch/arm/cpu/arm_intcm/start.S| 63 ++- arch/arm/cpu/armv7/start.S| 58 +++--- arch/arm/cpu/ixp/start.S | 55 ++--- arch/arm/cpu/pxa/start.S | 63 ++- arch/arm/cpu/s3c44b0/start.S | 55 ++--- arch/arm/cpu/sa1100/start.S | 50 ++--- arch/arm/lib/Makefile |2 + arch/arm/lib/board.c | 11 -- arch/arm/lib/crt0.S | 173 + include/common.h |2 +- include/configs/socfpga_cyclone5.h|2 +- lib/asm-offsets.c | 14 +++ nand_spl/board/freescale/mx31pdk/Makefile |6 +- nand_spl/board/karo/tx25/Makefile |6 +- 21 files changed, 326 insertions(+), 678 deletions(-) create mode 100644 arch/arm/lib/crt0.S diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S index 5d3b4c2..a067b8a 100644 --- a/arch/arm/cpu/arm1136/start.S +++ b/arch/arm/cpu/arm1136/start.S @@ -165,13 +165,7 @@ next: bl cpu_init_crit #endif -/* Set stackpointer in internal RAM to call board_init_f */ -call_board_init_f: - ldr sp, =(CONFIG_SYS_INIT_SP_ADDR) - bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ - ldr r0,=0x - - bl board_init_f + bl _main /*--*/ @@ -188,14 +182,10 @@ relocate_code: mov r5, r1 /* save addr of gd */ mov r6, r2 /* save addr of destination */ - /* Set up the stack */ -stack_setup: - mov sp, r4 - adr r0, _start cmp r0, r6 moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */ - beq clear_bss /* skip relocation */ + beq relocate_done /* skip relocation */ mov r1, r6 /* r1 <- scratch for copy_loop */ ldr r3, _image_copy_end_ofs add r2, r0, r3 /* r2 <- source end address */ @@ -245,7 +235,15 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop - b clear_bss + bx lr + +#endif + +relocate_done: + + bx lr + +#ifndef CONFIG_SPL_BUILD _rel_dyn_start_ofs: .word __rel_dyn_start - _start @@ -253,54 +251,13 @@ _rel_dyn_end_ofs: .word __rel_dyn_end - _start _dynsym_start_ofs: .word __dynsym_start - _start -#endif -clear_bss: -#ifdef CONFIG_SPL_BUILD - /* No relocation for SPL */ - ldr r0, =__bss_start - ldr r1, =__bss_end__ -#else - ldr r0, _bss_start_ofs - ldr r1, _bss_end_ofs - mov r4, r6 /* reloc addr */ - add r0, r0, r4 - add r1, r1, r4 #endif - mov r2, #0x /* clear*/ - -clbss_l:cmpr0, r1 /* clear loop... */ - bhs clbss_e /* if reached end of bss, exit */ - str r2, [r0] - add r0, r0, #4 - b clbss_l -clbss_e: -/* - * We are done. Do not return, instead branch to second part of board - * initia
Re: [U-Boot] setting the environment address
Hi John, On Tue, 08 Jan 2013 11:18:17 -0800, John Stile wrote: > How does uboot decide where in NAND the configuration will be found? > I'm getting the classic errors: > *** Warning - bad CRC or NAND, using default environment > > I am writing my environment to nand, with crc, but how do I know that > uboot is looking for it in the right place? > > Is that a compile time only setting? > Ultimately I'd like to have 2 copies of the environment. This is defined in the board's config header file. See README and CONFIG_ENV_OFFSET. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-arm/master
Hi Albert, On Tue, Jan 8, 2013 at 7:07 AM, Albert ARIBAUD wrote: > Hello Tom, > > The following changes since commit > 96764df1b47ddebfb50fadf5af72530b07b5fc89: > > Merge samsung, imx, tegra into u-boot-arm/master (2012-12-22 11:59:14 > +0100) > > are available in the git repository at: > > > git://git.denx.de/u-boot-arm.git master > > for you to fetch changes up to 7528cf5f016b5b8b8b12b373f6f31a10bf89233d: > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' (2013-01-08 > 14:59:37 +0100) > > > > Albert ARIBAUD (2): > Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' > > Andreas Bießmann (1): > omap3/mem.c: remove unused defines > > Ashok (1): > mx35pdk:Use IMX_GPIO_NR macro > > Davide Bonfanti (1): > davinci: fixed cpu reset > > Fabio Estevam (6): > mx35pdk: Allow booting of a device tree kernel > mx53loco: Call PMIC related functions from board_late_init() > mx51evk: Remove unneeded comment > mx53loco: Remove unneeded 'retval' variable > mx53loco: Improve error handling on power_init() > tools: imximage: Load a size that is multiple of 512 > > Ilya Yanok (6): > OMAP: include sys_proto.h from boot-common > am335x_evm: add nand pinmux definition > am33xx: NAND support > am335x_evm: enable NAND support > am33xx_spl_bch: simple SPL nand loader for AM33XX > am335x_evm: enable SPL NAND support > > Lokesh Vutla (1): > omap: emif: configure emif only when required > > Mansoor Ahamed (2): > am33xx: add ELM support > omap_gpmc: BCH8 support (ELM based) > > Marek Vasut (1): > mxs: Add NAND fdt and ramdisk partition to m28evk > > Nikita Kiryanov (2): > gpio: add gpio_is_valid() to omap_gpio API > cm-t35: enable zero bootdelay check > > Otavio Salvador (4): > mx53loco: We shouldn't hardcode a rootfs filesystem type > mx53loco: Change default loadaddr to 0x7200 > mx6qsabrelite: Change default loadaddr to 0x1200 > mx6qsabre_common: Change default loadaddr to 0x1200 > > Peter Barada (1): > Pass sdrc timing values through board_sdrc_timings structure > > Robert P. J. Day (4): > omap3_beagle.h: Fix comment for true/false return value. > omap3: Add a few comments to "#endif"s for readability. > omap4: Add comments on some "#endif"s for readability. > OMAP: Tweak omap-common/Makefile since reset.S -> reset.c > > Shawn Guo (3): > fsl_esdhc: add MMC_MODE_HC host_caps > mx6qsabresd: add usdhc2 and usdhc4 support > mx6qsabresd: use on-board eMMC to store environment > > Stefano Babic (2): > OMAP3: fix panel timing on the mt_ventoux board > OMAP3: TAM3517: add macros for reading eeprom > > Thomas Weber (1): > OMAP3: Remove unused PHYS_SDRAM_1_SIZE > > Vincent Stehlé (2): > omap24xx_i2c: Handle wait_for_bb error > power: twl6035: complain on LDO9 error > > Yegor Yefremov (2): > am335x: disable internal delay for RGMII mode > am335x: cpsw: make phy address configurable > > ajoy (1): > OMAP3 SPI : Fixed bugs related to SPI transfer > > arch/arm/cpu/arm926ejs/davinci/reset.c |2 +- > arch/arm/cpu/armv7/am33xx/Makefile |2 + > arch/arm/cpu/armv7/am33xx/board.c|1 + > arch/arm/cpu/armv7/am33xx/clock.c| 10 + > arch/arm/cpu/armv7/am33xx/elm.c | 212 ++ > arch/arm/cpu/armv7/am33xx/mem.c | 101 +++ > arch/arm/cpu/armv7/omap-common/Makefile |5 +- > arch/arm/cpu/armv7/omap-common/boot-common.c |1 + > arch/arm/cpu/armv7/omap-common/emif-common.c | 41 ++- > arch/arm/cpu/armv7/omap3/board.c |4 +- > arch/arm/cpu/armv7/omap3/mem.c | 18 +- > arch/arm/cpu/armv7/omap3/sdrc.c | 36 +-- > arch/arm/cpu/armv7/omap4/clocks.c|2 +- > arch/arm/cpu/armv7/omap4/hwinit.c|4 +- > arch/arm/include/asm/arch-am33xx/cpu.h | 53 > arch/arm/include/asm/arch-am33xx/elm.h | 93 ++ > arch/arm/include/asm/arch-am33xx/hardware.h |3 + > arch/arm/include/asm/arch-am33xx/mem.h | 83 ++ > arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 120 > arch/arm/include/asm/arch-am33xx/sys_proto.h |3 + > arch/arm/include/asm/arch-omap3/sys_proto.h | 13 +- > arch/arm/include/asm/omap_gpio.h |7 + > board/corscience/tricorder/tricorder.c | 13 +- > board/freescale/mx35pdk/mx35pdk.c|2 +- > board/freescale/mx53loco/mx53loco.c | 84 -- > board/freescale/mx6qsabresd/mx6qsabresd.c| 80 - > board/isee/igep0020/igep0020.c | 29 +- > board/isee/igep0030/igep0030.c | 29 +- > board/overo/overo.c | 37 ++
Re: [U-Boot] Pull request: u-boot-arm/master
Hi Simon, On Tue, 8 Jan 2013 12:50:57 -0800, Simon Glass wrote: > Hi Albert, > > On Tue, Jan 8, 2013 at 7:07 AM, Albert ARIBAUD > wrote: > > Hello Tom, > > > > The following changes since commit > > 96764df1b47ddebfb50fadf5af72530b07b5fc89: > > > > Merge samsung, imx, tegra into u-boot-arm/master (2012-12-22 11:59:14 > > +0100) > > > > are available in the git repository at: > > > > > > git://git.denx.de/u-boot-arm.git master > > > > for you to fetch changes up to 7528cf5f016b5b8b8b12b373f6f31a10bf89233d: > > > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' (2013-01-08 > > 14:59:37 +0100) > > > > > > > > Albert ARIBAUD (2): > > Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' > > Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' > > > > Andreas Bießmann (1): > > omap3/mem.c: remove unused defines > > > > Ashok (1): > > mx35pdk:Use IMX_GPIO_NR macro > > > > Davide Bonfanti (1): > > davinci: fixed cpu reset > > > > Fabio Estevam (6): > > mx35pdk: Allow booting of a device tree kernel > > mx53loco: Call PMIC related functions from board_late_init() > > mx51evk: Remove unneeded comment > > mx53loco: Remove unneeded 'retval' variable > > mx53loco: Improve error handling on power_init() > > tools: imximage: Load a size that is multiple of 512 > > > > Ilya Yanok (6): > > OMAP: include sys_proto.h from boot-common > > am335x_evm: add nand pinmux definition > > am33xx: NAND support > > am335x_evm: enable NAND support > > am33xx_spl_bch: simple SPL nand loader for AM33XX > > am335x_evm: enable SPL NAND support > > > > Lokesh Vutla (1): > > omap: emif: configure emif only when required > > > > Mansoor Ahamed (2): > > am33xx: add ELM support > > omap_gpmc: BCH8 support (ELM based) > > > > Marek Vasut (1): > > mxs: Add NAND fdt and ramdisk partition to m28evk > > > > Nikita Kiryanov (2): > > gpio: add gpio_is_valid() to omap_gpio API > > cm-t35: enable zero bootdelay check > > > > Otavio Salvador (4): > > mx53loco: We shouldn't hardcode a rootfs filesystem type > > mx53loco: Change default loadaddr to 0x7200 > > mx6qsabrelite: Change default loadaddr to 0x1200 > > mx6qsabre_common: Change default loadaddr to 0x1200 > > > > Peter Barada (1): > > Pass sdrc timing values through board_sdrc_timings structure > > > > Robert P. J. Day (4): > > omap3_beagle.h: Fix comment for true/false return value. > > omap3: Add a few comments to "#endif"s for readability. > > omap4: Add comments on some "#endif"s for readability. > > OMAP: Tweak omap-common/Makefile since reset.S -> reset.c > > > > Shawn Guo (3): > > fsl_esdhc: add MMC_MODE_HC host_caps > > mx6qsabresd: add usdhc2 and usdhc4 support > > mx6qsabresd: use on-board eMMC to store environment > > > > Stefano Babic (2): > > OMAP3: fix panel timing on the mt_ventoux board > > OMAP3: TAM3517: add macros for reading eeprom > > > > Thomas Weber (1): > > OMAP3: Remove unused PHYS_SDRAM_1_SIZE > > > > Vincent Stehlé (2): > > omap24xx_i2c: Handle wait_for_bb error > > power: twl6035: complain on LDO9 error > > > > Yegor Yefremov (2): > > am335x: disable internal delay for RGMII mode > > am335x: cpsw: make phy address configurable > > > > ajoy (1): > > OMAP3 SPI : Fixed bugs related to SPI transfer > > > > arch/arm/cpu/arm926ejs/davinci/reset.c |2 +- > > arch/arm/cpu/armv7/am33xx/Makefile |2 + > > arch/arm/cpu/armv7/am33xx/board.c|1 + > > arch/arm/cpu/armv7/am33xx/clock.c| 10 + > > arch/arm/cpu/armv7/am33xx/elm.c | 212 ++ > > arch/arm/cpu/armv7/am33xx/mem.c | 101 +++ > > arch/arm/cpu/armv7/omap-common/Makefile |5 +- > > arch/arm/cpu/armv7/omap-common/boot-common.c |1 + > > arch/arm/cpu/armv7/omap-common/emif-common.c | 41 ++- > > arch/arm/cpu/armv7/omap3/board.c |4 +- > > arch/arm/cpu/armv7/omap3/mem.c | 18 +- > > arch/arm/cpu/armv7/omap3/sdrc.c | 36 +-- > > arch/arm/cpu/armv7/omap4/clocks.c|2 +- > > arch/arm/cpu/armv7/omap4/hwinit.c|4 +- > > arch/arm/include/asm/arch-am33xx/cpu.h | 53 > > arch/arm/include/asm/arch-am33xx/elm.h | 93 ++ > > arch/arm/include/asm/arch-am33xx/hardware.h |3 + > > arch/arm/include/asm/arch-am33xx/mem.h | 83 ++ > > arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 120 > > arch/arm/include/asm/arch-am33xx/sys_proto.h |3 + > > arch/arm/include/asm/arch-omap3/sys_proto.h | 13 +- > > arch/arm/include/asm/omap_gpio.h |7 + > > board/corscience/tricorder/tricorder.c | 13 +- > > board/freescale/mx35pdk/mx3
Re: [U-Boot] Pull request: u-boot-arm/master
Hi Albert, On Tue, Jan 8, 2013 at 1:01 PM, Albert ARIBAUD wrote: > Hi Simon, > > On Tue, 8 Jan 2013 12:50:57 -0800, Simon Glass wrote: >> Hi Albert, >> >> On Tue, Jan 8, 2013 at 7:07 AM, Albert ARIBAUD >> wrote: >> > Hello Tom, >> > >> > The following changes since commit >> > 96764df1b47ddebfb50fadf5af72530b07b5fc89: >> > >> > Merge samsung, imx, tegra into u-boot-arm/master (2012-12-22 11:59:14 >> > +0100) >> > >> > are available in the git repository at: >> > >> > >> > git://git.denx.de/u-boot-arm.git master >> > [snip] >> I have some ARM patches starting here: >> >> http://patchwork.ozlabs.org/patch/203071/ >> >> Do you expect to pick up some of these at some point? > > They've been submitted in v1 before nov 3rd, and the last version has > received no request for correction for a whole month, so they have to > get in anyway. I'll pull them in and send a PR tomorrow morning GMT+1. OK thank you. > >> Regards, >> Simon > > Amicalement, > -- > Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Secure update of uboot devices?
Hi Andreas, On Sat, Mar 17, 2012 at 2:25 AM, Andreas Bäck wrote: > Hello > > Our linux boxes with Uboot and frescale mpc5200B are set at production with > software and that is no problem. > But then when the need to update software afterwards in the field is today > only so simple that if uboot finds a usb stick with a file uImage then it > will start that and do all the updates. > What I am after a litle more tamperproff way of knowing that the software > that is updated to these hardware software are not totally modified / > hacked. > > If one could have e.g uboot to verify uImage that it signed with right > private key (The software in production would have compiled in the public > part), > I relize it can be hard to prevent all things with our current hardware but > if one could at last rise the level so that at least some jtag debugger is > need to modify the content and not only a only basic tools > found in any windows/linux computer. We are also starting to design next > generation of hardware and here more can be done in the hardware to rise > the bar even more. > > Or have you any other suggestion on how this could be improved? I copied you on a series I sent a few days ago which implements verified boot using RSA, using FIT as suggested by Wolfgang. That might be closer to what you want. Regards, Simon > > Thanks in advance > > ___ > 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