Re: [U-Boot] [PATCH v2] libfdt: Introduce new ARCH_FIXUP_FDT option
On 28.7.2016 04:24, Simon Glass wrote: > Hi Michal, > > On 24 July 2016 at 20:07, Simon Glass wrote: >> On 15 July 2016 at 01:35, Michal Simek wrote: >>> Add new Kconfig option to disable arch_fixup_fdt() calls for cases where >>> U-Boot shouldn't update memory setup in DTB file. >>> One example of usage of this option is to boot OS with different memory >>> setup than U-Boot use. >>> >>> Signed-off-by: Michal Simek >>> --- >>> >>> Changes in v2: >>> - Change logic to be possitive - sjg >>> >>> Kconfig | 9 + >>> arch/arm/lib/bootm-fdt.c | 2 ++ >>> arch/arm/lib/bootm.c | 2 ++ >>> arch/mips/lib/bootm.c| 2 ++ >>> common/image-fdt.c | 7 ++- >>> 5 files changed, 17 insertions(+), 5 deletions(-) >> >> Applied to u-boot-dm, thanks! > > Unfortunately this breaks pic32mzdask, a MIPS board. I did not notice > this earlier for some reason...perhaps it snuck in after my rebase. > Can you please take a look? Have sent v3. In v2 I didn't change that macro to follow positive configuration. It should be good now. BTW: Would it be possible to extend buildman to also report problems with defconfig? I see that more and more defconfigs. I personally run this loop time to time but will be good if this is the part of buildman. for i in `ls configs/xilinx_zynqmp_*`; do NAME=`basename $i`; echo $NAME; make $NAME; make savedefconfig; cp defconfig $i; done for i in `ls configs/zynq_*`; do NAME=`basename $i`; echo $NAME; make $NAME; make savedefconfig; cp defconfig $i; done for i in `ls configs/microblaze*`; do NAME=`basename $i`; echo $NAME; make $NAME; make savedefconfig; cp defconfig $i; done Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mmc: dw_mmc: transfer proper bytes to FIFO
Hi Ziyuan, On 07/28/2016 11:25 AM, Ziyuan Xu wrote: > The former implement, dw_mmc will push and pop the redundant data to > FIFO, we should transfer it according to the real size. Looks good to me. Acked-by: Jaehoon Chung Best Regards, Jaehoon Chung > > Signed-off-by: Ziyuan Xu > --- > > drivers/mmc/dw_mmc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c > index 2cf7bae..38d4a64 100644 > --- a/drivers/mmc/dw_mmc.c > +++ b/drivers/mmc/dw_mmc.c > @@ -126,6 +126,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, > struct mmc_data *data) > len = dwmci_readl(host, DWMCI_STATUS); > len = (len >> DWMCI_FIFO_SHIFT) & > DWMCI_FIFO_MASK; > + len = min(size, len); > for (i = 0; i < len; i++) > *buf++ = > dwmci_readl(host, DWMCI_DATA); > @@ -139,6 +140,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, > struct mmc_data *data) > len = fifo_depth - ((len >> > DWMCI_FIFO_SHIFT) & > DWMCI_FIFO_MASK); > + len = min(size, len); > for (i = 0; i < len; i++) > dwmci_writel(host, DWMCI_DATA, >*buf++); > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] mmc: dw_mmc: fix data starvation by host timeout under FIFO mode
Hi Ziyuan, On 07/28/2016 11:25 AM, Ziyuan Xu wrote: > This patch fixes data starvation by host timeout(HTO) error interrupt > which occurred under FIFO mode transfer on rk3036 board. > > The former implement, the actual bytes were transmitted may be less than > should be. The size will still subtract value of len in case of there is > no receive/transmit FIFO data request interrupt. Looks good to me. Acked-by: Jaehoon Chung Best Regards, Jaehoon Chung > > Signed-off-by: Ziyuan Xu > --- > > drivers/mmc/dw_mmc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c > index 38d4a64..41b7035 100644 > --- a/drivers/mmc/dw_mmc.c > +++ b/drivers/mmc/dw_mmc.c > @@ -120,6 +120,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, > struct mmc_data *data) > } > > if (host->fifo_mode && size) { > + len = 0; > if (data->flags == MMC_DATA_READ) { > if ((dwmci_readl(host, DWMCI_RINTSTS) & >DWMCI_INTMSK_RXDR)) { > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] treewide: move CONFIG_PHYS_64BIT to Kconfig
Masahiro-san >#if !defined(CONFIG_PPC_P5020) && !defined(CONFIG_PPC_P5040) #error Must call >Cyrus CONFIG with a specific CPU enabled. >#endif >diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index >0d51aeb..a11b692 100644 >--- a/include/configs/dra7xx_evm.h >+++ b/include/configs/dra7xx_evm.h >@@ -20,7 +20,6 @@ > #endif >#define CONFIG_VERY_BIG_RAM >-#define CONFIG_PHYS_64BIT Applied this patch on mainline branch, I see warning. It seems like CONFIG_PHYS_64BIT is not taking effect, the sizeof phys_addr_t is 4 bytes instead of 8 byte. board/ti/dra7xx/evm.c: In function 'dram_init_banksize': board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly truncated to unsigned type [-Woverflow] gd->bd->bi_dram[1].start = 0x2; ^ board/ti/dra7xx/evm.c: In function 'dram_init_banksize': board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly truncated to unsigned type [-Woverflow] gd->bd->bi_dram[1].start = 0x2; ^ Regards Ravi ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] treewide: move CONFIG_PHYS_64BIT to Kconfig
Masahiro-san >>#if !defined(CONFIG_PPC_P5020) && !defined(CONFIG_PPC_P5040) #error Must >>call Cyrus CONFIG with a specific CPU enabled. >>#endif >>diff --git a/include/configs/dra7xx_evm.h >>b/include/configs/dra7xx_evm.h index 0d51aeb..a11b692 100644 >>--- a/include/configs/dra7xx_evm.h >>+++ b/include/configs/dra7xx_evm.h >>@@ -20,7 +20,6 @@ >> #endif >>#define CONFIG_VERY_BIG_RAM >>-#define CONFIG_PHYS_64BIT >Applied this patch on mainline branch, I see warning. It seems like >CONFIG_PHYS_64BIT is not taking effect, the sizeof phys_addr_t is 4 bytes >instead of 8 byte. Due to removal of CONFIG_PHYS_64BIT in dra7xx_evm.h, phys_addr_t set to 4, and due to SDRAM init would have failed and u-boot prompt did not appear. I have defined CONFIG_PHYS_64BIT in dra7xx_evm.h, I did not see any warning and I could see u-boot prompt, worked fine. >>board/ti/dra7xx/evm.c: In function 'dram_init_banksize': >>board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly truncated to >>unsigned type [-Woverflow] >> gd->bd->bi_dram[1].start = 0x2; ^ >>board/ti/dra7xx/evm.c: In function 'dram_init_banksize': >>board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly truncated to >>unsigned type [-Woverflow] >> gd->bd->bi_dram[1].start = 0x2; ^ Regards Ravi ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if using driver model
Hi York, > -Original Message- > From: york sun > Sent: Wednesday, July 27, 2016 10:55 PM > To: Qianyu Gong ; u-boot@lists.denx.de; Simon Glass > > Cc: Shaohui Xie ; Zhiqiang Hou ; > Wenbin Song ; Yao Yuan ; Mingkai > Hu ; Prabhakar Kushwaha > > Subject: Re: [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if using > driver > model > > On 07/27/2016 03:00 AM, Qianyu Gong wrote: > > > > Hi York, > > > >> -Original Message- > >> From: york sun > >> Sent: Tuesday, July 26, 2016 12:26 PM > >> To: Qianyu Gong ; u-boot@lists.denx.de; > >> Prabhakar Kushwaha ; Mingkai Hu > >> > >> Cc: Shaohui Xie ; Zhiqiang Hou > >> ; Wenbin Song > >> Subject: Re: [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if > >> using driver model > >> > >> On 07/25/2016 09:05 PM, Qianyu Gong wrote: > >>> Hi York, > >>> > >>> > >>> As the drivel model is a trend anyway, I just doubt if it is > >>> necessary to support non-DM for the new platforms. > >>> > >>> In fact, we have discarded configurations for non-DM SPI such as SPI > >>> mode related macros > >>> > >>> when doing LS1043A upstream. So the current configuration of LS1043A > >>> doesn't support non-DM SPI. > >>> > >>> > >>> LS1012A supports both ways but the code doesn't differentiate the > >>> respective macros. > >>> > >>> The CONFIG_ENV_SPI_* are set for FMAN ucode at the beginning but I > >>> just find that LS1012A doesn't have FMAN. So it's dead code if using > >>> DM or just duplicated code that is the same with defines in > >>> common/env_sf.c if using non-DM. > >> > >> Qianyu, > >> > >> If DM_SPI_FLASH should always be set, please select it from Kconfig. > >> > >> York > >> > >> > > > > For LS1043A, DM_SPI_FLASH is still defined in > include/configs/ls1043a_common.h. > > So I think it won't be affected by menuconfig. But it should have been > > moved to > defconfig. > > > > As DM_SPI_FLASH doesn't depend on any platforms as per > > "drivers/mtd/spi/Kconfig", I can just focus on solving the issue > > caused by deselecting DM_SPI_FLASH. I also discussed with Yuan Yao. > > > > So how about I adding anything in Fman Kconfig like this? > > " > > config SYS_QE_FW_IN_SPIFLASH > > depends on (FSL_LAYERSCAPE && DM_SPI_FLASH) || PPC " > > But as for the existing code, it may need more efforts. > > > > I think you can add "select" for the platforms which always use DM_SPI_FLASH, > for > example TARGET_LS1043AQDS. > > Simon, > > Please comment if this is a good practice. > > York > If one doesn't select DSPI/QSPI on LS1043A boards, there would be no need to select DM_SPI_FLASH. So to some extent it's not always used, correct? Regards, Qianyu > > > > Regards, > > Qianyu > > > >>> > >>> > >>> > >>> Regards, > >>> > >>> Qianyu > >>> > >>> > >>> -- > >>> -- > >>> *From:* york sun > >>> *Sent:* Tuesday, July 26, 2016 6:15:14 AM > >>> *To:* Qianyu Gong; u-boot@lists.denx.de; Prabhakar Kushwaha; Mingkai > >>> Hu > >>> *Cc:* Shaohui Xie; Zhiqiang Hou; Wenbin Song > >>> *Subject:* Re: [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* > >>> if using driver model > >>> > >>> On 07/20/2016 03:51 AM, Gong Qianyu wrote: > When using SPI driver model, it will get the values from DT. So > there is no need to set CONFIG_ENV_SPI_MAX_HZ and > CONFIG_ENV_SPI_MODE any more. > > >>> > >>> You indicate these macros are not needed _if_ using driver model. > >>> You presume the driver model is always used. You have > >>> CONFIG_DM_SPI_FLASH in defconfig, but you don't have it selected in > >>> Kconfig for those platforms. This can leave a possible configuration > >>> if one runs "make menuconfig" and deselect DM_SPI_FLASH. > >>> > >>> York > >>> > >>> > Signed-off-by: Gong Qianyu > --- > include/configs/ls1012a_common.h | 2 -- > include/configs/ls1043a_common.h | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/include/configs/ls1012a_common.h > b/include/configs/ls1012a_common.h > index fba2fac..1602f09 100644 > --- a/include/configs/ls1012a_common.h > +++ b/include/configs/ls1012a_common.h > @@ -52,8 +52,6 @@ > #define CONFIG_SYS_FMAN_FW_ADDR 0x400d > #define CONFIG_ENV_SPI_BUS 0 > #define CONFIG_ENV_SPI_CS0 > -#define CONFIG_ENV_SPI_MAX_HZ100 > -#define CONFIG_ENV_SPI_MODE 0x03 > #define CONFIG_SPI_FLASH_SPANSION > #define CONFIG_FSL_SPI_INTERFACE > #define CONFIG_SF_DATAFLASH > diff --git a/include/configs/ls1043a_common.h > b/include/configs/ls1043a_common.h > index b0d4a8d..028f7d9 100644 > --- a/include/configs/ls1043a_common.h > +++ b/include/configs/ls1043a_common.h > @@ -222,8 +222,6 @@ > #define CONFIG_SYS_FMAN_FW_ADDR 0x400d > #define CONFIG_ENV_SPI_BUS 0 > #define CONFIG_ENV_SPI_CS0 > -#d
Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards
Hi Yangbo, On 07/28/2016 11:45 AM, Yangbo Lu wrote: > Hi Ziyuan and Jaehoon, > > >> -Original Message- >> From: Ziyuan Xu [mailto:xzy...@rock-chips.com] >> Sent: Wednesday, July 27, 2016 9:37 PM >> To: Jaehoon Chung; Yangbo Lu; u-boot@lists.denx.de; Tom Rini >> Cc: Pantelis Antoniou >> Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC >> cards >> >> >> >> On 2016年07月27日 19:15, Jaehoon Chung wrote: >>> On 07/27/2016 04:28 PM, Yangbo Lu wrote: Hi Tom, Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year. And another my mmc patch also needs to be reviewed. I submitted in May. Please help. http://patchwork.ozlabs.org/patch/624448/ Thank you very much. Best regards, Yangbo Lu > -Original Message- > From: Yangbo Lu [mailto:yangbo...@nxp.com] > Sent: Wednesday, March 09, 2016 11:00 AM > To: u-boot@lists.denx.de > Cc: Pantelis Antoniou; Yangbo Lu > Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards > > When the MMC framework was added in u-boot, the mmc_go_idle was > added before mmc_send_op_cond_iter in function mmc_send_op_cond > annotating that some cards seemed to need this. Actually, we still > need to do this in function mmc_complete_op_cond for those cards. > This has been verified on Micron MTFC4GACAECN eMMC chip. >>> If there is no go_idle(), then what happen? >>> If you share the information more, i can check the more.. >> Sounds interesting, I also want want to know what happen? >> It seems like you failed in CMD1? The eMMC device was always in busy >> device within 1 second? > > [Lu Yangbo-B47093] This was an issue which our customer reported and required > us to fix in March. > They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and reported > they had to add CMD0 as below. > Otherwise it couldn’t read OCR. > > static int mmc_complete_op_cond(struct mmc *mmc) { > struct mmc_cmd cmd; > int timeout = 1000; > uint start; > int err; > > #if defined (XXX_CHANGED) > // our eMMC chip (Micron MTFC4GACAECN) requires that it be put in idle > mode before > // negociating the operating voltage levels. > mmc_go_idle(mmc); > #endif Well, it seems to fix workaround. mmc_go_idle() means Device Reset. mmc_complete_op_cond() function has added for reducing the booting time. If mmc_go_idle() is added at here, there is no benefit, and it should be back to old concept. I don't agree this patch..now. Best Regards, Jaehoon Chung > > > I hadn’t reproduce this to get more details about this issue since I didn’t > have one this kind eMMC card that time. > Thanks. > >>> >>> Best Regards, >>> Jaehoon Chung >>> > Signed-off-by: Yangbo Lu > --- > drivers/mmc/mmc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index > ede5d6e..82e3268 > 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc) > uint start; > int err; > > + /* Some cards seem to need this */ > + mmc_go_idle(mmc); > + > mmc->op_cond_pending = 0; > if (!(mmc->ocr & OCR_BUSY)) { > start = get_timer(0); > -- > 2.1.0.27.g96db324 ___ 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 mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] mmc: add workaround for eSDHC erratum A009620
> -Original Message- > From: york sun > Sent: Wednesday, July 27, 2016 10:48 PM > To: Yangbo Lu; u-boot@lists.denx.de > Subject: Re: [PATCH 4/4] mmc: add workaround for eSDHC erratum A009620 > > On 07/27/2016 12:10 AM, Yangbo Lu wrote: > >> -Original Message- > >> From: york sun > >> Sent: Tuesday, July 26, 2016 1:38 AM > >> To: Yangbo Lu; u-boot@lists.denx.de > >> Subject: Re: [PATCH 4/4] mmc: add workaround for eSDHC erratum > >> A009620 > >> > >> On 05/20/2016 03:20 AM, Yangbo Lu wrote: > >>> Erratum Title: > >>> Data timeout error not getting set in case of command with busy > >>> response (R1b) as well as for busy period after last write block > >>> transfer. > >>> > >>> Description: > >>> In the event that a busy timeout occurs for a command with a busy > >>> response (e.g. R1b response) as well as busy period after the last > >>> write block, the eSDHC does not set the IRQSTAT[DTOE] bit or the > >>> IRQSTAT[TC]. Therefore, the current command transfer is never > completed. > >>> > >>> Workaround: > >>> Workaround for CMD with busy: > >>> Don't set the XFRTYP[RSP]=2'b11 for commands with busy response and > >>> poll the busy status of the card from the PRSSTAT[DLSL] > >>> > >>> Workaround for busy period after last write block: > >>> 1. After the command completion interrupt (IRQSTAT[CC]), wait for > >>>de-assertion of PRSTAT[WTA]. > >>> 2. Once PRSTAT[WTA] is de-asserted, start the software timer and poll > >>>the busy signal (DAT0) using PRSTAT[DLSL[0]]. > >>> 3. Wait for DAT0 signal to go high (which indicate transfer complete) > >>>or software timer expiry (which indicate data timeout error). > >>> 4. Issue soft reset for data (SYSCTL[RSTD]). > >>> 5. In case of data timeout error (detected in step 3) perform the > >>>error recovery. > >>> > >>> The workaround for CMD with busy has already been applied in eSDHC > >>> driver. This patch is to add workaround for the 2nd issue, and the > >>> fixup platforms include PowerPC(P1010/P2020/P5020/P5040/T1024/T1040/ > >>> T2080/T4240) and ARM(LS1021A/LS1043A/LS2080A). > >>> > >>> Signed-off-by: Yangbo Lu > >>> --- > >>> arch/powerpc/include/asm/config_mpc85xx.h | 8 > >>> drivers/mmc/fsl_esdhc.c | 26 > >> ++ > >>> include/configs/ls1021aqds.h | 1 + > >>> include/configs/ls1021atwr.h | 1 + > >>> include/configs/ls1043a_common.h | 1 + > >>> include/configs/ls2080a_simu.h| 1 + > >>> include/configs/ls2080aqds.h | 1 + > >>> include/configs/ls2080ardb.h | 1 + > >>> include/fsl_esdhc.h | 1 + > >>> 9 files changed, 41 insertions(+) > >> > >> Yangbo, > >> > >> Why do you put the macro CONFIG_SYS_FSL_ERRATUM_ESDHC_A009620 in > >> board header file if the erratum applies to the SoC? > >> > >> York > >> > > [Lu Yangbo-B47093] Thanks a lot, York. > > Could you suggest any better place where I can put this macro? > > I didn't find such a good place :( > > > > arch/arm/include/asm/arch-ls102xa/config.h > arch/arm/include/asm/arch-fsl-layerscape/config.h > > York [Lu Yangbo-B47093] Got it. Thanks a lot, York :) I will send the new version. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx7dsabresd_secure_defconfig: Use CONFIG_ARMV7_BOOT_SEC_DEFAULT
On 22/07/2016 20:21, Fabio Estevam wrote: > There is no need for introducing MX7_SEC, as there is the > CONFIG_ARMV7_BOOT_SEC_DEFAULT option for this purpose. > > Switch to CONFIG_ARMV7_BOOT_SEC_DEFAULT and get rid of > MX7_SEC. > > Tested by booting a 4.1.15 NXP kernel with mx7dsabresd_secure_defconfig > target. > > Signed-off-by: Fabio Estevam > --- > arch/arm/imx-common/Kconfig | 9 - > configs/mx7dsabresd_secure_defconfig | 2 +- > 2 files changed, 1 insertion(+), 10 deletions(-) > > diff --git a/arch/arm/imx-common/Kconfig b/arch/arm/imx-common/Kconfig > index c6b38bc..1b7da5a 100644 > --- a/arch/arm/imx-common/Kconfig > +++ b/arch/arm/imx-common/Kconfig > @@ -17,12 +17,3 @@ config IMX_BOOTAUX > depends on ARCH_MX7 || ARCH_MX6 > help > bootaux [addr] to boot auxiliary core. > - > -config MX7_SEC > - bool "Support booting MX7 in secure mode" > - depends on ARCH_MX7 > - help > - NXP kernel requires to boot MX7 in secure mode. Select > - this options if you want to boot a NXP kernel. In order > - to boot a mainline kernel this option needs to be > - unselected. > diff --git a/configs/mx7dsabresd_secure_defconfig > b/configs/mx7dsabresd_secure_defconfig > index 0a3930e..aa92a38 100644 > --- a/configs/mx7dsabresd_secure_defconfig > +++ b/configs/mx7dsabresd_secure_defconfig > @@ -38,4 +38,4 @@ CONFIG_G_DNL_MANUFACTURER="FSL" > CONFIG_G_DNL_VENDOR_NUM=0x0525 > CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 > CONFIG_OF_LIBFDT=y > -CONFIG_MX7_SEC=y > +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] arm: imx: Add support for Advantech DMS-BA16 board
Hi Akshay, this looks good to me. I apply it, and I let you think about an upgrade to SPL for this board. Best regards, Stefano Babic On 21/07/2016 16:29, Akshay Bhat wrote: > Add support for Advantech DMS-BA16 board. The board is based on Advantech > BA16 module which has a i.MX6D processor. The board supports: > - FEC Ethernet > - USB Ports > - SDHC and MMC boot > - SPI NOR > - LVDS and HDMI display > > Basic information about the module: > - Module manufacturer: Advantech > - CPU: Freescale ARM Cortex-A9 i.MX6D > - SPECS: > Up to 2GB Onboard DDR3 Memory; > Up to 16GB Onboard eMMC NAND Flash > Supports OpenGL ES 2.0 and OpenVG 1.1 > HDMI, 24-bit LVDS > 1x UART, 2x I2C, 8x GPIO, > 4x Host USB 2.0 port, 1x USB OTG port, > 1x micro SD (SDHC),1x SDIO, 1x SATA II, > 1x 10/100/1000 Mbps Ethernet, 1x PCIe X1 Gen2 > > Signed-off-by: Akshay Bhat > Cc: u-boot@lists.denx.de > Cc: sba...@denx.de > --- > > v1 -> v2: > Address comments made by Stefano Babic: > - Remove redundant clock enable code in .cfg > - Use register names instead of hardcoded address in .cfg > - Factorize .cfg into several files to make it modular for re-use > - Use imx_ddr_size instead of get_ram_size > - Fix multiline comments > - Move USB gadget related CONFIG_ from header file to defconfig > > arch/arm/cpu/armv7/mx6/Kconfig | 5 + > board/advantech/dms-ba16/Kconfig | 27 ++ > board/advantech/dms-ba16/MAINTAINERS | 8 + > board/advantech/dms-ba16/Makefile| 8 + > board/advantech/dms-ba16/clocks.cfg | 25 ++ > board/advantech/dms-ba16/ddr-setup.cfg | 39 +++ > board/advantech/dms-ba16/dms-ba16.c | 570 > +++ > board/advantech/dms-ba16/dms-ba16_1g.cfg | 25 ++ > board/advantech/dms-ba16/dms-ba16_2g.cfg | 25 ++ > board/advantech/dms-ba16/micron-1g.cfg | 63 > board/advantech/dms-ba16/samsung-2g.cfg | 63 > configs/dms-ba16-1g_defconfig| 34 ++ > configs/dms-ba16_defconfig | 33 ++ > include/configs/advantech_dms-ba16.h | 315 + > 14 files changed, 1240 insertions(+) > create mode 100644 board/advantech/dms-ba16/Kconfig > create mode 100644 board/advantech/dms-ba16/MAINTAINERS > create mode 100644 board/advantech/dms-ba16/Makefile > create mode 100644 board/advantech/dms-ba16/clocks.cfg > create mode 100644 board/advantech/dms-ba16/ddr-setup.cfg > create mode 100644 board/advantech/dms-ba16/dms-ba16.c > create mode 100644 board/advantech/dms-ba16/dms-ba16_1g.cfg > create mode 100644 board/advantech/dms-ba16/dms-ba16_2g.cfg > create mode 100644 board/advantech/dms-ba16/micron-1g.cfg > create mode 100644 board/advantech/dms-ba16/samsung-2g.cfg > create mode 100644 configs/dms-ba16-1g_defconfig > create mode 100644 configs/dms-ba16_defconfig > create mode 100644 include/configs/advantech_dms-ba16.h > > diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig > index 663f970..1e4a1cb 100644 > --- a/arch/arm/cpu/armv7/mx6/Kconfig > +++ b/arch/arm/cpu/armv7/mx6/Kconfig > @@ -35,6 +35,10 @@ choice > prompt "MX6 board select" > optional > > +config TARGET_ADVANTECH_DMS_BA16 > + bool "Advantech dms-ba16" > + select MX6Q > + > config TARGET_ARISTAINETOS > bool "aristainetos" > > @@ -184,6 +188,7 @@ config SYS_SOC > default "mx6" > > source "board/ge/bx50v3/Kconfig" > +source "board/advantech/dms-ba16/Kconfig" > source "board/aristainetos/Kconfig" > source "board/bachmann/ot1200/Kconfig" > source "board/barco/platinum/Kconfig" > diff --git a/board/advantech/dms-ba16/Kconfig > b/board/advantech/dms-ba16/Kconfig > new file mode 100644 > index 000..cc5b4e3 > --- /dev/null > +++ b/board/advantech/dms-ba16/Kconfig > @@ -0,0 +1,27 @@ > +choice > + prompt "DDR Size" > + default SYS_DDR_2G > + > +config SYS_DDR_1G > + bool "1GiB" > + > +config SYS_DDR_2G > + bool "2GiB" > + > +endchoice > + > +config IMX_CONFIG > + default "board/advantech/dms-ba16/dms-ba16_2g.cfg" if SYS_DDR_2G > + default "board/advantech/dms-ba16/dms-ba16_1g.cfg" if SYS_DDR_1G > + > +config SYS_BOARD > + default "dms-ba16" > + > +config SYS_VENDOR > + default "advantech" > + > +config SYS_SOC > + default "mx6" > + > +config SYS_CONFIG_NAME > + default "advantech_dms-ba16" > diff --git a/board/advantech/dms-ba16/MAINTAINERS > b/board/advantech/dms-ba16/MAINTAINERS > new file mode 100644 > index 000..e8ea3dd > --- /dev/null > +++ b/board/advantech/dms-ba16/MAINTAINERS > @@ -0,0 +1,8 @@ > +ADVANTECH_DMS-BA16 BOARD > +M: Akshay Bhat > +M: Ken Lin > +S: Maintained > +F: board/advantech/dms-ba16/ > +F: include/configs/advantech_dms-ba16.h > +F: configs/dms-ba16_defconfig > +F: configs/dms-ba16-1g_defconfig > diff --git a/board/advantech/dms-ba16/Makefile > b/board/advantech/dms-ba16/Makefile > new file mode 100644 > index 000..ec9aaa8 > --- /dev/null > +++ b
[U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). This patch fixes the U-Boot was stuck in invalidate_dcache_all() before booting linux kernel, which occurred on rk3288-base development board such as evb-rk3288, rock2-rk3288. And something output via console like: => bootz 0x200 0x0200 ramdisk start = 0x, ramdisk end = 0x Continuing to boot without FDT Initial value for argc=3 Final value for argc=3 using: ATAGS Starting kernel ... Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Signed-off-by: Ziyuan Xu --- arch/arm/include/asm/system.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 2bdc0be..12d4ba0 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); */ void save_boot_params_ret(void); -#define isb() __asm__ __volatile__ ("" : : : "memory") - #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); #ifdef __ARM_ARCH_7A__ +#define isb() __asm__ __volatile__ ("isb" : : : "memory") + #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") #else +#define isb() __asm__ __volatile__ ("" : : : "memory") + #define wfi() #endif -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] board: tbs2910: fix HDMI pre-console buffer
On 27/07/2016 16:07, Soeren Moch wrote: > HDMI output must be enabled very early to also enable the pre-console buffer > > Signed-off-by: Soeren Moch > --- > Cc: Stefano Babic > Cc: u-boot@lists.denx.de > --- > include/configs/tbs2910.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h > index 7c89e5f..640bce4 100644 > --- a/include/configs/tbs2910.h > +++ b/include/configs/tbs2910.h > @@ -185,7 +185,9 @@ > "setenv stderr serial;\0" \ > "set_con_hdmi=setenv stdout serial,vga; " \ > "setenv stderr serial,vga;\0" \ > - "stdin=serial,usbkbd;\0" > + "stderr=serial,vga;\0" \ > + "stdin=serial,usbkbd;\0" \ > + "stdout=serial,vga;\0" > > #define CONFIG_BOOTCOMMAND \ > "mmc rescan; " \ > Reviewed-by: Stefano Babic Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] board: tbs2910: always enable usbkbd
On 27/07/2016 16:07, Soeren Moch wrote: > 'usb start' is much faster now, so always enable usb keyboard > > Signed-off-by: Soeren Moch > --- > Cc: Stefano Babic > Cc: u-boot@lists.denx.de > --- > include/configs/tbs2910.h | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h > index ec0bf05..7c89e5f 100644 > --- a/include/configs/tbs2910.h > +++ b/include/configs/tbs2910.h > @@ -129,9 +129,9 @@ > #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE > #define CONFIG_SYS_STDIO_DEREGISTER > #define CONFIG_PREBOOT \ > + "usb start; " \ > "if hdmidet; then " \ > - "usb start; " \ > - "run set_con_usb_hdmi; " \ > + "run set_con_hdmi; " \ > "else " \ > "run set_con_serial; " \ > "fi;" > @@ -181,12 +181,11 @@ > "bootm 0x1080 0x10d0\0" \ > "console=ttymxc0\0" \ > "fan=gpio set 92\0" \ > - "set_con_serial=setenv stdin serial; " \ > - "setenv stdout serial; " \ > + "set_con_serial=setenv stdout serial; " \ > "setenv stderr serial;\0" \ > - "set_con_usb_hdmi=setenv stdin serial,usbkbd; " \ > - "setenv stdout serial,vga; " \ > - "setenv stderr serial,vga;\0" > + "set_con_hdmi=setenv stdout serial,vga; " \ > + "setenv stderr serial,vga;\0" \ > + "stdin=serial,usbkbd;\0" > > #define CONFIG_BOOTCOMMAND \ > "mmc rescan; " \ > Reviewed-by: Stefano Babic Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4] make rs232 and dio board-specific
On 15/07/2016 16:14, Tim Harvey wrote: > The Ventana U-Boot target supports a family of IMX6 based boards (6 boards > currently) which have a variety of features. Make RS232 and the number of > digital IO's baseboard specific. > > Tim Harvey (4): > imx: ventana: make RS232 enable board specific > imx: ventana: make number of digital I/O's dynamic > imx: ventana: add extra DIO's for GW5520 > imx: ventana: make hwconfig initialize based on board configuration > > board/gateworks/gw_ventana/common.c | 469 > +--- > board/gateworks/gw_ventana/common.h | 10 +- > board/gateworks/gw_ventana/gw_ventana.c | 18 +- > include/configs/gw_ventana.h| 5 +- > 4 files changed, 278 insertions(+), 224 deletions(-) > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] imx: ventana: default pci to disabled
On 17/06/2016 15:20, Tim Harvey wrote: > The IMX6 PCIe host controller does not have a proper reset and as such there > are several issues that can arise if PCI is enabled in the bootloader follwed > by Linux trying to re-configure LTSSM and/or toggling PERST# to the devices. > > For now, the best approach seems to default to disabling PCI by defaulting > pciedisable=1. This can be overridden by the user if they need PCI in the > bootloader, for example: > - GW552x needing ethernet access in bootloader > - GW16082 expansion board needing a device-tree fixup for irq mapping > > Signed-off-by: Tim Harvey > --- > include/configs/gw_ventana.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h > index 982ddba..4acfca6 100644 > --- a/include/configs/gw_ventana.h > +++ b/include/configs/gw_ventana.h > @@ -274,6 +274,7 @@ > "dio0:mode=gpio;dio1:mode=gpio;dio2:mode=gpio;dio3:mode=gpio\0" \ > > #define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ > + "pcidisable=1\0" \ > "usb_pgood_delay=2000\0" \ > "console=ttymxc1\0" \ > "bootdevs=usb mmc sata flash\0" \ > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] pci: allow disabling of pci init/enum via env
On 17/06/2016 15:20, Tim Harvey wrote: > Signed-off-by: Tim Harvey > --- > drivers/pci/pci.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index 4b73a0f..6b36c18 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -458,6 +458,10 @@ void pci_init(void) > { > hose_head = NULL; > > + /* allow env to disable pci init/enum */ > + if (getenv("pcidisable") != NULL) > + return; > + > /* now call board specific pci_init()... */ > pci_init_board(); > } > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] imx: ventana: add dt fixup for GW16082 irq mapping
On 17/06/2016 15:10, Tim Harvey wrote: > The GW16082 mini-PCI expansion mezzanine uses a TI XIO2001 PCIe-to-PCI > bridge with legacy INTA/B/C/D interrupts. These interrupts are assigned > in the reverse order according to the PCI spec. > > If the TI bridge is found on the Ventana PCI bus, add device-tree nodes > according to bus enumeration explicitly defining the interrupt mapping > to override the default PCI mapping in the Linux kernel. This allows > the GW16082 to work with upstream kernels that support device-tree > irq parsing. > > Signed-off-by: Tim Harvey > --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] imx: ventana: add dt fixup for eth1 mac-address
On 17/06/2016 15:10, Tim Harvey wrote: > Ventana boards with a PCI Marvell Sky2 GigE MAC require the MAC address to > be placed in a DT node in order for the mainline linux driver to obtain it. > > Signed-off-by: Tim Harvey > --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: ventana: re-enable late board info display
On 29/06/2016 17:58, Tim Harvey wrote: > 3b1f681131149b5f62602f582a7e60b0185a2a49 caused a regression that removes > board info dispaly for Gateworks Ventana boards because it made the invalid > assumption that CONFIG_DISPLAY_BOARDINFO_LATE was the same thing as > CONFIG_DISPLAY_BOARDINFO. > > Ventana needs to call show_board_info in late init because we need to have > the i2c eeprom based model info. Re-define CONFIG_DISPLAY_BOARDINFO_LATE > to allow that to happen. > > Cc: Peter Robinson > Signed-off-by: Tim Harvey > --- > include/configs/gw_ventana.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h > index 4acfca6..343f3c5 100644 > --- a/include/configs/gw_ventana.h > +++ b/include/configs/gw_ventana.h > @@ -33,6 +33,8 @@ > #include "imx6_spl.h" /* common IMX6 SPL configuration */ > #include "mx6_common.h" > #undef CONFIG_SPL_EXT_SUPPORT > +#undef CONFIG_DISPLAY_BOARDINFO > +#define CONFIG_DISPLAY_BOARDINFO_LATE > > #define CONFIG_MACH_TYPE 4520 /* Gateworks Ventana Platform */ > > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] imx: ventana: add dt fixup for watchdog external reset
On 15/07/2016 16:16, Tim Harvey wrote: > Tim Harvey (2): > imx: ventana: refactor board-specific dt fixups (no functional change) > imx: ventana: add dt fixup for watchdog external reset > > board/gateworks/gw_ventana/gw_ventana.c | 192 > > 1 file changed, 121 insertions(+), 71 deletions(-) > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/8] basic rockchip rk3188 support
Hi Simon, Am Mittwoch, 27. Juli 2016, 21:42:47 schrieb Simon Glass: > On 22 July 2016 at 15:51, Heiko Stuebner wrote: > > Second version. Simon already applied the cleanup patches from my > > first version. I've tried to address Simons comments and hopefully > > haven't overlooked any. > > > > SPL is still missing, so following Simons comment from earlier > > it cannot go in yet, but maybe the first two cleanups can. > > Re the first patch, if you can resend it as a 'move' patch then I can > apply it. Please base on u-boot-rockchip/master. ok, I can do that :-) > For rk3188, yes I would prefer to wait until we have the proper SPL. > It sounds like you are close? I don't have an rk3188 board - I could > get a TV box with that chip but I'm not sure if it would work for > development. I wouldn't call it close, but it's moving along somewhat and we figure out the special requirements step by step. As for yout getting a box, I guess the worst part is finding serial pin testpoints. For booting the rk3188 seems to be the easiest of them all - if you plug in a suitably prepared card, it will always prefer this one over everything else. Heiko > > changes in v2: > > - move clock drivers to subdirectory > > - use already available log2 function in clock drivers > > - SPDX header in clock bindings > > - showcase rk3188 arch code and rock board > > > > Heiko Stuebner (10): > > rockchip: move clock drivers into a subdirectory > > rockchip: remove log2 reimplementation from clock drivers > > rockchip: rk3188: Add header files for PMU and GRF > > rockchip: rk3188: Add pinctrl driver > > rockchip: rk3188: Bring in rk3066/rk3188 clock bindings > > rockchip: rk3188: Add clock driver > > rockchip: rk3188: add core support > > rockchip: rk3188: Radxa Rock board > > add unfinished SPL support > > hacks to make my rock netboot a fit image > > > > arch/arm/dts/Makefile | 1 + > > arch/arm/dts/rk3188-radxarock.dts | 406 +++ > > arch/arm/dts/rk3188.dtsi| 631 ++ > > arch/arm/dts/rk3xxx.dtsi| 431 > > arch/arm/include/asm/arch-rockchip/cru_rk3188.h | 183 + > > arch/arm/include/asm/arch-rockchip/grf_rk3188.h | 589 > > arch/arm/include/asm/arch-rockchip/pmu_rk3188.h | 36 + > > arch/arm/mach-rockchip/Kconfig | 11 + > > arch/arm/mach-rockchip/Makefile | 2 + > > arch/arm/mach-rockchip/rk3188-board-spl.c | 190 ++ > > arch/arm/mach-rockchip/rk3188/Kconfig | 20 + > > arch/arm/mach-rockchip/rk3188/Makefile | 10 + > > arch/arm/mach-rockchip/rk3188/clk_rk3188.c | 17 + > > arch/arm/mach-rockchip/rk3188/reset_rk3188.c| 47 ++ > > arch/arm/mach-rockchip/rk3188/sdram_rk3188.c| 839 > > +++ arch/arm/mach-rockchip/rk3188/syscon_rk3188.c > > | 24 + > > board/radxa/rock/Kconfig| 15 + > > board/radxa/rock/MAINTAINERS| 6 + > > board/radxa/rock/Makefile | 7 + > > board/radxa/rock/rock.c | 32 + > > configs/rock_defconfig | 80 +++ > > drivers/clk/Makefile| 3 +- > > drivers/clk/clk_rk3036.c| 386 --- > > drivers/clk/clk_rk3288.c| 851 > > drivers/clk/rockchip/Makefile > > | 9 + > > drivers/clk/rockchip/clk_rk3036.c | 382 +++ > > drivers/clk/rockchip/clk_rk3188.c | 493 ++ > > drivers/clk/rockchip/clk_rk3288.c | 847 > > +++ drivers/pinctrl/Kconfig > > | 9 + > > drivers/pinctrl/rockchip/Makefile | 1 + > > drivers/pinctrl/rockchip/pinctrl_rk3188.c | 613 + > > drivers/usb/host/dwc2.c | 4 +- > > include/configs/rk3188_common.h | 109 +++ > > include/configs/rock.h | 66 ++ > > include/dt-bindings/clock/rk3066a-cru.h | 32 + > > include/dt-bindings/clock/rk3188-cru-common.h | 248 +++ > > include/dt-bindings/clock/rk3188-cru.h | 48 ++ > > tools/rkcommon.c| 1 + > > 38 files changed, 6438 insertions(+), 1241 deletions(-) > > create mode 100644 arch/arm/dts/rk3188-radxarock.dts > > create mode 100644 arch/arm/dts/rk3188.dtsi > > create mode 100644 arch/arm/dts/rk3xxx.dtsi > > create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3188.h > > create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rk3188.h > > create mode 100644 arch/arm/include/asm/arch-rockchip/pmu_rk3188.h > > create mode 100644 arch/arm/mach-rockchip/rk3188-board-spl.c > > create mode 100644 arch/arm/mach-rockchip/rk3188/Kconfig > > create mode 100644
Re: [U-Boot] [PATCH] imx: ventana: enable splashscreen support
Hi Tim, On 15/07/2016 16:17, Tim Harvey wrote: > Signed-off-by: Tim Harvey > --- > include/configs/gw_ventana.h | 7 --- > tools/logos/gateworks.bmp| Bin 0 -> 56202 bytes > 2 files changed, 4 insertions(+), 3 deletions(-) > create mode 100644 tools/logos/gateworks.bmp > > diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h > index 1bd13fe..61242a1 100644 > --- a/include/configs/gw_ventana.h > +++ b/include/configs/gw_ventana.h > @@ -191,15 +191,15 @@ > #define CONFIG_CFB_CONSOLE > #define CONFIG_VGA_AS_SINGLE_DEVICE > #define CONFIG_SYS_CONSOLE_IS_IN_ENV > -#define CONFIG_VIDEO_BMP_RLE8 > -#define CONFIG_SPLASH_SCREEN > -#define CONFIG_BMP_16BPP > #define CONFIG_VIDEO_LOGO > #define CONFIG_IPUV3_CLK 26000 > #define CONFIG_CMD_HDMIDETECT > #define CONFIG_CONSOLE_MUX > #define CONFIG_IMX_HDMI > #define CONFIG_IMX_VIDEO_SKIP > +#define CONFIG_VIDEO_BMP_LOGO > +#define CONFIG_SPLASH_SCREEN_ALIGN > +#define CONFIG_HIDE_LOGO_VERSION /* Custom config to hide U-boot version */ > > /* Miscellaneous configurable options */ > #define CONFIG_HWCONFIG > @@ -274,6 +274,7 @@ > > #define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ > "pcidisable=1\0" \ > + "splashpos=m,m\0" \ > "usb_pgood_delay=2000\0" \ > "console=ttymxc1\0" \ > "bootdevs=usb mmc sata flash\0" \ > diff --git a/tools/logos/gateworks.bmp b/tools/logos/gateworks.bmp > new file mode 100644 > index > ..01edb7cedf46c3441619213b6baf33410055601f This is done on several boards, but I would ask if this is strictly required. You can already display a bmp on the screen, and it is a more flexible way as linked the image with U-Boot. Do you really need CONFIG_VIDEO_BMP_LOGO ? Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] mx6cuboxi: Replace is_mx6q() for macro
On 22/07/2016 14:11, Breno Lima wrote: > It's not necessary to implement the is_mx6q function, there is a macro in > sys_proto.h already implemented. > > Signed-off-by: Breno Lima > --- > board/solidrun/mx6cuboxi/mx6cuboxi.c | 12 ++-- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c > b/board/solidrun/mx6cuboxi/mx6cuboxi.c > index bcc9729..cafa348 100644 > --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c > +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c > @@ -367,14 +367,6 @@ int checkboard(void) > return 0; > } > > -static bool is_mx6q(void) > -{ > - if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) > - return true; > - else > - return false; > -} > - > int board_late_init(void) > { > #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG > @@ -383,7 +375,7 @@ int board_late_init(void) > else > setenv("board_name", "CUBOXI"); > > - if (is_mx6q()) > + if (is_mx6dq()) > setenv("board_rev", "MX6Q"); > else > setenv("board_rev", "MX6DL"); > @@ -615,7 +607,7 @@ static void spl_dram_init(int width) > .ddr_type = DDR_TYPE_DDR3, > }; > > - if (is_cpu_type(MXC_CPU_MX6D) || is_cpu_type(MXC_CPU_MX6Q)) > + if (is_mx6dq()) > mx6dq_dram_iocfg(width, &mx6q_ddr_ioregs, &mx6q_grp_ioregs); > else > mx6sdl_dram_iocfg(width, &mx6dl_ddr_ioregs, &mx6sdl_grp_ioregs); > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] wandboard: Replace is_cpu_type() for macro
On 22/07/2016 14:11, Breno Lima wrote: > It's not necessary to use the is_cpu_type function, there is a macro in > sys_proto.h already implemented. > > Signed-off-by: Breno Lima > --- > board/wandboard/wandboard.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c > index 8340dd1..d7c1142 100644 > --- a/board/wandboard/wandboard.c > +++ b/board/wandboard/wandboard.c > @@ -390,7 +390,7 @@ int board_late_init(void) > #endif > > #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG > - if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) > + if (is_mx6dq()) > setenv("board_rev", "MX6Q"); > else > setenv("board_rev", "MX6DL"); > @@ -409,7 +409,7 @@ int board_init(void) > gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; > > setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info); > - if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) > + if (is_mx6dq()) > setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c2_pad_info); > else > setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info); > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] cgtqmx6eval: Replace is_mx6q() for macro
On 22/07/2016 14:12, Breno Lima wrote: > It's not necessary to implement the is_mx6q function, there is a macro in > sys_proto.h already implemented. > > Signed-off-by: Breno Lima > --- > board/congatec/cgtqmx6eval/cgtqmx6eval.c | 14 +++--- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c > b/board/congatec/cgtqmx6eval/cgtqmx6eval.c > index 225de7c..3fbd3d2 100644 > --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c > +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c > @@ -678,14 +678,6 @@ int overwrite_console(void) > return 1; > } > > -static bool is_mx6q(void) > -{ > - if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) > - return true; > - else > - return false; > -} > - > int board_early_init_f(void) > { > setup_iomux_uart(); > @@ -703,7 +695,7 @@ int board_init(void) > gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; > > > - if (is_mx6q()) > + if (is_mx6dq()) > setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1); > else > setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1); > @@ -760,7 +752,7 @@ int misc_init_r(void) > int board_late_init(void) > { > #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG > - if (is_mx6q()) > + if (is_mx6dq()) > setenv("board_rev", "MX6Q"); > else > setenv("board_rev", "MX6DL"); > @@ -1053,7 +1045,7 @@ static void spl_dram_init(int width) > return; > } > > - if (is_mx6q()) { > + if (is_mx6dq()) { > mx6dq_dram_iocfg(width, &mx6q_ddr_ioregs, &mx6q_grp_ioregs); > mx6_dram_cfg(&sysinfo, &mx6q_mmcd_calib, &mem_ddr_2g); > } else if (is_cpu_type(MXC_CPU_MX6SOLO)) { > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
On 07/28/2016 12:13 PM, Ziyuan Xu wrote: For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). This patch fixes the U-Boot was stuck in invalidate_dcache_all() before booting linux kernel, which occurred on rk3288-base development board such as evb-rk3288, rock2-rk3288. And something output via console like: => bootz 0x200 0x0200 ramdisk start = 0x, ramdisk end = 0x Continuing to boot without FDT Initial value for argc=3 Final value for argc=3 using: ATAGS Starting kernel ... Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Signed-off-by: Ziyuan Xu Perfect! So with this, EFI support can still be in and things work fine? Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] colibri_imx7: add Colibri iMX7S/iMX7D module support
Hi Stefan, sorry for delay: On 21/07/2016 06:27, Stefan Agner wrote: > From: Stefan Agner > > This commit adds support for the Toradex Computer on Modules > Colibri iMX7S/iMX7D. The two modules/SoC's are very similar hence > can be easily supported by one board. The board code detects RAM > size at runtime which is one of the differences between the two > boards. The board also uses the UART's in DTE mode, hence making > use of the new DTE support via serial DM. > > Signed-off-by: Stefan Agner > --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] warp7: Move some USB configuration options to defconfig
On 22/07/2016 20:29, Breno Lima wrote: > Currently it's recommended to move some configuration options to the > defconfig file. > > Move some USB related options to the defconfig file. > > Signed-off-by: Breno Lima > --- > configs/warp7_defconfig | 6 ++ > include/configs/warp7.h | 9 - > 2 files changed, 6 insertions(+), 9 deletions(-) > > diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig > index 5a68998..617e0a0 100644 > --- a/configs/warp7_defconfig > +++ b/configs/warp7_defconfig > @@ -24,6 +24,12 @@ CONFIG_CMD_EXT4=y > CONFIG_CMD_EXT4_WRITE=y > CONFIG_CMD_FAT=y > CONFIG_USB=y > +CONFIG_USB_GADGET=y > +CONFIG_CI_UDC=y > +CONFIG_USB_GADGET_DOWNLOAD=y > +CONFIG_G_DNL_MANUFACTURER="FSL" > +CONFIG_G_DNL_VENDOR_NUM=0x0525 > +CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 > CONFIG_USB_EHCI_HCD=y > CONFIG_MXC_USB_OTG_HACTIVE=y > CONFIG_OF_LIBFDT=y > diff --git a/include/configs/warp7.h b/include/configs/warp7.h > index 4c6e23c..e59b16c 100644 > --- a/include/configs/warp7.h > +++ b/include/configs/warp7.h > @@ -125,18 +125,9 @@ > > #define CONFIG_IMX_THERMAL > > -#define CONFIG_CI_UDC > #define CONFIG_USBD_HS > -#define CONFIG_USB_GADGET_DUALSPEED > > -#define CONFIG_USB_GADGET > #define CONFIG_USB_FUNCTION_MASS_STORAGE > -#define CONFIG_USB_GADGET_DOWNLOAD > -#define CONFIG_USB_GADGET_VBUS_DRAW 2 > - > -#define CONFIG_G_DNL_VENDOR_NUM 0x0525 > -#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 > -#define CONFIG_G_DNL_MANUFACTURER"FSL" > > /* USB Device Firmware Update support */ > #define CONFIG_USB_FUNCTION_DFU > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] warp: Use imx_ddr_size() for calculating the DDR size
On 23/07/2016 18:23, Fabio Estevam wrote: > From: Fabio Estevam > > imx_ddr_size() can be used to calculate the DDR size in runtime. > > By using this function we no longer need to define PHYS_SDRAM_SIZE. > > Signed-off-by: Fabio Estevam > --- > board/warp/warp.c | 2 +- > include/configs/warp.h | 1 - > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/board/warp/warp.c b/board/warp/warp.c > index 49dfdb6..0bc0a6a 100644 > --- a/board/warp/warp.c > +++ b/board/warp/warp.c > @@ -46,7 +46,7 @@ DECLARE_GLOBAL_DATA_PTR; > > int dram_init(void) > { > - gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); > + gd->ram_size = imx_ddr_size(); > > return 0; > } > diff --git a/include/configs/warp.h b/include/configs/warp.h > index 4a8e270..12c7c38 100644 > --- a/include/configs/warp.h > +++ b/include/configs/warp.h > @@ -43,7 +43,6 @@ > /* Physical Memory Map */ > #define CONFIG_NR_DRAM_BANKS 1 > #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR > -#define PHYS_SDRAM_SIZE SZ_512M > > #define CONFIG_SYS_SDRAM_BASEPHYS_SDRAM > #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] aristainetos: Use imx_ddr_size() for calculating the DDR size
On 23/07/2016 18:23, Fabio Estevam wrote: > From: Fabio Estevam > > imx_ddr_size() can be used to calculate the DDR size in runtime. > > By using this function we no longer need to define PHYS_SDRAM_SIZE. > > Cc: Heiko Schocher > Signed-off-by: Fabio Estevam > --- > board/aristainetos/aristainetos.c | 2 +- > include/configs/aristainetos-common.h | 1 - > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/board/aristainetos/aristainetos.c > b/board/aristainetos/aristainetos.c > index e95ec81..d1e6850 100644 > --- a/board/aristainetos/aristainetos.c > +++ b/board/aristainetos/aristainetos.c > @@ -102,7 +102,7 @@ iomux_v3_cfg_t const usdhc1_pads[] = { > > int dram_init(void) > { > - gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); > + gd->ram_size = imx_ddr_size(); > > return 0; > } > diff --git a/include/configs/aristainetos-common.h > b/include/configs/aristainetos-common.h > index d87d40c..640227b 100644 > --- a/include/configs/aristainetos-common.h > +++ b/include/configs/aristainetos-common.h > @@ -17,7 +17,6 @@ > > #define CONFIG_MACH_TYPE 4501 > #define CONFIG_MMCROOT "/dev/mmcblk0p1" > -#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) > > /* Size of malloc() pool */ > #define CONFIG_SYS_MALLOC_LEN(64 * SZ_1M) > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] bx50v3: Use imx_ddr_size() for calculating the DDR size
On 23/07/2016 18:23, Fabio Estevam wrote: > From: Fabio Estevam > > imx_ddr_size() can be used to calculate the DDR size in runtime. > > By using this function we no longer need to define PHYS_SDRAM_SIZE. > > Cc: Martin Donnelly > Signed-off-by: Fabio Estevam > --- > board/ge/bx50v3/bx50v3.c| 2 +- > include/configs/ge_bx50v3.h | 2 -- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c > index d45ed44..e9729f8 100644 > --- a/board/ge/bx50v3/bx50v3.c > +++ b/board/ge/bx50v3/bx50v3.c > @@ -60,7 +60,7 @@ DECLARE_GLOBAL_DATA_PTR; > > int dram_init(void) > { > - gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); > + gd->ram_size = imx_ddr_size(); > > return 0; > } > diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h > index 4de2460..7a54546 100644 > --- a/include/configs/ge_bx50v3.h > +++ b/include/configs/ge_bx50v3.h > @@ -32,8 +32,6 @@ > #define CONFIG_MXC_UART_BASE UART3_BASE > #define CONFIG_CONSOLE_DEV "ttymxc2" > > -#define PHYS_SDRAM_SIZE (2u * 1024 * 1024 * 1024) > - > #define CONFIG_SUPPORT_EMMC_BOOT > > > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/5] novena: Remove uneeded PHYS_SDRAM_SIZE
On 23/07/2016 18:23, Fabio Estevam wrote: > From: Fabio Estevam > > novena uses the imx_ddr_size() function to calculate the DDR size in > runtime, so there is no need to define PHYS_SDRAM_SIZE. > > Remove the unneeded definition. > > Cc: Marek Vasut > Signed-off-by: Fabio Estevam > --- > include/configs/novena.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/configs/novena.h b/include/configs/novena.h > index 2382951..57d8c3e 100644 > --- a/include/configs/novena.h > +++ b/include/configs/novena.h > @@ -57,7 +57,6 @@ > /* Physical Memory Map */ > #define CONFIG_NR_DRAM_BANKS 1 > #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR > -#define PHYS_SDRAM_SIZE 0xF000 > > #define CONFIG_SYS_SDRAM_BASEPHYS_SDRAM > #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] cgtqmx6eval: Remove uneeded PHYS_SDRAM_SIZE
On 23/07/2016 18:23, Fabio Estevam wrote: > From: Fabio Estevam > > cgtqmx6eval uses the imx_ddr_size() function to calculate the DDR size in > runtime, so there is no need to define PHYS_SDRAM_SIZE. > > Remove the unneeded definition. > > Cc: Otavio Salvador > Signed-off-by: Fabio Estevam > --- > include/configs/cgtqmx6eval.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h > index dd03936..127a28a 100644 > --- a/include/configs/cgtqmx6eval.h > +++ b/include/configs/cgtqmx6eval.h > @@ -251,7 +251,6 @@ > /* Physical Memory Map */ > #define CONFIG_NR_DRAM_BANKS1 > #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR > -#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) > > #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM > #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx6ul_14x14_evk: Remove unused define
On 25/07/2016 18:45, Diego Dorta wrote: > Remove unused define constant. > > Signed-off-by: Diego Dorta > --- > board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c > b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c > index 88d3fbd..160c4c6 100644 > --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c > +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c > @@ -60,9 +60,6 @@ DECLARE_GLOBAL_DATA_PTR; > > #define ENET_CLK_PAD_CTRL (PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) > > -#define ENET_RX_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ > - PAD_CTL_SPEED_HIGH | PAD_CTL_SRE_FAST) > - > #define IOX_SDI IMX_GPIO_NR(5, 10) > #define IOX_STCP IMX_GPIO_NR(5, 7) > #define IOX_SHCP IMX_GPIO_NR(5, 11) > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx7_common: initialize generic timer on all CPU's
On 26/07/2016 19:35, Stefan Agner wrote: > Hi Max, > > On 2016-07-26 02:31, Max Krummenacher wrote: >> Hi Stefan >> >>> From: Stefan Agner [mailto:ste...@agner.ch] >>> Sent: Dienstag, 26. Juli 2016 07:58 >>> >>> Use CONFIG_TIMER_CLK_FREQ to let the non-secure init code initialize the >>> generic timer on all CPU's. This allows to make use of the timer freuquency >>> register also on other CPU than the start CPU which is important for KVM. >> [Krummenacher Max] >> Could you elaborate on the 'other CPUs'? The SMP companions Cortex A7 >> or the Cortex M4. > > This is only for the primary A-Class CPU complex. The generic timer is > only available there. > >> And what exactly is KVM here? > > Kernel-based Virtual Machine, the Linux integrated hypervisor. The > Cortex-A7 support ARM's virtualization extensions which allow to make > use of KVM... > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx7dsabresd: MAINTAINERS: Add mx7dsabresd_secure_defconfig
On 27/07/2016 02:08, Fabio Estevam wrote: > From: Fabio Estevam > > Add an entry for the mx7dsabresd_secure_defconfig target. > > Signed-off-by: Fabio Estevam > --- > board/freescale/mx7dsabresd/MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/board/freescale/mx7dsabresd/MAINTAINERS > b/board/freescale/mx7dsabresd/MAINTAINERS > index b96642a..c7a22fc 100644 > --- a/board/freescale/mx7dsabresd/MAINTAINERS > +++ b/board/freescale/mx7dsabresd/MAINTAINERS > @@ -4,3 +4,4 @@ S:Maintained > F: board/freescale/mx7dsabresd > F: include/configs/mx7dsabresd.h > F: configs/mx7dsabresd_defconfig > +F: configs/mx7dsabresd_secure_defconfig > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] MAINTAINERS: i.MX: Add board/freescale/*mx* path
Hi Fabio, On 27/07/2016 02:27, Fabio Estevam wrote: > From: Fabio Estevam > > Pass the board/freescale/*mx*/ path as files maintained by Stefano > Babic. > > While this is not ideal and does not cover all the i.MX board cases, > it gives at least a better hint for the /scripts/get_maintainer.pl > tool. > Agree. Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
Hi, On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: > For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). > > This patch fixes the U-Boot was stuck in invalidate_dcache_all() before > booting linux kernel, which occurred on rk3288-base development board > such as evb-rk3288, rock2-rk3288. And something output via console like: > > => bootz 0x200 > 0x0200 >ramdisk start = 0x, ramdisk end = 0x >Continuing to boot without FDT >Initial value for argc=3 >Final value for argc=3 >using: ATAGS > >Starting kernel ... > > Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). > > Signed-off-by: Ziyuan Xu > --- > > arch/arm/include/asm/system.h | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > index 2bdc0be..12d4ba0 100644 > --- a/arch/arm/include/asm/system.h > +++ b/arch/arm/include/asm/system.h > @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); > */ > void save_boot_params_ret(void); > > -#define isb() __asm__ __volatile__ ("" : : : "memory") > - > #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); > > #ifdef __ARM_ARCH_7A__ > +#define isb() __asm__ __volatile__ ("isb" : : : "memory") > + > #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") > #else > +#define isb() __asm__ __volatile__ ("" : : : "memory") > + > #define wfi() > #endif > arch/arm/include/asm/barriers.h already has a proper set of ISB/DSB macros. Please consider using those instead. You'll see they also support ARMv6's CP15 ISB/DSB. Regards ChenYu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-dm
On Wed, Jul 27, 2016 at 08:24:17PM -0600, Simon Glass wrote: > Hi Tom, > > Here is a new power domain uclass, the rest of the MMC conversion > (moving over zynq and socfpga) and a few other dm improvements. > > The following changes since commit 0b6699ad8ea95803d7ce40d1dc1caea902a6d22c: > > Merge branch 'master' of http://git.denx.de/u-boot-sunxi (2016-07-26 > 18:33:04 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-dm.git > > for you to fetch changes up to 02ebd42cf19e523593d8e4e8f3d02083299fcdbb: > > mmc: dw_mmc: reduce timeout detection cycle (2016-07-27 20:15:48 -0600) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] treewide: move CONFIG_PHYS_64BIT to Kconfig
Masahiro-san >>>#if !defined(CONFIG_PPC_P5020) && !defined(CONFIG_PPC_P5040) #error Must >>>call Cyrus CONFIG with a specific CPU enabled. >>>#endif >>>diff --git a/include/configs/dra7xx_evm.h >>>b/include/configs/dra7xx_evm.h index 0d51aeb..a11b692 100644 >>>--- a/include/configs/dra7xx_evm.h >>>+++ b/include/configs/dra7xx_evm.h >>>@@ -20,7 +20,6 @@ >>> #endif >>>#define CONFIG_VERY_BIG_RAM >>>-#define CONFIG_PHYS_64BIT >>Applied this patch on mainline branch, I see warning. It seems like >>CONFIG_PHYS_64BIT is not taking effect, the sizeof phys_addr_t is 4 bytes >>instead of 8 byte. >Due to removal of CONFIG_PHYS_64BIT in dra7xx_evm.h, phys_addr_t set to 4, and >due to SDRAM init would have failed and u-boot prompt did not appear. >I have defined CONFIG_PHYS_64BIT in dra7xx_evm.h, I did not see any warning >and I could see u-boot prompt, worked fine. >>>board/ti/dra7xx/evm.c: In function 'dram_init_banksize': >>>board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly >>>truncated to unsigned type [-Woverflow] >>> gd->bd->bi_dram[1].start = 0x2; ^ >>>board/ti/dra7xx/evm.c: In function 'dram_init_banksize': >>>board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly >>>truncated to unsigned type [-Woverflow] >>> gd->bd->bi_dram[1].start = 0x2; ^ Below change fixes the issue. -- diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 870e0fd..2ea1624 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -4,6 +4,10 @@ menu "ARM architecture" config SYS_ARCH default "arm" +config PHYS_64BIT + bool + default n + config ARM64 bool select PHYS_64BIT - After applying your patch, the sizeof(phys_addr_t) was always set to 4 bytes. But expected sizeof of phys_addr_t supposed to be 8 bytes. The CONFIG_PHYS_64BIT never gets defined in .config. With above patch issue got fixed, please review this change. Regards Ravi ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/5] usb: fsl: Add code to use CONFIG_DM_USB
On 07/27/2016 08:00 PM, york sun wrote: > On 07/21/2016 04:45 AM, Marek Vasut wrote: >> On 07/21/2016 10:02 AM, Rajesh Bhagat wrote: >>> Hi All, >>> >>> Any Comments? >> >> York, please check this. > > Passed compiling tests on powerpc and arm platforms. And the patches are OK ? > York > >> -Original Message- From: Rajesh Bhagat [mailto:rajesh.bha...@nxp.com] Sent: Friday, July 01, 2016 6:52 PM To: u-boot@lists.denx.de Cc: ma...@denx.de; york sun ; Sriram Dash ; Rajesh Bhagat Subject: [PATCH 0/5] usb: fsl: Add code to use CONFIG_DM_USB Adds code to use driver model for USB EHCI and XHCI FSL driver Rajesh Bhagat (5): drivers: usb: fsl: Make function for initialization to use in CONFIG_DM_USB usb: ehci: fsl: Add code to use CONFIG_DM_USB usb: xhci: fsl: Add code to use CONFIG_DM_USB dm: ls1021a: dts: Update USB 3.0 node to support DM USB arm: ls1021a: Enable CONFIG_DM_USB in defconfigs arch/arm/dts/ls1021a.dtsi|2 +- configs/ls1021aqds_ddr4_nor_defconfig|1 + configs/ls1021aqds_ddr4_nor_lpuart_defconfig |1 + configs/ls1021aqds_nor_defconfig |1 + configs/ls1021aqds_nor_lpuart_defconfig |1 + drivers/usb/host/ehci-fsl.c | 194 + drivers/usb/host/xhci-fsl.c | 83 +++- 7 files changed, 250 insertions(+), 33 deletions(-) -- 1.7.7.4 >>> >>> Best Regards, >>> Rajesh Bhagat >>> >> >> > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] treewide: move CONFIG_PHYS_64BIT to Kconfig
2016-07-28 17:18 GMT+09:00 B, Ravi : > Masahiro-san > >>#if !defined(CONFIG_PPC_P5020) && !defined(CONFIG_PPC_P5040) #error Must >>call Cyrus CONFIG with a specific CPU enabled. >>#endif >>diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h >>index 0d51aeb..a11b692 100644 >>--- a/include/configs/dra7xx_evm.h >>+++ b/include/configs/dra7xx_evm.h >>@@ -20,7 +20,6 @@ >> #endif > >>#define CONFIG_VERY_BIG_RAM >>-#define CONFIG_PHYS_64BIT > > Applied this patch on mainline branch, I see warning. It seems like > CONFIG_PHYS_64BIT is not taking effect, > the sizeof phys_addr_t is 4 bytes instead of 8 byte. > > board/ti/dra7xx/evm.c: In function 'dram_init_banksize': > board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly truncated to > unsigned type [-Woverflow] >gd->bd->bi_dram[1].start = 0x2; > ^ > board/ti/dra7xx/evm.c: In function 'dram_init_banksize': > board/ti/dra7xx/evm.c:408:30: warning: large integer implicitly truncated to > unsigned type [-Woverflow] >gd->bd->bi_dram[1].start = 0x2; > ^ > Regards > Ravi See, the following hunk > diff --git a/arch/arm/cpu/armv7/omap5/Kconfig > b/arch/arm/cpu/armv7/omap5/Kconfig > index 4fb5ef9..a8600b1 100644 > --- a/arch/arm/cpu/armv7/omap5/Kconfig > +++ b/arch/arm/cpu/armv7/omap5/Kconfig > @@ -13,6 +13,7 @@ config TARGET_OMAP5_UEVM > config TARGET_DRA7XX_EVM > bool "TI DRA7XX" > select TI_I2C_BOARD_DETECT > + select PHYS_64BIT > > config TARGET_AM57XX_EVM > bool "AM57XX" So, CONFIG_PHYS_64BIT should be defined for your board. Check your .config once again. With this patch applied to the mainline, I do not see such a warning. yamada@beagle:~/workspace/u-boot$ make mrproper yamada@beagle:~/workspace/u-boot$ git log --oneline -2 5b964d4 treewide: move CONFIG_PHYS_64BIT to Kconfig c6f086d Merge branch 'master' of git://git.denx.de/u-boot-video yamada@beagle:~/workspace/u-boot$ make dra7xx_evm_defconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf # # configuration written to .config # yamada@beagle:~/workspace/u-boot$ make CROSS_COMPILE=arm-linux-gnueabi- scripts/kconfig/conf --silentoldconfig Kconfig CHK include/config.h UPD include/config.h GEN include/autoconf.mk GEN include/autoconf.mk.dep GEN spl/include/autoconf.mk CHK include/config/uboot.release UPD include/config/uboot.release CHK include/generated/version_autogenerated.h UPD include/generated/version_autogenerated.h CHK include/generated/timestamp_autogenerated.h UPD include/generated/timestamp_autogenerated.h CC lib/asm-offsets.s CHK include/generated/generic-asm-offsets.h UPD include/generated/generic-asm-offsets.h CC arch/arm/lib/asm-offsets.s CHK include/generated/asm-offsets.h UPD include/generated/asm-offsets.h HOSTCC tools/gen_eth_addr HOSTCC tools/img2srec HOSTCC tools/mkenvimage.o HOSTCC tools/os_support.o WRAPtools/lib/crc32.c HOSTCC tools/lib/crc32.o HOSTLD tools/mkenvimage HOSTCC tools/aisimage.o HOSTCC tools/atmelimage.o WRAPtools/common/bootm.c HOSTCC tools/common/bootm.o HOSTCC tools/default_image.o WRAPtools/lib/fdtdec_common.c HOSTCC tools/lib/fdtdec_common.o WRAPtools/lib/fdtdec.c HOSTCC tools/lib/fdtdec.o HOSTCC tools/fit_common.o HOSTCC tools/fit_image.o WRAPtools/common/image-fit.c HOSTCC tools/common/image-fit.o HOSTCC tools/image-host.o WRAPtools/common/image.c HOSTCC tools/common/image.o HOSTCC tools/imagetool.o HOSTCC tools/imximage.o HOSTCC tools/kwbimage.o WRAPtools/lib/md5.c HOSTCC tools/lib/md5.o HOSTCC tools/lpc32xximage.o HOSTCC tools/mxsimage.o HOSTCC tools/omapimage.o HOSTCC tools/pblimage.o HOSTCC tools/pbl_crc32.o WRAPtools/lib/rc4.c HOSTCC tools/lib/rc4.o HOSTCC tools/rkcommon.o HOSTCC tools/rkimage.o HOSTCC tools/rksd.o HOSTCC tools/rkspi.o HOSTCC tools/socfpgaimage.o WRAPtools/lib/sha1.c HOSTCC tools/lib/sha1.o WRAPtools/lib/sha256.c HOSTCC tools/lib/sha256.o WRAPtools/common/hash.c HOSTCC tools/common/hash.o HOSTCC tools/ublimage.o HOSTCC tools/zynqimage.o HOSTCC tools/zynqmpimage.o WRAPtools/lib/libfdt/fdt.c HOSTCC tools/lib/libfdt/fdt.o WRAPtools/lib/libfdt/fdt_ro.c HOSTCC tools/lib/libfdt/fdt_ro.o WRAPtools/lib/libfdt/fdt_rw.c HOSTCC tools/lib/libfdt/fdt_rw.o WRAPtools/lib/libfdt/fdt_strerror.c HOSTCC tools/lib/libfdt/fdt_strerror.o WRAPtools/lib/libfdt/fdt_wip.c HOSTCC tools/lib/libfdt/fdt_wip.o WRAPtools/lib/libfdt/fdt_region.c HOSTCC tools/lib/libfdt/fdt_region.o WRAPtools/lib/libfdt/fdt_sw.
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
Hi, On 2016年07月28日 19:03, Chen-Yu Tsai wrote: Hi, On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). This patch fixes the U-Boot was stuck in invalidate_dcache_all() before booting linux kernel, which occurred on rk3288-base development board such as evb-rk3288, rock2-rk3288. And something output via console like: => bootz 0x200 0x0200 ramdisk start = 0x, ramdisk end = 0x Continuing to boot without FDT Initial value for argc=3 Final value for argc=3 using: ATAGS Starting kernel ... Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Signed-off-by: Ziyuan Xu --- arch/arm/include/asm/system.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 2bdc0be..12d4ba0 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); */ void save_boot_params_ret(void); -#define isb() __asm__ __volatile__ ("" : : : "memory") - #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); #ifdef __ARM_ARCH_7A__ +#define isb() __asm__ __volatile__ ("isb" : : : "memory") + #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") #else +#define isb() __asm__ __volatile__ ("" : : : "memory") + #define wfi() #endif arch/arm/include/asm/barriers.h already has a proper set of ISB/DSB macros. Please consider using those instead. I know just what you mean. arch/arm/include/asm/barriers.h defined ISB macro. If I only want to fix the issue which I hit on rk3288 board, I just use ISB in arch/arm/include/asm/system.h::set_cr() instead of isb(). But isb() had been invoked in some places, IMHO, this patch is more apposite.:-) You'll see they also support ARMv6's CP15 ISB/DSB. Regards ChenYu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] arm: imx: Add support for Advantech DMS-BA16 board
Hi Akshay, On 28/07/2016 12:12, Stefano Babic wrote: > Hi Akshay, > > this looks good to me. I apply it, and I let you think about an upgrade > to SPL for this board. > The patch breaks most of i.MX6 boards because it redefines IMX_CONFIG. In fact: >> source "board/ge/bx50v3/Kconfig" >> +source "board/advantech/dms-ba16/Kconfig" >> source "board/aristainetos/Kconfig" >> source "board/bachmann/ot1200/Kconfig" >> source "board/barco/platinum/Kconfig" >> diff --git a/board/advantech/dms-ba16/Kconfig >> b/board/advantech/dms-ba16/Kconfig >> new file mode 100644 >> index 000..cc5b4e3 >> --- /dev/null >> +++ b/board/advantech/dms-ba16/Kconfig >> @@ -0,0 +1,27 @@ >> +choice >> +prompt "DDR Size" >> +default SYS_DDR_2G >> + >> +config SYS_DDR_1G >> +bool "1GiB" >> + >> +config SYS_DDR_2G >> +bool "2GiB" >> + >> +endchoice >> + >> +config IMX_CONFIG >> +default "board/advantech/dms-ba16/dms-ba16_2g.cfg" if SYS_DDR_2G >> +default "board/advantech/dms-ba16/dms-ba16_1g.cfg" if SYS_DDR_1G >> + IMX_CONFIG is already set in arch/arm/imx-common/Kconfig. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PULL] Please pull u-boot-imx
Hi Tom, please pull from u-boot-imx (master), thanks! The following changes since commit 19ce924ff914f315dc2fdf79f357825c513aed6e: Prepare v2016.07 (2016-07-11 15:01:01 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master for you to fetch changes up to 77cbd3a14184c61d55d7fcddd88fa4e96efc9901: MAINTAINERS: i.MX: Add board/freescale/*mx* path (2016-07-28 13:27:22 +0200) Alexey Brodkin (1): wandboard: move environment partition farther from u-boot.img Andrej Rosano (2): usbarmory: switch to using kernel zImage usbarmory: Add board_run_command() function Breno Lima (7): warp7: Remove CONFIG_BOOTDELAY variable serial_mxc: Remove unconditional DCE setting Revert "imx_common: Return MMCSD_MODE_FS in spl_boot_mode() also for EXTFS" wandboard: Replace is_cpu_type() for macro mx6cuboxi: Replace is_mx6q() for macro cgtqmx6eval: Replace is_mx6q() for macro warp7: Move some USB configuration options to defconfig Christopher Spinrath (5): ARM: board: cm-fx6: fix mmc for old revisions of utilite ARM: configs: cm_fx6: improve default environment fdt_support: define stub for fdt_fixup_mtdparts ARM: board: cm_fx6: fixup mtd partitions in the fdt ARM: configs: cm_fx6: add mtd support Diego Dorta (3): pico-imx6ul: Add Ethernet support pico-imx6ul: Add NFS boot support mx6ul_14x14_evk: Remove unused define Fabio Estevam (11): mx7: Place MX7_SEC option in Kconfig mx7dsabresd: Fix the boot of a NXP kernel mx6: clock: Fix the logic for reading axi_alt_sel mx7dsabresd_secure_defconfig: Use CONFIG_ARMV7_BOOT_SEC_DEFAULT warp: Use imx_ddr_size() for calculating the DDR size aristainetos: Use imx_ddr_size() for calculating the DDR size bx50v3: Use imx_ddr_size() for calculating the DDR size novena: Remove uneeded PHYS_SDRAM_SIZE cgtqmx6eval: Remove uneeded PHYS_SDRAM_SIZE mx7dsabresd: MAINTAINERS: Add mx7dsabresd_secure_defconfig MAINTAINERS: i.MX: Add board/freescale/*mx* path Gilles Chanteperdrix (1): wandboard: enable SATA with imx6q Hannes Schmelzer (2): driver/net/fec: support fixed speed connection arch-mx6: fix MX6_PAD_DECLARE macro to work with MX6 duallite Peng Fan (1): imx6: clock: typo fix Petr Kulhavy (1): imx_common: Return MMCSD_MODE_FS in spl_boot_mode() also for EXTFS Stefan Agner (10): dm: imx: serial: Support DTE mode when using driver model usb: move CONFIG_USB_EHCI_MX7 to Kconfig usb: ehci-mx6: configure power polarity in usb_power_config usb: ehci-mx6: introduce config for high active power pin mx7: set soc environment according to exact SoC type mx7_common: Put display board info config into board file mx7_common: use Kconfig for ARMv7 non-secure mode imx_watchdog: add weak attribute to reset_cpu function colibri_imx7: add Colibri iMX7S/iMX7D module support mx7_common: initialize generic timer on all CPU's Stefano Babic (7): pcie_imx: increment timeout for link up mx6: add support for el6x board mx6: Add Phytec PCM058 i.MX6 Quad Revert "arch-mx6: fix MX6_PAD_DECLARE macro to work with MX6 duallite" Fix build for mx7dsabresd (secure config) mx6: wandboard: fix warning due to missing prototype pico-imx6ul: drop warning due to redefined Tim Harvey (11): imx: ventana: add dt fixup for GW16082 irq mapping imx: ventana: add dt fixup for eth1 mac-address pci: allow disabling of pci init/enum via env imx: ventana: default pci to disabled imx: ventana: re-enable late board info display imx: ventana: make RS232 enable board specific imx: ventana: make number of digital I/O's dynamic imx: ventana: add extra DIO's for GW5520 imx: ventana: make hwconfig initialize based on board configuration imx: ventana: refactor board-specific dt fixups (no functional change) imx: ventana: add dt fixup for watchdog external reset Vanessa Maegima (8): mx6qsabreauto: Avoid hardcoded RAM size mx6slevk: Avoid hardcoded RAM size mx6sxsabreauto: Avoid hardcoded RAM size mx6sxsabresd: Avoid hardcoded RAM size pico-imx6ul: Add DFU support pico-imx6ul: Add a README file pico-imx6ul: Add USB Host support pico-imx6ul: Add PMIC support MAINTAINERS | 1 + arch/arm/cpu/armv7/mx6/Kconfig| 18 ++ arch/arm/cpu/armv7/mx6/clock.c| 6 +- arch/arm/cpu/armv7/mx7/Kconfig| 9 +++ arch/arm/cpu/armv7/mx7/soc.c | 14 + board/aristainetos/aristainetos.c | 2 +- board/compulab/cm_fx6/cm_fx6.c| 20 ++- board/congatec/cgtqmx6eval/cgtqmx6eval.c
[U-Boot] [PATCH] configs: am43xx_evm_defconfig: Enable CONFIG_SPI_FLASH_BAR
AM437x SK and AM437x IDK EVMs have 64MB flash, therefore enable CONFIG_SPI_FLASH_BAR to access flash regions above 16MB. Signed-off-by: Vignesh R --- configs/am43xx_evm_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig index 0eab4add438d..b3fe2699fabd 100644 --- a/configs/am43xx_evm_defconfig +++ b/configs/am43xx_evm_defconfig @@ -37,6 +37,7 @@ CONFIG_DM=y CONFIG_DM_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_BAR=y CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_TIMER=y -- 2.9.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
Hi Alexander, On 2016年07月28日 18:39, Alexander Graf wrote: On 07/28/2016 12:13 PM, Ziyuan Xu wrote: For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). This patch fixes the U-Boot was stuck in invalidate_dcache_all() before booting linux kernel, which occurred on rk3288-base development board such as evb-rk3288, rock2-rk3288. And something output via console like: => bootz 0x200 0x0200 ramdisk start = 0x, ramdisk end = 0x Continuing to boot without FDT Initial value for argc=3 Final value for argc=3 using: ATAGS Starting kernel ... Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Signed-off-by: Ziyuan Xu Perfect! So with this, EFI support can still be in and things work fine? I had not test EFI feature, in fact, I have no experience about it. Any progress I will promptly inform you. Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v3 0/5] SPL: DFU Support in SPL
Traditionally the DFU support is available only as part 2nd stage boot loader(u-boot) and DFU is not supported in SPL. The SPL-DFU feature is useful for boards which does not have MMC/SD, ethernet boot mechanism to boot the board and only has USB inteface. This patch add DFU support in SPL with RAM memory device support to load and execute u-boot from PC over USB interface. And then leverage full functional feature of DFU in u-boot to flash boot inital binary images to factory or bare-metal boards to memory devices like SPI, eMMC, MMC/SD card using USB interface. As a reference, refer to application note [3] on SPL-DFU support based on 2014.07 u-boot. Steps to build SPL-DFU/RAM: This SPL-DFU support can be enabled through Menuconfig->Boot Images->Enable SPL-DFU support 1) Soc ROMcode loads the u-boot-spl.bin(+DFU) to IRAM from PC host via usb interface and execute DFU. 2) Then load u-boot.img to RAM using dfu-util from PC-host with -R switch to boot u-boot. #sudo dfu-util -c 1 -i 0 -a 0 -D u-boot.img -R Note: On latest mainline u-boot usb fails, need patch [4],[5] to test dfu. Tested on dra7xx SoCs family. [1] is EVM console output with SPL-DFU/RAM enabled. [2] is ubuntu host console output. references: [1] http://pastebin.ubuntu.com/21264490/ [2] http://pastebin.ubuntu.com/21264638/ [3] http://www.ti.com/lit/an/sprac33/sprac33.pdf [4] https://patchwork.ozlabs.org/patch/651146/ [5] http://pastebin.ubuntu.com/21264233/ v3 changes: - minor v2 review comments fixed. - Kconfig SPL/DFU selection made generic. - unselect CONFIG_CMD_BOOTD for SPL v1/v2 changes : - support for DFU RAM device only . - removed support for other SPI flash devices - SPL+DFU loads and execute u-boot and leaverage u-boot dfu functionality to flash binaries to SPI, eMMC etc. - saperated the common dfu code used by SPL and u-boot to common/dfu.c Ravi Babu (5): spl: dfu: add dfu support in SPL common: dfu: saperate the dfu common functionality spl: dfu: adding dfu support functions for SPL-DFU dra7x: boot: add dfu bootmode support dra7x: configs: enable SPL-DFU support Kconfig | 27 arch/arm/cpu/armv7/omap-common/boot-common.c |5 ++ arch/arm/include/asm/arch-omap5/spl.h|2 +- cmd/dfu.c| 61 +- common/Makefile |3 + common/dfu.c | 87 ++ common/spl/Makefile |1 + common/spl/spl.c | 10 ++- common/spl/spl_dfu.c | 57 + include/configs/dra7xx_evm.h | 20 +- include/configs/ti_omap5_common.h|2 - include/g_dnl.h |1 + include/spl.h|8 +++ scripts/Makefile.spl |4 ++ 14 files changed, 224 insertions(+), 64 deletions(-) create mode 100644 common/dfu.c create mode 100644 common/spl/spl_dfu.c -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v3 1/5] spl: dfu: add dfu support in SPL
Traditionally the DFU support is available only as part 2nd stage boot loader(u-boot) and DFU is not supported in SPL. The SPL-DFU feature is useful for boards which does not have MMC/SD, ethernet boot mechanism to boot the board and only has USB inteface. This patch add DFU support in SPL with RAM memory device support to load and execute u-boot. And then leverage full functionality DFU in u-boot to flash boot inital binary images to factory or bare-metal boards to memory devices like SPI, eMMC, MMC/SD card using USB interface. This SPL-DFU support can be enabled through Menuconfig->Boot Images->Enable SPL-DFU support Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- Kconfig | 27 +++ common/Makefile |1 + scripts/Makefile.spl |4 3 files changed, 32 insertions(+) diff --git a/Kconfig b/Kconfig index ef12f9f..dce9800 100644 --- a/Kconfig +++ b/Kconfig @@ -336,6 +336,33 @@ config SPL_FIT_IMAGE_POST_PROCESS injected into the FIT creation (i.e. the blobs would have been pre- processed before being added to the FIT image). +config SPL_DFU_SUPPORT + bool "Enable SPL with DFU to load binaries to memory device" + depends on USB + help + Currently the SPL does not have capability to load the + binaries or boot images to boot devices like ram,eMMC,SPI,etc. + This feature enables the DFU (Device Firmware Upgarde) in SPL with + RAM memory device support. The ROM code will load and execute + the SPL built with dfu. The user can load binaries (u-boot/kernel) to + selected device partition from host-pc using dfu-utils. + This feature will be useful to flash the binaries to factory + or bare-metal boards using USB interface. + +choice + bool "DFU device selection" + depends on SPL_DFU_SUPPORT + +config SPL_DFU_RAM + bool "RAM device" + depends on SPL_DFU_SUPPORT + help +select RAM/DDR memory device for loading binary images +(u-boot/kernel) to the selected device partition using +DFU and execute the u-boot/kernel from RAM. + +endchoice + config SYS_CLK_FREQ depends on ARC || ARCH_SUNXI int "CPU clock frequency" diff --git a/common/Makefile b/common/Makefile index e08cd3e..7a7a1b4 100644 --- a/common/Makefile +++ b/common/Makefile @@ -87,6 +87,7 @@ obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o endif # !CONFIG_SPL_BUILD ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 3ba9742..3b70c4d 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -57,6 +57,10 @@ libs-y += common/init/ libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ cmd/ libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/ libs-y += drivers/ +libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/dfu/ +libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/gadget/ +libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/gadget/udc/ +libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/dwc3/ libs-y += dts/ libs-y += fs/ libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v3 3/5] spl: dfu: adding dfu support functions for SPL-DFU
Adding support functions to run dfu spl commands. Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- common/spl/Makefile |1 + common/spl/spl_dfu.c | 57 ++ include/spl.h|8 +++ 3 files changed, 66 insertions(+) create mode 100644 common/spl/spl_dfu.c diff --git a/common/spl/Makefile b/common/spl/Makefile index b15f0f6..5bd0b18 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -24,4 +24,5 @@ obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o +obj-$(CONFIG_SPL_DFU_SUPPORT) += spl_dfu.o endif diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c new file mode 100644 index 000..e8d0ba1 --- /dev/null +++ b/common/spl/spl_dfu.c @@ -0,0 +1,57 @@ +/* + * (C) Copyright 2016 + * Texas Instruments, + * + * Ravi B + * + * SPDX-License-Identifier:GPL-2.0+ + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int run_dfu(int usb_index, char *interface, char *devstring) +{ + int ret; + + ret = dfu_init_env_entities(interface, devstring); + if (ret) { + dfu_free_entities(); + goto exit; + } + + run_usb_dnl_gadget(usb_index, "usb_dnl_dfu"); +exit: + dfu_free_entities(); + return ret; +} + +int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr) +{ + char *str_env; + int ret; + + /* set default environment */ + set_default_env(0); + str_env = getenv(dfu_alt_info); + if (!str_env) { + error("\"dfu_alt_info\" env variable not defined!\n"); + return -EINVAL; + } + + ret = setenv("dfu_alt_info", str_env); + if (ret) { + error("unable to set env variable \"dfu_alt_info\"!\n"); + return -EINVAL; + } + + /* invoke dfu command */ + return run_dfu(usbctrl, interface, devstr); +} diff --git a/include/spl.h b/include/spl.h index 8afa085..30eda36 100644 --- a/include/spl.h +++ b/include/spl.h @@ -144,4 +144,12 @@ void spl_board_init(void); */ bool spl_was_boot_source(void); +/** + * spl_dfu_cmd- run dfu command with chosen mmc device interface + * @param usb_index - usb controller number + * @param mmc_dev - mmc device nubmer + * + * @return 0 on success, otherwise error code + */ +int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr); #endif -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v3 2/5] common: dfu: saperate the dfu common functionality
The cmd_dfu functionality is been used by both SPL and u-boot, saperating the core dfu functionality moving it to common/dfu.c. Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- cmd/dfu.c | 61 ++ common/Makefile |2 ++ common/dfu.c| 87 +++ include/g_dnl.h |1 + 4 files changed, 92 insertions(+), 59 deletions(-) create mode 100644 common/dfu.c diff --git a/cmd/dfu.c b/cmd/dfu.c index d8aae26..04291f6 100644 --- a/cmd/dfu.c +++ b/cmd/dfu.c @@ -21,7 +21,6 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - bool dfu_reset = false; if (argc < 4) return CMD_RET_USAGE; @@ -30,7 +29,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) char *interface = argv[2]; char *devstring = argv[3]; - int ret, i = 0; + int ret; #ifdef CONFIG_DFU_TFTP unsigned long addr = 0; if (!strcmp(argv[1], "tftp")) { @@ -52,67 +51,11 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } int controller_index = simple_strtoul(usb_controller, NULL, 0); - board_usb_init(controller_index, USB_INIT_DEVICE); - g_dnl_clear_detach(); - g_dnl_register("usb_dnl_dfu"); - while (1) { - if (g_dnl_detach()) { - /* -* Check if USB bus reset is performed after detach, -* which indicates that -R switch has been passed to -* dfu-util. In this case reboot the device -*/ - if (dfu_usb_get_reset()) { - dfu_reset = true; - goto exit; - } - /* -* This extra number of usb_gadget_handle_interrupts() -* calls is necessary to assure correct transmission -* completion with dfu-util -*/ - if (++i == 1) - goto exit; - } + run_usb_dnl_gadget(controller_index, "usb_dnl_dfu"); - if (ctrlc()) - goto exit; - - if (dfu_get_defer_flush()) { - /* -* Call to usb_gadget_handle_interrupts() is necessary -* to act on ZLP OUT transaction from HOST PC after -* transmitting the whole file. -* -* If this ZLP OUT packet is NAK'ed, the HOST libusb -* function fails after timeout (by default it is set to -* 5 seconds). In such situation the dfu-util program -* exits with error message. -*/ - usb_gadget_handle_interrupts(controller_index); - ret = dfu_flush(dfu_get_defer_flush(), NULL, 0, 0); - dfu_set_defer_flush(NULL); - if (ret) { - error("Deferred dfu_flush() failed!"); - goto exit; - } - } - - WATCHDOG_RESET(); - usb_gadget_handle_interrupts(controller_index); - } -exit: - g_dnl_unregister(); - board_usb_cleanup(controller_index, USB_INIT_DEVICE); done: dfu_free_entities(); - - if (dfu_reset) - run_command("reset", 0); - - g_dnl_clear_detach(); - return ret; } diff --git a/common/Makefile b/common/Makefile index 7a7a1b4..83bd3f4 100644 --- a/common/Makefile +++ b/common/Makefile @@ -87,6 +87,7 @@ obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o endif # !CONFIG_SPL_BUILD ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu.o obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o @@ -160,6 +161,7 @@ obj-$(CONFIG_CMDLINE) += cli_simple.o obj-y += cli.o obj-$(CONFIG_CMDLINE) += cli_readline.o +obj-$(CONFIG_CMD_DFU) += dfu.o obj-y += command.o obj-y += s_record.o obj-y += xyzModem.o diff --git a/common/dfu.c b/common/dfu.c new file mode 100644 index 000..14b60f1 --- /dev/null +++ b/common/dfu.c @@ -0,0 +1,87 @@ +/* + * dfu.c -- dfu command + * + * Copyright (C) 2015 + * Lukasz Majewski + * + * Copyright (C) 2012 Samsung Electronics + * authors: Andrzej Pietrasiewicz + * Lukasz Majewski + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include + +int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget) +{ + bool dfu_reset = false; + int ret, i = 0; + + board_usb_init(usbctrl_index, USB_
[U-Boot] [RFC PATCH v3 5/5] dra7x: configs: enable SPL-DFU support
This patch enables the SPL-DFU support for dra7x platform. Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- include/configs/dra7xx_evm.h | 20 +++- include/configs/ti_omap5_common.h |2 -- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 0d51aeb..4f0f895 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -133,6 +133,23 @@ #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 #endif +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_CMD_BOOTD +#ifdef CONFIG_SPL_DFU_SUPPORT +#define CONFIG_SPL_LOAD_FIT_ADDRESS 0x8020 +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_HASH_SUPPORT +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "kernel ram 0x8020 0x400;" \ + "fdt ram 0x80f8 0x8;" \ + "ramdisk ram 0x8100 0x400\0" +#define DFUARGS \ + "dfu_bufsiz=0x1\0" \ + DFU_ALT_INFO_RAM +#endif +#endif + #include /* Enhance our eMMC support / experience. */ @@ -222,9 +239,10 @@ #define CONFIG_USB_FUNCTION_DFU #define CONFIG_DFU_RAM +#ifndef CONFIG_SPL_BUILD #define CONFIG_DFU_MMC -#define CONFIG_DFU_RAM #define CONFIG_DFU_SF +#endif /* SATA */ #define CONFIG_BOARD_LATE_INIT diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 3589cdc..2079b9f 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -66,7 +66,6 @@ #define DFUARGS #endif -#ifndef CONFIG_SPL_BUILD #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ @@ -130,7 +129,6 @@ "setenv mmcroot /dev/mmcblk0p2 rw; " \ "run mmcboot;" \ "" -#endif /* * SPL related defines. The Public RAM memory map the ROM defines the -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v3 4/5] dra7x: boot: add dfu bootmode support
This patch enables the DFU boot mode support for dra7x platform. Signed-off-by: Ravi Babu Reviewed-by: Tom Rini --- arch/arm/cpu/armv7/omap-common/boot-common.c |5 + arch/arm/include/asm/arch-omap5/spl.h|2 +- common/spl/spl.c | 10 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c index 60c367a..385310b 100644 --- a/arch/arm/cpu/armv7/omap-common/boot-common.c +++ b/arch/arm/cpu/armv7/omap-common/boot-common.c @@ -91,6 +91,11 @@ void save_omap_boot_params(void) sys_boot_device = 1; break; #endif +#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU_SUPPORT) + case BOOT_DEVICE_DFU: + sys_boot_device = 1; + break; +#endif } if (sys_boot_device) { diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h index 468ff5a..3582880 100644 --- a/arch/arm/include/asm/arch-omap5/spl.h +++ b/arch/arm/include/asm/arch-omap5/spl.h @@ -20,7 +20,7 @@ #define BOOT_DEVICE_QSPI_1 0x0A #define BOOT_DEVICE_QSPI_4 0x0B #define BOOT_DEVICE_UART 0x43 -#define BOOT_DEVICE_USB0x45 +#define BOOT_DEVICE_DFU0x45 #define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1 #define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2_2 diff --git a/common/spl/spl.c b/common/spl/spl.c index b7ec333..02e6abb 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -171,7 +171,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) # define CONFIG_SPL_LOAD_FIT_ADDRESS 0 #endif -#ifdef CONFIG_SPL_RAM_DEVICE +#if defined(CONFIG_SPL_RAM_DEVICE) || defined(CONFIG_SPL_DFU_SUPPORT) static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, ulong count, void *buf) { @@ -309,6 +309,9 @@ struct boot_device_name boot_name_table[] = { #ifdef CONFIG_SPL_USB_SUPPORT { BOOT_DEVICE_USB, "USB" }, #endif +#ifdef CONFIG_SPL_DFU_SUPPORT + { BOOT_DEVICE_DFU, "USB DFU" }, +#endif #ifdef CONFIG_SPL_SATA_SUPPORT { BOOT_DEVICE_SATA, "SATA" }, #endif @@ -395,6 +398,11 @@ static int spl_load_image(u32 boot_device) case BOOT_DEVICE_USB: return spl_usb_load_image(); #endif +#ifdef CONFIG_SPL_DFU_SUPPORT + case BOOT_DEVICE_DFU: + spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0"); + return spl_ram_load_image(); +#endif #ifdef CONFIG_SPL_SATA_SUPPORT case BOOT_DEVICE_SATA: return spl_sata_load_image(); -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 10/10] boston: Introduce support for the MIPS Boston development board
On 07/27/2016 04:26 PM, Paul Burton wrote: > This patch introduces support for building U-Boot to run on the MIPS > Boston development board. This is a board built around an FPGA & an > Intel EG20T Platform Controller Hub, used largely as part of the > development of new CPUs and their software support. It is essentially > the successor to the older MIPS Malta board. > > Signed-off-by: Paul Burton [...] > +++ b/board/imgtec/boston/boston-regs.h > @@ -0,0 +1,47 @@ > +/* > + * Copyright (C) 2016 Imagination Technologies > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ > + > +#ifndef __BOARD_BOSTON_REGS_H__ > +#define __BOARD_BOSTON_REGS_H__ > + > +#define BOSTON_PLAT_BASE 0x17ffd000 > +#define BOSTON_LCD_BASE 0x17fff000 > + > +/* > + * Platform Register Definitions > + */ > +#define BOSTON_PLAT_CORE_CL 0x04 > + > +#define BOSTON_PLAT_DDR3STAT 0x14 > +# define BOSTON_PLAT_DDR3STAT_CALIB (1 << 2) > + > +#define BOSTON_PLAT_MMCMDIV 0x30 > +# define BOSTON_PLAT_MMCMDIV_CLK0DIV (0xff << 0) > +# define BOSTON_PLAT_MMCMDIV_INPUT (0xff << 8) > +# define BOSTON_PLAT_MMCMDIV_MUL (0xff << 16) > +# define BOSTON_PLAT_MMCMDIV_CLK1DIV (0xff << 24) > + > +#define BOSTON_PLAT_DDRCONF0 0x38 > +# define BOSTON_PLAT_DDRCONF0_SIZE (0xf << 0) > + > +#ifndef __ASSEMBLY__ > + > +#include > + > +#define BUILD_PLAT_ACCESSORS(offset, name) \ > +static inline uint32_t read_boston_##name(void) > \ > +{\ > + uint32_t *reg = (void *)CKSEG1ADDR(BOSTON_PLAT_BASE) + (offset);\ > + return __raw_readl(reg);\ > +} Don't we have enough standard accessors to confuse people ? Why do you add another custom ones ? Remove this and just use standard accessors throughout the code. > +BUILD_PLAT_ACCESSORS(BOSTON_PLAT_CORE_CL, core_cl) > +BUILD_PLAT_ACCESSORS(BOSTON_PLAT_MMCMDIV, mmcmdiv) > +BUILD_PLAT_ACCESSORS(BOSTON_PLAT_DDRCONF0, ddrconf0) > + > +#endif /* !__ASSEMBLY__ */ > + > +#endif /* __BOARD_BOSTON_REGS_H__ */ > diff --git a/board/imgtec/boston/checkboard.c > b/board/imgtec/boston/checkboard.c > new file mode 100644 > index 000..417ac4e > --- /dev/null > +++ b/board/imgtec/boston/checkboard.c > @@ -0,0 +1,29 @@ > +/* > + * Copyright (C) 2016 Imagination Technologies > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ > + > +#include > + > +#include > + > +#include "boston-lcd.h" > +#include "boston-regs.h" > > +int checkboard(void) > +{ > + u32 changelist; > + > + lowlevel_display("U-boot "); > + > + printf("Board: MIPS Boston\n"); > + > + printf("CPU: 0x%08x", read_c0_prid()); This should be in print_cpuinfo() > + changelist = read_boston_core_cl(); > + if (changelist > 1) > + printf(" cl%x", changelist); > + putc('\n'); > + > + return 0; > +} > diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c > new file mode 100644 > index 000..7caed4b > --- /dev/null > +++ b/board/imgtec/boston/ddr.c > @@ -0,0 +1,30 @@ > +/* > + * Copyright (C) 2016 Imagination Technologies > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ > + > +#include > + > +#include > + > +#include "boston-regs.h" > + > +phys_size_t initdram(int board_type) > +{ > + u32 ddrconf0 = read_boston_ddrconf0(); > + > + return (phys_size_t)(ddrconf0 & BOSTON_PLAT_DDRCONF0_SIZE) << 30; > +} > + > +ulong board_get_usable_ram_top(ulong total_size) > +{ > + DECLARE_GLOBAL_DATA_PTR; > + > + if (gd->ram_top < CONFIG_SYS_SDRAM_BASE) { > + /* 2GB wrapped around to 0 */ > + return CKSEG0ADDR(256 << 20); > + } > + > + return min_t(unsigned long, gd->ram_top, CKSEG0ADDR(256 << 20)); > +} > diff --git a/board/imgtec/boston/lowlevel_init.S > b/board/imgtec/boston/lowlevel_init.S > new file mode 100644 > index 000..8928172 > --- /dev/null > +++ b/board/imgtec/boston/lowlevel_init.S > @@ -0,0 +1,56 @@ > +/* > + * Copyright (C) 2016 Imagination Technologies > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ > + > +#include > + > +#include > +#include > +#include > +#include > + > +#include "boston-regs.h" > + > +.data > + > +msg_ddr_cal: .ascii "DDR Cal " > +msg_ddr_ok: .ascii "DDR OK " > + > +.text > + > +LEAF(lowlevel_init) > + moves0, ra > + > + PTR_LA a0, msg_ddr_cal > + bal lowlevel_display Don't you need nop after branch on mips ? > + > + PTR_LI t0, CKSEG1ADDR(BOSTON_PLAT_BASE) > +1: lw t1, BOSTON_PLAT_DDR3STAT(t0) > + andit1, t1, BOSTON_PLAT_DDR3STAT_CALIB > + beqzt1, 1b > + > + PTR_LA a0, msg_ddr_ok > + bal lowlevel_display > + > + movev0, zero > + jr s0 > + END(lowlevel_init) > + > +LEAF(lowlevel_display) > + .setpush > + .setnoat > + PTR_LI AT, CKSEG1ADDR(BOSTON_LCD_BASE) > +#ifdef CONFIG_64BIT >
Re: [U-Boot] [PATCH 0/2] ARM: Introduce function to switch to hypervisor mode
On 07/27/2016 05:37 AM, Keerthy wrote: > > > On Wednesday 27 July 2016 09:05 AM, Keerthy wrote: >> On SoCs like DRA7, OMAP5 one cannot enable hypervisor mode directly >> from the >> u-boot because the ROM code puts the chip to supervisor mode after it >> jumps to boot loader. >> >> Patch 1: Introduces a weak function which can be overridden specific to >> SoCs to switch to hypervisor mode. >> >> Patch 2: overrides weak function in patch 1 switch cpu to hypervisor >> mode using the available ROM code hook early in the boot phase before >> the boot loader checks for hypervisor mode on OMAP5 based SoCs. >> >> Based on top of http://patchwork.dal.design.ti.com/patch/24937/. > > Please ignore the above link. > > Based on: > > http://lists.denx.de/pipermail/u-boot/2016-June/258300.html Please resubmit fixed patch. Also please add your full name as the author, otherwise the patches can not be applied. See ie. https://lwn.net/Articles/195643/ >> >> Keerthy (2): >>ARM: Introduce function to switch to hypervisor mode >>ARM: OMAP5+: Override switch_to_hypervisor function >> >> arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 21 >> + >> arch/arm/cpu/armv7/start.S | 15 +++ >> arch/arm/include/asm/system.h | 1 + >> 3 files changed, 37 insertions(+) >> -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] treewide: move CONFIG_PHYS_64BIT to Kconfig
Masihiro-san >See, the following hunk >> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig >> b/arch/arm/cpu/armv7/omap5/Kconfig >> index 4fb5ef9..a8600b1 100644 >> --- a/arch/arm/cpu/armv7/omap5/Kconfig >> +++ b/arch/arm/cpu/armv7/omap5/Kconfig >> @@ -13,6 +13,7 @@ config TARGET_OMAP5_UEVM config TARGET_DRA7XX_EVM >> bool "TI DRA7XX" >> select TI_I2C_BOARD_DETECT >> + select PHYS_64BIT >> >> config TARGET_AM57XX_EVM >> bool "AM57XX" While applying patch, Kconfig changes got missed. Some how, this below change did not reflect. That is the problem. - diff --git a/Kconfig b/Kconfig index 335efcd..f80216f 100644 --- a/Kconfig +++ b/Kconfig @@ -126,6 +126,14 @@ config TOOLS_DEBUG debug through the source code, etc. endif + +config PHYS_64BIT + bool "64bit physical address support" + help + Say Y here to support 64bit physical memory address. + This can be used not only for 64bit SoCs, but also for + large physical address extention on 32bit SoCs. + Once again, I have applied your original patch, it worked fine. Sorry for confusion. Thanks Regards Ravi ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
Ziyuan, I tested this patch and it works for me with the current u-boot.git/master. Re the EFI support. The problem was that when you compile in efi_runtime.c it breaks booting the kernel. Probably rubbing the caching system the wrong way. With this patch we are able to boot the kernel with the EFI parts compiled in. I don't believe anyone has tested the functionality of EFI wtih rk3288. Sandy Patterson On Thu, Jul 28, 2016 at 8:03 AM, Ziyuan Xu wrote: > Hi Alexander, > > On 2016年07月28日 18:39, Alexander Graf wrote: > >> On 07/28/2016 12:13 PM, Ziyuan Xu wrote: >> >>> For ARMv7-A architecture, the valid ISB instruction is asm >>> volatile("isb"). >>> >>> This patch fixes the U-Boot was stuck in invalidate_dcache_all() before >>> booting linux kernel, which occurred on rk3288-base development board >>> such as evb-rk3288, rock2-rk3288. And something output via console like: >>> >>> => bootz 0x200 >>> 0x0200 >>> ramdisk start = 0x, ramdisk end = 0x >>> Continuing to boot without FDT >>> Initial value for argc=3 >>> Final value for argc=3 >>> using: ATAGS >>> >>> Starting kernel ... >>> >>> Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). >>> >>> Signed-off-by: Ziyuan Xu >>> >> >> Perfect! So with this, EFI support can still be in and things work fine? >> > > I had not test EFI feature, in fact, I have no experience about it. Any > progress I will promptly inform you. > > >> >> Alex >> >> >> >> >> > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] ARM: Introduce function to switch to hypervisor mode
Hi Marek, On Thursday 28 July 2016 05:38 PM, Marek Vasut wrote: On 07/27/2016 05:37 AM, Keerthy wrote: On Wednesday 27 July 2016 09:05 AM, Keerthy wrote: On SoCs like DRA7, OMAP5 one cannot enable hypervisor mode directly from the u-boot because the ROM code puts the chip to supervisor mode after it jumps to boot loader. Patch 1: Introduces a weak function which can be overridden specific to SoCs to switch to hypervisor mode. Patch 2: overrides weak function in patch 1 switch cpu to hypervisor mode using the available ROM code hook early in the boot phase before the boot loader checks for hypervisor mode on OMAP5 based SoCs. Based on top of http://patchwork.dal.design.ti.com/patch/24937/. Please ignore the above link. Based on: http://lists.denx.de/pipermail/u-boot/2016-June/258300.html Please resubmit fixed patch. Also please add your full name as the author, otherwise the patches can not be applied. I will re-submit the patches with the correct link. Coming to the name. My full name is Keerthy and that is the name i have been using for the last 4-5 years in the mailing list. I do not have a surname. - Keerthy See ie. https://lwn.net/Articles/195643/ Keerthy (2): ARM: Introduce function to switch to hypervisor mode ARM: OMAP5+: Override switch_to_hypervisor function arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 21 + arch/arm/cpu/armv7/start.S | 15 +++ arch/arm/include/asm/system.h | 1 + 3 files changed, 37 insertions(+) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Disable command at runtime
Hello, I wonder whether it is possible to dynamically enable/disable a command. Since u-boot does not provide any secure authentication method, it is dangerous to keep some commands available to a potential hacker. E.g. the "fuse" command. On the other hand, I need these commands during the manufacturing process. So my idea is to enable/disable the commands dynamically based on some obscure logic. Is there a way to do it without need to deeply hack the code? Thanks, Petr -- View this message in context: http://u-boot.10912.n7.nabble.com/Disable-command-at-runtime-tp262632.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
[U-Boot] [PATCH v3] libfdt: Introduce new ARCH_FIXUP_FDT option
Add new Kconfig option to disable arch_fixup_fdt() calls for cases where U-Boot shouldn't update memory setup in DTB file. One example of usage of this option is to boot OS with different memory setup than U-Boot use. Signed-off-by: Michal Simek --- Changes in v3: - Fix MIPS macro Changes in v2: - Change logic to be possitive - sjg Kconfig | 9 + arch/arm/lib/bootm-fdt.c | 2 ++ arch/arm/lib/bootm.c | 2 ++ arch/mips/lib/bootm.c| 2 ++ common/image-fdt.c | 7 ++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Kconfig b/Kconfig index ef12f9fbee40..626e82f88dfe 100644 --- a/Kconfig +++ b/Kconfig @@ -342,6 +342,15 @@ config SYS_CLK_FREQ help TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture +config ARCH_FIXUP_FDT + bool "Enable arch_fixup_fdt() call" + depends on ARM || MIPS + default y + help + Enable FDT memory map syncup before OS boot. This feature can be + used for booting OS with different memory setup where the part of + the memory location should be used for different purpose. + endmenu# Boot images source "common/Kconfig" diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c index 4481f9e2fa9c..a51755070bc9 100644 --- a/arch/arm/lib/bootm-fdt.c +++ b/arch/arm/lib/bootm-fdt.c @@ -25,6 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_ARCH_FIXUP_FDT int arch_fixup_fdt(void *blob) { bd_t *bd = gd->bd; @@ -60,3 +61,4 @@ int arch_fixup_fdt(void *blob) return 0; } +#endif diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index c20ef227fb4e..f9ed7fe38ab8 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -367,8 +367,10 @@ void boot_prep_vxworks(bootm_headers_t *images) if (images->ft_addr) { off = fdt_path_offset(images->ft_addr, "/memory"); if (off < 0) { +#ifdef CONFIG_ARCH_FIXUP_FDT if (arch_fixup_fdt(images->ft_addr)) puts("## WARNING: fixup memory failed!\n"); +#endif } } #endif diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index aa0475a4954e..0c6a4ab3b329 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -253,6 +253,7 @@ static int boot_reloc_fdt(bootm_headers_t *images) #endif } +#ifdef CONFIG_ARCH_FIXUP_FDT int arch_fixup_fdt(void *blob) { #if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) @@ -264,6 +265,7 @@ int arch_fixup_fdt(void *blob) return 0; #endif } +#endif static int boot_setup_fdt(bootm_headers_t *images) { diff --git a/common/image-fdt.c b/common/image-fdt.c index 6cac7dbb7f8b..d6ee225d409e 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -458,11 +458,6 @@ __weak int ft_verify_fdt(void *fdt) return 1; } -__weak int arch_fixup_fdt(void *blob) -{ - return 0; -} - int image_setup_libfdt(bootm_headers_t *images, void *blob, int of_size, struct lmb *lmb) { @@ -479,10 +474,12 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, printf("ERROR: /chosen node create failed\n"); goto err; } +#ifdef CONFIG_ARCH_FIXUP_FDT if (arch_fixup_fdt(blob) < 0) { printf("ERROR: arch-specific fdt fixup failed\n"); goto err; } +#endif if (IMAGE_OF_BOARD_SETUP) { fdt_ret = ft_board_setup(blob, gd->bd); if (fdt_ret) { -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Netconsole hangs
Hello, I would like to use netconsole instead of serial console. It works fine if the Ethernet cable is plugged in the device. The problem is that it hangs forever if the cable is unplugged, which can generally happen. Is this a normal behavior or a bug? Any workaround? (u-boot 2016.01, vf610twr configuration) Thank you, Petr -- View this message in context: http://u-boot.10912.n7.nabble.com/Netconsole-hangs-tp262633.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] [RFC PATCH v2 1/5] spl: dfu: add dfu support in SPL
On Thu, Jul 28, 2016 at 04:09:10AM +, B, Ravi wrote: > Tom > > > On 27-Jul-2016, at 8:55 PM, Tom Rini wrote: > > > >> On Wed, Jul 27, 2016 at 02:04:24PM +, B, Ravi wrote: [snip] > diff --git a/common/command.c b/common/command.c index > e5d9b9c..d1c049c 100644 > --- a/common/command.c > +++ b/common/command.c > @@ -520,7 +520,7 @@ enum command_ret_t cmd_process(int flag, int argc, > char * const argv[], > if (argc > cmdtp->maxargs) > rc = CMD_RET_USAGE; > > -#if defined(CONFIG_CMD_BOOTD) > +#if defined(CONFIG_CMD_BOOTD) && !defined(CONFIG_SPL_BUILD) > /* avoid "bootd" recursion */ Check whether they use DMA or PIO mode. > >> > else if (cmdtp->cmd == do_bootd) { > if (flag & CMD_FLAG_BOOTD) { > >> > >>> Why do we need this? > >> > >> Actually CONFIG_CMD_BOOTD is not required for SPL-DFU. > >> But cmd/Kconfg has defined CONFIG_CMD_BOOTD by default, which is causing > >> compilation error for "do_bootd" not defined. > >> Again do_bootd depends on CONFIG_CMD_BOOTM which is not defined for SPL. > >> > >> What is best way? What do you suggest ? > > > > First, what is the exact compile error you get? And second, probably > > disable CMD_BOOTD. > > Since CMD_BOOTD is enabled, the function do_bood is undefined due to > cmd/bootm.c compiled out for SPL. > > As you said, better to disable CMD_BOOTD. Ah, the problems of bringing in command parsing stuff to SPL. Yeah, for now lets turn off CMD_BOOTD but I think long term this is why we need to not be relying on command parsing but instead use the API directly. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] net: fm: fix spi flash probe for using driver model
On 28 July 2016 at 08:06, Qianyu Gong wrote: > > >> -Original Message- >> From: york sun >> Sent: Thursday, July 28, 2016 1:35 AM >> To: Qianyu Gong ; u-boot@lists.denx.de; Prabhakar >> Kushwaha ; Mingkai Hu >> Cc: Shaohui Xie ; Zhiqiang Hou ; >> Wenbin Song >> Subject: Re: [PATCH 1/2] net: fm: fix spi flash probe for using driver model >> >> On 07/20/2016 03:51 AM, Gong Qianyu wrote: >> > The current code would always use the speed and mode set by >> > CONFIG_ENV_SPI_MAX_HZ and CONFIG_ENV_SPI_MODE. But if using SPI driver >> > model it should get the values from DT. >> > >> > Signed-off-by: Gong Qianyu >> > --- >> > drivers/net/fm/fm.c | 10 ++ >> > 1 file changed, 10 insertions(+) >> > >> > diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index >> > 00cdfd4..6308d22 100644 >> > --- a/drivers/net/fm/fm.c >> > +++ b/drivers/net/fm/fm.c >> > @@ -371,8 +371,18 @@ int fm_init_common(int index, struct ccsr_fman *reg) >> > void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH); >> > int ret = 0; >> > >> > +#ifdef CONFIG_DM_SPI_FLASH >> > + struct udevice *new; >> > + >> > + /* Will get the speed and mode from Device Tree */ Below one look good phrase for me. /* speed and mode will be read from DT */ >> > + ret = spi_flash_probe_bus_cs(CONFIG_ENV_SPI_BUS, >> CONFIG_ENV_SPI_CS, >> > +0, 0, &new); >> > + >> > + ucode_flash = dev_get_uclass_priv(new); #else >> > ucode_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, >> CONFIG_ENV_SPI_CS, >> > CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); >> > +#endif >> > if (!ucode_flash) >> > printf("SF: probe for ucode failed\n"); >> > else { >> > >> >> Why not just use spi_flash_probe() with speed and mode passed as 0? >> >> York > > As Simon said spi_flash_probe() "is an old-style function and would be removed > when all SPI flash drivers use dm", so I think for dm spi_flash_probe_bus_cs() > should be used. Correct! Reviewed-by: Jagan Teki -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] spi: ti_qspi: dra7xx: Add support to use 76.8MHz clock
On 27 July 2016 at 17:40, Vignesh R wrote: > > > On Wednesday 27 July 2016 12:05 PM, Jagan Teki wrote: >> On 25 July 2016 at 15:45, Vignesh R wrote: >>> According to AM572x DM SPRS953A, QSPI bus speed can be 76.8MHz, update >>> the driver to use the same. >>> >>> Signed-off-by: Vignesh R >>> --- >>> drivers/spi/ti_qspi.c | 17 - >>> 1 file changed, 12 insertions(+), 5 deletions(-) >>> >>> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c >>> index fa7ee229878a..bb72cb03ec24 100644 >>> --- a/drivers/spi/ti_qspi.c >>> +++ b/drivers/spi/ti_qspi.c >>> @@ -21,7 +21,8 @@ DECLARE_GLOBAL_DATA_PTR; >>> >>> /* ti qpsi register bit masks */ >>> #define QSPI_TIMEOUT200 >>> -#define QSPI_FCLK 19200 >>> +#define QSPI_FCLK 19200 >>> +#define QSPI_DRA7XX_FCLK7680 >>> /* clock control */ >>> #define QSPI_CLK_EN BIT(31) >>> #define QSPI_CLK_DIV_MAX0x >>> @@ -101,6 +102,7 @@ struct ti_qspi_priv { >>> #endif >>> struct ti_qspi_regs *base; >>> void *ctrl_mod_mmap; >>> + ulong fclk; >>> unsigned int mode; >>> u32 cmd; >>> u32 dc; >>> @@ -113,7 +115,7 @@ static void ti_spi_set_speed(struct ti_qspi_priv *priv, >>> uint hz) >>> if (!hz) >>> clk_div = 0; >>> else >>> - clk_div = (QSPI_FCLK / hz) - 1; >>> + clk_div = (priv->fclk / hz) - 1; >> >> Then how this relate to max_hz (priv->max_hz), look like it is not >> using anywhere. > > I think priv-max_hz defines the max frequency QSPI IP can support (flash > node can always be configured to run at higher or lower frequency which > is specified by spi-max-frequency in flash subnode). What's missing is a > check to see if frequency requested in set_speed() is not greater than > priv->max_hz. I will implement that in another series. Reviewed-by: Jagan Teki -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] ARM: dts: dra7xx: Update spi-max-frequency for QSPI
On 25 July 2016 at 19:16, Vignesh R wrote: > > > On Monday 25 July 2016 07:08 PM, Tom Rini wrote: >> On Mon, Jul 25, 2016 at 03:45:47PM +0530, Vignesh R wrote: >> >>> According to AM572x DM SPRS953A, QSPI max bus speed is 76.8MHz. >>> Therefore update the spi-max-frequency value of QSPI node for DRA74 and >>> DRA72 evm. This increase flash read speed by ~2MB/s. >>> >>> Signed-off-by: Vignesh R >> >> Reviewed-by: Tom Rini >> >> And similar changes are taking place in Linux-land and the DTS will be >> updated there too, right? Thanks! > > Yes, I will be updating Kernel DTS too... Reviewed-by: Jagan Teki -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] ARM: Introduce function to switch to hypervisor mode
On Thu, Jul 28, 2016 at 02:08:10PM +0200, Marek Vasut wrote: > On 07/27/2016 05:37 AM, Keerthy wrote: > > > > > > On Wednesday 27 July 2016 09:05 AM, Keerthy wrote: > >> On SoCs like DRA7, OMAP5 one cannot enable hypervisor mode directly > >> from the > >> u-boot because the ROM code puts the chip to supervisor mode after it > >> jumps to boot loader. > >> > >> Patch 1: Introduces a weak function which can be overridden specific to > >> SoCs to switch to hypervisor mode. > >> > >> Patch 2: overrides weak function in patch 1 switch cpu to hypervisor > >> mode using the available ROM code hook early in the boot phase before > >> the boot loader checks for hypervisor mode on OMAP5 based SoCs. > >> > >> Based on top of http://patchwork.dal.design.ti.com/patch/24937/. > > > > Please ignore the above link. > > > > Based on: > > > > http://lists.denx.de/pipermail/u-boot/2016-June/258300.html > > Please resubmit fixed patch. That's just a bad link in 0/2, nothing to resubmit. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ARM: Introduce function to switch to hypervisor mode
On Wed, Jul 27, 2016 at 09:05:35AM +0530, Keerthy wrote: > On some of the SoCs one cannot enable hypervisor mode directly from the > u-boot because the ROM code puts the chip to supervisor mode after it > jumps to boot loader. Hence introduce a weak function which can be > overridden based on the SoC type and switch to hypervisor mode in a > custom way. > > Cc: beagleboard-...@googlegroups.com > Signed-off-by: Keerthy Reviewed-by: Tom Rini -- 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 2/2] ARM: OMAP5+: Override switch_to_hypervisor function
On Wed, Jul 27, 2016 at 09:05:36AM +0530, Keerthy wrote: > Override the switch_to_hypervisor function to switch cpu to hypervisor > mode using the available ROM code hook early in the boot phase before > the boot loader checks for HYP mode. > > Based on the work done by Jonathan Bergsagel jbergsa...@ti.com. > > Cc: beagleboard-...@googlegroups.com > Signed-off-by: Keerthy > Acked-by: Nishanth Menon Reviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] rockchip: rockchip, sdram-channel 0xff fix remaining dts
Add an extra byte so that this data is not byteswapped. Signed-off-by: Sandy Patterson --- arch/arm/dts/rk3288-rock2-square.dts | 2 +- arch/arm/dts/rk3288-veyron.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/rk3288-rock2-square.dts b/arch/arm/dts/rk3288-rock2-square.dts index 34073c9..2c30355 100644 --- a/arch/arm/dts/rk3288-rock2-square.dts +++ b/arch/arm/dts/rk3288-rock2-square.dts @@ -192,7 +192,7 @@ 0x5 0x0>; rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200 0xa60 0x40 0x10 0x0>; - rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xf 0xf>; + rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xf 0xf 0xff>; rockchip,sdram-params = <0x30B25564 0x627 3 66600 3 9 1>; }; diff --git a/arch/arm/dts/rk3288-veyron.dtsi b/arch/arm/dts/rk3288-veyron.dtsi index 421d212..d9d5187 100644 --- a/arch/arm/dts/rk3288-veyron.dtsi +++ b/arch/arm/dts/rk3288-veyron.dtsi @@ -253,7 +253,7 @@ 0x5 0x0>; rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200 0xa60 0x40 0x10 0x0>; - rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xf 0xf>; + rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xf 0xf 0xff>; rockchip,sdram-params = <0x30B25564 0x627 3 66600 3 9 1>; }; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] x86: som-db5800-som-6867: fix SERIRQ on reset
On Thu, Jul 28, 2016 at 1:36 AM, Bin Meng wrote: > On Thu, Jul 28, 2016 at 6:01 AM, George McCollister > wrote: >> Pad configuration for SERIRQ is not set to enable the SERIRQ function >> on soft reset though strangely, it is on initial boot. >> > > What does "soft reset" mean? My apologies, this is misleading/incorrect. Rebooting from Linux, reset command in u-boot and even pushing the reset button on the development board all lead to this condition (address 0xfed0c560 with value of 0x2003cc80). On first boot, address 0xfed0c560 has a value of 0x2003cc81 (SERIRQ function selected). I'll update the commit message, add your reviewed-by and post a v2. > >> Signed-off-by: George McCollister >> --- >> arch/x86/dts/baytrail_som-db5800-som-6867.dts | 6 ++ >> 1 file changed, 6 insertions(+) >> > > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Inverted ARM SoC DRAM timing for self-refresh exit and power-down exit.
Hello In the sdram_config.h files for the ARM SoC (Arria5 and Cyclone5): - board/altera/cyclone5-socdk/qts/sdram_config.h - board/altera/arria5-socdk/qts/sdram_config.h There are 2 values for self-refresh exit and power-down exit DRAM timing: #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_PWRDOWNEXIT 3 #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_SELFRFSHEXIT512 I think those 2 values are inverted. The DRAM documents specify that the self-refresh exit shall be something along the lines 'Greatest of 5CK or tRFC (which is the refresh cycle period)'. The tRFC requirement is so that if self-refresh mode is exit from at the instant a row refresh was self-initiated, that the operation has time to complete before resuming other operations. That is the time to delay when not requiring the DLL to re-lock. And the power-down exit is the delay to give when the DLL has to re-lock (since DRAM was in power-down), and minimum value is tDLL (usually 512CK). So, the two values seem to be inverted, right? I know where the confusion comes from though, as while investigating the issue, I found out that the Quartus QSYS does give those inverted values. That's right, there seem to be a bug in Altera's QSYS, and it's been there since probably forever. I have opened a request with Altera mySupport in parallel, to ask and confirm if there is indeed a bug in QSYS. So, the files should read: ... #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRFC 139 ... #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_PWRDOWNEXIT 512 #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING4_SELFRFSHEXIT 139 Can you confirm the issue? Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] x86: som-db5800-som-6867: fix SERIRQ on reset
Explicitly enable ILB_SERIRQ function 1 in cfio_regs_pad_ilb_serirq_PCONF0. Pad configuration for SERIRQ is not set to enable the SERIRQ function after a reset though strangely, it is on initial boot. Rebooting from Linux, reset command in u-boot and even pushing the reset button on the development board all lead to the SERIRQ function being disabled (address 0xfed0c560 with value of 0x2003cc80). Signed-off-by: George McCollister Reviewed-by: Bin Meng --- Changes in v2: - Reword commit message arch/x86/dts/baytrail_som-db5800-som-6867.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/dts/baytrail_som-db5800-som-6867.dts b/arch/x86/dts/baytrail_som-db5800-som-6867.dts index 64e2e52..e1d81a7 100644 --- a/arch/x86/dts/baytrail_som-db5800-som-6867.dts +++ b/arch/x86/dts/baytrail_som-db5800-som-6867.dts @@ -63,6 +63,12 @@ pad-offset = <0x270>; mode-func = <2>; }; + + /* SERIRQ */ + soc_gpio_s0_50@0 { + pad-offset = <0x560>; + mode-func = <1>; + }; }; chosen { -- 2.8.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 8/9] mmc: tegra: port to standard clock/reset APIs
On 07/27/2016 07:09 PM, Jaehoon Chung wrote: Hi Stephen, On 07/28/2016 06:24 AM, Stephen Warren wrote: From: Stephen Warren Tegra186 supports the new standard clock and reset APIs. Older Tegra SoCs still use custom APIs. Enhance the Tegra MMC driver so that it can operate with either set of APIs. diff --git a/arch/arm/include/asm/arch-tegra/tegra_mmc.h b/arch/arm/include/asm/arch-tegra/tegra_mmc.h +#ifdef CONFIG_TEGRA186 + { + ulong rate = clk_set_rate(&host->clk, clock); + div = (rate + clock - 1) / clock; + } It seems that doesn't need to add the bracket. There's a variable declaration at the start of the block. Without the brackets, the compiler can/will complain about variable declarations being in the middle of a block. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if using driver model
On 07/27/2016 07:57 PM, Qianyu Gong wrote: > Hi York, > >> -Original Message- >> From: york sun >> Sent: Wednesday, July 27, 2016 10:55 PM >> To: Qianyu Gong ; u-boot@lists.denx.de; Simon Glass >> >> Cc: Shaohui Xie ; Zhiqiang Hou ; >> Wenbin Song ; Yao Yuan ; Mingkai >> Hu ; Prabhakar Kushwaha >> >> Subject: Re: [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if using >> driver >> model >> >> On 07/27/2016 03:00 AM, Qianyu Gong wrote: >>> >>> Hi York, >>> -Original Message- From: york sun Sent: Tuesday, July 26, 2016 12:26 PM To: Qianyu Gong ; u-boot@lists.denx.de; Prabhakar Kushwaha ; Mingkai Hu Cc: Shaohui Xie ; Zhiqiang Hou ; Wenbin Song Subject: Re: [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if using driver model On 07/25/2016 09:05 PM, Qianyu Gong wrote: > Hi York, > > > As the drivel model is a trend anyway, I just doubt if it is > necessary to support non-DM for the new platforms. > > In fact, we have discarded configurations for non-DM SPI such as SPI > mode related macros > > when doing LS1043A upstream. So the current configuration of LS1043A > doesn't support non-DM SPI. > > > LS1012A supports both ways but the code doesn't differentiate the > respective macros. > > The CONFIG_ENV_SPI_* are set for FMAN ucode at the beginning but I > just find that LS1012A doesn't have FMAN. So it's dead code if using > DM or just duplicated code that is the same with defines in > common/env_sf.c if using non-DM. Qianyu, If DM_SPI_FLASH should always be set, please select it from Kconfig. York >>> >>> For LS1043A, DM_SPI_FLASH is still defined in >> include/configs/ls1043a_common.h. >>> So I think it won't be affected by menuconfig. But it should have been >>> moved to >> defconfig. >>> >>> As DM_SPI_FLASH doesn't depend on any platforms as per >>> "drivers/mtd/spi/Kconfig", I can just focus on solving the issue >>> caused by deselecting DM_SPI_FLASH. I also discussed with Yuan Yao. >>> >>> So how about I adding anything in Fman Kconfig like this? >>> " >>> config SYS_QE_FW_IN_SPIFLASH >>> depends on (FSL_LAYERSCAPE && DM_SPI_FLASH) || PPC " >>> But as for the existing code, it may need more efforts. >>> >> >> I think you can add "select" for the platforms which always use >> DM_SPI_FLASH, for >> example TARGET_LS1043AQDS. >> >> Simon, >> >> Please comment if this is a good practice. >> >> York >> > > If one doesn't select DSPI/QSPI on LS1043A boards, there would be no need to > select DM_SPI_FLASH. So to some extent it's not always used, correct? > If SPI is not always enabled, you don't need to select DM_SPI_FLASH. Just be aware, you can end up with a config in which legacy SPI enabled, but DM_SPI_FLASH not enabled, if you run menuconfig. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2 00/22] DM: Cmd: GPIO/LED/STM32/CLK: provide command-line support for device-tree configured gpios and leds
Hi Vikas, I was an holiday and am still catching up. Apart from that I'm still working on this patchset and integrating the comments and API-changes. What I'm currently missing is to setup the frequencies directly from clk_stm32.c. When this is done, I'll send an update. regards Benjamin On Thu, Jul 21, 2016 at 12:32:22AM +0200, Vikas MANOCHA wrote: > Hi Benjamin, > > Please let us know if you are working on this patchset. > I just saw another patchset but not using device tree & clock framework but > would like to have DT and clock framework in place for stm32. > > Cheers, > Vikas > > > -Original Message- > > From: Vikas MANOCHA > > Sent: Friday, July 01, 2016 4:35 PM > > To: 'Benjamin Tietz' ; u- > > b...@lists.denx.de > > Subject: RE: [U-Boot] [PATCH 2 00/22] DM: Cmd: GPIO/LED/STM32/CLK: > > provide command-line support for device-tree configured gpios and leds > > > > Hi Benjamin, > > > > Please keep all the involved developers in the "To" of the e-mail & resend > > the patchset for review comments (checkout scripts/get_maintainer.pl). > > Also separate the generic stuff (dts/led) from platform specific in another > > patchset. > > > > Cheers, > > Vikas > > > > > -Original Message- > > > From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of > > > Benjamin Tietz > > > Sent: Monday, June 20, 2016 11:26 AM > > > To: u-boot@lists.denx.de > > > Subject: [U-Boot] [PATCH 2 00/22] DM: Cmd: GPIO/LED/STM32/CLK: > > provide > > > command-line support for device-tree configured gpios and leds > > > > > > This series begins to provide device-tree support on stm32 devices, > > > starting with a the stack of a simple clock-driver (at least > > > enabling/disabling peripheral clocks), the gpio driver and leds. > > > > > > As the current led command-line interface isn't aware of any > > > device-tree configured led, the command gets rewritten and extended > > > for device-tree LEDs on the way. These changes are architecture > > indipendent. > > > > > > To accomplish these changes the led-uclass driver had to be extended, too. > > > > > > Changes in v2: > > > * more verbose commit messages > > > * correct clock calculation in stm32_clk > > > * minor adjustments > > > > > > > > > --- > > > > > > Benjamin Tietz (22): > > > stm32: gpio: fix otype access > > > stm32: gpio_direction_output: make sure, output is set to push-pull > > > stm32: gpio_get_value: always return 0 or 1 > > > stm32f429-discovery: config: enable status leds > > > Cmd: led: provide a selector in kconfig > > > DTS: stm32f429: provide device-tree files (from linux kernel) > > > clock-uclass: allow disabling a peripheral clock > > > STM32: clock: provide dts-accessible clock driver > > > DTS: STM32f429: add gpio-banks > > > STM32: gpio: group SOC-specific code to one ifdef/elif construct > > > GPIO: STM32: make DTS-aware > > > STM32F429-discovery: led: disable board-specific code, if DM is > > selected > > > GPIO/LED: make more robust, if STATUS_LED isn't selected > > > Cmd: LED: rewrite to prepare non-static access > > > DTS: STM32F429-disco: add board leds and enable rcc > > > LED: add function to retrieve a device's label > > > LED: provide function to count and get all (DM-)LEDs > > > cmd: LED: be aware of DTS-configured leds > > > LED: provide functionality to get led status > > > LED: GPIO: provide get_on() op > > > LED: provide toggling interface > > > Cmd: LED: make DM-leds toggle > > > > > > > > > arch/arm/dts/Makefile |2 > > > arch/arm/dts/armv7-m.dtsi | 24 ++ > > > arch/arm/dts/stm32429i-eval.dts | 75 ++ > > > arch/arm/dts/stm32f429-disco.dts | 97 > > > arch/arm/dts/stm32f429.dtsi | 282 +++ > > > board/st/stm32f429-discovery/Makefile |3 > > > cmd/Kconfig |4 > > > cmd/led.c | 401 > > > - > > > drivers/clk/Kconfig |4 > > > drivers/clk/Makefile |1 > > > drivers/clk/clk-uclass.c | 10 + > > > drivers/clk/clk_stm32.c | 112 + > > > drivers/gpio/stm32_gpio.c | 202 ++--- > > > drivers/led/led-uclass.c | 83 +++ > > > drivers/led/led_gpio.c| 11 + > > > drivers/misc/gpio_led.c |4 > > > drivers/misc/status_led.c |2 > > > include/clk.h | 18 + > > > include/configs/stm32f429-discovery.h | 14 + > > > include/led.h | 65 + > > > include/status_led.h |4 > > > 21 files changed, 1277 insertions(+), 141 deletions(-) create mode > > > 100644 arch/arm/dts/armv7-m.dtsi create mode 100644 > > > arch/arm/dts/stm32429i- eval.dts create mode 1006
Re: [U-Boot] [PATCH v2 07/22] clock-uclass: allow disabling a peripheral clock
Hi Simon, On Tue, Jul 12, 2016 at 10:02:43AM -0600, Simon Glass wrote: > +Stephen > > Hi Benjamin, > > On 20 June 2016 at 12:26, Benjamin Tietz wrote: > > From: Benjamin Tietz > > > > Currently, clocks can be enabled, only. To be feature-complete - and allow > > a bit of power-saving in applications - disabling a clock should be > > possible, too. > > > > This extend the API of the DM clock driver to allow a clock to be disabled. > > > > The corresponding operation is optional for not breaking existing drivers. > > What does this mean? I can't see how it is optional. What was meant was: If a driver can't handling disabling of peripherals, the request will be ignored silently - I think, the expected behaviour. > > Also please can you rebase to mainline and resend, as the API has > changed (sorry). ... including a clk_disable. So at least this patch can be dropped. regards Benjamin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] NXP QorIQ LS1021A-IoT board support
Greetings, I don't see U-Boot support for the TechNexion designed/built LS1021A-IoT. I've got one on my desk and am still muddling through the overly-complicated NXP BSP and I haven't found where they are building U-Boot from yet or with what patchset. Is this board supported by perhaps a config I'm not seeing in U-Boot master? Thanks, Tim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: Add defconfig and dts file for the Orange Pi PC Plus SBC
On 27 July 2016 at 03:58, Hans de Goede wrote: > There is a new Orange Pi PC *Plus* version available now, > this is an extended version of the regular Orange Pi PC > with sdio wifi and an eMMC. > > The upstream kernel devs have decided that they want a separate > dts for the PC Plus rather then sharing a single dts between the > regular PC and the PC Plus. So add a new orangepi_pc_plus_defconfig > to match. > > The added dts file matches the one submitted to the upstream kernel. > > Signed-off-by: Hans de Goede > --- > arch/arm/dts/Makefile | 1 + > arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts | 87 > ++ > board/sunxi/MAINTAINERS| 1 + > configs/orangepi_pc_defconfig | 1 - > ...epi_pc_defconfig => orangepi_pc_plus_defconfig} | 3 +- > 5 files changed, 90 insertions(+), 3 deletions(-) > create mode 100644 arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts > copy configs/{orangepi_pc_defconfig => orangepi_pc_plus_defconfig} (84%) > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > index ca8712a..1c3b705 100644 > --- a/arch/arm/dts/Makefile > +++ b/arch/arm/dts/Makefile > @@ -246,6 +246,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ > sun8i-h3-orangepi-lite.dtb \ > sun8i-h3-orangepi-one.dtb \ > sun8i-h3-orangepi-pc.dtb \ > + sun8i-h3-orangepi-pc-plus.dtb \ > sun8i-h3-orangepi-plus.dtb > dtb-$(CONFIG_MACH_SUN50I) += \ > sun50i-a64-pine64-plus.dtb \ > diff --git a/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts > b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts > new file mode 100644 > index 000..9a8cdd4 > --- /dev/null > +++ b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts > @@ -0,0 +1,87 @@ > +/* > + * Copyright (C) 2016 Hans de Goede > + * > + * This file is dual-licensed: you can use it either under the terms > + * of the GPL or the X11 license, at your option. Note that this dual > + * licensing only applies to this file, and not this project as a > + * whole. > + * > + * a) This file is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of the > + * License, or (at your option) any later version. > + * > + * This file is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * Or, alternatively, > + * > + * b) Permission is hereby granted, free of charge, to any person > + * obtaining a copy of this software and associated documentation > + * files (the "Software"), to deal in the Software without > + * restriction, including without limitation the rights to use, > + * copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following > + * conditions: > + * > + * The above copyright notice and this permission notice shall be > + * included in all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ Just to understand - why should all these sun*.dts files are not to follow u-boot licence (just because Linux has same)? SPDX-License-Identifier: GPL-2.0+ -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] sunxi: Re-enable h3 emac support
On 27 July 2016 at 23:55, Ian Campbell wrote: > On Wed, 2016-07-27 at 18:10 +0200, Hans de Goede wrote: >> With the recent bug fixes for the sun8i_emac driver all known issues >> are resolved, so we can re-enable the driver. >> >> While at it, also enable the emac on the Orange Pi One. >> >> Cc: Chen-Yu Tsai >> Cc: Corentin LABBE >> Cc: Amit Singh Tomar >> Signed-off-by: Hans de Goede > > Acked-by: Ian Campbell Acked-by: Jagan Teki -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NXP QorIQ LS1021A-IoT board support
On 07/28/2016 10:42 AM, Tim Harvey wrote: > Greetings, > > I don't see U-Boot support for the TechNexion designed/built > LS1021A-IoT. I've got one on my desk and am still muddling through the > overly-complicated NXP BSP and I haven't found where they are building > U-Boot from yet or with what patchset. > > Is this board supported by perhaps a config I'm not seeing in U-Boot master? > > Thanks, > Tim, I don't see other LS1021A boards in U-Boot, other than LS1021AQDS and LS1021ATWR. I don't think NXP can support third-party boards. Did you get any software from the vendor? York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/4] sun8i: On H3 Use word 1 instead of word 3 from the SID
Hi, On 28-07-16 05:13, Chen-Yu Tsai wrote: Hi, On Thu, Jul 28, 2016 at 3:14 AM, Siarhei Siamashka wrote: Hello Hans, On Wed, 27 Jul 2016 18:10:34 +0200 Hans de Goede wrote: It seems that bytes 13-14 of the SID / bytes 1-2 from word 3 of the SID are always 0 on H3 making it a poor candidate to use as source for the serialnr / mac-address, switch to word1 which seems to be more random. Cc: Chen-Yu Tsai Cc: Corentin LABBE Cc: Amit Singh Tomar Signed-off-by: Hans de Goede --- board/sunxi/board.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index ef3fe26..bbe5340 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -620,12 +620,17 @@ static void setup_environment(const void *fdt) uint8_t mac_addr[6]; char ethaddr[16]; int i, ret; +#ifdef CONFIG_MACH_SUN8I_H3 + const int idx0 = 0, idx1 = 1; +#else + const int idx0 = 0, idx1 = 3; +#endif ret = sunxi_get_sid(sid); - if (ret == 0 && sid[0] != 0 && sid[3] != 0) { + if (ret == 0 && sid[idx0] != 0 && sid[idx1] != 0) { /* Ensure the NIC specific bytes of the mac are not all 0 */ - if ((sid[3] & 0xff) == 0) - sid[3] |= 0x80; + if ((sid[idx1] & 0xff) == 0) + sid[idx1] |= 0x80; for (i = 0; i < 4; i++) { sprintf(ethaddr, "ethernet%d", i); @@ -642,18 +647,18 @@ static void setup_environment(const void *fdt) /* Non OUI / registered MAC address */ mac_addr[0] = (i << 4) | 0x02; - mac_addr[1] = (sid[0] >> 0) & 0xff; - mac_addr[2] = (sid[3] >> 24) & 0xff; - mac_addr[3] = (sid[3] >> 16) & 0xff; - mac_addr[4] = (sid[3] >> 8) & 0xff; - mac_addr[5] = (sid[3] >> 0) & 0xff; + mac_addr[1] = (sid[idx0] >> 0) & 0xff; + mac_addr[2] = (sid[idx1] >> 24) & 0xff; + mac_addr[3] = (sid[idx1] >> 16) & 0xff; + mac_addr[4] = (sid[idx1] >> 8) & 0xff; + mac_addr[5] = (sid[idx1] >> 0) & 0xff; eth_setenv_enetaddr(ethaddr, mac_addr); } if (!getenv("serial#")) { snprintf(serial_string, sizeof(serial_string), - "%08x%08x", sid[0], sid[3]); + "%08x%08x", sid[idx0], sid[idx1]); setenv("serial#", serial_string); } Is it really a good idea trying to guess which parts of the SID are sufficiently unique, depending on the SoC generation? Probably not, but that is what we've been doing so far. We can calculate some kind of hash (CRC32? SHA256?) over the whole SID. This will ensure that all the SID bits are accounted for. That seems like a good idea. I'm thinking about doing the following (for H3 at least, and probably also for other new SoCs): sid[3] ^= sid[1] ^ sid[2]; No need to use a crpytho graphically secure hash, and AFAIK we don't have enough data for that anyways (without using some seed). Before using sid[3] to get the low 4 bytes of the mac / serial. I believe that using sid[0] as the first 4 bytes of the serial is still a good idea, as it gives us info on which SoC is being used. Also changing the MAC address generation algorithm is an invasive change, which is affecting the end users. So IMHO it's best to have it implemented properly right from the start, rather than evolving via a trial and error method. What if it turns out that word1 from the SID is actually not sufficiently random on H3? How large was your sample set? I've added the SID values from whatever H3 boards I have to: http://linux-sunxi.org/SID_Register_Guide#Currently_known_SID.27s I had done the same for my boards yesterday, but apparently never saved the preview :| I've just done this a second time. And it seems word1 is more like a batch number. Note the last 3 boards, which have identical word1's. These were given to me by Steven at the same time. word2 seems to follow the pattern 5xxe. In short there are quite a few bits that are the same. Ack, so nack to my own patch as using word1 is worse then using word3, I suggest we simply ex-or word1-3 together and use that, any comments on that ? Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] net: sun8i_emac: Fix DMA alignment issues with the rx / tx buffers
Hi, On 27-07-16 19:11, Amit Tomer wrote: Hello, index 7c088c3..877859c 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -32,7 +32,8 @@ #define CONFIG_TX_DESCR_NUM32 #define CONFIG_RX_DESCR_NUM32 -#define CONFIG_ETH_BUFSIZE 2024 +#define CONFIG_ETH_BUFSIZE 2048 +#define CONFIG_ETH_RXSIZE 2024 /* Note most fit in ETH_BUFSIZE */ As per the following comment made in Linux driver. /* The datasheet said that each descriptor can transfers up to 4096bytes + * But latter, a register documentation reduce that value to 2048 + * Anyway using 2048 cause strange behaviours and even BSP driver use 2047 + */ Can we keep CONFIG_ETH_BUFSIZE to 2044 ? Note that my patch is introducing a CONFIG_ETH_RXSIZE and is using that where ever CONFIG_ETH_BUFSIZE is not used to actually allocate or cache-flush a buffer. And no we cannot use 2044 as then the 2nd buffer in the array still is not cache-aligned. But using 2048 is fine, as long as we only use it to allocate buffers, and not actually as the value passed to the hardware (which is what the new CONFIG_ETH_RXSIZE is for). I started with just using 2048 and that does indeed not work, but with the addition of CONFIG_ETH_RXSIZE things work fine. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: Add defconfig and dts file for the Orange Pi PC Plus SBC
Hi, On 28-07-16 19:58, Jagan Teki wrote: On 27 July 2016 at 03:58, Hans de Goede wrote: There is a new Orange Pi PC *Plus* version available now, this is an extended version of the regular Orange Pi PC with sdio wifi and an eMMC. The upstream kernel devs have decided that they want a separate dts for the PC Plus rather then sharing a single dts between the regular PC and the PC Plus. So add a new orangepi_pc_plus_defconfig to match. The added dts file matches the one submitted to the upstream kernel. Signed-off-by: Hans de Goede --- arch/arm/dts/Makefile | 1 + arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts | 87 ++ board/sunxi/MAINTAINERS| 1 + configs/orangepi_pc_defconfig | 1 - ...epi_pc_defconfig => orangepi_pc_plus_defconfig} | 3 +- 5 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts copy configs/{orangepi_pc_defconfig => orangepi_pc_plus_defconfig} (84%) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index ca8712a..1c3b705 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -246,6 +246,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ sun8i-h3-orangepi-lite.dtb \ sun8i-h3-orangepi-one.dtb \ sun8i-h3-orangepi-pc.dtb \ + sun8i-h3-orangepi-pc-plus.dtb \ sun8i-h3-orangepi-plus.dtb dtb-$(CONFIG_MACH_SUN50I) += \ sun50i-a64-pine64-plus.dtb \ diff --git a/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts new file mode 100644 index 000..9a8cdd4 --- /dev/null +++ b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2016 Hans de Goede + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ Just to understand - why should all these sun*.dts files are not to follow u-boot licence (just because Linux has same)? SPDX-License-Identifier: GPL-2.0+ The canonical source for these files is the Linux kernel, we just copy them over to u-boot as u-boot needs them to build (and occasionally sync all of them with the kernel. Since these come from the Linux kernel sources, they get the license they have there. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: Add defconfig and dts file for the Orange Pi PC Plus SBC
On 29 July 2016 at 00:09, Hans de Goede wrote: > Hi, > > > On 28-07-16 19:58, Jagan Teki wrote: >> >> On 27 July 2016 at 03:58, Hans de Goede wrote: >>> >>> There is a new Orange Pi PC *Plus* version available now, >>> this is an extended version of the regular Orange Pi PC >>> with sdio wifi and an eMMC. >>> >>> The upstream kernel devs have decided that they want a separate >>> dts for the PC Plus rather then sharing a single dts between the >>> regular PC and the PC Plus. So add a new orangepi_pc_plus_defconfig >>> to match. >>> >>> The added dts file matches the one submitted to the upstream kernel. >>> >>> Signed-off-by: Hans de Goede >>> --- >>> arch/arm/dts/Makefile | 1 + >>> arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts | 87 >>> ++ >>> board/sunxi/MAINTAINERS| 1 + >>> configs/orangepi_pc_defconfig | 1 - >>> ...epi_pc_defconfig => orangepi_pc_plus_defconfig} | 3 +- >>> 5 files changed, 90 insertions(+), 3 deletions(-) >>> create mode 100644 arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts >>> copy configs/{orangepi_pc_defconfig => orangepi_pc_plus_defconfig} (84%) >>> >>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile >>> index ca8712a..1c3b705 100644 >>> --- a/arch/arm/dts/Makefile >>> +++ b/arch/arm/dts/Makefile >>> @@ -246,6 +246,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ >>> sun8i-h3-orangepi-lite.dtb \ >>> sun8i-h3-orangepi-one.dtb \ >>> sun8i-h3-orangepi-pc.dtb \ >>> + sun8i-h3-orangepi-pc-plus.dtb \ >>> sun8i-h3-orangepi-plus.dtb >>> dtb-$(CONFIG_MACH_SUN50I) += \ >>> sun50i-a64-pine64-plus.dtb \ >>> diff --git a/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts >>> b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts >>> new file mode 100644 >>> index 000..9a8cdd4 >>> --- /dev/null >>> +++ b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts >>> @@ -0,0 +1,87 @@ >>> +/* >>> + * Copyright (C) 2016 Hans de Goede >>> + * >>> + * This file is dual-licensed: you can use it either under the terms >>> + * of the GPL or the X11 license, at your option. Note that this dual >>> + * licensing only applies to this file, and not this project as a >>> + * whole. >>> + * >>> + * a) This file is free software; you can redistribute it and/or >>> + * modify it under the terms of the GNU General Public License as >>> + * published by the Free Software Foundation; either version 2 of >>> the >>> + * License, or (at your option) any later version. >>> + * >>> + * This file is distributed in the hope that it will be useful, >>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>> + * GNU General Public License for more details. >>> + * >>> + * Or, alternatively, >>> + * >>> + * b) Permission is hereby granted, free of charge, to any person >>> + * obtaining a copy of this software and associated documentation >>> + * files (the "Software"), to deal in the Software without >>> + * restriction, including without limitation the rights to use, >>> + * copy, modify, merge, publish, distribute, sublicense, and/or >>> + * sell copies of the Software, and to permit persons to whom the >>> + * Software is furnished to do so, subject to the following >>> + * conditions: >>> + * >>> + * The above copyright notice and this permission notice shall be >>> + * included in all copies or substantial portions of the Software. >>> + * >>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >>> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES >>> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >>> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT >>> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, >>> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING >>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR >>> + * OTHER DEALINGS IN THE SOFTWARE. >>> + */ >> >> >> Just to understand - why should all these sun*.dts files are not to >> follow u-boot licence (just because Linux has same)? >> SPDX-License-Identifier: GPL-2.0+ > > > The canonical source for these files is the Linux kernel, we just copy > them over to u-boot as u-boot needs them to build (and occasionally > sync all of them with the kernel. > > Since these come from the Linux kernel sources, they get the license > they have there. OK, thanks Hans. -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: Add defconfig and dts file for the Orange Pi PC Plus SBC
On 27 July 2016 at 13:58, Ian Campbell wrote: > On Wed, 2016-07-27 at 00:28 +0200, Hans de Goede wrote: >> There is a new Orange Pi PC *Plus* version available now, >> this is an extended version of the regular Orange Pi PC >> with sdio wifi and an eMMC. >> >> The upstream kernel devs have decided that they want a separate >> dts for the PC Plus rather then sharing a single dts between the >> regular PC and the PC Plus. So add a new orangepi_pc_plus_defconfig >> to match. >> >> The added dts file matches the one submitted to the upstream kernel. >> >> Signed-off-by: Hans de Goede > > Acked-by: Ian Campbell Acked-by: Jagan Teki -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/5] usb: fsl: Add code to use CONFIG_DM_USB
On 07/28/2016 04:34 AM, Marek Vasut wrote: > On 07/27/2016 08:00 PM, york sun wrote: >> On 07/21/2016 04:45 AM, Marek Vasut wrote: >>> On 07/21/2016 10:02 AM, Rajesh Bhagat wrote: Hi All, Any Comments? >>> >>> York, please check this. >> >> Passed compiling tests on powerpc and arm platforms. > > And the patches are OK ? > They look OK to me. But I have to admit I am not an expert on USB. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: ventana: enable splashscreen support
On Thu, Jul 28, 2016 at 3:37 AM, Stefano Babic wrote: > > Hi Tim, > > On 15/07/2016 16:17, Tim Harvey wrote: > > Signed-off-by: Tim Harvey > > --- > > include/configs/gw_ventana.h | 7 --- > > tools/logos/gateworks.bmp| Bin 0 -> 56202 bytes > > 2 files changed, 4 insertions(+), 3 deletions(-) > > create mode 100644 tools/logos/gateworks.bmp > > > > diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h > > index 1bd13fe..61242a1 100644 > > --- a/include/configs/gw_ventana.h > > +++ b/include/configs/gw_ventana.h > > @@ -191,15 +191,15 @@ > > #define CONFIG_CFB_CONSOLE > > #define CONFIG_VGA_AS_SINGLE_DEVICE > > #define CONFIG_SYS_CONSOLE_IS_IN_ENV > > -#define CONFIG_VIDEO_BMP_RLE8 > > -#define CONFIG_SPLASH_SCREEN > > -#define CONFIG_BMP_16BPP > > #define CONFIG_VIDEO_LOGO > > #define CONFIG_IPUV3_CLK 26000 > > #define CONFIG_CMD_HDMIDETECT > > #define CONFIG_CONSOLE_MUX > > #define CONFIG_IMX_HDMI > > #define CONFIG_IMX_VIDEO_SKIP > > +#define CONFIG_VIDEO_BMP_LOGO > > +#define CONFIG_SPLASH_SCREEN_ALIGN > > +#define CONFIG_HIDE_LOGO_VERSION /* Custom config to hide U-boot version > > */ > > > > /* Miscellaneous configurable options */ > > #define CONFIG_HWCONFIG > > @@ -274,6 +274,7 @@ > > > > #define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ > > "pcidisable=1\0" \ > > + "splashpos=m,m\0" \ > > "usb_pgood_delay=2000\0" \ > > "console=ttymxc1\0" \ > > "bootdevs=usb mmc sata flash\0" \ > > diff --git a/tools/logos/gateworks.bmp b/tools/logos/gateworks.bmp > > new file mode 100644 > > index > > ..01edb7cedf46c3441619213b6baf33410055601f > > This is done on several boards, but I would ask if this is strictly > required. You can already display a bmp on the screen, and it is a more > flexible way as linked the image with U-Boot. Do you really need > CONFIG_VIDEO_BMP_LOGO ? > > Best regards, > Stefano Babic > Stefano, I think your talking about: #define CONFIG_CMD_BMP - Adds support for displaying raw bmp images. #define CONFIG_SPLASH_SCREEN_ALIGN - If this option is set the splash image (or bmp logo) can be freely positioned on the screen. Environment variable "splashpos" specifies the position as "x,y". If a positive number is given it is used as number of pixel from left/top. If a negative number is given it is used as number of pixel from right/bottom. You can also specify 'm' as x and/or y to center the image. While this method of a splash-screen is indeed very flexible it has the downside of bringing up the splash a little later. The other downside is that you have to either load it from the filesystem (which creates an even longer delay) or stick it in a raw partition which means changing an already established partitioning scheme. Is it generally frowned upon to add hard-coded logo's as I've done and/or is there a move to replace hard-coded logos with loadable ones? It appears there are 16 of them in tools/logos although most appear to be imx6 or other fsl based boards. Regards, Tim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
On Thu, Jul 28, 2016 at 07:03:17PM +0800, Chen-Yu Tsai wrote: > Hi, > > On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: > > For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). > > > > This patch fixes the U-Boot was stuck in invalidate_dcache_all() before > > booting linux kernel, which occurred on rk3288-base development board > > such as evb-rk3288, rock2-rk3288. And something output via console like: > > > > => bootz 0x200 > > 0x0200 > >ramdisk start = 0x, ramdisk end = 0x > >Continuing to boot without FDT > >Initial value for argc=3 > >Final value for argc=3 > >using: ATAGS > > > >Starting kernel ... > > > > Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). > > > > Signed-off-by: Ziyuan Xu > > --- > > > > arch/arm/include/asm/system.h | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > > index 2bdc0be..12d4ba0 100644 > > --- a/arch/arm/include/asm/system.h > > +++ b/arch/arm/include/asm/system.h > > @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); > > */ > > void save_boot_params_ret(void); > > > > -#define isb() __asm__ __volatile__ ("" : : : "memory") > > - > > #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); > > > > #ifdef __ARM_ARCH_7A__ > > +#define isb() __asm__ __volatile__ ("isb" : : : "memory") > > + > > #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") > > #else > > +#define isb() __asm__ __volatile__ ("" : : : "memory") > > + > > #define wfi() > > #endif > > > > arch/arm/include/asm/barriers.h already has a proper set of > ISB/DSB macros. Please consider using those instead. Please fix arch/arm/include/asm/system.h to use the macros found in barriers.h rather than have their own versions. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
On Thu, Jul 28, 2016 at 06:13:26PM +0800, Ziyuan Xu wrote: ` > For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). > > This patch fixes the U-Boot was stuck in invalidate_dcache_all() before > booting linux kernel, which occurred on rk3288-base development board > such as evb-rk3288, rock2-rk3288. And something output via console like: > > => bootz 0x200 > 0x0200 >ramdisk start = 0x, ramdisk end = 0x >Continuing to boot without FDT >Initial value for argc=3 >Final value for argc=3 >using: ATAGS > >Starting kernel ... > > Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Good catch! -- 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] arm: re-implement proper ISB instruction for ARMv7-A
Hi Tom, On 2016年07月29日 06:15, Tom Rini wrote: On Thu, Jul 28, 2016 at 07:03:17PM +0800, Chen-Yu Tsai wrote: Hi, On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). This patch fixes the U-Boot was stuck in invalidate_dcache_all() before booting linux kernel, which occurred on rk3288-base development board such as evb-rk3288, rock2-rk3288. And something output via console like: => bootz 0x200 0x0200 ramdisk start = 0x, ramdisk end = 0x Continuing to boot without FDT Initial value for argc=3 Final value for argc=3 using: ATAGS Starting kernel ... Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Signed-off-by: Ziyuan Xu --- arch/arm/include/asm/system.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 2bdc0be..12d4ba0 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); */ void save_boot_params_ret(void); -#define isb() __asm__ __volatile__ ("" : : : "memory") - #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); #ifdef __ARM_ARCH_7A__ +#define isb() __asm__ __volatile__ ("isb" : : : "memory") + #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") #else +#define isb() __asm__ __volatile__ ("" : : : "memory") + #define wfi() #endif arch/arm/include/asm/barriers.h already has a proper set of ISB/DSB macros. Please consider using those instead. Please fix arch/arm/include/asm/system.h to use the macros found in barriers.h rather than have their own versions. Thanks! If I understand correctly, I can change into as bellow: #define isb() ISB How about it? ___ 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] mx7dsabresd: Print secure/non-secure mode info
From: Fabio Estevam mx7dsabresd has two targets: - mx7dsabresd_defconfig: boots in non-secure mode - mx7dsabresd_secure_defconfig: boots in secure mode Print the mode that is being used to help users to easily identify which target is running on the board. Signed-off-by: Fabio Estevam --- board/freescale/mx7dsabresd/mx7dsabresd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 1f4fc03..3098e1a 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -609,7 +609,14 @@ int board_late_init(void) int checkboard(void) { - puts("Board: i.MX7D SABRESD\n"); + char *mode; + + if (IS_ENABLED(CONFIG_ARMV7_BOOT_SEC_DEFAULT)) + mode = "secure"; + else + mode = "non-secure"; + + printf("Board: i.MX7D SABRESD in %s mode\n", mode); return 0; } -- 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: re-implement proper ISB instruction for ARMv7-A
On Fri, Jul 29, 2016 at 07:34:09AM +0800, Ziyuan Xu wrote: > Hi Tom, > > On 2016年07月29日 06:15, Tom Rini wrote: > >On Thu, Jul 28, 2016 at 07:03:17PM +0800, Chen-Yu Tsai wrote: > >>Hi, > >> > >>On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: > >>>For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). > >>> > >>>This patch fixes the U-Boot was stuck in invalidate_dcache_all() before > >>>booting linux kernel, which occurred on rk3288-base development board > >>>such as evb-rk3288, rock2-rk3288. And something output via console like: > >>> > >>>=> bootz 0x200 > >>>0x0200 > >>>ramdisk start = 0x, ramdisk end = 0x > >>>Continuing to boot without FDT > >>>Initial value for argc=3 > >>>Final value for argc=3 > >>>using: ATAGS > >>> > >>>Starting kernel ... > >>> > >>>Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). > >>> > >>>Signed-off-by: Ziyuan Xu > >>>--- > >>> > >>> arch/arm/include/asm/system.h | 6 -- > >>> 1 file changed, 4 insertions(+), 2 deletions(-) > >>> > >>>diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > >>>index 2bdc0be..12d4ba0 100644 > >>>--- a/arch/arm/include/asm/system.h > >>>+++ b/arch/arm/include/asm/system.h > >>>@@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); > >>> */ > >>> void save_boot_params_ret(void); > >>> > >>>-#define isb() __asm__ __volatile__ ("" : : : "memory") > >>>- > >>> #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); > >>> > >>> #ifdef __ARM_ARCH_7A__ > >>>+#define isb() __asm__ __volatile__ ("isb" : : : "memory") > >>>+ > >>> #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") > >>> #else > >>>+#define isb() __asm__ __volatile__ ("" : : : "memory") > >>>+ > >>> #define wfi() > >>> #endif > >>> > >>arch/arm/include/asm/barriers.h already has a proper set of > >>ISB/DSB macros. Please consider using those instead. > >Please fix arch/arm/include/asm/system.h to use the macros found in > >barriers.h rather than have their own versions. Thanks! > > If I understand correctly, I can change into as bellow: > #define isb() ISB > How about it? Well, I'd rather not have ISB and isb, just ISB, which means we might have to fix other places too. If that starts looking too huge, we can do this in steps and just do what you suggested for now and for next release move everything over. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7] dm: at91: Add driver model support for the spi driver
Add driver model support while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- Changes in v7: - Move gpio_request_list_by_name() to _probe(), remove *_ofdata_to_platdata(). Changes in v6: - Remove the two flash related options. Changes in v5: - Change clk_client.h -> clk.h to adapt to clk API conversion. Changes in v4: - Collect Reviewed-by tag. - Update the clk API based on [PATCH] clk: convert API to match reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/). - Remove check on dev_get_parent() return. - Fixed the return value, -ENODEV->-EINVAL. - Retain #include line. Changes in v3: - Remove redundant log print. Changes in v2: - Add clock support. drivers/spi/Kconfig | 7 ++ drivers/spi/atmel_spi.c | 295 2 files changed, 302 insertions(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index aca385d..16ed231 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -32,6 +32,13 @@ config ATH79_SPI uses driver model and requires a device tree binding to operate. please refer to doc/device-tree-bindings/spi/spi-ath79.txt. +config ATMEL_SPI + bool "Atmel SPI driver" + depends on ARCH_AT91 + help + Enable the Atmel SPI driver. This driver can be used to access + the SPI Flash, such as AT25DF321. + config CADENCE_QSPI bool "Cadence QSPI driver" help diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index ed6278b..db40631 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -4,6 +4,9 @@ * SPDX-License-Identifier:GPL-2.0+ */ #include +#include +#include +#include #include #include @@ -11,9 +14,15 @@ #include #include +#include +#include #include "atmel_spi.h" +DECLARE_GLOBAL_DATA_PTR; + +#ifndef CONFIG_DM_SPI + static int spi_has_wdrbt(struct atmel_spi_slave *slave) { unsigned int ver; @@ -209,3 +218,289 @@ out: return 0; } + +#else + +#define MAX_CS_COUNT 4 + +struct atmel_spi_platdata { + struct at91_spi *regs; +}; + +struct atmel_spi_priv { + unsigned int freq; /* Default frequency */ + unsigned int mode; + ulong bus_clk_rate; + struct gpio_desc cs_gpios[MAX_CS_COUNT]; +}; + +static int atmel_spi_claim_bus(struct udevice *dev) +{ + struct udevice *bus = dev_get_parent(dev); + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); + struct atmel_spi_priv *priv = dev_get_priv(bus); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct at91_spi *reg_base = bus_plat->regs; + u32 cs = slave_plat->cs; + u32 freq = priv->freq; + u32 scbr, csrx, mode; + + scbr = (priv->bus_clk_rate + freq - 1) / freq; + if (scbr > ATMEL_SPI_CSRx_SCBR_MAX) + return -EINVAL; + + if (scbr < 1) + scbr = 1; + + csrx = ATMEL_SPI_CSRx_SCBR(scbr); + csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8); + + if (!(priv->mode & SPI_CPHA)) + csrx |= ATMEL_SPI_CSRx_NCPHA; + if (priv->mode & SPI_CPOL) + csrx |= ATMEL_SPI_CSRx_CPOL; + + writel(csrx, ®_base->csr[cs]); + + mode = ATMEL_SPI_MR_MSTR | + ATMEL_SPI_MR_MODFDIS | + ATMEL_SPI_MR_WDRBT | + ATMEL_SPI_MR_PCS(~(1 << cs)); + + writel(mode, ®_base->mr); + + writel(ATMEL_SPI_CR_SPIEN, ®_base->cr); + + return 0; +} + +static int atmel_spi_release_bus(struct udevice *dev) +{ + struct udevice *bus = dev_get_parent(dev); + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); + + writel(ATMEL_SPI_CR_SPIDIS, &bus_plat->regs->cr); + + return 0; +} + +static void atmel_spi_cs_activate(struct udevice *dev) +{ + struct udevice *bus = dev_get_parent(dev); + struct atmel_spi_priv *priv = dev_get_priv(bus); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + u32 cs = slave_plat->cs; + + dm_gpio_set_value(&priv->cs_gpios[cs], 0); +} + +static void atmel_spi_cs_deactivate(struct udevice *dev) +{ + struct udevice *bus = dev_get_parent(dev); + struct atmel_spi_priv *priv = dev_get_priv(bus); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + u32 cs = slave_plat->cs; + + dm_gpio_set_value(&priv->cs_gpios[cs], 1); +} + +static int atmel_spi_xfer(struct udevice *dev, unsigned int bitlen, + const void *dout, void *din, unsigned long flags) +{ + struct udevice *bus = dev_get_parent(dev); + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); + struct at91_spi *reg_base = bus_plat->regs; + + u32 len_tx, len_rx, len; + u32 sta
[U-Boot] [PATCH v9] mmc: atmel_sdhci: Convert to the driver model support
Convert the driver to the driver model while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass Reviewed-by: Jaehoon Chung --- Changes in v9: - Add Reviewed-by tag. Changes in v8: - Make atmel_sdhci_get_clk() to get clock device. - Use ulong type for gck_rate. - Remove meaningless type casting before dev->name. Changes in v7: - Add support for using driver model for block devices and MMC operations. - Change clk_client.h -> clk.h to adapt to clk API conversion. Changes in v6: - Remove unnecessary white space. - Use sdhci_read(), instead of readl(). - Remove the local variables min_clk. Changes in v5: - Add Reviewed-by tag. Changes in v4: - Update the clk API based on [PATCH] clk: convert API to match reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/). - Remove check on dev_get_parent() return. - Fixed the return value, such as -ENODEV->-EINVAL. Changes in v3: - Remove the redundant log print. Changes in v2: - Add clock support, include enabling peripheral clock and generated clock. - Retain the existing legacy code to support boards which have not converted to driver model. drivers/mmc/Kconfig | 10 drivers/mmc/atmel_sdhci.c | 127 ++ include/sdhci.h | 2 + 3 files changed, 139 insertions(+) diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 79cf18f..49b325e 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -34,6 +34,16 @@ config MSM_SDHCI SD 3.0 specifications. Both SD and eMMC devices are supported. Card-detect gpios are not supported. +config ATMEL_SDHCI + bool "Atmel SDHCI controller support" + depends on DM_MMC && BLK && DM_MMC_OPS && ARCH_AT91 + help + This enables support for the Atmel SDHCI controller, which supports + the embedded MultiMedia Card (e.MMC) Specification V4.51, the SD + Memory Card Specification V3.0, and the SDIO V3.0 specification. + It is compliant with the SD Host Controller Standard V3.0 + specification. + config ROCKCHIP_DWMMC bool "Rockchip SD/MMC controller support" depends on DM_MMC && OF_CONTROL diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c index 24b68b6..8a4f347 100644 --- a/drivers/mmc/atmel_sdhci.c +++ b/drivers/mmc/atmel_sdhci.c @@ -6,12 +6,15 @@ */ #include +#include +#include #include #include #include #define ATMEL_SDHC_MIN_FREQ40 +#ifndef CONFIG_DM_MMC int atmel_sdhci_init(void *regbase, u32 id) { struct sdhci_host *host; @@ -38,3 +41,127 @@ int atmel_sdhci_init(void *regbase, u32 id) return 0; } + +#else + +DECLARE_GLOBAL_DATA_PTR; + +struct atmel_sdhci_plat { + struct mmc_config cfg; + struct mmc mmc; +}; + +static int atmel_sdhci_get_clk(struct udevice *dev, int index, struct clk *clk) +{ + struct udevice *dev_clk; + int periph, ret; + + ret = clk_get_by_index(dev, index, clk); + if (ret) + return ret; + + periph = fdtdec_get_uint(gd->fdt_blob, clk->dev->of_offset, "reg", -1); + if (periph < 0) + return -EINVAL; + + dev_clk = dev_get_parent(clk->dev); + ret = clk_request(dev_clk, clk); + if (ret) + return ret; + + clk->id = periph; + + return 0; +} + +static int atmel_sdhci_probe(struct udevice *dev) +{ + struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); + struct atmel_sdhci_plat *plat = dev_get_platdata(dev); + struct sdhci_host *host = dev_get_priv(dev); + u32 max_clk; + u32 caps, caps_1; + u32 clk_base, clk_mul; + ulong gck_rate; + struct clk clk; + int ret; + + ret = atmel_sdhci_get_clk(dev, 0, &clk); + if (ret) + return ret; + + ret = clk_enable(&clk); + if (ret) + return ret; + + host->name = dev->name; + host->ioaddr = (void *)dev_get_addr(dev); + + host->quirks = 0; + host->version = sdhci_readw(host, SDHCI_HOST_VERSION); + + host->bus_width = fdtdec_get_int(gd->fdt_blob, dev->of_offset, +"bus-width", 4); + + caps = sdhci_readl(host, SDHCI_CAPABILITIES); + clk_base = (caps & SDHCI_CLOCK_V3_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; + caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1); + clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >> SDHCI_CLOCK_MUL_SHIFT; + gck_rate = clk_base * 100 * (clk_mul + 1); + + ret = atmel_sdhci_get_clk(dev, 1, &clk); + if (ret) + return ret; + + ret = clk_set_rate(&clk, gck_rate); + if (ret) + return ret; + + max_clk = clk_get_rate(&clk); + if (!max_clk) + return -EINVAL; + +
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
Hi Tom, On 2016年07月29日 08:34, Tom Rini wrote: On Fri, Jul 29, 2016 at 07:34:09AM +0800, Ziyuan Xu wrote: Hi Tom, On 2016年07月29日 06:15, Tom Rini wrote: On Thu, Jul 28, 2016 at 07:03:17PM +0800, Chen-Yu Tsai wrote: Hi, On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). This patch fixes the U-Boot was stuck in invalidate_dcache_all() before booting linux kernel, which occurred on rk3288-base development board such as evb-rk3288, rock2-rk3288. And something output via console like: => bootz 0x200 0x0200 ramdisk start = 0x, ramdisk end = 0x Continuing to boot without FDT Initial value for argc=3 Final value for argc=3 using: ATAGS Starting kernel ... Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Signed-off-by: Ziyuan Xu --- arch/arm/include/asm/system.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 2bdc0be..12d4ba0 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); */ void save_boot_params_ret(void); -#define isb() __asm__ __volatile__ ("" : : : "memory") - #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); #ifdef __ARM_ARCH_7A__ +#define isb() __asm__ __volatile__ ("isb" : : : "memory") + #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") #else +#define isb() __asm__ __volatile__ ("" : : : "memory") + #define wfi() #endif arch/arm/include/asm/barriers.h already has a proper set of ISB/DSB macros. Please consider using those instead. Please fix arch/arm/include/asm/system.h to use the macros found in barriers.h rather than have their own versions. Thanks! If I understand correctly, I can change into as bellow: #define isb() ISB How about it? Well, I'd rather not have ISB and isb, just ISB, which means we might have to fix other places too. If that starts looking too huge, we can do this in steps and just do what you suggested for now and for next release move everything over. As I mentioned before, arch/arm/include/asm/barriers.h defined ISB macro. If I only want to fix the issue which I hit on rk3288 board, I just use ISB in arch/arm/include/asm/system.h::set_cr() instead of isb(). But isb() had been invoked in some places. I can't verify integrallty after all revision, it involve some boards and feature. But this does fix for rk3288, if you agree with me, could you apply it provisionally?:-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/22] clock-uclass: allow disabling a peripheral clock
Hello Vikas, hello Simon, the new clk-API leaves me with a problem. Previously there was a seperate way to access the clock-device itself (using clk_[gs]et_rate) and the peripherals connected (clk_[gs]et_periph_rate). The former case now isn't available no more. But the system clock in STM32 doesn't have a separate ID. According to the device-tree the kernel doesn't care about that - or uses special logic. Possible solutions: a) Using a magic ID. Unfortunately, the peripheral used in the current device-tree are 0-based (and 0 is already in use), so this number isn't available. Moving the IDs around would break compatibility to the linux kernel. Negative numbers look like errors. Using a special high number looks unintuitive. And often result in additional work-arounds in the future. b) moving the sysclock and PLL-stuff in a seperate driver. That driver should be found in the device-tree, too. The device-tree should represent the hardware. Because of that, the source-clock of the STM32 RCC device (the clocking subsystem), should be either the external quartz or one of the internal sources, not a pll-device. Apart from that, the kernel in its current configuration probably is using this information to compute is current clock-speed. c) extending the struct clk, which looks clumsy, too. Any ideas? regards Benjamin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6] dm: at91: Add driver model support for the spi driver
Hi Jagan, > -Original Message- > From: Jagan Teki [mailto:jagannadh.t...@gmail.com] > Sent: 2016年7月26日 14:21 > To: Wenyou Yang > Cc: U-Boot Mailing List > Subject: Re: [U-Boot] [PATCH v6] dm: at91: Add driver model support for the > spi > driver > > On 25 July 2016 at 15:27, Wenyou Yang wrote: > > Add driver model support while retaining the existing legacy code. > > This allows the driver to support boards that have converted to driver > > model as well as those that have not. > > > > Signed-off-by: Wenyou Yang > > Reviewed-by: Simon Glass > > --- > > > > Changes in v6: > > - Remove the two flash related options. > > > > Changes in v5: > > - Change clk_client.h -> clk.h to adapt to clk API conversion. > > > > Changes in v4: > > - Collect Reviewed-by tag. > > - Update the clk API based on [PATCH] clk: convert API to match > >reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/). > > - Remove check on dev_get_parent() return. > > - Fixed the return value, -ENODEV->-EINVAL. > > - Retain #include line. > > > > Changes in v3: > > - Remove redundant log print. > > > > Changes in v2: > > - Add clock support. > > > > drivers/spi/Kconfig | 7 ++ > > drivers/spi/atmel_spi.c | 303 > > > > 2 files changed, 310 insertions(+) > > > > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index > > aca385d..16ed231 100644 > > --- a/drivers/spi/Kconfig > > +++ b/drivers/spi/Kconfig > > @@ -32,6 +32,13 @@ config ATH79_SPI > > uses driver model and requires a device tree binding to operate. > > please refer to doc/device-tree-bindings/spi/spi-ath79.txt. > > > > +config ATMEL_SPI > > + bool "Atmel SPI driver" > > + depends on ARCH_AT91 > > + help > > + Enable the Atmel SPI driver. This driver can be used to access > > + the SPI Flash, such as AT25DF321. > > + > > config CADENCE_QSPI > > bool "Cadence QSPI driver" > > help > > diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index > > ed6278b..98bee35 100644 > > --- a/drivers/spi/atmel_spi.c > > +++ b/drivers/spi/atmel_spi.c > > @@ -4,6 +4,9 @@ > > * SPDX-License-Identifier:GPL-2.0+ > > */ > > #include > > +#include > > +#include > > +#include > > #include > > #include > > > > @@ -11,9 +14,15 @@ > > > > #include > > #include > > +#include > > +#include > > > > #include "atmel_spi.h" > > > > +DECLARE_GLOBAL_DATA_PTR; > > + > > +#ifndef CONFIG_DM_SPI > > + > > static int spi_has_wdrbt(struct atmel_spi_slave *slave) { > > unsigned int ver; > > @@ -209,3 +218,297 @@ out: > > > > return 0; > > } > > + > > +#else > > + > > +#define MAX_CS_COUNT 4 > > + > > +struct atmel_spi_platdata { > > + struct at91_spi *regs; > > +}; > > + > > +struct atmel_spi_priv { > > + unsigned int freq; /* Default frequency */ > > + unsigned int mode; > > + ulong bus_clk_rate; > > + struct gpio_desc cs_gpios[MAX_CS_COUNT]; }; > > + > > +static int atmel_spi_claim_bus(struct udevice *dev) { > > + struct udevice *bus = dev_get_parent(dev); > > + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); > > + struct atmel_spi_priv *priv = dev_get_priv(bus); > > + struct dm_spi_slave_platdata *slave_plat = > > dev_get_parent_platdata(dev); > > + struct at91_spi *reg_base = bus_plat->regs; > > + u32 cs = slave_plat->cs; > > + u32 freq = priv->freq; > > + u32 scbr, csrx, mode; > > + > > + scbr = (priv->bus_clk_rate + freq - 1) / freq; > > + if (scbr > ATMEL_SPI_CSRx_SCBR_MAX) > > + return -EINVAL; > > + > > + if (scbr < 1) > > + scbr = 1; > > + > > + csrx = ATMEL_SPI_CSRx_SCBR(scbr); > > + csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8); > > + > > + if (!(priv->mode & SPI_CPHA)) > > + csrx |= ATMEL_SPI_CSRx_NCPHA; > > + if (priv->mode & SPI_CPOL) > > + csrx |= ATMEL_SPI_CSRx_CPOL; > > + > > + writel(csrx, ®_base->csr[cs]); > > + > > + mode = ATMEL_SPI_MR_MSTR | > > + ATMEL_SPI_MR_MODFDIS | > > + ATMEL_SPI_MR_WDRBT | > > + ATMEL_SPI_MR_PCS(~(1 << cs)); > > + > > + writel(mode, ®_base->mr); > > + > > + writel(ATMEL_SPI_CR_SPIEN, ®_base->cr); > > + > > + return 0; > > +} > > + > > +static int atmel_spi_release_bus(struct udevice *dev) { > > + struct udevice *bus = dev_get_parent(dev); > > + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); > > + > > + writel(ATMEL_SPI_CR_SPIDIS, &bus_plat->regs->cr); > > + > > + return 0; > > +} > > + > > +static void atmel_spi_cs_activate(struct udevice *dev) { > > + struct udevice *bus = dev_get_parent(dev); > > + struct atmel_spi_priv *priv = dev_get_priv(bus); > > + struct dm_spi_slave_platdata *slave_plat = > > dev_get_parent_platdata(dev); >
Re: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
On Fri, Jul 29, 2016 at 09:06:29AM +0800, Ziyuan Xu wrote: > Hi Tom, > > On 2016年07月29日 08:34, Tom Rini wrote: > >On Fri, Jul 29, 2016 at 07:34:09AM +0800, Ziyuan Xu wrote: > >>Hi Tom, > >> > >>On 2016年07月29日 06:15, Tom Rini wrote: > >>>On Thu, Jul 28, 2016 at 07:03:17PM +0800, Chen-Yu Tsai wrote: > Hi, > > On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: > >For ARMv7-A architecture, the valid ISB instruction is asm > >volatile("isb"). > > > >This patch fixes the U-Boot was stuck in invalidate_dcache_all() before > >booting linux kernel, which occurred on rk3288-base development board > >such as evb-rk3288, rock2-rk3288. And something output via console like: > > > >=> bootz 0x200 > >0x0200 > >ramdisk start = 0x, ramdisk end = 0x > >Continuing to boot without FDT > >Initial value for argc=3 > >Final value for argc=3 > >using: ATAGS > > > >Starting kernel ... > > > >Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). > > > >Signed-off-by: Ziyuan Xu > >--- > > > > arch/arm/include/asm/system.h | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > >diff --git a/arch/arm/include/asm/system.h > >b/arch/arm/include/asm/system.h > >index 2bdc0be..12d4ba0 100644 > >--- a/arch/arm/include/asm/system.h > >+++ b/arch/arm/include/asm/system.h > >@@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); > > */ > > void save_boot_params_ret(void); > > > >-#define isb() __asm__ __volatile__ ("" : : : "memory") > >- > > #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); > > > > #ifdef __ARM_ARCH_7A__ > >+#define isb() __asm__ __volatile__ ("isb" : : : "memory") > >+ > > #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") > > #else > >+#define isb() __asm__ __volatile__ ("" : : : "memory") > >+ > > #define wfi() > > #endif > > > arch/arm/include/asm/barriers.h already has a proper set of > ISB/DSB macros. Please consider using those instead. > >>>Please fix arch/arm/include/asm/system.h to use the macros found in > >>>barriers.h rather than have their own versions. Thanks! > >>If I understand correctly, I can change into as bellow: > >>#define isb() ISB > >>How about it? > >Well, I'd rather not have ISB and isb, just ISB, which means we might > >have to fix other places too. If that starts looking too huge, we can > >do this in steps and just do what you suggested for now and for next > >release move everything over. > As I mentioned before, arch/arm/include/asm/barriers.h defined ISB > macro. If I only want to fix the issue which I hit on rk3288 board, > I just use ISB in arch/arm/include/asm/system.h::set_cr() instead of > isb(). But isb() had been invoked in some places. > > I can't verify integrallty after all revision, it involve some > boards and feature. But this does fix for rk3288, if you agree with > me, could you apply it provisionally?:-) I would really like to try and fix the other possibly latent issues that we have by not calling a real ISB. Please try moving towards all places that need an isb calling the correct one from barriers.h and giving it a spin on the hardware you have available. -- 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] arm: re-implement proper ISB instruction for ARMv7-A
On 2016年07月29日 09:12, Tom Rini wrote: On Fri, Jul 29, 2016 at 09:06:29AM +0800, Ziyuan Xu wrote: Hi Tom, On 2016年07月29日 08:34, Tom Rini wrote: On Fri, Jul 29, 2016 at 07:34:09AM +0800, Ziyuan Xu wrote: Hi Tom, On 2016年07月29日 06:15, Tom Rini wrote: On Thu, Jul 28, 2016 at 07:03:17PM +0800, Chen-Yu Tsai wrote: Hi, On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu wrote: For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb"). This patch fixes the U-Boot was stuck in invalidate_dcache_all() before booting linux kernel, which occurred on rk3288-base development board such as evb-rk3288, rock2-rk3288. And something output via console like: => bootz 0x200 0x0200 ramdisk start = 0x, ramdisk end = 0x Continuing to boot without FDT Initial value for argc=3 Final value for argc=3 using: ATAGS Starting kernel ... Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h). Signed-off-by: Ziyuan Xu --- arch/arm/include/asm/system.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 2bdc0be..12d4ba0 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc); */ void save_boot_params_ret(void); -#define isb() __asm__ __volatile__ ("" : : : "memory") - #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); #ifdef __ARM_ARCH_7A__ +#define isb() __asm__ __volatile__ ("isb" : : : "memory") + #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") #else +#define isb() __asm__ __volatile__ ("" : : : "memory") + #define wfi() #endif arch/arm/include/asm/barriers.h already has a proper set of ISB/DSB macros. Please consider using those instead. Please fix arch/arm/include/asm/system.h to use the macros found in barriers.h rather than have their own versions. Thanks! If I understand correctly, I can change into as bellow: #define isb() ISB How about it? Well, I'd rather not have ISB and isb, just ISB, which means we might have to fix other places too. If that starts looking too huge, we can do this in steps and just do what you suggested for now and for next release move everything over. As I mentioned before, arch/arm/include/asm/barriers.h defined ISB macro. If I only want to fix the issue which I hit on rk3288 board, I just use ISB in arch/arm/include/asm/system.h::set_cr() instead of isb(). But isb() had been invoked in some places. I can't verify integrallty after all revision, it involve some boards and feature. But this does fix for rk3288, if you agree with me, could you apply it provisionally?:-) I would really like to try and fix the other possibly latent issues that we have by not calling a real ISB. Please try moving towards all places that need an isb calling the correct one from barriers.h and giving it a spin on the hardware you have available. Okay, I will confirm it on my boards.:-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/2] rk3399: add soc basic driver support
This patchset add basic driver like clock, grf, sysreset for rk3399, and enable clock init in emmc driver. This patchset has tested on rk3399 evb. Changes in v2: - include '_SHIFT_' in '_MASK' MACRO - fix comment style - use DIV_ROUND_UP instead of div_round_up - use uclass_get_device_by_driver in rockchip_get_cru - implement ofdata_to_platdata for priv->cru init - update base on comments from Jaehoon Chung Kever Yang (2): rk3399: add basic soc driver mmc: rockchip: add clock init arch/arm/include/asm/arch-rockchip/cru_rk3399.h | 93 +++ arch/arm/mach-rockchip/rk3399/Makefile | 2 + arch/arm/mach-rockchip/rk3399/reset_rk3399.c| 45 ++ arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 20 + drivers/clk/Makefile| 1 + drivers/clk/clk_rk3399.c| 819 drivers/mmc/rockchip_sdhci.c| 11 +- 7 files changed, 990 insertions(+), 1 deletion(-) create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3399.h create mode 100644 arch/arm/mach-rockchip/rk3399/reset_rk3399.c create mode 100644 arch/arm/mach-rockchip/rk3399/syscon_rk3399.c create mode 100644 drivers/clk/clk_rk3399.c -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot