Re: [U-Boot] [PATCH v4 1/2] RiOTboard: add new board
Hi Eric, On 30/03/2014 21:52, Eric Bénard wrote: >> We have already discussed in the past about this function. Each board >> (at least, imx6 board) want to have such of them, and code is >> duplicated. What about to factorize it ? I am not against to move it >> into imx-common, if we generally agree, but I would like to avoid to >> duplicate this function for each board. >> > OK, if I understand correctly you want me to factorize it ? ;-) > I'll see what I can do there. It will be great, thanks ! Best regards, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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] mmc: sh_mmcif: Fix warning by unused variable
Hi Nobuhiro, Thanks for catching this. On Mar 31, 2014, at 8:54 AM, Nobuhiro Iwamatsu wrote: > Signed-off-by: Nobuhiro Iwamatsu > Reported-by: Masahiro Yamada > --- > drivers/mmc/sh_mmcif.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c > index ad5b23c..ed83a14 100644 > --- a/drivers/mmc/sh_mmcif.c > +++ b/drivers/mmc/sh_mmcif.c > @@ -588,13 +588,12 @@ static struct mmc_config sh_mmcif_cfg = { > > int mmcif_mmc_init(void) > { > - int ret = 0; > struct mmc *mmc; > struct sh_mmcif_host *host = NULL; > > host = malloc(sizeof(struct sh_mmcif_host)); > if (!host) > - ret = -ENOMEM; > + return -ENOMEM; > memset(host, 0, sizeof(*host)); > > host->regs = (struct sh_mmcif_regs *)CONFIG_SH_MMCIF_ADDR; > -- > 1.9.1 > Acked-by: Pantelis Antoniou ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mmc: sh_mmcif: Fix compile error
Hi Nobuhiro, Thank you for catching this. On Mar 31, 2014, at 8:54 AM, Nobuhiro Iwamatsu wrote: > BY commit "mmc: Split mmc struct, rework mmc initialization (v2)", > sh_mmcif has compile error. This fixes compile error. > > Signed-off-by: Nobuhiro Iwamatsu > CC: Pantelis Antoniou > Reported-by: Masahiro Yamada > --- > drivers/mmc/sh_mmcif.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c > index 64b5b47..ad5b23c 100644 > --- a/drivers/mmc/sh_mmcif.c > +++ b/drivers/mmc/sh_mmcif.c > @@ -580,7 +580,7 @@ static struct mmc_config sh_mmcif_cfg = { > .ops= &sh_mmcif_ops, > .host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT | > MMC_MODE_8BIT | MMC_MODE_HC, > - .voltages = MMC_VDD_32_33 | MMC_VDD_33_34; > + .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, > .f_min = CLKDEV_MMC_INIT, > .f_max = CLKDEV_EMMC_DATA, > .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT, > -- > 1.9.1 > Thanks Acked-by: Pantelis Antoniou ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] kbuild/makefile: allow building host tools separately
Hi Alexey, > > > > Works as a charm for me as well. > Do you mind to submit your changes (because it was you who implemented > it properly and I don't want to "steal" your credits)? > > Or I do it still on your behalf putting you in as an author? > > -Alexey OK. I will post it with your Suggested-by credit. Thanks for your kindness! Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] board: esd: remove remainders of dead boards
On 31.03.2014 05:59, Masahiro Yamada wrote: Commit 99bcad18 deleted ADCIOP and DASA_SIM board support but missed to delete board/esd/adciop and board/esd/dasa_sim. It also missed to add entries to doc/README.scrapyard. Signed-off-by: Masahiro Yamada Cc: Stefan Roese Good catch! Acked-by: Stefan Roese Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] board: prodrive: delete unused source files
On 31.03.2014 06:12, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada Cc: Stefan Roese Good catch! Acked-by: Stefan Roese Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] why not enable ICache in vexpress_aemv8a.h
Hi, fenghua: I found you defined these marcoes in vexpress_aemv8a.h : #define CONFIG_SYS_DCACHE_OFF #define CONFIG_SYS_ICACHE_OFF Most ARMv7 platform will enable Icache to make code run faster. So, why not turn on Icache on ARMv8 FVP model? Is there any side-effects? Best wishes, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uhs-1 support in imx_esdhc.c file
Hi, TigerLiu Sorry to miss you mail. Now UHS-I support has not been merged into fsl_esdhc.c. We plan to. There is no plan to support UHS-II now. Thanks. Regards & Thanks -- Haijun On 03/27/2014 07:19 PM, tiger...@via-alliance.com wrote: Hi, Haijun: Freescale engineer had ever added UHS-I support in drivers/mmc/imx_esdhc.c . But I could not find imx_eshdc.c file in current latest u-boot package. So, I have questions about UHS-I code: 1. UHS-I support has been merged into fsl_esdhc.c ? 2. Does freescale support UHS-II in u-boot code? Best wishes, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] mmc: sh_mmcif: Fix compile error
BY commit "mmc: Split mmc struct, rework mmc initialization (v2)", sh_mmcif has compile error. This fixes compile error. Signed-off-by: Nobuhiro Iwamatsu CC: Pantelis Antoniou Reported-by: Masahiro Yamada --- drivers/mmc/sh_mmcif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c index 64b5b47..ad5b23c 100644 --- a/drivers/mmc/sh_mmcif.c +++ b/drivers/mmc/sh_mmcif.c @@ -580,7 +580,7 @@ static struct mmc_config sh_mmcif_cfg = { .ops= &sh_mmcif_ops, .host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT | MMC_MODE_8BIT | MMC_MODE_HC, - .voltages = MMC_VDD_32_33 | MMC_VDD_33_34; + .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, .f_min = CLKDEV_MMC_INIT, .f_max = CLKDEV_EMMC_DATA, .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT, -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 04/10] power: Explicitly select pmic device's bus
Hi Heiko, > Hello Simon, Lukasz, > > Am 30.03.2014 01:17, schrieb Simon Glass: > > Hi Lukasz, > > > > On 27 March 2014 11:33, Lukasz Majewski > > wrote: > > > >> Hi Simon, Heiko > >> > >>> From: Aaron Durbin > >>> > >>> The current pmic i2c code assumes the current i2c bus is > >>> the same as the pmic device's bus. There is nothing ensuring > >>> that to be true. Therefore, select the proper bus before > >>> performing a transaction. > >>> > >>> Signed-off-by: Aaron Durbin > >>> Signed-off-by: Simon Glass > >>> Reviewed-by: Simon Glass > >>> --- > >>> > >>> drivers/power/power_i2c.c | 4 > >>> 1 file changed, 4 insertions(+) > >>> > >>> diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c > >>> index ac76870..594cd11 100644 > >>> --- a/drivers/power/power_i2c.c > >>> +++ b/drivers/power/power_i2c.c > >>> @@ -23,6 +23,8 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 > >>> val) if (check_reg(p, reg)) > >>>return -1; > >>> > >>> + I2C_SET_BUS(p->bus); > >>> + > >> > >> Hadn't we had a discussion about this explicit setting of I2C > >> some time ago? I thought that this problem was solved within the > >> I2C rework. > >> > >> Also I might be wrong, so please correct me if I'm wrong. Isn't the > >> I2C_SET_BUS() macro regarded as a obsolete after the I2C rework? > >> > > > > Agreed that would be ideal, but we would have to pass the bus > > number of the i2c_read/write() functions. I don't believe the i2c > > code has got that far yet. > > Yes, thats the plan, but first, all i2c driver must be converted to > the new framework. After that we could start with such an approach > (or device model is ready and we can switch to it ...) I know that there is a time line for introducing device model, but is there any for switching I2C to the new approach? I think about deleting obsolete/unmaintained boards, which will not switch to new I2C approach. > > > Unfortunately it doesn't work without this patch. > > Yes ... > > If we have all i2c driver running with the new framework, we can get > rid of I2C_SET_BUS defines, and simply use i2c_set_bus_num() which > is a simple cleanup patch. Ok, I see. > > bye, > Heiko -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [U-BOOT] [PATCH v3] powerpc/t104xrdb: Unification of T104xRDB header files
T1040RDB, T1042RDB header files are very similar so merged into new header file T104xRDB. T104xRDB header file can support both T1040RDB and T1042RDB_PI header. Patch makes following changes -Update Boards.cfg file for T1040RDB and T1042RDB_PI -Add new T104xRDB header file -Delete T1040RDB, T1042RDB_PI header file Signed-off-by: Vijay Rai Signed-off-by: Priyanka Jain --- v3: - Rebasing to top of the tree boards.cfg |4 +- include/configs/T1042RDB_PI.h | 695 include/configs/{T1040RDB.h => T104xRDB.h} | 57 ++- 3 files changed, 35 insertions(+), 721 deletions(-) delete mode 100644 include/configs/T1042RDB_PI.h rename include/configs/{T1040RDB.h => T104xRDB.h} (95%) diff --git a/boards.cfg b/boards.cfg index 69c8936..5afca26 100644 --- a/boards.cfg +++ b/boards.cfg @@ -932,8 +932,8 @@ Active powerpc mpc85xx- freescale p2041rdb Active powerpc mpc85xx- freescale p2041rdb P2041RDB_SPIFLASH P2041RDB:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF4 - Active powerpc mpc85xx- freescale p2041rdb P2041RDB_SRIO_PCIE_BOOT P2041RDB:SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF4 - Active powerpc mpc85xx- freescale t1040qds T1040QDS T1040QDS:PPC_T1040 Poonam Aggrwal -Active powerpc mpc85xx- freescale t104xrdb T1040RDB T1040RDB:PPC_T1040 Poonam Aggrwal -Active powerpc mpc85xx- freescale t104xrdb T1042RDB_PI T1042RDB_PI:PPC_T1042 Poonam Aggrwal +Active powerpc mpc85xx- freescale t104xrdb T1040RDB T104xRDB:PPC_T1040,T1040RDB Priyanka Jain +Active powerpc mpc85xx- freescale t104xrdb T1042RDB_PI T104xRDB:PPC_T1042,T1042RDB_PI Priyanka Jain Active powerpc mpc85xx- freescale t208xqds T2080QDS T208xQDS:PPC_T2080 - Active powerpc mpc85xx- freescale t208xqds T2080QDS_NAND T208xQDS:PPC_T2080,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF4 - Active powerpc mpc85xx- freescale t208xqds T2080QDS_SDCARD T208xQDS:PPC_T2080,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF4 - diff --git a/include/configs/T1042RDB_PI.h b/include/configs/T1042RDB_PI.h deleted file mode 100644 index 68656e6..000 --- a/include/configs/T1042RDB_PI.h +++ /dev/null @@ -1,695 +0,0 @@ -/* - * Copyright 2013 Freescale Semiconductor, Inc. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* - * T1042RDB_PI board configuration file - */ -#define CONFIG_T104xRDB -#define CONFIG_T1042RDB_PI -#define CONFIG_PHYS_64BIT - -#ifdef CONFIG_RAMBOOT_PBL -#define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_RESET_VECTOR_ADDRESS0xfffc -#endif
Re: [U-Boot] [PATCH] sh: delete an unused source file
Applied to u-boot-sh.git. Thanks! Nobuhiro 2014-03-31 14:46 GMT+09:00 Nobuhiro Iwamatsu : > 2014-03-31 13:09 GMT+09:00 Masahiro Yamada : >> Signed-off-by: Masahiro Yamada >> Cc: Nobuhiro Iwamatsu > > Acked-by: Nobuhiro Iwamatsu > >> --- >> arch/sh/cpu/sh2/cache.c | 96 >> - >> 1 file changed, 96 deletions(-) >> delete mode 100644 arch/sh/cpu/sh2/cache.c >> >> diff --git a/arch/sh/cpu/sh2/cache.c b/arch/sh/cpu/sh2/cache.c >> deleted file mode 100644 >> index 8093e98..000 >> --- a/arch/sh/cpu/sh2/cache.c >> +++ /dev/null >> @@ -1,96 +0,0 @@ >> -/* >> - * (C) Copyright 2007 >> - * Yoshihiro Shimoda >> - * >> - * Copyright (C) 2007, 2008 Nobobuhiro Iwamatsu >> - * Copyright (C) 2008 Renesas Solutions Corp. >> - * >> - * SPDX-License-Identifier:GPL-2.0+ >> - */ >> - >> -#include >> -#include >> -#include >> -#include >> - >> -/* >> - * Jump to P2 area. >> - * When handling TLB or caches, we need to do it from P2 area. >> - */ >> -#define jump_to_P2() \ >> -do { \ >> - unsigned long __dummy; \ >> - __asm__ __volatile__( \ >> - "mov.l 1f, %0\n\t" \ >> - "or %1, %0\n\t" \ >> - "jmp@%0\n\t"\ >> - " nop\n\t" \ >> - ".balign 4\n" \ >> - "1: .long 2f\n" \ >> - "2:"\ >> - : "=&r" (__dummy) \ >> - : "r" (0x2000));\ >> -} while (0) >> - >> -/* >> - * Back to P1 area. >> - */ >> -#define back_to_P1() \ >> -do { \ >> - unsigned long __dummy; \ >> - __asm__ __volatile__( \ >> - "nop;nop;nop;nop;nop;nop;nop\n\t" \ >> - "mov.l 1f, %0\n\t" \ >> - "jmp@%0\n\t"\ >> - " nop\n\t" \ >> - ".balign 4\n" \ >> - "1: .long 2f\n" \ >> - "2:"\ >> - : "=&r" (__dummy)); \ >> -} while (0) >> - >> -#define CACHE_VALID1 >> -#define CACHE_UPDATED 2 >> - >> -static inline void cache_wback_all(void) >> -{ >> - unsigned long addr, data, i, j; >> - >> - jump_to_P2(); >> - for (i = 0; i < CACHE_OC_NUM_ENTRIES; i++) { >> - for (j = 0; j < CACHE_OC_NUM_WAYS; j++) { >> - addr = CACHE_OC_ADDRESS_ARRAY >> - | (j << CACHE_OC_WAY_SHIFT) >> - | (i << CACHE_OC_ENTRY_SHIFT); >> - data = inl(addr); >> - if (data & CACHE_UPDATED) { >> - data &= ~CACHE_UPDATED; >> - outl(data, addr); >> - } >> - } >> - } >> - back_to_P1(); >> -} >> - >> - >> -#define CACHE_ENABLE 0 >> -#define CACHE_DISABLE 1 >> - >> -int cache_control(unsigned int cmd) >> -{ >> - unsigned long ccr; >> - >> - jump_to_P2(); >> - ccr = inl(CCR); >> - >> - if (ccr & CCR_CACHE_ENABLE) >> - cache_wback_all(); >> - >> - if (cmd == CACHE_DISABLE) >> - outl(CCR_CACHE_STOP, CCR); >> - else >> - outl(CCR_CACHE_INIT, CCR); >> - back_to_P1(); >> - >> - return 0; >> -} >> -- >> 1.8.3.2 >> >> ___ >> U-Boot mailing list >> U-Boot@lists.denx.de >> http://lists.denx.de/mailman/listinfo/u-boot > > > > -- > Nobuhiro Iwamatsu -- Nobuhiro Iwamatsu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] mmc: sh_mmcif: Fix warning by unused variable
Signed-off-by: Nobuhiro Iwamatsu Reported-by: Masahiro Yamada --- drivers/mmc/sh_mmcif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c index ad5b23c..ed83a14 100644 --- a/drivers/mmc/sh_mmcif.c +++ b/drivers/mmc/sh_mmcif.c @@ -588,13 +588,12 @@ static struct mmc_config sh_mmcif_cfg = { int mmcif_mmc_init(void) { - int ret = 0; struct mmc *mmc; struct sh_mmcif_host *host = NULL; host = malloc(sizeof(struct sh_mmcif_host)); if (!host) - ret = -ENOMEM; + return -ENOMEM; memset(host, 0, sizeof(*host)); host->regs = (struct sh_mmcif_regs *)CONFIG_SH_MMCIF_ADDR; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] kbuild/makefile: allow building host tools separately
Hi Masahiro-san, On Mon, 2014-03-31 at 10:43 +0900, Masahiro Yamada wrote: > I wanted to show retionale why a make target "tools-only" is better > than "HOST_TOOLS_ONLY=yes". Completely agree. I should have think a bit more before sending initial patch because right after the email was sent I thought why didn't I use a new target? :) New target looks much better than some random variable. It's shorter and easier to use. > > > > Doesn't work for me: > > > > $ make tools-only > > HOSTCC scripts/basic/fixdep > > HOSTCC tools/aisimage.o > > HOSTCC tools/crc32.o > > HOSTCC tools/default_image.o > > HOSTCC tools/dumpimage.o > > In file included from include/version.h:11:0, > > from tools/dumpimage.c:11: > > include/timestamp.h:11:47: fatal error: > > generated/timestamp_autogenerated.h: No such file or directory > > #include "generated/timestamp_autogenerated.h" > >^ > > compilation terminated. > > make[1]: *** [tools/dumpimage.o] Error 1 > > make: *** [tools-only] Error 2 > > > > > > Oops - My bad. > I was disabling timestamp. > > > Could you fix like this? > > tools-only: scripts_basic $(version_h) $(timestamp_h) > $(Q)$(MAKE) $(build)=tools > Works as a charm for me as well. Do you mind to submit your changes (because it was you who implemented it properly and I don't want to "steal" your credits)? Or I do it still on your behalf putting you in as an author? -Alexey ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sh: delete an unused source file
2014-03-31 13:09 GMT+09:00 Masahiro Yamada : > Signed-off-by: Masahiro Yamada > Cc: Nobuhiro Iwamatsu Acked-by: Nobuhiro Iwamatsu > --- > arch/sh/cpu/sh2/cache.c | 96 > - > 1 file changed, 96 deletions(-) > delete mode 100644 arch/sh/cpu/sh2/cache.c > > diff --git a/arch/sh/cpu/sh2/cache.c b/arch/sh/cpu/sh2/cache.c > deleted file mode 100644 > index 8093e98..000 > --- a/arch/sh/cpu/sh2/cache.c > +++ /dev/null > @@ -1,96 +0,0 @@ > -/* > - * (C) Copyright 2007 > - * Yoshihiro Shimoda > - * > - * Copyright (C) 2007, 2008 Nobobuhiro Iwamatsu > - * Copyright (C) 2008 Renesas Solutions Corp. > - * > - * SPDX-License-Identifier:GPL-2.0+ > - */ > - > -#include > -#include > -#include > -#include > - > -/* > - * Jump to P2 area. > - * When handling TLB or caches, we need to do it from P2 area. > - */ > -#define jump_to_P2() \ > -do { \ > - unsigned long __dummy; \ > - __asm__ __volatile__( \ > - "mov.l 1f, %0\n\t" \ > - "or %1, %0\n\t" \ > - "jmp@%0\n\t"\ > - " nop\n\t" \ > - ".balign 4\n" \ > - "1: .long 2f\n" \ > - "2:"\ > - : "=&r" (__dummy) \ > - : "r" (0x2000));\ > -} while (0) > - > -/* > - * Back to P1 area. > - */ > -#define back_to_P1() \ > -do { \ > - unsigned long __dummy; \ > - __asm__ __volatile__( \ > - "nop;nop;nop;nop;nop;nop;nop\n\t" \ > - "mov.l 1f, %0\n\t" \ > - "jmp@%0\n\t"\ > - " nop\n\t" \ > - ".balign 4\n" \ > - "1: .long 2f\n" \ > - "2:"\ > - : "=&r" (__dummy)); \ > -} while (0) > - > -#define CACHE_VALID1 > -#define CACHE_UPDATED 2 > - > -static inline void cache_wback_all(void) > -{ > - unsigned long addr, data, i, j; > - > - jump_to_P2(); > - for (i = 0; i < CACHE_OC_NUM_ENTRIES; i++) { > - for (j = 0; j < CACHE_OC_NUM_WAYS; j++) { > - addr = CACHE_OC_ADDRESS_ARRAY > - | (j << CACHE_OC_WAY_SHIFT) > - | (i << CACHE_OC_ENTRY_SHIFT); > - data = inl(addr); > - if (data & CACHE_UPDATED) { > - data &= ~CACHE_UPDATED; > - outl(data, addr); > - } > - } > - } > - back_to_P1(); > -} > - > - > -#define CACHE_ENABLE 0 > -#define CACHE_DISABLE 1 > - > -int cache_control(unsigned int cmd) > -{ > - unsigned long ccr; > - > - jump_to_P2(); > - ccr = inl(CCR); > - > - if (ccr & CCR_CACHE_ENABLE) > - cache_wback_all(); > - > - if (cmd == CACHE_DISABLE) > - outl(CCR_CACHE_STOP, CCR); > - else > - outl(CCR_CACHE_INIT, CCR); > - back_to_P1(); > - > - return 0; > -} > -- > 1.8.3.2 > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot -- Nobuhiro Iwamatsu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [i2c] Pull request
Hello Tom, please pull from u-boot-i2c.git, thanks! The following changes since commit 0b2da7e209f4110b7c81d578336a10330e4a4404: blackfin: mmc: Correct mmc_host_is_spi and bfin_sdh.c (2014-03-28 16:55:29 -0400) are available in the git repository at: git://git.denx.de/u-boot-i2c.git master for you to fetch changes up to 462d1883f78353c5ed9d09de45a9b5b2422793a3: drivers: i2c: delete an unused source file (2014-03-31 07:30:55 +0200) Masahiro Yamada (1): drivers: i2c: delete an unused source file drivers/i2c/adi_i2c.c | 387 1 file changed, 387 deletions(-) delete mode 100644 drivers/i2c/adi_i2c.c bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] drivers: i2c: delete an unused source file
Hello Masahiro, Am 31.03.2014 06:03, schrieb Masahiro Yamada: Signed-off-by: Masahiro Yamada Cc: Heiko Schocher --- drivers/i2c/adi_i2c.c | 387 -- 1 file changed, 387 deletions(-) delete mode 100644 drivers/i2c/adi_i2c.c Good catch! Applied to u-boot-i2c.git, thanks! bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-sh/master
Hi, 2014-03-31 12:54 GMT+09:00 Masahiro Yamada : > Hi Nobuhiro > > Could you fix error & warning in sh_mmcif.c, please? > > > drivers/mmc/sh_mmcif.c:583:43: error: expected '}' before ';' token > drivers/mmc/sh_mmcif.c: In function 'mmcif_mmc_init': > drivers/mmc/sh_mmcif.c:591:6: warning: variable 'ret' set but not used > [-Wunused-but-set-variable] This is copy and paste error of mmc rework. OK, I will fix this problem, soon. Thanks for your report. > > > Best Regards > Masahiro Yamada > Best regards, Nobuhiro -- Nobuhiro Iwamatsu iwamatsu at {nigauri.org / debian.org} GPG ID: 40AD1FA6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 6/9] i2c, davinci: convert driver to new mutlibus/mutliadapter framework
Hello Mruali, Am 27.03.2014 16:59, schrieb Murali Karicheri: From: Vitaly Andrianov - add davinci driver to new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Vitaly Andrianov Signed-off-by: Murali Karicheri --- arch/arm/cpu/arm926ejs/davinci/dm355.c |2 +- arch/arm/cpu/arm926ejs/davinci/dm365.c |2 +- arch/arm/cpu/arm926ejs/davinci/dm644x.c |2 +- arch/arm/cpu/arm926ejs/davinci/dm646x.c |2 +- drivers/i2c/Makefile|2 +- drivers/i2c/davinci_i2c.c | 401 ++- drivers/i2c/davinci_i2c.h | 27 ++- include/configs/cam_enc_4xx.h |8 +- include/configs/da830evm.h |8 +- include/configs/da850evm.h |8 +- include/configs/davinci_dm355evm.h |8 +- include/configs/davinci_dm355leopard.h |8 +- include/configs/davinci_dm365evm.h |8 +- include/configs/davinci_dm6467evm.h |8 +- include/configs/davinci_dvevm.h |8 +- include/configs/davinci_schmoogie.h |8 +- include/configs/davinci_sffsdr.h|8 +- include/configs/davinci_sonata.h|8 +- include/configs/ea20.h |6 +- include/configs/enbw_cmc.h |8 +- 20 files changed, 305 insertions(+), 235 deletions(-) This is your v4 post ... some sort of history, what has changed would be nice ... [...] diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 36d5e5f..fd1cb11 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -6,7 +6,7 @@ # obj-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o -obj-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o +obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o please keep lists sorted. obj-$(CONFIG_DW_I2C) += designware_i2c.o obj-$(CONFIG_I2C_MVTWSI) += mvtwsi.o obj-$(CONFIG_I2C_MV) += mv_i2c.o [...] Rest looks Ok for me ... if checkpatch drops no errors and warnings and MAKEALL compiles clean ;-) bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tegra: fix Makefile to pass per-file CFLAGS
Since Kbuild was introduced, warmboot_avp.o has been compiled without -march=armv4t. Makefile should be adjusted to pass a per-file option. Signed-off-by: Masahiro Yamada Cc: Stephen Warren Cc: Tom Warren --- arch/arm/cpu/tegra20-common/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/tegra20-common/Makefile b/arch/arm/cpu/tegra20-common/Makefile index 32ddbda..0e4b3fc 100644 --- a/arch/arm/cpu/tegra20-common/Makefile +++ b/arch/arm/cpu/tegra20-common/Makefile @@ -9,7 +9,7 @@ # The AVP is ARMv4T architecture so we must use special compiler # flags for any startup files it might use. -CFLAGS_arch/arm/cpu/tegra20-common/warmboot_avp.o += -march=armv4t +CFLAGS_warmboot_avp.o += -march=armv4t obj-y += clock.o funcmux.o pinmux.o obj-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 04/10] power: Explicitly select pmic device's bus
Hello Simon, Lukasz, Am 30.03.2014 01:17, schrieb Simon Glass: Hi Lukasz, On 27 March 2014 11:33, Lukasz Majewski wrote: Hi Simon, Heiko From: Aaron Durbin The current pmic i2c code assumes the current i2c bus is the same as the pmic device's bus. There is nothing ensuring that to be true. Therefore, select the proper bus before performing a transaction. Signed-off-by: Aaron Durbin Signed-off-by: Simon Glass Reviewed-by: Simon Glass --- drivers/power/power_i2c.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c index ac76870..594cd11 100644 --- a/drivers/power/power_i2c.c +++ b/drivers/power/power_i2c.c @@ -23,6 +23,8 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val) if (check_reg(p, reg)) return -1; + I2C_SET_BUS(p->bus); + Hadn't we had a discussion about this explicit setting of I2C some time ago? I thought that this problem was solved within the I2C rework. Also I might be wrong, so please correct me if I'm wrong. Isn't the I2C_SET_BUS() macro regarded as a obsolete after the I2C rework? Agreed that would be ideal, but we would have to pass the bus number of the i2c_read/write() functions. I don't believe the i2c code has got that far yet. Yes, thats the plan, but first, all i2c driver must be converted to the new framework. After that we could start with such an approach (or device model is ready and we can switch to it ...) Unfortunately it doesn't work without this patch. Yes ... If we have all i2c driver running with the new framework, we can get rid of I2C_SET_BUS defines, and simply use i2c_set_bus_num() which is a simple cleanup patch. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cosmetic: README.scrapyard: fix false removed date and commit
On Monday, March 31, 2014 at 05:58:54 AM, Masahiro Yamada wrote: > Describe removed date in the form of -MM-DD, not -DD-MM. > And wrong commit hash also should be fixed. > > Signed-off-by: Masahiro Yamada > Cc: Marek Vasut Interesting, thanks. Acked-by: Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] kbuild: use boolean macros to select tegra*-common directory
Signed-off-by: Masahiro Yamada --- arch/arm/cpu/Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile index b2d30b1..35d8d38 100644 --- a/arch/arm/cpu/Makefile +++ b/arch/arm/cpu/Makefile @@ -1,3 +1,6 @@ obj-$(CONFIG_AT91FAMILY) += at91-common/ -obj-$(CONFIG_TEGRA) += $(SOC)-common/ +obj-$(CONFIG_TEGRA20) += tegra20-common/ +obj-$(CONFIG_TEGRA30) += tegra30-common/ +obj-$(CONFIG_TEGRA114) += tegra114-common/ +obj-$(CONFIG_TEGRA124) += tegra124-common/ obj-$(CONFIG_TEGRA) += tegra-common/ -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] kbuild: do not use $(BOARD) to specify exact object name
Signed-off-by: Masahiro Yamada --- board/broadcom/bcm28155_ap/Makefile | 2 +- board/compulab/cm_t335/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/broadcom/bcm28155_ap/Makefile b/board/broadcom/bcm28155_ap/Makefile index b18785a..4bb9e70 100644 --- a/board/broadcom/bcm28155_ap/Makefile +++ b/board/broadcom/bcm28155_ap/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += $(BOARD).o +obj-y += bcm28155_ap.o diff --git a/board/compulab/cm_t335/Makefile b/board/compulab/cm_t335/Makefile index 0e6e96e..b405caa 100644 --- a/board/compulab/cm_t335/Makefile +++ b/board/compulab/cm_t335/Makefile @@ -6,5 +6,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += $(BOARD).o +obj-y += cm_t335.o obj-$(CONFIG_SPL_BUILD) += mux.o spl.o -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARMv8: fix bug for flush data cache by set/way
When flush the d$ with set/way instruction, it need calculate the way's offset = log2(Associativity); but in current uboot's code, it use below formula to calculate the offset: log2(Associativity * 2 - 1), so finally it cannot flush data cache properly. Signed-off-by: Leo Yan --- arch/arm/cpu/armv8/cache.S |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv8/cache.S b/arch/arm/cpu/armv8/cache.S index 546a83e..256d2e2 100644 --- a/arch/arm/cpu/armv8/cache.S +++ b/arch/arm/cpu/armv8/cache.S @@ -30,9 +30,7 @@ ENTRY(__asm_flush_dcache_level) add x2, x2, #4 /* x2 <- log2(cache line size) */ mov x3, #0x3ff and x3, x3, x6, lsr #3 /* x3 <- max number of #ways */ - add w4, w3, w3 - sub w4, w4, 1 /* round up log2(#ways + 1) */ - clz w5, w4 /* bit position of #ways */ + clz w5, w3 /* bit position of #ways */ mov x4, #0x7fff and x4, x4, x6, lsr #13 /* x4 <- max number of #sets */ /* x1 <- cache level << 1 */ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] board: hidden_dragon: remove an unused source file
Signed-off-by: Masahiro Yamada Cc: Yusdi Santoso --- board/hidden_dragon/early_init.S | 137 --- 1 file changed, 137 deletions(-) delete mode 100644 board/hidden_dragon/early_init.S diff --git a/board/hidden_dragon/early_init.S b/board/hidden_dragon/early_init.S deleted file mode 100644 index 5a9b924..000 --- a/board/hidden_dragon/early_init.S +++ /dev/null @@ -1,137 +0,0 @@ -/* - * (C) Copyright 2001 - * Thomas Koeller, tkoel...@gmx.net - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#ifndef__ASSEMBLY__ -#define __ASSEMBLY__ 1 -#endif - -#include -#include -#include -#include -#include - -#if defined(USE_DINK32) - /* We are running from RAM, so do not clear the MCCR1_MEMGO bit! */ - #define MCCR1VAL ((CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) | MCCR1_MEMGO) -#else - #define MCCR1VAL (CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) -#endif - - .text - - /* Values to program into memory controller registers */ -tbl: .long MCCR1, MCCR1VAL - .long MCCR2, CONFIG_SYS_REFINT << MCCR2_REFINT_SHIFT - .long MCCR3 - .long (((CONFIG_SYS_BSTOPRE & 0x00f0) >> 4) << MCCR3_BSTOPRE2TO5_SHIFT) | \ - (CONFIG_SYS_REFREC << MCCR3_REFREC_SHIFT) | \ - (CONFIG_SYS_RDLAT << MCCR3_RDLAT_SHIFT) - .long MCCR4 - .long (CONFIG_SYS_PRETOACT << MCCR4_PRETOACT_SHIFT) | (CONFIG_SYS_ACTTOPRE << MCCR4_ACTTOPRE_SHIFT) | \ - (CONFIG_SYS_REGISTERD_TYPE_BUFFER << 20) | \ - (((CONFIG_SYS_BSTOPRE & 0x0300) >> 8) << MCCR4_BSTOPRE0TO1_SHIFT ) | \ - ((CONFIG_SYS_SDMODE_CAS_LAT << 4) | (CONFIG_SYS_SDMODE_WRAP << 3) | \ - (CONFIG_SYS_SDMODE_BURSTLEN) << MCCR4_SDMODE_SHIFT) | \ - (CONFIG_SYS_ACTTORW << MCCR4_ACTTORW_SHIFT) | \ - ((CONFIG_SYS_BSTOPRE & 0x000f) << MCCR4_BSTOPRE6TO9_SHIFT ) - .long MSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) <
[U-Boot] [PATCH] board: prodrive: delete unused source files
Signed-off-by: Masahiro Yamada Cc: Stefan Roese --- board/prodrive/common/flash.c | 544 -- board/prodrive/common/fpga.c | 167 - 2 files changed, 711 deletions(-) delete mode 100644 board/prodrive/common/flash.c delete mode 100644 board/prodrive/common/fpga.c diff --git a/board/prodrive/common/flash.c b/board/prodrive/common/flash.c deleted file mode 100644 index 9954051..000 --- a/board/prodrive/common/flash.c +++ /dev/null @@ -1,544 +0,0 @@ -/* - * (C) Copyright 2006 - * Stefan Roese, DENX Software Engineering, s...@denx.de. - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include -#include - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/* - * Functions - */ -static int write_word(flash_info_t *info, ulong dest, ulong data); - -void flash_print_info(flash_info_t *info) -{ - int i; - int k; - int size; - int erased; - volatile unsigned long *flash; - - if (info->flash_id == FLASH_UNKNOWN) { - printf ("missing or unknown FLASH type\n"); - return; - } - - switch (info->flash_id & FLASH_VENDMASK) { - case FLASH_MAN_AMD: printf ("AMD ");break; - case FLASH_MAN_FUJ: printf ("FUJITSU ");break; - case FLASH_MAN_SST: printf ("SST ");break; - case FLASH_MAN_STM: printf ("ST "); break; - case FLASH_MAN_EXCEL: printf ("Excel Semiconductor "); break; - default:printf ("Unknown Vendor "); break; - } - - switch (info->flash_id & FLASH_TYPEMASK) { - case FLASH_AM400B: printf ("AM29LV400B (4 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM400T: printf ("AM29LV400T (4 Mbit, top boot sector)\n"); - break; - case FLASH_AM800B: printf ("AM29LV800B (8 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM800T: printf ("AM29LV800T (8 Mbit, top boot sector)\n"); - break; - case FLASH_AM160B: printf ("AM29LV160B (16 Mbit, bottom boot sect)\n"); - break; - case FLASH_AM160T: printf ("AM29LV160T (16 Mbit, top boot sector)\n"); - break; - case FLASH_AM320T: printf ("AM29LV320T (32 M, top sector)\n"); - break; - case FLASH_AM320B: printf ("AM29LV320B (32 M, bottom sector)\n"); - break; - case FLASH_AMDL322T:printf ("AM29DL322T (32 M, top sector)\n"); - break; - case FLASH_AMDL322B:printf ("AM29DL322B (32 M, bottom sector)\n"); - break; - case FLASH_AMDL323T:printf ("AM29DL323T (32 M, top sector)\n"); - break; - case FLASH_AMDL323B:printf ("AM29DL323B (32 M, bottom sector)\n"); - break; - case FLASH_SST020: printf ("SST39LF/VF020 (2 Mbit, uniform sector size)\n"); - break; - case FLASH_SST040: printf ("SST39LF/VF040 (4 Mbit, uniform sector size)\n"); - break; - default:printf ("Unknown Chip Type\n"); - break; - } - - printf (" Size: %ld MB in %d Sectors\n", - info->size >> 20, info->sector_count); - - printf (" Sector Start Addresses:"); - for (i=0; isector_count; ++i) { -#ifdef CONFIG_SYS_FLASH_EMPTY_INFO - /* -* Check if whole sector is erased -*/ - if (i != (info->sector_count-1)) - size = info->start[i+1] - info->start[i]; - else - size = info->start[0] + info->size - info->start[i]; - erased = 1; - flash = (volatile unsigned long *)info->start[i]; - size = size >> 2;/* divide by 4 for longword access */ - for (k=0; kstart[i], - erased ? " E" : " ", - info->protect[i] ? "RO " : " "); -#else - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s", - info->start[i], - info->protect[i] ? " (RO)" : " "); -#endif - - } - printf ("\n"); - return; -} - -/* - * The following code cannot be run from FLASH! - */ -static ulong flash_get_size(vu_long *addr, flash_info_t *info) -{ - short i; - short n; - CONFIG_SYS_FLASH_WORD_SIZE value; - ulong base = (ulong)addr; - volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)addr; - - /* Write auto select command: read Manufacturer ID */ - addr2[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00AA00AA; - addr2[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE)0x00550055; - addr2[CONFIG_SYS_FLASH_ADDR0] = (CONFIG_S
[U-Boot] [PATCH] board: Marvell: delete an unused source file
Signed-off-by: Masahiro Yamada Cc: Prafulla Wadaskar Cc: Lei Wen --- board/Marvell/common/ecctest.c | 115 - 1 file changed, 115 deletions(-) delete mode 100644 board/Marvell/common/ecctest.c diff --git a/board/Marvell/common/ecctest.c b/board/Marvell/common/ecctest.c deleted file mode 100644 index 0a9a2a4..000 --- a/board/Marvell/common/ecctest.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * (C) Copyright 2001 - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#ifdef ECC_TEST -static inline void ecc_off (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) &= ~0x0020; -} - -static inline void ecc_on (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) |= 0x0020; -} - -static int putshex (const char *buf, int len) -{ - int i; - - for (i = 0; i < len; i++) { - printf ("%02x", buf[i]); - } - return 0; -} - -static int char_memcpy (void *d, const void *s, int len) -{ - int i; - char *cd = d; - const char *cs = s; - - for (i = 0; i < len; i++) { - *(cd++) = *(cs++); - } - return 0; -} - -static int memory_test (char *buf) -{ - const char src[][16] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, - {0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02}, - {0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, -0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, - {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08}, - {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, - {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20}, - {0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, - {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, -0x80, 0x80, 0x80, 0x80, 0x80, 0x80}, - {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, -0x55, 0x55, 0x55, 0x55, 0x55, 0x55}, - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, -0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, - {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }; - const int foo[] = { 0 }; - int i, j, a; - - printf ("\ntest @ %d %p\n", foo[0], buf); - for (i = 0; i < 12; i++) { - for (a = 0; a < 8; a++) { - const char *s = src[i] + a; - int align = (unsigned) (s) & 0x7; - - /* ecc_off(); */ - memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - /* ecc_off(); */ - char_memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - } - } - - return 0; -} -#endif -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/lis
[U-Boot] [PATCH] standalone: delete an unused source file
Signed-off-by: Masahiro Yamada --- examples/standalone/x86-testapp.c | 100 -- 1 file changed, 100 deletions(-) delete mode 100644 examples/standalone/x86-testapp.c diff --git a/examples/standalone/x86-testapp.c b/examples/standalone/x86-testapp.c deleted file mode 100644 index 1e16ec7..000 --- a/examples/standalone/x86-testapp.c +++ /dev/null @@ -1,100 +0,0 @@ -#include -#include -#include - -void *func[8], **pfunc; - -typedef struct xxx xxx_t; -struct xxx { - int dummy; - void **pfunc; -} q; - -#define XF_strcpy 3 -#define XF_printf 4 - -#define LABEL(x) \ -asm volatile ( \ - -#if defined(__i386__) -#define EXPORT_FUNC(x) \ -asm volatile ( \ -" .globl mon_" #x "\n"\ -"mon_" #x ":\n"\ -" movl%0, %%eax\n"\ -" movlpfunc, %%ecx\n" \ -" jmp *(%%ecx,%%eax)\n" \ - : : "i"(XF_ ## x * sizeof(void *)) : "eax", "ecx"); -#elif defined(__powerpc__) -#define EXPORT_FUNC(x) \ -asm volatile ( \ -" .globl mon_" #x "\n"\ -"mon_" #x ":\n"\ -" lwz %%r11, %0(%%r2)\n" \ -" lwz %%r11, %1(%%r11)\n" \ -" mtctr %%r11\n"\ -" bctr\n" \ - : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r2"); -#elif defined(__arm__) -#define EXPORT_FUNC(x) \ -asm volatile ( \ -" .globl mon_" #x "\n"\ -"mon_" #x ":\n"\ -" ldr ip, [r8, %0]\n" \ -" ldr pc, [ip, %1]\n" \ - : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "ip"); -#elif defined(__mips__) -#define EXPORT_FUNC(x) \ -asm volatile ( \ -" .globl mon_" #x "\n"\ -"mon_" #x ":\n"\ -" lw $25, %0($26)\n" \ -" lw $25, %1($25)\n" \ -" jr $25\n" \ - : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "t9"); -#elif defined(__nds32__) -#define EXPORT_FUNC(x) \ -asm volatile ( \ -" .globl mon_" #x "\n"\ -"mon_" #x ":\n"\ -" lwi $r16, [$gp + (%0)]\n" \ -" lwi $r16, [$r16 + (%1)]\n" \ -" jr $r16\n" \ -: : "i"(offsetof(xxx_t, pfunc)), \ -"i"(XF_ ## x * sizeof(void *)) : "$r16"); - -#else -#error [No stub code for this arch] -#endif - -void dummy(void) -{ -EXPORT_FUNC(printf) -EXPORT_FUNC(strcpy) -} - -int main(void) -{ -#if defined(__i386__) - xxx_t *pq; -#elif defined(__powerpc__) - register volatile xxx_t *pq asm("r2"); -#elif defined(__arm__) - register volatile xxx_t *pq asm("r8"); -#elif defined(__mips__) - register volatile xxx_t *pq asm("k0"); -#elif defined(__nds32__) - register volatile xxx_t *pq asm("$r16"); -#endif - char buf[32]; - - func[XF_strcpy] = strcpy; - func[XF_printf] = printf; - pq = &q; - pq->pfunc = pfunc = func; - - mon_strcpy(buf, "test"); - mon_printf("hi %s %d z\n", buf, 444); - - return 0; -} -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] board: sandpoint: delete an unused source file
Signed-off-by: Masahiro Yamada Cc: Wolfgang Denk Cc: Jim Thompson --- board/sandpoint/early_init.S | 137 --- 1 file changed, 137 deletions(-) delete mode 100644 board/sandpoint/early_init.S diff --git a/board/sandpoint/early_init.S b/board/sandpoint/early_init.S deleted file mode 100644 index 5a9b924..000 --- a/board/sandpoint/early_init.S +++ /dev/null @@ -1,137 +0,0 @@ -/* - * (C) Copyright 2001 - * Thomas Koeller, tkoel...@gmx.net - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#ifndef__ASSEMBLY__ -#define __ASSEMBLY__ 1 -#endif - -#include -#include -#include -#include -#include - -#if defined(USE_DINK32) - /* We are running from RAM, so do not clear the MCCR1_MEMGO bit! */ - #define MCCR1VAL ((CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) | MCCR1_MEMGO) -#else - #define MCCR1VAL (CONFIG_SYS_ROMNAL << MCCR1_ROMNAL_SHIFT) | (CONFIG_SYS_ROMFAL << MCCR1_ROMFAL_SHIFT) -#endif - - .text - - /* Values to program into memory controller registers */ -tbl: .long MCCR1, MCCR1VAL - .long MCCR2, CONFIG_SYS_REFINT << MCCR2_REFINT_SHIFT - .long MCCR3 - .long (((CONFIG_SYS_BSTOPRE & 0x00f0) >> 4) << MCCR3_BSTOPRE2TO5_SHIFT) | \ - (CONFIG_SYS_REFREC << MCCR3_REFREC_SHIFT) | \ - (CONFIG_SYS_RDLAT << MCCR3_RDLAT_SHIFT) - .long MCCR4 - .long (CONFIG_SYS_PRETOACT << MCCR4_PRETOACT_SHIFT) | (CONFIG_SYS_ACTTOPRE << MCCR4_ACTTOPRE_SHIFT) | \ - (CONFIG_SYS_REGISTERD_TYPE_BUFFER << 20) | \ - (((CONFIG_SYS_BSTOPRE & 0x0300) >> 8) << MCCR4_BSTOPRE0TO1_SHIFT ) | \ - ((CONFIG_SYS_SDMODE_CAS_LAT << 4) | (CONFIG_SYS_SDMODE_WRAP << 3) | \ - (CONFIG_SYS_SDMODE_BURSTLEN) << MCCR4_SDMODE_SHIFT) | \ - (CONFIG_SYS_ACTTORW << MCCR4_ACTTORW_SHIFT) | \ - ((CONFIG_SYS_BSTOPRE & 0x000f) << MCCR4_BSTOPRE6TO9_SHIFT ) - .long MSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR1 - .long (((CONFIG_SYS_BANK0_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMSAR2 - .long (((CONFIG_SYS_BANK4_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_START & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR1 - .long (((CONFIG_SYS_BANK0_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK1_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK2_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK3_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 24) - .long MEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 16) | \ - (((CONFIG_SYS_BANK7_END & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT) << 24) - .long EMEAR2 - .long (((CONFIG_SYS_BANK4_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 0) | \ - (((CONFIG_SYS_BANK5_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT) << 8) | \ - (((CONFIG_SYS_BANK6_END & MICR_EADDR_MASK) >> MICR_EADDR_SHIFT)
[U-Boot] [PATCH] board: ppmc8260: delete an unused source file
Signed-off-by: Masahiro Yamada Cc: Brad Kemp --- board/ppmc8260/strataflash.c | 736 --- 1 file changed, 736 deletions(-) delete mode 100644 board/ppmc8260/strataflash.c diff --git a/board/ppmc8260/strataflash.c b/board/ppmc8260/strataflash.c deleted file mode 100644 index ea3c42e..000 --- a/board/ppmc8260/strataflash.c +++ /dev/null @@ -1,736 +0,0 @@ -/* - * (C) Copyright 2002 - * Brad Kemp, Seranoa Networks, brad.k...@seranoa.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include -#include -#include - -#undef DEBUG_FLASH -/* - * This file implements a Common Flash Interface (CFI) driver for U-Boot. - * The width of the port and the width of the chips are determined at initialization. - * These widths are used to calculate the address for access CFI data structures. - * It has been tested on an Intel Strataflash implementation. - * - * References - * JEDEC Standard JESD68 - Common Flash Interface (CFI) - * JEDEC Standard JEP137-A Common Flash Interface (CFI) ID Codes - * Intel Application Note 646 Common Flash Interface (CFI) and Command Sets - * Intel 290667-008 3 Volt Intel StrataFlash Memory datasheet - * - * TODO - * Use Primary Extended Query table (PRI) and Alternate Algorithm Query Table (ALT) to determine if protection is available - * Add support for other command sets Use the PRI and ALT to determine command set - * Verify erase and program timeouts. - */ - -#define FLASH_CMD_CFI 0x98 -#define FLASH_CMD_READ_ID 0x90 -#define FLASH_CMD_RESET0xff -#define FLASH_CMD_BLOCK_ERASE 0x20 -#define FLASH_CMD_ERASE_CONFIRM0xD0 -#define FLASH_CMD_WRITE0x40 -#define FLASH_CMD_PROTECT 0x60 -#define FLASH_CMD_PROTECT_SET 0x01 -#define FLASH_CMD_PROTECT_CLEAR0xD0 -#define FLASH_CMD_CLEAR_STATUS 0x50 -#define FLASH_CMD_WRITE_TO_BUFFER 0xE8 -#define FLASH_CMD_WRITE_BUFFER_CONFIRM 0xD0 - -#define FLASH_STATUS_DONE 0x80 -#define FLASH_STATUS_ESS 0x40 -#define FLASH_STATUS_ECLBS 0x20 -#define FLASH_STATUS_PSLBS 0x10 -#define FLASH_STATUS_VPENS 0x08 -#define FLASH_STATUS_PSS 0x04 -#define FLASH_STATUS_DPS 0x02 -#define FLASH_STATUS_R 0x01 -#define FLASH_STATUS_PROTECT 0x01 - -#define FLASH_OFFSET_CFI 0x55 -#define FLASH_OFFSET_CFI_RESP 0x10 -#define FLASH_OFFSET_WTOUT 0x1F -#define FLASH_OFFSET_WBTOUT 0x20 -#define FLASH_OFFSET_ETOUT 0x21 -#define FLASH_OFFSET_CETOUT 0x22 -#define FLASH_OFFSET_WMAX_TOUT 0x23 -#define FLASH_OFFSET_WBMAX_TOUT 0x24 -#define FLASH_OFFSET_EMAX_TOUT 0x25 -#define FLASH_OFFSET_CEMAX_TOUT 0x26 -#define FLASH_OFFSET_SIZE 0x27 -#define FLASH_OFFSET_INTERFACE 0x28 -#define FLASH_OFFSET_BUFFER_SIZE0x2A -#define FLASH_OFFSET_NUM_ERASE_REGIONS 0x2C -#define FLASH_OFFSET_ERASE_REGIONS 0x2D -#define FLASH_OFFSET_PROTECT 0x02 -#define FLASH_OFFSET_USER_PROTECTION0x85 -#define FLASH_OFFSET_INTEL_PROTECTION 0x81 - - -#define FLASH_MAN_CFI 0x0100 - - -typedef union { - unsigned char c; - unsigned short w; - unsigned long l; -} cfiword_t; - -typedef union { - unsigned char * cp; - unsigned short *wp; - unsigned long *lp; -} cfiptr_t; - -#define NUM_ERASE_REGIONS 4 - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - - -/*--- - * Functions - */ - - -static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c); -static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf); -static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd); -static int flash_isequal(flash_info_t * info, int sect, uchar offset, uchar cmd); -static int flash_isset(flash_info_t * info, int sect, uchar offset, uchar cmd); -static int flash_detect_cfi(flash_info_t * info); -static ulong flash_get_size (ulong base, int banknum); -static int flash_write_cfiword (flash_info_t *info, ulong dest, cfiword_t cword); -static int flash_full_status_check(flash_info_t * info, ulong sector, ulong tout, char * prompt); -#ifdef CONFIG_SYS_FLASH_USE_BUFFER_WRITE -static int flash_write_cfibuffer(flash_info_t * info, ulong dest, uchar * cp, int len); -#endif -/*--- - * create an address based on the offset and the port width - */ -inline uchar * flash_make_addr(flash_info_t * info, int sect, int offset) -{ - return ((uchar *)(info->start[sect] + (offset * info->portwidth))); -} -/*--- - * read a character at a port
[U-Boot] [PATCH] sh: delete an unused source file
Signed-off-by: Masahiro Yamada Cc: Nobuhiro Iwamatsu --- arch/sh/cpu/sh2/cache.c | 96 - 1 file changed, 96 deletions(-) delete mode 100644 arch/sh/cpu/sh2/cache.c diff --git a/arch/sh/cpu/sh2/cache.c b/arch/sh/cpu/sh2/cache.c deleted file mode 100644 index 8093e98..000 --- a/arch/sh/cpu/sh2/cache.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * (C) Copyright 2007 - * Yoshihiro Shimoda - * - * Copyright (C) 2007, 2008 Nobobuhiro Iwamatsu - * Copyright (C) 2008 Renesas Solutions Corp. - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include -#include -#include -#include - -/* - * Jump to P2 area. - * When handling TLB or caches, we need to do it from P2 area. - */ -#define jump_to_P2() \ -do { \ - unsigned long __dummy; \ - __asm__ __volatile__( \ - "mov.l 1f, %0\n\t" \ - "or %1, %0\n\t" \ - "jmp@%0\n\t"\ - " nop\n\t" \ - ".balign 4\n" \ - "1: .long 2f\n" \ - "2:"\ - : "=&r" (__dummy) \ - : "r" (0x2000));\ -} while (0) - -/* - * Back to P1 area. - */ -#define back_to_P1() \ -do { \ - unsigned long __dummy; \ - __asm__ __volatile__( \ - "nop;nop;nop;nop;nop;nop;nop\n\t" \ - "mov.l 1f, %0\n\t" \ - "jmp@%0\n\t"\ - " nop\n\t" \ - ".balign 4\n" \ - "1: .long 2f\n" \ - "2:"\ - : "=&r" (__dummy)); \ -} while (0) - -#define CACHE_VALID1 -#define CACHE_UPDATED 2 - -static inline void cache_wback_all(void) -{ - unsigned long addr, data, i, j; - - jump_to_P2(); - for (i = 0; i < CACHE_OC_NUM_ENTRIES; i++) { - for (j = 0; j < CACHE_OC_NUM_WAYS; j++) { - addr = CACHE_OC_ADDRESS_ARRAY - | (j << CACHE_OC_WAY_SHIFT) - | (i << CACHE_OC_ENTRY_SHIFT); - data = inl(addr); - if (data & CACHE_UPDATED) { - data &= ~CACHE_UPDATED; - outl(data, addr); - } - } - } - back_to_P1(); -} - - -#define CACHE_ENABLE 0 -#define CACHE_DISABLE 1 - -int cache_control(unsigned int cmd) -{ - unsigned long ccr; - - jump_to_P2(); - ccr = inl(CCR); - - if (ccr & CCR_CACHE_ENABLE) - cache_wback_all(); - - if (cmd == CACHE_DISABLE) - outl(CCR_CACHE_STOP, CCR); - else - outl(CCR_CACHE_INIT, CCR); - back_to_P1(); - - return 0; -} -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc: mpc8xx: delete an unused source file
Signed-off-by: Masahiro Yamada Cc: Wolfgang Denk --- arch/powerpc/cpu/mpc8xx/wlkbd.c | 20 1 file changed, 20 deletions(-) delete mode 100644 arch/powerpc/cpu/mpc8xx/wlkbd.c diff --git a/arch/powerpc/cpu/mpc8xx/wlkbd.c b/arch/powerpc/cpu/mpc8xx/wlkbd.c deleted file mode 100644 index 3a41c2f..000 --- a/arch/powerpc/cpu/mpc8xx/wlkbd.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * (C) Copyright 2000 - * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arse...@tin.it - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include -#include - -#ifdef CONFIG_WL_4PPM_KEYBOARD - -/* WIP: Wireless keyboard on SMC - */ -intdrv_wlkbd_init (void) -{ -return 0 ; -} - -#endif /* CONFIG_WL_4PPM_KEYBOARD */ -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] board: altera: delete unused source files
Signed-off-by: Masahiro Yamada Cc: Chin Liang See Cc: Dinh Nguyen Cc: Scott McNutt --- board/altera/common/AMDLV065D.c | 174 -- board/altera/common/flash.c | 180 2 files changed, 354 deletions(-) delete mode 100644 board/altera/common/AMDLV065D.c delete mode 100644 board/altera/common/flash.c diff --git a/board/altera/common/AMDLV065D.c b/board/altera/common/AMDLV065D.c deleted file mode 100644 index eaa6b98..000 --- a/board/altera/common/AMDLV065D.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * (C) Copyright 2000-2004 - * Wolfgang Denk, DENX Software Engineering, w...@denx.de. - * - * SPDX-License-Identifier:GPL-2.0+ - */ - - -#include -#if defined(CONFIG_NIOS) -#include -#else -#include -#endif - -#define SECTSZ (64 * 1024) -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; - -/*--*/ -unsigned long flash_init (void) -{ - int i; - unsigned long addr; - flash_info_t *fli = &flash_info[0]; - - fli->size = CONFIG_SYS_FLASH_SIZE; - fli->sector_count = CONFIG_SYS_MAX_FLASH_SECT; - fli->flash_id = FLASH_MAN_AMD + FLASH_AMDLV065D; - - addr = CONFIG_SYS_FLASH_BASE; - for (i = 0; i < fli->sector_count; ++i) { - fli->start[i] = addr; - addr += SECTSZ; - fli->protect[i] = 1; - } - - return (CONFIG_SYS_FLASH_SIZE); -} -/**/ -void flash_print_info (flash_info_t * info) -{ - int i, k; - int erased; - unsigned long *addr; - - printf (" Size: %ld KB in %d Sectors\n", - info->size >> 10, info->sector_count); - printf (" Sector Start Addresses:"); - for (i = 0; i < info->sector_count; ++i) { - - /* Check if whole sector is erased */ - erased = 1; - addr = (unsigned long *) info->start[i]; - for (k = 0; k < SECTSZ/sizeof(unsigned long); k++) { - if ( readl(addr++) != (unsigned long)-1) { - erased = 0; - break; - } - } - - /* Print the info */ - if ((i % 5) == 0) - printf ("\n "); - printf (" %08lX%s%s", - info->start[i], - erased ? " E" : " ", - info->protect[i] ? "RO " : " "); - } - printf ("\n"); -} - -/*---*/ - - -int flash_erase (flash_info_t * info, int s_first, int s_last) -{ - unsigned char *addr = (unsigned char *) info->start[0]; - unsigned char *addr2; - int prot, sect; - ulong start; - - /* Some sanity checking */ - if ((s_first < 0) || (s_first > s_last)) { - printf ("- no sectors to erase\n"); - return 1; - } - - prot = 0; - for (sect = s_first; sect <= s_last; ++sect) { - if (info->protect[sect]) { - prot++; - } - } - if (prot) { - printf ("- Warning: %d protected sectors will not be erased!\n", - prot); - } else { - printf ("\n"); - } - - /* It's ok to erase multiple sectors provided we don't delay more -* than 50 usec between cmds ... at which point the erase time-out -* occurs. So don't go and put printf() calls in the loop ... it -* won't be very helpful ;-) -*/ - for (sect = s_first; sect <= s_last; sect++) { - if (info->protect[sect] == 0) { /* not protected */ - addr2 = (unsigned char *) info->start[sect]; - writeb (0xaa, addr); - writeb (0x55, addr); - writeb (0x80, addr); - writeb (0xaa, addr); - writeb (0x55, addr); - writeb (0x30, addr2); - /* Now just wait for 0xff & provide some user -* feedback while we wait. -*/ - start = get_timer (0); - while ( readb (addr2) != 0xff) { - udelay (1000 * 1000); - putc ('.'); - if (get_timer (start) > CONFIG_SYS_FLASH_ERASE_TOUT) { - printf ("timeout\n"); - return 1; - } - } - } - } - printf ("\n"); - return 0; -} - -/*--- - * Copy memory to flash, returns: - *
[U-Boot] [PATCH] board: evb64260: delete an unused source file
Signed-off-by: Masahiro Yamada Cc: Wolfgang Denk Cc: Nye Liu --- board/evb64260/ecctest.c | 111 --- 1 file changed, 111 deletions(-) delete mode 100644 board/evb64260/ecctest.c diff --git a/board/evb64260/ecctest.c b/board/evb64260/ecctest.c deleted file mode 100644 index 5d3679a..000 --- a/board/evb64260/ecctest.c +++ /dev/null @@ -1,111 +0,0 @@ -indent: Standard input:27: Warning:old style assignment ambiguity in "=*". Assuming "= *" - -#ifdef ECC_TEST -static inline void ecc_off (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) &= ~0x0020; -} - -static inline void ecc_on (void) -{ - *(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) |= 0x0020; -} - -static int putshex (const char *buf, int len) -{ - int i; - - for (i = 0; i < len; i++) { - printf ("%02x", buf[i]); - } - return 0; -} - -static int char_memcpy (void *d, const void *s, int len) -{ - int i; - char *cd = d; - const char *cs = s; - - for (i = 0; i < len; i++) { - *(cd++) = *(cs++); - } - return 0; -} - -static int memory_test (char *buf) -{ - const char src[][16] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, - {0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, -0x02, 0x02, 0x02, 0x02, 0x02, 0x02}, - {0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, -0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, - {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08}, - {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, - {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20}, - {0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, - {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, -0x80, 0x80, 0x80, 0x80, 0x80, 0x80}, - {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, -0x55, 0x55, 0x55, 0x55, 0x55, 0x55}, - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, -0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, - {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - }; - const int foo[] = { 0 }; - int i, j, a; - - printf ("\ntest @ %d %p\n", foo[0], buf); - for (i = 0; i < 12; i++) { - for (a = 0; a < 8; a++) { - const char *s = src[i] + a; - int align = (unsigned) (s) & 0x7; - - /* ecc_off(); */ - memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - /* ecc_off(); */ - char_memcpy (buf, s, 8); - /* ecc_on(); */ - putshex (s, 8); - if (memcmp (buf, s, 8)) { - putc ('\n'); - putshex (buf, 8); - printf (" [FAIL] (%p) align=%d\n", s, align); - for (j = 0; j < 8; j++) { - s[j] == buf[j] ? puts (" ") : - printf ("%02x", - (s[j]) ^ (buf[j])); - } - putc ('\n'); - } else { - printf (" [PASS] (%p) align=%d\n", s, align); - } - } - } - - return 0; -} -#endif -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] board: samsung: delete unused source files
Signed-off-by: Masahiro Yamada Cc: Mateusz Zalega Cc: Minkyu Kang --- board/samsung/goni/mem_setup.S | 249 - board/samsung/smdkc100/mem_setup.S | 181 --- 2 files changed, 430 deletions(-) delete mode 100644 board/samsung/goni/mem_setup.S delete mode 100644 board/samsung/smdkc100/mem_setup.S diff --git a/board/samsung/goni/mem_setup.S b/board/samsung/goni/mem_setup.S deleted file mode 100644 index 5dc980c..000 --- a/board/samsung/goni/mem_setup.S +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (C) 2009 Samsung Electrnoics - * Minkyu Kang - * Kyungmin Park - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include - - .globl mem_ctrl_asm_init -mem_ctrl_asm_init: - cmp r7, r8 - - ldreq r0, =S5PC100_DMC_BASE @ 0xE600 - ldrne r0, =S5PC110_DMC0_BASE @ 0xF000 - ldrne r6, =S5PC110_DMC1_BASE @ 0xF140 - - /* DLL parameter setting */ - ldr r1, =0x50101000 - str r1, [r0, #0x018]@ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018]@ PHYCONTROL0_OFFSET - ldr r1, =0x00f4 - str r1, [r0, #0x01C]@ PHYCONTROL1_OFFSET - strne r1, [r6, #0x01C]@ PHYCONTROL1_OFFSET - ldreq r1, =0x0 - streq r1, [r0, #0x020]@ PHYCONTROL2_OFFSET - - /* DLL on */ - ldr r1, =0x50101002 - str r1, [r0, #0x018]@ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018]@ PHYCONTROL0_OFFSET - - /* DLL start */ - ldr r1, =0x50101003 - str r1, [r0, #0x018]@ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018]@ PHYCONTROL0_OFFSET - - mov r2, #0x4000 -wait: subsr2, r2, #0x1 - cmp r2, #0x0 - bne wait - - cmp r7, r8 - /* Force value locking for DLL off */ - str r1, [r0, #0x018]@ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018]@ PHYCONTROL0_OFFSET - - /* DLL off */ - ldr r1, =0x50101009 - str r1, [r0, #0x018]@ PHYCONTROL0_OFFSET - strne r1, [r6, #0x018]@ PHYCONTROL0_OFFSET - - /* auto refresh off */ - ldr r1, =0xff001010 | (1 << 7) - ldr r2, =0xff001010 | (1 << 7) - str r1, [r0, #0x000]@ CONCONTROL_OFFSET - strne r2, [r6, #0x000]@ CONCONTROL_OFFSET - - /* -* Burst Length 4, 2 chips, 32-bit, LPDDR -* OFF: dynamic self refresh, force precharge, dynamic power down off -*/ - ldr r1, =0x00212100 - ldr r2, =0x00212100 - str r1, [r0, #0x004]@ MEMCONTROL_OFFSET - strne r2, [r6, #0x004]@ MEMCONTROL_OFFSET - - /* -* Note: -* If Bank0 has Mobile RAM we place it at 0x3800' (s5pc100 only) -* So finally Bank1 OneDRAM should address start at at 0x3000' -*/ - - /* -* DMC0: CS0 : S5PC100/S5PC110 -* 0x30 -> 0x3000 -* 0xf8 -> 0x37FF -* [15:12] 0: Linear -* [11:8 ] 2: 9 bits -* [ 7:4 ] 2: 14 bits -* [ 3:0 ] 2: 4 banks -*/ - ldr r3, =0x30f80222 - ldr r4, =0x40f00222 -swap_memory: - str r3, [r0, #0x008]@ MEMCONFIG0_OFFSET - str r4, [r0, #0x00C]@ dummy write - - /* -* DMC1: CS0 : S5PC110 -* 0x40 -> 0x4000 -* 0xf8 -> 0x47FF (1Gib) -* 0x40 -> 0x4000 -* 0xf0 -> 0x4FFF (2Gib) -* [15:12] 0: Linear -* [11:8 ] 2: 9 bits - Col (1Gib) -* [11:8 ] 3: 10 bits - Col (2Gib) -* [ 7:4 ] 2: 14 bits - Row -* [ 3:0 ] 2: 4 banks -*/ - /* Default : 2GiB */ - ldr r4, =0x40f01322 @ 2Gib: MCP B - ldr r5, =0x50f81312 @ dummy: MCP D - cmp r9, #1 - ldreq r4, =0x40f81222 @ 1Gib: MCP A - cmp r9, #3 - ldreq r5, =0x50f81312 @ 2Gib + 1Gib: MCP D - cmp r9, #4 - ldreq r5, =0x50f01312 @ 2Gib + 2Gib: MCP E - - cmp r7, r8 - strne r4, [r6, #0x008]@ MEMCONFIG0_OFFSET - strne r5, [r6, #0x00C]@ MEMCONFIG1_OFFSET - - /* -* DMC0: CS1: S5PC100 -* 0x38 -> 0x3800 -* 0xf8 -> 0x3fFF -* [15:12] 0: Linear -* [11:8 ] 2: 9 bits -* [ 7:4 ] 2: 14 bits -* [ 3:0 ] 2: 4 banks -
[U-Boot] [PATCH] drivers: i2c: delete an unused source file
Signed-off-by: Masahiro Yamada Cc: Heiko Schocher --- drivers/i2c/adi_i2c.c | 387 -- 1 file changed, 387 deletions(-) delete mode 100644 drivers/i2c/adi_i2c.c diff --git a/drivers/i2c/adi_i2c.c b/drivers/i2c/adi_i2c.c deleted file mode 100644 index 675f417..000 --- a/drivers/i2c/adi_i2c.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * i2c.c - driver for ADI TWI/I2C - * - * Copyright (c) 2006-2013 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ - -#include -#include - -#include -#include -#include - -/* Every register is 32bit aligned, but only 16bits in size */ -#define ureg(name) u16 name; u16 __pad_##name; -struct twi_regs { - ureg(clkdiv); - ureg(control); - ureg(slave_ctl); - ureg(slave_stat); - ureg(slave_addr); - ureg(master_ctl); - ureg(master_stat); - ureg(master_addr); - ureg(int_stat); - ureg(int_mask); - ureg(fifo_ctl); - ureg(fifo_stat); - char __pad[0x50]; - ureg(xmt_data8); - ureg(xmt_data16); - ureg(rcv_data8); - ureg(rcv_data16); -}; -#undef ureg - -/* U-Boot I2C framework allows only one active device at a time. */ -#ifdef TWI_CLKDIV -#define TWI0_CLKDIV TWI_CLKDIV -#endif -static struct twi_regs *twi = (void *)TWI0_CLKDIV; - -#ifdef DEBUG -# define dmemset(s, c, n) memset(s, c, n) -#else -# define dmemset(s, c, n) -#endif -#define debugi(fmt, args...) \ - debug( \ - "MSTAT:0x%03x FSTAT:0x%x ISTAT:0x%02x\t%-20s:%-3i: " fmt "\n", \ - twi->master_stat, twi->fifo_stat, twi->int_stat, \ - __func__, __LINE__, ## args) - -#ifdef CONFIG_TWICLK_KHZ -# error do not define CONFIG_TWICLK_KHZ ... use CONFIG_SYS_I2C_SPEED -#endif - -/* - * The way speed is changed into duty often results in integer truncation - * with 50% duty, so we'll force rounding up to the next duty by adding 1 - * to the max. In practice this will get us a speed of something like - * 385 KHz. The other limit is easy to handle as it is only 8 bits. - */ -#define I2C_SPEED_MAX 40 -#define I2C_SPEED_TO_DUTY(speed) (500 / (speed)) -#define I2C_DUTY_MAX (I2C_SPEED_TO_DUTY(I2C_SPEED_MAX) + 1) -#define I2C_DUTY_MIN 0xff /* 8 bit limited */ -#define SYS_I2C_DUTY I2C_SPEED_TO_DUTY(CONFIG_SYS_I2C_SPEED) -/* Note: duty is inverse of speed, so the comparisons below are correct */ -#if SYS_I2C_DUTY < I2C_DUTY_MAX || SYS_I2C_DUTY > I2C_DUTY_MIN -# error "The Blackfin I2C hardware can only operate 20KHz - 400KHz" -#endif - -/* All transfers are described by this data structure */ -struct i2c_msg { - u8 flags; -#define I2C_M_COMBO0x4 -#define I2C_M_STOP 0x2 -#define I2C_M_READ 0x1 - int len;/* msg length */ - u8 *buf;/* pointer to msg data */ - int alen; /* addr length */ - u8 *abuf; /* addr buffer */ -}; - -/* Allow msec timeout per ~byte transfer */ -#define I2C_TIMEOUT 10 - -/** - * wait_for_completion - manage the actual i2c transfer - * @msg: the i2c msg - */ -static int wait_for_completion(struct i2c_msg *msg) -{ - u16 int_stat, ctl; - ulong timebase = get_timer(0); - - do { - int_stat = readw(&twi->int_stat); - - if (int_stat & XMTSERV) { - debugi("processing XMTSERV"); - writew(XMTSERV, &twi->int_stat); - if (msg->alen) { - writew(*(msg->abuf++), &twi->xmt_data8); - --msg->alen; - } else if (!(msg->flags & I2C_M_COMBO) && msg->len) { - writew(*(msg->buf++), &twi->xmt_data8); - --msg->len; - } else { - ctl = readw(&twi->master_ctl); - if (msg->flags & I2C_M_COMBO) - writew(ctl | RSTART | MDIR, - &twi->master_ctl); - else - writew(ctl | STOP, &twi->master_ctl); - } - } - if (int_stat & RCVSERV) { - debugi("processing RCVSERV"); - writew(RCVSERV, &twi->int_stat); - if (msg->len) { - *(msg->buf++) = readw(&twi->rcv_data8); - --msg->len; - } else if (msg->flags & I2C_M_STOP) { - ctl = readw(&twi->master_ctl); - writew(ctl | STOP, &twi->master_ctl); - } - } - if (int_stat & MERR) { - debugi("processing MERR"); -
[U-Boot] [PATCH] floppy: delete unused files
Signed-off-by: Masahiro Yamada --- common/cmd_fdos.c | 124 -- include/fdc.h | 21 - 2 files changed, 145 deletions(-) delete mode 100644 common/cmd_fdos.c delete mode 100644 include/fdc.h diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c deleted file mode 100644 index 6930325..000 --- a/common/cmd_fdos.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * (C) Copyright 2002 - * Stäubli Faverges - - * Pierre AUBERT p.aub...@staubli.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -/* - * Dos floppy support - */ - -#include -#include -#include -#include - -/*- - * do_fdosboot -- - *- - */ -int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ -char *name; -char *ep; -int size; -int drive = CONFIG_SYS_FDC_DRIVE_NUMBER; - -/* pre-set load_addr */ -if ((ep = getenv("loadaddr")) != NULL) { - load_addr = simple_strtoul(ep, NULL, 16); -} - -/* pre-set Boot file name */ -if ((name = getenv("bootfile")) == NULL) { - name = "uImage"; -} - -switch (argc) { -case 1: - break; -case 2: - /* only one arg - accept two forms: -* just load address, or just boot file name. -* The latter form must be written "filename" here. -*/ - if (argv[1][0] == '"') {/* just boot filename */ - name = argv [1]; - } else {/* load address */ - load_addr = simple_strtoul(argv[1], NULL, 16); - } - break; -case 3: - load_addr = simple_strtoul(argv[1], NULL, 16); - name = argv [2]; - break; -default: - return CMD_RET_USAGE; -} - -/* Init physical layer */ -if (!fdc_fdos_init (drive)) { - return (-1); -} - -/* Open file */ -if (dos_open (name) < 0) { - printf ("Unable to open %s\n", name); - return 1; -} -if ((size = dos_read (load_addr)) < 0) { - printf ("boot error\n"); - return 1; -} -flush_cache (load_addr, size); - -setenv_hex("filesize", size); - -printf("Floppy DOS load complete: %d bytes loaded to 0x%lx\n", - size, load_addr); - -return bootm_maybe_autostart(cmdtp, argv[0]); -} - -/*- - * do_fdosls -- - *- - */ -int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ -char *path = ""; -int drive = CONFIG_SYS_FDC_DRIVE_NUMBER; - -switch (argc) { -case 1: - break; -case 2: - path = argv [1]; - break; -} - -/* Init physical layer */ -if (!fdc_fdos_init (drive)) { - return (-1); -} -/* Open directory*/ -if (dos_open (path) < 0) { - printf ("Unable to open %s\n", path); - return 1; -} -return (dos_dir ()); -} - -U_BOOT_CMD( - fdosboot, 3, 0, do_fdosboot, - "boot from a dos floppy file", - "[loadAddr] [filename]" -); - -U_BOOT_CMD( - fdosls, 2, 0, do_fdosls, - "list files in a directory", - "[directory]" -); diff --git a/include/fdc.h b/include/fdc.h deleted file mode 100644 index 207b0e2..000 --- a/include/fdc.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * (C) Copyright 2002 - * Stäubli Faverges - - * Pierre AUBERT p.aub...@staubli.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#ifndef _FDC_H_ -#define _FDC_H_ - -/* Functions prototype */ -int fdc_fdos_init (int drive); -int fdc_fdos_seek (int where); -int fdc_fdos_read (void *buffer, int len); - -int dos_open(char *name); -int dos_read (ulong addr); -int dos_dir (void); - -#endif -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cosmetic: README.scrapyard: fix false removed date and commit
Describe removed date in the form of -MM-DD, not -DD-MM. And wrong commit hash also should be fixed. Signed-off-by: Masahiro Yamada Cc: Marek Vasut --- doc/README.scrapyard | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 6abefd5..e49de54 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -49,10 +49,10 @@ tb0229 mipsmips32 3f3110d 2011-12-12 rmu powerpc MPC850 fb82fd7 2011-12-07 Wolfgang Denk OXC powerpc MPC8240309a292 2011-12-07 BAB7xx powerpc MPC740/MPC750 c53043b 2011-12-07 Frank Gottschling -xm250arm pxac746cdd 2011-25-11 -pleb2arm pxab185a1c 2011-25-11 -cradle arm pxa4e24f8a 2011-25-11 Kyle Harris -cerf250 arm pxaa3f1241 2011-25-11 Prakash Kumar +xm250arm pxac477d72 2011-11-25 +pleb2arm pxad299173 2011-11-25 +cradle arm pxa00c4aca 2011-11-25 Kyle Harris +cerf250 arm pxaf13eba6 2011-11-25 Prakash Kumar mpq101 powerpc mpc85xxe877fab 2011-10-23 Alex Dubov ixdpg425 arm ixp0ca8eb7 2011-09-22 Stefan Roese ixdp425 arm ixp0ca8eb7 2011-09-22 Kyle Harris -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cosmetic: README.scrapyard: sort in reverse chronological order
Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 7d67033..6abefd5 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -26,11 +26,15 @@ pdnb3arm ixp304db0b 2013-09-24 Stefan Roese scpu arm ixp304db0b 2013-09-24 Stefan Roese omap1510inn arm arm925t0610a16 2013-09-23 Kshitij Gupta CANBTpowerpc 405CR fb8f4fd 2013-08-07 Matthias Fuchs +omap2420h4 arm omap24xx 7f5eef9 2013-06-04 Richard Woodruff Alaska8220 powerpc mpc8220d6ed322 2013-05-11 Yukon8220powerpc mpc8220d6ed322 2013-05-11 sorcery powerpc mpc8220d6ed322 2013-05-11 smdk6400 arm arm117652587f1 2013-04-12 Zhong Hongbo ns9750devarm arm926ejs 4cfc611 2013-02-28 Markus Pietrek +eNET x86 x867e8c53d 2013-02-14 Graeme Russ +PCIPPC2 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk +PCIPPC6 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk AMX860 powerpc mpc860 1b0757e 2012-10-28 Wolfgang Denk c2monpowerpc mpc855 1b0757e 2012-10-28 Wolfgang Denk EP88xpowerpc mpc885 1b0757e 2012-10-28 @@ -87,13 +91,13 @@ B2 arm s3c44b05dcf536 2011-07-16 Andrea Scian armadilloarm arm720tbe28857 2011-07-16 Rowel Atienza assabet arm sa1100 c91e90d 2011-07-16 George G. Davis trab arm S3C2400566e5cf 2011-05-01 Gary Jennejohn -xsengine ARM PXA2xx 4262a7c 2010-10-20 -wepep250 ARM PXA2xx 7369478 2010-10-20 Peter Figuli -deltaARM PXA2xx 75e2035 2010-10-20 mp2usb ARM AT91RM2900 ee986e2 2011-01-25 Eric Bénard barcopowerpc MPC8245afaa27b 2010-11-23 Marc Leeman ERIC powerpc 405GP d9ba451 2010-11-21 Swen Anderson VoVPN-GW_100MHz powerpc MPC826026fe3d2 2010-10-24 Juergen Selent +xsengine ARM PXA2xx 4262a7c 2010-10-20 +wepep250 ARM PXA2xx 7369478 2010-10-20 Peter Figuli +deltaARM PXA2xx 75e2035 2010-10-20 NC650powerpc MPC852 333d86d 2010-10-19 Wolfgang Denk CP850powerpc MPC852 333d86d 2010-10-19 Wolfgang Denk logodl ARM PXA2xx 059e778 2010-10-18 August Hoeraendl @@ -110,7 +114,3 @@ MVS1 powerpc MPC823 306620b 2008-08-26 Andre Schwar adsvix ARM PXA27x 7610db1 2008-07-30 Adrian Filipi R5200ColdFire- 48ead7a 2008-03-31 Zachary P. Landau CPCI440 powerpc 440GP b568fd2 2007-12-27 Matthias Fuchs -PCIPPC2 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk -PCIPPC6 powerpc MPC740/MPC750 - - Wolfgang Denk -omap2420h4 arm omap24xx - 2013-06-04 Richard Woodruff -eNET x86 x867e8c53d 2013-02-14 Graeme Russ -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-sh/master
Hi Nobuhiro Could you fix error & warning in sh_mmcif.c, please? drivers/mmc/sh_mmcif.c:583:43: error: expected '}' before ';' token drivers/mmc/sh_mmcif.c: In function 'mmcif_mmc_init': drivers/mmc/sh_mmcif.c:591:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Enabling uart 3 in arndale
Dear tomaz Waiting for your reply... On 28-Mar-2014, at 3:12 pm, armdev wrote: > Dear Tomasz, > > On 16-Mar-2014, at 6:23 pm, Tomasz Figa wrote: > >> Hi, >> >> On 14.03.2014 09:04, armdev wrote: >>> Hi, >>> >>> We are trying to enable the UART3 on COM18 pins of arndale board. The UART3 >>> RXD and TXD are on pins 2 and 4 which as per the base board specification >>> is connected as >>> >>> XuRXD3 : UART_3_RXD/GPA1[4] : 2 >>> XuTXD3 : UART_3_TXD/GPA1[5] : 4 >>> >>> As per the public reference manual of exynos 5250, there is a register >>> GPACON (0x1140_) >>> Setting GPACON |= 0x0010_ should enable the pins, but I am not able to >>> see any output on UART3. >>> >>> Can you please suggest what is the right procedure >> >> The register is GPA1CON and its GPA1CON[4] and [5] bit fields need both to >> be set to 0x2 - see Pad Control chapter of Exynos5250 public datasheet. Also >> GPA1PUD should be reconfigured to disable default pull-down on both pins, >> again you can find details of the register in the datasheet. >> >> Best regards, >> Tomasz > > Based on the steps provided, we are still not able to get some output on > UART3 simultaneously with UART2. > Can you please help us find out what we are missing. > > On the current u-boot, Following was the observation and steps to enable > UART3 on arndale > > Observations / Questions > —— > a) The board has the default UART set to UART2 which is at 0x12c2, while > the include/configs/arndale.h has the UART_OFFSET set to 0x01. > Shouldn’t it be set to 0x2 ? > > b) board_uart_init in board/samsung/arndale/arndale.c is configuring all the > uarts, > Clocks would be set properly for all 4 uarts ? > > Steps / Code Modified > —— > a) GPAICON[4] and [5] set to 0x2 in board/samsung/arndale/arndale.c > b) GPA1PUD [4] and [5] set to 0. > > diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c > index 9efc355..4fb291e 100644 > --- a/board/samsung/arndale/arndale.c > +++ b/board/samsung/arndale/arndale.c > @@ -102,12 +102,18 @@ static int board_uart_init(void) > int board_early_init_f(void) > { > int err; > - > + volatile unsigned int *gpa1con = (volatile unsigned int *)0x11400020; > + volatile unsigned int *gpa1pud = (volatile unsigned int *)0x11400028; > err = board_uart_init(); > if (err) { > debug("UART init failed\n"); > return err; > } > + serial_init_dev(2); > + serial_setbrg_dev(2); > + *gpa1con |= 0x0022; > + *gpa1pud &= 0xf0ff; > + > return err; > } > #endif > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please fix warnings in NIOS2 boards
Hi. When I build NIOS2 boards, warnings are displayed. common/cmd_test.c: In function `do_test': common/cmd_test.c:66: warning: 'op' might be used uninitialized in this function common/cmd_test.c:66: warning: 'adv' might be used uninitialized in this function Could anybody fix them? Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] All Sparc boards are broken
Hi Daniel, All Sparc boards are broken because get_tbclk() func is missing. lib/built-in.o: In function `tick_to_time': u-boot/lib/time.c:56: undefined reference to `get_tbclk' lib/built-in.o: In function `usec_to_tick': u-boot/lib/time.c:80: undefined reference to `get_tbclk' Nothing has been done with that error since Rob Herring's common timer framework. Daniel, can you fix them? Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] sparc: consolidate CONFIG_{LEON, LEON2, LEON3} definition
Hi Tom, On Fri, 28 Mar 2014 11:42:40 -0400 Tom Rini wrote: > On Fri, Mar 28, 2014 at 11:34:49AM +0900, Masahiro Yamada wrote: > > > Hi Tom, > > > > On Thu, 27 Mar 2014 13:00:19 -0400 > > Tom Rini wrote: > > > > > On Thu, Mar 13, 2014 at 07:48:57PM +0900, Masahiro Yamada wrote: > > > > > > > CONFIG_LEON is already defined in > > > > arch/sparc/cpu/{leon2,leon3}/config.mk. > > > > Remove the redundant definition in board header files. > > > > > > > > All leon3 boards define CONFIG_LEON3 in board header files. > > > > Move the definition to arch/sparc/cpu/leon3/config.mk. > > > > > > > > CONFIG_LEON2 can be move to arch/sparc/cpu/leon2/config.mk > > > > as well. > > > > > > > > Signed-off-by: Masahiro Yamada > > > > Cc: Daniel Hellstrom > > > > > > Applied to u-boot/next, thanks! > > > > Why did today's updates go to u-boot/next, not u-boot/master? > > I'm trying to slow down what's pulled in and since sparc doesn't build > for me today (unrelated to Kbuild), I figured I'd hold this one off for > the next release, while I was adding other stuff to /next anyhow. Thanks. I just wanted to be sure because u-boot/next was touched for the first time in the last one year. BTW, all Sparc boards are broken because of undefined reference to `get_tbclk'. OK. I will shout in another thread. I am using a simple way to work around this link error: Adding #define CONFIG_SYS_TIMER_RATE 0 to include/configs/gr_cpci_ax2000.h include/configs/gr_ep2s60.h include/configs/gr_xc3s_1500.h include/configs/grsim.h include/configs/grsim_leon2.h Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] tools: fix Makefile to clean-up fit_info and fit_check_sign
Hi Tom, On Fri, 28 Mar 2014 15:12:25 -0400 Tom Rini wrote: > On Fri, Mar 28, 2014 at 03:09:51PM +0900, Masahiro Yamada wrote: > > > We should avoid the description in Makefile like this > > > > ifdef CONFIG_FIT_SIGNATURE > > hostprogs-y += fit_info$(SFX) fit_check_sign$(SFX) > > endif > > > > Otherwise, fit_info and fit_check_sign would never be cleaned > > by "make clean". > > > > Cc: Heiko Schocher > > > > --- > > tools/Makefile | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/tools/Makefile b/tools/Makefile > > index c5c378c..c34df4f 100644 > > --- a/tools/Makefile > > +++ b/tools/Makefile > > @@ -60,9 +60,7 @@ hostprogs-y += mkenvimage$(SFX) > > mkenvimage$(SFX)-objs := crc32.o mkenvimage.o os_support.o > > > > hostprogs-y += dumpimage$(SFX) mkimage$(SFX) > > -ifdef CONFIG_FIT_SIGNATURE > > -hostprogs-y += fit_info$(SFX) fit_check_sign$(SFX) > > -endif > > +hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_info$(SFX) fit_check_sign$(SFX) > > > > FIT_SIG_OBJS-$(CONFIG_FIT_SIGNATURE) := image-sig.o > > # Flattened device tree objects > > What tree is this against, exactly? It's against u-boot/next because commit 6bf4ca076 and commit 29a23f9d went there. I forgot to add Signed-off-by. If you need it, I will resend it. Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request: u-boot-sh/master
Dear Tom Rini. Please pull u-boot-sh master branch. The following changes since commit 0b2da7e209f4110b7c81d578336a10330e4a4404: blackfin: mmc: Correct mmc_host_is_spi and bfin_sdh.c (2014-03-28 16:55:29 -0400) are available in the git repository at: git://git.denx.de/u-boot-sh master for you to fetch changes up to 82778e92c2816036ed79cdfb47e6eb6f6487a3f9: board: ecovec: fix USB0 clock enable (2014-03-31 10:48:02 +0900) Baruch Siach (2): board: ecovec: fix debug LEDs pin direction board: ecovec: fix USB0 clock enable board/renesas/ecovec/ecovec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- Nobuhiro Iwamatsu iwamatsu at {nigauri.org / debian.org} GPG ID: 40AD1FA6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] kbuild/makefile: allow building host tools separately
Hi Alexey, > > > > This may be the similar discussion to > > http://u-boot.10912.n7.nabble.com/U-Boot-could-not-cross-compile-u-boot-tools-td174911.html > > It looks not that relevant to me. > For example even before switching U-Boot to Kbuild it was not possible > to build host tools simply without patching sources/headers or > configuring real target. Or I might be missing something here. Sorry, I should have explained it more exactly. What I wanted you to refer is Wolfgang's comment in that thread. This part: Wolfgang wrote: > I'm not really hapy with the additional CROSS_BUILD_TOOLS paramert - > but this may be a matter of taste, so the following is just a thought > and a question: > > Would it make more sense to provide a sparate make target instead? > > Say, something like this: > > Build tools for host > make CROSS_COMPILE= Build tools for target > make CROSS_COMPILE= > ? And then we chose a new make target "cross_tools" rather than a new option "CROSS_BUILD_TOOLS=1". That is similar to what is happening here. I wanted to show retionale why a make target "tools-only" is better than "HOST_TOOLS_ONLY=yes". > > Doesn't work for me: > > $ make tools-only > HOSTCC scripts/basic/fixdep > HOSTCC tools/aisimage.o > HOSTCC tools/crc32.o > HOSTCC tools/default_image.o > HOSTCC tools/dumpimage.o > In file included from include/version.h:11:0, > from tools/dumpimage.c:11: > include/timestamp.h:11:47: fatal error: > generated/timestamp_autogenerated.h: No such file or directory > #include "generated/timestamp_autogenerated.h" >^ > compilation terminated. > make[1]: *** [tools/dumpimage.o] Error 1 > make: *** [tools-only] Error 2 > Oops - My bad. I was disabling timestamp. Could you fix like this? tools-only: scripts_basic $(version_h) $(timestamp_h) $(Q)$(MAKE) $(build)=tools It worked for me. $ make tools-only HOSTCC scripts/basic/fixdep 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 HOSTCC tools/aisimage.o HOSTCC tools/crc32.o HOSTCC tools/default_image.o HOSTCC tools/dumpimage.o HOSTCC tools/fdt.o HOSTCC tools/fdt_ro.o HOSTCC tools/fdt_rw.o HOSTCC tools/fdt_strerror.o HOSTCC tools/fdt_wip.o HOSTCC tools/fit_image.o HOSTCC tools/image-fit.o HOSTCC tools/image-host.o HOSTCC tools/image.o HOSTCC tools/imagetool.o HOSTCC tools/imximage.o HOSTCC tools/kwbimage.o HOSTCC tools/md5.o HOSTCC tools/mkenvimage.o HOSTCC tools/mkimage.o HOSTCC tools/mxsimage.o HOSTCC tools/omapimage.o HOSTCC tools/os_support.o HOSTCC tools/pblimage.o HOSTCC tools/sha1.o HOSTCC tools/ublimage.o HOSTLD tools/mkenvimage HOSTLD tools/dumpimage HOSTLD tools/mkimage HOSTCC tools/proftool Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Native builds broken ?
Hi On Sun, 30 Mar 2014 23:08:09 +0100 selsin...@gmail.com wrote: > Trying to build the u-boot master branch today from > 0b2da7e209f4110b7c81d578336a10330e4a4404 > natively on arm gives > > make: arm-linux-gcc: Command not found > /bin/sh: arm-linux-gcc: command not found > dirname: missing operand > Try 'dirname --help' for more information. > CHK include/config/uboot.release > UPD include/config/uboot.release > CHK include/generated/version_autogenerated.h > /bin/sh: arm-linux-gcc: command not found > /bin/sh: arm-linux-ld.bfd: command not found > UPD include/generated/version_autogenerated.h > CHK include/generated/timestamp_autogenerated.h > UPD include/generated/timestamp_autogenerated.h > CC lib/asm-offsets.s > /bin/sh: arm-linux-gcc: command not found > /data/linux/source/u-boot/./Kbuild:34: recipe for target 'lib/asm-offsets.s' > failed > make[1]: *** [lib/asm-offsets.s] Error 127 > Makefile:997: recipe for target 'prepare0' failed > make: *** [prepare0] Error 2 > > ways around this appear to be to revert > 9b6e2c363f2686d6f7bf61fbe58b7591b71d3e8b > "kbuild: fix CROSS_COMPILE settings in config.mk" > > or to start a native build with > > make CROSS_COMPILE= > > which seems rather counter-intuitive. > > I'm no makefile/Kbuild expert, but wouldn't the changes to arch/*/config.mk > be better done like this > > ifneq ($(HOSTARCH),$(ARCH)) > ifeq ($(CROSS_COMPILE),) > CROSS_COMPILE := arm-linux- > endif > endif > > so that we only set CROSS_COMPILE if we're actually cross compiling instead > of > forcing it when it's intentionally empty because we're building natively ? See http://patchwork.ozlabs.org/patch/331460/ Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Native builds broken ?
Trying to build the u-boot master branch today from 0b2da7e209f4110b7c81d578336a10330e4a4404 natively on arm gives make: arm-linux-gcc: Command not found /bin/sh: arm-linux-gcc: command not found dirname: missing operand Try 'dirname --help' for more information. CHK include/config/uboot.release UPD include/config/uboot.release CHK include/generated/version_autogenerated.h /bin/sh: arm-linux-gcc: command not found /bin/sh: arm-linux-ld.bfd: command not found UPD include/generated/version_autogenerated.h CHK include/generated/timestamp_autogenerated.h UPD include/generated/timestamp_autogenerated.h CC lib/asm-offsets.s /bin/sh: arm-linux-gcc: command not found /data/linux/source/u-boot/./Kbuild:34: recipe for target 'lib/asm-offsets.s' failed make[1]: *** [lib/asm-offsets.s] Error 127 Makefile:997: recipe for target 'prepare0' failed make: *** [prepare0] Error 2 ways around this appear to be to revert 9b6e2c363f2686d6f7bf61fbe58b7591b71d3e8b "kbuild: fix CROSS_COMPILE settings in config.mk" or to start a native build with make CROSS_COMPILE= which seems rather counter-intuitive. I'm no makefile/Kbuild expert, but wouldn't the changes to arch/*/config.mk be better done like this ifneq ($(HOSTARCH),$(ARCH)) ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := arm-linux- endif endif so that we only set CROSS_COMPILE if we're actually cross compiling instead of forcing it when it's intentionally empty because we're building natively ? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] RiOTboard: add new board
Hi Stefano, Le Sun, 30 Mar 2014 18:20:49 +0200, Stefano Babic a écrit : > I jump directly to V4 ;-) Sorry for late review, I was not in office > last days. > > Added Ben in CC. He sent a first version for the Marsboard. > > On 29/03/2014 22:29, Eric Bénard wrote: > > this board is produced by Embest/Element 14 and is based on i.MX6 Solo > > The following features are tested : > > - UART2 (console) > > - eMMC > > - SDCard > > - uSDCard > > - Ethernet > > - USB Host (through 4 ports hub) > > - HDMI output > > - I2C 1/2/3 > > - LVDS TFT with LCD8000-97C from Embest/Element 14 > > > > Boot on eMMC and through USB loader are tested. > > > > For more informations on this board : http://www.riotboard.org/ > > > > Signed-off-by: Eric Bénard > > --- > > A general remark. I agree by reading the whole thread about checking at > runtime which is the running board (you do it getting the cpu type). > > However, you use also a compiler switch mechanism, adding RIOTBOARD or > MARSBOARD in the boards.cfg. You have implemented two ways to for the > same thing. This makes in principle your runtime detection useless, > because you can use #if CONFIG_MARSBOARD instead of "if board_type == > BOARD_IS_MARSBOARD)". True, as said in the log, anyway at the moment the same code can't run on both boards because of the different CPU (Solo vs Dual - and not Dual Lite). > Is it possible to use only the runtime detection ? > I think the main problem is CONFIG_ENV_IS_*, that is different for the > two boards. What do you think about it ? > I'll see how we can handle the 2 CONFIG_ENV_IS with runtime detection. > IMHO you could also squash the two patches together. You add new files, > and patch 2/2 changes some of them. I think in this case having a single > patch makes review easier. > OK no problem. > > + /* from linux/arch/arm/mach-imx/mach-imx6q.c : > > Codestyle in U-Boot for multiline comments is: > > /* > * ... > */ > OK will fix. FWIW checkpatch doesn't provide any warning concerning this problem. > > +int board_video_skip(void) > > +{ > > ..././// > We have already discussed in the past about this function. Each board > (at least, imx6 board) want to have such of them, and code is > duplicated. What about to factorize it ? I am not against to move it > into imx-common, if we generally agree, but I would like to avoid to > duplicate this function for each board. > OK, if I understand correctly you want me to factorize it ? ;-) I'll see what I can do there. Thanks, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] imx-common: cpu: add fdt_file environment variable
On Sunday, March 30, 2014 at 12:04:31 AM, Otavio Salvador wrote: > On Sat, Mar 29, 2014 at 7:34 PM, Troy Kisky > > wrote: > > This removes one block in the move toward 1 u-boot > > for both a mx6q (quad) and mx6dl (duallite) processor. > > > > Now fdt_file hardcoded value can be removed. > > > > Signed-off-by: Troy Kisky > > Nice! I do think it is in the right direction. I will give it a try soon... Full NAK on this patch, I completely agree with Eric that this approach is totally wrong. This adds stuff which should be pulled from DT into common code, this is just NAK. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] imx-common: cpu: add fdt_file environment variable
Hi Troy, On 29/03/2014 23:34, Troy Kisky wrote: > This removes one block in the move toward 1 u-boot > for both a mx6q (quad) and mx6dl (duallite) processor. > > Now fdt_file hardcoded value can be removed. > > Signed-off-by: Troy Kisky > --- I have a general problem with this implementation. I am ok if, as you proposed some times ago, there is a general rule for the "default" dtb file in the CONFIG_EXTRA_ENV. However, you are binding in code naming conventions. In U-boot, it must be allowed to set the environment as the user wants, and this must be not overwritten by such an internal code. I mean: a board user, if he wants, should be allowed to do something as setenv fdt_file my_preferred_dtb_name.dtb and this must work when the file is loaded from storage - this is not possible if the rule chosen from user is overwritten by code. This makes the environment useless and generates headaches for a lot of users. They will ask themselves why the wrong file is taken when they tried in any way to set it differently... > arch/arm/imx-common/cpu.c | 44 > arch/arm/lib/board.c | 7 +++ > 2 files changed, 51 insertions(+) > > diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c > index a77c4de..5d48011 100644 > --- a/arch/arm/imx-common/cpu.c > +++ b/arch/arm/imx-common/cpu.c > @@ -180,3 +180,47 @@ void arch_preboot_os(void) > ipuv3_fb_shutdown(); > } > #endif > + > +const char *get_dtb_prefix(u32 imxtype) > +{ > + switch (imxtype) { > + case MXC_CPU_MX6Q: > + case MXC_CPU_MX6D: > + return "imx6q"; /* Quad/Dual-core version of the mx6 */ > + case MXC_CPU_MX6DL: > + case MXC_CPU_MX6SOLO: > + return "imx6dl";/* Dual Lite/Solo version of the mx6 */ > + case MXC_CPU_MX6SL: > + return "imx6sl";/* Solo-Lite version of the mx6 */ > + case MXC_CPU_MX51: > + return "imx51"; > + case MXC_CPU_MX53: > + return "imx53"; > + } > + return "??"; > +} > + > +int cpu_late_init(void) > +{ > + char buf[128]; > + const char *board; > + u32 imxtype = (get_cpu_rev() >> 12) & 0xff; > + > + if (getenv("fdt_file")) > + return 0; > + board = getenv("board"); > + if (!board) { > + board = CONFIG_SYS_BOARD; > + if ((board[0] == 'm') && (board[1] == 'x')) { > + if (board[2] == '6') { > + board += 3; > + } else if (board[2] == '5') { > + if ((board[3] == '1') || (board[3] == '3')) > + board += 4; > + } > + } > + } > + sprintf(buf, "%s-%s.dtb", get_dtb_prefix(imxtype), board); > + setenv("fdt_file", buf); > + return 0; > +} > diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c > index e9a7708..61cee98 100644 > --- a/arch/arm/lib/board.c > +++ b/arch/arm/lib/board.c > @@ -496,6 +496,11 @@ static void display_fdt_model(const void *blob) > } > #endif > > +int __weak cpu_late_init(void) > +{ > + return 0; > +} > + > / > * > * This is the next part if the initialization sequence: we are now > @@ -649,6 +654,8 @@ void board_init_r(gd_t *id, ulong dest_addr) > board_late_init(); > #endif > > + cpu_late_init(); > + > #ifdef CONFIG_BITBANGMII > bb_miiphy_init(); > #endif > Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 v4 1/2] RiOTboard: add new board
Hi Eric, I jump directly to V4 ;-) Sorry for late review, I was not in office last days. Added Ben in CC. He sent a first version for the Marsboard. On 29/03/2014 22:29, Eric Bénard wrote: > this board is produced by Embest/Element 14 and is based on i.MX6 Solo > The following features are tested : > - UART2 (console) > - eMMC > - SDCard > - uSDCard > - Ethernet > - USB Host (through 4 ports hub) > - HDMI output > - I2C 1/2/3 > - LVDS TFT with LCD8000-97C from Embest/Element 14 > > Boot on eMMC and through USB loader are tested. > > For more informations on this board : http://www.riotboard.org/ > > Signed-off-by: Eric Bénard > --- A general remark. I agree by reading the whole thread about checking at runtime which is the running board (you do it getting the cpu type). However, you use also a compiler switch mechanism, adding RIOTBOARD or MARSBOARD in the boards.cfg. You have implemented two ways to for the same thing. This makes in principle your runtime detection useless, because you can use #if CONFIG_MARSBOARD instead of "if board_type == BOARD_IS_MARSBOARD)". Is it possible to use only the runtime detection ? I think the main problem is CONFIG_ENV_IS_*, that is different for the two boards. What do you think about it ? IMHO you could also squash the two patches together. You add new files, and patch 2/2 changes some of them. I think in this case having a single patch makes review easier. > v4: add LVDS TFT support and use clrbits / setbits / clrsetbits as > suggested by Wolfgang > > board/embest/riotboard/Makefile| 9 + > board/embest/riotboard/riotboard.c | 566 > + > boards.cfg | 1 + > include/configs/riotboard.h| 299 > 4 files changed, 875 insertions(+) > create mode 100644 board/embest/riotboard/Makefile > create mode 100644 board/embest/riotboard/riotboard.c > create mode 100644 include/configs/riotboard.h > > diff --git a/board/embest/riotboard/Makefile b/board/embest/riotboard/Makefile > new file mode 100644 > index 000..5f978c0 > --- /dev/null > +++ b/board/embest/riotboard/Makefile > @@ -0,0 +1,9 @@ > +# > +# Copyright (C) 2007, Guennadi Liakhovetski > +# > +# (C) Copyright 2011 Freescale Semiconductor, Inc. > +# > +# SPDX-License-Identifier: GPL-2.0+ > +# > + > +obj-y := riotboard.o > diff --git a/board/embest/riotboard/riotboard.c > b/board/embest/riotboard/riotboard.c > new file mode 100644 > index 000..1627156 > --- /dev/null > +++ b/board/embest/riotboard/riotboard.c > @@ -0,0 +1,566 @@ > +/* > + * Copyright (C) 2014 Eukréa Electromatique > + * Author: Eric Bénard > + * Fabio Estevam > + * Jon Nettleton > + * > + * based on sabresd.c which is : > + * Copyright (C) 2012 Freescale Semiconductor, Inc. > + * and on hummingboard.c which is : > + * Copyright (C) 2013 SolidRun ltd. > + * Copyright (C) 2013 Jon Nettleton . > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +DECLARE_GLOBAL_DATA_PTR; > + > +#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP |\ > + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ > + PAD_CTL_SRE_FAST | PAD_CTL_HYS) > + > +#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP | \ > + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ > + PAD_CTL_SRE_FAST | PAD_CTL_HYS) > + > +#define USDHC_PAD_CLK_CTRL (PAD_CTL_SPEED_LOW | \ > + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | \ > + PAD_CTL_HYS) > + > +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP |\ > + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) > + > +#define ENET_PAD_CTRL_PD (PAD_CTL_PUS_100K_DOWN | \ > + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) > + > +#define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP & ~PAD_CTL_PKE) | \ > + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) > + > +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ > + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ > + PAD_CTL_ODE | PAD_CTL_SRE_FAST) > + > +int dram_init(void) > +{ > + gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); > + > + return 0; > +} > + > +static iomux_v3_cfg_t const uart2_pads[] = { > + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), > + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), > +}; > + > +static void setup_iomux_uart(void) > +{ > + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); > +} > + > +iomux_v3_cfg_t const enet_pads[] = { > + MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), > + MX6_PAD_ENET_MDC__ENET_MDC