Re: [U-Boot] [PATCH 06/11] MX6: add struct for sharing data between SPL and uboot
On Thu, Apr 17, 2014 at 4:44 AM, Stefano Babic sba...@denx.de wrote: Hi Igor, hi Tim On 17/04/2014 13:22, Igor Grinberg wrote: get_ram_size() works on cm-fx6 all DRAM configurations. As on most boards in mainline ;-) It looks like I mis-interpreted the failure. This issue is that get_ram_size() only works with powers of 2 and maxes out at 2GB due to 32bit addressing. I was simply passing in a bogus value. I'm not sure how you would deal with detecting systems with 4GB but I don't need to support that for my boards currently. SPL is thought to generally load an image (of course, in most cases it is u-boot). In Falcon mode, the kernel is started without running u-boot, making this structure useless. Do we really need such a way (but then, it must be generalized as SPL API), or can we get rid of it ? As we have an EEPROM on the board that tells us the physical ram size, I use that to avoid the lockup. It seems weird. There is several boards in mainline (I am sure about Freescale's PowerPC) discovering the mounted RAM. Of course, this is simpler if many parameters (row/columns/...) are the same, I am not sure about this. Even if the parameters are different, this should not result in lockup... AFAICS, lockup of that type has nothing to do with the DRAM itself, but the controller configuration. Exactly, this is what I meant. Thanks for clarifying it better. Are we sure it is not possible here ? What does it happen with an inconsistent value in EEprom ? Eventually I would like to read and validate the entire EEPROM once in SPL and pass this to u-boot.img to avoid reading and validating it again. I think this is a good example of why sharing data between SPL and u-boot.img could be useful. I am not sure, and I doubt it is a good idea to use persistent data to store that. It is potentially dangerous, and if some reasons the EEprom is changed, the board could not boot at all. This is more a question of design and definition of what purpose the eeprom should serve, so I would let the vendor decide if he wants to depend on eeprom or not. Agree. Parsing and evaluating vendor specific information can be done inside board specific part, as now in read_eeprom inside gw_ventana.c. Anyway, if there is a way to detect at runtime the hardware configuration, it remains a better way as to store the size into the Eeprom. I agree and I definitely see the merits of completely de-coupling the SPL from u-boot.img so I will resort to reading the EEPROM in both places. Regards, Tim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] How to test vlan in u-boot
Hi , I am using an 8 port switch (MV88E6131) in our customized board with P2020 Processor. Following is the set up in our board, Port 6 - CPU port Port0 / Port1 / Port2 connected to phy Port3 - No connection Port 4 / Port 5 connected to DSP's Port 7 routed to back plane , SGMII connection. I tried grouping port0,port1,port2 as one LAN-A and Port 4,5,7 as LANB. Such that both LAN A and B cannot communicate with each other , but both can send frame to CPU PORT. After this i got stuck and dono how to proceed further and test it. Please guide me in this to solve. -- View this message in context: http://u-boot.10912.n7.nabble.com/How-to-test-vlan-in-u-boot-tp178161.html Sent from the U-Boot mailing list archive at Nabble.com. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 2/2] eMMC: cmd_mmc.c adds the 'rpmb' sub-command for the 'mmc' command
Hello Wolfgang, Le 17/04/2014 21:56, Wolfgang Denk a écrit : Dear Pierre Aubert, In message 1397747435-24042-3-git-send-email-p.aub...@staubli.com you wrote: This sub-command adds support for the RPMB partition of an eMMC: * mmc rpmb key address of the authentication key Programs the authentication key in the eMMC This key can not be overwritten. * mmc rpmb read address block #count [address of key] Reads #count blocks of 256 bytes in the RPMB partition beginning at block number block. If the optionnal address of the authentication key is provided, the Message Authentication Code (MAC) is verified on each block. * mmc rpmb write address block #count address of key Writes #count blocks of 256 bytes in the RPMB partition beginning at block number block. The datas are signed with the key provided. * mmc rpmb counter Returns the 'Write counter' of the RPMB partition. The sub-command is conditional on compilation flag CONFIG_SUPPORT_EMMC_RPMB Such new options must be documented in the README. I will add it in a V3 Signed-off-by: Pierre Aubert p.aub...@staubli.com CC: Pantelis Antoniou pa...@antoniou-consulting.com --- common/cmd_mmc.c | 128 +- 1 files changed, 127 insertions(+), 1 deletions(-) diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index c1916c9..3cf11e7 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -130,7 +130,123 @@ U_BOOT_CMD( display MMC info, - display info of the current MMC device ); +#ifdef CONFIG_SUPPORT_EMMC_RPMB +static int confirm_key_prog(void) +{ + puts(Warning: Programming authentication key can be done only once !\n + Use this command only if you are sure of what you are doing,\n +Really perform the key programming ? ); + if (getc() == 'y') { Would it not makes sense to flush the input before reading the char, so that you don;t react on any type-ahead that might already be buffered? + int c; + + putc('y'); + c = getc(); + putc('\n'); + if (c == '\r') + return 1; + } Should we allow for 'Y? And for yes / Yes? We have getenv_yesno() - maybe we should provide a similar function that can be used in other places where such interactive confirmation is needed? I have found such a confirmation in cmd_fuse, cmd_otp and cmd_mmc. It makes sense to provide a global function. I will try to submit a patch for that. + if (state != RPMB_INVALID) { Change this into if (state == RPMB_INVALID) return CMD_RET_USAGE; and avoid one level of indentation; this will make the code much easier to read. + if (IS_SD(mmc)) { Is IS_SD() a reliable test for eMMC devics, or would that also return true in other cases? You're right, the test must be more restrictive. The RPMB partition is available only since the release 4.41 of the Jedec standard. I will fix it in a V3. + if (confirm_key_prog()) { + if (mmc_rpmb_set_key(mmc, key_addr)) { + printf(ERROR - Key already programmed ?\n); + ret = CMD_RET_FAILURE; + } + } else { + ret = CMD_RET_FAILURE; + } You should really avoid deep nesting and take early exits. You can write this as: if (!confirm_key_prog()) return CMD_RET_FAILURE; if (mmc_rpmb_set_key(mmc, key_addr)) { printf(ERROR - Key already programmed ?\n); ret = CMD_RET_FAILURE; } Please fix globally. No problem, it will be fixed globally in V3 + } else if (state == RPMB_COUNTER) { + unsigned long counter; + if (mmc_rpmb_get_counter(mmc, counter)) Please insert a blank line between declarations and code. Ok + printf(%d RPMB blocks %s: %s\n, + n, argv[2], (n == cnt) ? OK : ERROR); As the input is in hex, it is usually also a good idea to (also) print the count in hex. For coherency with the mmc read and mmc write, I kept the same output. But it can be changed, of course. #endif /* CONFIG_SUPPORT_EMMC_BOOT */ +#ifdef CONFIG_SUPPORT_EMMC_RPMB + } else if (strcmp(argv[1], rpmb) == 0) { + return do_mmcrpmb(argc, argv); +#endif /* CONFIG_SUPPORT_EMMC_RPMB */ I think that now, with more subcommands being added, we should convert the mmc code to proper subcommand handling. [It might even make sense to do so for mmc rpmb, too.] Do you think about the use of the macro U_BOOT_CMD_MKENT ? Best regards, Wolfgang Denk Best regards Pierre Aubert
[U-Boot] [PATCH] powerpc/t1040qds: Remove Video - HDMI support
From: Wang Dongsheng dongsheng.w...@freescale.com We should remove this support. First, there is not any documents to say we need to support this feature, and kernel also not support this feature. Second, Kerneal not support this on T1040QDS, so if we open it in u-boot, FPGA will be changed and that will affect deep sleep feature. Signed-off-by: Wang Dongsheng dongsheng.w...@freescale.com diff --git a/board/freescale/t1040qds/Makefile b/board/freescale/t1040qds/Makefile index 19ed21b..c7470d7 100644 --- a/board/freescale/t1040qds/Makefile +++ b/board/freescale/t1040qds/Makefile @@ -10,4 +10,3 @@ obj-$(CONFIG_PCI) += pci.o obj-y += law.o obj-y += tlb.o obj-y += eth.o -obj-y += diu.o diff --git a/board/freescale/t1040qds/diu.c b/board/freescale/t1040qds/diu.c deleted file mode 100644 index 0214224..000 --- a/board/freescale/t1040qds/diu.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014 Freescale Semiconductor, Inc. - * Author: Priyanka Jain priyanka.j...@freescale.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include common.h -#include command.h -#include linux/ctype.h -#include asm/io.h -#include stdio_dev.h -#include video_fb.h -#include fsl_diu_fb.h -#include ../common/qixis.h -#include ../common/diu_ch7301.h -#include t1040qds.h -#include t1040qds_qixis.h - -/* - * DIU Area Descriptor - * - * Note that we need to byte-swap the value before it's written to the AD - * register. So even though the registers don't look like they're in the same - * bit positions as they are on the MPC8610, the same value is written to the - * AD register on the MPC8610 and on the P1022. - */ -#define AD_BYTE_F 0x1000 -#define AD_ALPHA_C_SHIFT 25 -#define AD_BLUE_C_SHIFT23 -#define AD_GREEN_C_SHIFT 21 -#define AD_RED_C_SHIFT 19 -#define AD_PIXEL_S_SHIFT 16 -#define AD_COMP_3_SHIFT12 -#define AD_COMP_2_SHIFT8 -#define AD_COMP_1_SHIFT4 -#define AD_COMP_0_SHIFT0 - -void diu_set_pixel_clock(unsigned int pixclock) -{ - unsigned long speed_ccb, temp; - u32 pixval; - int ret = 0; - speed_ccb = get_bus_freq(0); - temp = 10 / pixclock; - temp *= 1000; - pixval = speed_ccb / temp; - - /* Program HDMI encoder */ - /* Switch channel to DIU */ - select_i2c_ch_pca9547(I2C_MUX_CH_DIU); - - /* Set dispaly encoder */ - ret = diu_set_dvi_encoder(temp); - if (ret) { - puts(Failed to set DVI encoder\n); - return; - } - - /* Switch channel to default */ - select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT); - - /* Program pixel clock */ - out_be32((unsigned *)CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR, -((pixval PXCK_BITS_START) PXCK_MASK)); - /* enable clock*/ - out_be32((unsigned *)CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR, PXCKEN_MASK | -((pixval PXCK_BITS_START) PXCK_MASK)); -} - -int platform_diu_init(unsigned int xres, unsigned int yres, const char *port) -{ - u32 pixel_format; - u8 sw; - - /*Route I2C4 to DIU system as HSYNC/VSYNC*/ - sw = QIXIS_READ(brdcfg[5]); - QIXIS_WRITE(brdcfg[5], - ((sw ~(BRDCFG5_IMX_MASK)) | (BRDCFG5_IMX_DIU))); - - /*Configure Display ouput port as HDMI*/ - sw = QIXIS_READ(brdcfg[15]); - QIXIS_WRITE(brdcfg[15], - ((sw ~(BRDCFG15_LCDPD_MASK | BRDCFG15_DIUSEL_MASK)) - | (BRDCFG15_LCDPD_ENABLED | BRDCFG15_DIUSEL_HDMI))); - - pixel_format = cpu_to_le32(AD_BYTE_F | (3 AD_ALPHA_C_SHIFT) | - (0 AD_BLUE_C_SHIFT) | (1 AD_GREEN_C_SHIFT) | - (2 AD_RED_C_SHIFT) | (8 AD_COMP_3_SHIFT) | - (8 AD_COMP_2_SHIFT) | (8 AD_COMP_1_SHIFT) | - (8 AD_COMP_0_SHIFT) | (3 AD_PIXEL_S_SHIFT)); - - printf(DIU: Switching to monitor @ %ux%u\n, xres, yres); - - - return fsl_diu_init(xres, yres, pixel_format, 0); -} diff --git a/board/freescale/t1040qds/t1040qds.h b/board/freescale/t1040qds/t1040qds.h index 5041f37..79bdeda 100644 --- a/board/freescale/t1040qds/t1040qds.h +++ b/board/freescale/t1040qds/t1040qds.h @@ -9,6 +9,5 @@ void fdt_fixup_board_enet(void *blob); void pci_of_setup(void *blob, bd_t *bd); -int select_i2c_ch_pca9547(u8 ch); #endif diff --git a/board/freescale/t1040qds/t1040qds_qixis.h b/board/freescale/t1040qds/t1040qds_qixis.h index 98d2d39..2ce8795 100644 --- a/board/freescale/t1040qds/t1040qds_qixis.h +++ b/board/freescale/t1040qds/t1040qds_qixis.h @@ -13,18 +13,6 @@ #define BRDCFG4_EMISEL_MASK0xE0 #define BRDCFG4_EMISEL_SHIFT 5 -/* BRDCFG5[0:1] controls routing and use of I2C3 I2C4 ports*/ -#define BRDCFG5_IMX_MASK 0xC0 -#define BRDCFG5_IMX_DIU0x80 - -/* BRDCFG15[3] controls LCD Panel Powerdown*/ -#define BRDCFG15_LCDPD_MASK0x10 -#define
[U-Boot] [PATCH v2 2/2] usb:gadget:f_thor: fix write to filesystem by add dfu_flush()
Since dfu read/write operations needs to be flushed manually, writing to filesystem on MMC by thor was broken. MMC raw write actually is working fine because current dfu_flush() function writes filesystem only. This commit adds dfu_flush() to f_thor and now filesystem write is working. This change was tested on Trats2 board. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Marek Vasut ma...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Tom Rini tr...@ti.com --- Changes v2: - separate fix and cleanup into two commits drivers/usb/gadget/f_thor.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 231f9c0..ba47945 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -229,6 +229,12 @@ static int download_tail(long long int left, int cnt) if (ret) error(DFU write failed [%d] cnt: %d, ret, cnt); + ret = dfu_flush(dfu_entity, transfer_buffer, 0, cnt); + if (ret) { + error(DFU flush failed!); + return ret; + } + return ret; } -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 00/13] ARMv7: add PSCI support to u-boot
On Thu, Apr 17 2014 at 08:55:56 PM, Jon Loeliger loeli...@gmail.com wrote: No, so far there hasn't been much discussion, and people seem happy with it. I have a couple of fixes lined up, but nothing major. So, I think PSCI 0.2 calls for function numbers in the 0x8400 range. Seems like we'll have to fix this in one of your patches: /* PSCI interface */ #define ARM_PSCI_FN_BASE0x95c1ba5e to be: #define ARM_PSCI_FN_BASE0x8400 That would be the case if what we have here was a 0.2 implementation. It is not. This is the old 0.1 implementation, which is supported in Linux, KVM and Xen. 0.2 isn't supported anywhere so far (I'm close to merge the KVM patches, but Linux has no binding just yet). In 0.1, the number space is entierely undefined. For this implementation, I used the same numbering as the one documented in the Linux kernel (Documentation/devicetree/bindings/arm/psci.txt) and KVM for obvious reasons (arch/arm/include/uapi/asm/kvm.h). Furthermore, the numbering space is not enough to make this a 0.2 implementation, the extent of the functionallity to implement is much larger. When the Linux kernel actually supports 0.2, I'll be happy to add 0.2 support *aside* 0.1. Just thought I'd toss that out there, you know, if you were collecting fixes for a repost of your patches... :-) Always happy to stash some more on top of what I already have. I already rebased the whole pile of crap on top of U-Boot as of yesterday afternoon, together with Ian's mainline sunxi stuff (see the ijc-merge branch in my korg repo). Still need to apply fixes on top, but it is looking OK so far. I'm be AFK until Tuesday (WTF am I doing now???), but hopefully will get back to it quickly enough. Expect a drop sometime next week. M. -- Jazz is not dead. It just smells funny. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] usb:gadget:f_thor: code cleanup in function download_tail()
In thor's download_tail() function, dfu_get_entity() is called before each dfu_write() call and the returned entity pointers are the same. So dfu_get_entity() can be called just once and this patch changes this. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Marek Vasut ma...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Tom Rini tr...@ti.com --- Changes v2: - separate fix and cleanup into two commits drivers/usb/gadget/f_thor.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index f5c0224..231f9c0 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -204,14 +204,14 @@ static long long int download_head(unsigned long long total, static int download_tail(long long int left, int cnt) { + struct dfu_entity *dfu_entity = dfu_get_entity(alt_setting_num); void *transfer_buffer = dfu_get_buf(); int ret; debug(%s: left: %llu cnt: %d\n, __func__, left, cnt); if (left) { - ret = dfu_write(dfu_get_entity(alt_setting_num), - transfer_buffer, left, cnt++); + ret = dfu_write(dfu_entity, transfer_buffer, left, cnt++); if (ret) { error(DFU write failed [%d]: left: %llu, ret, left); return ret; @@ -225,8 +225,7 @@ static int download_tail(long long int left, int cnt) * This also frees memory malloc'ed by dfu_get_buf(), so no explicit * need fo call dfu_free_buf() is needed. */ - ret = dfu_write(dfu_get_entity(alt_setting_num), - transfer_buffer, 0, cnt); + ret = dfu_write(dfu_entity, transfer_buffer, 0, cnt); if (ret) error(DFU write failed [%d] cnt: %d, ret, cnt); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Fwd: [PATCH v3 00/13] ARMv7: add PSCI support to u-boot
On Thu, Apr 17 2014 at 09:01:07 PM, Jon Loeliger loeli...@gmail.com wrote: [ Drat. I meant to send this to the U-Boot list, not just Albert. --jdl] -- Forwarded message -- From: Jon Loeliger loeli...@gmail.com Date: Thu, Apr 17, 2014 at 11:36 AM Subject: Re: [U-Boot] [PATCH v3 00/13] ARMv7: add PSCI support to u-boot To: Albert ARIBAUD albert.u.b...@aribaud.net On Thu, Apr 17, 2014 at 3:34 AM, Albert ARIBAUD albert.u.b...@aribaud.net wrote: Hi Marc, So yes, I am willing to review them -- and I suspect others are, as well. Nobody commented the V3 series on the U-Boot list -- save for Jon's comment about the series needing a rebase -- which could mean no one here is unhappy with them... So, not *unhappy* with them, but definitely some review is needed. That's an understatement. I wouldn't expect such infrastructure patches to go in without a good discussion about the approach I've taken here. Also, there are aspects of the implementation that will need to be generalized a bit. For example, the sunxi code uses a magic register in its implementation that allows a core to come out of reset at a known (ie, given) non-0 address. My A9 core has CPUs coming out of reset at a fixed address of 0. That means my secure text must be at 0, and it must have a secure vector with a secure reset laid down at 0. Ultimately, this means that a small modification (adding a secure vector text section) to the LDS file will be needed to ensure that it is placed at 0 within the secure text section itself. Yup, there is certainly some flexibility to be added to accomodate for all the various cases, depending on how secondary CPUs are released. Patches are most welcome! ;-) No, I don't have all this working quite yet. :-) Looking forward to seeing the result! M. -- Jazz is not dead. It just smells funny. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/t1040qds: Remove Video - HDMI support
Hello Dongsheng, We do have requirement to support this that's why code development was done. Also , what is the dependency of deep-sleep on this. Please elaborate And if something is broken, we should fix it. Instead of removing the feature. Regards Priyanka -Original Message- From: Dongsheng Wang [mailto:dongsheng.w...@freescale.com] Sent: Friday, April 18, 2014 1:09 PM To: Sun York-R58495 Cc: Jain Priyanka-B32167; Wood Scott-B07421; u-boot@lists.denx.de; Wang Dongsheng-B40534 Subject: [PATCH] powerpc/t1040qds: Remove Video - HDMI support From: Wang Dongsheng dongsheng.w...@freescale.com We should remove this support. First, there is not any documents to say we need to support this feature, and kernel also not support this feature. Second, Kerneal not support this on T1040QDS, so if we open it in u-boot, FPGA will be changed and that will affect deep sleep feature. Signed-off-by: Wang Dongsheng dongsheng.w...@freescale.com diff --git a/board/freescale/t1040qds/Makefile b/board/freescale/t1040qds/Makefile index 19ed21b..c7470d7 100644 --- a/board/freescale/t1040qds/Makefile +++ b/board/freescale/t1040qds/Makefile @@ -10,4 +10,3 @@ obj-$(CONFIG_PCI) += pci.o obj-y+= law.o obj-y+= tlb.o obj-y+= eth.o -obj-y+= diu.o diff --git a/board/freescale/t1040qds/diu.c b/board/freescale/t1040qds/diu.c deleted file mode 100644 index 0214224..000 --- a/board/freescale/t1040qds/diu.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014 Freescale Semiconductor, Inc. - * Author: Priyanka Jain priyanka.j...@freescale.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include common.h -#include command.h -#include linux/ctype.h -#include asm/io.h -#include stdio_dev.h -#include video_fb.h -#include fsl_diu_fb.h -#include ../common/qixis.h -#include ../common/diu_ch7301.h -#include t1040qds.h -#include t1040qds_qixis.h - -/* - * DIU Area Descriptor - * - * Note that we need to byte-swap the value before it's written to the AD - * register. So even though the registers don't look like they're in the same - * bit positions as they are on the MPC8610, the same value is written to the - * AD register on the MPC8610 and on the P1022. - */ -#define AD_BYTE_F0x1000 -#define AD_ALPHA_C_SHIFT 25 -#define AD_BLUE_C_SHIFT 23 -#define AD_GREEN_C_SHIFT 21 -#define AD_RED_C_SHIFT 19 -#define AD_PIXEL_S_SHIFT 16 -#define AD_COMP_3_SHIFT 12 -#define AD_COMP_2_SHIFT 8 -#define AD_COMP_1_SHIFT 4 -#define AD_COMP_0_SHIFT 0 - -void diu_set_pixel_clock(unsigned int pixclock) -{ - unsigned long speed_ccb, temp; - u32 pixval; - int ret = 0; - speed_ccb = get_bus_freq(0); - temp = 10 / pixclock; - temp *= 1000; - pixval = speed_ccb / temp; - - /* Program HDMI encoder */ - /* Switch channel to DIU */ - select_i2c_ch_pca9547(I2C_MUX_CH_DIU); - - /* Set dispaly encoder */ - ret = diu_set_dvi_encoder(temp); - if (ret) { - puts(Failed to set DVI encoder\n); - return; - } - - /* Switch channel to default */ - select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT); - - /* Program pixel clock */ - out_be32((unsigned *)CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR, - ((pixval PXCK_BITS_START) PXCK_MASK)); - /* enable clock*/ - out_be32((unsigned *)CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR, PXCKEN_MASK | - ((pixval PXCK_BITS_START) PXCK_MASK)); -} - -int platform_diu_init(unsigned int xres, unsigned int yres, const char *port) -{ - u32 pixel_format; - u8 sw; - - /*Route I2C4 to DIU system as HSYNC/VSYNC*/ - sw = QIXIS_READ(brdcfg[5]); - QIXIS_WRITE(brdcfg[5], - ((sw ~(BRDCFG5_IMX_MASK)) | (BRDCFG5_IMX_DIU))); - - /*Configure Display ouput port as HDMI*/ - sw = QIXIS_READ(brdcfg[15]); - QIXIS_WRITE(brdcfg[15], - ((sw ~(BRDCFG15_LCDPD_MASK | BRDCFG15_DIUSEL_MASK)) - | (BRDCFG15_LCDPD_ENABLED | BRDCFG15_DIUSEL_HDMI))); - - pixel_format = cpu_to_le32(AD_BYTE_F | (3 AD_ALPHA_C_SHIFT) | - (0 AD_BLUE_C_SHIFT) | (1 AD_GREEN_C_SHIFT) | - (2 AD_RED_C_SHIFT) | (8 AD_COMP_3_SHIFT) | - (8 AD_COMP_2_SHIFT) | (8 AD_COMP_1_SHIFT) | - (8 AD_COMP_0_SHIFT) | (3 AD_PIXEL_S_SHIFT)); - - printf(DIU: Switching to monitor @ %ux%u\n, xres, yres); - - - return fsl_diu_init(xres, yres, pixel_format, 0); -} diff --git a/board/freescale/t1040qds/t1040qds.h b/board/freescale/t1040qds/t1040qds.h index 5041f37..79bdeda 100644 --- a/board/freescale/t1040qds/t1040qds.h +++ b/board/freescale/t1040qds/t1040qds.h @@ -9,6 +9,5 @@ void fdt_fixup_board_enet(void *blob); void pci_of_setup(void *blob, bd_t *bd); -int
[U-Boot] [PATCH v2 8/9] fdt_support: fix an endian bug of fdt_initrd()
Data written to DTB must be converted to big endian order. It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc. fdt_initrd() invoked write_cell(), which always swaps byte order. It means the function only worked on little endian architectures. (On big endian architectures, the byte order should be kept as it is) This commit uses cpu_to_fdt32() and cpu_to_fdt64() and deletes write_cell(). Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None common/fdt_support.c | 41 - 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 58d1ef7..5631f16 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -32,18 +32,6 @@ static int get_cells_len(const void *fdt, const char *nr_cells_name) return 4; } -/* - * Write a 4 or 8 byte big endian cell - */ -static void write_cell(u8 *addr, u64 val, int size) -{ - int shift = (size - 1) * 8; - while (size-- 0) { - *addr++ = (val shift) 0xff; - shift -= 8; - } -} - /** * fdt_getprop_u32_default - Find a node and return it's property or a default * @@ -186,11 +174,21 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff) } #endif +static inline int fdt_setprop_uxx(void *fdt, int nodeoffset, const char *name, + uint64_t val, int is_u64) +{ + if (is_u64) + return fdt_setprop_u64(fdt, nodeoffset, name, val); + else + return fdt_setprop_u32(fdt, nodeoffset, name, (uint32_t)val); +} + + int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) { - int nodeoffset, addr_cell_len; + int nodeoffset; int err, j, total; - fdt64_t tmp; + int is_u64; uint64_t addr, size; /* find or create /chosen node. */ @@ -222,19 +220,20 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) return err; } - addr_cell_len = get_cells_len(fdt, #address-cells); + is_u64 = (get_cells_len(fdt, #address-cells) == 8); + + err = fdt_setprop_uxx(fdt, nodeoffset, linux,initrd-start, + (uint64_t)initrd_start, is_u64); - write_cell((u8 *)tmp, initrd_start, addr_cell_len); - err = fdt_setprop(fdt, nodeoffset, - linux,initrd-start, tmp, addr_cell_len); if (err 0) { printf(WARNING: could not set linux,initrd-start %s.\n, fdt_strerror(err)); return err; } - write_cell((u8 *)tmp, initrd_end, addr_cell_len); - err = fdt_setprop(fdt, nodeoffset, - linux,initrd-end, tmp, addr_cell_len); + + err = fdt_setprop_uxx(fdt, nodeoffset, linux,initrd-end, + (uint64_t)initrd_end, is_u64); + if (err 0) { printf(WARNING: could not set linux,initrd-end %s.\n, fdt_strerror(err)); -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/9] fdt_support: delete force argument of fdt_initrd()
After all, we have realized force argument is completely useless. fdt_initrd() was always called with force = 1. We should always want to do the same thing (set appropriate value to the property) even if the property already exists. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: - Rebase on commit 0f507779ca arch/microblaze/lib/bootm.c | 2 +- common/cmd_fdt.c| 2 +- common/fdt_support.c| 35 +++ common/image-fdt.c | 2 +- include/fdt_support.h | 2 +- 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index d60b307..6977dd6 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -58,7 +58,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], /* fixup the initrd now that we know where it should be */ if (images-rd_start images-rd_end of_flat_tree) ret = fdt_initrd(of_flat_tree, images-rd_start, -images-rd_end, 1); +images-rd_end); if (ret) return 1; diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index a6744ed..cc2b0e2 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -582,7 +582,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } fdt_chosen(working_fdt, 1); - fdt_initrd(working_fdt, initrd_start, initrd_end, 1); + fdt_initrd(working_fdt, initrd_start, initrd_end); #if defined(CONFIG_FIT_SIGNATURE) } else if (strncmp(argv[1], che, 3) == 0) { diff --git a/common/fdt_support.c b/common/fdt_support.c index 849bdc8..3e16e8a 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -177,12 +177,11 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff) } #endif -int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force) +int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) { int nodeoffset, addr_cell_len; int err, j, total; fdt64_t tmp; - const char *path; uint64_t addr, size; /* find or create /chosen node. */ @@ -216,26 +215,22 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force) addr_cell_len = get_cells_len(fdt, #address-cells); - path = fdt_getprop(fdt, nodeoffset, linux,initrd-start, NULL); - if ((path == NULL) || force) { - write_cell((u8 *)tmp, initrd_start, addr_cell_len); - err = fdt_setprop(fdt, nodeoffset, - linux,initrd-start, tmp, addr_cell_len); - if (err 0) { - printf(WARNING: - could not set linux,initrd-start %s.\n, - fdt_strerror(err)); - return err; - } - write_cell((u8 *)tmp, initrd_end, addr_cell_len); - err = fdt_setprop(fdt, nodeoffset, + write_cell((u8 *)tmp, initrd_start, addr_cell_len); + err = fdt_setprop(fdt, nodeoffset, + linux,initrd-start, tmp, addr_cell_len); + if (err 0) { + printf(WARNING: could not set linux,initrd-start %s.\n, + fdt_strerror(err)); + return err; + } + write_cell((u8 *)tmp, initrd_end, addr_cell_len); + err = fdt_setprop(fdt, nodeoffset, linux,initrd-end, tmp, addr_cell_len); - if (err 0) { - printf(WARNING: could not set linux,initrd-end %s.\n, - fdt_strerror(err)); + if (err 0) { + printf(WARNING: could not set linux,initrd-end %s.\n, + fdt_strerror(err)); - return err; - } + return err; } return 0; diff --git a/common/image-fdt.c b/common/image-fdt.c index a54a919..a632c84 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -483,7 +483,7 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, /* Create a new LMB reservation */ lmb_reserve(lmb, (ulong)blob, of_size); - fdt_initrd(blob, *initrd_start, *initrd_end, 1); + fdt_initrd(blob, *initrd_start, *initrd_end); if (!ft_verify_fdt(blob)) return -1; diff --git a/include/fdt_support.h b/include/fdt_support.h index 76c9b2e..c10e930 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -15,7 +15,7 @@ u32 fdt_getprop_u32_default(const void *fdt, const char *path, const char *prop, const u32 dflt); int fdt_chosen(void *fdt, int force); -int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force); +int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end); void
[U-Boot] [PATCH v2 7/9] fdt_support: fix an endian bug of fdt_fixup_memory_banks
Data written to DTB must be converted to big endian order. It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc. fdt_fixup_memory_banks() invoked write_cell(), which always swaps byte order. It means the function only worked on little endian architectures. This commit adds and uses a new helper function, fdt_pack_reg(), which works on both big endian and little endian architrectures. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None common/fdt_support.c | 42 ++ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index bdc5ce1..58d1ef7 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -354,6 +354,34 @@ void do_fixup_by_compat_u32(void *fdt, const char *compat, do_fixup_by_compat(fdt, compat, prop, tmp, 4, create); } +/* + * fdt_pack_reg - pack address and size array into the reg-suitable stream + */ +static int fdt_pack_reg(const void *fdt, void *buf, uint64_t *address, + uint64_t *size, int n) +{ + int i; + int address_len = get_cells_len(fdt, #address-cells); + int size_len = get_cells_len(fdt, #size-cells); + char *p = buf; + + for (i = 0; i n; i++) { + if (address_len == 8) + *(fdt64_t *)p = cpu_to_fdt64(address[i]); + else + *(fdt32_t *)p = cpu_to_fdt32(address[i]); + p += address_len; + + if (size_len == 8) + *(fdt64_t *)p = cpu_to_fdt64(size[i]); + else + *(fdt32_t *)p = cpu_to_fdt32(size[i]); + p += size_len; + } + + return p - (char *)buf; +} + #ifdef CONFIG_NR_DRAM_BANKS #define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS #else @@ -362,9 +390,8 @@ void do_fixup_by_compat_u32(void *fdt, const char *compat, int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) { int err, nodeoffset; - int addr_cell_len, size_cell_len, len; + int len; u8 tmp[MEMORY_BANKS_MAX * 16]; /* Up to 64-bit address + 64-bit size */ - int bank; if (banks MEMORY_BANKS_MAX) { printf(%s: num banks %d exceeds hardcoded limit %d. @@ -392,16 +419,7 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) return err; } - addr_cell_len = get_cells_len(blob, #address-cells); - size_cell_len = get_cells_len(blob, #size-cells); - - for (bank = 0, len = 0; bank banks; bank++) { - write_cell(tmp + len, start[bank], addr_cell_len); - len += addr_cell_len; - - write_cell(tmp + len, size[bank], size_cell_len); - len += size_cell_len; - } + len = fdt_pack_reg(blob, tmp, start, size, banks); err = fdt_setprop(blob, nodeoffset, reg, tmp, len); if (err 0) { -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 9/9] fdt_support: correct the return condition of fdt_initrd()
Before this commit, fdt_initrd() just returned if initrd start address is zero. But it is possible if the RAM is located at address 0. This commit makes the return condition more reasonable: Just return if the size of initrd is zero. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None common/fdt_support.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 5631f16..89119be 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -191,15 +191,15 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) int is_u64; uint64_t addr, size; + /* just return if the size of initrd is zero */ + if (initrd_start == initrd_end) + return 0; + /* find or create /chosen node. */ nodeoffset = fdt_find_or_add_subnode(fdt, 0, chosen); if (nodeoffset 0) return nodeoffset; - /* just return if initrd_start/end aren't valid */ - if ((initrd_start == 0) || (initrd_end == 0)) - return 0; - total = fdt_num_mem_rsv(fdt); /* -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/9] fdt_support: delete unnecessary DECLARE_GLOBAL_DATA_PTR
gd-bd is not used in fdt_support.c. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None common/fdt_support.c | 5 - 1 file changed, 5 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index f9f358e..2464847 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -17,11 +17,6 @@ #include exports.h /* - * Global data (for the gd-bd) - */ -DECLARE_GLOBAL_DATA_PTR; - -/* * Get cells len in bytes * if #-cells property is 2 then len is 8 * otherwise len is 4 -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/9] fdt_support: refactor fdt_fixup_stdout() function
- Do not use a deep indentation. We have only 80-character on each line and 1 indentation consumes 8 spaces. Before the code moves far to the right, you should consider to fix your code. See Linux Documentation/CodingStyle. - Add CONFIG_OF_STDOUT_VIA_ALIAS and OF_STDOUT_PATH macros only to their definition. Do not add them to both callee and caller. This is a tip to avoid using #ifdef everywhere. - OF_STDOUT_PATH and CONFIG_OF_STDOUT_VIA_ALIAS are exclusive. If both are defined, the former takes precedence. Do not try to fix-up linux,stdout-path property twice. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None common/fdt_support.c | 85 ++-- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index c714ffa..f641e68 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -123,9 +123,14 @@ static int fdt_find_or_add_subnode(void *fdt, int parentoffset, return offset; } -#ifdef CONFIG_OF_STDOUT_VIA_ALIAS - -#ifdef CONFIG_CONS_INDEX +/* rename to CONFIG_OF_STDOUT_PATH ? */ +#if defined(OF_STDOUT_PATH) +static int fdt_fixup_stdout(void *fdt, int chosenoff) +{ + return fdt_setprop(fdt, chosenoff, linux,stdout-path, + OF_STDOUT_PATH, strlen(OF_STDOUT_PATH) + 1); +} +#elif defined(CONFIG_OF_STDOUT_VIA_ALIAS) defined(CONFIG_CONS_INDEX) static void fdt_fill_multisername(char *sername, size_t maxlen) { const char *outname = stdio_devices[stdout]-name; @@ -137,44 +142,48 @@ static void fdt_fill_multisername(char *sername, size_t maxlen) if (strcmp(outname + 1, serial) 0) strncpy(sername, outname + 1, maxlen); } -#endif static int fdt_fixup_stdout(void *fdt, int chosenoff) { - int err = 0; -#ifdef CONFIG_CONS_INDEX - int node; + int err; + int aliasoff; char sername[9] = { 0 }; - const char *path; + const void *path; + int len; + char tmp[256]; /* long enough */ fdt_fill_multisername(sername, sizeof(sername) - 1); if (!sername[0]) sprintf(sername, serial%d, CONFIG_CONS_INDEX - 1); - err = node = fdt_path_offset(fdt, /aliases); - if (node = 0) { - int len; - path = fdt_getprop(fdt, node, sername, len); - if (path) { - char *p = malloc(len); - err = -FDT_ERR_NOSPACE; - if (p) { - memcpy(p, path, len); - err = fdt_setprop(fdt, chosenoff, - linux,stdout-path, p, len); - free(p); - } - } else { - err = len; - } + aliasoff = fdt_path_offset(fdt, /aliases); + if (aliasoff 0) { + err = aliasoff; + goto error; } -#endif + + path = fdt_getprop(fdt, aliasoff, sername, len); + if (!path) { + err = len; + goto error; + } + + /* fdt_setprop may break path so we copy it to tmp buffer */ + memcpy(tmp, path, len); + + err = fdt_setprop(fdt, chosenoff, linux,stdout-path, tmp, len); +error: if (err 0) printf(WARNING: could not set linux,stdout-path %s.\n, - fdt_strerror(err)); + fdt_strerror(err)); return err; } +#else +static int fdt_fixup_stdout(void *fdt, int chosenoff) +{ + return 0; +} #endif int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) @@ -254,27 +263,17 @@ int fdt_chosen(void *fdt) return nodeoffset; str = getenv(bootargs); - if (str != NULL) { - err = fdt_setprop(fdt, nodeoffset, - bootargs, str, strlen(str)+1); - if (err 0) + if (str) { + err = fdt_setprop(fdt, nodeoffset, bootargs, str, + strlen(str) + 1); + if (err 0) { printf(WARNING: could not set bootargs %s.\n, fdt_strerror(err)); + return err; + } } -#ifdef CONFIG_OF_STDOUT_VIA_ALIAS - err = fdt_fixup_stdout(fdt, nodeoffset); -#endif - -#ifdef OF_STDOUT_PATH - err = fdt_setprop(fdt, nodeoffset, linux,stdout-path, - OF_STDOUT_PATH, strlen(OF_STDOUT_PATH)+1); - if (err 0) - printf(WARNING: could not set linux,stdout-path %s.\n, - fdt_strerror(err)); -#endif - - return err; + return fdt_fixup_stdout(fdt, nodeoffset); } void do_fixup_by_path(void *fdt, const char *path, const char *prop, -- 1.8.3.2
[U-Boot] [PATCH v2 2/9] fdt_support: refactor with fdt_find_or_add_subnode helper func
Some functions in fdt_support.c do the same routine: search a node with a given name (chosen, memory, etc.) or newly create it if it does not exist. So this commit makes that routine to a helper function. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None common/fdt_support.c | 71 ++-- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 2464847..849bdc8 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -98,6 +98,31 @@ int fdt_find_and_setprop(void *fdt, const char *node, const char *prop, return fdt_setprop(fdt, nodeoff, prop, val, len); } +/** + * fdt_find_or_add_subnode - find or possibly add a subnode of a given node + * @fdt: pointer to the device tree blob + * @parentoffset: structure block offset of a node + * @name: name of the subnode to locate + * + * fdt_subnode_offset() finds a subnode of the node with a given name. + * If the subnode does not exist, it will be created. + */ +static int fdt_find_or_add_subnode(void *fdt, int parentoffset, + const char *name) +{ + int offset; + + offset = fdt_subnode_offset(fdt, parentoffset, name); + + if (offset == -FDT_ERR_NOTFOUND) + offset = fdt_add_subnode(fdt, parentoffset, name); + + if (offset 0) + printf(%s: %s: %s\n, __func__, name, fdt_strerror(offset)); + + return offset; +} + #ifdef CONFIG_OF_STDOUT_VIA_ALIAS #ifdef CONFIG_CONS_INDEX @@ -160,14 +185,10 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force) const char *path; uint64_t addr, size; - /* Find the chosen node. */ - nodeoffset = fdt_path_offset (fdt, /chosen); - - /* If there is no chosen node in the blob return */ - if (nodeoffset 0) { - printf(fdt_initrd: %s\n, fdt_strerror(nodeoffset)); + /* find or create /chosen node. */ + nodeoffset = fdt_find_or_add_subnode(fdt, 0, chosen); + if (nodeoffset 0) return nodeoffset; - } /* just return if initrd_start/end aren't valid */ if ((initrd_start == 0) || (initrd_end == 0)) @@ -233,25 +254,10 @@ int fdt_chosen(void *fdt, int force) return err; } - /* -* Find the chosen node. -*/ - nodeoffset = fdt_path_offset (fdt, /chosen); - - /* -* If there is no chosen node in the blob, create it. -*/ - if (nodeoffset 0) { - /* -* Create a new node /chosen (offset 0 is root level) -*/ - nodeoffset = fdt_add_subnode(fdt, 0, chosen); - if (nodeoffset 0) { - printf(WARNING: could not create /chosen %s.\n, - fdt_strerror(nodeoffset)); - return nodeoffset; - } - } + /* find or create /chosen node. */ + nodeoffset = fdt_find_or_add_subnode(fdt, 0, chosen); + if (nodeoffset 0) + return nodeoffset; /* * Create /chosen properites that don't exist in the fdt. @@ -393,16 +399,11 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) return err; } - /* update, or add and update /memory node */ - nodeoffset = fdt_path_offset(blob, /memory); - if (nodeoffset 0) { - nodeoffset = fdt_add_subnode(blob, 0, memory); - if (nodeoffset 0) { - printf(WARNING: could not create /memory: %s.\n, - fdt_strerror(nodeoffset)); + /* find or create /memory node. */ + nodeoffset = fdt_find_or_add_subnode(blob, 0, memory); + if (nodeoffset 0) return nodeoffset; - } - } + err = fdt_setprop(blob, nodeoffset, device_type, memory, sizeof(memory)); if (err 0) { -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/9] Refactoring and Endian bug fixes of fdt_support
Masahiro Yamada (9): fdt_support: delete unnecessary DECLARE_GLOBAL_DATA_PTR fdt_support: refactor with fdt_find_or_add_subnode helper func fdt_support: delete force argument of fdt_initrd() fdt_support: delete force argument of fdt_chosen() fdt_support: refactor fdt_fixup_stdout() function fdt_support: add 'const' qualifier for unchanged argument fdt_support: fix an endian bug of fdt_fixup_memory_banks fdt_support: fix an endian bug of fdt_initrd() fdt_support: correct the return condition of fdt_initrd() arch/microblaze/lib/bootm.c | 2 +- common/cmd_fdt.c| 4 +- common/fdt_support.c| 295 +--- common/image-fdt.c | 4 +- include/fdt_support.h | 4 +- 5 files changed, 151 insertions(+), 158 deletions(-) -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 6/9] fdt_support: add 'const' qualifier for unchanged argument
In the next commit, I will add a new function, fdt_pack_reg() which uses get_cells_len(). Beforehand, this commit adds 'const' qualifier to get_cells_len(). Otherwise, a warning message will appear: warning: passing argument 1 of 'get_cells_len' discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: - Drop the period at the end of the commit subject common/fdt_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index f641e68..bdc5ce1 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -21,11 +21,11 @@ * if #-cells property is 2 then len is 8 * otherwise len is 4 */ -static int get_cells_len(void *blob, char *nr_cells_name) +static int get_cells_len(const void *fdt, const char *nr_cells_name) { const fdt32_t *cell; - cell = fdt_getprop(blob, 0, nr_cells_name, NULL); + cell = fdt_getprop(fdt, 0, nr_cells_name, NULL); if (cell fdt32_to_cpu(*cell) == 2) return 8; -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/9] fdt_support: delete force argument of fdt_chosen()
After all, we have realized force argument is completely useless. fdt_chosen() was always called with force = 1. We should always want to do the same thing (set appropriate value to the property) even if the property already exists. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None common/cmd_fdt.c | 2 +- common/fdt_support.c | 38 -- common/image-fdt.c| 2 +- include/fdt_support.h | 2 +- 4 files changed, 15 insertions(+), 29 deletions(-) diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index cc2b0e2..6831af4 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -581,7 +581,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) initrd_end = simple_strtoul(argv[3], NULL, 16); } - fdt_chosen(working_fdt, 1); + fdt_chosen(working_fdt); fdt_initrd(working_fdt, initrd_start, initrd_end); #if defined(CONFIG_FIT_SIGNATURE) diff --git a/common/fdt_support.c b/common/fdt_support.c index 3e16e8a..c714ffa 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -236,12 +236,11 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) return 0; } -int fdt_chosen(void *fdt, int force) +int fdt_chosen(void *fdt) { int nodeoffset; int err; char *str; /* used to set string properties */ - const char *path; err = fdt_check_header(fdt); if (err 0) { @@ -254,38 +253,25 @@ int fdt_chosen(void *fdt, int force) if (nodeoffset 0) return nodeoffset; - /* -* Create /chosen properites that don't exist in the fdt. -* If the property exists, update it only if the force parameter -* is true. -*/ str = getenv(bootargs); if (str != NULL) { - path = fdt_getprop(fdt, nodeoffset, bootargs, NULL); - if ((path == NULL) || force) { - err = fdt_setprop(fdt, nodeoffset, - bootargs, str, strlen(str)+1); - if (err 0) - printf(WARNING: could not set bootargs %s.\n, - fdt_strerror(err)); - } + err = fdt_setprop(fdt, nodeoffset, + bootargs, str, strlen(str)+1); + if (err 0) + printf(WARNING: could not set bootargs %s.\n, + fdt_strerror(err)); } #ifdef CONFIG_OF_STDOUT_VIA_ALIAS - path = fdt_getprop(fdt, nodeoffset, linux,stdout-path, NULL); - if ((path == NULL) || force) - err = fdt_fixup_stdout(fdt, nodeoffset); + err = fdt_fixup_stdout(fdt, nodeoffset); #endif #ifdef OF_STDOUT_PATH - path = fdt_getprop(fdt, nodeoffset, linux,stdout-path, NULL); - if ((path == NULL) || force) { - err = fdt_setprop(fdt, nodeoffset, - linux,stdout-path, OF_STDOUT_PATH, strlen(OF_STDOUT_PATH)+1); - if (err 0) - printf(WARNING: could not set linux,stdout-path %s.\n, - fdt_strerror(err)); - } + err = fdt_setprop(fdt, nodeoffset, linux,stdout-path, + OF_STDOUT_PATH, strlen(OF_STDOUT_PATH)+1); + if (err 0) + printf(WARNING: could not set linux,stdout-path %s.\n, + fdt_strerror(err)); #endif return err; diff --git a/common/image-fdt.c b/common/image-fdt.c index a632c84..781ab8e 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -457,7 +457,7 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, ulong *initrd_end = images-initrd_end; int ret; - if (fdt_chosen(blob, 1) 0) { + if (fdt_chosen(blob) 0) { puts(ERROR: /chosen node create failed); puts( - must RESET the board to recover.\n); return -1; diff --git a/include/fdt_support.h b/include/fdt_support.h index c10e930..7237e9a 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -14,7 +14,7 @@ u32 fdt_getprop_u32_default(const void *fdt, const char *path, const char *prop, const u32 dflt); -int fdt_chosen(void *fdt, int force); +int fdt_chosen(void *fdt); int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end); void do_fixup_by_path(void *fdt, const char *path, const char *prop, const void *val, int len, int create); -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cmd_time: do not show ticks
The command time shows the execution time of the command given to the argument, like this: time: 45.293 seconds, 45293 ticks Since we adopted CONFIG_SYS_HZ = 1000 for all boards, we always have a simple formula: 1 tick = 0.0001 second. Showing ticks looks almost redundant. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- common/cmd_time.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/cmd_time.c b/common/cmd_time.c index 5180cb4..de57e3b 100644 --- a/common/cmd_time.c +++ b/common/cmd_time.c @@ -21,8 +21,7 @@ static void report_time(ulong cycles) printf(\ntime:); if (minutes) printf( %lu minutes,, minutes); - printf( %lu.%03lu seconds, %lu ticks\n, - seconds, milliseconds, cycles); + printf( %lu.%03lu seconds\n, seconds, milliseconds); } static int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] config: remove platform CONFIG_SYS_HZ definition part 4
Some new boards define CONFIG_SYS_HZ again! Remove. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- include/configs/T208xRDB.h | 1 - include/configs/sama5d3_xplained.h | 1 - 2 files changed, 2 deletions(-) diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 743eee3..f354367 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -655,7 +655,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */ -#define CONFIG_SYS_HZ 1000/* decrementer freq: 1ms ticks*/ /* * For booting Linux, the board info and command line data diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h index 91cc7d8..41c946d 100644 --- a/include/configs/sama5d3_xplained.h +++ b/include/configs/sama5d3_xplained.h @@ -17,7 +17,6 @@ /* ARM asynchronous clock */ #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 #define CONFIG_SYS_AT91_MAIN_CLOCK 1200 /* from 12 MHz crystal */ -#define CONFIG_SYS_HZ 1000 #define CONFIG_AT91FAMILY #define CONFIG_ARCH_CPU_INIT -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 7/8] cmd_mmc.c: Add bootbus mmc sub-command
Hi Tom On Thu, Jan 30, 2014 at 10:31 PM, Tom Rini tr...@ti.com wrote: Add a bootbus sub-command to the mmc command to allow for setting the boot_bus_width, reset_boot_bus_width and boot_mode fields of BOOT_BUS_WIDTH (EXT_CSD[177]). Signed-off-by: Tom Rini tr...@ti.com --- Can I ask if does it work even for OMAP4 device? So can I flash on boot0 and let omap4 bootrom to load from that? Michael common/cmd_mmc.c | 29 + drivers/mmc/mmc.c | 21 + include/mmc.h |5 + 3 files changed, 55 insertions(+) diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 5842e85..a028149 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -338,6 +338,33 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* acknowledge to be sent during boot operation */ return mmc_set_part_conf(mmc, ack, part_num, access); + } else if (strcmp(argv[1], bootbus) == 0) { + int dev; + struct mmc *mmc; + u8 width, reset, mode; + + if (argc == 6) { + dev = simple_strtoul(argv[2], NULL, 10); + width = simple_strtoul(argv[3], NULL, 10); + reset = simple_strtoul(argv[4], NULL, 10); + mode = simple_strtoul(argv[5], NULL, 10); + } else { + return CMD_RET_USAGE; + } + + mmc = find_mmc_device(dev); + if (!mmc) { + printf(no mmc device at slot %x\n, dev); + return 1; + } + + if (IS_SD(mmc)) { + puts(BOOT_BUS_WIDTH only exists on eMMC\n); + return 1; + } + + /* acknowledge to be sent during boot operation */ + return mmc_set_boot_bus_width(mmc, width, reset, mode); } else if (strcmp(argv[1], bootpart-resize) == 0) { int dev; struct mmc *mmc; @@ -475,6 +502,8 @@ U_BOOT_CMD( - Enable boot_part for booting and enable R/W access of boot_part\n mmc close dev boot_partition\n - Enable boot_part for booting and disable access to boot_part\n + mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode\n +- Set the BOOT_BUS_WIDTH field of the specified device\n mmc bootpart-resize dev boot part size MB RPMB part size MB\n - Change sizes of boot and RPMB partitions of specified device\n mmc partconf dev boot_ack boot_partition partition_access\n diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 1591fce..fc1c1dc 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1507,6 +1507,27 @@ int mmc_boot_part_access(struct mmc *mmc, u8 ack, u8 part_num, u8 access) } /* + * Modify EXT_CSD[177] which is BOOT_BUS_WIDTH + * based on the passed in values for BOOT_BUS_WIDTH, RESET_BOOT_BUS_WIDTH + * and BOOT_MODE. + * + * Returns 0 on success. + */ +int mmc_set_boot_bus_width(struct mmc *mmc, u8 width, u8 reset, u8 mode) +{ + int err; + + err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BOOT_BUS_WIDTH, +EXT_CSD_BOOT_BUS_WIDTH_MODE(mode) | +EXT_CSD_BOOT_BUS_WIDTH_RESET(reset) | +EXT_CSD_BOOT_BUS_WIDTH_WIDTH(width)); + + if (err) + return err; + return 0; +} + +/* * Modify EXT_CSD[179] which is PARTITION_CONFIG (formerly BOOT_CONFIG) * based on the passed in values for BOOT_ACK, BOOT_PARTITION_ENABLE and * PARTITION_ACCESS. diff --git a/include/mmc.h b/include/mmc.h index 7e026da..3594286 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -187,6 +187,9 @@ #define EXT_CSD_BOOT_PART_NUM(x) (x 3) #define EXT_CSD_PARTITION_ACCESS(x)(x 0) +#define EXT_CSD_BOOT_BUS_WIDTH_MODE(x) (x 3) +#define EXT_CSD_BOOT_BUS_WIDTH_RESET(x)(x 2) +#define EXT_CSD_BOOT_BUS_WIDTH_WIDTH(x)(x) #define R1_ILLEGAL_COMMAND (1 22) #define R1_APP_CMD (1 5) @@ -314,6 +317,8 @@ int mmc_boot_partition_size_change(struct mmc *mmc, unsigned long bootsize, int mmc_boot_part_access(struct mmc *mmc, u8 ack, u8 part_num, u8 access); /* Function to modify the PARTITION_CONFIG field of EXT_CSD */ int mmc_set_part_conf(struct mmc *mmc, u8 ack, u8 part_num, u8 access); +/* Function to modify the BOOT_BUS_WIDTH field of EXT_CSD */ +int mmc_set_boot_bus_width(struct mmc *mmc, u8 width, u8 reset, u8 mode); /** * Start device initialization and return immediately; it does not block on -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot
Re: [U-Boot] [PATCH 3/5] blackfin: replace bfin_gen_rand_mac() with eth_random_addr()
Hi Mike, On Thu, 17 Apr 2014 15:07:50 -0400 Mike Frysinger vap...@gentoo.org wrote: On Thu 17 Apr 2014 17:00:30 Masahiro Yamada wrote: --- a/include/configs/tcm-bf537.h +++ b/include/configs/tcm-bf537.h @@ -73,7 +73,7 @@ #define CONFIG_HOSTNAMEtcm-bf537 /* Uncomment next line to use fixed MAC address */ /* #define CONFIG_ETHADDR 02:80:ad:20:31:e8 */ - +#define CONFIG_LIB_RAND this should be in bfin_adi_common.h instead. i think that replaces the majority of your config updates (if not all). -mike Are you sure? There are 35 blackfin boards in boards.cfg. There are only 15 boards using random MAC address. Besides, I think your suggestion does not work because for ex. bf537-minotaur board is not including bfin_adi_common.h. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3 v2] board/t208xqds: Add support of 2-stage NAND/SPI/SD boot
Add support of 2-stage NAND/SPI/SD boot loader using SPL framework. PBL initializes the internal CPC-SRAM and copy SPL(160K) to it, SPL further initializes DDR using SPD and environment and copy u-boot(768 KB) from SPI/SD/NAND to DDR, finally SPL transfers control to u-boot. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- v2: updated to adapt to new SPL. board/freescale/t208xqds/Makefile | 5 ++ board/freescale/t208xqds/ddr.c| 7 +- board/freescale/t208xqds/spl.c| 137 ++ board/freescale/t208xqds/tlb.c| 7 ++ boards.cfg| 12 ++-- include/configs/T208xQDS.h| 113 +-- 6 files changed, 253 insertions(+), 28 deletions(-) create mode 100644 board/freescale/t208xqds/spl.c diff --git a/board/freescale/t208xqds/Makefile b/board/freescale/t208xqds/Makefile index 947b7f7..6cb72c9 100644 --- a/board/freescale/t208xqds/Makefile +++ b/board/freescale/t208xqds/Makefile @@ -4,11 +4,16 @@ # SPDX-License-Identifier: GPL-2.0+ # +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else obj-$(CONFIG_T2080QDS) += t208xqds.o obj-$(CONFIG_T2080QDS) += eth_t208xqds.o obj-$(CONFIG_T2081QDS) += t208xqds.o obj-$(CONFIG_T2081QDS) += eth_t208xqds.o obj-$(CONFIG_PCI) += pci.o +endif + obj-y += ddr.o obj-y += law.o obj-y += tlb.o diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c index ed1334d..3348971 100644 --- a/board/freescale/t208xqds/ddr.c +++ b/board/freescale/t208xqds/ddr.c @@ -107,13 +107,16 @@ phys_size_t initdram(int board_type) { phys_size_t dram_size; +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL) puts(Initializingusing SPD\n); - dram_size = fsl_ddr_sdram(); dram_size = setup_ddr_tlbs(dram_size / 0x10); dram_size *= 0x10; +#else + /* DDR has been initialised by first stage boot loader */ + dram_size = fsl_ddr_sdram_size(); +#endif - puts(DDR: ); return dram_size; } diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c new file mode 100644 index 000..a71c617 --- /dev/null +++ b/board/freescale/t208xqds/spl.c @@ -0,0 +1,137 @@ +/* Copyright 2013 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include malloc.h +#include ns16550.h +#include nand.h +#include i2c.h +#include mmc.h +#include fsl_esdhc.h +#include spi_flash.h +#include ../common/qixis.h +#include t208xqds_qixis.h + +DECLARE_GLOBAL_DATA_PTR; + +phys_size_t get_effective_memsize(void) +{ + return CONFIG_SYS_L3_SIZE; +} + +unsigned long get_board_sys_clk(void) +{ + u8 sysclk_conf = QIXIS_READ(brdcfg[1]); + + switch (sysclk_conf 0x0F) { + case QIXIS_SYSCLK_83: + return 8333; + case QIXIS_SYSCLK_100: + return 1; + case QIXIS_SYSCLK_125: + return 12500; + case QIXIS_SYSCLK_133: + return 1; + case QIXIS_SYSCLK_150: + return 15000; + case QIXIS_SYSCLK_160: + return 16000; + case QIXIS_SYSCLK_166: + return 1; + } + return ; +} + +unsigned long get_board_ddr_clk(void) +{ + u8 ddrclk_conf = QIXIS_READ(brdcfg[1]); + + switch ((ddrclk_conf 0x30) 4) { + case QIXIS_DDRCLK_100: + return 1; + case QIXIS_DDRCLK_125: + return 12500; + case QIXIS_DDRCLK_133: + return 1; + } + return ; +} + +void board_init_f(ulong bootflag) +{ + u32 plat_ratio, sys_clk, ccb_clk; + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; + + /* Memcpy existing GD at CONFIG_SPL_GD_ADDR */ + memcpy((void *)CONFIG_SPL_GD_ADDR, (void *)gd, sizeof(gd_t)); + + /* Update GD pointer */ + gd = (gd_t *)(CONFIG_SPL_GD_ADDR); + + console_init_f(); + + /* initialize selected port with appropriate baud rate */ + sys_clk = get_board_sys_clk(); + plat_ratio = (in_be32(gur-rcwsr[0]) 25) 0x1f; + ccb_clk = sys_clk * plat_ratio / 2; + + NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1, +ccb_clk / 16 / CONFIG_BAUDRATE); + +#if defined(CONFIG_SPL_MMC_BOOT) + puts(\nSD boot...\n); +#elif defined(CONFIG_SPL_SPI_BOOT) + puts(\nSPI boot...\n); +#elif defined(CONFIG_SPL_NAND_BOOT) + puts(\nNAND boot...\n); +#endif + + relocate_code(CONFIG_SPL_RELOC_STACK, (gd_t *)CONFIG_SPL_GD_ADDR, 0x0); +} + +void board_init_r(gd_t *gd, ulong dest_addr) +{ + bd_t *bd; + + bd = (bd_t *)(gd + sizeof(gd_t)); + memset(bd, 0, sizeof(bd_t)); + gd-bd = bd; + bd-bi_memstart = CONFIG_SYS_INIT_L3_ADDR; + bd-bi_memsize = CONFIG_SYS_L3_SIZE; + + probecpu(); + get_clocks(); +
[U-Boot] [PATCH 3/3 v2] board/t2080rdb: some update for t2080rdb
- update readme. - add CONFIG_SYS_CORTINA_FW_IN_* for loading Cortina PHY CS4315 ucode from NOR/NAND/SPI/SD/REMOTE. - update cpld vbank with SW3[5:7]=000 as default vbank0 instead of previous SW3[5:7]=111 as default vbank. - fix CONFIG_SYS_I2C_EEPROM_ADDR_LEN to 2. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- v2: add eeprom update. board/freescale/t208xrdb/README | 6 +++--- board/freescale/t208xrdb/cpld.h | 4 ++-- board/freescale/t208xrdb/t208xrdb.c | 2 +- include/configs/T208xRDB.h | 13 + 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/board/freescale/t208xrdb/README b/board/freescale/t208xrdb/README index fe26de5..24484cd 100644 --- a/board/freescale/t208xrdb/README +++ b/board/freescale/t208xrdb/README @@ -67,7 +67,7 @@ T2080PCIe-RDB board Overview - One PCIe x2 end-point device (C293 Crypto co-processor) - IFC/Local Bus - NOR: 128MB 16-bit NOR Flash - - NAND: 512MB 8-bit NAND flash + - NAND: 1GB 8-bit NAND flash - CPLD: for system controlling with programable header on-board - SATA - Two SATA 2.0 onnectors on-board @@ -156,11 +156,11 @@ Software configurations and board settings Switching between default bank and alternate bank on NOR flash To change boot source to vbank4: via software: run command 'cpld reset altbank' in u-boot. - via DIP-switch: set SW3[5:7] = '011' + via DIP-switch: set SW3[5:7] = '100' To change boot source to vbank0: via software: run command 'cpld reset' in u-boot. - via DIP-Switch: set SW3[5:7] = '111' + via DIP-Switch: set SW3[5:7] = '000' 2. NAND Boot: a. build PBL image for NAND boot diff --git a/board/freescale/t208xrdb/cpld.h b/board/freescale/t208xrdb/cpld.h index 4cee4e5..3f15338 100644 --- a/board/freescale/t208xrdb/cpld.h +++ b/board/freescale/t208xrdb/cpld.h @@ -35,8 +35,8 @@ void cpld_write(unsigned int reg, u8 value); #define CPLD_LBMAP_MASK0x3F #define CPLD_BANK_SEL_MASK 0x07 #define CPLD_BANK_OVERRIDE 0x40 -#define CPLD_LBMAP_ALTBANK 0x43 /* BANK OR | BANK 4 */ -#define CPLD_LBMAP_DFLTBANK0x47 /* BANK OR | BANK 0 */ +#define CPLD_LBMAP_ALTBANK 0x44 /* BANK OR | BANK 4 */ +#define CPLD_LBMAP_DFLTBANK0x40 /* BANK OR | BANK 0 */ #define CPLD_LBMAP_RESET 0xFF #define CPLD_LBMAP_SHIFT 0x03 #define CPLD_BOOT_SEL 0x80 diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index f3fec2a..265c1f9 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -44,7 +44,7 @@ int checkboard(void) puts(NAND\n); } else { reg = ((reg CPLD_LBMAP_MASK) CPLD_LBMAP_SHIFT); - printf(NOR vBank%d\n, ~reg 0x7); + printf(NOR vBank%d\n, reg); } #endif diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 4ef1167..73d82ed 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -208,7 +208,7 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_I2C_EEPROM_NXID #define CONFIG_SYS_EEPROM_BUS_NUM 0 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* * DDR Setup @@ -584,7 +584,8 @@ unsigned long get_board_ddr_clk(void); * env, so we got 0x11. */ #define CONFIG_SYS_QE_FW_IN_SPIFLASH -#define CONFIG_SYS_FMAN_FW_ADDR0x11 +#define CONFIG_SYS_CORTINA_FW_IN_SPIFLASH +#define CONFIG_SYS_FMAN_FW_ADDR0x11 #define CONFIG_CORTINA_FW_ADDR 0x12 #elif defined(CONFIG_SDCARD) @@ -594,11 +595,13 @@ unsigned long get_board_ddr_clk(void); * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ #define CONFIG_SYS_QE_FMAN_FW_IN_MMC +#define CONFIG_SYS_CORTINA_FW_IN_MMC #define CONFIG_SYS_FMAN_FW_ADDR(512 * 0x820) #define CONFIG_CORTINA_FW_ADDR (512 * 0x8a0) #elif defined(CONFIG_NAND) #define CONFIG_SYS_QE_FMAN_FW_IN_NAND +#define CONFIG_SYS_CORTINA_FW_IN_NAND #define CONFIG_SYS_FMAN_FW_ADDR(3 * CONFIG_SYS_NAND_BLOCK_SIZE) #define CONFIG_CORTINA_FW_ADDR (4 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) @@ -610,11 +613,13 @@ unsigned long get_board_ddr_clk(void); * master LAW-the ucode address in master's memory space. */ #define CONFIG_SYS_QE_FMAN_FW_IN_REMOTE -#define CONFIG_SYS_FMAN_FW_ADDR0xFFE0 +#define CONFIG_SYS_CORTINA_FW_IN_REMOTE +#define CONFIG_SYS_FMAN_FW_ADDR0xFFE0 #define CONFIG_CORTINA_FW_ADDR 0xFFE1 #else #define CONFIG_SYS_QE_FMAN_FW_IN_NOR -#define CONFIG_SYS_FMAN_FW_ADDR0xEFF0 +#define CONFIG_SYS_CORTINA_FW_IN_NOR +#define CONFIG_SYS_FMAN_FW_ADDR0xEFF0 #define CONFIG_CORTINA_FW_ADDR 0xEFE0 #endif #define
[U-Boot] [PATCH 2/3 v2] board/t208xrdb: Add support of 2-stage NAND/SPI/SD boot
Add support of 2-stage NAND/SPI/SD boot loader using SPL framework. PBL initializes the internal CPC-SRAM and copy SPL(160K) to it, SPL further initializes DDR using SPD and environment and copy u-boot(768K) from SPI/SD/NAND to DDR, finally SPL transfers control to u-boot. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- v2: updated to adapt to new SPL. board/freescale/t208xrdb/Makefile | 5 ++ board/freescale/t208xrdb/README | 80 +++- board/freescale/t208xrdb/ddr.c| 8 +-- board/freescale/t208xrdb/spl.c| 107 + board/freescale/t208xrdb/tlb.c| 4 +- boards.cfg| 6 +-- include/configs/T208xRDB.h| 108 -- 7 files changed, 282 insertions(+), 36 deletions(-) create mode 100644 board/freescale/t208xrdb/spl.c diff --git a/board/freescale/t208xrdb/Makefile b/board/freescale/t208xrdb/Makefile index 092c9ff..9605f8b 100644 --- a/board/freescale/t208xrdb/Makefile +++ b/board/freescale/t208xrdb/Makefile @@ -4,10 +4,15 @@ # SPDX-License-Identifier: GPL-2.0+ # +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else obj-$(CONFIG_T2080RDB) += t208xrdb.o obj-$(CONFIG_T2080RDB) += eth_t208xrdb.o obj-$(CONFIG_T2080RDB) += cpld.o obj-$(CONFIG_PCI) += pci.o +endif + obj-y += ddr.o obj-y += law.o obj-y += tlb.o diff --git a/board/freescale/t208xrdb/README b/board/freescale/t208xrdb/README index 0012c6c..fe26de5 100644 --- a/board/freescale/t208xrdb/README +++ b/board/freescale/t208xrdb/README @@ -120,7 +120,7 @@ Start Address End Address Definition Max size 0xEBF0 0xEBF1 FMAN ucode (alt bank) 128KB 0xEBE0 0xEBE3 PHY CS4315 firmware (alt bank) 256KB 0xE930 0xEBEF rootfs (current bank) 44MB -0xE880 0xE88F Hardware device tree (cur bank) 11MB + 512KB +0xE880 0xE88F Hardware device tree (cur bank) 1MB 0xE802 0xE86F Linux.uImage (current bank) 7MB + 875KB 0xE800 0xE801 RCW (current bank) 128KB @@ -146,7 +146,8 @@ Software configurations and board settings -- 1. NOR boot: a. build NOR boot image - $ make T2080RDB + $ make T2080RDB_config + $ make b. program u-boot.bin image to NOR flash = tftp 100 u-boot.bin = pro off all;era eff4 efff;cp.b 100 eff4 $filesize @@ -164,9 +165,9 @@ Software configurations and board settings 2. NAND Boot: a. build PBL image for NAND boot $ make T2080RDB_NAND_config - $ make u-boot.pbl - b. program u-boot.pbl to NAND flash - = tftp 100 u-boot.pbl + $ make + b. program u-boot-with-spl-pbl.bin to NAND flash + = tftp 100 u-boot-with-spl-pbl.bin = nand erase 0 d = nand write 100 0 $filesize set SW1[1:8] = '1010', SW2[1] = '1', SW3[4] = '1' for NAND boot @@ -174,9 +175,9 @@ Software configurations and board settings 3. SPI Boot: a. build PBL image for SPI boot $ make T2080RDB_SPIFLASH_config - $ make u-boot.pbl - b. program u-boot.pbl to SPI flash - = tftp 100 u-boot.pbl + $ make + b. program u-boot-with-spl-pbl.bin to SPI flash + = tftp 100 u-boot-with-spl-pbl.bin = sf probe 0 = sf erase 0 d = sf write 100 0 $filesize @@ -185,13 +186,68 @@ Software configurations and board settings 4. SD Boot: a. build PBL image for SD boot $ make T2080RDB_SDCARD_config - $ make u-boot.pbl - b. program u-boot.pbl to TF card - = tftp 100 u-boot.pbl - = mmc write 100 8 1650 + $ make + b. program u-boot-with-spl-pbl.bin to micro-SD/TF card + = tftp 100 u-boot-with-spl-pbl.bin + = mmc write 100 8 0x800 set SW1[1:8] = '0010', SW2[1] = '0' for SD boot +2-stage NAND/SPI/SD boot loader +--- +PBL initializes the internal CPC-SRAM and copy SPL(160K) to SRAM. +SPL further initializes DDR using SPD and environment variables +and copy u-boot(768 KB) from NAND/SPI/SD device to DDR. +Finally SPL transers control to u-boot for futher booting. + +SPL has following features: + - Executes within 256K + - No relocation required + +Run time view of SPL framework +- +|Area | Address| +- +|SecureBoot header | 0xFFFC (32KB) | +- +|GD, BD | 0xFFFC8000 (4KB) | +- +|ENV | 0xFFFC9000 (8KB) | +- +|HEAP | 0xFFFCB000 (50KB) |
Re: [U-Boot] [PATCH] powerpc/t1040qds: Remove Video - HDMI support
-Original Message- From: Jain Priyanka-B32167 Sent: Friday, April 18, 2014 4:26 PM To: Wang Dongsheng-B40534; Sun York-R58495 Cc: Wood Scott-B07421; u-boot@lists.denx.de; Wang Dongsheng-B40534 Subject: RE: [PATCH] powerpc/t1040qds: Remove Video - HDMI support Hello Dongsheng, We do have requirement to support this that's why code development was done. Also , what is the dependency of deep-sleep on this. Please elaborate And if something is broken, we should fix it. Instead of removing the feature. If we have, why kernel doesn't support DIU on T1040QDS? That I must remove it reason. Regards, -Dongsheng Regards Priyanka -Original Message- From: Dongsheng Wang [mailto:dongsheng.w...@freescale.com] Sent: Friday, April 18, 2014 1:09 PM To: Sun York-R58495 Cc: Jain Priyanka-B32167; Wood Scott-B07421; u-boot@lists.denx.de; Wang Dongsheng-B40534 Subject: [PATCH] powerpc/t1040qds: Remove Video - HDMI support From: Wang Dongsheng dongsheng.w...@freescale.com We should remove this support. First, there is not any documents to say we need to support this feature, and kernel also not support this feature. Second, Kerneal not support this on T1040QDS, so if we open it in u-boot, FPGA will be changed and that will affect deep sleep feature. Signed-off-by: Wang Dongsheng dongsheng.w...@freescale.com diff --git a/board/freescale/t1040qds/Makefile b/board/freescale/t1040qds/Makefile index 19ed21b..c7470d7 100644 --- a/board/freescale/t1040qds/Makefile +++ b/board/freescale/t1040qds/Makefile @@ -10,4 +10,3 @@ obj-$(CONFIG_PCI) += pci.o obj-y += law.o obj-y += tlb.o obj-y += eth.o -obj-y += diu.o diff --git a/board/freescale/t1040qds/diu.c b/board/freescale/t1040qds/diu.c deleted file mode 100644 index 0214224..000 --- a/board/freescale/t1040qds/diu.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014 Freescale Semiconductor, Inc. - * Author: Priyanka Jain priyanka.j...@freescale.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include common.h -#include command.h -#include linux/ctype.h -#include asm/io.h -#include stdio_dev.h -#include video_fb.h -#include fsl_diu_fb.h -#include ../common/qixis.h -#include ../common/diu_ch7301.h -#include t1040qds.h -#include t1040qds_qixis.h - -/* - * DIU Area Descriptor - * - * Note that we need to byte-swap the value before it's written to the AD - * register. So even though the registers don't look like they're in the same - * bit positions as they are on the MPC8610, the same value is written to the - * AD register on the MPC8610 and on the P1022. - */ -#define AD_BYTE_F 0x1000 -#define AD_ALPHA_C_SHIFT 25 -#define AD_BLUE_C_SHIFT23 -#define AD_GREEN_C_SHIFT 21 -#define AD_RED_C_SHIFT 19 -#define AD_PIXEL_S_SHIFT 16 -#define AD_COMP_3_SHIFT12 -#define AD_COMP_2_SHIFT8 -#define AD_COMP_1_SHIFT4 -#define AD_COMP_0_SHIFT0 - -void diu_set_pixel_clock(unsigned int pixclock) -{ - unsigned long speed_ccb, temp; - u32 pixval; - int ret = 0; - speed_ccb = get_bus_freq(0); - temp = 10 / pixclock; - temp *= 1000; - pixval = speed_ccb / temp; - - /* Program HDMI encoder */ - /* Switch channel to DIU */ - select_i2c_ch_pca9547(I2C_MUX_CH_DIU); - - /* Set dispaly encoder */ - ret = diu_set_dvi_encoder(temp); - if (ret) { - puts(Failed to set DVI encoder\n); - return; - } - - /* Switch channel to default */ - select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT); - - /* Program pixel clock */ - out_be32((unsigned *)CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR, -((pixval PXCK_BITS_START) PXCK_MASK)); - /* enable clock*/ - out_be32((unsigned *)CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR, PXCKEN_MASK | -((pixval PXCK_BITS_START) PXCK_MASK)); -} - -int platform_diu_init(unsigned int xres, unsigned int yres, const char *port) -{ - u32 pixel_format; - u8 sw; - - /*Route I2C4 to DIU system as HSYNC/VSYNC*/ - sw = QIXIS_READ(brdcfg[5]); - QIXIS_WRITE(brdcfg[5], - ((sw ~(BRDCFG5_IMX_MASK)) | (BRDCFG5_IMX_DIU))); - - /*Configure Display ouput port as HDMI*/ - sw = QIXIS_READ(brdcfg[15]); - QIXIS_WRITE(brdcfg[15], - ((sw ~(BRDCFG15_LCDPD_MASK | BRDCFG15_DIUSEL_MASK)) - | (BRDCFG15_LCDPD_ENABLED | BRDCFG15_DIUSEL_HDMI))); - - pixel_format = cpu_to_le32(AD_BYTE_F | (3 AD_ALPHA_C_SHIFT) | - (0 AD_BLUE_C_SHIFT) | (1 AD_GREEN_C_SHIFT) | - (2 AD_RED_C_SHIFT) | (8 AD_COMP_3_SHIFT) | - (8 AD_COMP_2_SHIFT) | (8 AD_COMP_1_SHIFT) | - (8 AD_COMP_0_SHIFT) | (3 AD_PIXEL_S_SHIFT)); - - printf(DIU: Switching to monitor @
Re: [U-Boot] [PATCH] config: remove platform CONFIG_SYS_HZ definition part 4
Hi Masahiro Yamada, On 04/18/2014 04:46 PM, Masahiro Yamada wrote: Some new boards define CONFIG_SYS_HZ again! Remove. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Thanks. Acked-by: Bo Shen voice.s...@atmel.com --- include/configs/T208xRDB.h | 1 - include/configs/sama5d3_xplained.h | 1 - 2 files changed, 2 deletions(-) diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 743eee3..f354367 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -655,7 +655,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) #define CONFIG_SYS_MAXARGS16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */ -#define CONFIG_SYS_HZ 1000/* decrementer freq: 1ms ticks*/ /* * For booting Linux, the board info and command line data diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h index 91cc7d8..41c946d 100644 --- a/include/configs/sama5d3_xplained.h +++ b/include/configs/sama5d3_xplained.h @@ -17,7 +17,6 @@ /* ARM asynchronous clock */ #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 #define CONFIG_SYS_AT91_MAIN_CLOCK 1200 /* from 12 MHz crystal */ -#define CONFIG_SYS_HZ 1000 #define CONFIG_AT91FAMILY #define CONFIG_ARCH_CPU_INIT Best Regards, Bo Shen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/5] blackfin: replace bfin_gen_rand_mac() with eth_random_addr()
bfin_gen_rand_mac() uses __DATE__ as the seed for random ethernet address. This makes the build non-deterministic. In the first place, it should not be implemented as a Bfin-specific function. Use eth_random_addr() instead. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Sonic Zhang sonic.zh...@analog.com --- Changes in v2: - Improve commit description arch/blackfin/include/asm/net.h | 28 board/bct-brettl2/bct-brettl2.c | 3 +-- board/bf518f-ezbrd/bf518f-ezbrd.c | 3 +-- board/bf526-ezbrd/bf526-ezbrd.c | 3 +-- board/bf527-ezkit/bf527-ezkit.c | 3 +-- board/bf537-minotaur/bf537-minotaur.c | 3 +-- board/bf537-pnav/bf537-pnav.c | 3 +-- board/bf537-srv1/bf537-srv1.c | 3 +-- board/bf537-stamp/bf537-stamp.c | 3 +-- board/cm-bf527/cm-bf527.c | 3 +-- board/cm-bf537e/cm-bf537e.c | 3 +-- board/cm-bf537u/cm-bf537u.c | 3 +-- board/dnp5370/dnp5370.c | 3 +-- board/ip04/ip04.c | 3 +-- board/tcm-bf518/tcm-bf518.c | 3 +-- board/tcm-bf537/tcm-bf537.c | 3 +-- include/configs/bct-brettl2.h | 1 + include/configs/bf518f-ezbrd.h| 2 +- include/configs/bf526-ezbrd.h | 2 +- include/configs/bf527-ezkit.h | 2 +- include/configs/bf537-minotaur.h | 1 + include/configs/bf537-pnav.h | 2 +- include/configs/bf537-srv1.h | 2 +- include/configs/bf537-stamp.h | 2 +- include/configs/cm-bf527.h| 2 +- include/configs/cm-bf537e.h | 2 +- include/configs/cm-bf537u.h | 2 +- include/configs/dnp5370.h | 2 ++ include/configs/ip04.h| 1 + include/configs/tcm-bf518.h | 2 +- include/configs/tcm-bf537.h | 2 +- 31 files changed, 31 insertions(+), 69 deletions(-) delete mode 100644 arch/blackfin/include/asm/net.h diff --git a/arch/blackfin/include/asm/net.h b/arch/blackfin/include/asm/net.h deleted file mode 100644 index 97cb466..000 --- a/arch/blackfin/include/asm/net.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * net.h - misc Blackfin network helpers - * - * Copyright (c) 2008-2009 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ - -#ifndef __ASM_BFIN_RAND_MAC__ -#define __ASM_BFIN_RAND_MAC__ - -/* If the board does not have a real MAC assigned to it, then generate a - * locally administrated pseudo-random one based on CYCLES and compile date. - */ -static inline void bfin_gen_rand_mac(uchar *mac_addr) -{ - /* make something up */ - const char s[] = __DATE__; - size_t i; - u32 cycles; - for (i = 0; i 6; ++i) { - asm(%0 = CYCLES; : =r (cycles)); - mac_addr[i] = cycles ^ s[i]; - } - mac_addr[0] = (mac_addr[0] | 0x02) ~0x01; /* make it local unicast */ -} - -#endif diff --git a/board/bct-brettl2/bct-brettl2.c b/board/bct-brettl2/bct-brettl2.c index de5b9ff..6be9b18 100644 --- a/board/bct-brettl2/bct-brettl2.c +++ b/board/bct-brettl2/bct-brettl2.c @@ -12,7 +12,6 @@ #include asm/blackfin.h #include asm/portmux.h #include asm/gpio.h -#include asm/net.h #include net.h #include netdev.h #include miiphy.h @@ -33,7 +32,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts(Warning: Generating 'random' MAC address\n); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); eth_setenv_enetaddr(ethaddr, mac_addr); } diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c index 09a2353..3a94a57 100644 --- a/board/bf518f-ezbrd/bf518f-ezbrd.c +++ b/board/bf518f-ezbrd/bf518f-ezbrd.c @@ -13,7 +13,6 @@ #include netdev.h #include spi.h #include asm/blackfin.h -#include asm/net.h #include asm/portmux.h #include asm/mach-common/bits/otp.h #include asm/sdh.h @@ -48,7 +47,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts(Warning: Generating 'random' MAC address\n); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr(ethaddr, mac_addr); diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c index 4695b11..368d6be 100644 --- a/board/bf526-ezbrd/bf526-ezbrd.c +++ b/board/bf526-ezbrd/bf526-ezbrd.c @@ -12,7 +12,6 @@ #include net.h #include netdev.h #include asm/blackfin.h -#include asm/net.h #include asm/mach-common/bits/otp.h DECLARE_GLOBAL_DATA_PTR; @@ -45,7 +44,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts(Warning: Generating 'random' MAC address\n); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr(ethaddr, mac_addr); diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c index 211cf24..88e1869
[U-Boot] [PATCH v2 0/5] Prohibit __DATE__ and __TIME__ (+ refactor random MAC addr)
The main aim of this series is to prohibit using __DATE__ and __TIME__. Using __DATE__, __TIME__ in source files would make the build non-deterministic. We should be able to generate the exactly same binary if the source code is the same. This is necessary, for example, I sometimes want to confirm my changes to the build system still produces the same output. So I want to gather timestamp things to one place (include/generated/timestamp_autogenerated.h) and control it. Currently __DATE__, __TIME__ are used in two files. [1] arch/blackfin/include/asm/net.h Blackfin is using __DATE__ as the seed for the random ethernet address. This feature will be replaced with genericly-used eth_random_addr(). [2] fs/ubifs/super.c __DATE__ and __TIME__ are used in dbg_msg(), so simply droppred. Before doing [1], I've renamed eth_rand_ethaddr() to eth_rand_addr() for consistency. And it has been refactored as an inline function, which would be more easily handled. Changes for v2: - Improve commit desctiption and comments in this cover letter - Add the signed-off of the original auther of 5/5. No change in code. Update only in comments. Masahiro Yamada (5): rand: do not surround function declarations by #ifdef net: rename and refactor eth_rand_ethaddr() function blackfin: replace bfin_gen_rand_mac() with eth_random_addr() fs: ubifs: drop __DATE__ and __TIME__ kbuild: build with -Werror=date-time if the compiler supports it Makefile | 3 +++ arch/blackfin/include/asm/net.h | 28 --- board/bct-brettl2/bct-brettl2.c | 3 +-- board/bf518f-ezbrd/bf518f-ezbrd.c | 3 +-- board/bf526-ezbrd/bf526-ezbrd.c | 3 +-- board/bf527-ezkit/bf527-ezkit.c | 3 +-- board/bf537-minotaur/bf537-minotaur.c | 3 +-- board/bf537-pnav/bf537-pnav.c | 3 +-- board/bf537-srv1/bf537-srv1.c | 3 +-- board/bf537-stamp/bf537-stamp.c | 3 +-- board/buffalo/lsxl/lsxl.c | 2 +- board/cm-bf527/cm-bf527.c | 3 +-- board/cm-bf537e/cm-bf537e.c | 3 +-- board/cm-bf537u/cm-bf537u.c | 3 +-- board/dnp5370/dnp5370.c | 3 +-- board/ip04/ip04.c | 3 +-- board/tcm-bf518/tcm-bf518.c | 3 +-- board/tcm-bf537/tcm-bf537.c | 3 +-- drivers/net/dm9000x.c | 2 +- drivers/net/ftmac110.c| 2 +- fs/ubifs/super.c | 1 - include/common.h | 2 -- include/configs/bct-brettl2.h | 1 + include/configs/bf518f-ezbrd.h| 2 +- include/configs/bf526-ezbrd.h | 2 +- include/configs/bf527-ezkit.h | 2 +- include/configs/bf537-minotaur.h | 1 + include/configs/bf537-pnav.h | 2 +- include/configs/bf537-srv1.h | 2 +- include/configs/bf537-stamp.h | 2 +- include/configs/cm-bf527.h| 2 +- include/configs/cm-bf537e.h | 2 +- include/configs/cm-bf537u.h | 2 +- include/configs/dnp5370.h | 2 ++ include/configs/ip04.h| 1 + include/configs/tcm-bf518.h | 2 +- include/configs/tcm-bf537.h | 2 +- include/net.h | 36 ++- net/eth.c | 22 - 39 files changed, 56 insertions(+), 114 deletions(-) delete mode 100644 arch/blackfin/include/asm/net.h -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/5] kbuild: build with -Werror=date-time if the compiler supports it
Using __DATE__, __TIME__ would make the build non-deterministic. If the code needs to refer to build date/time, use U_BOOT_DATE and U_BOOT_TIME in include/generated/timestamp_autogenerated.h instead. This commit has been imported from Linux Kernel, which should be applied to U-Boot too: commit fe7c36c7bde12190341722af69358e42171162f3 Author: Josh Triplett j...@joshtriplett.org Date: Mon Dec 23 13:56:06 2013 -0800 Makefile: Build with -Werror=date-time if the compiler supports it GCC 4.9 and newer have a new warning -Wdate-time, which warns on any use of __DATE__, __TIME__, or __TIMESTAMP__, which would make the build non-deterministic. Now that the kernel does not use any of those macros, turn on -Werror=date-time if available, to keep it that way. The kernel already (optionally) records this information at build time in a single place; other kernel code should not duplicate that. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Michal Marek mma...@suse.cz Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: - Add signed-off of the original author. Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 0191869..09a370f 100644 --- a/Makefile +++ b/Makefile @@ -578,6 +578,9 @@ KBUILD_AFLAGS += -Wa,-gstabs,-S endif endif +# Prohibit date/time macros, which would make the build non-deterministic +KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) + ifneq ($(CONFIG_SYS_TEXT_BASE),) KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) endif -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/5] net: rename and refactor eth_rand_ethaddr() function
Some functions in include/net.h are ported from include/linux/etherdevice.h of Linux Kernel. For ex. is_zero_ether_addr() is_multicast_ether_addr() is_broadcast_ether_addr() is_valid_ether_addr(); So, we should use the same function name as that of Linux Kernel, eth_rand_addr(), for consistency. Besides, eth_rand_addr() has been implemented as an inline function. So it should not be surrounded by #ifdef CONFIG_RANDOM_MACADDR. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Acked-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v2: - Fix commit description board/buffalo/lsxl/lsxl.c | 2 +- drivers/net/dm9000x.c | 2 +- drivers/net/ftmac110.c| 2 +- include/net.h | 36 +++- net/eth.c | 22 -- 5 files changed, 22 insertions(+), 42 deletions(-) diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index eca1683..659a124 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -231,7 +231,7 @@ static void rescue_mode(void) printf(Entering rescue mode..\n); #ifdef CONFIG_RANDOM_MACADDR if (!eth_getenv_enetaddr(ethaddr, enetaddr)) { - eth_random_enetaddr(enetaddr); + eth_random_addr(enetaddr); if (eth_setenv_enetaddr(ethaddr, enetaddr)) { printf(Failed to set ethernet address\n); set_led(LED_ALARM_BLINKING); diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c index b68d808..4de9d41 100644 --- a/drivers/net/dm9000x.c +++ b/drivers/net/dm9000x.c @@ -345,7 +345,7 @@ static int dm9000_init(struct eth_device *dev, bd_t *bd) if (!is_valid_ether_addr(dev-enetaddr)) { #ifdef CONFIG_RANDOM_MACADDR printf(Bad MAC address (uninitialized EEPROM?), randomizing\n); - eth_random_enetaddr(dev-enetaddr); + eth_random_addr(dev-enetaddr); printf(MAC: %pM\n, dev-enetaddr); #else printf(WARNING: Bad MAC address (uninitialized EEPROM?)\n); diff --git a/drivers/net/ftmac110.c b/drivers/net/ftmac110.c index 8eee272..98c4f09 100644 --- a/drivers/net/ftmac110.c +++ b/drivers/net/ftmac110.c @@ -425,7 +425,7 @@ int ftmac110_initialize(bd_t *bis) dev-recv = ftmac110_recv; if (!eth_getenv_enetaddr_by_index(eth, card_nr, dev-enetaddr)) - eth_random_enetaddr(dev-enetaddr); + eth_random_addr(dev-enetaddr); /* allocate tx descriptors (it must be 16 bytes aligned) */ chip-txd = dma_alloc_coherent( diff --git a/include/net.h b/include/net.h index 0802fad..735b0b9 100644 --- a/include/net.h +++ b/include/net.h @@ -130,23 +130,6 @@ extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr); extern int eth_getenv_enetaddr_by_index(const char *base_name, int index, uchar *enetaddr); -#ifdef CONFIG_RANDOM_MACADDR -/* - * The u-boot policy does not allow hardcoded ethernet addresses. Under the - * following circumstances a random generated address is allowed: - * - in emergency cases, where you need a working network connection to set - *the ethernet address. - *Eg. you want a rescue boot and don't have a serial port to access the - *CLI to set environment variables. - * - * In these cases, we generate a random locally administered ethernet address. - * - * Args: - * enetaddr - returns 6 byte hardware address - */ -extern void eth_random_enetaddr(uchar *enetaddr); -#endif - extern int usb_eth_initialize(bd_t *bi); extern int eth_init(bd_t *bis);/* Initialize the device */ extern int eth_send(void *packet, int length);/* Send a packet */ @@ -674,6 +657,25 @@ static inline int is_valid_ether_addr(const u8 *addr) return !is_multicast_ether_addr(addr) !is_zero_ether_addr(addr); } +/** + * eth_random_addr - Generate software assigned random Ethernet address + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Generate a random Ethernet address (MAC) that is not multicast + * and has the local assigned bit set. + */ +static inline void eth_random_addr(uchar *addr) +{ + int i; + unsigned int seed = get_timer(0); + + for (i = 0; i 6; i++) + addr[i] = rand_r(seed); + + addr[0] = 0xfe;/* clear multicast bit */ + addr[0] |= 0x02;/* set local assignment bit (IEEE802) */ +} + /* Convert an IP address to a string */ extern void ip_to_string(IPaddr_t x, char *s); diff --git a/net/eth.c b/net/eth.c index 32bd10c..99386e3 100644 --- a/net/eth.c +++ b/net/eth.c @@ -63,28 +63,6 @@ static int eth_mac_skip(int index) return ((skip_state = getenv(enetvar)) != NULL); } -#ifdef CONFIG_RANDOM_MACADDR -void eth_random_enetaddr(uchar *enetaddr) -{ - uint32_t rval; - - srand(get_timer(0)); - - rval = rand(); - enetaddr[0] =
[U-Boot] [PATCH v2 1/5] rand: do not surround function declarations by #ifdef
Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None include/common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/common.h b/include/common.h index cbd3c9e..49feac2 100644 --- a/include/common.h +++ b/include/common.h @@ -834,12 +834,10 @@ char *strmhz(char *buf, unsigned long hz); #include u-boot/crc.h /* lib/rand.c */ -#if defined(CONFIG_LIB_RAND) || defined(CONFIG_LIB_HW_RAND) #define RAND_MAX -1U void srand(unsigned int seed); unsigned int rand(void); unsigned int rand_r(unsigned int *seedp); -#endif /* common/console.c */ intconsole_init_f(void); /* Before relocation; uses the serial stuff */ -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/5] fs: ubifs: drop __DATE__ and __TIME__
__DATE__ and __TIME__ makes the build non-deterministic. Drop the debug message using them. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None fs/ubifs/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 67f115f..748ab67 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -734,7 +734,6 @@ static int mount_ubifs(struct ubifs_info *c) ubifs_msg(reserved for root: %llu bytes (%llu KiB), c-report_rp_size, c-report_rp_size 10); - dbg_msg(compiled on: __DATE__ at __TIME__); dbg_msg(min. I/O unit size: %d bytes, c-min_io_size); dbg_msg(LEB size:%d bytes (%d KiB), c-leb_size, c-leb_size 10); -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] mtd: denali: improve nand_read_oob and fix nand_write_oob
This patch is a review feedback against Denali NAND controller driver. http://patchwork.ozlabs.org/patch/333077/ This is not applicable to the mainline. --- Hi Chin, This patch fixes some issues. [1] Fix denali_write_oob() handler. As for v7, nand markbad did not work at all. With this patch, it works. [2] Make denali_read_oob() 10x faster. One of the fatal issues of v7 is nand bad command is extremely slow. This is the benchmark of v7 = time nand bad Device 0 bad blocks: time: 11.300 seconds, 11300 ticks It is really really painful to wait more than 10 seconds just for bad block scanning to boot Linux. In v7, denali_read_oob() calls denali_read_page_raw(). This causes the transfering main area data and memcpy of it, which leads to significant performance regression. Like Linux Kernel, dedicated denali_read_oob() must be impilemented. With this patch, nand bad command gets much faster! This is my benchmark: = time nand bad Device 0 bad blocks: time: 0.998 seconds, 998 ticks [3] Remove false comment /* Writes OOB data to the device. * This code unused under normal U-Boot console as normally page write raw * to be used for write oob data with main data. */ static int write_oob_data(struct mtd_info *mtd, uint8_t *buf, int page) This comment is telling a lie. write_oob_data() is called from nand markbad command. It must be deleted. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Chin Liang See cl...@altera.com Cc: Artem Bityutskiy artem.bityuts...@linux.intel.com Cc: David Woodhouse david.woodho...@intel.com Cc: Brian Norris computersforpe...@gmail.com Cc: Scott Wood scottw...@freescale.com --- drivers/mtd/nand/denali.c | 136 +++--- 1 file changed, 91 insertions(+), 45 deletions(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 348e244..dcde3e6 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -527,46 +527,34 @@ static void setup_ecc_for_xfer(bool ecc_en, bool transfer_spare) static int denali_send_pipeline_cmd(bool ecc_en, bool transfer_spare, int access_type, int op) { - uint32_t addr = 0x0, cmd = 0x0, irq_status = 0, irq_mask = 0; - uint32_t page_count = 1;/* always read a page */ - - if (op == DENALI_READ) - irq_mask = INTR_STATUS__LOAD_COMP; - else if (op == DENALI_WRITE) - irq_mask = INTR_STATUS__PROGRAM_COMP | - INTR_STATUS__PROGRAM_FAIL; - else - BUG(); + uint32_t addr = 0x0, cmd = 0x0, irq_status; + static uint32_t page_count = 1; + + setup_ecc_for_xfer(ecc_en, transfer_spare); /* clear interrupts */ clear_interrupts(); - /* setup ECC and transfer spare reg */ - setup_ecc_for_xfer(ecc_en, transfer_spare); - addr = BANK(denali.flash_bank) | denali.page; /* setup the acccess type */ cmd = MODE_10 | addr; - index_addr((uint32_t)cmd, access_type); + index_addr(cmd, access_type); /* setup the pipeline command */ - if (access_type == SPARE_ACCESS op == DENALI_WRITE) - index_addr((uint32_t)cmd, DENALI_BUFFER_WRITE); - else if (access_type == SPARE_ACCESS op == DENALI_READ) - index_addr((uint32_t)cmd, DENALI_BUFFER_LOAD); - else - index_addr((uint32_t)cmd, 0x2000 | op | page_count); + index_addr(cmd, 0x2000 | op | page_count); - /* wait for command to be accepted */ - irq_status = wait_for_irq(irq_mask); - if ((irq_status irq_mask) != irq_mask) - return -EIO; + cmd = MODE_01 | addr; + writel(cmd, denali.flash_mem + INDEX_CTRL_REG); - if (access_type != SPARE_ACCESS) { - cmd = MODE_01 | addr; - writel(cmd, denali.flash_mem + INDEX_CTRL_REG); + if (op == DENALI_READ) { + /* wait for command to be accepted */ + irq_status = wait_for_irq(INTR_STATUS__LOAD_COMP); + + if (irq_status == 0) + return -EIO; } + return 0; } @@ -586,6 +574,29 @@ static int write_data_to_flash_mem(const void *buf, int len) return i * 4; /* intent is to return the number of bytes read */ } +/* helper function that simply reads a buffer from the flash */ +static int read_data_from_flash_mem(uint8_t *buf, int len) +{ + uint32_t i, *buf32; + + /* +* we assume that len will be a multiple of 4, if not +* it would be nice to know about it ASAP rather than +* have random failures... +* This assumption is based on the fact that this +* function is designed to be used to read flash pages, +* which are typically multiples of 4... +*/ + + BUG_ON((len % 4) != 0); + + /* transfer the data from the flash */ + buf32 = (uint32_t
[U-Boot] [PATCH 2/2] mtd: denali: recover the same function prototypes as Linux Kernel
This patch is a review feedback against Denali NAND controller driver. http://patchwork.ozlabs.org/patch/333077/ This is not applicable to the mainline. -- This driver code has diverged too much from that of Linux Kernel. The main cause was to drop struct denali_nand_info *denali from the most of functions and to replace denali-foo with denali.foo. But is it necessary? I think it just resulted in the difficulty of diffing and re-use of the Linux code. This patch revives struct denali_nand_info *denali and denali-foo. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Chin Liang See cl...@altera.com Cc: Artem Bityutskiy artem.bityuts...@linux.intel.com Cc: David Woodhouse david.woodho...@intel.com Cc: Brian Norris computersforpe...@gmail.com Cc: Scott Wood scottw...@freescale.com --- drivers/mtd/nand/denali.c | 608 +- 1 file changed, 327 insertions(+), 281 deletions(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index dcde3e6..565ca9e 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -7,6 +7,7 @@ */ #include common.h +#include malloc.h #include nand.h #include asm/errno.h #include asm/io.h @@ -15,7 +16,6 @@ #define NAND_DEFAULT_TIMINGS -1 -static struct denali_nand_info denali; static int onfi_timing_mode = NAND_DEFAULT_TIMINGS; /* We define a macro here that combines all interrupts this driver uses into @@ -40,6 +40,12 @@ static int onfi_timing_mode = NAND_DEFAULT_TIMINGS; #define SUPPORT_8BITECC1 +/* + * this macro allows us to convert from an MTD structure to our own + * device context (denali) structure. + */ +#define mtd_to_denali(m) (((struct nand_chip *)mtd-priv)-priv) + /* These constants are defined by the driver to enable common driver * configuration options. */ #define SPARE_ACCESS 0x41 @@ -66,44 +72,53 @@ static int onfi_timing_mode = NAND_DEFAULT_TIMINGS; #define BANK(x) ((x) 24) /* Interrupts are cleared by writing a 1 to the appropriate status bit */ -static inline void clear_interrupt(uint32_t irq_mask) +static inline void clear_interrupt(struct denali_nand_info *denali, + uint32_t irq_mask) { - uint32_t intr_status_reg = 0; - intr_status_reg = INTR_STATUS(denali.flash_bank); - writel(irq_mask, denali.flash_reg + intr_status_reg); + uint32_t intr_status_reg; + + intr_status_reg = INTR_STATUS(denali-flash_bank); + + writel(irq_mask, denali-flash_reg + intr_status_reg); } -static uint32_t read_interrupt_status(void) +static uint32_t read_interrupt_status(struct denali_nand_info *denali) { - uint32_t intr_status_reg = 0; - intr_status_reg = INTR_STATUS(denali.flash_bank); - return readl(denali.flash_reg + intr_status_reg); + uint32_t intr_status_reg; + + intr_status_reg = INTR_STATUS(denali-flash_bank); + + return readl(denali-flash_reg + intr_status_reg); } -static void clear_interrupts(void) +static void clear_interrupts(struct denali_nand_info *denali) { - uint32_t status = 0; - status = read_interrupt_status(); - clear_interrupt(status); - denali.irq_status = 0; + uint32_t status; + + status = read_interrupt_status(denali); + clear_interrupt(denali, status); + + denali-irq_status = 0; } -static void denali_irq_enable(uint32_t int_mask) +static void denali_irq_enable(struct denali_nand_info *denali, + uint32_t int_mask) { int i; - for (i = 0; i denali.max_banks; ++i) - writel(int_mask, denali.flash_reg + INTR_EN(i)); + + for (i = 0; i denali-max_banks; ++i) + writel(int_mask, denali-flash_reg + INTR_EN(i)); } -static uint32_t wait_for_irq(uint32_t irq_mask) +static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) { unsigned long timeout = 100; uint32_t intr_status; do { - intr_status = read_interrupt_status() DENALI_IRQ_ALL; + intr_status = read_interrupt_status(denali) DENALI_IRQ_ALL; if (intr_status irq_mask) { - denali.irq_status = ~irq_mask; + denali-irq_status = ~irq_mask; /* our interrupt was detected */ break; } @@ -114,7 +129,7 @@ static uint32_t wait_for_irq(uint32_t irq_mask) if (timeout == 0) { /* timeout */ printf(Denali timeout with interrupt status %08x\n, - read_interrupt_status()); + read_interrupt_status(denali)); intr_status = 0; } return intr_status; @@ -126,80 +141,82 @@ static uint32_t wait_for_irq(uint32_t irq_mask) * of the command to the device memory followed by the data. This function
Re: [U-Boot] [PATCH v7] nand/denali: Adding Denali NAND driver support
Hi Chin, I found another fatal problem in v7. nand markbad command does not work at all. I think write_oob_data() is buggy. And I made nand bad command much faster. And other misc feedbacks. How about squashing http://patchwork.ozlabs.org/patch/340277/ http://patchwork.ozlabs.org/patch/340278/ to v7 and posting v8. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM:tegra20: Remove aes debug prints
In 6e7b9f4 some of the debug prints for AES code moved into the generic code, so we remove these additional calls. Signed-off-by: Tom Rini tr...@ti.com --- arch/arm/cpu/tegra20-common/crypto.c |9 - 1 file changed, 9 deletions(-) diff --git a/arch/arm/cpu/tegra20-common/crypto.c b/arch/arm/cpu/tegra20-common/crypto.c index b18e67c..1382425 100644 --- a/arch/arm/cpu/tegra20-common/crypto.c +++ b/arch/arm/cpu/tegra20-common/crypto.c @@ -62,14 +62,11 @@ static void sign_object(u8 *key, u8 *key_schedule, u8 *src, u8 *dst, tmp_data[i] = 0; aes_cbc_encrypt_blocks(key_schedule, tmp_data, left, 1); - debug_print_vector(AES(key, nonce), AES_KEY_LENGTH, left); left_shift_vector(left, k1, sizeof(left)); - debug_print_vector(L, AES_KEY_LENGTH, left); if ((left[0] 7) != 0) /* get MSB of L */ k1[AES_KEY_LENGTH-1] ^= AES_CMAC_CONST_RB; - debug_print_vector(K1, AES_KEY_LENGTH, k1); /* compute the AES-CMAC value */ for (i = 0; i num_aes_blocks; i++) { @@ -84,16 +81,11 @@ static void sign_object(u8 *key, u8 *key_schedule, u8 *src, u8 *dst, aes_encrypt(tmp_data, key_schedule, dst); debug(sign_obj: block %d of %d\n, i, num_aes_blocks); - debug_print_vector(AES-CMAC Src, AES_KEY_LENGTH, src); - debug_print_vector(AES-CMAC Xor, AES_KEY_LENGTH, tmp_data); - debug_print_vector(AES-CMAC Dst, AES_KEY_LENGTH, dst); /* Update pointers for next loop. */ cbc_chain_data = dst; src += AES_KEY_LENGTH; } - - debug_print_vector(AES-CMAC Hash, AES_KEY_LENGTH, dst); } /** @@ -112,7 +104,6 @@ static int encrypt_and_sign(u8 *key, enum security_op oper, u8 *src, u8 key_schedule[AES_EXPAND_KEY_LENGTH]; debug(encrypt_and_sign: length = %d\n, length); - debug_print_vector(AES key, AES_KEY_LENGTH, key); /* * The only need for a key is for signing/checksum purposes, so -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] FIT image AES support and PPC4xx/85xx boards
Hey guys, Adding AES256 support to FIT images means that a handful of boards (ion, MPC8572DS, others) now don't link because of growth in the binary. Can we come up with something to fix these boards again? Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cosmetic: README.scrapyard: sort in reverse chronological order
On Mon, Mar 31, 2014 at 12:57:17PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cosmetic: README.scrapyard: fix false removed date and commit
On Mon, Mar 31, 2014 at 12:58:54PM +0900, Masahiro Yamada wrote: Describe removed date in the form of -MM-DD, not -DD-MM. And wrong commit hash also should be fixed. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Marek Vasut ma...@denx.de Acked-by: Marek Vasut ma...@denx.de Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: esd: remove remainders of dead boards
On Mon, Mar 31, 2014 at 12:59:58PM +0900, Masahiro Yamada wrote: Commit 99bcad18 deleted ADCIOP and DASA_SIM board support but missed to delete board/esd/adciop and board/esd/dasa_sim. It also missed to add entries to doc/README.scrapyard. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Stefan Roese s...@denx.de Acked-by: Stefan Roese s...@denx.de Acked-by: Matthias Fuchs matthias.fu...@esd.eu Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] mtd: delete unused files
On Mon, Mar 31, 2014 at 01:01:09PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Scott Wood scottw...@freescale.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: evb64260: delete an unused source file
On Mon, Mar 31, 2014 at 01:05:58PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Wolfgang Denk w...@denx.de Cc: Nye Liu n...@zumanetworks.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] floppy: delete unused files
On Mon, Mar 31, 2014 at 01:02:51PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: samsung: delete unused source files
On Mon, Mar 31, 2014 at 01:05:28PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Mateusz Zalega m.zal...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Acked-by: Mateusz Zalega m.zal...@samsung.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: ppmc8260: delete an unused source file
On Mon, Mar 31, 2014 at 01:09:39PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Brad Kemp brad.k...@seranoa.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: altera: delete unused source files
On Mon, Mar 31, 2014 at 01:06:38PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Chin Liang See cl...@altera.com Cc: Dinh Nguyen dingu...@altera.com Cc: Scott McNutt smcn...@psyent.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: sandpoint: delete an unused source file
On Mon, Mar 31, 2014 at 01:10:11PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Wolfgang Denk w...@denx.de Cc: Jim Thompson j...@musenki.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: dave: delete unused source files
On Mon, Mar 31, 2014 at 01:14:12PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Andrea Marson andrea.mar...@dave-tech.it Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: Marvell: delete an unused source file
On Mon, Mar 31, 2014 at 01:12:12PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Lei Wen lei...@marvell.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: prodrive: delete unused source files
On Mon, Mar 31, 2014 at 01:12:52PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Stefan Roese s...@denx.de Acked-by: Stefan Roese s...@denx.de Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] board: hidden_dragon: remove an unused source file
On Mon, Mar 31, 2014 at 01:14:46PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Yusdi Santoso yusdi_sant...@adaptec.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] standalone: delete an unused source file
On Mon, Mar 31, 2014 at 01:11:43PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] kbuild: do not use $(BOARD) to specify exact object name
On Mon, Mar 31, 2014 at 01:30:18PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] kbuild: use boolean macros to select tegra*-common directory
On Mon, Mar 31, 2014 at 01:29:48PM +0900, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] am335x_evm: Drop SPI SPL support from the default build
On Thu, Apr 17, 2014 at 05:24:32PM -0400, Tom Rini wrote: This is only useful with the _spiboot build target anyhow, so only include it then. Drop CONFIG_SPL_OS_BOOT support then as the flash is small and didn't include a spot for the device tree already. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] boards.cfg: move more boards with invalid emails to Orphan
On Fri, Apr 04, 2014 at 03:37:14PM +0900, Masahiro Yamada wrote: Emails to the following addresses have been bouncing. - Nye Liu n...@zumanetworks.com - Jim Thompson j...@musenki.com - Brad Kemp brad.k...@seranoa.com Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] env_flash.c: Drop unused variables
On Thu, Apr 17, 2014 at 04:21:52PM -0400, Tom Rini wrote: With 7ce1526 we no longer need 'len' or 'res', so drop these variables. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] am43xx_evm: Drop SPI SPL
On Thu, Apr 17, 2014 at 05:40:41PM -0400, Tom Rini wrote: QSPI booting on this board does not use SPL, so drop SPI-SPL related options. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/3] OMAP3: support fake USB Ethernet MAC address for OMAP3 BeagleBoard-XM
On Fri, Mar 28, 2014 at 11:00:03AM -0500, Nishanth Menon wrote: BeagleBoard-XM unfortunately is plagued by lack of proper MAC address in USB resulting in custom uEnv.txt and risk of MAC address conflict in the network. NOTE: a) if user wants to manually set/override the mac address, then they can change the environment variable prior to 'usb start' b) If a new board file would like to create it's own version of this, the weak function can be overriden as well. c) There does not yet seem a need to create a generic fake ethernet MAC address logic, hence, not done pending such a need. Nishanth Menon (3): OMAP: common: consolidate fake USB ethernet MAC address creation omap3/sys_info: provide interface to read die id OMAP3: beagle-xm: generate fake USB ethernet MAC address from dieid Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/3 v2] ARM: OMAP: replace custom sr32() by standard I/O accessors
On Tue, Mar 25, 2014 at 02:49:47PM +0100, Wolfgang Denk wrote: This patch series replaces the custom bit manipulation function sr32() by standard I/O accessors. A major motivation for this cleanup was the fact that a number of calls of that function resulted in 32 bit wide shift operations on u32 data, which according to the C-ISO IEC-9899-Standard provokes undefined behaviour: 6.5.7 Bitwise shift operators ... If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined. The code was built-tested for all TI boards (using ./MAKEALL -v ti) without errors or warnings. Signed-off-by: Wolfgang Denk w...@denx.de Cc: Tom Rini tr...@ti.com Cc: Albert ARIBAUD albert.u.b...@aribaud.net Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 01/10] fw_env.c: Switch get_config to use '%ms' in sscanf
On Fri, Mar 28, 2014 at 12:03:33PM -0400, Tom Rini wrote: We currently limit ourself to 16 characters for the device name to read the environment from. This is insufficient for /dev/mmcblk0boot1 to work for example. Switch to '%ms' which gives us a dynamically allocated buffer instead. We're short lived enough to not bother free()ing the buffer. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 03/10] env_mmc.c: Remove NULL check on tmp_env1/2
On Fri, Mar 28, 2014 at 12:03:35PM -0400, Tom Rini wrote: With 452a272 we moved to allocating these variables on the stack. So they will never now be NULL so remove these checks. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 02/10] env_mmc.c: Allow environment to be used within SPL
On Fri, Mar 28, 2014 at 12:03:34PM -0400, Tom Rini wrote: Inside of SPL we only concern ourself with one MMC device, so instead of being able to use CONFIG_SYS_MMC_ENV_DEV we need to use 0 in SPL. Switch the code to use a 'dev' variable to facilitate this. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 04/10] mtd: Add a CONFIG_SPL_MTD_SUPPORT for a more full NAND subsystem in SPL
On Fri, Mar 28, 2014 at 12:03:36PM -0400, Tom Rini wrote: This mainly converts the am335x_spl_bch driver to the normal format which means a slight change to nand_info within the driver. Acked-by: Scott Wood scottw...@freescale.com Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 05/10] mtd: Build nand_util.o for CONFIG_ENV_IS_IN_NAND in SPL
On Fri, Mar 28, 2014 at 12:03:37PM -0400, Tom Rini wrote: Acked-by: Scott Wood scottw...@freescale.com Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 07/10] README: Add CONFIG_SPL_OS_BOOT to README
On Fri, Mar 28, 2014 at 12:03:39PM -0400, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 06/10] am335x_evm: Make SPL_OS also check the boot_os variable for falcon mode
On Fri, Mar 28, 2014 at 12:03:38PM -0400, Tom Rini wrote: We use the same variable as a3m071 in the environment to determine if we should boot into Linux or U-Boot. This is useful on boards like Beaglebone Black or AM335x GP EVM where we have persistent storage for the environment. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 09/10] a3m071: Make spl_start_uboot test like getenv_yesno does
On Fri, Mar 28, 2014 at 12:03:41PM -0400, Tom Rini wrote: This change makes the behaviour slightly more rebust and will match other implementations which can use getenv_yesno directly. Acked-by: Stefan Roese s...@denx.de Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 08/10] README.falcon: Document environment variables for falcon mode
On Fri, Mar 28, 2014 at 12:03:40PM -0400, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 1/3] TI: Add, use a DEFAULT_LINUX_BOOT_ENV environment string
On Fri, Mar 28, 2014 at 03:03:29PM -0400, Tom Rini wrote: To deal with a reoccurring problem properly we need to specify addresses for the Linux kernel, Flatted Device Tree and ramdisk that obey the constraints within the kernel's Documentation/arm/Booting file but also make sure that we relocate things within a valid address range. It is possible with these addresses to also set fdt_high and initrd_high to the value of 0x. We don't do this by default to allow for the most likely success of people using custom addresses however. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 10/10] spl_mmc/CONFIG_SPL_OS_BOOT: Allow environment to determine what to boot
On Fri, Mar 28, 2014 at 12:03:42PM -0400, Tom Rini wrote: We add two new environment variables, falcon_args_file and falcon_image_file, which when set will override the compiled in default values for falcon mode. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 3/3] am43xx_evm: Update the ramdisk args, we pass things in just fine via DT
On Fri, Mar 28, 2014 at 03:03:31PM -0400, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 1/5] TI:omap5: Move CONFIG_ENV_SIZE to board config files
On Thu, Apr 03, 2014 at 07:52:52AM -0400, Tom Rini wrote: The size of the environment depends on the backing store, move this to the board config files. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 2/3] am335x_evm: Update the ramdisk args, we pass things in just fine via DT
On Fri, Mar 28, 2014 at 03:03:30PM -0400, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/2] Add keystone network driver
On Tue, Apr 01, 2014 at 03:01:11PM -0400, Murali Karicheri wrote: This patch set add support for keystone network driver. Change history: v4 - replaced reg_rmw() with clrsetbits_le32() and similar for clr/set functions v3 - Review comments against the previous version except phylib support. I have responded to the original comment with issues that we see when we added support for phylib. If this initial version can go ASIS, please review and merge. We can address phylib support once the issues are discussed and a proper resolution is agreed on. v2/older (were part of Add support for keystone2 SoC and K2HK EVM series) - split network driver to navigator driver + ethernet driver Murali Karicheri (1): keystone2: net: add keystone ethernet driver Vitaly Andrianov (1): keystone2: add keystone multicore navigator driver Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v2,4/5] SPL:SPI: Add Falcon Mode support
On Thu, Apr 03, 2014 at 07:52:55AM -0400, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 5/5] dra7xx_evm: Add QSPI_4 support, qspiboot build target
On Thu, Apr 03, 2014 at 07:52:56AM -0400, Tom Rini wrote: We previously only supported QSPI_1 (single) support. Add QSPI_4 (quad) read support as well. This means we can be given one of two boot device values, but don't care which it is, so perform a fixup on the QSPI_4 value. We add a qspiboot build target to better show how you would use QSPI as a boot device in deployment. When we boot from QSPI, we can check the environment for 'boot_os' to control Falcon Mode. Signed-off-by: Sourav Poddar sourav.pod...@ti.com Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 2/5] TI:armv7: Change Falcon Mode DT load address
On Thu, Apr 03, 2014 at 07:52:53AM -0400, Tom Rini wrote: In general, we want to load the DT at base+128MB, so that we ahve sufficient room for the kernel and a larger device tree. In the case of OMAP3, use 64MB instead as we have a number of boards with 128MB DDR. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2, 3/5] spi: ti_qspi: Add delay for successful bulk erase.
On Thu, Apr 03, 2014 at 07:52:54AM -0400, Tom Rini wrote: From: Poddar, Sourav sourav.pod...@ti.com Bulk erase is not happening properly on dra7 due to erase timing constraints, add a delay so that erase timing constraints are properly met. Signed-off-by: Sourav Poddar sourav.pod...@ti.com Tested-by: Yebio Mesfin ymes...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 0/8] omap3: zoom1: long pending cleanups :(
On Tue, Apr 08, 2014 at 09:50:50AM -0500, Nishanth Menon wrote: V1: http://lists.denx.de/pipermail/u-boot/2014-April/176867.html changes since v1: - use ti_omap3_common config header - fix typo in commit message - drop fdt_high test log: http://hastebin.com/moqewevulu.xml Nishanth Menon (8): omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD OMAP3: zoom1: Configure GPMC for Ethernet OMAP3: zoom1: enable LAN9211 omap3: zoom1: enable common network commands omap3: zoom1: disable JFFS2 and enable FS_GENERIC omap3: zoom1: enable bootz omap3: zoom1: fix default console omap3: zoom1: switch to generic ti_omap3_common config header Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] am335x: Switch to CONFIG_SKIP_LOWLEVEL_INIT from guarding SPL or NOR_BOOT
On Wed, Apr 09, 2014 at 08:25:57AM -0400, Tom Rini wrote: In the case of SPL or NOR_BOOT (no SPL involved) we need to include certain code in the build. Use !CONFIG_SKIP_LOWLEVEL_INIT rather than CONFIG_SPL_BUILD || CONFIG_NOR_BOOT to make the code clearer, and to make supporting XIP QSPI boot clearer in the code. Signed-off-by: Tom Rini tr...@ti.com Reviewed-by: Wolfgang Denk w...@denx.de Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, 2/2] TI:omap3: Convert omap3_beagle to ti_omap3_common.h
On Thu, Apr 03, 2014 at 03:17:15PM -0400, Tom Rini wrote: Convert to using the common config files. This requires a little more flexibility in the common files than we had been using before. Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/2] TI:armv7: Switch to CONFIG_SYS_BOARD_GENERIC
On Thu, Apr 03, 2014 at 03:17:14PM -0400, Tom Rini wrote: Tested on AM335x GP EVM, AM335x EVM SK, Beaglebone White, Beaglebone Black, AM437xx GP EVM, OMAP5 uEVM, OMAP4 Pandaboard Signed-off-by: Tom Rini tr...@ti.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 0/9] Add support for keystone2 SoC and K2HK EVM
On Fri, Apr 04, 2014 at 01:16:46PM -0400, Murali Karicheri wrote: This patch set add support for Keystone2 SoC and K2HK EVM. Change history: v6 - Moved arch_timer.c to arch/arm/cpu/armv7 as per comments - Added Acked-By Heiko to patch #6 - Fixed some minor white space issues. v5 - Rebased to v2014.04-rc3 - Replaced reg_rmw() with clrsetbits_le32() - i2c Makefile update to add davinci_i2c sorted - simplified spi_cs_is_valid() in davinci_spi driver v4 - Added multibus support in i2c driver. Tested only on Keystone - Added comments to fdt patch v3 - Seperated network driver patches from the original series and and is now a different set as there are outstanding issues to be discussed and sorted out. Also the original series is ready for merge to upstream IMO. - Review comments incorporated. Following are the major comments addressed - Added KBUILD target for u-boot-spi.gph - Added bootup and flashing instructions in README - Cleaned up manually replacing #define tab with #define space - Cleaned up k2hk_evm.h include file to remove unnecessary options v2 - Review comments incorporated. Following are major comments addressed - split network driver to navigator driver + ethernet driver - replaced register base + offset implemenation with struct based register access implementation - Added Readme for NAND no subpage write option - re-use code for davinci i2c driver on keystone2 with updates - clock-k2hk.c merged to clock.c - currently keeping board specific getclk() command. See the thread for the rational. - Added update to davinci spi driver to re-use on keystone v1 - added separate patch for sorting tools/Makefile entries - reworked gpimage patch to allow more re-use across omapimage/gpimage - dropped patch related to ubifs file size - added keystone SoC and K2HK EVM support v0 - preparatory patch for keystone Murali Karicheri (5): tools: mkimage: add support for gpimage format NAND: DaVinci: allow forced disable of subpage writes i2c, davinci: move i2c_defs.h to the drivers/i2c directory spi: davinci: add support for multiple bus and chip select k2hk-evm: add configuration for spi1 and spi2 support Vitaly Andrianov (4): fdt: call ft_board_setup_ex() at the end of image_setup_libfdt() arm: add support for arch timer i2c, davinci: convert driver to new mutlibus/mutliadapter framework k2hk: add support for k2hk SOC and EVM Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2] powerpc: mpc8xx: delete an unused source file
On Tue, Apr 01, 2014 at 05:15:13PM +0900, Masahiro Yamada wrote: References to the wireless keyboard should also be removed from README.console. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Wolfgang Denk w...@denx.de Acked-by: Wolfgang Denk w...@denx.de Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-ti/master
Hey, The following changes since commit 1b82491ee6ee1e986e5521b33692a00e1f38fe75: board:tricorder: fixup SPL OOB layout (2014-04-11 10:08:42 -0400) are available in the git repository at: git://git.denx.de/u-boot-ti.git master for you to fetch changes up to 2e8f5dc16ad360cc15ea402a1dc4d421a04adbbd: am43xx_evm: Drop SPI SPL (2014-04-17 17:40:15 -0400) Karicheri, Muralidharan (6): tools: mkimage: add support for gpimage format NAND: DaVinci: allow forced disable of subpage writes i2c, davinci: move i2c_defs.h to the drivers/i2c directory spi: davinci: add support for multiple bus and chip select k2hk-evm: add configuration for spi1 and spi2 support keystone2: net: add keystone ethernet driver Manish Badarkhe (1): arm, da850: staticize funtions Nishanth Menon (11): OMAP: common: consolidate fake USB ethernet MAC address creation omap3/sys_info: provide interface to read die id OMAP3: beagle-xm: generate fake USB ethernet MAC address from dieid omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD OMAP3: zoom1: Configure GPMC for Ethernet OMAP3: zoom1: enable LAN9211 omap3: zoom1: enable common network commands omap3: zoom1: disable JFFS2 and enable FS_GENERIC omap3: zoom1: enable bootz omap3: zoom1: fix default console omap3: zoom1: switch to generic ti_omap3_common config header Poddar, Sourav (1): spi: ti_qspi: Add delay for successful bulk erase. Tom Rini (22): fw_env.c: Switch get_config to use '%ms' in sscanf env_mmc.c: Allow environment to be used within SPL env_mmc.c: Remove NULL check on tmp_env1/2 mtd: Add a CONFIG_SPL_MTD_SUPPORT for a more full NAND subsystem in SPL mtd: Build nand_util.o for CONFIG_ENV_IS_IN_NAND in SPL am335x_evm: Make SPL_OS also check the boot_os variable for falcon mode README: Add CONFIG_SPL_OS_BOOT to README README.falcon: Document environment variables for falcon mode a3m071: Make spl_start_uboot test like getenv_yesno does spl_mmc/CONFIG_SPL_OS_BOOT: Allow environment to determine what to boot TI: Add, use a DEFAULT_LINUX_BOOT_ENV environment string am335x_evm: Update the ramdisk args, we pass things in just fine via DT am43xx_evm: Update the ramdisk args, we pass things in just fine via DT TI:omap5: Move CONFIG_ENV_SIZE to board config files TI:armv7: Change Falcon Mode DT load address am335x_evm: Drop SPI SPL support from the default build SPL:SPI: Add Falcon Mode support dra7xx_evm: Add QSPI_4 support, qspiboot build target TI:armv7: Switch to CONFIG_SYS_BOARD_GENERIC TI:omap3: Convert omap3_beagle to ti_omap3_common.h am335x: Switch to CONFIG_SKIP_LOWLEVEL_INIT from guarding SPL or NOR_BOOT am43xx_evm: Drop SPI SPL Vitaly Andrianov (5): fdt: call ft_board_setup_ex() at the end of image_setup_libfdt() arm: add support for arch timer i2c, davinci: convert driver to new mutlibus/mutliadapter framework k2hk: add support for k2hk SOC and EVM keystone2: add keystone multicore navigator driver Wolfgang Denk (3): ARM: OMAP: remove sr32() from OMAP board code ARM: OMAP: hide custom bit manipulation function sr32() ARM: OMAP: replace custom sr32() by standard I/O accessors Makefile | 10 + README | 13 + arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|6 +- arch/arm/cpu/arm926ejs/davinci/dm355.c |2 +- arch/arm/cpu/arm926ejs/davinci/dm365.c |2 +- arch/arm/cpu/arm926ejs/davinci/dm644x.c|2 +- arch/arm/cpu/arm926ejs/davinci/dm646x.c|2 +- arch/arm/cpu/armv7/Makefile|1 + arch/arm/cpu/armv7/am33xx/board.c |4 +- arch/arm/cpu/armv7/am33xx/emif4.c |2 +- arch/arm/cpu/armv7/arch_timer.c| 58 ++ arch/arm/cpu/armv7/keystone/Makefile | 17 + arch/arm/cpu/armv7/keystone/aemif.c| 71 ++ arch/arm/cpu/armv7/keystone/clock.c| 318 + arch/arm/cpu/armv7/keystone/cmd_clock.c| 124 arch/arm/cpu/armv7/keystone/cmd_mon.c | 131 arch/arm/cpu/armv7/keystone/ddr3.c | 69 ++ arch/arm/cpu/armv7/keystone/init.c | 56 ++ arch/arm/cpu/armv7/keystone/keystone_nav.c | 376 ++ arch/arm/cpu/armv7/keystone/msmc.c | 68 ++ arch/arm/cpu/armv7/keystone/psc.c | 237 +++ arch/arm/cpu/armv7/keystone/spl.c | 45 ++ arch/arm/cpu/armv7/omap-common/boot-common.c | 11 + arch/arm/cpu/armv7/omap-common/utils.c | 21 + arch/arm/cpu/armv7/omap3/board.c |4 +-
Re: [U-Boot] arm, da850: staticize funtions
On Fri, Apr 11, 2014 at 08:02:04AM +0530, Manish Badarkhe wrote: Make funtions static which are locally used in file and remove the declaration from header file. Signed-off-by: Manish Badarkhe badarkhe.man...@gmail.com Applied to u-boot-ti/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/5] usb: handle NULL table in usb_gadget_get_string
From: Rob Herring r...@kernel.org Allow a NULL table to be passed to usb_gadget_get_string for cases when a string table may not be populated. Signed-off-by: Rob Herring r...@kernel.org Reviewed-by: Tom Rini tr...@ti.com Acked-by: Marek Vasut ma...@denx.de Acked-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/gadget/usbstring.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c index de5fa3f..8c3ff64 100644 --- a/drivers/usb/gadget/usbstring.c +++ b/drivers/usb/gadget/usbstring.c @@ -108,6 +108,9 @@ usb_gadget_get_string(struct usb_gadget_strings *table, int id, u8 *buf) struct usb_string *s; int len; + if (!table) + return -EINVAL; + /* descriptor 0 has the language id */ if (id == 0) { buf[0] = 4; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/5] image: add support for Android's boot image format
From: Sebastian Siewior bige...@linutronix.de This patch adds support for the Android boot-image format. The header file is from the Android project and got slightly alterted so the struct + its defines are not generic but have something like a namespace. The header file is from bootloader/legacy/include/boot/bootimg.h. The header parsing has been written from scratch and I looked at bootloader/legacy/usbloader/usbloader.c for some details. The image contains the physical address (load address) of the kernel and ramdisk. This address is considered only for the kernel image. The second image defined in the image header is currently not supported. I haven't found anything that is creating this. v3 (Rob Herring): This is based on http://patchwork.ozlabs.org/patch/126797/ with the following changes: - Rebased to current mainline - Moved android image handling to separate functions in common/image-android.c - s/u8/char/ in header to fix string function warnings - Use SPDX identifiers for licenses - Cleaned-up file source information: android_image.h is from file include/boot/bootimg.h in repository: https://android.googlesource.com/platform/bootable/bootloader/legacy The git commit hash is 4205b865141ff2e255fe1d3bd16de18e217ef06a usbloader.c would be from the same commit, but it does not appear to have been used for any actual code. v4: - s/andriod/android/ - Use a separate flag ep_found to track if the entry point has been set rather than using a magic value. Cc: Wolfgang Denk w...@denx.de Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de Signed-off-by: Rob Herring r...@kernel.org Reviewed-by: Tom Rini tr...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- common/Makefile | 1 + common/cmd_bootm.c | 23 +- common/image-android.c | 84 + common/image.c | 20 +--- include/android_image.h | 69 include/image.h | 13 6 files changed, 204 insertions(+), 6 deletions(-) create mode 100644 common/image-android.c create mode 100644 include/android_image.h diff --git a/common/Makefile b/common/Makefile index cecd81a..da208f3 100644 --- a/common/Makefile +++ b/common/Makefile @@ -236,6 +236,7 @@ obj-y += console.o obj-$(CONFIG_CROS_EC) += cros_ec.o obj-y += dlmalloc.o obj-y += image.o +obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o obj-$(CONFIG_OF_LIBFDT) += image-fdt.o obj-$(CONFIG_FIT) += image-fit.o obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 9751edc..3de876d 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -222,6 +222,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { const void *os_hdr; + bool ep_found = false; /* get kernel image header, start address and length */ os_hdr = boot_get_kernel(cmdtp, flag, argc, argv, @@ -274,6 +275,18 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc, } break; #endif +#ifdef CONFIG_ANDROID_BOOT_IMAGE + case IMAGE_FORMAT_ANDROID: + images.os.type = IH_TYPE_KERNEL; + images.os.comp = IH_COMP_NONE; + images.os.os = IH_OS_LINUX; + images.ep = images.os.load; + ep_found = true; + + images.os.end = android_image_get_end(os_hdr); + images.os.load = android_image_get_kload(os_hdr); + break; +#endif default: puts(ERROR: unknown image format type!\n); return 1; @@ -293,7 +306,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc, return 1; } #endif - } else { + } else if (!ep_found) { puts(Could not find kernel entry point!\n); return 1; } @@ -1002,6 +1015,14 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, images-fit_noffset_os = os_noffset; break; #endif +#ifdef CONFIG_ANDROID_BOOT_IMAGE + case IMAGE_FORMAT_ANDROID: + printf(## Booting Android Image at 0x%08lx ...\n, img_addr); + if (android_image_get_kernel((void *)img_addr, images-verify, +os_data, os_len)) + return NULL; + break; +#endif default: printf(Wrong Image Format for %s command\n, cmdtp-name); bootstage_error(BOOTSTAGE_ID_FIT_KERNEL_INFO); diff --git a/common/image-android.c b/common/image-android.c new file mode 100644 index 000..6ded7e2 --- /dev/null +++ b/common/image-android.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2011 Sebastian Andrzej Siewior bige...@linutronix.de + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include
[U-Boot] [PATCH v4 3/5] usb: musb: fill in usb_gadget_unregister_driver
From: Rob Herring r...@kernel.org Add missing missing disconnect and unbind calls to the musb gadget driver's usb_gadget_unregister_driver function. Otherwise, any gadget drivers fail to uninitialize and run a 2nd time. Signed-off-by: Rob Herring r...@kernel.org --- drivers/usb/musb-new/musb_uboot.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index 0512680..0d7b89f 100644 --- a/drivers/usb/musb-new/musb_uboot.c +++ b/drivers/usb/musb-new/musb_uboot.c @@ -204,7 +204,10 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) { - /* TODO: implement me */ + if (driver-disconnect) + driver-disconnect(gadget-g); + if (driver-unbind) + driver-unbind(gadget-g); return 0; } #endif /* CONFIG_MUSB_GADGET */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 4/5] usb/gadget: add the fastboot gadget
From: Sebastian Siewior bige...@linutronix.de This patch contains an implementation of the fastboot protocol on the device side and documentation. This is based on USB download gadget infrastructure. The fastboot function implements the getvar, reboot, download and reboot commands. What is missing is the flash handling i.e. writting the image to media. v3 (Rob Herring): This is based on http://patchwork.ozlabs.org/patch/126798/ with the following changes: - Rebase to current mainline and updates for current gadget API - Use SPDX identifiers for licenses - Traced the history and added missing copyright to cmd_fastboot.c - Use load_addr/load_size for transfer buffer - Allow vendor strings to be optional - Set vendor/product ID from config defines - Allow Ctrl-C to exit fastboot mode v4: - Major re-write to use the USB download gadget. Consolidated function code to a single file. - Moved globals into single struct. - Use puts and putc as appropriate. - Added CONFIG_USB_FASTBOOT_BUF_ADDR and CONFIG_USB_FASTBOOT_BUF_SIZE to set the fastboot transfer buffer. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de Signed-off-by: Rob Herring r...@kernel.org --- common/Makefile | 2 + common/cmd_fastboot.c| 36 +++ doc/README.android-fastboot | 91 ++ doc/README.android-fastboot-protocol | 170 drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/f_fastboot.c | 518 +++ drivers/usb/gadget/g_dnl.c | 6 + include/fastboot.h | 22 ++ 8 files changed, 846 insertions(+) create mode 100644 common/cmd_fastboot.c create mode 100644 doc/README.android-fastboot create mode 100644 doc/README.android-fastboot-protocol create mode 100644 drivers/usb/gadget/f_fastboot.c create mode 100644 include/fastboot.h diff --git a/common/Makefile b/common/Makefile index da208f3..fe1d8b9 100644 --- a/common/Makefile +++ b/common/Makefile @@ -167,6 +167,8 @@ obj-y += cmd_usb.o obj-y += usb.o usb_hub.o obj-$(CONFIG_USB_STORAGE) += usb_storage.o endif +obj-$(CONFIG_CMD_FASTBOOT) += cmd_fastboot.o + obj-$(CONFIG_CMD_USB_MASS_STORAGE) += cmd_usb_mass_storage.o obj-$(CONFIG_CMD_THOR_DOWNLOAD) += cmd_thordown.o obj-$(CONFIG_CMD_XIMG) += cmd_ximg.o diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c new file mode 100644 index 000..ce7e198 --- /dev/null +++ b/common/cmd_fastboot.c @@ -0,0 +1,36 @@ +/* + * Copyright 2008 - 2009 Windriver, www.windriver.com + * Author: Tom Rix tom@windriver.com + * + * (C) Copyright 2014 Linaro, Ltd. + * Rob Herring r...@kernel.org + * + * SPDX-License-Identifier:GPL-2.0+ + */ +#include common.h +#include command.h +#include g_dnl.h + +static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + int ret; + + ret = g_dnl_register(fastboot); + if (ret) + return ret; + + while (1) { + if (ctrlc()) + break; + usb_gadget_handle_interrupts(); + } + + g_dnl_unregister(); + return CMD_RET_SUCCESS; +} + +U_BOOT_CMD( + fastboot, 1, 1, do_fastboot, + fastboot - enter USB Fastboot protocol, + +); diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot new file mode 100644 index 000..f1d128c --- /dev/null +++ b/doc/README.android-fastboot @@ -0,0 +1,91 @@ +Android Fastboot + + +Overview + +The protocol that is used over USB is described in +README.android-fastboot-protocol in same directory. + +The current implementation does not yet support the flash and erase +commands. + +Client installation +=== +The counterpart to this gadget is the fastboot client which can +be found in Android's platform/system/core repository in the fastboot +folder. It runs on Windows, Linux and even OSX. Linux user are lucky since +they only need libusb. +Windows users need to bring some time until they have Android SDK (currently +http://dl.google.com/android/installer_r12-windows.exe) installed. You +need to install ADB package which contains the required glue libraries for +accessing USB. Also you need Google USB driver package and SDK platform +tools. Once installed the usb driver is placed in your SDK folder under +extras\google\usb_driver. The android_winusb.inf needs a line like + + %SingleBootLoaderInterface% = USB_Install, USB\VID_0451PID_D022 + +either in the [Google.NTx86] section for 32bit Windows or [Google.NTamd64] +for 64bit Windows. VID and PID should match whatever the fastboot is +advertising. + +Board specific +== +The fastboot gadget relies on the USB download gadget, so the following +options must be configured: + +CONFIG_USBDOWNLOAD_GADGET +CONFIG_G_DNL_VENDOR_NUM +CONFIG_G_DNL_PRODUCT_NUM +CONFIG_G_DNL_MANUFACTURER + +The fastboot function is enabled by defining CONFIG_CMD_FASTBOOT and
[U-Boot] [PATCH v4 0/5] Android Fastboot support
From: Rob Herring r...@kernel.org This is the 2nd version since I revived the fastboot patches Sebastian submitted. I'm reviving the Android Fastboot support after 2+ years since the last posting[1]. The previous postings had some questions about licensing and source of some code. I believe I've traced the history sufficiently that the copyrights and source information are complete and correct. The Android code used or referenced is BSD 2-clause license. This was originally raised by Wolfgang that it was not compatible with GPLv2+. I believe that has since been demonstrated and agreed that the BSD 2-clause license is compatible with u-boot. As far as the history of the code, I have traced that back. The u-boot code started in 2008/2009 by Tom Rix @ Windriver. This initial support was then adopted and extended by TI (eMMC support primarily, not included here) in their OMAP u-boot tree[2]. In 2011, the TI code was used as a basis for upstream patches by Sebastian Siewior @ Linutronix. The code has been rearranged quite a bit since the original, but the content is pretty much the same. Some of the re-arranging left stale or missing copyrights in the v2 version which I have corrected. I've redone the fastboot code significantly to use the USB download gadget composite driver. With this, I've consolidated the fastboot function into a single file. I believe I've addressed all the review comments, but many don't apply with the re-write. I dropped the patch adding a loadsize env variable and added config uptions instead to set the fastboot buffer size. I've tested this series on a BeagleBoard. Rob [1] http://lists.denx.de/pipermail/u-boot/2011-November/110557.html [2] http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=601ff71c8d46b5e90e13613974a16d10f2006bb3 Rob Herring (3): usb: handle NULL table in usb_gadget_get_string usb: musb: fill in usb_gadget_unregister_driver arm: beagle: enable Android fastboot support Sebastian Siewior (2): image: add support for Android's boot image format usb/gadget: add the fastboot gadget common/Makefile | 3 + common/cmd_bootm.c | 23 +- common/cmd_fastboot.c| 36 +++ common/image-android.c | 84 ++ common/image.c | 20 +- doc/README.android-fastboot | 91 ++ doc/README.android-fastboot-protocol | 170 drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/f_fastboot.c | 518 +++ drivers/usb/gadget/g_dnl.c | 6 + drivers/usb/gadget/usbstring.c | 3 + drivers/usb/musb-new/musb_uboot.c| 5 +- include/android_image.h | 69 + include/configs/omap3_beagle.h | 10 + include/fastboot.h | 22 ++ include/image.h | 13 + 16 files changed, 1067 insertions(+), 7 deletions(-) create mode 100644 common/cmd_fastboot.c create mode 100644 common/image-android.c create mode 100644 doc/README.android-fastboot create mode 100644 doc/README.android-fastboot-protocol create mode 100644 drivers/usb/gadget/f_fastboot.c create mode 100644 include/android_image.h create mode 100644 include/fastboot.h -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 5/5] arm: beagle: enable Android fastboot support
From: Rob Herring r...@kernel.org Enable Android Fastboot support on omap3_beagle board. Signed-off-by: Rob Herring r...@kernel.org --- include/configs/omap3_beagle.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 0b57421..be39b7c 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -110,6 +110,16 @@ #define CONFIG_TWL4030_USB 1 #define CONFIG_USB_ETHER #define CONFIG_USB_ETHER_RNDIS +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_VBUS_DRAW0 +#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_G_DNL_VENDOR_NUM0x0451 +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022 +#define CONFIG_G_DNL_MANUFACTURER TI +#define CONFIG_CMD_FASTBOOT +#define CONFIG_ANDROID_BOOT_IMAGE +#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x0700 /* USB EHCI */ #define CONFIG_CMD_USB -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] am33xx: add SSC enable macro
On Thu, Apr 17, 2014 at 8:31 PM, Tom Rini tr...@ti.com wrote: On Thu, Apr 10, 2014 at 11:35:25AM +0200, yegorsli...@googlemail.com wrote: From: Yegor Yefremov yegorsli...@googlemail.com Signed-off-by: Yegor Yefremov yegorsli...@googlemail.com --- arch/arm/include/asm/arch-am33xx/clock.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-am33xx/clock.h b/arch/arm/include/asm/arch-am33xx/clock.h index 7637457..f00fad3 100644 --- a/arch/arm/include/asm/arch-am33xx/clock.h +++ b/arch/arm/include/asm/arch-am33xx/clock.h @@ -42,6 +42,8 @@ #define MODULE_CLKCTRL_IDLEST_DISABLED 3 /* CM_CLKMODE_DPLL */ +#define CM_CLKMODE_DPLL_SSC_EN_SHIFT 12 +#define CM_CLKMODE_DPLL_SSC_EN_MASK (1 12) #define CM_CLKMODE_DPLL_REGM4XEN_SHIFT 11 #define CM_CLKMODE_DPLL_REGM4XEN_MASK(1 11) #define CM_CLKMODE_DPLL_LPMODE_EN_SHIFT 10 OK, but what's going to use this? Thanks! First of all me and Siemens folks. See http://git.denx.de/?p=u-boot.git;a=blob;f=board/siemens/rut/board.c;h=e0ada3f6a5fa6edaabb29e5c87c62582f7ee7ea7;hb=HEAD conf_disp_pll(). I'll send v2 with modified board.c file. Yegor ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] usb: r8a66597: Fix initilization size of r8a66597 info structure
On Friday, April 18, 2014 at 04:33:15 AM, Yasuhisa Umano wrote: Initialization of r8a66597 info structure is not enough. Because initilization was used size of pointer. This fixes that use size of r8a6659 info structure. Signed-off-by: Yasuhisa Umano yasuhisa.umano...@renesas.com It's in u-boot-usb/master , please double-check if all is correct there. Thanks! 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 2/2] usb: r8a66597: Fix initilization size of r8a66597 info, structure
On Friday, April 18, 2014 at 04:26:29 AM, Yasuhisa Umano wrote: Hi, Thanks for your comment. (2014/04/17 23:09), Marek Vasut wrote: On Thursday, April 17, 2014 at 10:20:29 AM, yasuhisa umano wrote: Initialization of r8a66597 info structure is not enough. Because initilization was used size of pointer. This fixes that use size of r8a6659 info structure. Signed-off-by: Yasuhisa Umano yasuhisa.umano...@renesas.com --- drivers/usb/host/r8a66597-hcd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index c58d2a9..8e82212 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -807,7 +807,7 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) R8A66597_DPRINT(%s\n, __func__); - memset(r8a66597, 0, sizeof(r8a66597)); + memset(r8a66597, 0, sizeof(struct r8a66597)); Let's use sizeof(*r8a66597) instead . This is more scalable as you won't need to adjust this code when you change the data type of the *r8a66597 pointer, I will adjust that and apply with sizeof(*r8a66597); , does that work for you? Indeed. I will check your point and resend updated patch. I pushed the fixed version and it's in u-boot-usb/master . Base subsequent patches on that please . 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] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
On Friday, April 18, 2014 at 04:25:41 AM, Yasuhisa Umano wrote: Hi, Thanks for your comment. (2014/04/17 23:07), Marek Vasut wrote: On Thursday, April 17, 2014 at 09:48:32 AM, yasuhisa umano wrote: This driver is processed as two USB hub despite one. The number of root hub is defined in R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition of R8A66597_MAX_ROOT_HUB. Signed-off-by: Yasuhisa Umano yasuhisa.umano...@renesas.com --- drivers/usb/host/r8a66597-hcd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index dfe5423..c58d2a9 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -164,8 +164,8 @@ static int enable_controller(struct r8a66597 *r8a66597) r8a66597_bset(r8a66597, INTL, SOFCFG); r8a66597_write(r8a66597, 0, INTENB0); - r8a66597_write(r8a66597, 0, INTENB1); - r8a66597_write(r8a66597, 0, INTENB2); + for (port = 0; port R8A66597_MAX_ROOT_HUB; port++) + r8a66597_write(r8a66597, 0, get_intenb_reg(port)); Hmm, looking at get_intenb_reg(), this is slightly dangerous, but I will trust you you know what you are doing . I am a bit worried someone might set R8A66597_MAX_ROOT_HUB to value 2 and will wonder why doesn't it work. I understood your point. Certainly, current device drivers support only the initialization of 1 or 2 interrupt for hub. If this driver has a hub of more future, I will send the patch. Thanks 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] am33xx: add SSC enable macro
On Fri, Apr 18, 2014 at 04:29:41PM +0200, Yegor Yefremov wrote: On Thu, Apr 17, 2014 at 8:31 PM, Tom Rini tr...@ti.com wrote: On Thu, Apr 10, 2014 at 11:35:25AM +0200, yegorsli...@googlemail.com wrote: From: Yegor Yefremov yegorsli...@googlemail.com Signed-off-by: Yegor Yefremov yegorsli...@googlemail.com --- arch/arm/include/asm/arch-am33xx/clock.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-am33xx/clock.h b/arch/arm/include/asm/arch-am33xx/clock.h index 7637457..f00fad3 100644 --- a/arch/arm/include/asm/arch-am33xx/clock.h +++ b/arch/arm/include/asm/arch-am33xx/clock.h @@ -42,6 +42,8 @@ #define MODULE_CLKCTRL_IDLEST_DISABLED 3 /* CM_CLKMODE_DPLL */ +#define CM_CLKMODE_DPLL_SSC_EN_SHIFT 12 +#define CM_CLKMODE_DPLL_SSC_EN_MASK (1 12) #define CM_CLKMODE_DPLL_REGM4XEN_SHIFT 11 #define CM_CLKMODE_DPLL_REGM4XEN_MASK(1 11) #define CM_CLKMODE_DPLL_LPMODE_EN_SHIFT 10 OK, but what's going to use this? Thanks! First of all me and Siemens folks. See http://git.denx.de/?p=u-boot.git;a=blob;f=board/siemens/rut/board.c;h=e0ada3f6a5fa6edaabb29e5c87c62582f7ee7ea7;hb=HEAD conf_disp_pll(). I'll send v2 with modified board.c file. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot