Re: [U-Boot] Quick guide to Kconfig
Hi everyone, can you please give me a hint how to run the menuconfig? I just downloaded the latest U-Boot from ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 (Version: 2014.07). When entering the /u-boot-2014.07/ directory and hitting make menuconfig then, it just tells me that there's no rule to make menuconfig - and so I can't run the configuration tool. Am I in the wrong directory or is it the wrong version? Regards Frank Masahiro Yamada yamad...@jp.panasonic.com 31.07.14 6.53 Uhr Hi all, The mainline has switched to Kconfig. Please make sure to use make board_defconfig instead of make board_config. [1] Board Configuration make board_name_defconfig [2] Modify configuration make config, make menuconfig, make nconfig, ... etc. For SPL, make spl/config, make spl/menuconfig, make spl/nconfig, ... etc. For TPL, make tpl/config, make tpl/menuconfig, make tpl/nconfig, ... etc. But there are no useful configurations in Kconfig for now. [3] boards.cfg We no longer have boards.cfg maintained in the git-repo. But this file is necessary for MAKEALL and buildman. Perhaps it may also be useful for browsing the list of the supported boards. You can generate an equivalent one by running tools/genboardscfg.py. [4] MAKEALL and buildman They depend on the boards.cfg file. MAKEALL and buildman automatically generate boards.cfg if it does not exist. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: DRA7: Enable software leveling for dra7
From: Sricharan R r.sricha...@ti.com Currently hw leveling is enabled by default on DRA7/72. But the hardware team suggested to use sw leveling as hw leveling is not characterized and seen some test case failures. So enabling sw leveling on all DRA7 platforms. Signed-off-by: Sricharan R r.sricha...@ti.com Signed-off-by: Lokesh Vutla lokeshvu...@ti.com --- arch/arm/cpu/armv7/omap-common/emif-common.c | 38 +- arch/arm/cpu/armv7/omap5/hw_data.c | 2 +- arch/arm/cpu/armv7/omap5/sdram.c | 60 ++-- 3 files changed, 32 insertions(+), 68 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/emif-common.c b/arch/arm/cpu/armv7/omap-common/emif-common.c index 71c0cc8..c8e9bc8 100644 --- a/arch/arm/cpu/armv7/omap-common/emif-common.c +++ b/arch/arm/cpu/armv7/omap-common/emif-common.c @@ -242,46 +242,10 @@ static void omap5_ddr3_leveling(u32 base, const struct emif_regs *regs) __udelay(130); } -static void dra7_ddr3_leveling(u32 base, const struct emif_regs *regs) -{ - struct emif_reg_struct *emif = (struct emif_reg_struct *)base; - - u32 fifo_reg; - - fifo_reg = readl(emif-emif_ddr_fifo_misaligned_clear_1); - writel(fifo_reg | 0x0100, - emif-emif_ddr_fifo_misaligned_clear_1); - - fifo_reg = readl(emif-emif_ddr_fifo_misaligned_clear_2); - writel(fifo_reg | 0x0100, - emif-emif_ddr_fifo_misaligned_clear_2); - - /* Launch Full leveling */ - writel(DDR3_FULL_LVL, emif-emif_rd_wr_lvl_ctl); - - /* Wait till full leveling is complete */ - readl(emif-emif_rd_wr_lvl_ctl); - __udelay(130); - - /* Read data eye leveling no of samples */ - config_data_eye_leveling_samples(base); - - /* -* Disable leveling. This is because if leveling is kept -* enabled, then PHY triggers a false leveling during -* EMIF-idle scenario which results in wrong delay -* values getting updated. After this the EMIF becomes -* unaccessible. So disable it after the first time -*/ - writel(0x0, emif-emif_rd_wr_lvl_rmp_ctl); -} - static void ddr3_leveling(u32 base, const struct emif_regs *regs) { if (is_omap54xx()) omap5_ddr3_leveling(base, regs); - else - dra7_ddr3_leveling(base, regs); } static void ddr3_init(u32 base, const struct emif_regs *regs) @@ -1383,7 +1347,7 @@ void sdram_init(void) } if (sdram_type == EMIF_SDRAM_TYPE_DDR3 - (!in_sdram !warm_reset())) { + (!in_sdram !warm_reset()) (!is_dra7xx())) { if (emif1_enabled) do_bug0039_workaround(EMIF1_BASE); if (emif2_enabled) diff --git a/arch/arm/cpu/armv7/omap5/hw_data.c b/arch/arm/cpu/armv7/omap5/hw_data.c index 4baca11..ed89f85 100644 --- a/arch/arm/cpu/armv7/omap5/hw_data.c +++ b/arch/arm/cpu/armv7/omap5/hw_data.c @@ -556,7 +556,7 @@ const struct ctrl_ioregs ioregs_dra7xx_es1 = { .ctrl_ddrio_1 = 0x84210840, .ctrl_ddrio_2 = 0x8421, .ctrl_emif_sdram_config_ext = 0x0001C1A7, - .ctrl_emif_sdram_config_ext_final = 0x000101A7, + .ctrl_emif_sdram_config_ext_final = 0x0001C1A7, .ctrl_ddr_ctrl_ext_0 = 0xA200, }; diff --git a/arch/arm/cpu/armv7/omap5/sdram.c b/arch/arm/cpu/armv7/omap5/sdram.c index e2ebab8..9105121 100644 --- a/arch/arm/cpu/armv7/omap5/sdram.c +++ b/arch/arm/cpu/armv7/omap5/sdram.c @@ -145,18 +145,18 @@ const struct emif_regs emif_1_regs_ddr3_532_mhz_1cs_dra_es1 = { .sdram_tim1 = 0xCCCF36B3, .sdram_tim2 = 0x308F7FDA, .sdram_tim3 = 0x027F88A8, - .read_idle_ctrl = 0x0005, + .read_idle_ctrl = 0x00050001, .zq_config = 0x0007190B, .temp_alert_config = 0x, - .emif_ddr_phy_ctlr_1_init = 0x0024400A, - .emif_ddr_phy_ctlr_1= 0x0024400A, + .emif_ddr_phy_ctlr_1_init = 0x0E24400A, + .emif_ddr_phy_ctlr_1= 0x0E24400A, .emif_ddr_ext_phy_ctrl_1= 0x10040100, - .emif_ddr_ext_phy_ctrl_2= 0x00B000B0, - .emif_ddr_ext_phy_ctrl_3= 0x00B000B0, - .emif_ddr_ext_phy_ctrl_4= 0x00B000B0, - .emif_ddr_ext_phy_ctrl_5= 0x00B000B0, + .emif_ddr_ext_phy_ctrl_2= 0x00BB00BB, + .emif_ddr_ext_phy_ctrl_3= 0x00BB00BB, + .emif_ddr_ext_phy_ctrl_4= 0x00BB00BB, + .emif_ddr_ext_phy_ctrl_5= 0x00BB00BB, .emif_rd_wr_lvl_rmp_win = 0x, - .emif_rd_wr_lvl_rmp_ctl = 0x8000, + .emif_rd_wr_lvl_rmp_ctl = 0x, .emif_rd_wr_lvl_ctl = 0x, .emif_rd_wr_exec_thresh = 0x0305 }; @@ -169,18 +169,18 @@ const struct
Re: [U-Boot] Quick guide to Kconfig
Hi Frank, On Thu, 31 Jul 2014 08:29:07 +0200 Frank Ihle frank.i...@hs-offenburg.de wrote: Hi everyone, can you please give me a hint how to run the menuconfig? I just downloaded the latest U-Boot from ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 (Version: 2014.07). When entering the /u-boot-2014.07/ directory and hitting make menuconfig then, it just tells me that there's no rule to make menuconfig - and so I can't run the configuration tool. Am I in the wrong directory or is it the wrong version? Kconfig is not included in u-boot-latest.tar.bz2 (Version: 2014.07); Kconfig was merged into the mainline just ten hours ago! If you want to try the newest source tree, please do git-clone. git clone git://git.denx.de/u-boot.git Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] MMC: atmel: enable the features supported by MCI
This patch series enable the features supported by the MCI which not enabled before. For example: high speed mode without this patch: U-Boot fatload mmc 0 0x2000 uimage reading uimage 3973216 bytes read in 392 ms (9.7 MiB/s) with this patch U-Boot fatload mmc 0 0x2000 uimage reading uimage 3973216 bytes read in 275 ms (13.8 MiB/s) It near 50% performance improvement. Bo Shen (3): MMC: atmel_mci: refactor setting the mode register MMC: atmel_mci: add configuration register definition MMC: atmel_mci: enable high speed mode support drivers/mmc/gen_atmel_mci.c | 63 ++--- include/atmel_mci.h | 18 - 2 files changed, 65 insertions(+), 16 deletions(-) -- 1.8.5.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] MMC: atmel_mci: refactor setting the mode register
The mode register is different between MCI IP version. So, according to MCI IP version to set the mode register. Signed-off-by: Bo Shen voice.s...@atmel.com --- drivers/mmc/gen_atmel_mci.c | 56 + include/atmel_mci.h | 4 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index a57a9b1..8778a4d 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -58,30 +58,58 @@ static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen) atmel_mci_t *mci = mmc-priv; u32 bus_hz = get_mci_clk_rate(); u32 clkdiv = 255; + unsigned int version = atmel_mci_get_version(mci); + u32 clkodd = 0; + u32 mr; debug(mci: bus_hz is %u, setting clock %u Hz, block size %u\n, bus_hz, hz, blklen); if (hz 0) { - /* find lowest clkdiv yielding a rate = than requested */ - for (clkdiv=0; clkdiv255; clkdiv++) { - if ((bus_hz / (clkdiv+1) / 2) = hz) - break; + if (version = 0x500) { + clkdiv = DIV_ROUND_UP(bus_hz, hz) - 2; + if (clkdiv 511) + clkdiv = 511; + + clkodd = clkdiv 1; + clkdiv = 1; + + printf(mci: setting clock %u Hz, block size %u\n, + bus_hz / (clkdiv * 2 + clkodd + 2), blklen); + } else { + /* find clkdiv yielding a rate = than requested */ + for (clkdiv = 0; clkdiv 255; clkdiv++) { + if ((bus_hz / (clkdiv + 1) / 2) = hz) + break; + } + printf(mci: setting clock %u Hz, block size %u\n, + (bus_hz / (clkdiv + 1)) / 2, blklen); + } } - printf(mci: setting clock %u Hz, block size %u\n, - (bus_hz / (clkdiv+1)) / 2, blklen); blklen = 0xfffc; - /* On some platforms RDPROOF and WRPROOF are ignored */ - writel((MMCI_BF(CLKDIV, clkdiv) -| MMCI_BF(BLKLEN, blklen) -| MMCI_BIT(RDPROOF) -| MMCI_BIT(WRPROOF)), mci-mr); + + mr = MMCI_BF(CLKDIV, clkdiv); + + /* MCI IP version = 0x200 has R/WPROOF */ + if (version = 0x200) + mr |= MMCI_BIT(RDPROOF) | MMCI_BIT(WRPROOF); + /* -* On some new platforms BLKLEN in mci-mr is ignored. -* Should use the BLKLEN in the block register. +* MCI IP version = 0x500 use bit 16 as clkodd. +* MCI IP version 0x500 use upper 16 bits for blklen. */ - writel(MMCI_BF(BLKLEN, blklen), mci-blkr); + if (version = 0x500) + mr |= MMCI_BF(CLKODD, clkodd); + else + mr |= MMCI_BF(BLKLEN, blklen); + + writel(mr, mci-mr); + + /* MCI IP version = 0x200 has blkr */ + if (version = 0x200) + writel(MMCI_BF(BLKLEN, blklen), mci-blkr); + initialized = 1; } diff --git a/include/atmel_mci.h b/include/atmel_mci.h index 090574d..3d2870f 100644 --- a/include/atmel_mci.h +++ b/include/atmel_mci.h @@ -67,6 +67,10 @@ typedef struct atmel_mci { #define MMCI_PDCPADV_SIZE 1 #define MMCI_PDCMODE_OFFSET15 #define MMCI_PDCMODE_SIZE 1 +/* MCI IP version = 0x500, MR bit 16 used for CLKODD */ +#define MMCI_CLKODD_OFFSET 16 +#define MMCI_CLKODD_SIZE 1 +/* MCI IP version 0x200, MR higher 16bits for BLKLEN */ #define MMCI_BLKLEN_OFFSET 16 #define MMCI_BLKLEN_SIZE 16 -- 1.8.5.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] MMC: atmel_mci: add configuration register definition
Add configuration register definition, this register only exists on MCI IP version = 0x300. Signed-off-by: Bo Shen voice.s...@atmel.com --- include/atmel_mci.h | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/atmel_mci.h b/include/atmel_mci.h index 3d2870f..de24148 100644 --- a/include/atmel_mci.h +++ b/include/atmel_mci.h @@ -36,7 +36,9 @@ typedef struct atmel_mci { u32 ier;/* 0x44 */ u32 idr;/* 0x48 */ u32 imr;/* 0x4c */ - u32 reserved[43]; + u32 dma;/* 0x50 */ + u32 cfg;/* 0x54 */ + u32 reserved[41]; u32 version; } atmel_mci_t; @@ -189,6 +191,16 @@ typedef struct atmel_mci { #define MMCI_TRTYP_MULTI_BLOCK 1 #define MMCI_TRTYP_STREAM 2 +/* Bitfields in CFG */ +#define MMCI_FIFOMODE_OFFSET 0 +#define MMCI_FIFOMODE_SIZE 1 +#define MMCI_FERRCTRL_OFFSET 4 +#define MMCI_FERRCTRL_SIZE 1 +#define MMCI_HSMODE_OFFSET 8 +#define MMCI_HSMODE_SIZE 1 +#define MMCI_LSYNC_OFFSET 12 +#define MMCI_LSYNC_SIZE1 + /* Bit manipulation macros */ #define MMCI_BIT(name) \ (1 MMCI_##name##_OFFSET) -- 1.8.5.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] MMC: atmel_mci: enable high speed mode support
If the MCI IP version = 0x300, it supports hight speed mode option, this patch enable it. Signed-off-by: Bo Shen voice.s...@atmel.com --- drivers/mmc/gen_atmel_mci.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index 8778a4d..45bcffb 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -110,6 +110,9 @@ static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen) if (version = 0x200) writel(MMCI_BF(BLKLEN, blklen), mci-blkr); + if (mmc-card_caps mmc-cfg-host_caps MMC_MODE_HS) + writel(MMCI_BIT(HSMODE), mci-cfg); + initialized = 1; } @@ -404,8 +407,10 @@ int atmel_mci_init(void *regs) /* need to be able to pass these in on a board by board basis */ cfg-voltages = MMC_VDD_32_33 | MMC_VDD_33_34; version = atmel_mci_get_version(mci); - if ((version 0xf00) = 0x300) + if ((version 0xf00) = 0x300) { cfg-host_caps = MMC_MODE_8BIT; + cfg-host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz; + } cfg-host_caps |= MMC_MODE_4BIT; -- 1.8.5.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Quick guide to Kconfig
Hi Masahiro, thanks! it's running nicely. I see you're running the GUI with lxdialog, and it's nice to see that more and more build systems come together to one base, which makes it much easier for further developing. I've just started using it on our project too, but the integration is a pretty tenacious job, as you might know. I would much appreciate it, if you could share any information like tutorials or documentation for a better adaptation of the lxdialog, if that's alright. Because, if we are using U-Boots menuconfig, then we'd like to add extra rows with information on our own. Kind Regards Frank Masahiro Yamada yamad...@jp.panasonic.com 31.07.14 8.39 Uhr Hi Frank, On Thu, 31 Jul 2014 08:29:07 +0200 Frank Ihle frank.i...@hs-offenburg.de wrote: Hi everyone, can you please give me a hint how to run the menuconfig? I just downloaded the latest U-Boot from ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 (Version: 2014.07). When entering the /u-boot-2014.07/ directory and hitting make menuconfig then, it just tells me that there's no rule to make menuconfig - and so I can't run the configuration tool. Am I in the wrong directory or is it the wrong version? Kconfig is not included in u-boot-latest.tar.bz2 (Version: 2014.07); Kconfig was merged into the mainline just ten hours ago! If you want to try the newest source tree, please do git-clone. git clone git://git.denx.de/u-boot.git Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-sunxi.git/master
On Thu, 2014-07-31 at 13:30 +0900, Masahiro Yamada wrote: Hi Tom, Albert, Hans, I am afraid we are going to be in trouble with this pre-Kconfig based PR because it includes various new boards. Yeah, I was wondering how this would work! (We can fix the merge conflict, but it is not trivial.) How this is going to work? Perhaps should we discard unmerged PRs and get all the subsystem repos synchronized with u-boot/master ? Or shall we break these boards once and fix them in a follow-up patch ? Can you point us to the conversion script please? (I say us/we here but I'm actually about to get on a plain and be AFK for several days, so I guess I mean Hans ;-)) With that script we could rebase onto the current branch base running the script at every step (including a new artificial step right before the top of the branch to pickup all the other boards) and commit --amend any new defconfigs which are produced. Then rebase the result of that onto the current master, ignoring conflicts in boards.cfg (i.e. just deleting it each time). The result should be a rebased tree where all the changes to boards.cfg are instead replicated in the appropriate defconfig. Does that sound workable? Ian. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-sunxi.git/master
Hi, On 07/31/2014 09:54 AM, Ian Campbell wrote: On Thu, 2014-07-31 at 13:30 +0900, Masahiro Yamada wrote: Hi Tom, Albert, Hans, I am afraid we are going to be in trouble with this pre-Kconfig based PR because it includes various new boards. Yeah, I was wondering how this would work! (We can fix the merge conflict, but it is not trivial.) How this is going to work? Perhaps should we discard unmerged PRs and get all the subsystem repos synchronized with u-boot/master ? Or shall we break these boards once and fix them in a follow-up patch ? Can you point us to the conversion script please? (I say us/we here but I'm actually about to get on a plain and be AFK for several days, so I guess I mean Hans ;-)) With that script we could rebase onto the current branch base running the script at every step (including a new artificial step right before the top of the branch to pickup all the other boards) and commit --amend any new defconfigs which are produced. Then rebase the result of that onto the current master, ignoring conflicts in boards.cfg (i.e. just deleting it each time). The result should be a rebased tree where all the changes to boards.cfg are instead replicated in the appropriate defconfig. Does that sound workable? That sounds workable to me. I can try to get that done this weekend, and then send a new PR rebased on current master. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-sunxi.git/master
Hi Ian, Hans, On Thu, 31 Jul 2014 08:54:09 +0100 Ian Campbell i...@hellion.org.uk wrote: On Thu, 2014-07-31 at 13:30 +0900, Masahiro Yamada wrote: Hi Tom, Albert, Hans, I am afraid we are going to be in trouble with this pre-Kconfig based PR because it includes various new boards. Yeah, I was wondering how this would work! (We can fix the merge conflict, but it is not trivial.) How this is going to work? Perhaps should we discard unmerged PRs and get all the subsystem repos synchronized with u-boot/master ? Or shall we break these boards once and fix them in a follow-up patch ? Can you point us to the conversion script please? Sure. These are the conversion tools I used in my series: http://patchwork.ozlabs.org/patch/374412/ for generating *_defconfig and Kconfig http://patchwork.ozlabs.org/patch/374406/ for generating MAINTAINERS I assume you have boards.cfg on your local branch. If you run 'tools/genkconfig' and 'tools/gen_maintainers.py', *_defconfig, Kconfig, and MAINTAINERS will be generated for all the boards listed in the boards.cfg file. And then commit --amend the diffs of *_defconfig, Kconfig, MAINTAINERS. (I say us/we here but I'm actually about to get on a plain and be AFK for several days, so I guess I mean Hans ;-)) With that script we could rebase onto the current branch base running the script at every step (including a new artificial step right before the top of the branch to pickup all the other boards) and commit --amend any new defconfigs which are produced. Then rebase the result of that onto the current master, ignoring conflicts in boards.cfg (i.e. just deleting it each time). The result should be a rebased tree where all the changes to boards.cfg are instead replicated in the appropriate defconfig. Does that sound workable? Yes. Sounds good! Thanks! In you are in trouble, please feel free to ask questions. I am happy to help you. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Can not boot Linux with new FIT image on ARMv8
Hi, On 31 July 2014 02:24, Duxiaoqiang duxiaoqi...@huawei.com wrote: Hi Simon This problem has confused me several days, I will appreciated if you can give me susggestions. You could try 'setenv verify n' to turn off verification. That will make sure that the problem is actually related to verified boot. Does the image boot OK without verified boot? Added by Jason## I tried setenv verify n, but boot the image is not OK. So the problem should not related verified boot. It says: Loading Device Tree to 9fe0, end 9fe04a91 ... fdt_rsv_mem_addr = c32b2540 Is that a valid address? What addresses are the kernel, FDT and ramdisk loaded to when you use the legacy image? I think the address is normal, I run on foundation platform, the physical memory space is up to 4G. I used to load legacy image as bellow: Kernel Image load/entry: 0x9000 Fdt blod address:0xa000 Ramdisk : 0xa100 Uboot code section: 0x8800 The address space for now new FIT image Kernel Image load/entry: 0x8900 Fdt blob: It is relocated by uboot, speculate from debug information, it is 0x9fe0 RAM disk: It is set to 0xaa00 at FIT file, but relocated by uboot. Speculate from debug information, the address is 0xe7c83000 Uboot code section:0x8800 FIT image to be load:0xc304 Well then I'm not sure what is going on, but it is probably worth debugging into the kernel and asking on the kernel mailing list. Perhaps with a debugger attached you might figure out where it goes into the weeds? - Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Driver Model and DTS Parsing
Hi Stephen, On 30 July 2014 20:57, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 10:09 AM, Simon Glass wrote: Hi Stephen, On 30 July 2014 16:47, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 09:26 AM, Simon Glass wrote: Hi Stephen, On 12 June 2014 23:31, Stephen Warren swar...@wwwdotorg.org wrote: On 06/11/2014 10:55 PM, Simon Glass wrote: ... Tegra doesn't have much in the device tree for GPIOs - it seems to be all hard-coded in the software. So I ended up with the code you saw which just iterates over a known number of banks, creating a device for each. That still sounds wrong. Tegra HW has a single GPIO controller that exposes a bunch of GPIOs. It isn't logically divided into banks or any other construct that is multi-level Although the naming of the individual GPIOs does call something a bank, that's just a name of a register, not separate HW blocks. It's just going to be confusing to users if the U-Boot representation doesn't match what the HW actually has. I'm getting back to this as I just re-issued the series. I don't see the mismatch you are referring to here. U-Boot people are used to seeing GPIOs as named banks, and the Tegra TRM uses bank names also. The mismaatch is that in HW, there is a single GPIO controller that has a large number of GPIOs, not a number of GPIO controllers that each has a smaller number of GPIOs. U-Boot's commands/APIs/... should model this directly; a single controller object that has a large number of GPIOs within it. As such, an example user-visible GPIO command needs to be roughly something like: # using integer IDs gpio set tegra 128 ^^^^ (controller instance name) (GPIO ID) or: # using names within the controller gpio set tegra PQ0 ^^^^ (controller instance name) (GPIO name) (note that there must be separate controller ID and GPIO ID parameters in the commands in order to e.g. differentiate between 2 instances of the same I2C GPIO expander chip; something like pca9555@a0@i2c0, pca9555@i2c1@a4) not: gpio set tegraP 10 ^^ ^^ (hypothetical bank name) (GPIO ID within bank) or: gpio set P10 ^^ GPIO name without any controller ID This will require enhancing the gpio command further, right? Sure, but that's going to be needed irrespective of this discussion, right? No, the current series does not include this. It would be a separate enhancement, probably proceeded by a wide-ranging discussion about the U-Boot command line and how it will deal with multiple devices, etc (i.e. not just for GPIOs). There's zero extra indirection caused by SW correctly describing the HW as a single bank. I have absolutely no idea what you mean my extra indirection here; any time there is a driver for a GPIO, you call a function to set a GPIO. That doesn't change based on whether there are 32 or 1 GPIO controller drivers. The only difference is how many drivers you have to search through to find the right one. For Tegra at least, I'm arguing for 1 driver to match the 1 HW module. OK let me explain a bit more. At the moment, the GPIO uclass supports a single GPIO bank, defined as something that has a name, like A, or B. The GPIO bank name should just be Tegra. The Tegra TRM specifies a single GPIO controller, in the address map etc., and there should be a single U-Boot object that represents it. Really the phrase bank in U-Boot needs to be replaced with controller. But that would change the meaning - at present a GPIO device in U-Boot is a GPIO bank. So just define the Tegra GPIO controller as having a single bank. The fact that U-Boot and Tegra both chose the word bank to mean different things doesn't mean that the U-Boot term has to be forced to apply to Tegra where the documentation talks about a bank. I don't think bank is a good description or level of abstraction anyway; U-Boot should use the term controller, chip, or module (which would apply to an entire HW module or GPIO expander chip), since bank is usually an internal implementation detail rather than something the user cares about. Put another way: all banks in a controller/chip/module/... would typically use the same operation/op/callback functions, just with different GPIO IDs or per-GPIO data, whereas different controllers/chips/modules/... would use different operation/op/callback functions. It therefore makes much more sense to abstract at the level of controller/chip/module/... rather than bank level, which is an internal implementation detail. Are you saying that 'bank' should be renamed 'chip' and then you would be happy? Or are you still talking about a separate level of data structure? Within that bank there can be several individual GPIO lines. This is what the Tegra TRM refers to as A0, A1, B0, B1, etc. While the TRM does use the phrase bank, I believe this is just a collision with the term
Re: [U-Boot] [PATCH v2 7/8] Makefile: default to cc for host compiler
Hi Jeroen, On Wed, 30 Jul 2014 21:54:55 +0200 Jeroen Hofstee jer...@myspectrum.nl wrote: Since the host compiler might not be gcc but e.g. clang default to cc to invoke it. cc: Masahiro Yamada yamad...@jp.panasonic.com cc: Tom Rini tr...@ti.com Signed-off-by: Jeroen Hofstee jer...@myspectrum.nl --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 80eb239..c19f7d9 100644 --- a/Makefile +++ b/Makefile @@ -204,7 +204,7 @@ CONFIG_SHELL := $(shell if [ -x $$BASH ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi ; fi) -HOSTCC = gcc +HOSTCC = cc HOSTCXX = g++ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer HOSTCXXFLAGS = -O2 For consistency, HOSTCXX = c++ ? Kconfig has a C++ host program. (scripts/kconfig/qconf.cc) Could you please consider posting this patch to linux-kbuild ML because this may be, I think, acceptable in Linux too. On systems where both gcc and clang are installed, we can select gcc or clang by using update-alternatives (or alternative) command. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [U-boot] the first 0x20 bytes in u-boot.bin
Hi, Albert: I am studying 2014.07 release u-boot package. I found u-boot.bin's first bytes were not code in start.S . Taken for compling smdkv310 as an example: The compiled u-boot.bin's first 0x20 bytes were: 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 .. So, Is it equal to ldr pc, [pc,#0x18] ? Best wishes, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] config: introduce a generic $bootcmd
On Wed, 2014-07-30 at 16:37 -0600, Stephen Warren wrote: From: Dennis Gilmore den...@ausil.us This generic $bootcmd, and associated support macros, automatically searches a defined set of storage devices (or network protocols) for an extlinux configuration file or U-Boot boot script in various standardized locations. Distros that install such a boot config file/script in those standard locations will get easy-to-set-up booting on HW that enables this generic $bootcmd. From a distro PoV this is awesome, thanks! Are you planning to convert any more platforms during this merge window? Hans I would really like to see sunxi switch this time around, before it gets more widely used (since v2014.10 will support loads more platforms). I'm AFK after today but Hans has offered to try and whip something up ASAP. Cheers, Ian. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] cm-t54: convert to generic board
Use generic board setup functions by defining CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Dmitry Lifshitz lifsh...@compulab.co.il --- include/configs/cm_t54.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/configs/cm_t54.h b/include/configs/cm_t54.h index db04095..df93a59 100644 --- a/include/configs/cm_t54.h +++ b/include/configs/cm_t54.h @@ -19,6 +19,9 @@ #undef CONFIG_MISC_INIT_R #undef CONFIG_SPL_OS_BOOT +/* Enable Generic board */ +#define CONFIG_SYS_GENERIC_BOARD + /* Device Tree defines */ #define CONFIG_OF_LIBFDT #define CONFIG_OF_BOARD_SETUP -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] cm-t54: misc board fixes, convert to generic board
Fix MAC address data read (from EEPROM) issue and boot mode check. Convert to generic board. Dmitry Lifshitz (3): cm-t54: fix EEPROM read return value check cm-t54: fix eMMC boot mode check cm-t54: convert to generic board board/compulab/cm_t54/cm_t54.c |6 +++--- include/configs/cm_t54.h |3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] cm-t54: fix EEPROM read return value check
Fix cl_eeprom_read_mac_addr() return value check. Fix long line codding style issue in board_init(). Signed-off-by: Dmitry Lifshitz lifsh...@compulab.co.il --- board/compulab/cm_t54/cm_t54.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c index fadfddc..306491b 100644 --- a/board/compulab/cm_t54/cm_t54.c +++ b/board/compulab/cm_t54/cm_t54.c @@ -43,7 +43,7 @@ const struct omap_sysinfo sysinfo = { */ int board_init(void) { - gd-bd-bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100); /* boot param addr */ + gd-bd-bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100); return 0; } @@ -169,7 +169,7 @@ static int handle_mac_address(void) return 0; ret = cl_eeprom_read_mac_addr(enetaddr); - if (!ret || !is_valid_ether_addr(enetaddr)) + if (ret || !is_valid_ether_addr(enetaddr)) generate_mac_addr(enetaddr); if (!is_valid_ether_addr(enetaddr)) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] cm-t54: fix eMMC boot mode check
Boot from eMMC boot partition corresponds to BOOT_DEVICE_MMC2 omap_bootmode, while BOOT_DEVICE_MMC2_2 corresponds to the user data partition boot. Fix mmc_get_env_part() boot mode check to use a correct value. Signed-off-by: Dmitry Lifshitz lifsh...@compulab.co.il --- board/compulab/cm_t54/cm_t54.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c index 306491b..944b723 100644 --- a/board/compulab/cm_t54/cm_t54.c +++ b/board/compulab/cm_t54/cm_t54.c @@ -89,7 +89,7 @@ uint mmc_get_env_part(struct mmc *mmc) * If booted from eMMC boot partition then force eMMC * FIRST boot partition to be env storage */ - if (bootmode == BOOT_DEVICE_MMC2_2) + if (bootmode == BOOT_DEVICE_MMC2) bootpart = 1; return bootpart; -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 07/13] tools: add genboardscfg.py
On Thu, Jul 31, 2014 at 11:22:05AM +0900, Masahiro Yamada wrote: Hi Tom, On Wed, 30 Jul 2014 10:07:19 -0400 Tom Rini tr...@ti.com wrote: On Wed, Jul 30, 2014 at 02:08:19PM +0900, Masahiro Yamada wrote: Now the primary data for each board is in Kconfig, defconfig and MAINTAINERS. It is true boards.cfg is needed for MAKEALL and buildman and might be useful to brouse all the supported boards in a single database. But it would be painful to maintain the boards.cfg in sync. So, this is the solution. Add a tool to generate the equivalent boards.cfg file based on the latest Kconfig, defconfig and MAINTAINERS. We can keep all the functions of MAKEALL and buildman with it. The best thing would be to change MAKEALL and buildman for not depending on boards.cfg in the future, but it would take some time. [snip] +def get_make_cmd(): +Get the command name of GNU Make. +try: +make_cmd = subprocess.check_output([SHOW_GNU_MAKE]) +except subprocess.CalledProcessError: +print sys.stderr, 'GNU Make not found' +sys.exit(1) +return make_cmd.rstrip() So subprocess.check_output comes from Python 2.7 and Ubuntu 10.04 ships with 2.6. This isn't a deal-breaker as I'm working on updating the two calls here now (and we'll set aside mailmapper, that's not going to be commonly used I think). BTW, Ubuntu 10.04 is now being supported only for Server. Yeah. IT counts build servers as Server not Desktop so I've got access to some beefy build resources that're on that (and staying there for some time to come). :) -- 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] the first 0x20 bytes in u-boot.bin
On Thu, Jul 31, 2014 at 5:24 AM, tiger...@via-alliance.com wrote: Hi, Albert: I am studying 2014.07 release u-boot package. I found u-boot.bin's first bytes were not code in start.S . Taken for compling smdkv310 as an example: The compiled u-boot.bin's first 0x20 bytes were: 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 .. So, Is it equal to ldr pc, [pc,#0x18] ? Hard to say. Perhaps. You should study the linker script (*.lds) for this board. It is likely that the code you are seeing is the reset vector. jdl ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-boot] the first 0x20 bytes in u-boot.bin
Hi, On Thu, Jul 31, 2014 at 12:24 PM, tiger...@via-alliance.com wrote: Hi, Albert: I am studying 2014.07 release u-boot package. I found u-boot.bin's first bytes were not code in start.S . For ARM processors, it's in arch/arm/lib/vectors.S. Regards, Christian Taken for compling smdkv310 as an example: The compiled u-boot.bin's first 0x20 bytes were: 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 .. So, Is it equal to ldr pc, [pc,#0x18] ? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] kconfig: Fix compiler warning in menu.c
This fixes the following compiler warning: In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c: In function ‘get_symbol_str’: scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] jump-offset = strlen(r-s); ^ In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here struct jump_key *jump; Signed-off-by: Hans de Goede hdego...@redhat.com --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index a26cc5d..584e0fc 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -548,7 +548,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, { int i, j; struct menu *submenu[8], *menu, *location = NULL; - struct jump_key *jump; + struct jump_key *jump = NULL; str_printf(r, _(Prompt: %s\n), _(prop-text)); menu = prop-menu-parent; -- 2.0.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Setting Uboot environment variables from within Linux
Hi, I have an issue when attempting to access my uboot variables from within my linux distribution. My set-up is as follows... Cyclone V SoC with ARM Cortex A9 processor running 3.11 kernel (git revision a946a64), uboot version 2013.01.01 - only modification being to configure for QSPI boot and to add some extra environment variables. I am running a QSPI boot configuration, my QSPI has three partitions... 1. Raw partition containing Pre-loader, device-tree and uboot 2. Kernel1 - containing initial kernel 3. Kernel2 - for future updated kernel I have a NAND device offering UBI filesystem. I created the fw_printenv and exported to my development board, created sym link to create fw_setenv. Also copied across the fw_env.config which looks like this (I have not modified this)... # NOR example # MTD device name Device offset Env. size Flash sector size /dev/mtd1 0x 0x4000 0x4000 /dev/mtd2 0x 0x4000 0x4000 # MTD SPI-dataflash example # MTD device name Device offset Env. size Flash sector size #/dev/mtd5 0x4200 0x4200 #/dev/mtd6 0x4200 0x4200 # NAND example #/dev/mtd0 0x4000 0x4000 0x2 cat /proc/mtd look like... dev:size erasesize name mtd0: 4000 0004 denali-nand mtd1: 0080 0001 Flash 0 Raw Data mtd2: 0190 0001 Kernel Partition 1 mtd3: 0190 0001 Kernel Partition 2 When I attempt to run fw_printenv I get the following error message.. Warning: Bad CRC, using default environment I'm assuming that my config file is wrong but I'm not sure how to change it. Do I need to manually workout where the environment variables are being stored? Should I have a separate environment variables image? If so how do I get that image? Any guidance greatly appreciated :-) Thanks Rossco -- View this message in context: http://u-boot.10912.n7.nabble.com/Setting-Uboot-environment-variables-from-within-Linux-tp185482.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] Please pull u-boot-sunxi.git/master
Hi, On 07/31/2014 10:23 AM, Masahiro Yamada wrote: Hi Ian, Hans, On Thu, 31 Jul 2014 08:54:09 +0100 Ian Campbell i...@hellion.org.uk wrote: On Thu, 2014-07-31 at 13:30 +0900, Masahiro Yamada wrote: Hi Tom, Albert, Hans, I am afraid we are going to be in trouble with this pre-Kconfig based PR because it includes various new boards. Yeah, I was wondering how this would work! (We can fix the merge conflict, but it is not trivial.) How this is going to work? Perhaps should we discard unmerged PRs and get all the subsystem repos synchronized with u-boot/master ? Or shall we break these boards once and fix them in a follow-up patch ? Can you point us to the conversion script please? Sure. These are the conversion tools I used in my series: http://patchwork.ozlabs.org/patch/374412/ for generating *_defconfig and Kconfig http://patchwork.ozlabs.org/patch/374406/ for generating MAINTAINERS I assume you have boards.cfg on your local branch. If you run 'tools/genkconfig' and 'tools/gen_maintainers.py', *_defconfig, Kconfig, and MAINTAINERS will be generated for all the boards listed in the boards.cfg file. And then commit --amend the diffs of *_defconfig, Kconfig, MAINTAINERS. Thanks, I've rebased the u-boot-sunxi master next branches (which are in sync arm) on top of u-boot/master, using the above method. I've also run some quick tests (and a MAKEALL) and everything still seems to work fine, one new pull-req coming up. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-sunxi.git/master
Hi Albert Note: 1) This superseeds my previous pull-req as that conflicted with the Kconfig changes which have landed in u-boot/master, this pull-req replaces all the boards.cfg changes from the previous series with defconfig changes / additions; 2) Since this new pull-req is intended to resolve conflicts with u-boot/master it is based on u-boot/master rather then on u-boot-arm/master. Please pull from u-boot-sunxi.git/master for a set of patches adding AHCI, EHCI, PSCI support + support for 14 new boards. The following changes since commit 25b4adbba018633b943a99322bfb2fb819c0bafb: include: remove CONFIG_SPL/CONFIG_TPL definition in config headers (2014-07-30 14:42:03 -0400) are available in the git repository at: http://git.denx.de/u-boot-sunxi.git master for you to fetch changes up to 3340eab26d89176dd0bf543e6d2590665c577423: sun7i: Add bananapi board (2014-07-31 15:37:24 +0200) Hans de Goede (8): sun4i: add USB EHCI settings sun5i: add USB EHCI settings sunxi: Enable EHCI on various sunxi boards sunxi: Add CONFIG_MACPWR option sun4i: Add support for a number of new sun4i boards sun5i: Add support for a number of new sun5i boards sun7i: Add support for a number of new sun7i boards sun7i: Add bananapi board Ian Campbell (2): ahci: provide sunxi SATA driver using AHCI platform framework cubieboard2: Enable AXP209 power controller Marc Zyngier (2): sunxi: HYP/non-sec: add sun7i PSCI backend sunxi: HYP/non-sec: configure CNTFRQ on all CPUs Roman Byshko (5): sunxi: add defines to control USB Host clocks/resets sunxi: add USB EHCI driver sunxi: add general USB settings sun7i: add USB EHCI settings sun7i: cubietruck: enable USB EHCI arch/arm/cpu/armv7/sunxi/Makefile | 3 + arch/arm/cpu/armv7/sunxi/board.c | 5 + arch/arm/cpu/armv7/sunxi/clock_sun4i.c| 4 + arch/arm/cpu/armv7/sunxi/psci.S | 162 + arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 15 +- board/sunxi/MAINTAINERS | 19 ++- board/sunxi/Makefile | 16 ++ board/sunxi/ahci.c| 84 +++ board/sunxi/dram_a10_olinuxino_l.c| 31 board/sunxi/dram_a10s_olinuxino_m.c | 31 board/sunxi/dram_a13_olinuxino.c | 31 board/sunxi/dram_bananapi.c | 31 board/sunxi/dram_linksprite_pcduino3.c| 31 board/sunxi/dram_sun4i_360_1024_iow16.c | 31 board/sunxi/dram_sun4i_360_1024_iow8.c| 31 board/sunxi/dram_sun4i_360_512.c | 31 board/sunxi/dram_sun4i_384_1024_iow8.c| 31 board/sunxi/dram_sun7i_384_1024_iow16.c | 31 board/sunxi/dram_sun7i_384_512_busw16_iow16.c | 31 configs/A10-OLinuXino-Lime_defconfig | 4 + configs/A10s-OLinuXino-M_defconfig| 4 + configs/A13-OLinuXinoM_defconfig | 2 +- configs/A13-OLinuXino_defconfig | 4 + configs/A20-OLinuXino_MICRO_defconfig | 4 + configs/Auxtek-T004_defconfig | 4 + configs/Bananapi_defconfig| 4 + configs/Cubieboard2_FEL_defconfig | 2 +- configs/Cubieboard2_defconfig | 2 +- configs/Cubieboard_defconfig | 2 +- configs/Cubietruck_FEL_defconfig | 2 +- configs/Cubietruck_defconfig | 2 +- configs/Linksprite_pcDuino3_defconfig | 4 + configs/Mele_A1000G_defconfig | 4 + configs/Mele_A1000_defconfig | 4 + configs/Mini-X-1Gb_defconfig | 4 + configs/Mini-X_defconfig | 4 + configs/ba10_tv_box_defconfig | 4 + configs/i12-tvbox_defconfig | 4 + configs/qt840a_defconfig | 4 + configs/r7-tv-dongle_defconfig| 2 +- drivers/block/ahci.c | 16 ++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-sunxi.c | 201 ++ include/ahci.h| 4 + include/configs/sun4i.h | 12 ++ include/configs/sun5i.h | 5 + include/configs/sun7i.h | 19 +++ include/configs/sunxi-common.h| 18 +++ 48 files changed, 982 insertions(+), 13 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/psci.S create mode 100644 board/sunxi/ahci.c create mode 100644 board/sunxi/dram_a10_olinuxino_l.c create mode 100644 board/sunxi/dram_a10s_olinuxino_m.c create mode 100644 board/sunxi/dram_a13_olinuxino.c create mode 100644 board/sunxi/dram_bananapi.c create mode 100644
Re: [U-Boot] Quick guide to Kconfig
Hi, On 07/31/2014 06:51 AM, Masahiro Yamada wrote: Hi all, The mainline has switched to Kconfig. Please make sure to use make board_defconfig instead of make board_config. [1] Board Configuration make board_name_defconfig [2] Modify configuration make config, make menuconfig, make nconfig, ... etc. For SPL, make spl/config, make spl/menuconfig, make spl/nconfig, ... etc. I'm a bit confused here, a single make will build both the SPL + the regular u-boot binary, so why 2 separate menuconfig commands for them ? To be a bit more specific, currently for sunxi for some boards (the ones most used by devs) we have both Foo_defconfig and Foo_FEL_defconfig with the latter one being identical to the first one, except that it not only defines SPL (all our builds use SPL) but also SPL_FEL, this changes some compile time settings as well as leads to using a different linker script for the SPL. The end result is a SPL binary which can be loaded through the FEL allwinner usb firmware loading / update mechanism, rather then written to a sdcard as our regular builds. Rather then doubling the amount of defconfigs we have to allow using FEL on any sunxi board, I would like to remove the Foo_FEL_defconfig files and make it possible to do a FEL build by doing something like this: make Foo_defconfig make menuconfig select FEL make I was planning on taking a shot at this, but the different make menuconfig and make spl/menuconfigs have me somewhat confused (I've a decent knowledge of Kconfig from my kernel work). Perhaps you can give me some hints on how I can best implement the above ? Thanks Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Quick guide to Kconfig
On Thu, 2014-07-31 at 16:38 +0200, Hans de Goede wrote: make Foo_defconfig make menuconfig select FEL make I was hoping that I might eventually be able to do something like make Foo_defconfig CONFIG_SPL_FEL=y or perhaps make Foo_defconfig S:CONFIG_SPL_FEL=y and have it DTRT(tm). I was planning on taking a shot at this, but the different make menuconfig and make spl/menuconfigs have me somewhat confused (I've a decent knowledge of Kconfig from my kernel work). I think part of the problem is that right now we are at Phase I of the switch to Kconfig, which is where the board.cfg settings have moved as a string into CONFIG_SYS_EXTRA_OPTIONS. I suppose Phase II is that the various maintainers implement proper Kconfig options for their platforms and transition the individual settings over to it. Eventually CONFIG_SYS_EXTRA_OPTIONS goes away. Eventually (sooner rather than later, I think) we will want to have a first-class Kconfig setting for CONFIG_SPL_FEL and then things like make spl/menuconfig would let you enable FEL, I think/hope. Apologies if I've misunderstood something and am therefore talking nonsense ;-) Ian. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] config: introduce a generic $bootcmd
On 07/31/2014 04:47 AM, Ian Campbell wrote: On Wed, 2014-07-30 at 16:37 -0600, Stephen Warren wrote: From: Dennis Gilmore den...@ausil.us This generic $bootcmd, and associated support macros, automatically searches a defined set of storage devices (or network protocols) for an extlinux configuration file or U-Boot boot script in various standardized locations. Distros that install such a boot config file/script in those standard locations will get easy-to-set-up booting on HW that enables this generic $bootcmd. From a distro PoV this is awesome, thanks! Are you planning to convert any more platforms during this merge window? Hans I would really like to see sunxi switch this time around, before it gets more widely used (since v2014.10 will support loads more platforms). I'm AFK after today but Hans has offered to try and whip something up ASAP. It would be best if individual board/SoC owners (or at least people who have the HW) converted the config files, since they have full knowledge of the best boot order, and can test the changes. Still, if anyone needs me to take a look at specific platforms, let me know and I'll see what I can do. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 0/4] Implement fastboot flash for eMMC
On 14-07-30 06:23 PM, Marek Vasut wrote: On Thursday, July 31, 2014 at 03:02:37 AM, Steve Rae wrote: On 14-06-26 01:13 PM, Steve Rae wrote: This series implements the fastboot flash command for eMMC devices. It supports both raw and sparse images. NOTES: - the support for the fastboot flash command is enabled with CONFIG_FASTBOOT_FLASH - the support for eMMC is enabled with CONFIG_FASTBOOT_FLASH_MMC_DEV - (future) the support for NAND would be enabled with CONFIG_FASTBOOT_FLASH_NAND(???) This has been tested on ARMv7. Changes in v3: - remove most references to 'mmc', which leaves only one mmc specific function: mmc_get_dev() Changes in v2: - split large function into three - improved handling of response messages - additional partition size checking when writing sparse image - update README.android-fastboot file - new in v2 Steve Rae (4): usb/gadget: fastboot: add sparse image definitions usb/gadget: fastboot: add eMMC support for flash command usb/gadget: fastboot: add support for flash command usb/gadget: fastboot: minor cleanup README | 10 +++ common/Makefile | 5 ++ common/fb_mmc.c | 190 doc/README.android-fastboot | 5 +- drivers/usb/gadget/f_fastboot.c | 41 - include/fb_mmc.h| 8 ++ include/sparse_format.h | 58 7 files changed, 312 insertions(+), 5 deletions(-) create mode 100644 common/fb_mmc.c create mode 100644 include/fb_mmc.h create mode 100644 include/sparse_format.h Marek, I notice that this patchset is assigned to you: http://patchwork.ozlabs.org/patch/364705/ Has there been any progress? Hm, dang. I merrily ignored this patchset in the hope Lukasz will pick it up, but he was not in the loop. Sorry about delaying this so much. Given Lukasz is now on a vacation, I'll take a look later today. Thanks, Steve Best regards, Marek Vasut Thanks -- appreciate that And I'll work through your reviews; but I'll comment on one right now. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/4] usb/gadget: fastboot: add sparse image definitions
On 14-07-30 06:25 PM, Marek Vasut wrote: On Thursday, June 26, 2014 at 10:13:21 PM, Steve Rae wrote: - to prepare for the support of fastboot sparse images Signed-off-by: Steve Rae s...@broadcom.com --- This file is ASIS from: https://raw.githubusercontent.com/AOSB/android_system_core/master/libspars e/sparse_format.h (commit 28fa5bc347390480fe190294c6c385b6a9f0d68b) except for the __UBOOT__ conditional include. Changes in v3: None Changes in v2: None include/sparse_format.h | 58 + 1 file changed, 58 insertions(+) create mode 100644 include/sparse_format.h diff --git a/include/sparse_format.h b/include/sparse_format.h new file mode 100644 index 000..21fbd05 --- /dev/null +++ b/include/sparse_format.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. Please use the SPDX licence identifiers (pelase see Licenses/README)? + */ + +#ifndef _LIBSPARSE_SPARSE_FORMAT_H_ +#define _LIBSPARSE_SPARSE_FORMAT_H_ +#define __UBOOT__ +#ifndef __UBOOT__ +#include sparse_defs.h +#endif + +typedef struct sparse_header { + __le32 magic; /* 0xed26ff3a */ + __le16 major_version; /* (0x1) - reject images with higher major versions */ + __le16 minor_version; /* (0x0) - allow images with higer minor versions */ + __le16 file_hdr_sz;/* 28 bytes for first revision of the file format */ + __le16chunk_hdr_sz; /* 12 bytes for first revision of the file format */ + __le32 blk_sz; /* block size in bytes, must be a multiple of 4 (4096) */ + __le32 total_blks; /* total blocks in the non-sparse output image */ + __le32total_chunks; /* total chunks in the sparse input image */ + __le32 image_checksum; /* CRC32 checksum of the original data, counting don't care */ + /* as 0. Standard 802.3 polynomial, use a Public Domain */ + /* table implementation */ +} sparse_header_t; + +#define SPARSE_HEADER_MAGIC0xed26ff3a + +#define CHUNK_TYPE_RAW 0xCAC1 +#define CHUNK_TYPE_FILL0xCAC2 +#define CHUNK_TYPE_DONT_CARE 0xCAC3 +#define CHUNK_TYPE_CRC320xCAC4 + +typedef struct chunk_header { + __le16 chunk_type; /* 0xCAC1 - raw; 0xCAC2 - fill; 0xCAC3 - don't care */ + __le16 reserved1; + __le32 chunk_sz; /* in blocks in output image */ + __le32 total_sz; /* in bytes of chunk input file including chunk header and data */ +} chunk_header_t; + +/* Following a Raw or Fill or CRC32 chunk is data. The comment here is not aligned with coding style, I'll leave fixing it up to you, since the license header text needs revisiting. + * For a Raw chunk, it's the data in chunk_sz * blk_sz. + * For a Fill chunk, it's 4 bytes of the fill data. + * For a CRC32 chunk, it's 4 bytes of CRC32 + */ + +#endif To clarify: I am taking this file ASIS from the location stated in the commit message Do we _really_ want to modify _anything_ in this file (especially when the content is not changing); or do we want to leaving it pristine? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support
This adds board support for the Toradex Colibri T30 module. Working functions: - SD card boot - eMMC environment and boot - USB host/USB client (on the dual role port) - Network (via ASIX USB) Signed-off-by: Stefan Agner ste...@agner.ch --- arch/arm/Kconfig | 4 + arch/arm/dts/Makefile | 1 + arch/arm/dts/tegra30-colibri.dts | 84 + arch/arm/include/asm/mach-types.h | 13 + board/toradex/colibri_t30/Makefile | 6 + board/toradex/colibri_t30/colibri_t30.c| 52 +++ .../colibri_t30/pinmux-config-colibri_t30.h| 360 + include/configs/colibri_t30.h | 73 + 8 files changed, 593 insertions(+) create mode 100644 arch/arm/dts/tegra30-colibri.dts create mode 100644 board/toradex/colibri_t30/Makefile create mode 100644 board/toradex/colibri_t30/colibri_t30.c create mode 100644 board/toradex/colibri_t30/pinmux-config-colibri_t30.h create mode 100644 include/configs/colibri_t30.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e385eda..dd987cc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -701,6 +701,9 @@ config TARGET_WHISTLER config TARGET_COLIBRI_T20_IRIS bool Support colibri_t20_iris +config TARGET_COLIBRI_T30 + bool Support Colibri T30 + config TARGET_TEC_NG bool Support tec-ng @@ -989,6 +992,7 @@ source board/timll/devkit3250/Kconfig source board/timll/devkit8000/Kconfig source board/toradex/colibri_pxa270/Kconfig source board/toradex/colibri_t20_iris/Kconfig +source board/toradex/colibri_t30/Kconfig source board/trizepsiv/Kconfig source board/ttcontrol/vision2/Kconfig source board/udoo/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 6e2e313..c46b7be 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -21,6 +21,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-colibri_t20_iris.dtb \ tegra30-beaver.dtb \ tegra30-cardhu.dtb \ + tegra30-colibri.dtb \ tegra30-tec-ng.dtb \ tegra114-dalmore.dtb \ tegra124-jetson-tk1.dtb \ diff --git a/arch/arm/dts/tegra30-colibri.dts b/arch/arm/dts/tegra30-colibri.dts new file mode 100644 index 000..21d0311 --- /dev/null +++ b/arch/arm/dts/tegra30-colibri.dts @@ -0,0 +1,84 @@ +/dts-v1/; + +#include tegra30.dtsi + +/ { + model = Toradex Colibri T30; + compatible = toradex,colibri_t30, nvidia,tegra30; + + aliases { + i2c0 = /i2c@7000d000; + i2c1 = /i2c@7000c000; + i2c2 = /i2c@7000c700; + sdhci0 = /sdhci@78000600; + sdhci1 = /sdhci@78000200; + usb0 = /usb@7d00; + usb1 = /usb@7d004000; /* on module only, for ASIX */ + usb2 = /usb@7d008000; + }; + + memory { + device_type = memory; + reg = 0x8000 0x4000; + }; + + /* GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier + board) */ + i2c@7000c000 { + status = okay; + clock-frequency = 10; + }; + + /* GEN2_I2C: unused */ + + /* CAM_I2C: unused */ + + /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */ + i2c@7000c700 { + status = okay; + clock-frequency = 10; + }; + + /* PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and + touch screen controller */ + i2c@7000d000 { + status = okay; + clock-frequency = 10; + }; + + /* SPI1: Colibri SSP */ + spi@7000d400 { + status = okay; + spi-max-frequency = 2500; + }; + + sdhci@78000200 { + status = okay; + bus-width = 4; + cd-gpios = gpio 23 1; /* PC7, MMCD */ + }; + + sdhci@78000600 { + status = okay; + bus-width = 8; + non-removable; + }; + + /* EHCI instance 0: USB1_DP/N - USBC_P/N */ + usb@7d00 { + status = okay; + dr_mode = otg; + }; + + /* EHCI instance 1: USB2_DP/N - AX88772B */ + usb@7d004000 { + status = okay; + phy_type = utmi; + }; + + /* EHCI instance 2: USB3_DP/N - USBH_P/N */ + usb@7d008000 { + status = okay; + nvidia,vbus-gpio = gpio 178 1; /* PW2, USBH_PEN */ + }; +}; diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 440b041..560924e 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_OMAP5_SEVM 3777 #define MACH_TYPE_ARMADILLO_800EVA 3863 #define MACH_TYPE_KZM9G
Re: [U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support
Hi Stefan, On 31 July 2014 18:36, Stefan Agner ste...@agner.ch wrote: This adds board support for the Toradex Colibri T30 module. A few quick questions below... Working functions: - SD card boot - eMMC environment and boot - USB host/USB client (on the dual role port) - Network (via ASIX USB) Signed-off-by: Stefan Agner ste...@agner.ch --- arch/arm/Kconfig | 4 + arch/arm/dts/Makefile | 1 + arch/arm/dts/tegra30-colibri.dts | 84 + arch/arm/include/asm/mach-types.h | 13 + board/toradex/colibri_t30/Makefile | 6 + board/toradex/colibri_t30/colibri_t30.c| 52 +++ .../colibri_t30/pinmux-config-colibri_t30.h| 360 + include/configs/colibri_t30.h | 73 + 8 files changed, 593 insertions(+) create mode 100644 arch/arm/dts/tegra30-colibri.dts create mode 100644 board/toradex/colibri_t30/Makefile create mode 100644 board/toradex/colibri_t30/colibri_t30.c create mode 100644 board/toradex/colibri_t30/pinmux-config-colibri_t30.h create mode 100644 include/configs/colibri_t30.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e385eda..dd987cc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -701,6 +701,9 @@ config TARGET_WHISTLER config TARGET_COLIBRI_T20_IRIS bool Support colibri_t20_iris +config TARGET_COLIBRI_T30 + bool Support Colibri T30 + config TARGET_TEC_NG bool Support tec-ng @@ -989,6 +992,7 @@ source board/timll/devkit3250/Kconfig source board/timll/devkit8000/Kconfig source board/toradex/colibri_pxa270/Kconfig source board/toradex/colibri_t20_iris/Kconfig +source board/toradex/colibri_t30/Kconfig source board/trizepsiv/Kconfig source board/ttcontrol/vision2/Kconfig source board/udoo/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 6e2e313..c46b7be 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -21,6 +21,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-colibri_t20_iris.dtb \ tegra30-beaver.dtb \ tegra30-cardhu.dtb \ + tegra30-colibri.dtb \ tegra30-tec-ng.dtb \ tegra114-dalmore.dtb \ tegra124-jetson-tk1.dtb \ diff --git a/arch/arm/dts/tegra30-colibri.dts b/arch/arm/dts/tegra30-colibri.dts new file mode 100644 index 000..21d0311 --- /dev/null +++ b/arch/arm/dts/tegra30-colibri.dts @@ -0,0 +1,84 @@ +/dts-v1/; + +#include tegra30.dtsi + +/ { + model = Toradex Colibri T30; + compatible = toradex,colibri_t30, nvidia,tegra30; + + aliases { + i2c0 = /i2c@7000d000; + i2c1 = /i2c@7000c000; + i2c2 = /i2c@7000c700; + sdhci0 = /sdhci@78000600; + sdhci1 = /sdhci@78000200; + usb0 = /usb@7d00; + usb1 = /usb@7d004000; /* on module only, for ASIX */ + usb2 = /usb@7d008000; + }; + + memory { + device_type = memory; + reg = 0x8000 0x4000; + }; + + /* GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier + board) */ + i2c@7000c000 { + status = okay; + clock-frequency = 10; + }; + + /* GEN2_I2C: unused */ + + /* CAM_I2C: unused */ + + /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */ + i2c@7000c700 { + status = okay; + clock-frequency = 10; + }; + + /* PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and + touch screen controller */ + i2c@7000d000 { + status = okay; + clock-frequency = 10; + }; + + /* SPI1: Colibri SSP */ + spi@7000d400 { + status = okay; + spi-max-frequency = 2500; + }; + + sdhci@78000200 { + status = okay; + bus-width = 4; + cd-gpios = gpio 23 1; /* PC7, MMCD */ + }; + + sdhci@78000600 { + status = okay; + bus-width = 8; + non-removable; + }; + + /* EHCI instance 0: USB1_DP/N - USBC_P/N */ + usb@7d00 { + status = okay; + dr_mode = otg; + }; + + /* EHCI instance 1: USB2_DP/N - AX88772B */ + usb@7d004000 { + status = okay; + phy_type = utmi; + }; + + /* EHCI instance 2: USB3_DP/N - USBH_P/N */ + usb@7d008000 { + status = okay; + nvidia,vbus-gpio = gpio 178 1; /* PW2, USBH_PEN */ + }; +}; diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 440b041..560924e 100644 ---
Re: [U-Boot] [PATCH] pxe: detect image format before calling bootm/bootz
On 07/30/2014 04:54 PM, Bryan Wu wrote: Trying bootm for zImage will print out several error message which is not necessary for this case. So detect image format firstly, only try bootm for legacy and FIT format image then try bootz for others. diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c @@ -771,11 +772,14 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) if (bootm_argv[3]) bootm_argc = 4; - do_bootm(cmdtp, 0, bootm_argc, bootm_argv); + /* Try bootm for legacy and FIT format image */ + if (genimg_get_format(bootm_argv[1]) != IMAGE_FORMAT_INVALID) + do_bootm(cmdtp, 0, bootm_argc, bootm_argv); This breaks the ability to boot a uImage, since the call to genimg_get_format() is incorrect. genimg_get_format() takes the address of an image itself, not the address of a string containing a textual representation of the address. Also, bootm_argv[1] might not be supplied at all, in which case, boot_get_kernel() falls back to using load_addr as the address. This is further complicated by the fact that for FIT images, the string in bootm_argv[1] won't just be the address of the image, but perhaps have concatenated information indicating which sub-image to select (since FIT images pack multiple files into a single image). You probably need to pull the start of boot_get_kernel() (in common/bootm.c) into a utility function and call that to distinguish between zImage/not, so as not to duplicate any of the logic. (Yes, I failed to notice this when I reviewed this downstream, but I just actually tested this patch, using a uImage for pxe booting...) For the zImage case, this patch certainly does remove the annoying error message generated when do_bootm() can't identify the image type. So, I think it's worth continuing to work on a solution. P.S. you didn't CC anyone who might apply this patch. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support
Hi Simon, Am 2014-07-31 19:41, schrieb Simon Glass: Hi Stefan, On 31 July 2014 18:36, Stefan Agner ste...@agner.ch wrote: This adds board support for the Toradex Colibri T30 module. A few quick questions below... Working functions: - SD card boot - eMMC environment and boot - USB host/USB client (on the dual role port) - Network (via ASIX USB) Signed-off-by: Stefan Agner ste...@agner.ch --- arch/arm/Kconfig | 4 + arch/arm/dts/Makefile | 1 + arch/arm/dts/tegra30-colibri.dts | 84 + arch/arm/include/asm/mach-types.h | 13 + board/toradex/colibri_t30/Makefile | 6 + board/toradex/colibri_t30/colibri_t30.c| 52 +++ .../colibri_t30/pinmux-config-colibri_t30.h| 360 + include/configs/colibri_t30.h | 73 + 8 files changed, 593 insertions(+) create mode 100644 arch/arm/dts/tegra30-colibri.dts create mode 100644 board/toradex/colibri_t30/Makefile create mode 100644 board/toradex/colibri_t30/colibri_t30.c create mode 100644 board/toradex/colibri_t30/pinmux-config-colibri_t30.h create mode 100644 include/configs/colibri_t30.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e385eda..dd987cc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -701,6 +701,9 @@ config TARGET_WHISTLER config TARGET_COLIBRI_T20_IRIS bool Support colibri_t20_iris +config TARGET_COLIBRI_T30 + bool Support Colibri T30 + config TARGET_TEC_NG bool Support tec-ng @@ -989,6 +992,7 @@ source board/timll/devkit3250/Kconfig source board/timll/devkit8000/Kconfig source board/toradex/colibri_pxa270/Kconfig source board/toradex/colibri_t20_iris/Kconfig +source board/toradex/colibri_t30/Kconfig source board/trizepsiv/Kconfig source board/ttcontrol/vision2/Kconfig source board/udoo/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 6e2e313..c46b7be 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -21,6 +21,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-colibri_t20_iris.dtb \ tegra30-beaver.dtb \ tegra30-cardhu.dtb \ + tegra30-colibri.dtb \ tegra30-tec-ng.dtb \ tegra114-dalmore.dtb \ tegra124-jetson-tk1.dtb \ diff --git a/arch/arm/dts/tegra30-colibri.dts b/arch/arm/dts/tegra30-colibri.dts new file mode 100644 index 000..21d0311 --- /dev/null +++ b/arch/arm/dts/tegra30-colibri.dts @@ -0,0 +1,84 @@ +/dts-v1/; + +#include tegra30.dtsi + +/ { + model = Toradex Colibri T30; + compatible = toradex,colibri_t30, nvidia,tegra30; + + aliases { + i2c0 = /i2c@7000d000; + i2c1 = /i2c@7000c000; + i2c2 = /i2c@7000c700; + sdhci0 = /sdhci@78000600; + sdhci1 = /sdhci@78000200; + usb0 = /usb@7d00; + usb1 = /usb@7d004000; /* on module only, for ASIX */ + usb2 = /usb@7d008000; + }; + + memory { + device_type = memory; + reg = 0x8000 0x4000; + }; + + /* GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier + board) */ + i2c@7000c000 { + status = okay; + clock-frequency = 10; + }; + + /* GEN2_I2C: unused */ + + /* CAM_I2C: unused */ + + /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */ + i2c@7000c700 { + status = okay; + clock-frequency = 10; + }; + + /* PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and + touch screen controller */ + i2c@7000d000 { + status = okay; + clock-frequency = 10; + }; + + /* SPI1: Colibri SSP */ + spi@7000d400 { + status = okay; + spi-max-frequency = 2500; + }; + + sdhci@78000200 { + status = okay; + bus-width = 4; + cd-gpios = gpio 23 1; /* PC7, MMCD */ + }; + + sdhci@78000600 { + status = okay; + bus-width = 8; + non-removable; + }; + + /* EHCI instance 0: USB1_DP/N - USBC_P/N */ + usb@7d00 { + status = okay; + dr_mode = otg; + }; + + /* EHCI instance 1: USB2_DP/N - AX88772B */ + usb@7d004000 { + status = okay; + phy_type = utmi; + }; + + /* EHCI instance 2: USB3_DP/N - USBH_P/N */ + usb@7d008000 { + status = okay; + nvidia,vbus-gpio = gpio 178 1; /* PW2, USBH_PEN */ + }; +}; diff --git a/arch/arm/include/asm/mach-types.h
Re: [U-Boot] Driver Model and DTS Parsing
On 07/31/2014 03:56 AM, Simon Glass wrote: Hi Stephen, On 30 July 2014 20:57, Stephen Warren swar...@wwwdotorg.org mailto:swar...@wwwdotorg.org wrote: On 07/30/2014 10:09 AM, Simon Glass wrote: Hi Stephen, On 30 July 2014 16:47, Stephen Warren swar...@wwwdotorg.org mailto:swar...@wwwdotorg.org wrote: On 07/30/2014 09:26 AM, Simon Glass wrote: Hi Stephen, On 12 June 2014 23:31, Stephen Warren swar...@wwwdotorg.org mailto:swar...@wwwdotorg.org wrote: On 06/11/2014 10:55 PM, Simon Glass wrote: ... Hmmm. This email has funny formatting, but hopefully it won't be too hard to follow. ... So just define the Tegra GPIO controller as having a single bank. The fact that U-Boot and Tegra both chose the word bank to mean different things doesn't mean that the U-Boot term has to be forced to apply to Tegra where the documentation talks about a bank. I don't think bank is a good description or level of abstraction anyway; U-Boot should use the term controller, chip, or module (which would apply to an entire HW module or GPIO expander chip), since bank is usually an internal implementation detail rather than something the user cares about. Put another way: all banks in a controller/chip/module/... would typically use the same operation/op/callback functions, just with different GPIO IDs or per-GPIO data, whereas different controllers/chips/modules/... would use different operation/op/callback functions. It therefore makes much more sense to abstract at the level of controller/chip/module/... rather than bank level, which is an internal implementation detail. Are you saying that 'bank' should be renamed 'chip' and then you would be happy? Or are you still talking about a separate level of data structure? My primary objection is: In Tegra, the GPIO controller should be represented as a single entity that controls 250 GPIOs, not as a set of separate entities that control 8 or 32 GPIOs each. Note that I'm talking about what the GPIO controller looks like to anything outside the driver. Whether the driver internally uses the concept of banks (or any other name) isn't relevant, since that would be an entirely hidden implementation detail. Renaming bank to chip or controller certainly makes sense to me, but if that's the only change made, it would not address the objection I just mentioned. ... The Linux GPIO driver uses the concept of a 'bank', and it doesn't even match with the TRM. A bank has 32 GPIOs and there are up to 8 banks. Each bank gets a separate 'struct tegra_gpio_banks'. In no way at they all lumped together. That's not quite true. *Internally* to the driver, there is a struct tegra_gpio_banks, I agree. As an aside, there really doesn't need to be, since the calculations are trivial enough that we should just do them for each access, but that's beside the point. *Externally* to the driver, there is a single struct gpio_chip registered with the GPIO core. This chip owns/exposes all 250 GPIOs. That's because in terms of HW, there is a single GPIO controller that owns all 250 GPIOs. I am just trying to make sure that a 'struct udevice' corresponds to a 'struct tegra_gpio_banks', in the sense that we are not unnecessarily creating a level of data structure that is hidden from driver model. For example 'tegra_gpio_banks' would not be visible to the 'dm tree' command. I very specifically want U-Boot, just like the kernel, to have a single driver for the entire GPIO controller. Whether the internals of that driver have a struct tegra_gpio_banks or not is an implementation detail that has zero impact on the driver model. As I mentioned above, there's no need for the driver to have a struct tegra_gpio_banks; the register address calculations are trivial enough that there's no need to divide the GPIO ID - register address calculation into two steps (the intermediate step generating this annoying bank ID, which as you mentioned might not even correspond to what the TRM calls a bank.) Does it really matter whether we split things into groups of 8 or groups of 32 or a large group of 224/256? Yes. Anything external to the GPIO controller driver must see the HW as it exists and is documented; a single HW module that controls 250 GPIOs. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support
On 07/31/2014 11:36 AM, Stefan Agner wrote: This adds board support for the Toradex Colibri T30 module. Working functions: - SD card boot - eMMC environment and boot - USB host/USB client (on the dual role port) - Network (via ASIX USB) arch/arm/Kconfig | 4 + arch/arm/dts/Makefile | 1 + arch/arm/dts/tegra30-colibri.dts | 84 + arch/arm/include/asm/mach-types.h | 13 + board/toradex/colibri_t30/Makefile | 6 + board/toradex/colibri_t30/colibri_t30.c| 52 +++ .../colibri_t30/pinmux-config-colibri_t30.h| 360 + include/configs/colibri_t30.h | 73 + I think in latest u-boot/master, you'll also need to add configs/colibri_t30_defconfig. diff --git a/arch/arm/dts/tegra30-colibri.dts b/arch/arm/dts/tegra30-colibri.dts + /* EHCI instance 0: USB1_DP/N - USBC_P/N */ + usb@7d00 { + status = okay; + dr_mode = otg; + }; For OTG support, VBUS needs to be able to be turned on/off. Should this port be host-mode, or a VBUS GPIO defined? diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c +void pin_mux_usb(void) +{ + /* Enable LAN_VBUS */ + gpio_request(GPIO_PDD2, NULL); + gpio_direction_output(GPIO_PDD2, 1); + + /* Reset ASIX using LAN_RESET */ + gpio_request(GPIO_PDD0, NULL); + gpio_direction_output(GPIO_PDD0, 0); + + udelay(5); + + gpio_set_value(GPIO_PDD0, 1); +} It might be nice to remove the blank lines around the udelay() call; I initially didn't notice that GOPIO_PDD0 was manipulated by the code both before and after the udelay() and hence there was already a comment saying what GPIO_PDD0 controlled. Nestling the lines together would make this more obvious. diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h +#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_MAX_I2C_BUS TEGRA_I2C_NUM_CONTROLLERS Are those needed? They aren't defined in e.g. the Beaver config header. +#define BOARD_EXTRA_ENV_SETTINGS \ + board_name=colibri-eval-v3\0 \ + fdtfile=tegra30-colibri-eval-v3.dtb\0 It'd be nice to name the board the same in U-Boot as the kernel DT filename. Then you wouldn't need to manually override the default values here. +#include tegra-common-ums.h Did you test this? I mostly developed the USB device mode support on Tegra124. While at some point I did test it on Beaver/Tegra30, it was early on and not very extensive. I'd love to hear that it works well for you too:-) (BTW, I sent a patch to rename that file to tegra-common-usb-gadget.h, since I added DFU support too, so depending on what order TomW applies our patches, one of us will need to rebase) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] drivers: net: remove dead drivers
On Wed, Jul 30, 2014 at 5:26 AM, Masahiro Yamada yamad...@jp.panasonic.com wrote: The following configs are not defined at all: - CONFIG_FTMAC110 - CONFIG_INCA_IP_SWITCH - CONFIG_PBL2800_ETHER - CONFIG_PHY_ICPLUS Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- drivers/net/Makefile | 3 - drivers/net/ftmac110.c| 480 -- drivers/net/ftmac110.h| 176 - drivers/net/phy/Makefile | 1 - drivers/net/phy/icplus.c | 80 drivers/net/phy/phy.c | 3 - drivers/net/plb2800_eth.c | 373 --- include/netdev.h | 2 - 8 files changed, 1118 deletions(-) delete mode 100644 drivers/net/ftmac110.c delete mode 100644 drivers/net/ftmac110.h delete mode 100644 drivers/net/phy/icplus.c delete mode 100644 drivers/net/plb2800_eth.c The Faraday driver is newly added and I believe they are trying to add some support for IP that they include in their made-to-order ASICs. I'm not sure what the plan is for including the MAC in some board definition that builds it to get build testing in the mainline, but that should be addressed with the Faraday maintainer. Probably the include/configs/a320evb.h should define CONFIG_FTMAC110. The others can be removed it seems. Thanks, -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] lib: lmb: fix overflow in __lmb_alloc_base w/ large RAM
From: Stephen Warren swar...@nvidia.com If a 32-bit system has 2GB of RAM, and the base address of that RAM is 2GB, then start+size will overflow a 32-bit value (to a value of 0). __lmb_alloc_base is affected by this; it calculates the minimum of (start+size of RAM) and max_addr. However, when start+size is 0, it is always less than max_addr, which causes the value of max_addr not to be taken into account when restricting the allocation's location. Fix this by calculating start+size separately, and if that calculation underflows, using -1 (interpreted as the max unsigned value) as the value instead, and then taking the min of that and max_addr. Now that start+size doesn't overflow, it's typically large, and max_addr dominates the min() call, and is taken into account. The user-visible symptom of this bug is that CONFIG_BOOTMAP_SZ is ignored on Tegra124 systems with 2GB of RAM, which in turn causes the DT to be relocated at the very end of RAM, which the ARM Linux kernel doesn't map during early boot, and which causes boot failures. With this fix, CONFIG_BOOTMAP_SZ correctly restricts the relocated DT to a much lower address, and everything works. Signed-off-by: Stephen Warren swar...@nvidia.com --- lib/lmb.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lmb.c b/lib/lmb.c index 49a3c9e01e59..41a2be463565 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -295,7 +295,10 @@ phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phy if (max_addr == LMB_ALLOC_ANYWHERE) base = lmb_align_down(lmbbase + lmbsize - size, align); else if (lmbbase max_addr) { - base = min(lmbbase + lmbsize, max_addr); + base = lmbbase + lmbsize; + if (base lmbbase) + base = -1; + base = min(base, max_addr); base = lmb_align_down(base - size, align); } else continue; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: Use mem size from MC rather than ODMDATA
On 07/02/2014 02:12 PM, Stephen Warren wrote: From: Stephen Warren swar...@nvidia.com In at least Tegra124, the Tegra memory controller (MC) has a register that controls the memory size. Read this to determine the memory size rather than requiring this to be redundantly encoded into the ODMDATA. This way, changes to the BCT (i.e. MC configuration) automatically updated SW's view of the memory size, without requiring manual changes to the ODMDATA. Future work potentially required: * Clip the memory size to architectural limits; U-Boot probably doesn't and won't support either LPAE or Tegra's swiss cheese memory layout, at least one of which would be required for 2GB RAM. * Subtract out any carveout required by firmware on future SoCs. I noticed that this patch triggers a bug in DT relocation during bootm/bootz. It'd be best if the following were applied somewhere before this patch: http://patchwork.ozlabs.org/patch/375408/ lib: lmb: fix overflow in __lmb_alloc_base w/ large RAM That's because this patch changes the RAM size on Tegra124 from 2GB-1MB to 2GB. I believe that change is correct, it just triggers an overflow in U-Boot's RAM handling which needs to be fixed first. In practice, I suspect even if this dependency is ignored, there will be no user-visible impact, because the default environment in Tegra U-Boot disables DT relocation completely. This problem would only affect someone who flashed/ran a U-Boot with this patch without resetting their environment to the default that's embedded into the new U-Boot, and their environment in flash was older than when we disabled DT relocation. Since tegra-uboot-flasher always does reset the environment, I expect most people would never notice this. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] Add option -r to env import to allow import of text files with CRLF as line endings
On Wed, Jul 30, 2014 at 04:47:57PM -0600, Stephen Warren wrote: On 07/14/2014 09:49 AM, Alexander Holler wrote: When this option is enabled, CRLF is treated like LF when importing environments from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored. Drawback of enabling this option is that (maybe exported) variables which have a trailing CR in their content will get imported without that CR. But this drawback is very unlikely and the big advantage of letting Windows user create a *working* uEnv.txt too is likely more welcome. This patch doesn't seem to have been applied, yet patches 2..4 in the series were. This means that various boot scripts use env import -t -r ... which fails due to the unknown option -r... commit ecd1446fe1df00d7f7b9de286dba309d93b51870 Author: Alexander Holler hol...@ahsoftware.de Date: Mon Jul 14 17:49:55 2014 +0200 Add option -r to env import to allow import of text files with CRLF as line is what I have. -- 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] omap5912osk: change the status to Orphan
On Thu, Jul 31, 2014 at 02:57:12PM +0900, Masahiro Yamada wrote: Emails to Rishi Bhattacharya ri...@ti.com have been bouncing. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Cc: Tom Rini tr...@ti.com --- This patch is here because Tom did not respond to my request: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/190418/focus=191067 You can reject this patch and assign a new board maintainer. Lets just remove the board. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] Add option -r to env import to allow import of text files with CRLF as line endings
On 07/31/2014 01:51 PM, Tom Rini wrote: On Wed, Jul 30, 2014 at 04:47:57PM -0600, Stephen Warren wrote: On 07/14/2014 09:49 AM, Alexander Holler wrote: When this option is enabled, CRLF is treated like LF when importing environments from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored. Drawback of enabling this option is that (maybe exported) variables which have a trailing CR in their content will get imported without that CR. But this drawback is very unlikely and the big advantage of letting Windows user create a *working* uEnv.txt too is likely more welcome. This patch doesn't seem to have been applied, yet patches 2..4 in the series were. This means that various boot scripts use env import -t -r ... which fails due to the unknown option -r... commit ecd1446fe1df00d7f7b9de286dba309d93b51870 Author: Alexander Holler hol...@ahsoftware.de Date: Mon Jul 14 17:49:55 2014 +0200 Add option -r to env import to allow import of text files with CRLF as line is what I have. Huh, I do see that now. I must have been looking at the content of common/cmd_nvedit.c from the wrong branch, which didn't include that patch. I could have sworn I checked git history too, but evidently not. It is indeed clearly there right before the patches which use it. Sorry for the noise. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] kconfig: Fix compiler warning in menu.c
Hello Hans, On 31-07-14 16:21, Hans de Goede wrote: This fixes the following compiler warning: In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c: In function ‘get_symbol_str’: scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] jump-offset = strlen(r-s); ^ In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here struct jump_key *jump; Signed-off-by: Hans de Goede hdego...@redhat.com --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index a26cc5d..584e0fc 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -548,7 +548,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, { int i, j; struct menu *submenu[8], *menu, *location = NULL; - struct jump_key *jump; + struct jump_key *jump = NULL; str_printf(r, _(Prompt: %s\n), _(prop-text)); menu = prop-menu-parent; just curious, which compiler is this? Since it is a false positive. (and it could know) Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 14/16] tegra: dts: Add serial port details
On 07/30/2014 03:49 AM, Simon Glass wrote: Some Tegra device tree files do not include information about the serial ports. Add this and also add information about the input clock speed. The console alias needs to be set up to indicate which port is used for the console. Also add a binding file since this is missing. diff --git a/arch/arm/dts/tegra114-dalmore.dts b/arch/arm/dts/tegra114-dalmore.dts index 435c01e..e2426ef 100644 --- a/arch/arm/dts/tegra114-dalmore.dts +++ b/arch/arm/dts/tegra114-dalmore.dts @@ -7,6 +7,7 @@ compatible = nvidia,dalmore, nvidia,tegra114; aliases { + console = uart_d; I don't think that's a standard alias name. There was some recent discussion in the devicetree mailing list re: using some property in /chosen for this purpose instead. U-Boot and the kernel should use the same representation here. diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi + uart_a: serial@70006000 { + compatible = nvidia,tegra20-uart; This property needs to include both the specific HW (i.e. Tegra114) and any HW it's compatible with (i.e. Tegra20). + reg = 0x70006000 0x40; + reg-shift = 2; + clock-frequency = 40800; This isn't a property that's defined by the Tegra serial binding. This information should be obtained by looking up the relevant clock, and querying its rate. + interrupts = 68 ; + }; For reference, here's the DT node for this UART in the kernel DT, which complies with the relevant binding document: uarta: serial@70006000 { compatible = nvidia,tegra114-uart, nvidia,tegra20-uart; reg = 0x70006000 0x40; reg-shift = 2; interrupts = GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH; clocks = tegra_car TEGRA114_CLK_UARTA; resets = tegra_car 6; reset-names = serial; dmas = apbdma 8, apbdma 8; dma-names = rx, tx; status = disabled; }; All the comment above apply to all the files in this patch. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 15/16] RFC: dm: tegra: Enable driver model for serial
On 07/30/2014 03:49 AM, Simon Glass wrote: Use driver model for serial ports (for test and comment only). A couple of nits: diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h #define CONFIG_SYS_MALLOC_LEN (4 20) /* 4MB */ +#define CONFIG_SYS_MALLOC_F_LEN(1 10) README says: Pre-relocation malloc() is only supported on sandbox at present but is fairly easy to enable for other archs. I assume that should be deleted now. /* * NS16550 Configuration */ -#define CONFIG_SYS_NS16550 +#ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE (-4) #define CONFIG_SYS_NS16550_CLKV_NS16550_CLK +#endif +#define CONFIG_SYS_NS16550 Leaving that define in the same place would simplify the diff. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 07/16] sandbox: dts: Add a serial console node
On 07/30/2014 03:49 AM, Simon Glass wrote: If the sandbox device tree is provided to U-Boot (with the -d flag) then it will use the device tree version in preference to the built-in device. The only difference is the colour. diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts + uart0: serial { + compatible = sandbox,serial; + u-boot,dm-pre-reloc; Shouldn't that be handled by the driver. It's certainly something that's only relevant to the internals of U-Boot, and hence inappropriate to put into DT. + text-colour = cyan; That's property should likely have a uboot, prefix, since it's non-standard. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 16/16] dm: tegra: Use V_NS16550_CLK only in SPL builds
On 07/30/2014 03:49 AM, Simon Glass wrote: Since Tegra now uses driver model for serial, adjust the definition of V_NS16550_CLK so that it is clear that this is only used for SPL. May as well squash this into the previous patch. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 05/13] kconfig: switch to Kconfig
On Wed, Jul 30, 2014 at 08:08:02PM -0600, Stephen Warren wrote: On 07/30/2014 07:56 PM, Masahiro Yamada wrote: Hi Stephen, On Wed, 30 Jul 2014 17:05:21 -0600 Stephen Warren swar...@wwwdotorg.org wrote: On 07/29/2014 11:08 PM, Masahiro Yamada wrote: This commit enables Kconfig. Going forward, we use Kconfig for the board configuration. mkconfig will never be used. Nor will include/config.mk be generated. Kconfig must be adjusted for U-Boot because our situation is a little more complicated than Linux Kernel. We have to generate multiple boot images (Normal, SPL, TPL) from one source tree. Each image needs its own configuration input. Usage: Run make board_defconfig to do the board configuration. This is quite unfortunate; it breaks any scripts that were building U-Boot via make board_config; make. Can't we add another rule to allow the old build commands to work? Technically, yes. I think we can. But I do not like having it permanently. So, we support both *_defconfig and *_config for a while (maybe 6 months or so?) and then remove *_config. Deal? If the old command-line is ever going to be removed, there's no point supporting both at all; I'd have to hack my scripts to support both sometime, so I may as well do it now rather than wait. Otherwise, I guess I'll have to hack my scripts to check whether e.g. scripts/multiconfig.py (which was added in this commit) is present in the tree, and execute different build commands based on that... Do you mean, you need to build some different versions of U-boot ? Yes. I own some scripts that build U-Boot, and they need to work on any reasonable version of U-Boot that anyone might want to build. For example, they build 2014.07 just fine, and there's no reason they should ever stop being able to do that. I obviously also want my scripts to be able to build any future version of U-Boot. So long as we have MAKEALL (and we'll have the discussion about moving to buildman sometime soon) this just becomes: if [ -x tools/genboardscfg.py ]; then tools/genboardscfg.py fi MAKEALL machine-name -- 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 v8 05/13] kconfig: switch to Kconfig
On 07/31/2014 02:34 PM, Tom Rini wrote: On Wed, Jul 30, 2014 at 08:08:02PM -0600, Stephen Warren wrote: On 07/30/2014 07:56 PM, Masahiro Yamada wrote: Hi Stephen, On Wed, 30 Jul 2014 17:05:21 -0600 Stephen Warren swar...@wwwdotorg.org wrote: On 07/29/2014 11:08 PM, Masahiro Yamada wrote: This commit enables Kconfig. Going forward, we use Kconfig for the board configuration. mkconfig will never be used. Nor will include/config.mk be generated. Kconfig must be adjusted for U-Boot because our situation is a little more complicated than Linux Kernel. We have to generate multiple boot images (Normal, SPL, TPL) from one source tree. Each image needs its own configuration input. Usage: Run make board_defconfig to do the board configuration. This is quite unfortunate; it breaks any scripts that were building U-Boot via make board_config; make. Can't we add another rule to allow the old build commands to work? Technically, yes. I think we can. But I do not like having it permanently. So, we support both *_defconfig and *_config for a while (maybe 6 months or so?) and then remove *_config. Deal? If the old command-line is ever going to be removed, there's no point supporting both at all; I'd have to hack my scripts to support both sometime, so I may as well do it now rather than wait. Otherwise, I guess I'll have to hack my scripts to check whether e.g. scripts/multiconfig.py (which was added in this commit) is present in the tree, and execute different build commands based on that... Do you mean, you need to build some different versions of U-boot ? Yes. I own some scripts that build U-Boot, and they need to work on any reasonable version of U-Boot that anyone might want to build. For example, they build 2014.07 just fine, and there's no reason they should ever stop being able to do that. I obviously also want my scripts to be able to build any future version of U-Boot. So long as we have MAKEALL (and we'll have the discussion about moving to buildman sometime soon) this just becomes: if [ -x tools/genboardscfg.py ]; then tools/genboardscfg.py fi MAKEALL machine-name There's now a large disadvantage to MAKEALL; it takes longer to run that to build U-Boot itself, since it must auto-generate boards.cfg. Perhaps that's only done once, or when the data changes. Also, is MAKEALL an/the official way to build U-Boot, or just a useful tool? I have the impression that running make is the official way to build U-Boot, but MAKEALL/buildman are useful wrapper tools if you want to do batch builds etc. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 05/13] kconfig: switch to Kconfig
On 31-07-14 22:55, Stephen Warren wrote: On 07/31/2014 02:34 PM, Tom Rini wrote: On Wed, Jul 30, 2014 at 08:08:02PM -0600, Stephen Warren wrote: On 07/30/2014 07:56 PM, Masahiro Yamada wrote: Hi Stephen, On Wed, 30 Jul 2014 17:05:21 -0600 Stephen Warren swar...@wwwdotorg.org wrote: On 07/29/2014 11:08 PM, Masahiro Yamada wrote: This commit enables Kconfig. Going forward, we use Kconfig for the board configuration. mkconfig will never be used. Nor will include/config.mk be generated. Kconfig must be adjusted for U-Boot because our situation is a little more complicated than Linux Kernel. We have to generate multiple boot images (Normal, SPL, TPL) from one source tree. Each image needs its own configuration input. Usage: Run make board_defconfig to do the board configuration. This is quite unfortunate; it breaks any scripts that were building U-Boot via make board_config; make. Can't we add another rule to allow the old build commands to work? Technically, yes. I think we can. But I do not like having it permanently. So, we support both *_defconfig and *_config for a while (maybe 6 months or so?) and then remove *_config. Deal? If the old command-line is ever going to be removed, there's no point supporting both at all; I'd have to hack my scripts to support both sometime, so I may as well do it now rather than wait. Otherwise, I guess I'll have to hack my scripts to check whether e.g. scripts/multiconfig.py (which was added in this commit) is present in the tree, and execute different build commands based on that... Do you mean, you need to build some different versions of U-boot ? Yes. I own some scripts that build U-Boot, and they need to work on any reasonable version of U-Boot that anyone might want to build. For example, they build 2014.07 just fine, and there's no reason they should ever stop being able to do that. I obviously also want my scripts to be able to build any future version of U-Boot. So long as we have MAKEALL (and we'll have the discussion about moving to buildman sometime soon) this just becomes: if [ -x tools/genboardscfg.py ]; then tools/genboardscfg.py fi MAKEALL machine-name There's now a large disadvantage to MAKEALL; it takes longer to run that to build U-Boot itself, since it must auto-generate boards.cfg. Perhaps that's only done once, or when the data changes. there is, it is _terribly_ slow when dealing with warnings in the build. MAKEALL is much better for that. Replacing the _config rule with _defconfig is just a bad idea afaic. Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] kconfig: Fix compiler warning in menu.c
Hi, On 07/31/2014 10:10 PM, Jeroen Hofstee wrote: Hello Hans, On 31-07-14 16:21, Hans de Goede wrote: This fixes the following compiler warning: In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c: In function ‘get_symbol_str’: scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] jump-offset = strlen(r-s); ^ In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here struct jump_key *jump; Signed-off-by: Hans de Goede hdego...@redhat.com --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index a26cc5d..584e0fc 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -548,7 +548,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, { int i, j; struct menu *submenu[8], *menu, *location = NULL; -struct jump_key *jump; +struct jump_key *jump = NULL; str_printf(r, _(Prompt: %s\n), _(prop-text)); menu = prop-menu-parent; just curious, which compiler is this? Since it is a false positive. (and it could know) [hans@shalem u-boot]$ rpm -q gcc gcc-4.9.1-2.fc21.1.x86_64 Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] pxe: detect image format before calling bootm/bootz
On Thu, Jul 31, 2014 at 10:36 AM, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 04:54 PM, Bryan Wu wrote: Trying bootm for zImage will print out several error message which is not necessary for this case. So detect image format firstly, only try bootm for legacy and FIT format image then try bootz for others. diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c @@ -771,11 +772,14 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) if (bootm_argv[3]) bootm_argc = 4; - do_bootm(cmdtp, 0, bootm_argc, bootm_argv); + /* Try bootm for legacy and FIT format image */ + if (genimg_get_format(bootm_argv[1]) != IMAGE_FORMAT_INVALID) + do_bootm(cmdtp, 0, bootm_argc, bootm_argv); This breaks the ability to boot a uImage, since the call to genimg_get_format() is incorrect. genimg_get_format() takes the address of an image itself, not the address of a string containing a textual representation of the address. Also, bootm_argv[1] might not be supplied at all, in which case, boot_get_kernel() falls back to using load_addr as the address. This is further complicated by the fact that for FIT images, the string in bootm_argv[1] won't just be the address of the image, but perhaps have concatenated information indicating which sub-image to select (since FIT images pack multiple files into a single image). You probably need to pull the start of boot_get_kernel() (in common/bootm.c) into a utility function and call that to distinguish between zImage/not, so as not to duplicate any of the logic. My bad. I will fix that soon. (Yes, I failed to notice this when I reviewed this downstream, but I just actually tested this patch, using a uImage for pxe booting...) Yeah, I also missed to test uImage. For the zImage case, this patch certainly does remove the annoying error message generated when do_bootm() can't identify the image type. So, I think it's worth continuing to work on a solution. P.S. you didn't CC anyone who might apply this patch. So weird, I sent email to u-b...@list.denx.de, but it didn't show up in the mail list. I think I've already subscribed the u-boot mail list Thanks, -Bryan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support
Hi Stefan, On 31 July 2014 19:00, Stefan Agner ste...@agner.ch wrote: Hi Simon, Am 2014-07-31 19:41, schrieb Simon Glass: Hi Stefan, On 31 July 2014 18:36, Stefan Agner ste...@agner.ch wrote: This adds board support for the Toradex Colibri T30 module. A few quick questions below... Working functions: - SD card boot - eMMC environment and boot - USB host/USB client (on the dual role port) - Network (via ASIX USB) Signed-off-by: Stefan Agner ste...@agner.ch --- arch/arm/Kconfig | 4 + arch/arm/dts/Makefile | 1 + arch/arm/dts/tegra30-colibri.dts | 84 + arch/arm/include/asm/mach-types.h | 13 + board/toradex/colibri_t30/Makefile | 6 + board/toradex/colibri_t30/colibri_t30.c| 52 +++ .../colibri_t30/pinmux-config-colibri_t30.h| 360 + include/configs/colibri_t30.h | 73 + 8 files changed, 593 insertions(+) create mode 100644 arch/arm/dts/tegra30-colibri.dts create mode 100644 board/toradex/colibri_t30/Makefile create mode 100644 board/toradex/colibri_t30/colibri_t30.c create mode 100644 board/toradex/colibri_t30/pinmux-config-colibri_t30.h create mode 100644 include/configs/colibri_t30.h ... diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 440b041..560924e 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_OMAP5_SEVM 3777 #define MACH_TYPE_ARMADILLO_800EVA 3863 #define MACH_TYPE_KZM9G4140 +#define MACH_TYPE_COLIBRI_T30 4493 #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type @@ -14235,6 +14236,18 @@ extern unsigned int __machine_arch_type; # define machine_is_kzm9g()(0) #endif +#ifdef CONFIG_MACH_COLIBRI_T30 +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type__machine_arch_type +# else +# define machine_arch_typeMACH_TYPE_COLIBRI_T30 +# endif +# define machine_is_colibri_t30() (machine_arch_type == MACH_TYPE_COLIBRI_T30) +#else +# define machine_is_colibri_t30() (0) +#endif Do we actually need this machine type stuff anymore? That way we can also boot the 3.1 L4T Kernel, since this is the (probably last) one where we get supported binary drivers for the graphics part. OK I see. + /* * These have not yet been registered */ diff --git a/board/toradex/colibri_t30/Makefile b/board/toradex/colibri_t30/Makefile new file mode 100644 index 000..3d58a4b --- /dev/null +++ b/board/toradex/colibri_t30/Makefile @@ -0,0 +1,6 @@ +# Copyright (c) 2013-2014 Stefan Agner +# SPDX-License-Identifier: GPL-2.0+ + +include $(srctree)/board/nvidia/common/common.mk + +obj-y += colibri_t30.o diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c new file mode 100644 index 000..6c7c62d --- /dev/null +++ b/board/toradex/colibri_t30/colibri_t30.c @@ -0,0 +1,52 @@ +/* + * (C) Copyright 2014 + * Stefan Agner ste...@agner.ch + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include asm/arch/pinmux.h +#include asm/arch/gp_padctrl.h +#include pinmux-config-colibri_t30.h +#include i2c.h +#include asm/gpio.h + +#define PMU_I2C_ADDRESS0x2D +#define MAX_I2C_RETRY 3 Are these used? The address is correct, but not used right now. Should I remove? I think so. + +/* + * Routine: pinmux_init + * Description: Do individual peripheral pinmux configs + */ +void pinmux_init(void) +{ + pinmux_config_pingrp_table(tegra3_pinmux_common, + ARRAY_SIZE(tegra3_pinmux_common)); + + pinmux_config_pingrp_table(unused_pins_lowpower, + ARRAY_SIZE(unused_pins_lowpower)); + + /* Initialize any non-default pad configs (APB_MISC_GP regs) */ + pinmux_config_drvgrp_table(colibri_t30_padctrl, + ARRAY_SIZE(colibri_t30_padctrl)); +} + +/* + * Enable AX88772B USB to LAN controller + */ +void pin_mux_usb(void) +{ + /* Enable LAN_VBUS */ + gpio_request(GPIO_PDD2, NULL); + gpio_direction_output(GPIO_PDD2, 1); + + /* Reset ASIX using LAN_RESET */ + gpio_request(GPIO_PDD0, NULL); + gpio_direction_output(GPIO_PDD0, 0); + + udelay(5); + + gpio_set_value(GPIO_PDD0, 1); You are using device tree for sdhci - shouldn't we use it for USB also? The Colibri T30 has a ASIX USB to Ethernet chip on its board. We reset/power the ASIX here. It is a very board specific reset/powering, hence I put it in here. In my initial patches I had it in the nvidia,phy-reset-gpio and nvidia,vbus-gpio
Re: [U-Boot] Driver Model and DTS Parsing
Hi Stephen, On 31 July 2014 10:56, Simon Glass s...@chromium.org wrote: Hi Stephen, On 30 July 2014 20:57, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 10:09 AM, Simon Glass wrote: Hi Stephen, On 30 July 2014 16:47, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 09:26 AM, Simon Glass wrote: Hi Stephen, On 12 June 2014 23:31, Stephen Warren swar...@wwwdotorg.org wrote: On 06/11/2014 10:55 PM, Simon Glass wrote: ... Tegra doesn't have much in the device tree for GPIOs - it seems to be all hard-coded in the software. So I ended up with the code you saw which just iterates over a known number of banks, creating a device for each. That still sounds wrong. Tegra HW has a single GPIO controller that exposes a bunch of GPIOs. It isn't logically divided into banks or any other construct that is multi-level Although the naming of the individual GPIOs does call something a bank, that's just a name of a register, not separate HW blocks. It's just going to be confusing to users if the U-Boot representation doesn't match what the HW actually has. I'm getting back to this as I just re-issued the series. I don't see the mismatch you are referring to here. U-Boot people are used to seeing GPIOs as named banks, and the Tegra TRM uses bank names also. The mismaatch is that in HW, there is a single GPIO controller that has a large number of GPIOs, not a number of GPIO controllers that each has a smaller number of GPIOs. U-Boot's commands/APIs/... should model this directly; a single controller object that has a large number of GPIOs within it. As such, an example user-visible GPIO command needs to be roughly something like: # using integer IDs gpio set tegra 128 ^^^^ (controller instance name) (GPIO ID) or: # using names within the controller gpio set tegra PQ0 ^^^^ (controller instance name) (GPIO name) (note that there must be separate controller ID and GPIO ID parameters in the commands in order to e.g. differentiate between 2 instances of the same I2C GPIO expander chip; something like pca9555@a0@i2c0, pca9555@i2c1@a4) not: gpio set tegraP 10 ^^ ^^ (hypothetical bank name) (GPIO ID within bank) or: gpio set P10 ^^ GPIO name without any controller ID This will require enhancing the gpio command further, right? Sure, but that's going to be needed irrespective of this discussion, right? No, the current series does not include this. It would be a separate enhancement, probably proceeded by a wide-ranging discussion about the U-Boot command line and how it will deal with multiple devices, etc (i.e. not just for GPIOs). There's zero extra indirection caused by SW correctly describing the HW as a single bank. I have absolutely no idea what you mean my extra indirection here; any time there is a driver for a GPIO, you call a function to set a GPIO. That doesn't change based on whether there are 32 or 1 GPIO controller drivers. The only difference is how many drivers you have to search through to find the right one. For Tegra at least, I'm arguing for 1 driver to match the 1 HW module. OK let me explain a bit more. At the moment, the GPIO uclass supports a single GPIO bank, defined as something that has a name, like A, or B. The GPIO bank name should just be Tegra. The Tegra TRM specifies a single GPIO controller, in the address map etc., and there should be a single U-Boot object that represents it. Really the phrase bank in U-Boot needs to be replaced with controller. But that would change the meaning - at present a GPIO device in U-Boot is a GPIO bank. So just define the Tegra GPIO controller as having a single bank. The fact that U-Boot and Tegra both chose the word bank to mean different things doesn't mean that the U-Boot term has to be forced to apply to Tegra where the documentation talks about a bank. I don't think bank is a good description or level of abstraction anyway; U-Boot should use the term controller, chip, or module (which would apply to an entire HW module or GPIO expander chip), since bank is usually an internal implementation detail rather than something the user cares about. Put another way: all banks in a controller/chip/module/... would typically use the same operation/op/callback functions, just with different GPIO IDs or per-GPIO data, whereas different controllers/chips/modules/... would use different operation/op/callback functions. It therefore makes much more sense to abstract at the level of controller/chip/module/... rather than bank level, which is an internal implementation detail. Are you saying that 'bank' should be renamed 'chip' and then you would be happy? Or are you still talking about a separate level of data structure? Within that bank there can be several individual GPIO lines. This is what the Tegra TRM refers to as A0, A1, B0, B1, etc. While the
Re: [U-Boot] [PATCH 1/3] config: introduce a generic $bootcmd
Hi Stephen, On 30 July 2014 23:37, Stephen Warren swar...@wwwdotorg.org wrote: From: Dennis Gilmore den...@ausil.us This generic $bootcmd, and associated support macros, automatically searches a defined set of storage devices (or network protocols) for an extlinux configuration file or U-Boot boot script in various standardized locations. Distros that install such a boot config file/script in those standard locations will get easy-to-set-up booting on HW that enables this generic $bootcmd. Boards can define the set of devices from which boot is attempted, and the order in which they are attempted. Users may later customize this set/order by edting $boot_targets. Users may interrupt the boot process and boot from a specific device simply by executing e.g.: $ run bootcmd_mmc1 or: $ run bootcmd_pxe This patch was originally written by Dennis Gilmore based on Tegra and rpi_b boot scripts. I have made the following modifications since then: * Boards must define the BOOT_TARGET_DEVICES macro in order to specify the set of devices (and order) from which to attempt boot. If needed, we can define a default directly in config_distro_bootcmd.h. * Removed $env_import and related variables; nothing used them, and I think it's better for boards to pre-load an environment customization file using CONFIG_PREBOOT if they need. * Renamed a bunch of variables to suit my whims:-) Signed-off-by: Dennis Gilmore den...@ausil.us Signed-off-by: Stephen Warren swar...@nvidia.com I do understand the desirability of getting something sorted in this area. But I am not thrilled with all the macro magic. How does this fit with the new Kconfig setup? It encourages a single setting for each variable, and I feel that the #ifdefs are not compatible with that. Would it be possible to put the settings in the device tree somehow instead of CONFIGs? I did send a series some time ago that aimed to improve the default environment specification in config files - it was parked while Kconfig was going on, but we could revisit it. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 14/16] tegra: dts: Add serial port details
Hi Stephen, On 31 July 2014 21:16, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 03:49 AM, Simon Glass wrote: Some Tegra device tree files do not include information about the serial ports. Add this and also add information about the input clock speed. The console alias needs to be set up to indicate which port is used for the console. Also add a binding file since this is missing. diff --git a/arch/arm/dts/tegra114-dalmore.dts b/arch/arm/dts/tegra114-dalmore.dts index 435c01e..e2426ef 100644 --- a/arch/arm/dts/tegra114-dalmore.dts +++ b/arch/arm/dts/tegra114-dalmore.dts @@ -7,6 +7,7 @@ compatible = nvidia,dalmore, nvidia,tegra114; aliases { + console = uart_d; I don't think that's a standard alias name. There was some recent discussion in the devicetree mailing list re: using some property in /chosen for this purpose instead. U-Boot and the kernel should use the same representation here. This is U-Boot's approach at present, if we change it then we should change it everywhere. I worry that 'chosen' is for Linux rather than U-Boot and we might get very confused about what chosen is for? diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi + uart_a: serial@70006000 { + compatible = nvidia,tegra20-uart; This property needs to include both the specific HW (i.e. Tegra114) and any HW it's compatible with (i.e. Tegra20). So something like this? compatible = nvidia,tegra114-uart, nvidia,tegra20-uart; + reg = 0x70006000 0x40; + reg-shift = 2; + clock-frequency = 40800; This isn't a property that's defined by the Tegra serial binding. This information should be obtained by looking up the relevant clock, and querying its rate. We can't do that in the ns16550 driver as yet since there is no generic U-Boot clock infrastructure. I suspect that will come with time. + interrupts = 68 ; + }; For reference, here's the DT node for this UART in the kernel DT, which complies with the relevant binding document: uarta: serial@70006000 { compatible = nvidia,tegra114-uart, nvidia,tegra20-uart; reg = 0x70006000 0x40; reg-shift = 2; interrupts = GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH; clocks = tegra_car TEGRA114_CLK_UARTA; resets = tegra_car 6; reset-names = serial; dmas = apbdma 8, apbdma 8; dma-names = rx, tx; status = disabled; }; All the comment above apply to all the files in this patch. My intent was to make this work with a more generic binding for now - ns16550 is a pretty standard thing and I thought I could avoid making the driver Tegra-specific. Then we could allow many SoCs to use it. Why does Tegra have its own binding in the kernel for this standard UART? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 15/16] RFC: dm: tegra: Enable driver model for serial
Hi Stephen, On 31 July 2014 21:18, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 03:49 AM, Simon Glass wrote: Use driver model for serial ports (for test and comment only). A couple of nits: diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h #define CONFIG_SYS_MALLOC_LEN (4 20) /* 4MB */ +#define CONFIG_SYS_MALLOC_F_LEN(1 10) README says: Pre-relocation malloc() is only supported on sandbox at present but is fairly easy to enable for other archs. I assume that should be deleted now. There's another series ahead of this patch which changes this message. /* * NS16550 Configuration */ -#define CONFIG_SYS_NS16550 +#ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE (-4) #define CONFIG_SYS_NS16550_CLKV_NS16550_CLK +#endif +#define CONFIG_SYS_NS16550 Leaving that define in the same place would simplify the diff. OK, will do. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 07/16] sandbox: dts: Add a serial console node
Hi Stephen, On 31 July 2014 21:20, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 03:49 AM, Simon Glass wrote: If the sandbox device tree is provided to U-Boot (with the -d flag) then it will use the device tree version in preference to the built-in device. The only difference is the colour. diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts + uart0: serial { + compatible = sandbox,serial; + u-boot,dm-pre-reloc; Shouldn't that be handled by the driver. It's certainly something that's only relevant to the internals of U-Boot, and hence inappropriate to put into DT. Hence the u-boot prefix. This is described in the driver model docs. I have found a work-around (which forces a driver to be inited pre-reloc if none is found) but I'm not 100% happy with it. + text-colour = cyan; That's property should likely have a uboot, prefix, since it's non-standard. Can I not just declare a binding for 'sandbox,serial'? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 16/16] dm: tegra: Use V_NS16550_CLK only in SPL builds
Hi Stephen, On 31 July 2014 21:22, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 03:49 AM, Simon Glass wrote: Since Tegra now uses driver model for serial, adjust the definition of V_NS16550_CLK so that it is clear that this is only used for SPL. May as well squash this into the previous patch. OK, will do. I wasn't sure what people would think of this patch so left it separate. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 0/13] Kconfig for U-Boot
On 30 July 2014 20:16, Tom Rini tr...@ti.com wrote: On Wed, Jul 30, 2014 at 02:08:12PM +0900, Masahiro Yamada wrote: This series introduces Kconfig. Besides Linux Kernel, Kconfig is used in some projects, such as, BusyBox, Buildroot. But our situation is a little more complicated. For one board, we need to generate 3 images at most: Normal image, SPL and TPL. Each image needs its own configuration input. Thanks again for all the hard work! Congratulations on getting this in, Masahiro! It's a bit step forward for U-Boot. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] kconfig: Fix compiler warning in menu.c
Hello Hans, On 31-07-14 16:21, Hans de Goede wrote: This fixes the following compiler warning: In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c: In function ‘get_symbol_str’: scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] jump-offset = strlen(r-s); ^ In file included from scripts/kconfig/zconf.tab.c:2537:0: scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here struct jump_key *jump; Signed-off-by: Hans de Goede hdego...@redhat.com --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index a26cc5d..584e0fc 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -548,7 +548,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, { int i, j; struct menu *submenu[8], *menu, *location = NULL; - struct jump_key *jump; + struct jump_key *jump = NULL; str_printf(r, _(Prompt: %s\n), _(prop-text)); menu = prop-menu-parent; And if you combine head location into a single boolean, does this warning still occur? Not that it matters that much in this case, since it is a host tool, but I guess the compiler does intend to assign NULL while there is no reason to do so. Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support
On 07/31/2014 03:55 PM, Simon Glass wrote: On 31 July 2014 19:00, Stefan Agner ste...@agner.ch wrote: Am 2014-07-31 19:41, schrieb Simon Glass: On 31 July 2014 18:36, Stefan Agner ste...@agner.ch wrote: This adds board support for the Toradex Colibri T30 module. +/* + * Enable AX88772B USB to LAN controller + */ +void pin_mux_usb(void) +{ + /* Enable LAN_VBUS */ + gpio_request(GPIO_PDD2, NULL); + gpio_direction_output(GPIO_PDD2, 1); + + /* Reset ASIX using LAN_RESET */ + gpio_request(GPIO_PDD0, NULL); + gpio_direction_output(GPIO_PDD0, 0); + + udelay(5); + + gpio_set_value(GPIO_PDD0, 1); You are using device tree for sdhci - shouldn't we use it for USB also? The Colibri T30 has a ASIX USB to Ethernet chip on its board. We reset/power the ASIX here. It is a very board specific reset/powering, hence I put it in here. In my initial patches I had it in the nvidia,phy-reset-gpio and nvidia,vbus-gpio properties. Technically, it would work to have this GPIOs in the device tree as USB properties, but I think this would be logically wrong... For VBUS I think it would be correct to put it in the USB. For the reset, I'm not sure - it looks like a separate pin so putting it in the device tree for USB would be wrong I think. What does the kernel do for these? The kernel doesn't yet have a good answer to things like this, i.e. data that's not directly driven by the requirements of a controller or protocol, but rather the custom/out-of-band aspects of the device that's connected to the controller. So, a GPIO for VBUS is something very closely tied to the USB specification, and basically any USB controller needs to represent and handle it in the same way. However, a GPIO to reset/enable a USB device is something completely outside the scope of the USB specification, and is very device specific, and there's currently no good answer re: how to handle it. There have been various attempts to solve it such as a generic power sequences DT binding, various proposals for a slot or connector or target device binding, or even explicitly defining the attached device in DT (even though it can be probed) and having the driver for that handle all the HW-specific details. However these threads have unfortunately all languished. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Driver Model and DTS Parsing
On 07/31/2014 03:58 PM, Simon Glass wrote: On 31 July 2014 10:56, Simon Glass s...@chromium.org wrote: ... Firstly we need to establish that GPIOs have names and that these should be supported in U-Boot. Without agreement on this point we might not get much further. Can I please press you on this point, as it is important to establish this first. Oh, you were talking about agreeing with me? I thought this was more of a general comment, since you'd indicated earlier that amending the gpio to handle names was outside the scope of this patchset, and GPIO names are basically only relevant if the user-interface exposes/handles the names. Well sure, GPIOs obviously have various sets of (controller-relative) names and IDs. There certainly aren't any global or absolute names though, unless you include the controller name/ID (or something derived from it) as part of the GPIO's name/ID (either numerically via controller base IDs or textually by e.g. prefixing GPIO names with the controller name). It would be good for any user-visible command/script to be able to handle either numeric IDs (either in an absolute space or preferably relative to a specified controller) or names. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] config: introduce a generic $bootcmd
On 07/31/2014 04:03 PM, Simon Glass wrote: Hi Stephen, On 30 July 2014 23:37, Stephen Warren swar...@wwwdotorg.org wrote: From: Dennis Gilmore den...@ausil.us This generic $bootcmd, and associated support macros, automatically searches a defined set of storage devices (or network protocols) for an extlinux configuration file or U-Boot boot script in various standardized locations. Distros that install such a boot config file/script in those standard locations will get easy-to-set-up booting on HW that enables this generic $bootcmd. Boards can define the set of devices from which boot is attempted, and the order in which they are attempted. Users may later customize this set/order by edting $boot_targets. Users may interrupt the boot process and boot from a specific device simply by executing e.g.: $ run bootcmd_mmc1 or: $ run bootcmd_pxe This patch was originally written by Dennis Gilmore based on Tegra and rpi_b boot scripts. I have made the following modifications since then: * Boards must define the BOOT_TARGET_DEVICES macro in order to specify the set of devices (and order) from which to attempt boot. If needed, we can define a default directly in config_distro_bootcmd.h. * Removed $env_import and related variables; nothing used them, and I think it's better for boards to pre-load an environment customization file using CONFIG_PREBOOT if they need. * Renamed a bunch of variables to suit my whims:-) Signed-off-by: Dennis Gilmore den...@ausil.us Signed-off-by: Stephen Warren swar...@nvidia.com I do understand the desirability of getting something sorted in this area. But I am not thrilled with all the macro magic. How does this fit with the new Kconfig setup? It encourages a single setting for each variable, and I feel that the #ifdefs are not compatible with that. I think Kconfig would be completely unsuitable for this kind of detailed configuration. Kconfig is great for enabling/disabling features, but applying it here feels too much to me. Equally, Kconfig is rather new in U-Boot. It'd be better to enable the feature so that distros can rely on it, and then refactor it later if required. I do feel that actually implementing the boot script as U-Boot environment variables is much preferred over hard-coding any algorithm into U-Boot. That way, the user can easily modify the scripts as they desire. If we just put e.g. $boot_targets into the environment or DT, but none of the other scripts in this patch, the user would be much more severely restricted in how they could reconfigure the system to act how they want. Would it be possible to put the settings in the device tree somehow instead of CONFIGs? At least part of the information isn't a HW description, but rather user-/vendor configuration. So, I don't think it's appropriate to put this into DT. Equally, very few U-Boot platforms currently use DT, and I certainly hope it doesn't become mandatory in any way. So, using DT for this purpose would severely limit the platforms where this feature was available. I did send a series some time ago that aimed to improve the default environment specification in config files - it was parked while Kconfig was going on, but we could revisit it. I think we'd still need to use a C pre-processor (or some other code generation/templating tool) even with that scheme in place. So, I think the two are orthogonal. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 14/16] tegra: dts: Add serial port details
On 07/31/2014 04:10 PM, Simon Glass wrote: Hi Stephen, On 31 July 2014 21:16, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 03:49 AM, Simon Glass wrote: Some Tegra device tree files do not include information about the serial ports. Add this and also add information about the input clock speed. The console alias needs to be set up to indicate which port is used for the console. Also add a binding file since this is missing. diff --git a/arch/arm/dts/tegra114-dalmore.dts b/arch/arm/dts/tegra114-dalmore.dts index 435c01e..e2426ef 100644 --- a/arch/arm/dts/tegra114-dalmore.dts +++ b/arch/arm/dts/tegra114-dalmore.dts @@ -7,6 +7,7 @@ compatible = nvidia,dalmore, nvidia,tegra114; aliases { + console = uart_d; I don't think that's a standard alias name. There was some recent discussion in the devicetree mailing list re: using some property in /chosen for this purpose instead. U-Boot and the kernel should use the same representation here. This is U-Boot's approach at present, That's not the U-Boot approach on Tegra boards before this patch. I do not want Tegra U-Boot do adopt any more U-Boot-specific not-really-DT-but-pretending-to-be bindings. if we change it then we should change it everywhere. I worry that 'chosen' is for Linux rather than U-Boot and we might get very confused about what chosen is for? That discussion should be had on the devicetree mailing list. diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi + uart_a: serial@70006000 { + compatible = nvidia,tegra20-uart; This property needs to include both the specific HW (i.e. Tegra114) and any HW it's compatible with (i.e. Tegra20). So something like this? compatible = nvidia,tegra114-uart, nvidia,tegra20-uart; Yes. + reg = 0x70006000 0x40; + reg-shift = 2; + clock-frequency = 40800; This isn't a property that's defined by the Tegra serial binding. This information should be obtained by looking up the relevant clock, and querying its rate. We can't do that in the ns16550 driver as yet since there is no generic U-Boot clock infrastructure. I suspect that will come with time. The solution here is to put the clock infra-structure in place first. One thing I've learned from the kernel DT experience is that a lot of time would have been saved by putting the correct infra-structure in place first, then using it, rather than hacking around things the wrong way, then putting the infra-structure in place, then converting to it. That's a lot more work, and rather painful. Equally, if we don't just do the infra-structure right, there's really little guarantee that we'll ever convert to the correct approach. Just look at all the DT content in use in U-Boot that don't match the real DT bindings, even after it's been around years. For reference, here's the DT node for this UART in the kernel DT, which complies with the relevant binding document: uarta: serial@70006000 { compatible = nvidia,tegra114-uart, nvidia,tegra20-uart; reg = 0x70006000 0x40; reg-shift = 2; interrupts = GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH; clocks = tegra_car TEGRA114_CLK_UARTA; resets = tegra_car 6; reset-names = serial; dmas = apbdma 8, apbdma 8; dma-names = rx, tx; status = disabled; }; All the comment above apply to all the files in this patch. My intent was to make this work with a more generic binding for now - ns16550 is a pretty standard thing and I thought I could avoid making the driver Tegra-specific. Then we could allow many SoCs to use it. Why does Tegra have its own binding in the kernel for this standard UART? The HW is not a PC-style UART where all you care about is the 16550 registers, and clocks/resets/DMA/... can be ignored or deferred to firmware to set up before DT-driven SW runs. As an aside, /almost/ all reviewed DT bindings use DT properties of the form: clocks = provider parameters; rather than: clock-rate = number; So, that aspect of the Tegra UART binding isn't anything remotely unusual/non-standard. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 07/16] sandbox: dts: Add a serial console node
On 07/31/2014 04:13 PM, Simon Glass wrote: Hi Stephen, On 31 July 2014 21:20, Stephen Warren swar...@wwwdotorg.org wrote: On 07/30/2014 03:49 AM, Simon Glass wrote: If the sandbox device tree is provided to U-Boot (with the -d flag) then it will use the device tree version in preference to the built-in device. The only difference is the colour. diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts + uart0: serial { + compatible = sandbox,serial; + u-boot,dm-pre-reloc; Shouldn't that be handled by the driver. It's certainly something that's only relevant to the internals of U-Boot, and hence inappropriate to put into DT. Hence the u-boot prefix. This is described in the driver model docs. I have found a work-around (which forces a driver to be inited pre-reloc if none is found) but I'm not 100% happy with it. I'm arguing that the property shouldn't exist in DT at all. DT is supposed to be a pure description of the HW, and not encode details that are specific to the implementation of particular SW. The fact that U-Boot performs relocation of its code during boot is completely irrelevant to a HW description. As such, the issue isn't whether there is a u-boot, prefix on that property, but whether it's there at all. + text-colour = cyan; That's property should likely have a uboot, prefix, since it's non-standard. Can I not just declare a binding for 'sandbox,serial'? Properties that are relevant only to a particular binding, rather than being something quite generic an applicable to a whole class of devices, typically have a vendor prefix. A binding should/must exist for every node or compatible value. So, whether you actually write the binding document or not makes no difference to the names or vendor prefixes of the properties the binding uses. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ARM: tegra: Add support for norrin board
Norrin (PM370) is a Tegra124 clamshell board that is very similar to venice2, but it has a different panel, the sdcard cd and wp sense are flipped, and it has a different revision of the AS3722 PMIC. This board is also refered to as nyan in the ChromeOS trees. Signed-off-by: Allen Martin amar...@nvidia.com --- Changes from v1: -Generated pinmux with tegra-pinmux-scripts directly from pinmux spreadsheet. -Don't try to reuse venice2 board files --- arch/arm/dts/Makefile | 1 + arch/arm/dts/tegra124-norrin.dts | 91 + board/nvidia/norrin/Makefile | 9 + board/nvidia/norrin/norrin.c | 29 +++ board/nvidia/norrin/pinmux-config-norrin.h | 287 + board/nvidia/venice2/as3722_init.h | 2 +- boards.cfg | 1 + include/configs/norrin.h | 81 8 files changed, 500 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/tegra124-norrin.dts create mode 100644 board/nvidia/norrin/Makefile create mode 100644 board/nvidia/norrin/norrin.c create mode 100644 board/nvidia/norrin/pinmux-config-norrin.h create mode 100644 include/configs/norrin.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 55546152b94b..73a1f141cf04 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -23,6 +23,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra30-tec-ng.dtb \ tegra114-dalmore.dtb \ tegra124-jetson-tk1.dtb \ + tegra124-norrin.dtb \ tegra124-venice2.dtb dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \ zynq-zc706.dtb \ diff --git a/arch/arm/dts/tegra124-norrin.dts b/arch/arm/dts/tegra124-norrin.dts new file mode 100644 index ..fdf000cf75ec --- /dev/null +++ b/arch/arm/dts/tegra124-norrin.dts @@ -0,0 +1,91 @@ +/dts-v1/; + +#include tegra124.dtsi + +/ { + model = NVIDIA Norrin; + compatible = nvidia,norrin, nvidia,tegra124; + + aliases { + i2c0 = /i2c@7000d000; + i2c1 = /i2c@7000c000; + i2c2 = /i2c@7000c400; + i2c3 = /i2c@7000c500; + i2c4 = /i2c@7000c700; + i2c5 = /i2c@7000d100; + sdhci0 = /sdhci@700b0600; + sdhci1 = /sdhci@700b0400; + spi0 = /spi@7000d400; + spi1 = /spi@7000da00; + usb0 = /usb@7d00; + usb1 = /usb@7d008000; + }; + + memory { + device_type = memory; + reg = 0x8000 0x8000; + }; + + i2c@7000c000 { + status = okay; + clock-frequency = 10; + }; + + i2c@7000c400 { + status = okay; + clock-frequency = 10; + }; + + i2c@7000c500 { + status = okay; + clock-frequency = 10; + }; + + i2c@7000c700 { + status = okay; + clock-frequency = 10; + }; + + i2c@7000d000 { + status = okay; + clock-frequency = 40; + }; + + i2c@7000d100 { + status = okay; + clock-frequency = 40; + }; + + spi@7000d400 { + status = okay; + spi-max-frequency = 2500; + }; + + spi@7000da00 { + status = okay; + spi-max-frequency = 2500; + }; + + sdhci@700b0400 { + status = okay; + cd-gpios = gpio 170 1; /* gpio PV2 */ + power-gpios = gpio 136 0; /* gpio PR0 */ + bus-width = 4; + }; + + sdhci@700b0600 { + status = okay; + bus-width = 8; + }; + + usb@7d00 { + status = okay; + dr_mode = otg; + nvidia,vbus-gpio = gpio 108 0; /* gpio PN4, USB_VBUS_EN0 */ + }; + + usb@7d008000 { + status = okay; + nvidia,vbus-gpio = gpio 109 0; /* gpio PN5, USB_VBUS_EN1 */ + }; +}; diff --git a/board/nvidia/norrin/Makefile b/board/nvidia/norrin/Makefile new file mode 100644 index ..5e490bb38f30 --- /dev/null +++ b/board/nvidia/norrin/Makefile @@ -0,0 +1,9 @@ +# +# (C) Copyright 2014 +# NVIDIA Corporation www.nvidia.com +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += ../venice2/as3722_init.o +obj-y += norrin.o diff --git a/board/nvidia/norrin/norrin.c b/board/nvidia/norrin/norrin.c new file mode 100644 index ..6f0050c4cd2f --- /dev/null +++ b/board/nvidia/norrin/norrin.c @@ -0,0 +1,29 @@ +/* + * (C) Copyright 2014 + * NVIDIA Corporation www.nvidia.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include common.h +#include asm/arch/gpio.h +#include asm/arch/pinmux.h +#include pinmux-config-norrin.h + +/* + * Routine: pinmux_init + * Description: Do individual peripheral pinmux
Re: [U-Boot] [PATCH v1 2/4] get_maintainer.pl: import script from linux 3.15
On 30.07.2014 15:52, Simon Glass wrote: Hi Daniel, On 26 July 2014 19:54, Daniel Schwierzeck daniel.schwierz...@gmail.com wrote: Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com Can you please check this? I see differences between this script and the Linux v3.15 version (commit 1860e37). Strange, I still can't see any differences: $ cd u-boot-mips/ $ git checkout maintainers_v3 $ git log --oneline master.. 716f7c7 get_maintainer.pl: add support for scanning multiple MAINTAINERS files f9f3312 get_maintainer.pl: adapt to U-Boot tree aeecf61 get_maintainer.pl: import script from linux 3.15 06ae51c MAINTAINERS: add initial version $ git checkout aeecf61 Note: checking out 'aeecf61'. ... HEAD is now at aeecf61... get_maintainer.pl: import script from linux 3.15 $ cd ../linux/ $ git checkout v3.15 HEAD is now at 1860e37... Linux 3.15 $ diff -q scripts/get_maintainer.pl ../u-boot-mips/scripts/get_maintainer.pl echo $? 0 -- - Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] ARM: tegra: Add support for norrin board
On 07/31/2014 05:14 PM, Allen Martin wrote: Norrin (PM370) is a Tegra124 clamshell board that is very similar to venice2, but it has a different panel, the sdcard cd and wp sense are flipped, and it has a different revision of the AS3722 PMIC. This board is also refered to as nyan in the ChromeOS trees. At a *very* quick glance, this looks OK. But, you'll need to do a bit of work to rebase it onto the latest u-boot/master. Kconfig has been introduced now, so you'll need to do at least: * Don't touch boards.cfg (it's been removed) * Add configs/norrin_defconfig * Add board/nvidia/norrin/MAINTAINERS I think that's it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: tegra: remove custom define for Jetson TK1
From: Stephen Warren swar...@nvidia.com Now that Kconfig has a per-board option, we can use that directly rather than inventing a custom define for the AS3722 code to determine which board it's being built for. Signed-off-by: Stephen Warren swar...@nvidia.com --- board/nvidia/venice2/as3722_init.h | 2 +- configs/jetson-tk1_defconfig | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/board/nvidia/venice2/as3722_init.h b/board/nvidia/venice2/as3722_init.h index a7b24039f6aa..06c366e0d0d8 100644 --- a/board/nvidia/venice2/as3722_init.h +++ b/board/nvidia/venice2/as3722_init.h @@ -18,7 +18,7 @@ #define AS3722_LDO6VOLTAGE_REG 0x16/* VDD_SDMMC */ #define AS3722_LDCONTROL_REG 0x4E -#ifdef CONFIG_BOARD_JETSON_TK1 +#ifdef CONFIG_TARGET_JETSON_TK1 #define AS3722_SD0VOLTAGE_DATA (0x3C00 | AS3722_SD0VOLTAGE_REG) #else #define AS3722_SD0VOLTAGE_DATA (0x2800 | AS3722_SD0VOLTAGE_REG) diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig index 9ce97c9f61b2..6926257d894b 100644 --- a/configs/jetson-tk1_defconfig +++ b/configs/jetson-tk1_defconfig @@ -1,4 +1,3 @@ CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS=BOARD_JETSON_TK1= +S:CONFIG_ARM=y +S:CONFIG_TARGET_JETSON_TK1=y -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] git-mailrc: add a kconfig alias
From: Stephen Warren swar...@nvidia.com It's easier to Cc Masahiro on Kconfig-related changes with a git-mailrc alias. Signed-off-by: Stephen Warren swar...@nvidia.com --- doc/git-mailrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/git-mailrc b/doc/git-mailrc index ae7e7bfb5bba..5b1885514889 100644 --- a/doc/git-mailrc +++ b/doc/git-mailrc @@ -27,6 +27,7 @@ alias kimphill Kim Phillips kim.phill...@freescale.com alias lukma Lukasz Majewski l.majew...@samsung.com alias macpaulMacpaul Lin macp...@andestech.com alias marex Marek Vasut ma...@denx.de +alias masahiro Masahiro Yamada yamad...@jp.panasonic.com alias monstr Michal Simek mon...@monstr.eu alias panto Pantelis Antoniou pa...@antoniou-consulting.com alias prafulla Prafulla Wadaskar prafu...@marvell.com @@ -110,6 +111,7 @@ alias dfuuboot, lukma alias kerneldoc uboot, marex alias fdtuboot, Jerry Van Baren vanba...@cideas.com alias i2cuboot, hs +alias kconfiguboot, masahiro alias mmcuboot, panto alias nand uboot, scottwood alias netuboot, jhersh -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/4] get_maintainer.pl: import script from linux 3.15
Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com --- Changes in v3: None Changes in v2: None scripts/get_maintainer.pl | 2249 + 1 file changed, 2249 insertions(+) create mode 100755 scripts/get_maintainer.pl diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl new file mode 100755 index 000..4198788 --- /dev/null +++ b/scripts/get_maintainer.pl @@ -0,0 +1,2249 @@ +#!/usr/bin/perl -w +# (c) 2007, Joe Perches j...@perches.com +# created from checkpatch.pl +# +# Print selected MAINTAINERS information for +# the files modified in a patch or for a file +# +# usage: perl scripts/get_maintainer.pl [OPTIONS] patch +#perl scripts/get_maintainer.pl [OPTIONS] -f file +# +# Licensed under the terms of the GNU GPL License version 2 + +use strict; + +my $P = $0; +my $V = '0.26'; + +use Getopt::Long qw(:config no_auto_abbrev); + +my $lk_path = ./; +my $email = 1; +my $email_usename = 1; +my $email_maintainer = 1; +my $email_list = 1; +my $email_subscriber_list = 0; +my $email_git_penguin_chiefs = 0; +my $email_git = 0; +my $email_git_all_signature_types = 0; +my $email_git_blame = 0; +my $email_git_blame_signatures = 1; +my $email_git_fallback = 1; +my $email_git_min_signatures = 1; +my $email_git_max_maintainers = 5; +my $email_git_min_percent = 5; +my $email_git_since = 1-year-ago; +my $email_hg_since = -365; +my $interactive = 0; +my $email_remove_duplicates = 1; +my $email_use_mailmap = 1; +my $output_multiline = 1; +my $output_separator = , ; +my $output_roles = 0; +my $output_rolestats = 1; +my $scm = 0; +my $web = 0; +my $subsystem = 0; +my $status = 0; +my $keywords = 1; +my $sections = 0; +my $file_emails = 0; +my $from_filename = 0; +my $pattern_depth = 0; +my $version = 0; +my $help = 0; + +my $vcs_used = 0; + +my $exit = 0; + +my %commit_author_hash; +my %commit_signer_hash; + +my @penguin_chief = (); +push(@penguin_chief, Linus Torvalds:torvalds\@linux-foundation.org); +#Andrew wants in on most everything - 2009/01/14 +#push(@penguin_chief, Andrew Morton:akpm\@linux-foundation.org); + +my @penguin_chief_names = (); +foreach my $chief (@penguin_chief) { +if ($chief =~ m/^(.*):(.*)/) { + my $chief_name = $1; + my $chief_addr = $2; + push(@penguin_chief_names, $chief_name); +} +} +my $penguin_chiefs = \( . join(|, @penguin_chief_names) . \); + +# Signature types of people who are either +# a) responsible for the code in question, or +# b) familiar enough with it to give relevant feedback +my @signature_tags = (); +push(@signature_tags, Signed-off-by:); +push(@signature_tags, Reviewed-by:); +push(@signature_tags, Acked-by:); + +my $signature_pattern = \( . join(|, @signature_tags) . \); + +# rfc822 email address - preloaded methods go here. +my $rfc822_lwsp = (?:(?:\\r\\n)?[ \\t]); +my $rfc822_char = '[\\000-\\377]'; + +# VCS command support: class-like functions and strings + +my %VCS_cmds; + +my %VCS_cmds_git = ( +execute_cmd = \git_execute_cmd, +available = '(which(git) ne ) (-e .git)', +find_signers_cmd = + git log --no-color --follow --since=\$email_git_since . + '--numstat --no-merges ' . + '--format=GitCommit: %H%n' . + 'GitAuthor: %an %ae%n' . + 'GitDate: %aD%n' . + 'GitSubject: %s%n' . + '%b%n' . +-- \$file, +find_commit_signers_cmd = + git log --no-color . + '--numstat ' . + '--format=GitCommit: %H%n' . + 'GitAuthor: %an %ae%n' . + 'GitDate: %aD%n' . + 'GitSubject: %s%n' . + '%b%n' . +-1 \$commit, +find_commit_author_cmd = + git log --no-color . + '--numstat ' . + '--format=GitCommit: %H%n' . + 'GitAuthor: %an %ae%n' . + 'GitDate: %aD%n' . + 'GitSubject: %s%n' . +-1 \$commit, +blame_range_cmd = git blame -l -L \$diff_start,+\$diff_length \$file, +blame_file_cmd = git blame -l \$file, +commit_pattern = ^GitCommit: ([0-9a-f]{40,40}), +blame_commit_pattern = ^([0-9a-f]+) , +author_pattern = ^GitAuthor: (.*), +subject_pattern = ^GitSubject: (.*), +stat_pattern = ^(\\d+)\\t(\\d+)\\t\$file\$, +); + +my %VCS_cmds_hg = ( +execute_cmd = \hg_execute_cmd, +available = '(which(hg) ne ) (-d .hg)', +find_signers_cmd = + hg log --date=\$email_hg_since . + --template='HgCommit: {node}\\n . + HgAuthor: {author}\\n . + HgSubject: {desc}\\n' . +-- \$file, +find_commit_signers_cmd = + hg log . + --template='HgSubject: {desc}\\n' . +-r \$commit, +find_commit_author_cmd = + hg log . + --template='HgCommit: {node}\\n . + HgAuthor: {author}\\n . +
[U-Boot] [PATCH v3 1/4] MAINTAINERS: add initial version
MAINTAINERS contains all currently known custodians based on infos from wiki [1] and u-boot git forks [2]. [1] http://www.denx.de/wiki/U-Boot/Custodians [2] http://git.denx.de/?p=u-boot.git;a=forks Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com --- Changes in v3: - add more F: lines for I.MX - fix and add more lines for FDT - change FDT maintainer to Simon Glass Changes in v2: - add ARM SUNXI custodians - add ARM ZYNQ maintainer - add buildman/patman maintainer - add more F: lines MAINTAINERS | 405 1 file changed, 405 insertions(+) create mode 100644 MAINTAINERS diff --git a/MAINTAINERS b/MAINTAINERS new file mode 100644 index 000..af194ca --- /dev/null +++ b/MAINTAINERS @@ -0,0 +1,405 @@ +Descriptions of section entries: + + P: Person (obsolete) + M: Mail patches to: FullName address@domain + L: Mailing list that is relevant to this area + W: Web-page with status/info + Q: Patchwork web based patch tracking system site + T: SCM tree type and location. + Type is one of: git, hg, quilt, stgit, topgit + S: Status, one of the following: + Supported: Someone is actually paid to look after this. + Maintained: Someone actually looks after it. + Odd Fixes: It has a maintainer but they don't have time to do + much other than throw the odd patch in. See below.. + Orphan: No current maintainer [but maybe you could take the + role as you write your new code]. + Obsolete:Old code. Something tagged obsolete generally means + it has been replaced by a better system and you + should be using that. + F: Files and directories with wildcard patterns. + A trailing slash includes all files and subdirectory files. + F: drivers/net/all files in and below drivers/net + F: drivers/net/* all files in drivers/net, but not below + F: */net/* all files in any top level directory/net + One pattern per line. Multiple F: lines acceptable. + N: Files and directories with regex patterns. + N: [^a-z]tegra all files whose path contains the word tegra + One pattern per line. Multiple N: lines acceptable. + scripts/get_maintainer.pl has different behavior for files that + match F: pattern and matches of N: patterns. By default, + get_maintainer will not look at git log history when an F: pattern + match occurs. When an N: match occurs, git log history is used + to also notify the people that have git commit signatures. + X: Files and directories that are NOT maintained, same rules as F: + Files exclusions are tested before file matches. + Can be useful for excluding a specific subdirectory, for instance: + F: net/ + X: net/ipv6/ + matches all files in and below net excluding net/ipv6/ + K: Keyword perl extended regex pattern to match content in a + patch or file. For instance: + K: of_get_profile + matches patches or files that contain of_get_profile + K: \b(printk|pr_(info|err))\b + matches patches or files that contain one or more of the words + printk, pr_info or pr_err + One regex pattern per line. Multiple K: lines acceptable. + +Note: For the hard of thinking, this list is meant to remain in alphabetical +order. If you could add yourselves to it in alphabetical order that would be +so much easier [Ed] + +Maintainers List (try to look for most precise areas first) + + --- +ARC +M: Alexey Brodkin alexey.brod...@synopsys.com +S: Maintained +T: git git://git.denx.de/u-boot-arc.git +F: arch/arc/ + +ARM +M: Albert Aribaud albert.u.b...@aribaud.net +S: Maintained +T: git git://git.denx.de/u-boot-arm.git +F: arch/arm/ + +ARM ATMEL AT91 +M: Andreas Bießmann andreas.de...@googlemail.com +S: Maintained +T: git git://git.denx.de/u-boot-atmel.git +F: arch/arm/cpu/armv7/at91/ +F: arch/arm/cpu/at91-common/ +F: arch/arm/include/asm/arch-at91/ + +ARM FREESCALE IMX +M: Stefano Babic sba...@denx.de +S: Maintained +T: git git://git.denx.de/u-boot-imx.git +F: arch/arm/cpu/arm1136/mx*/ +F: arch/arm/cpu/arm926ejs/mx*/ +F: arch/arm/cpu/arm926ejs/imx/ +F: arch/arm/cpu/armv7/mx*/ +F: arch/arm/cpu/armv7/vf610/ +F: arch/arm/cpu/imx-common/ +F: arch/arm/include/asm/arch-imx/ +F: arch/arm/include/asm/arch-mx*/ +F: arch/arm/include/asm/arch-vf610/ +F: arch/arm/include/asm/imx-common/ + +ARM MARVELL KIRKWOOD +M: Prafulla Wadaskar prafu...@marvell.com +S: Maintained +T: git git://git.denx.de/u-boot-marvell.git +F:
[U-Boot] [PATCH v3 0/4] introduce get_maintainer.pl
This series imports get_maintainer.pl from kernel and reintroduce the MAINTAINERS file in the according format. Currently one have to manually grep all infos about board maintainers or custodians from various sources like git log, wiki or boards.cfg. get_maintainer.pl makes this task much easier. Also patman is already able to use it for cc-cmd. The MAINTAINERS file contains all custodians and is hand-written based on infos from wiki [1] and u-boot git forks [2]. Thus the source files infos (F:) are not complete yet. Furthermore status (S:) and maintainership (M:) for some custodian trees are probably wrong. Any help in completing and fixing that is appreciated. The get_maintainers.pl script is modified to scan multiple MAINTAINERS files in the board directory. This is required with the switch to Kconfig which adds a MAINTAINERS file per board. Examples: $ ./scripts/get_maintainer.pl --nogit-fallback -f board/sandbox/ Simon Glass s...@chromium.org (maintainer:SANDBOX BOARD) u-boot@lists.denx.de (open list) $ ./scripts/get_maintainer.pl --nogit-fallback -f arch/sandbox/ Simon Glass s...@chromium.org (maintainer:SANDBOX) u-boot@lists.denx.de (open list) $ ./scripts/get_maintainer.pl --nogit-fallback -f board/sandburst/metrobox/ Travis Sawyer travis.saw...@sandburst.com (orphan (since 2014-03):METROBOX BOARD) u-boot@lists.denx.de (open list) This series is also available at git://git.denx.de/u-boot-mips.git/maintainers_v3. [1] http://www.denx.de/wiki/U-Boot/Custodians [2] http://git.denx.de/?p=u-boot.git;a=forks Changes in v3: - add more F: lines for I.MX - fix and add more lines for FDT - change FDT maintainer to Simon Glass - rebased to master (commit 25b4adb) Changes in v2: - add ARM SUNXI custodians - add ARM ZYNQ maintainer - add buildman/patman maintainer - add more F: lines Daniel Schwierzeck (4): MAINTAINERS: add initial version get_maintainer.pl: import script from linux 3.15 get_maintainer.pl: adapt to U-Boot tree get_maintainer.pl: add support for scanning multiple MAINTAINERS files MAINTAINERS | 405 scripts/get_maintainer.pl | 2270 + 2 files changed, 2675 insertions(+) create mode 100644 MAINTAINERS create mode 100755 scripts/get_maintainer.pl -- 2.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 3/4] get_maintainer.pl: adapt to U-Boot tree
Switch core maintainer to Tom Rini. Adapt directory layout for git tree detection. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com Acked-by: Simon Glass s...@chromium.org Tested-by: Simon Glass s...@chromium.org --- Changes in v3: None Changes in v2: None scripts/get_maintainer.pl | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 4198788..e62c468 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -61,9 +61,7 @@ my %commit_author_hash; my %commit_signer_hash; my @penguin_chief = (); -push(@penguin_chief, Linus Torvalds:torvalds\@linux-foundation.org); -#Andrew wants in on most everything - 2009/01/14 -#push(@penguin_chief, Andrew Morton:akpm\@linux-foundation.org); +push(@penguin_chief, Tom Rini:trini\@ti.com); my @penguin_chief_names = (); foreach my $chief (@penguin_chief) { @@ -817,22 +815,25 @@ sub top_of_kernel_tree { if ($lk_path ne substr($lk_path,length($lk_path)-1,1) ne /) { $lk_path .= /; } -if ( (-f ${lk_path}COPYING) -(-f ${lk_path}CREDITS) +if ( (-f ${lk_path}CREDITS) (-f ${lk_path}Kbuild) (-f ${lk_path}MAINTAINERS) (-f ${lk_path}Makefile) (-f ${lk_path}README) -(-d ${lk_path}Documentation) (-d ${lk_path}arch) -(-d ${lk_path}include) +(-d ${lk_path}board) +(-d ${lk_path}common) +(-d ${lk_path}doc) (-d ${lk_path}drivers) +(-d ${lk_path}dts) (-d ${lk_path}fs) -(-d ${lk_path}init) -(-d ${lk_path}ipc) -(-d ${lk_path}kernel) (-d ${lk_path}lib) -(-d ${lk_path}scripts)) { +(-d ${lk_path}include) +(-d ${lk_path}net) +(-d ${lk_path}post) +(-d ${lk_path}scripts) +(-d ${lk_path}test) +(-d ${lk_path}tools)) { return 1; } return 0; -- 2.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 4/4] get_maintainer.pl: add support for scanning multiple MAINTAINERS files
Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com --- Changes in v3: None Changes in v2: None scripts/get_maintainer.pl | 68 ++- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index e62c468..7717d68 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -16,6 +16,7 @@ my $P = $0; my $V = '0.26'; use Getopt::Long qw(:config no_auto_abbrev); +use File::Find; my $lk_path = ./; my $email = 1; @@ -273,34 +274,53 @@ if (!top_of_kernel_tree($lk_path)) { my @typevalue = (); my %keyword_hash; -open (my $maint, '', ${lk_path}MAINTAINERS) -or die $P: Can't open MAINTAINERS: $!\n; -while ($maint) { -my $line = $_; - -if ($line =~ m/^(\C):\s*(.*)/) { - my $type = $1; - my $value = $2; - - ##Filename pattern matching - if ($type eq F || $type eq X) { - $value =~ s@\.@\\\.@g; ##Convert . to \. - $value =~ s/\*/\.\*/g; ##Convert * to .* - $value =~ s/\?/\./g; ##Convert ? to . - ##if pattern is a directory and it lacks a trailing slash, add one - if ((-d $value)) { - $value =~ s@([^/])$@$1/@; +my @maint_files = (); +push(@maint_files, ${lk_path}MAINTAINERS); + +sub maint_wanted { +return unless $_ =~ /^MAINTAINERS/; +push(@maint_files, $File::Find::name); +} + +File::Find::find(\maint_wanted, ${lk_path}board); + +foreach my $maint_file (@maint_files) { +my $maint; +open ($maint, '', $maint_file) + or die $P: Can't open $maint_file: $!\n; +read_maintainers($maint); +close($maint); +} + +sub read_maintainers { +my ($maint) = @_; + +while ($maint) { + my $line = $_; + + if ($line =~ m/^(\C):\s*(.*)/) { + my $type = $1; + my $value = $2; + + ##Filename pattern matching + if ($type eq F || $type eq X) { + $value =~ s@\.@\\\.@g; ##Convert . to \. + $value =~ s/\*/\.\*/g; ##Convert * to .* + $value =~ s/\?/\./g; ##Convert ? to . + ##if pattern is a directory and it lacks a trailing slash, add one + if ((-d $value)) { + $value =~ s@([^/])$@$1/@; + } + } elsif ($type eq K) { + $keyword_hash{@typevalue} = $value; } - } elsif ($type eq K) { - $keyword_hash{@typevalue} = $value; + push(@typevalue, $type:$value); + } elsif (!/^(\s)*$/) { + $line =~ s/\n$//g; + push(@typevalue, $line); } - push(@typevalue, $type:$value); -} elsif (!/^(\s)*$/) { - $line =~ s/\n$//g; - push(@typevalue, $line); } } -close($maint); # -- 2.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] bootm: use genimg_get_kernel_addr()
Use the new API which is originally taken out from boot_get_kernel of bootm.c Signed-off-by: Bryan Wu pe...@nvidia.com --- common/bootm.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index 7ec2ed8..aee68cd 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -731,26 +731,7 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, int os_noffset; #endif - /* find out kernel image address */ - if (argc 1) { - img_addr = load_addr; - debug(* kernel: default image load address = 0x%08lx\n, - load_addr); -#if defined(CONFIG_FIT) - } else if (fit_parse_conf(argv[0], load_addr, img_addr, - fit_uname_config)) { - debug(* kernel: config '%s' from image at 0x%08lx\n, - fit_uname_config, img_addr); - } else if (fit_parse_subimage(argv[0], load_addr, img_addr, -fit_uname_kernel)) { - debug(* kernel: subimage '%s' from image at 0x%08lx\n, - fit_uname_kernel, img_addr); -#endif - } else { - img_addr = simple_strtoul(argv[0], NULL, 16); - debug(* kernel: cmdline image address = 0x%08lx\n, - img_addr); - } + img_addr = genimg_get_kernel_addr(argv[0]); bootstage_mark(BOOTSTAGE_ID_CHECK_MAGIC); @@ -807,6 +788,10 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, #endif #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: + if (!fit_parse_conf(argv[0], load_addr, img_addr, + fit_uname_config)) + fit_parse_subimage(argv[0], load_addr, img_addr, + fit_uname_kernel); os_noffset = fit_image_load(images, img_addr, fit_uname_kernel, fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_KERNEL, -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] pxe: detect image format before calling bootm/bootz
Trying bootm for zImage will print out several error message which is not necessary for this case. So detect image format firstly, only try bootm for legacy and FIT format image then try bootz for others. This patch needs new function genimg_get_kernel_addr(). Signed-off-by: Bryan Wu pe...@nvidia.com --- common/cmd_pxe.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index ba48692..59b3598 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -1,5 +1,6 @@ /* * Copyright 2010-2011 Calxeda, Inc. + * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. * * SPDX-License-Identifier:GPL-2.0+ */ @@ -609,6 +610,8 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) char *bootargs; int bootm_argc = 3; int len = 0; + ulong kernel_addr; + void *buf; label_print(label); @@ -771,11 +774,15 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) if (bootm_argv[3]) bootm_argc = 4; - do_bootm(cmdtp, 0, bootm_argc, bootm_argv); - + kernel_addr = genimg_get_kernel_addr(bootm_argv[1]); + buf = map_sysmem(kernel_addr, 0); + /* Try bootm for legacy and FIT format image */ + if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID) + do_bootm(cmdtp, 0, bootm_argc, bootm_argv); #ifdef CONFIG_CMD_BOOTZ - /* Try booting a zImage if do_bootm returns */ - do_bootz(cmdtp, 0, bootm_argc, bootm_argv); + /* Try booting a zImage */ + else + do_bootz(cmdtp, 0, bootm_argc, bootm_argv); #endif return 1; } -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] image: introduce genimg_get_kernel_addr()
Kernel address is normally stored as a string argument of bootm or bootz. This function is taken out from boot_get_kernel() of bootm.c, which can be reused by others. Signed-off-by: Bryan Wu pe...@nvidia.com --- common/image.c | 43 +++ include/image.h | 1 + 2 files changed, 44 insertions(+) diff --git a/common/image.c b/common/image.c index 11b3cf5..4e2816a 100644 --- a/common/image.c +++ b/common/image.c @@ -643,6 +643,49 @@ int genimg_get_comp_id(const char *name) #ifndef USE_HOSTCC /** + * genimg_get_kernel_addr - get the real kernel address + * @img_addr: a string might contain real image address + * + * genimg_get_kernel_addr() get the real kernel start address from a string + * which is normally the first argv of bootm/bootz + * + * returns: + * kernel start address + */ +ulong genimg_get_kernel_addr(char * const img_addr) +{ +#if defined(CONFIG_FIT) + const char *fit_uname_config = NULL; + const char *fit_uname_kernel = NULL; +#endif + + ulong kernel_addr; + + /* find out kernel image address */ + if (!img_addr) { + kernel_addr = load_addr; + debug(* kernel: default image load address = 0x%08lx\n, + load_addr); +#if defined(CONFIG_FIT) + } else if (fit_parse_conf(img_addr, load_addr, kernel_addr, + fit_uname_config)) { + debug(* kernel: config '%s' from image at 0x%08lx\n, + *fit_uname_config, kernel_addr); + } else if (fit_parse_subimage(img_addr, load_addr, kernel_addr, +fit_uname_kernel)) { + debug(* kernel: subimage '%s' from image at 0x%08lx\n, + *fit_uname_kernel, kernel_addr); +#endif + } else { + kernel_addr = simple_strtoul(img_addr, NULL, 16); + debug(* kernel: cmdline image address = 0x%08lx\n, + kernel_addr); + } + + return kernel_addr; +} + +/** * genimg_get_format - get image format type * @img_addr: image start address * diff --git a/include/image.h b/include/image.h index 3e8f78d..ca2fe86 100644 --- a/include/image.h +++ b/include/image.h @@ -424,6 +424,7 @@ enum fit_load_op { #define IMAGE_FORMAT_FIT 0x02/* new, libfdt based format */ #define IMAGE_FORMAT_ANDROID 0x03/* Android boot image */ +ulong genimg_get_kernel_addr(char * const img_addr); int genimg_get_format(const void *img_addr); int genimg_has_config(bootm_headers_t *images); ulong genimg_get_image(ulong img_addr); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] introduce genimg_get_kernel_addr()
When trying to fix the error message issue in pxe sysboot, we found it's need a real kernel address for further image format detection. So I take out such code from boot_get_kernel() of bootm.c and create the new API functin genimg_get_kernel_addr(). Then convert pxe/sysboot and bootm.c to use it. Bryan Wu (3): image: introduce genimg_get_kernel_addr() pxe: detect image format before calling bootm/bootz bootm: use genimg_get_kernel_addr() common/bootm.c | 25 + common/cmd_pxe.c | 15 +++ common/image.c | 43 +++ include/image.h | 1 + 4 files changed, 60 insertions(+), 24 deletions(-) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-sunxi.git/master
Hi Hans, On Thu, 31 Jul 2014 16:30:22 +0200 Hans de Goede hdego...@redhat.com wrote: Hi Albert Note: 1) This superseeds my previous pull-req as that conflicted with the Kconfig changes which have landed in u-boot/master, this pull-req replaces all the boards.cfg changes from the previous series with defconfig changes / additions; The conversion to Kconfig looks good. Thanks! Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] MDIO_DEVAD_NONE
Hi all, We are working on porting u-boot to a new board based around the Freescale T4240. We also have a 10G BASE-T PHY on board. We're running into some difficulty bringing up the XFI XGMII interface between the T4240 and the PHY and verifying that it's set up correctly. One of the things I've noticed is that the genphy functions use MDIO_DEVAD_NONE, which is defined as -1 (0x as an int). When truncated to 5 bits for an MDIO device address, that's 0x1F. That's not generally a valid MDIO device address, is it? Reads from this device address, like the one below from genphy_update_link in drivers/net/phy/phy.c:216, return 0x since the bus is pulled up and there's no driving source in the PHY: mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR); So, in this case, genphy_update_link will falsely report that the link is up if there's no device at the 0x1F MDIO device address. Is this the intended behavior? Thanks, Danny ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: remove custom define for Jetson TK1
Hi Stephen, On Thu, 31 Jul 2014 17:29:38 -0600 Stephen Warren swar...@wwwdotorg.org wrote: From: Stephen Warren swar...@nvidia.com Now that Kconfig has a per-board option, we can use that directly rather than inventing a custom define for the AS3722 code to determine which board it's being built for. Signed-off-by: Stephen Warren swar...@nvidia.com --- board/nvidia/venice2/as3722_init.h | 2 +- configs/jetson-tk1_defconfig | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/board/nvidia/venice2/as3722_init.h b/board/nvidia/venice2/as3722_init.h index a7b24039f6aa..06c366e0d0d8 100644 --- a/board/nvidia/venice2/as3722_init.h +++ b/board/nvidia/venice2/as3722_init.h @@ -18,7 +18,7 @@ #define AS3722_LDO6VOLTAGE_REG 0x16/* VDD_SDMMC */ #define AS3722_LDCONTROL_REG 0x4E -#ifdef CONFIG_BOARD_JETSON_TK1 +#ifdef CONFIG_TARGET_JETSON_TK1 #define AS3722_SD0VOLTAGE_DATA (0x3C00 | AS3722_SD0VOLTAGE_REG) #else #define AS3722_SD0VOLTAGE_DATA (0x2800 | AS3722_SD0VOLTAGE_REG) diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig index 9ce97c9f61b2..6926257d894b 100644 --- a/configs/jetson-tk1_defconfig +++ b/configs/jetson-tk1_defconfig @@ -1,4 +1,3 @@ CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS=BOARD_JETSON_TK1= +S:CONFIG_ARM=y +S:CONFIG_TARGET_JETSON_TK1=y -- 1.9.1 Or you may rename CONFIG_TARGET_JETSON_TK1 to CONFIG_BOARD_JETSON_TK1 or another name. I don't want to force CONFIG_TARGET_ name convention. You can change config names if you like. It is up to you. FYI, this is the reason why I used CONFIG_TARGET_ when I auto-generated the initial version of Kconfig and defconfig files: The 'integrator' board is supported for various ARM cores such as arm720t, ar920t, arm926ejs, arm1136. They use the same board but different config headers. So CONFIG_BOARD_INTEGRATOR is not an identical macro pointing to the config header. When I see Tegra family, each board has its own config header. CONFIG_BOARD_ as well as CONFIG_TARGET_ will work. In future, perhaps only the SoC select (CONFIG_TEGRA20, _TEGRA30, _TEGRA114, _TEGRA124) will rename in the Kconfig and the board select might be pushed into device trees. I am not sure.. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] git-mailrc: add a kconfig alias
On Thu, 31 Jul 2014 17:30:03 -0600 Stephen Warren swar...@wwwdotorg.org wrote: From: Stephen Warren swar...@nvidia.com It's easier to Cc Masahiro on Kconfig-related changes with a git-mailrc alias. Signed-off-by: Stephen Warren swar...@nvidia.com Acked-by: Masahiro Yamada yamad...@jp.panasonic.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] driver/mc: Add Layerscape Management Complex wrapper function
Management Complex wrapper functions are built upon the Management Complex hardware interface. These wrapper functions are OS dependent, which vary in U-boot and Linux. Current patch supports MC portal flib version 0.4. Signed-off-by: Lijun Pan lijun@freescale.com --- arch/arm/cpu/armv8/fsl-lsch3/cpu.c | 2 +- board/freescale/ls2085a/ls2085a.c | 2 +- drivers/net/fsl_mc/Makefile| 4 +- drivers/net/fsl_mc/fsl_mc_dpmng_cmd_wrappers.c | 29 + drivers/net/fsl_mc/fsl_mc_io_wrapper.c | 89 ++ drivers/net/fsl_mc/mc.c| 2 +- include/{ = layerscape}/fsl_mc.h | 0 include/layerscape/fsl_mc_dpmng_cmd_wrappers.h | 19 ++ include/layerscape/fsl_mc_io_wrapper.h | 25 9 files changed, 168 insertions(+), 4 deletions(-) create mode 100644 drivers/net/fsl_mc/fsl_mc_dpmng_cmd_wrappers.c create mode 100644 drivers/net/fsl_mc/fsl_mc_io_wrapper.c rename include/{ = layerscape}/fsl_mc.h (100%) create mode 100644 include/layerscape/fsl_mc_dpmng_cmd_wrappers.h create mode 100644 include/layerscape/fsl_mc_io_wrapper.h diff --git a/arch/arm/cpu/armv8/fsl-lsch3/cpu.c b/arch/arm/cpu/armv8/fsl-lsch3/cpu.c index c129d03..e05567e 100644 --- a/arch/arm/cpu/armv8/fsl-lsch3/cpu.c +++ b/arch/arm/cpu/armv8/fsl-lsch3/cpu.c @@ -10,9 +10,9 @@ #include asm/armv8/mmu.h #include asm/io.h #include asm/arch-fsl-lsch3/immap_lsch3.h +#include layerscape/fsl_mc.h #include cpu.h #include speed.h -#include fsl_mc.h DECLARE_GLOBAL_DATA_PTR; diff --git a/board/freescale/ls2085a/ls2085a.c b/board/freescale/ls2085a/ls2085a.c index a18db1d..263a604 100644 --- a/board/freescale/ls2085a/ls2085a.c +++ b/board/freescale/ls2085a/ls2085a.c @@ -12,7 +12,7 @@ #include asm/io.h #include fdt_support.h #include libfdt.h -#include fsl_mc.h +#include layerscape/fsl_mc.h DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/net/fsl_mc/Makefile b/drivers/net/fsl_mc/Makefile index 4834086..1470c40 100644 --- a/drivers/net/fsl_mc/Makefile +++ b/drivers/net/fsl_mc/Makefile @@ -5,4 +5,6 @@ # # Layerscape MC driver -obj-y += mc.o +obj-y += mc.o \ + fsl_mc_io_wrapper.o \ + fsl_mc_dpmng_cmd_wrappers.o diff --git a/drivers/net/fsl_mc/fsl_mc_dpmng_cmd_wrappers.c b/drivers/net/fsl_mc/fsl_mc_dpmng_cmd_wrappers.c new file mode 100644 index 000..613439f --- /dev/null +++ b/drivers/net/fsl_mc/fsl_mc_dpmng_cmd_wrappers.c @@ -0,0 +1,29 @@ +/* + * Freescale Layerscape MC DPMNG command wrappers + * + * Copyright (C) 2014 Freescale Semiconductor, Inc. + * Author: German Rivera german.riv...@freescale.com + * Lijun Pan lijun@freescale.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include linux/types.h +#include linux/string.h +#include layerscape/fsl_mc_dpmng_cmd_wrappers.h +#include layerscape/fsl_mc_io_wrapper.h + +int mc_get_version(struct mc_portal_wrapper *mc_portal, + struct mc_version *mc_ver_info) +{ + int error; + struct mc_command cmd; + + build_cmd_mc_get_version(cmd); + error = mc_portal_wrapper_send_command(mc_portal, cmd); + if (error 0) + return error; + + parse_resp_mc_get_version(cmd, mc_ver_info); + return 0; +} diff --git a/drivers/net/fsl_mc/fsl_mc_io_wrapper.c b/drivers/net/fsl_mc/fsl_mc_io_wrapper.c new file mode 100644 index 000..47938a7 --- /dev/null +++ b/drivers/net/fsl_mc/fsl_mc_io_wrapper.c @@ -0,0 +1,89 @@ +/* + * Freescale Layerscape MC I/O wrapper + * + * Copyright (C) 2014 Freescale Semiconductor, Inc. + * Author: German Rivera german.riv...@freescale.com + * Lijun Pan lijun@freescale.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include errno.h +#include asm/io.h +#include layerscape/fsl_mc_io_wrapper.h +#include layerscape/mc_hardware/fsl_mc_io.h + +/** + * mc_portal_wrapper_send_command - Send MC command and wait for response + * + * @mc_portal: Pointer to MC portal wrapper to be used + * @cmd: MC command buffer. On input, it contains the command to send to the MC. + * On output, it contains the response from the MC if any. + * + * Depending on the sharing option specified when creating the MC portal + * wrapper, this function will use a spinlock or mutex to ensure exclusive + * access to the MC portal from the point when the command is sent until a + * response is received from the MC. + */ +int mc_portal_wrapper_send_command(struct mc_portal_wrapper *mc_portal, + struct mc_command *cmd) +{ + enum mc_cmd_status status; + int error; + int timeout = 2000; + + mc_write_command(mc_portal-mmio_regs, cmd); + + do { + udelay(1000); /* throttle polling */ + if (timeout-- = 0) { + error = -ETIMEDOUT; + goto out; + } + status =
[U-Boot] [PATCH 3/3] driver/mc: print Management Complex version info
After the MC is booted, u-boot should print out the Management Complex version info where appropriate. Also, clean up the code to make checkpatch.pl happy. Signed-off-by: Lijun Pan lijun@freescale.com Signed-off-by: J. German Rivera german.riv...@freescale.com --- drivers/net/fsl_mc/mc.c | 130 ++- include/configs/ls2085a_common.h | 2 +- 2 files changed, 88 insertions(+), 44 deletions(-) diff --git a/drivers/net/fsl_mc/mc.c b/drivers/net/fsl_mc/mc.c index e8ee4f3..3c6b2ef 100644 --- a/drivers/net/fsl_mc/mc.c +++ b/drivers/net/fsl_mc/mc.c @@ -3,9 +3,12 @@ * * SPDX-License-Identifier:GPL-2.0+ */ + #include errno.h #include asm/io.h #include layerscape/fsl_mc.h +#include layerscape/fsl_mc_io_wrapper.h +#include layerscape/fsl_mc_dpmng_cmd_wrappers.h DECLARE_GLOBAL_DATA_PTR; static int mc_boot_status; @@ -14,7 +17,7 @@ static int mc_boot_status; * Copying MC firmware or DPL image to DDR */ static int mc_copy_image(const char *title, - u64 image_addr, u32 image_size, u64 mc_ram_addr) +u64 image_addr, u32 image_size, u64 mc_ram_addr) { debug(%s copied to address %p\n, title, (void *)mc_ram_addr); memcpy((void *)mc_ram_addr, (void *)image_addr, image_size); @@ -25,10 +28,9 @@ static int mc_copy_image(const char *title, * MC firmware FIT image parser checks if the image is in FIT * format, verifies integrity of the image and calculates * raw image address and size values. - * Returns 0 if success and 1 if any of the above mentioned + * Returns 0 on success and a negative errno on error. * task fail. **/ - int parse_mc_firmware_fit_image(const void **raw_image_addr, size_t *raw_image_size) { @@ -39,7 +41,7 @@ int parse_mc_firmware_fit_image(const void **raw_image_addr, size_t size; const char *uname = firmware; - /* Check if the image is in NOR flash*/ + /* Check if the image is in NOR flash */ #ifdef CONFIG_SYS_LS_MC_FW_IN_NOR fit_hdr = (void *)CONFIG_SYS_LS_MC_FW_ADDR; #else @@ -50,26 +52,26 @@ int parse_mc_firmware_fit_image(const void **raw_image_addr, format = genimg_get_format(fit_hdr); if (format != IMAGE_FORMAT_FIT) { - debug(Not a FIT image\n); - return 1; + printf(fsl-mc: ERROR: Bad firmware image (not a FIT image)\n); + return -EINVAL; } if (!fit_check_format(fit_hdr)) { - debug(Bad FIT image format\n); - return 1; + printf(fsl-mc: ERROR: Bad firmware image (bad FIT header)\n); + return -EINVAL; } node_offset = fit_image_get_node(fit_hdr, uname); if (node_offset 0) { - debug(Can not find %s subimage\n, uname); - return 1; + printf(fsl-mc: ERROR: Bad firmware image (missing subimage)\n); + return -ENOENT; } /* Verify MC firmware image */ if (!(fit_image_verify(fit_hdr, node_offset))) { - debug(Bad MC firmware hash); - return 1; + printf(fsl-mc: ERROR: Bad firmware image (bad CRC)\n); + return -EINVAL; } /* Get address and size of raw image */ @@ -90,12 +92,13 @@ int mc_init(bd_t *bis) u64 mc_dpl_offset; u32 reg_gsr; u32 mc_fw_boot_status; - void *fdt_hdr; + void *dpl_fdt_hdr; int dpl_size; const void *raw_image_addr; size_t raw_image_size = 0; - - BUILD_BUG_ON(CONFIG_SYS_LS_MC_FW_LENGTH % 4 != 0); + struct mc_portal_wrapper mc_portal_wrapper; + int portal_id; + struct mc_version mc_ver_info; /* * The MC private DRAM block was already carved at the end of DRAM @@ -130,25 +133,44 @@ int mc_init(bd_t *bis) /* * Load the MC FW at the beginning of the MC private DRAM block: */ - mc_copy_image( - MC Firmware, - (u64)raw_image_addr, - raw_image_size, - mc_ram_addr); + mc_copy_image(MC Firmware, + (u64)raw_image_addr, raw_image_size, mc_ram_addr); + + /* +* Get address and size of the DPL blob stored in flash: +*/ +#ifdef CONFIG_SYS_LS_MC_DPL_IN_NOR + dpl_fdt_hdr = (void *)CONFIG_SYS_LS_MC_DPL_ADDR; +#else +#error No CONFIG_SYS_LS_MC_DPL_IN_xxx defined +#endif + + error = fdt_check_header(dpl_fdt_hdr); + if (error != 0) { + printf(fsl-mc: ERROR: Bad DPL image (bad header)\n); + goto out; + } + + dpl_size = fdt_totalsize(dpl_fdt_hdr); + if (dpl_size CONFIG_SYS_LS_MC_DPL_MAX_LENGTH) { + printf(fsl-mc: ERROR: Bad DPL image (too large: %d)\n, + dpl_size); + error = -EINVAL; + goto out; + } /*
[U-Boot] [PATCH 1/3] driver/mc: Add Layerscape Management Complex hardware interface
Management Complex (MC) Portal is an interface between MC firmware and U-boot/Linux. U-boot/Linux could interact with MC firmware through sending/receiving MC commands to/from MC firmware. This patch enables the hardware interface between MC firmware and U-boot/Linux. Current patch supports MC portal flib version 0.4. Signed-off-by: Lijun Pan lijun@freescale.com --- include/layerscape/mc_hardware/fsl_mc_cmd_common.h | 54 ++ .../layerscape/mc_hardware/fsl_mc_dpmng_commands.h | 60 include/layerscape/mc_hardware/fsl_mc_io.h | 65 ++ 3 files changed, 179 insertions(+) create mode 100644 include/layerscape/mc_hardware/fsl_mc_cmd_common.h create mode 100644 include/layerscape/mc_hardware/fsl_mc_dpmng_commands.h create mode 100644 include/layerscape/mc_hardware/fsl_mc_io.h diff --git a/include/layerscape/mc_hardware/fsl_mc_cmd_common.h b/include/layerscape/mc_hardware/fsl_mc_cmd_common.h new file mode 100644 index 000..bf2a3d0 --- /dev/null +++ b/include/layerscape/mc_hardware/fsl_mc_cmd_common.h @@ -0,0 +1,54 @@ +/* + * Copyright 2014 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef __FSL_MC_CMD_COMMON_H +#define __FSL_MC_CMD_COMMON_H + +#define MC_CMD_NUM_OF_PARAMS 7 + +struct mc_command { + uint64_t header; + uint64_t params[MC_CMD_NUM_OF_PARAMS]; +}; + +enum mc_cmd_status { + MC_CMD_STATUS_OK = 0x0, /* passed */ + MC_CMD_STATUS_READY = 0x1, /* Ready to be processed */ + MC_CMD_STATUS_AUTH_ERR = 0x3, /* Authentication error */ + MC_CMD_STATUS_NO_PRIVILEGE = 0x4, + MC_CMD_STATUS_DMA_ERR = 0x5, + MC_CMD_STATUS_CONFIG_ERR = 0x6, + MC_CMD_STATUS_TIMEOUT = 0x7, + MC_CMD_STATUS_NO_RESOURCE = 0x8, + MC_CMD_STATUS_NO_MEMORY = 0x9, + MC_CMD_STATUS_BUSY = 0xA, + MC_CMD_STATUS_UNSUPPORTED_OP = 0xB, + MC_CMD_STATUS_INVALID_STATE = 0xC +}; + +/* + * MC command priorities + */ +enum mc_cmd_priorities { + CMDIF_PRI_LOW = 0, /* Low Priority command indication */ + CMDIF_PRI_HIGH = 1 /* High Priority command indication */ +}; + +static inline uint64_t mc_encode_cmd_header(uint16_t cmd_id, + uint8_t cmd_size, + uint8_t priority, uint16_t auth_id) +{ + uint64_t header; + + header = (cmd_id 0xfffULL) 52; + header |= (auth_id 0x3ffULL) 38; + header |= (cmd_size 0x3fULL) 31; + header |= (priority 0x1ULL) 15; + header |= (MC_CMD_STATUS_READY 0xff) 16; + + return header; +} +#endif /* __FSL_MC_CMD_COMMON_H */ diff --git a/include/layerscape/mc_hardware/fsl_mc_dpmng_commands.h b/include/layerscape/mc_hardware/fsl_mc_dpmng_commands.h new file mode 100644 index 000..fa3c078 --- /dev/null +++ b/include/layerscape/mc_hardware/fsl_mc_dpmng_commands.h @@ -0,0 +1,60 @@ +/* + * Copyright 2014 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/* + * fsl_mc_dpmng_commands.h + * Management Complex (MC) Data Path Management commands + */ +#ifndef _FSL_MC_DPMNG_COMMANDS_H +#define _FSL_MC_DPMNG_COMMANDS_H + +#include layerscape/mc_hardware/fsl_mc_cmd_common.h +#include linux/compat.h + +/* + * Define Management Complex firmware version information + */ +#define MC_VER_MAJOR 2 +#define MC_VER_MINOR 0 + +/* + * Management Complex firmware version information + */ +struct mc_version { + uint32_t major; + /* Major version number: incremented on API compatibility changes */ + uint32_t minor; + /* Minor version number: incremented on API additions (backward +* compatible); reset when major version is incremented. */ + uint32_t revision; + /* Internal revision number: incremented on implementation changes +* and/or bug fixes that have no impact on API */ +}; + +/* + * Retrieves the Management Complex firmware version information + */ +#define DPMNG_CMDID_GET_VERSION0x831 +#define DPMNG_CMDSZ_GET_VERSION(8 * 2) + +static inline void build_cmd_mc_get_version(struct mc_command *cmd) +{ + cmd-header = mc_encode_cmd_header(DPMNG_CMDID_GET_VERSION, + DPMNG_CMDSZ_GET_VERSION, + CMDIF_PRI_LOW, 0); + + memset(cmd-params, 0, sizeof(cmd-params)); +} + +static inline void parse_resp_mc_get_version(struct mc_command *cmd, +struct mc_version *mc_ver_info) +{ + mc_ver_info-revision = lower_32_bits(cmd-params[0]); + mc_ver_info-major = upper_32_bits(cmd-params[0]); + mc_ver_info-minor = cmd-params[1] 0xff; +} + +#endif /* _FSL_MC_DPMNG_COMMANDS_H */ diff --git a/include/layerscape/mc_hardware/fsl_mc_io.h b/include/layerscape/mc_hardware/fsl_mc_io.h new file mode 100644 index 000..f121238 --- /dev/null +++
[U-Boot] [PATCH v3] powerpc/t104xrdb: Add T1042RDB board support
T1042RDB is a Freescale reference board that hosts the T1042 SoC (and variants). The board is similar to T1040RDB, T1042 is a reduced personality of T1040 SoC without Integrated 8-port Gigabit(L2 Switch). T1042RDB is configured with serdes protocol 0x86 which can support following interfaces - 2 RGMII's on DTSEC4, DTSEC5 - 1 SGMII on DTSEC3 DTSEC1, DTSEC2 are not connected on board. This Patch - add T1042RDB support - updates README file for T1042RDB details and update commands for switching to alternate banks from vBank0 to vBank4 and vice versa This patch also does minor clean ups for fdt defines for T1042RDB and T1042RDB_PI board Signed-off-by: Vijay Rai vijay@freescale.com Signed-off-by: Priyanka Jain priyanka.j...@freescale.com --- board/freescale/t104xrdb/README | 17 +++-- board/freescale/t104xrdb/eth.c | 10 ++ boards.cfg |1 + include/configs/T104xRDB.h | 15 --- 4 files changed, 34 insertions(+), 9 deletions(-) diff --git a/board/freescale/t104xrdb/README b/board/freescale/t104xrdb/README index cdbe1fa..a0f5fa9 100644 --- a/board/freescale/t104xrdb/README +++ b/board/freescale/t104xrdb/README @@ -4,10 +4,23 @@ The T1040RDB is a Freescale reference board that hosts the T1040 SoC (and variants). Variants inclued T1042 presonality of T1040, in which case T1040RDB can also be called T1042RDB. +The T1042RDB is a Freescale reference board that hosts the T1042 SoC +(and variants). The board is similar to T1040RDB, T1040 is a reduced +personality of T1040 SoC without Integrated 8-port Gigabit(L2 Switch). + The T1042RDB_PI is a Freescale reference board that hosts the T1042 SoC. (a personality of T1040 SoC). The board is similar to T1040RDB but is designed specially with low power features targeted for Printing Image Market. +Basic difference's among T1040RDB, T1042RDB_PI, T1042RDB +- +Board Si ProtocolTargeted Market +- +T1040RDB T1040 0x66Networking +T1040RDB T1042 0x86Networking +T1042RDB_PIT1042 0x06Printing Imaging + + T1040 SoC Overview -- The QorIQ T1040/T1042 processor support four integrated 64-bit e5500 PA @@ -194,10 +207,10 @@ The below commands apply to the board Commands for switching to alternate bank. 1. To change from vbank0 to vbank4 - = qixis_reset altbank (it will boot using vbank4) + = cpld reset altbank (it will boot using vbank4) 2.To change from vbank4 to vbank0 - = qixis reset (it will boot using vbank0) + = cpld reset (it will boot using vbank0) NAND boot with 2 Stage boot loader -- diff --git a/board/freescale/t104xrdb/eth.c b/board/freescale/t104xrdb/eth.c index 63e5f90..c8b6c67 100644 --- a/board/freescale/t104xrdb/eth.c +++ b/board/freescale/t104xrdb/eth.c @@ -43,6 +43,16 @@ int board_eth_init(bd_t *bis) CONFIG_SYS_SGMII1_PHY_ADDR); break; #endif +#ifdef CONFIG_T1042RDB + case PHY_INTERFACE_MODE_SGMII: + /* T1042RDB doesn't supports SGMII on DTSEC1 DTSEC2 */ + if ((FM1_DTSEC1 == i) || (FM1_DTSEC2 == i)) + fm_info_set_phy_address(i, 0); + /* T1042RDB only supports SGMII on DTSEC3 */ + fm_info_set_phy_address(FM1_DTSEC3, + CONFIG_SYS_SGMII1_PHY_ADDR); + break; +#endif case PHY_INTERFACE_MODE_RGMII: if (FM1_DTSEC4 == i) phy_addr = CONFIG_SYS_RGMII1_PHY_ADDR; diff --git a/boards.cfg b/boards.cfg index 110dd9d..711058b 100644 --- a/boards.cfg +++ b/boards.cfg @@ -927,6 +927,7 @@ Active powerpc mpc85xx- freescale t104xrdb Active powerpc mpc85xx- freescale t104xrdb T1040RDB_SDCARD T104xRDB:PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD - Active powerpc mpc85xx- freescale t104xrdb T1040RDB_SECURE_BOOT T104xRDB:PPC_T1040,SECURE_BOOT,T1040RDB Aneesh Bansal aneesh.ban...@freescale.com Active powerpc mpc85xx- freescale t104xrdb T1040RDB_SPIFLASH T104xRDB:PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH
Re: [U-Boot] Quick guide to Kconfig
Hi Hans, On Thu, 31 Jul 2014 16:38:47 +0200 Hans de Goede hdego...@redhat.com wrote: Hi, On 07/31/2014 06:51 AM, Masahiro Yamada wrote: Hi all, The mainline has switched to Kconfig. Please make sure to use make board_defconfig instead of make board_config. [1] Board Configuration make board_name_defconfig [2] Modify configuration make config, make menuconfig, make nconfig, ... etc. For SPL, make spl/config, make spl/menuconfig, make spl/nconfig, ... etc. I'm a bit confused here, a single make will build both the SPL + the regular u-boot binary, so why 2 separate menuconfig commands for them ? A single make board_defconfig will configure both the Normal U-boot and SPL. (It will create .config and additionally spl/.config if SPL is supported ) Likewise a single make will build both. This keeps the same build process as we had prior to Kconfig, except the command name difference between board_config and board_defconfig. But config, menuconfig, nconfig, etc. are interactive configuration tools, which can not be run for Normal and SPL at one time. So I think it is reasonable to allow users to invoke menuconfig and spl/menuconfig separately. To be a bit more specific, currently for sunxi for some boards (the ones most used by devs) we have both Foo_defconfig and Foo_FEL_defconfig with the latter one being identical to the first one, except that it not only defines SPL (all our builds use SPL) but also SPL_FEL, this changes some compile time settings as well as leads to using a different linker script for the SPL. The end result is a SPL binary which can be loaded through the FEL allwinner usb firmware loading / update mechanism, rather then written to a sdcard as our regular builds. Rather then doubling the amount of defconfigs we have to allow using FEL on any sunxi board, I would like to remove the Foo_FEL_defconfig files and make it possible to do a FEL build by doing something like this: make Foo_defconfig make menuconfig select FEL make Yes, this is exactly what I expect board maintainers. We had multiple entries in boards.cfg per board (with some differences in the options field) and I generated the correspoing defconfig files. But I guess it would be painful to maintain lots of defconfigs. I expect board maintainers will consolidate defconfigs like you are trying to do, and eventually, we will have one defconfig per board in the future. I was planning on taking a shot at this, but the different make menuconfig and make spl/menuconfigs have me somewhat confused (I've a decent knowledge of Kconfig from my kernel work). Perhaps you can give me some hints on how I can best implement the above ? Sounds good! I think it is good to add config FEL bool or something allowing users to enable/disable it. If it is a sunxi-specifi option, please add it to arch/arm/cpu/armv7/sunxi/Kconfig or board/sunxi/Kconfig. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Quick guide to Kconfig
Hi Ian, On Thu, 31 Jul 2014 16:07:54 +0100 Ian Campbell i...@hellion.org.uk wrote: On Thu, 2014-07-31 at 16:38 +0200, Hans de Goede wrote: make Foo_defconfig make menuconfig select FEL make I was hoping that I might eventually be able to do something like make Foo_defconfig CONFIG_SPL_FEL=y or perhaps make Foo_defconfig S:CONFIG_SPL_FEL=y and have it DTRT(tm). Sorry, we cannot override CONFIG macros from the command line; We have to run make menuconfig (or make spl/menuconfig) and toggle the option. I was planning on taking a shot at this, but the different make menuconfig and make spl/menuconfigs have me somewhat confused (I've a decent knowledge of Kconfig from my kernel work). I think part of the problem is that right now we are at Phase I of the switch to Kconfig, which is where the board.cfg settings have moved as a string into CONFIG_SYS_EXTRA_OPTIONS. I suppose Phase II is that the various maintainers implement proper Kconfig options for their platforms and transition the individual settings over to it. Eventually CONFIG_SYS_EXTRA_OPTIONS goes away. Exactly. CONFIG_SYS_EXTRA_OPTIONS is a temporary gimmick to migrate to Kconfig. Please note this option is marked as DEPRECATED. config SYS_EXTRA_OPTIONS string Extra Options (DEPRECATED) depends on !SPL_BUILD help The old configuration infrastructure (= mkconfig + boards.cfg) provided the extra options field. If you have something like HAS_BAR,BAZ=64, the optional options #define CONFIG_HAS #define CONFIG_BAZ 64 will be defined in include/config.h. This option was prepared for the smooth migration from the old configuration to Kconfig. Since this option will be removed sometime, new boards should not use this option. I do not recommend to use this option for new boards. Eventually (sooner rather than later, I think) we will want to have a first-class Kconfig setting for CONFIG_SPL_FEL and then things like make spl/menuconfig would let you enable FEL, I think/hope. Apologies if I've misunderstood something and am therefore talking nonsense ;-) Sounds nice, thanks! Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot