Re: [U-Boot] u-boot build error [from v2013.01 onwards]
Hi Wolfgang Denk, On Mon, Jan 28, 2013 at 12:29 PM, Wolfgang Denk w...@denx.de wrote: Dear Jagan Teki, In message CAD6G_RS1bV_8z_J0QEjbNooy=6+zxi0faxjxnr1fn4u2ajb...@mail.gmail.com you wrote: Actually I'd be more interested in the result of the following commands: 1) $CROSS_COMPILE}gcc -v Mr.J ${CROSS_COMPILE}gcc -v Using built-in specs. Target: arm-none-linux-gnueabi Thread model: posix gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) Well, the actual error comes from the Makefile, so gcc should not be involved here... Mr.J git rev-parse HEAD 54b08efcf2f4ff532ce99c53f341a59c193331a5 Looks clean. Mr.J git status # On branch master nothing to commit (working directory clean) Mr.J ./MAKEALL versatilepb_config Makefile:597: *** missing `endif'. Stop. Makefile:597: *** missing `endif'. Stop. arm-none-linux-gnueabi-size: './u-boot': No such file Makefile:597: *** missing `endif'. Stop. You should get this instead: - ./MAKEALL versatilepb_config make: *** No rule to make target `versatilepb_config_config'. Stop. make: *** [versatilepb_config_config] Error 1 make: *** [all] Error 1 arm-linux-gnueabi-size: './u-boot': No such file System not configured - see README make: *** [all] Error 1 - SUMMARY Boards compiled: 1 Boards with errors: 1 ( versatilepb_config ) -- Note that the correct name with MAKEALL is the board target name _without_ the _config part. What does make -v report for you? [GNU Make 3.82 on my end.] Thanks for your note. GNU Make is 3.80 at my end. Thanks, Jagan. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de [War] is instinctive. But the instinct can be fought. We're human beings with the blood of a million savage years on our hands! But we can stop it. We can admit that we're killers ... but we're not going to kill today. That's all it takes! Knowing that we're not going to kill today! -- Kirk, A Taste of Armageddon, stardate 3193.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot build error [from v2013.01 onwards]
Hi, On Mon, Jan 28, 2013 at 1:31 PM, Jagan Teki jagannadh.t...@gmail.com wrote: Hi Wolfgang Denk, On Mon, Jan 28, 2013 at 12:29 PM, Wolfgang Denk w...@denx.de wrote: Dear Jagan Teki, In message CAD6G_RS1bV_8z_J0QEjbNooy=6+zxi0faxjxnr1fn4u2ajb...@mail.gmail.com you wrote: Actually I'd be more interested in the result of the following commands: 1) $CROSS_COMPILE}gcc -v Mr.J ${CROSS_COMPILE}gcc -v Using built-in specs. Target: arm-none-linux-gnueabi Thread model: posix gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) Well, the actual error comes from the Makefile, so gcc should not be involved here... Mr.J git rev-parse HEAD 54b08efcf2f4ff532ce99c53f341a59c193331a5 Looks clean. Mr.J git status # On branch master nothing to commit (working directory clean) Mr.J ./MAKEALL versatilepb_config Makefile:597: *** missing `endif'. Stop. Makefile:597: *** missing `endif'. Stop. arm-none-linux-gnueabi-size: './u-boot': No such file Makefile:597: *** missing `endif'. Stop. You should get this instead: - ./MAKEALL versatilepb_config make: *** No rule to make target `versatilepb_config_config'. Stop. make: *** [versatilepb_config_config] Error 1 make: *** [all] Error 1 arm-linux-gnueabi-size: './u-boot': No such file System not configured - see README make: *** [all] Error 1 - SUMMARY Boards compiled: 1 Boards with errors: 1 ( versatilepb_config ) -- Note that the correct name with MAKEALL is the board target name _without_ the _config part. What does make -v report for you? [GNU Make 3.82 on my end.] Thanks for your note. GNU Make is 3.80 at my end. I have just upgraded my Make from 3.80 to 3.81.. u-boot build works fine. Thanks, Jagan. Thanks, Jagan. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de [War] is instinctive. But the instinct can be fought. We're human beings with the blood of a million savage years on our hands! But we can stop it. We can admit that we're killers ... but we're not going to kill today. That's all it takes! Knowing that we're not going to kill today! -- Kirk, A Taste of Armageddon, stardate 3193.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Want to study U-Boot code
My thanks for your saying, Javier. I will be starting from reading the README and begin search through the code. When I get further question, I will come back here. Thahks again. -woody On Sat, Jan 26, 2013 at 03:11:29PM +0100, Javier Martinez Canillas wrote: On Sat, Jan 26, 2013 at 2:07 PM, Woody Wu narkewo...@gmail.com wrote: ??? 2013-1-26 AM5:27???Robert P. J. Day rpj...@crashcourse.ca? On Fri, 25 Jan 2013, Wolfgang Denk wrote: Dear Woody Wu, In message CAAsE_ue4VffAioQWzHPpyOZmzoFk9E5S7jj2+2BZuiK= c5y...@mail.gmail.com you wrote: I want to firstly get a picture to basically understand how u-boot work, especially on an ARM9 based board. I think not everyone who want to understand u-boot has to read the full code. Thank. This depends on your definition of understanding. On a highlevel, you might start with reaing and digesting the manual, eventually trying out how U-Boot works on some (real or emulated) board. if i can jump in, a good way to start playing is to configure and build for the sandbox architecture so you can run it on your x86 system. for the benefit of a couple friends, i whipped together a wiki page for that here: http://www.crashcourse.ca/wiki/index.php/U-Boot_sandbox very simple but enough to get you started, and you can match up running the commands with the underlying code. rday Sandbox looks amazing! Thanks share me with this info. But i still wondering that if u-boot doesnt have any book or document explaining how it work and how it organized, how pepople can join its development? Hello Woody, I recommend you to start with the README file since it gives you a high level overview of U-Boot and some very good specifics too. Since you are asking about U-Boot source code organization specifically, you can take a look at the Directory Hierarchy section of the README file. But as others stated before, you should first narrow your search to an area that interests you. I found that scratching your own itch is the best way to learn. There is no documentation that can replace the source code itself, remember that a good documentation shouldn't say how thinks are made (for that you have the code) but why things were made in a certain way and the design decisions behind that. Finally, if you think that the documentation is not enough, feel free to send patches to improve that :-) As Confusios said I heard and I forget. I see and I remember. I do and I understand Hope it helps, Javier -- woody I can't go back to yesterday - because I was a different person then. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/corenet: Add workaround for ELBC multi-bit ECC error
NAND operations in condition like below will result ELBC internal multi-bit ECC error, DCFG will send this error to MPIC to report it as an error interrupt (Interrupt 0), which causes call trace in kernel, so software should disable the DCFG not to send the ELBC ECC error by setting bit 15 in the register at DCSRBASE + 0x0002_0520. This won't inhibit the reporting of LTESR[PAR]. This workaround is enabled on P2041/P3041/P50x0. steps to reproduce the issue: 1. power cycle the board 2. use following command to do NAND test: flashcp -v file-jffs2 /dev/mtdx The 'mtdx' should be a NAND partition, the file 'file-jffs2' should be page aligned. Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/cpu/mpc85xx/cmd_errata.c |3 +++ arch/powerpc/cpu/mpc85xx/cpu_init.c | 10 ++ arch/powerpc/include/asm/config_mpc85xx.h |4 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c index e5ecf5d..f26d608 100644 --- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c +++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c @@ -227,6 +227,9 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_LBC103 puts(Work-around for Erratum NMG_LBC103 enabled\n); #endif +#ifdef CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC + puts(Work-around for Erratum ELBC MULTIBIT ECC enabled\n); +#endif #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_ETSEC129 if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0)) puts(Work-around for Erratum NMG ETSEC129 enabled\n); diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index d1155e8..5d6f996 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -564,6 +564,16 @@ skip_l2: } } #endif +#ifdef CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC + /* +* On P2041/P3041/P50x0, NAND operations will result internal multi-bit +* ECC error, which causes call trace in kernel, so software should +* disable the ECC error reported from eLBC by setting bit 15 in +* the register at DCSRBASE + 0x0002_0520. +*/ +#define DCFG_ECC (CONFIG_SYS_DCSRBAR + 0x20520) + setbits_be32((void *)DCFG_ECC, 1 (31 - 15)); +#endif #ifdef CONFIG_SYS_LBC_LCRR /* diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h index 0b9638b..8f8aea7 100644 --- a/arch/powerpc/include/asm/config_mpc85xx.h +++ b/arch/powerpc/include/asm/config_mpc85xx.h @@ -345,6 +345,7 @@ #define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xf000 #define CONFIG_SYS_FSL_ERRATUM_SRIO_A004034 #define CONFIG_SYS_FSL_ERRATUM_A004849 +#define CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC #elif defined(CONFIG_PPC_P3041) #define CONFIG_SYS_FSL_QORIQ_CHASSIS1 @@ -377,6 +378,7 @@ #define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xf000 #define CONFIG_SYS_FSL_ERRATUM_SRIO_A004034 #define CONFIG_SYS_FSL_ERRATUM_A004849 +#define CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC #elif defined(CONFIG_PPC_P4080) /* also supports P4040 */ #define CONFIG_SYS_FSL_QORIQ_CHASSIS1 @@ -451,6 +453,7 @@ #define CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV 0x10 #define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xc000 #define CONFIG_SYS_FSL_ERRATUM_SRIO_A004034 +#define CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC #elif defined(CONFIG_PPC_P5040) #define CONFIG_SYS_PPC64 @@ -480,6 +483,7 @@ #define CONFIG_SYS_FSL_ERRATUM_A004510 #define CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV 0x10 #define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xf000 +#define CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC #elif defined(CONFIG_BSC9131) #define CONFIG_MAX_CPUS1 -- 1.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/p5040: fix mdio mux for 10G port
Current driver of p5040 assumes 10G port follows 1G port DTSEC5 in eth port enum structure, it will assign mdio mux depend on this assumption. This is not true with Fman V3, which added more 1G ports after port DTSEC5 in eth port enum structure, then 10G ports on p5040 will have wrong mdio mux. So we use dynamic index for 10G ports instead of hardcoded enum value when doing mdio mux for 10G ports. Signed-off-by: Shaohui Xie shaohui@freescale.com --- board/freescale/corenet_ds/eth_superhydra.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/board/freescale/corenet_ds/eth_superhydra.c b/board/freescale/corenet_ds/eth_superhydra.c index ef9de25..ae07073 100644 --- a/board/freescale/corenet_ds/eth_superhydra.c +++ b/board/freescale/corenet_ds/eth_superhydra.c @@ -605,8 +605,8 @@ int board_eth_init(bd_t *bis) lane = serdes_get_first_lane(XAUI_FM1); if (lane = 0) { debug(FM1@TGEC1 expects XAUI in slot %u\n, lane_to_slot[lane]); - mdio_mux[FM1_10GEC1].mask = BRDCFG1_EMI2_SEL_MASK; - mdio_mux[FM1_10GEC1].val = BRDCFG1_EMI2_SEL_SLOT2; + mdio_mux[i].mask = BRDCFG1_EMI2_SEL_MASK; + mdio_mux[i].val = BRDCFG1_EMI2_SEL_SLOT2; super_hydra_mdio_set_mux(SUPER_HYDRA_FM1_TGEC_MDIO, mdio_mux[i].mask, mdio_mux[i].val); } @@ -704,8 +704,8 @@ int board_eth_init(bd_t *bis) lane = serdes_get_first_lane(XAUI_FM2); if (lane = 0) { debug(FM2@TGEC1 expects XAUI in slot %u\n, lane_to_slot[lane]); - mdio_mux[FM2_10GEC1].mask = BRDCFG1_EMI2_SEL_MASK; - mdio_mux[FM2_10GEC1].val = BRDCFG1_EMI2_SEL_SLOT1; + mdio_mux[i].mask = BRDCFG1_EMI2_SEL_MASK; + mdio_mux[i].val = BRDCFG1_EMI2_SEL_SLOT1; super_hydra_mdio_set_mux(SUPER_HYDRA_FM2_TGEC_MDIO, mdio_mux[i].mask, mdio_mux[i].val); } -- 1.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/corenet: set USB2 default mode to 'device' for (super)hydra boards
The Hydra and Superhydra (P3041DS, P5020DS, and P5040DS) boards have a second USB port that can be configured in either host, peripheral (aka device), or OTG (on-the-go) mode. When configured in host mode, if the port is connected to another USB host, damage to the board can occur. To avoid this, we change the default setting to peripheral mode. Ideally, we'd set it to OTG mode, but currently there is no OTG support for these boards. Setting the hwconfig variable will also update the device tree, and so Linux will configure the port for peripheral mode as well. Signed-off-by: Shaohui Xie shaohui@freescale.com --- include/configs/corenet_ds.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 47f7b7e..1489b34 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -713,6 +713,7 @@ #defineCONFIG_EXTRA_ENV_SETTINGS \ hwconfig=fsl_ddr:ctlr_intlv=cacheline,\ bank_intlv=cs0_cs1; \ + usb2:dr_mode=peripheral,phy_type= __stringify(__USB_PHY_TYPE) ;\ usb1:dr_mode=host,phy_type= __stringify(__USB_PHY_TYPE) \0\ netdev=eth0\0 \ uboot= __stringify(CONFIG_UBOOTPATH) \0 \ -- 1.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/2] gpt: fix partition size limit
This patchset fixes partions size limitation in 'gpt' command. New 'ustrtoll' function is added and used to convert partition size from string to unsigned long long type. Piotr Wilczek (2): vsprintf: add ustrtoll function gpt: fix partion size limit common/cmd_gpt.c | 10 ++ include/exports.h |1 + lib/vsprintf.c| 23 +++ 3 files changed, 30 insertions(+), 4 deletions(-) -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] vsprintf: add ustrtoll function
Add 'ustrtoull' function to convert size from string (ex: 1GiB) to unsigned long long type Signed-off-by: Piotr Wilczek p.wilc...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- include/exports.h |1 + lib/vsprintf.c| 23 +++ 2 files changed, 24 insertions(+) diff --git a/include/exports.h b/include/exports.h index 6cf31aa..41d5085 100644 --- a/include/exports.h +++ b/include/exports.h @@ -24,6 +24,7 @@ int setenv (const char *varname, const char *varvalue); long simple_strtol(const char *cp,char **endp,unsigned int base); int strcmp(const char * cs,const char * ct); unsigned long ustrtoul(const char *cp, char **endp, unsigned int base); +unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base); #if defined(CONFIG_CMD_I2C) int i2c_write (uchar, uint, int , uchar* , int); int i2c_read (uchar, uint, int , uchar* , int); diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 3c432f8..533a96b 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -126,6 +126,29 @@ unsigned long ustrtoul(const char *cp, char **endp, unsigned int base) return result; } +unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base) +{ + unsigned long long result = simple_strtoull(cp, endp, base); + switch (**endp) { + case 'G': + result *= 1024; + /* fall through */ + case 'M': + result *= 1024; + /* fall through */ + case 'K': + case 'k': + result *= 1024; + if ((*endp)[1] == 'i') { + if ((*endp)[2] == 'B') + (*endp) += 3; + else + (*endp) += 2; + } + } + return result; +} + unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base) { -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] gpt: fix partion size limit
Currently, in gpt command, partion size is converted from string to unsigned long type using 'ustrtol' function. That type limits the partition size to 4GB. This patch changes the conversion function to 'ustrtoll' to return unsigned long long type. Signed-off-by: Piotr Wilczek p.wilc...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- common/cmd_gpt.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/cmd_gpt.c b/common/cmd_gpt.c index da7705d..efd7934 100644 --- a/common/cmd_gpt.c +++ b/common/cmd_gpt.c @@ -27,6 +27,7 @@ #include part_efi.h #include exports.h #include linux/ctype.h +#include div64.h #ifndef CONFIG_PARTITION_UUIDS #error CONFIG_PARTITION_UUIDS must be enabled for CONFIG_CMD_GPT to be enabled @@ -131,6 +132,7 @@ static int set_gpt_info(block_dev_desc_t *dev_desc, int p_count; disk_partition_t *parts; int errno = 0; + uint64_t size_ll, start_ll; debug(%s: MMC lba num: 0x%x %d\n, __func__, (unsigned int)dev_desc-lba, (unsigned int)dev_desc-lba); @@ -217,8 +219,8 @@ static int set_gpt_info(block_dev_desc_t *dev_desc, } if (extract_env(val, p)) p = val; - parts[i].size = ustrtoul(p, p, 0); - parts[i].size /= dev_desc-blksz; + size_ll = ustrtoull(p, p, 0); + parts[i].size = lldiv(size_ll, dev_desc-blksz); free(val); /* start address */ @@ -226,8 +228,8 @@ static int set_gpt_info(block_dev_desc_t *dev_desc, if (val) { /* start address is optional */ if (extract_env(val, p)) p = val; - parts[i].start = ustrtoul(p, p, 0); - parts[i].start /= dev_desc-blksz; + start_ll = ustrtoull(p, p, 0); + parts[i].start = lldiv(start_ll, dev_desc-blksz); free(val); } } -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Is used rootfs dependent from the U-boot command-line?
___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 02/10] EXYNOS5: FDT: Add DWMMC device node data
Hi Simon, You mean to add removable flag in device node ? Are you referring to the overhead involved during MMC boot, and a SD card is not present on the board ? Can you please elaborate on the above. Thanks Regards Amarendra Reddy On 23 January 2013 05:39, Simon Glass s...@chromium.org wrote: Hi Amar, On Mon, Jan 21, 2013 at 3:43 AM, Amar amarendra...@samsung.com wrote: This patch adds DWMMC device node data for exynos5. This patch also adds binding file for DWMMC device node. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com Signed-off-by: Amar amarendra...@samsung.com Acked-by: Simon Glass s...@chromium.org Can I suggest in a later patch you add a removable flag, so we can mark devices which cannot be removed (and can be assumed to be present). I believe that there is some overhead involved in detecting an MMC (we have to try SD first, and fail). --- Changes since V1: 1)Added binding file for DWMMC device node at the location doc/device-tree-bindings/exynos/dwmmc.txt. 2)Removed the propname 'index' from device node. 3)Prefixed the vendor name 'samsung' before propname in device node. Changes since V2: 1)Updation of commit message and resubmition of proper patch set. Changes since V3: No change. Changes since V4: 1)Updated the doc/device-tree-bindings/exynos/dwmmc.txt with more information regarding the property 'samsung,timing'. 2)Replaced the name 'dwmmc' with 'mmc'. arch/arm/dts/exynos5250.dtsi | 31 +++ board/samsung/dts/exynos5250-smdk5250.dts | 22 ++ doc/device-tree-bindings/exynos/dwmmc.txt | 49 +++ 3 files changed, 102 insertions(+) create mode 100644 doc/device-tree-bindings/exynos/dwmmc.txt diff --git a/arch/arm/dts/exynos5250.dtsi b/arch/arm/dts/exynos5250.dtsi index ed8c8dd..6c08eb7 100644 --- a/arch/arm/dts/exynos5250.dtsi +++ b/arch/arm/dts/exynos5250.dtsi @@ -151,4 +151,35 @@ }; }; + mmc@1220 { + #address-cells = 1; + #size-cells = 0; + compatible = samsung,exynos5250-dwmmc; + reg = 0x1220 0x1000; + interrupts = 0 75 0; + }; + + mmc@1221 { + #address-cells = 1; + #size-cells = 0; + compatible = samsung,exynos5250-dwmmc; + reg = 0x1221 0x1000; + interrupts = 0 76 0; + }; + + mmc@1222 { + #address-cells = 1; + #size-cells = 0; + compatible = samsung,exynos5250-dwmmc; + reg = 0x1222 0x1000; + interrupts = 0 77 0; + }; + + mmc@1223 { + #address-cells = 1; + #size-cells = 0; + compatible = samsung,exynos5250-dwmmc; + reg = 0x1223 0x1000; + interrupts = 0 78 0; + }; }; diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts index cbfab6f..1d3e42b 100644 --- a/board/samsung/dts/exynos5250-smdk5250.dts +++ b/board/samsung/dts/exynos5250-smdk5250.dts @@ -30,6 +30,10 @@ spi2 = /spi@12d4; spi3 = /spi@131a; spi4 = /spi@131b; + mmc0 = /mmc@1220; + mmc1 = /mmc@1221; + mmc2 = /mmc@1222; + mmc3 = /mmc@1223; }; sromc@1225 { @@ -66,4 +70,22 @@ compatible = maxim,max77686_pmic; }; }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3; + }; + + mmc@1223 { + status = disabled; + }; }; diff --git a/doc/device-tree-bindings/exynos/dwmmc.txt b/doc/device-tree-bindings/exynos/dwmmc.txt new file mode 100644 index 000..0054ace --- /dev/null +++ b/doc/device-tree-bindings/exynos/dwmmc.txt @@ -0,0 +1,49 @@ +* Exynos 5250 DWC_mobile_storage + +The Exynos 5250 provides DWC_mobile_storage interface which supports +. Embedded Multimedia Cards (EMMC-version 4.5) +. Secure Digital memory (SD mem-version 2.0) +. Secure Digital I/O (SDIO-version 3.0) +. Consumer Electronics Advanced Transport Architecture (CE-ATA-version 1.1) + +The Exynos 5250 DWC_mobile_storage provides four channels. +SOC specific and Board specific properties are channel specific. + +Required SoC Specific Properties: + +- compatible: should be +
Re: [U-Boot] [PATCH V5 03/10] DWMMC: Initialise dwmci and resolve EMMC read write issues
Hi Simon, Please find the response below. Thanks Regards Amarendra On 23 January 2013 05:55, Simon Glass s...@chromium.org wrote: On Mon, Jan 21, 2013 at 3:43 AM, Amar amarendra...@samsung.com wrote: This patch enumerates dwmci and set auto stop command during dwmci initialisation. EMMC read/write is not happening in current implementation due to improper fifo size computation. Hence Modified the fifo size computation to resolve EMMC read write issues. Signed-off-by: Amar amarendra...@samsung.com Acked-by: Simon Glass s...@chromium.org (nit below if you resend for other reason) --- Changes since V1: 1)Created the macros RX_WMARK_SHIFT and RX_WMARK_MASK in header file. Changes since V2: 1)Updation of commit message and resubmition of proper patch set. Changes since V3: 1)Updated to use the macro DWMCI_CTRL_SEND_AS_CCSD instead of the hard coded value (1 10). Changes since V4: 1)Updated the function dwmci_send_cmd() to use get_timer() instead of using mdelay(1). drivers/mmc/dw_mmc.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 4070d4e..391ed93 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -323,6 +322,14 @@ static int dwmci_init(struct mmc *mmc) return -1; } + /* Enumerate at 400KHz */ + dwmci_setup_bus(host, mmc-f_min); + + /* Set auto stop command */ + ier = dwmci_readl(host, DWMCI_CTRL); + ier |= DWMCI_CTRL_SEND_AS_CCSD; + dwmci_writel(host, DWMCI_CTRL, ier); + dwmci_writel(host, DWMCI_RINTSTS, 0x); dwmci_writel(host, DWMCI_INTMASK, 0); @@ -332,11 +339,13 @@ static int dwmci_init(struct mmc *mmc) dwmci_writel(host, DWMCI_BMOD, 1); fifo_size = dwmci_readl(host, DWMCI_FIFOTH); + fifo_size = ((fifo_size RX_WMARK_MASK) RX_WMARK_SHIFT) + 1; if (host-fifoth_val) fifoth_val = host-fifoth_val; should be {} around this I think. Ok will be updated in next version patchset. - else - fifoth_val = MSIZE(0x2) | RX_WMARK(fifo_size/2 -1) | - TX_WMARK(fifo_size/2); + else { + fifoth_val = MSIZE(0x2) | RX_WMARK(fifo_size / 2 - 1) | + TX_WMARK(fifo_size / 2); + } dwmci_writel(host, DWMCI_FIFOTH, fifoth_val); dwmci_writel(host, DWMCI_CLKENA, 0); -- 1.8.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 04/10] EXYNOS5: DWMMC: Added FDT support for DWMMC
Hi Simon, Please find the responses below. Thanks Regards Amarendra On 27 January 2013 01:38, Simon Glass s...@chromium.org wrote: Hi, On Tue, Jan 22, 2013 at 12:43 AM, Amar amarendra...@samsung.com wrote: This patch adds FDT support for DWMMC, by reading the DWMMC node data from the device tree and initialising DWMMC channels as per data obtained from the node. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com Signed-off-by: Amar amarendra...@samsung.com Acked-by: Simon Glass s...@chromium.org See below for nit/question. --- Changes since V1: 1)Updated code to have same signature for the function exynos_dwmci_init() for both FDT and non-FDT versions. 2)Updated code to pass device_id parameter to the function exynos5_mmc_set_clk_div() instead of index. 3)Updated code to decode the value of samsung,width from FDT. 4)Channel index is computed instead of getting from FDT. Changes since V2: 1)Updation of commit message and resubmition of proper patch set. Changes since V3: 1)Replaced the new function exynos5_mmc_set_clk_div() with the existing function set_mmc_clk(). set_mmc_clk() will do the purpose. 2)Computation of FSYS block clock divisor (pre-ratio) is added. Changes since V4: 1)Replaced unsigned int exynos_dwmmc_init(int index, int bus_width) with int exynos_dwmci_add_port(int, u32, inth, u32) i)exynos_dwmmc_add_port() will be used by non-FDT boards. ii)In FDT case, exynos_dwmmc_init(const void *blob) will use exynos_dwmmc_add_port() for every channel enabled in device node. 2)Changed the computation method of mmc clock divisor. 3)Updated exynos_dwmmc_init() to compute the 'clksel_val' within the function. arch/arm/include/asm/arch-exynos/dwmmc.h | 11 +-- drivers/mmc/exynos_dw_mmc.c | 127 --- include/dwmmc.h | 3 + 3 files changed, 124 insertions(+), 17 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h b/arch/arm/include/asm/arch-exynos/dwmmc.h index 8acdf9b..3b147b8 100644 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h @@ -27,10 +27,7 @@ #define DWMCI_SET_DRV_CLK(x) ((x) 16) #define DWMCI_SET_DIV_RATIO(x) ((x) 24) -int exynos_dwmci_init(u32 regbase, int bus_width, int index); - -static inline unsigned int exynos_dwmmc_init(int index, int bus_width) -{ - unsigned int base = samsung_get_base_mmc() + (0x1 * index); - return exynos_dwmci_init(base, bus_width, index); -} +#ifdef CONFIG_OF_CONTROL +int exynos_dwmmc_init(const void *blob); +#endif +int exynos_dwmci_add_port(int index, u32 regbase, int bus_width, u32 clksel); diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index 72a31b7..1d09e56 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -19,39 +19,146 @@ */ #include common.h -#include malloc.h #include dwmmc.h +#include fdtdec.h +#include libfdt.h +#include malloc.h #include asm/arch/dwmmc.h #include asm/arch/clk.h +#include asm/arch/pinmux.h -static char *EXYNOS_NAME = EXYNOS DWMMC; +#defineDWMMC_MAX_CH_NUM4 +#defineDWMMC_MAX_FREQ 5200 +#defineDWMMC_MIN_FREQ 40 +#defineDWMMC_MMC0_CLKSEL_VAL 0x03030001 +#defineDWMMC_MMC2_CLKSEL_VAL 0x03020001 +/* + * Function used as callback function to initialise the + * CLKSEL register for every mmc channel. + */ static void exynos_dwmci_clksel(struct dwmci_host *host) { - u32 val; - val = DWMCI_SET_SAMPLE_CLK(DWMCI_SHIFT_0) | - DWMCI_SET_DRV_CLK(DWMCI_SHIFT_0) | DWMCI_SET_DIV_RATIO(0); + dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val); +} - dwmci_writel(host, DWMCI_CLKSEL, val); +unsigned int exynos_dwmci_get_clk(int dev_index) +{ + return get_mmc_clk(dev_index); } -int exynos_dwmci_init(u32 regbase, int bus_width, int index) +/* + * This function adds the mmc channel to be registered with mmc core. + * index - mmc channel number. + * regbase - register base address of mmc channel specified in 'index'. + * bus_width - operating bus width of mmc channel specified in 'index'. + * clksel -value to be written into CLKSEL register in case of FDT. + * NULL in case od non-FDT. + */ +int exynos_dwmci_add_port(int index, u32 regbase, int bus_width, u32 clksel) { struct dwmci_host *host = NULL; + unsigned int div; + unsigned long freq, sclk; host = malloc(sizeof(struct dwmci_host)); if (!host) { printf(dwmci_host
Re: [U-Boot] [PATCH V5 07/10] MMC: APIs to support resize of EMMC boot partition
Hi Simon, Please find the responses below. Thanks Regards Amarendra Reddy On 27 January 2013 01:55, Simon Glass s...@chromium.org wrote: Hi Amar, On Tue, Jan 22, 2013 at 12:43 AM, Amar amarendra...@samsung.com wrote: This patch adds APIs to access(open / close) and to resize boot partiton of EMMC. Signed-off-by: Amar amarendra...@samsung.com --- Changes since V1: New patch. Changes since V2: 1)Updation of commit message and resubmition of proper patch set. Changes since V3: No change. Changes since V4: 1)Replaced the functions mmc_boot_open() mmc_boot_close() with a single function mmc_boot_part_access(). drivers/mmc/mmc.c | 117 ++ include/mmc.h | 24 +++ 2 files changed, 141 insertions(+) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 72e8ce6..c152934 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1327,3 +1327,120 @@ int mmc_initialize(bd_t *bis) return 0; } + +int mmc_boot_partition_size_change(struct mmc *mmc, unsigned long bootsize, + unsigned long rpmbsize) +{ + int err; + struct mmc_cmd cmd; + + /* Only use this command for raw EMMC moviNAND */ + /* Enter backdoor mode */ Should probably join these two comments. Ok. + cmd.cmdidx = MMC_CMD_RES_MAN; + cmd.resp_type = MMC_RSP_R1b; + cmd.cmdarg = MMC_CMD62_ARG1; + + err = mmc_send_cmd(mmc, cmd, NULL); + if (err) { + debug(mmc_boot_partition_size_change: Error1 = %d\n, err); + return err; + } + + /* Boot partition changing mode */ + cmd.cmdidx = MMC_CMD_RES_MAN; + cmd.resp_type = MMC_RSP_R1b; + cmd.cmdarg = MMC_CMD62_ARG2; + + err = mmc_send_cmd(mmc, cmd, NULL); + if (err) { + debug(mmc_boot_partition_size_change: Error2 = %d\n, err); + return err; + } + /* boot partition size is multiple of 128KB */ + bootsize = ((bootsize*1024)/128); space around * and / plus remove outer () Ok. + + /* Arg: boot partition size */ + cmd.cmdidx = MMC_CMD_RES_MAN; + cmd.resp_type = MMC_RSP_R1b; + cmd.cmdarg = bootsize; + + err = mmc_send_cmd(mmc, cmd, NULL); + if (err) { + debug(mmc_boot_partition_size_change: Error3 = %d\n, err); + return err; + } + /* RPMB partition size is multiple of 128KB */ + rpmbsize = ((rpmbsize*1024)/128); and here Ok. + /* Arg: RPMB partition size */ + cmd.cmdidx = MMC_CMD_RES_MAN; + cmd.resp_type = MMC_RSP_R1b; + cmd.cmdarg = rpmbsize; + + err = mmc_send_cmd(mmc, cmd, NULL); + if (err) { + debug(mmc_boot_partition_size_change: Error4 = %d\n, err); + return err; + } + return 0; +} + +/* This function shall form and send the commands to open / close the /* * This function... Ok. + * boot partition specified by user. + * + * ack: 0x0 - No boot acknowledge sent (default) + * 0x1 - Boot acknowledge sent during boot operation + * part_num: User selects boot data that will be sent to master + * 0x0 - Device not boot enabled (default) + * 0x1 - Boot partition 1 enabled for boot + * 0x2 - Boot partition 2 enabled for boot + * access: User selects partitions to access + * 0x0 : No access to boot partition (default) + * 0x1 : R/W boot partition 1 + * 0x2 : R/W boot partition 2 + * 0x3 : R/W Replay Protected Memory Block (RPMB) + */ +int mmc_boot_part_access(struct mmc *mmc, u32 ack, u32 part_num, u32 access) +{ + int err; + struct mmc_cmd cmd; + + /* Boot ack enable, boot partition enable , boot partition access */ + cmd.cmdidx = MMC_CMD_SWITCH; + cmd.resp_type = MMC_RSP_R1b; + + cmd.cmdarg = (MMC_SWITCH_MODE_WRITE_BYTE 24 | + EXT_CSD_PART_CONF 16 | + (EXT_CSD_BOOT_ACK(ack) | + EXT_CSD_BOOT_PART_NUM(part_num) | + EXT_CSD_PARTITION_ACCESS(access)) 8); You can remove outer (). Might be nice to put () around the sub-expressions: cmd.cmdarg = (MMC_SWITCH_MODE_WRITE_BYTE 24) | (EXT_CSD_PART_CONF 16) | Ok. + + err = mmc_send_cmd(mmc, cmd, NULL); + if (err) { + if (access) { + debug(mmc boot partition#%d open failure: + Error1 = %d\n, part_num, err); + } else { + debug(mmc boot partition#%d close failure: + Error = %d\n, part_num, err);
Re: [U-Boot] [PATCH V5 09/10] COMMON: MMC: Command to support EMMC booting and to resize EMMC boot partition
Hi Simon, Please find the response below. Thanks Regards Amarendra Reddy On 27 January 2013 01:57, Simon Glass s...@chromium.org wrote: Hi Amar, On Tue, Jan 22, 2013 at 12:43 AM, Amar amarendra...@samsung.com wrote: This patch adds commands to access(open/close) and resize boot partitions on EMMC. Acked-by: Simon Glass s...@chromium.org (Minor nit below) Signed-off-by: Amar amarendra...@samsung.com --- Changes since V1: 1)Combined the common piece of code between 'open' and 'close' operations. Changes since V2: 1)Updation of commit message and resubmition of proper patch set. Changes since V3: No change. Changes since V4: 1)Added a new funtion boot_part_access() to combine the common parts of 'mmc open' and 'mmc close' functionalities. 2)Used the generic function mmc_boot_part_access() instead of two functions mmc_boot_open() and mmc_boot_close(). By doing so user can specify which boot partition to be accessed (opened / closed). common/cmd_mmc.c | 98 +++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 7dacd51..d036d34 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -147,6 +147,31 @@ U_BOOT_CMD( - display info of the current MMC device ); +static int boot_part_access(struct mmc *mmc, u32 ack, u32 part_num, u32 access) +{ + int err; + err = mmc_boot_part_access(mmc, ack, part_num, access); + + if ((err == 0) (access != 0)) { + printf(\t\t\t!!!Notice!!!\n); + printf(!You must close EMMC boot Partition after all + images are written\n); + printf(!EMMC boot partition has continuity at image + writing time.\n); + printf(!So, Do not close boot partition, Before, all + images are written.\n); So, do not close the boot partition before all images are written Ok. will update the sentence. + return 0; + } else if ((err == 0) (access == 0)) + return 0; + else if ((err != 0) (access != 0)) { + printf(EMMC boot partition-%d OPEN Failed.\n, part_num); + return 1; + } else { + printf(EMMC boot partition-%d CLOSE Failed.\n, part_num); + return 1; + } +} + static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { enum mmc_state state; @@ -248,6 +273,71 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) curr_device, mmc-part_num); return 0; + } else if ((strcmp(argv[1], open) == 0) || + (strcmp(argv[1], close) == 0)) { + int dev; + struct mmc *mmc; + u32 ack, part_num, access = 0; + + if (argc == 4) { + dev = simple_strtoul(argv[2], NULL, 10); + part_num = simple_strtoul(argv[3], NULL, 10); + } else + return CMD_RET_USAGE; + + mmc = find_mmc_device(dev); + if (!mmc) { + printf(no mmc device at slot %x\n, dev); + return 1; + } + + if (IS_SD(mmc)) { + printf(SD device cannot be opened/closed\n); + return 1; + } + + if ((part_num = 0) || (part_num MMC_NUM_BOOT_PARTITION)) { + printf(Invalid boot partition number:\n); + printf(Boot partition number cannot be = 0\n); + printf(EMMC44 supports only 2 boot partitions\n); + return 1; + } + + if (strcmp(argv[1], open) == 0) + access = part_num; /* enable R/W access to boot part*/ + if (strcmp(argv[1], close) == 0) + access = 0; /* No access to boot partition */ + + /* acknowledge to be sent during boot operation */ + ack = 1; + return boot_part_access(mmc, ack, part_num, access); + + } else if (strcmp(argv[1], bootpart) == 0) { + int dev; + dev = simple_strtoul(argv[2], NULL, 10); + + u32 bootsize = simple_strtoul(argv[3], NULL, 10); + u32 rpmbsize = simple_strtoul(argv[4], NULL, 10); + struct mmc *mmc = find_mmc_device(dev); + if (!mmc) { + printf(no mmc
Re: [U-Boot] [PATCH] powerpc/lib: fix unsafe register handling in wait_ticks
On 01/27/2013 06:03 PM, Mats Kärrman wrote: If watchdog is enabled, the arch/powerpc/lib/ticks.S::wait_ticks() function calls the function specified by the WATCHDOG_RESET macro. The wait_ticks function depends on the registers r0, r6 and r7 being preserved however that is not guaranteed, e.g. if the reset function is a C function this will probably overwrite r0 and cause an endless loop. The following patch changes to using r14+r15 instead of r6+r7 (to resemble what would have been generated by a C compiler) and saves all necessary registers on the stack. The patch has been tested on a custom MPC5125 based machine using the 512x powerpc architecture. Signed-off-by: Mats Karrman mats.karr...@tritech.se Cc: Wolfgang Denk w...@denx.de Acked-by: Joakim Tjernlund joakim.tjernl...@transmode.se Thanks for this fix. I just reproduced this problem on another MPC5200 based board (a4m2k) while implementing watchdog support. And this patch fixes the problem (hangup in wait_ticks). So: Tested-by: Stefan Roese s...@denx.de Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 10/10] EXYNOS5: I2C: Added FDT and non-FDT support for I2C
Hi Simon, Please find the response below. Thanks Regards Amarendra Reddy On 27 January 2013 01:59, Simon Glass s...@chromium.org wrote: Hi Amar, On Tue, Jan 22, 2013 at 12:43 AM, Amar amarendra...@samsung.com wrote: This patch adds FDT and non-FDT support for I2C, and initialise the I2C channels. Signed-off-by: Amar amarendra...@samsung.com --- Changes since V4: New patch. drivers/i2c/s3c24x0_i2c.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index 769a2ba..f2a035c 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -524,11 +524,12 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) len) != 0); } -#ifdef CONFIG_OF_CONTROL void board_i2c_init(const void *blob) { + int i; +#ifdef CONFIG_OF_CONTROL int node_list[CONFIG_MAX_I2C_NUM]; - int count, i; + int count; count = fdtdec_find_aliases_for_id(blob, i2c, COMPAT_SAMSUNG_S3C2440_I2C, node_list, @@ -548,8 +549,16 @@ void board_i2c_init(const void *blob) bus-bus_num = i2c_busses++; exynos_pinmux_config(bus-id, 0); } +#else + for (i = 0; i CONFIG_MAX_I2C_NUM; i++) { + exynos_pinmux_config((PERIPH_ID_I2C0 + i), + PINMUX_FLAG_NONE); + } +#endif + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); I suggest this goes up one line, since it shouldn't be needed in the FDT case, right? Actually the function i2c_init() need not be called here. Only the pinmux configuration need to be done here. Hence i2c_init() call will be removed here. i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE) is called from arch/arm/lib/board.c which initialises I2C. } +#ifdef CONFIG_OF_CONTROL static struct s3c24x0_i2c_bus *get_bus(unsigned int bus_idx) { if (bus_idx i2c_busses) -- 1.8.0 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] mx23_olinuxino: Add support for status LED
On Sun, Jan 27, 2013 at 10:19 PM, Fabio Estevam feste...@gmail.com wrote: On Sun, Jan 27, 2013 at 8:08 PM, Otavio Salvador ota...@ossystems.com.br wrote: This allow user to know if the bootloader is running, even without a serial console. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v2: - Remove MUX setting - not need Why was the gpio mux setting removed? You need to configure it as gpio. The default setup worked fine. Should I keep them anyway? -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] FAT - problem with new mkcksum implementation
Hi Marek, your patch fs: fat: Fix mkcksum() function parameters (sha1: ff04f6d1224d8952b566b8671222151495883073) is causing the problem on xilinx zynq platform. Here is what I get as output when patch is in the tree. You see that all files are there twice and more. zynq-uboot fatls mmc 0 4045655 download.bit 4045655 download.bit 2729968 zimage 2729968 zimage 5256 zynq-zc702-adv7511.dtb 5256 zynq-z~1.dtb ubuntu/ ubuntu/ 4380524 boot.bin-14.1 4380524 bootbi~1.1 4359340 boot.bin-14.3 4359340 bootbi~1.3 4359340 boot.bin-latest 4359340 boot~1.bin 68044 output.bin 68044 output.bin 329044 boot.bin 329044 boot.bin zc702/ zc702/ 16 file(s), 4 dir(s) When I revert your patch I get the correct output zynq-uboot fatls mmc 0 4045655 download.bit 2729968 zimage 5256 zynq-zc702-adv7511.dtb ubuntu/ 4380524 boot.bin-14.1 4359340 boot.bin-14.3 4359340 boot.bin-latest 68044 output.bin 329044 boot.bin zc702/ 8 file(s), 2 dir(s) It is tested on mmc driver and here is information about SD card I use. VFAT support is also enabled. [~]$ sudo fdisk /dev/mmcblk0 [sudo] password for monstr: Command (m for help): p Disk /dev/mmcblk0: 3904 MB, 3904897024 bytes 4 heads, 16 sectors/track, 119168 cylinders, total 7626752 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x Device Boot Start End Blocks Id System /dev/mmcblk0p1 16 70399 35192b W95 FAT32 /dev/mmcblk0p2 70400 7626751 3778176 83 Linux I didn't look at background just bisect which patch introduced this problem. Any input from you will be useful. Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Exynos5: Add support for USB download boot mode
Exynos5250 supports secondary USB device boot mode. If the iROM fails to download u-boot from the primary boot device (such as SD or eMMC), it will try to retrieve from the secondary boot device (such as USB). Signed-off-by: Naveen Krishna Ch ch.nav...@samsung.com Signed-off-by: Simon Glass s...@chromium.org Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- NOTE: - Based on 'master' branch of u-boot-samsung. - Tested with smdk5250 for usb download mode. board/samsung/smdk5250/spl_boot.c | 40 +++- include/configs/exynos5250-dt.h |5 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/board/samsung/smdk5250/spl_boot.c b/board/samsung/smdk5250/spl_boot.c index d8f3c1e..c0bcf46 100644 --- a/board/samsung/smdk5250/spl_boot.c +++ b/board/samsung/smdk5250/spl_boot.c @@ -32,6 +32,21 @@ enum boot_mode { }; typedef u32 (*spi_copy_func_t)(u32 offset, u32 nblock, u32 dst); + typedef u32 (*usb_copy_func_t)(void); + +/* + * Set/clear program flow prediction and return the previous state. + */ +static int config_branch_prediction(int set_cr_z) +{ + unsigned int cr; + + /* System Control Register: 11th bit Z Branch prediction enable */ + cr = get_cr(); + set_cr(set_cr_z ? cr | CR_Z : cr ~CR_Z); + + return cr CR_Z; +} /* * Copy U-boot from mmc to RAM: @@ -41,10 +56,20 @@ enum boot_mode { void copy_uboot_to_ram(void) { spi_copy_func_t spi_copy; - enum boot_mode bootmode; + usb_copy_func_t usb_copy; + + int is_cr_z_set; + unsigned int sec_boot_check; + enum boot_mode bootmode = BOOT_MODE_OM; u32 (*copy_bl2)(u32, u32, u32); - bootmode = readl(EXYNOS5_POWER_BASE) OM_STAT; + /* Read iRAM location to check for secondary USB boot mode */ + sec_boot_check = readl(EXYNOS_IRAM_SECONDARY_BASE); + if (sec_boot_check == EXYNOS_USB_SECONDARY_BOOT) + bootmode = BOOT_MODE_USB; + + if (bootmode == BOOT_MODE_OM) + bootmode = readl(EXYNOS5_POWER_BASE) OM_STAT; switch (bootmode) { case BOOT_MODE_SERIAL: @@ -57,6 +82,17 @@ void copy_uboot_to_ram(void) copy_bl2(BL2_START_OFFSET, BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE); break; + case BOOT_MODE_USB: + /* +* iROM needs program flow prediction to be disabled +* before copy from USB device to RAM +*/ + is_cr_z_set = config_branch_prediction(0); + usb_copy = *(usb_copy_func_t *) + EXYNOS_COPY_USB_FNPTR_ADDR; + usb_copy(); + config_branch_prediction(is_cr_z_set); + break; default: break; } diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index cabd2f2..6728b0e 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -123,6 +123,11 @@ #define CONFIG_USB_EHCI_EXYNOS #define CONFIG_USB_STORAGE +/* USB boot mode */ +#define EXYNOS_COPY_USB_FNPTR_ADDR 0x02020070 +#define EXYNOS_USB_SECONDARY_BOOT 0xfeed0002 +#define EXYNOS_IRAM_SECONDARY_BASE 0x02020018 + /* MMC SPL */ #define CONFIG_SPL #define COPY_BL2_FNPTR_ADDR0x02020030 -- 1.7.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] serial: arm_dcc: Remove CONFIG_ARM_DCC_MULTI option
2013/1/26 Marek Vasut ma...@denx.de: Dear Michal Simek, CONFIG_ARM_DCC_MULTI should be also removed in the patch serial: Remove CONFIG_SERIAL_MULTI from serial drivers (sha1: a3827250606895ec2dd4b8d867342b7cabf3692f) Because the driver defines serial_* functions which cause conflict with serial.c (multiple definition of serial_*) Removing CONFIG_SERIAL_MULTI function also require to define default_serial_console for cases where another serial driver is not available in the system. Signed-off-by: Michal Simek michal.si...@xilinx.com I think it looks good. Acked-by: Marek Vasut ma...@denx.de Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/6] mxs: dma: Fix APBH DMA driver for MX23
On 23/01/2013 02:01, Marek Vasut wrote: The MX23 has less channels for the APBH DMA, sligtly different register layout and some bits in those registers are placed differently. Reflect this in the driver. This patch fixes MMC/DMA issue on MX23. Signed-off-by: Marek Vasut ma...@denx.de Cc: Otavio Salvador ota...@ossystems.com.br Cc: Fabio Estevam fabio.este...@freescale.com Cc: Stefano Babic sba...@denx.de --- Applied (whole patchset) to u-boot-imx, thanks. 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 v6 1/2] mx23_olinuxino: Add default environment
On 23/01/2013 21:30, Otavio Salvador wrote: This adds a default environment with support for MMC booting. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Applied (whole patchset) to u-boot-imx, thanks. 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 v6 2/2] mx23evk: Add initial board support
On 23/01/2013 21:30, Otavio Salvador wrote: The following features are supported: * 128 MB DDR1 SDRAM * DUART * SD/MMC Card Socket Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Applied (whole patchset) to u-boot-imx, thanks. 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
[U-Boot] [PATCH 0/9 v7] Add TMU support for Exynos5250 based SMDK5250
This patch series adds support for TMU driver using device tree for Exynos5250 based SMDK5250 board. Changes since v6: - Patch-1: None. - Patch-2: None. - Patch-3: None. - Patch-4: None. - Patch-5: None. - Patch-6: Integrated old and new code to exploit both tmu and i2c-dtt features simultaneously. - Patch-7: None. - Patch-8: Added 'Acked-by'. - Patch-9: Fixed spelling mistakes. Akshay Saraswat (9): EXYNOS5: TMU: Add driver for Thermal Management Unit EXYNOS5: Implement board_poweroff for Thermal Management Unit EXYNOS5: FDT: Add TMU device node values EXYNOS5: TMU: Add TMU init and status check EXYNOS5: Config: Enable support for Exynos TMU driver TMU: Add TMU support in dtt command EXYNOS5: Config: Enable dtt command for TMU EXYNOS5: TMU: Add hardware tripping EXYNOS5: FDT: Add a H/W-trip member to TMU node arch/arm/cpu/armv7/exynos/power.c | 25 ++ arch/arm/dts/exynos5250.dtsi |5 + arch/arm/include/asm/arch-exynos/exynos-tmu.h | 58 + arch/arm/include/asm/arch-exynos/power.h |6 + board/samsung/dts/exynos5250-smdk5250.dts | 13 + board/samsung/smdk5250/smdk5250.c | 35 +++ common/cmd_dtt.c | 22 ++ doc/device-tree-bindings/exynos/tmu.txt | 49 drivers/power/Makefile|1 + drivers/power/exynos-tmu.c| 317 + include/configs/exynos5250-dt.h |5 + include/fdtdec.h |1 + include/tmu.h | 46 lib/fdtdec.c |1 + 14 files changed, 584 insertions(+) create mode 100644 arch/arm/include/asm/arch-exynos/exynos-tmu.h create mode 100644 doc/device-tree-bindings/exynos/tmu.txt create mode 100644 drivers/power/exynos-tmu.c create mode 100644 include/tmu.h -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/9 v7] EXYNOS5: TMU: Add driver for Thermal Management Unit
Adding Exynos Thermal Management Unit driver to monitor SOC temperature and take actions corresponding to states of TMU. Signed-off-by: Akshay Saraswat aksha...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Changes since v6: - None. arch/arm/include/asm/arch-exynos/exynos-tmu.h | 58 + drivers/power/Makefile|1 + drivers/power/exynos-tmu.c| 302 + include/tmu.h | 46 4 files changed, 407 insertions(+) create mode 100644 arch/arm/include/asm/arch-exynos/exynos-tmu.h create mode 100644 drivers/power/exynos-tmu.c create mode 100644 include/tmu.h diff --git a/arch/arm/include/asm/arch-exynos/exynos-tmu.h b/arch/arm/include/asm/arch-exynos/exynos-tmu.h new file mode 100644 index 000..c79a520 --- /dev/null +++ b/arch/arm/include/asm/arch-exynos/exynos-tmu.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * Akshay Saraswat aksha...@samsung.com + * + * EXYNOS - Thermal Management Unit + * + * 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 version 2 as + * published by the Free Software Foundation. + * 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 __ASM_ARCH_TMU_H +#define __ASM_ARCH_TMU_H + +struct tmu_reg { + unsigned triminfo; + unsigned rsvd1; + unsigned rsvd2; + unsigned rsvd3; + unsigned rsvd4; + unsigned triminfo_control; + unsigned rsvd5; + unsigned rsvd6; + unsigned tmu_control; + unsigned rsvd7; + unsigned tmu_status; + unsigned sampling_internal; + unsigned counter_value0; + unsigned counter_value1; + unsigned rsvd8; + unsigned rsvd9; + unsigned current_temp; + unsigned rsvd10; + unsigned rsvd11; + unsigned rsvd12; + unsigned threshold_temp_rise; + unsigned threshold_temp_fall; + unsigned rsvd13; + unsigned rsvd14; + unsigned past_temp3_0; + unsigned past_temp7_4; + unsigned past_temp11_8; + unsigned past_temp15_12; + unsigned inten; + unsigned intstat; + unsigned intclear; + unsigned rsvd15; + unsigned emul_con; +}; +#endif /* __ASM_ARCH_THERMAL_H */ diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 8c71901..1dac16a 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -25,6 +25,7 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libpower.o +COBJS-$(CONFIG_EXYNOS_TMU) += exynos-tmu.o COBJS-$(CONFIG_FTPMU010_POWER) += ftpmu010.o COBJS-$(CONFIG_TPS6586X_POWER) += tps6586x.o COBJS-$(CONFIG_TWL4030_POWER) += twl4030.o diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c new file mode 100644 index 000..83a2572 --- /dev/null +++ b/drivers/power/exynos-tmu.c @@ -0,0 +1,302 @@ +/* + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * Akshay Saraswat aksha...@samsung.com + * + * EXYNOS - Thermal Management Unit + * + * 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 version 2 as + * published by the Free Software Foundation. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include errno.h +#include fdtdec.h +#include tmu.h +#include asm/arch/exynos-tmu.h + +#define TRIMINFO_RELOAD1 +#define CORE_EN1 + +#define INTEN_RISE01 +#define INTEN_RISE1(1 4) +#define INTEN_RISE2(1 8) +#define INTEN_FALL0(1 16) +#define INTEN_FALL1(1 20) +#define INTEN_FALL2(1 24) + +#define TRIM_INFO_MASK 0xff + +#define INTCLEAR_RISE0 1 +#define INTCLEAR_RISE1 (1 4) +#define INTCLEAR_RISE2 (1 8) +#define INTCLEAR_FALL0 (1 16) +#define INTCLEAR_FALL1 (1 20) +#define INTCLEAR_FALL2 (1 24) +#define INTCLEARALL(INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ +INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ +INTCLEAR_FALL1 | INTCLEAR_FALL2) + +/* Tmeperature threshold values for various thermal events */ +struct temperature_params { + /* minimum value in temperature code range */ + unsigned int min_val; + /* maximum value in
[U-Boot] [PATCH 2/9 v7] EXYNOS5: Implement board_poweroff for Thermal Management Unit
Adding API in power for system shutdown when tripping value is reached in Exynos Thermal Management Unit. Signed-off-by: Akshay Saraswat aksha...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Changes since v6: - None. arch/arm/cpu/armv7/exynos/power.c| 15 +++ arch/arm/include/asm/arch-exynos/power.h |1 + 2 files changed, 16 insertions(+) diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c index d4bce6d..73f764e 100644 --- a/arch/arm/cpu/armv7/exynos/power.c +++ b/arch/arm/cpu/armv7/exynos/power.c @@ -95,3 +95,18 @@ void set_dp_phy_ctrl(unsigned int enable) if (cpu_is_exynos5()) exynos5_dp_phy_control(enable); } + +/* + * This function never returns. + * When called this function makes system hang and PAD driving value high + * which in turn makes system power down. + */ +void board_poweroff(void) +{ + struct exynos5_power *power = + (struct exynos5_power *)samsung_get_base_power(); + + clrbits_le32(power-ps_hold_control, POWER_PS_HOLD_CONTROL_DATA_HIGH); + + hang(); +} diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h index d2fdb59..7463036 100644 --- a/arch/arm/include/asm/arch-exynos/power.h +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -863,5 +863,6 @@ void set_usbhost_phy_ctrl(unsigned int enable); void set_dp_phy_ctrl(unsigned int enable); #define EXYNOS_DP_PHY_ENABLE (1 0) +#define POWER_PS_HOLD_CONTROL_DATA_HIGH (1 8) #endif -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/9 v7] EXYNOS5: FDT: Add TMU device node values
Fdt entry for Exynos TMU driver specific pre-defined values used for calibration of current temperature and defining threshold values. Signed-off-by: Akshay Saraswat aksha...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Changes since v6: - None. arch/arm/dts/exynos5250.dtsi |5 board/samsung/dts/exynos5250-smdk5250.dts | 12 doc/device-tree-bindings/exynos/tmu.txt | 46 + include/fdtdec.h |1 + lib/fdtdec.c |1 + 5 files changed, 65 insertions(+) create mode 100644 doc/device-tree-bindings/exynos/tmu.txt diff --git a/arch/arm/dts/exynos5250.dtsi b/arch/arm/dts/exynos5250.dtsi index ed8c8dd..61d35a8 100644 --- a/arch/arm/dts/exynos5250.dtsi +++ b/arch/arm/dts/exynos5250.dtsi @@ -151,4 +151,9 @@ }; }; + tmu@1006 { + compatible = samsung,exynos-tmu; + reg = 0x1006 0x1; + }; + }; diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts index cbfab6f..00dac40 100644 --- a/board/samsung/dts/exynos5250-smdk5250.dts +++ b/board/samsung/dts/exynos5250-smdk5250.dts @@ -66,4 +66,16 @@ compatible = maxim,max77686_pmic; }; }; + + tmu@1006 { + samsung,min-temp= 25; + samsung,max-temp= 125; + samsung,start-warning = 95; + samsung,start-tripping = 105; + samsung,efuse-min-value = 40; + samsung,efuse-value = 55; + samsung,efuse-max-value = 100; + samsung,slope = 274761730; + samsung,dc-value= 25; + }; }; diff --git a/doc/device-tree-bindings/exynos/tmu.txt b/doc/device-tree-bindings/exynos/tmu.txt new file mode 100644 index 000..96c2598 --- /dev/null +++ b/doc/device-tree-bindings/exynos/tmu.txt @@ -0,0 +1,46 @@ +Exynos Thermal management Unit + +The device node for TMU that is a part of Exynos5250 +SOC is as described in the document Open Firmware Recommended +Practice : Universal Serial Bus with the following modifications +and additions: + +Required properties: + + - compatible : Should be samsung,exynos-tmu for TMU + - samsung,min-temp : Minimum temperature value (25 degree celsius) + - Current temperature of SoC should be more than this value. + - samsung,max-temp : Maximum temperature value (125 degree celsius) + - Current temperature of SoC should be less than this value. + - samsung,start-warning : Temperature at which TMU starts giving warning (degree celsius) + - samsung,start-tripping : Temperature at which system will trip and shutdown (degree celsius) + - samsung,efuse-min-value : SOC efuse min value (Constant 40) + - efuse-value should be more than this value. + - samsung,efuse-value : SOC actual efuse value (Literal value) + - This is the data trimming info. + - This value is used to calculate measuring error. + - samsung,efuse-max-value : SoC max efuse value (Constant 100) + - efuse-value should be less than this value. + - samsung,slope : Default value 274761730 (Constant 0x1060_8802). + - This is the default value for TMU_CONTROL register. + - It sets the gain of amplifier to the positive-tc generator block. + - It selects thermal tripping mode and enables thermal tripping. + - samsung,dc-value : Measured data calibration value (Constant 25) + - Used for tempearture calculation. + - This is 25 because temperature measured is always above 25 degrees. + + +Example: + +tmu@1006 { + compatible = samsung,exynos-tmu + samsung,min-temp = 25; + samsung,max-temp = 125; + samsung,start-warning = 95; + samsung,start-tripping = 105; + samsung,efuse-min-value = 40; + samsung,efuse-value = 55; + samsung,efuse-max-value = 100; + samsung,slope = 274761730; + samsung,dc-value = 25; +}; diff --git a/include/fdtdec.h b/include/fdtdec.h index f77d195..058fb51 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -79,6 +79,7 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS_EHCI, /* Exynos EHCI controller */ COMPAT_SAMSUNG_EXYNOS_USB_PHY, /* Exynos phy controller for usb2.0 */ COMPAT_MAXIM_MAX77686_PMIC, /* MAX77686 PMIC */ + COMPAT_SAMSUNG_EXYNOS_TMU, /* Exynos TMU */ COMPAT_COUNT, }; diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 16921e1..4613fcd 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -54,6 +54,7 @@ static const char * const compat_names[COMPAT_COUNT] = { COMPAT(SAMSUNG_EXYNOS_EHCI, samsung,exynos-ehci), COMPAT(SAMSUNG_EXYNOS_USB_PHY, samsung,exynos-usb-phy), COMPAT(MAXIM_MAX77686_PMIC, maxim,max77686_pmic), + COMPAT(SAMSUNG_EXYNOS_TMU, samsung,exynos-tmu), }; const char *fdtdec_get_compatible(enum
[U-Boot] [PATCH 5/9 v7] EXYNOS5: Config: Enable support for Exynos TMU driver
Enables TMU driver support for exynos5250 Signed-off-by: Akshay Saraswat aksha...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Changes since v6: - None. include/configs/exynos5250-dt.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index cabd2f2..53ca41f 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -117,6 +117,9 @@ #define CONFIG_BOOTDELAY 3 #define CONFIG_ZERO_BOOTDELAY_CHECK +/* Thermal Management Unit */ +#define CONFIG_EXYNOS_TMU + /* USB */ #define CONFIG_CMD_USB #define CONFIG_USB_EHCI -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/9 v7] TMU: Add TMU support in dtt command
Add generic TMU support alongwith i2c sensors in dtt command to enable temperature reading in cases where TMU is present instead of i2c sensors. Signed-off-by: Akshay Saraswat aksha...@samsung.com --- Changes since v6: - Integrated old code into one function to support both tmu and i2c-dtt. common/cmd_dtt.c | 72 +++--- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/common/cmd_dtt.c b/common/cmd_dtt.c index cd94423..c7d4ea4 100644 --- a/common/cmd_dtt.c +++ b/common/cmd_dtt.c @@ -27,52 +27,51 @@ #include dtt.h #include i2c.h +#include tmu.h -static unsigned long sensor_initialized; +#if ~defined CONFIG_SYS_DTT_BUS_NUM +#define CONFIG_DTT_SENSORS 0 +#endif -static void _initialize_dtt(void) +int dtt_tmu(void) { - int i; - unsigned char sensors[] = CONFIG_DTT_SENSORS; - - for (i = 0; i sizeof(sensors); i++) { - if ((sensor_initialized (1 i)) == 0) { - if (dtt_init_one(sensors[i]) != 0) { - printf(DTT%d: Failed init!\n, i); - continue; - } - sensor_initialized |= (1 i); - } + int cur_temp; + + /* Sense and return latest thermal info */ + if (tmu_monitor(cur_temp) == TMU_STATUS_INIT) { + puts(TMU is in unknown state, temperature is invalid\n); + return -1; + } else { + printf(Current temperature: %u degrees Celsius\n, cur_temp); + return 0; } } -void dtt_init(void) -{ - int old_bus; - - /* switch to correct I2C bus */ - old_bus = I2C_GET_BUS(); - I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM); - - _initialize_dtt(); - - /* switch back to original I2C bus */ - I2C_SET_BUS(old_bus); -} - -int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int dtt_init(void) { +#if CONFIG_DTT_SENSORS int i; - unsigned char sensors[] = CONFIG_DTT_SENSORS; int old_bus; + unsigned long sensor_initialized; + unsigned char sensors[] = CONFIG_DTT_SENSORS; /* Force a compilation error, if there are more then 32 sensors */ BUILD_BUG_ON(sizeof(sensors) 32); + /* switch to correct I2C bus */ old_bus = I2C_GET_BUS(); I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM); - _initialize_dtt(); + /* Initialize dtt sensors */ + for (i = 0; i sizeof(sensors); i++) { + if ((sensor_initialized (1 i)) == 0) { + if (dtt_init_one(sensors[i]) != 0) { + printf(DTT%d: Failed init!\n, i); + continue; + } + sensor_initialized |= (1 i); + } + } /* * Loop through sensors, read @@ -83,8 +82,21 @@ int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) /* switch back to original I2C bus */ I2C_SET_BUS(old_bus); +#endif return 0; +} + +int do_dtt(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + int err = 0; + +#if defined CONFIG_TMU_CMD_DTT + err |= dtt_tmu(); +#endif + err |= dtt_init(); + + return err; } /* do_dtt() */ /***/ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 8/9 v7] EXYNOS5: TMU: Add hardware tripping
This adds hardware tripping at 110 degrees celsius which must enable forced system shutdown in case TMU fails to power off. Signed-off-by: Akshay Saraswat aksha...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Changes since v6: - Added Acked-by. arch/arm/cpu/armv7/exynos/power.c| 10 ++ arch/arm/include/asm/arch-exynos/power.h |5 + drivers/power/exynos-tmu.c | 25 - 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c index 73f764e..d1d65e1 100644 --- a/arch/arm/cpu/armv7/exynos/power.c +++ b/arch/arm/cpu/armv7/exynos/power.c @@ -96,6 +96,16 @@ void set_dp_phy_ctrl(unsigned int enable) exynos5_dp_phy_control(enable); } +/* Enables hardware tripping to power off the system when TMU fails */ +void power_enable_hw_thermal_trip(void) +{ + struct exynos5_power *power = + (struct exynos5_power *)samsung_get_base_power(); + + /* PS_HOLD_CONTROL register ENABLE_HW_TRIP bit*/ + setbits_le32(power-ps_hold_control, POWER_ENABLE_HW_TRIP); +} + /* * This function never returns. * When called this function makes system hang and PAD driving value high diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h index 7463036..f14d19e 100644 --- a/arch/arm/include/asm/arch-exynos/power.h +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -857,6 +857,9 @@ void set_mipi_phy_ctrl(unsigned int dev_index, unsigned int enable); void set_usbhost_phy_ctrl(unsigned int enable); +/* Enables hardware tripping to power off the system when TMU fails */ +void power_enable_hw_thermal_trip(void); + #define POWER_USB_HOST_PHY_CTRL_EN (1 0) #define POWER_USB_HOST_PHY_CTRL_DISABLE(0 0) @@ -864,5 +867,7 @@ void set_dp_phy_ctrl(unsigned int enable); #define EXYNOS_DP_PHY_ENABLE (1 0) #define POWER_PS_HOLD_CONTROL_DATA_HIGH (1 8) +#define POWER_ENABLE_HW_TRIP (1UL 31) + #endif diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c index 83a2572..9d28614 100644 --- a/drivers/power/exynos-tmu.c +++ b/drivers/power/exynos-tmu.c @@ -22,9 +22,11 @@ #include fdtdec.h #include tmu.h #include asm/arch/exynos-tmu.h +#include asm/arch/power.h #define TRIMINFO_RELOAD1 #define CORE_EN1 +#define THERM_TRIP_EN (1 12) #define INTEN_RISE01 #define INTEN_RISE1(1 4) @@ -55,6 +57,8 @@ struct temperature_params { unsigned int start_warning; /* temperature threshold CPU tripping */ unsigned int start_tripping; + /* temperature threshold for HW tripping */ + unsigned int hardware_tripping; }; /* Pre-defined values and thresholds for calibration of current temperature */ @@ -195,6 +199,9 @@ int get_tmu_fdt_values(struct tmu_info *info, const void *blob) info-data.ts.start_tripping = fdtdec_get_int(blob, node, samsung,start-tripping, -1); error |= info-data.ts.start_tripping; + info-data.ts.hardware_tripping = fdtdec_get_int(blob, + node, samsung,hw-tripping, -1); + error |= info-data.ts.hardware_tripping; info-data.efuse_min_value = fdtdec_get_int(blob, node, samsung,efuse-min-value, -1); error |= info-data.efuse_min_value; @@ -228,7 +235,7 @@ int get_tmu_fdt_values(struct tmu_info *info, const void *blob) void tmu_setup_parameters(struct tmu_info *info) { unsigned int te_temp, con; - unsigned int warning_temp, trip_temp; + unsigned int warning_temp, trip_temp, hwtrip_temp; unsigned int cooling_temp; unsigned int rising_value; struct tmu_data *data = info-data; @@ -252,9 +259,14 @@ void tmu_setup_parameters(struct tmu_info *info) + info-te1 - info-dc_value; trip_temp = data-ts.start_tripping + info-te1 - info-dc_value; + hwtrip_temp = data-ts.hardware_tripping + + info-te1 - info-dc_value; + cooling_temp = 0; - rising_value = ((warning_temp 8) | (trip_temp 16)); + rising_value = ((warning_temp 8) | + (trip_temp 16) | + (hwtrip_temp 24)); /* Set interrupt level */ writel(rising_value, reg-threshold_temp_rise); @@ -274,12 +286,15 @@ void tmu_setup_parameters(struct tmu_info *info) /* TMU core enable */ con = readl(reg-tmu_control); - con |= CORE_EN; + con |= THERM_TRIP_EN | CORE_EN; writel(con, reg-tmu_control); - /* LEV0 LEV1 LEV2 interrupt enable */ - writel(INTEN_RISE0 | INTEN_RISE1 | INTEN_RISE2, reg-inten); + /* Enable HW thermal trip */ +
[U-Boot] [PATCH 4/9 v7] EXYNOS5: TMU: Add TMU init and status check
This adds call to tmu_init() and TMU boot time analysis for the SoC temperature threshold breach. Signed-off-by: Akshay Saraswat aksha...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Changes since v6: - None. board/samsung/smdk5250/smdk5250.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 7a5f132..7b9a8c5 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -35,9 +35,35 @@ #include asm/arch/sromc.h #include asm/arch/dp_info.h #include power/pmic.h +#include tmu.h DECLARE_GLOBAL_DATA_PTR; +#if defined CONFIG_EXYNOS_TMU +/* + * Boot Time Thermal Analysis for SoC temperature threshold breach + */ +void boot_temp_check(void) +{ + int temp; + + switch (tmu_monitor(temp)) { + case TMU_STATUS_TRIPPED: + puts(EXYNOS_TMU: TRIPPING! Device power going down ...\n); + board_poweroff(); + break; + case TMU_STATUS_WARNING: + puts(EXYNOS_TMU: WARNING! Temperature very high\n); + break; + case TMU_STATUS_NORMAL: + break; + case TMU_STATUS_INIT: + default: + debug(Unknown TMU state\n); + } +} +#endif + #ifdef CONFIG_USB_EHCI_EXYNOS int board_usb_vbus_init(void) { @@ -57,6 +83,15 @@ int board_usb_vbus_init(void) int board_init(void) { gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); + +#if defined CONFIG_EXYNOS_TMU + if (tmu_init(gd-fdt_blob)) { + debug(%s: Failed to init TMU\n, __func__); + return -1; + } + boot_temp_check(); +#endif + #ifdef CONFIG_EXYNOS_SPI spi_init(); #endif -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/9 v7] EXYNOS5: Config: Enable dtt command for TMU
This enables the dtt command to read the current SOC temperature with the help of TMU Signed-off-by: Akshay Saraswat aksha...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Changes since v6: - None. include/configs/exynos5250-dt.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 53ca41f..8a8e9fe 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -119,6 +119,8 @@ /* Thermal Management Unit */ #define CONFIG_EXYNOS_TMU +#define CONFIG_CMD_DTT +#define CONFIG_TMU_CMD_DTT /* USB */ #define CONFIG_CMD_USB -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 9/9 v7] EXYNOS5: FDT: Add a H/W-trip member to TMU node
This adds a member to TMU FDT node for providing hardware tripping temperature threshold. Signed-off-by: Akshay Saraswat aksha...@samsung.com --- Changes since v6: - Fixed spelling mistakes shutdowns and poweroff. board/samsung/dts/exynos5250-smdk5250.dts |1 + doc/device-tree-bindings/exynos/tmu.txt |5 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts index 00dac40..1c2d52d 100644 --- a/board/samsung/dts/exynos5250-smdk5250.dts +++ b/board/samsung/dts/exynos5250-smdk5250.dts @@ -72,6 +72,7 @@ samsung,max-temp= 125; samsung,start-warning = 95; samsung,start-tripping = 105; + samsung,hw-tripping = 110; samsung,efuse-min-value = 40; samsung,efuse-value = 55; samsung,efuse-max-value = 100; diff --git a/doc/device-tree-bindings/exynos/tmu.txt b/doc/device-tree-bindings/exynos/tmu.txt index 779b01c..424395e 100644 --- a/doc/device-tree-bindings/exynos/tmu.txt +++ b/doc/device-tree-bindings/exynos/tmu.txt @@ -13,7 +13,9 @@ Required properties: - samsung,max-temp : Maximum temperature value (125 degree celsius) - Current temperature of SoC should be less than this value. - samsung,start-warning : Temperature at which TMU starts giving warning (degree celsius) - - samsung,start-tripping : Temperature at which system will trip and shutdown (degree celsius) + - samsung,start-tripping : Temperature at which TMU shuts down the system (degree celsius) + - samsung,hw-tripping : Temperature at which hardware tripping should happen + in case TMU fails to power off (degree celsius) - samsung,efuse-min-value : SOC efuse min value (Constant 40) - efuse-value should be more than this value. - samsung,efuse-value : SOC actual efuse value (Literal value) @@ -38,6 +40,7 @@ tmu@1006 { samsung,max-temp = 125; samsung,start-warning = 95; samsung,start-tripping = 105; + samsung,hw-tripping = 110; samsung,efuse-min-value = 40; samsung,efuse-value = 55; samsung,efuse-max-value = 100; -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot build error [from v2013.01 onwards]
Dear Jagan Teki, In message CAD6G_RSuMebC=aippdmo5mxugheftmi-btvkvmhu5y8xypw...@mail.gmail.com you wrote: Note that the correct name with MAKEALL is the board target name _without_ the _config part. What does make -v report for you? [GNU Make 3.82 on my end.] Thanks for your note. GNU Make is 3.80 at my end. Well... make v3.80 is more than 10 years old (10/04/2002). Can you please try with a less antiquated version and see if this helps? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Veni, Vidi, VISA: I came, I saw, I did a little shopping. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot build error [from v2013.01 onwards]
Dear Jagan Teki, In message cad6g_rqv2jh8n6udjtuaku-s9auhvenrnefwnegnk_ounep...@mail.gmail.com you wrote: GNU Make is 3.80 at my end. I have just upgraded my Make from 3.80 to 3.81.. u-boot build works fine. Ah, thanks for reporting. But please note that v3.81 is still 7 years old. Why don't you use recent code (v3.82, wich actually is already 2.5 yeards old as well)? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything. - Karl Lehenbauer ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] mx23evk: Remove unneeded 'undef's
Rather than 'undef'ing some symbols, just remove them instead. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx23evk.h |2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index c44a8b8..51aa9c4 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -49,8 +49,6 @@ /* U-Boot Commands */ #include config_cmd_default.h -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DOS_PARTITION -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] mx23evk: Remove CONFIG_SYS_BAUDRATE_TABLE
The baudrate is already defined by CONFIG_BAUDRATE and there is no need to keep CONFIG_SYS_BAUDRATE_TABLE. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx23evk.h |1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index 51aa9c4..e43b93f 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -110,7 +110,6 @@ #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE } #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE115200 /* Default baud rate */ -#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } /* DMA */ #define CONFIG_APBH_DMA -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] mx23evk: Turn on caches
It is safe to turn on data and instruction caches for mx23. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx23evk.h |2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index e43b93f..ae8cf6c 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -33,8 +33,6 @@ #define CONFIG_MACH_TYPE MACH_TYPE_MX23EVK #define CONFIG_SYS_NO_FLASH -#define CONFIG_SYS_ICACHE_OFF -#define CONFIG_SYS_DCACHE_OFF #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_MISC_INIT -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mx23evk: Remove unneeded 'undef's
On Mon, Jan 28, 2013 at 9:40 AM, Fabio Estevam fabio.este...@freescale.com wrote: Rather than 'undef'ing some symbols, just remove them instead. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx23evk.h |2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index c44a8b8..51aa9c4 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -49,8 +49,6 @@ /* U-Boot Commands */ #include config_cmd_default.h -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DOS_PARTITION The problem is that the default cmd set include them; that's why I had the undef. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] mx23evk: Remove CONFIG_SYS_BAUDRATE_TABLE
On Mon, Jan 28, 2013 at 9:41 AM, Fabio Estevam fabio.este...@freescale.com wrote: The baudrate is already defined by CONFIG_BAUDRATE and there is no need to keep CONFIG_SYS_BAUDRATE_TABLE. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Otavio Salvador ota...@ossystems.com.br -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] mx23_olinuxino: Add support for status LED
On Mon, Jan 28, 2013 at 8:15 AM, Otavio Salvador ota...@ossystems.com.br wrote: The default setup worked fine. Should I keep them anyway? It's better to keep it rather than relying on the default one. Also, where does the 0x30a come from in: #defineSTATUS_LED_BIT 0x30a ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] mx23_olinuxino: Add support for status LED
On Mon, Jan 28, 2013 at 10:19 AM, Fabio Estevam feste...@gmail.com wrote: On Mon, Jan 28, 2013 at 8:15 AM, Otavio Salvador ota...@ossystems.com.br wrote: The default setup worked fine. Should I keep them anyway? It's better to keep it rather than relying on the default one. Ok; I will readd it. Also, where does the 0x30a come from in: #defineSTATUS_LED_BIT 0x30a This is MX23_PAD_SSP1_DETECT__GPIO_2_1; I tried to include iomux-mx23.h in the config file but it failed. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] mx23evk: Remove CONFIG_SYS_BAUDRATE_TABLE
Dear Fabio Estevam, The baudrate is already defined by CONFIG_BAUDRATE and there is no need to keep CONFIG_SYS_BAUDRATE_TABLE. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx23evk.h |1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index 51aa9c4..e43b93f 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -110,7 +110,6 @@ #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE } #define CONFIG_CONS_INDEX0 #define CONFIG_BAUDRATE 115200 /* Default baud rate */ -#define CONFIG_SYS_BAUDRATE_TABLE{ 9600, 19200, 38400, 57600, 115200 } This will not allow different baudrates now, will it? 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 3/3] mx23evk: Turn on caches
Dear Fabio Estevam, It is safe to turn on data and instruction caches for mx23. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx23evk.h |2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index e43b93f..ae8cf6c 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -33,8 +33,6 @@ #define CONFIG_MACH_TYPE MACH_TYPE_MX23EVK #define CONFIG_SYS_NO_FLASH -#define CONFIG_SYS_ICACHE_OFF -#define CONFIG_SYS_DCACHE_OFF #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_MISC_INIT Can you fix this for olinuxino (if not done already) too please? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] mx23evk: Turn on caches
On Mon, Jan 28, 2013 at 10:47 AM, Marek Vasut ma...@denx.de wrote: Can you fix this for olinuxino (if not done already) too please? mx23olinuxino has the caches turned on already. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] mx23evk: Remove CONFIG_SYS_BAUDRATE_TABLE
On Mon, Jan 28, 2013 at 10:46 AM, Marek Vasut ma...@denx.de wrote: This will not allow different baudrates now, will it? You still may change the baudrate if you need to. CONFIG_SYS_BAUDRATE_TABLE has been placed to a common place after the commit below: commit 26750c8aee2383a026e0cf89e9310628d3a5a6a0 Author: Tom Rini tr...@ti.com Date: Tue Jun 19 12:54:34 2012 + CONFIG_SYS_BAUDRATE_TABLE: Add config_fallbacks.h, place there We provide a default table of { 9600, 19200, 38400, 57600, 115200 } in config_fallbacks.h which mkconfig places after configs/...h in the generated config file. This is used when a board has not set its own table. Signed-off-by: Tom Rini tr...@ti.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] mx23evk: Remove CONFIG_SYS_BAUDRATE_TABLE
Dear Fabio Estevam, On Mon, Jan 28, 2013 at 10:46 AM, Marek Vasut ma...@denx.de wrote: This will not allow different baudrates now, will it? You still may change the baudrate if you need to. CONFIG_SYS_BAUDRATE_TABLE has been placed to a common place after the commit below: commit 26750c8aee2383a026e0cf89e9310628d3a5a6a0 Author: Tom Rini tr...@ti.com Date: Tue Jun 19 12:54:34 2012 + CONFIG_SYS_BAUDRATE_TABLE: Add config_fallbacks.h, place there We provide a default table of { 9600, 19200, 38400, 57600, 115200 } in config_fallbacks.h which mkconfig places after configs/...h in the generated config file. This is used when a board has not set its own table. Signed-off-by: Tom Rini tr...@ti.com Ok then I'd say -- kill 'em all!! Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] FAT - problem with new mkcksum implementation
Dear Michal Simek, Hi Marek, your patch fs: fat: Fix mkcksum() function parameters (sha1: ff04f6d1224d8952b566b8671222151495883073) is causing the problem on xilinx zynq platform. [PATCH] vfat: Fix mkcksum argument sizes Was probably not applied before release. Tom? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] FAT - problem with new mkcksum implementation
2013/1/28 Marek Vasut ma...@denx.de: Dear Michal Simek, Hi Marek, your patch fs: fat: Fix mkcksum() function parameters (sha1: ff04f6d1224d8952b566b8671222151495883073) is causing the problem on xilinx zynq platform. [PATCH] vfat: Fix mkcksum argument sizes Was probably not applied before release. Tom? yep. this patch fixed our issue. Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot build error [from v2013.01 onwards]
Hi Wolfgang Denk, On Mon, Jan 28, 2013 at 5:04 PM, Wolfgang Denk w...@denx.de wrote: Dear Jagan Teki, In message cad6g_rqv2jh8n6udjtuaku-s9auhvenrnefwnegnk_ounep...@mail.gmail.com you wrote: GNU Make is 3.80 at my end. I have just upgraded my Make from 3.80 to 3.81.. u-boot build works fine. Ah, thanks for reporting. But please note that v3.81 is still 7 years old. Why don't you use recent code (v3.82, wich actually is already 2.5 yeards old as well)? Sorry, I have a typo mistake actually I have upgraded to 3.82 only.. there build works fine.. Thanks, Jagan. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything. - Karl Lehenbauer ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] am335x: NAND, add BCH16 and 4k page size support
Please ignore this. This enables BCH16 by default, which shouldn't happen. I'll will fix this and send again On Mon, Jan 28, 2013 at 1:35 PM, Jordy van Wolferen jordyvanwolfe...@gmail.com wrote: --- arch/arm/include/asm/arch-am33xx/cpu.h | 8 +- arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 43 drivers/mtd/nand/omap_gpmc.c | 154 +-- include/linux/mtd/mtd-abi.h | 2 +- 4 files changed, 150 insertions(+), 57 deletions(-) diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h index 16e8a80..0a1f1ff 100644 --- a/arch/arm/include/asm/arch-am33xx/cpu.h +++ b/arch/arm/include/asm/arch-am33xx/cpu.h @@ -78,6 +78,10 @@ struct bch_res_0_3 { u32 bch_result_x[4]; }; +struct bch_res_4_6 { + u32 bch_result_x[3]; +}; + struct gpmc { u8 res1[0x10]; u32 sysconfig; /* 0x10 */ @@ -107,7 +111,9 @@ struct gpmc { u8 res7[12];/* 0x224 */ u32 testmomde_ctrl; /* 0x230 */ u8 res8[12];/* 0x234 */ - struct bch_res_0_3 bch_result_0_3[2]; /* 0x240 */ + struct bch_res_0_3 bch_result_0_3; /* 0x240 */ + u32 dummy[44]; /* not used */ + struct bch_res_4_6 bch_result_4_6; /* 300 */ }; /* Used for board specific gpmc initialization */ diff --git a/arch/arm/include/asm/arch-am33xx/omap_gpmc.h b/arch/arm/include/asm/arch-am33xx/omap_gpmc.h index 572f9d0..534fa6e 100644 --- a/arch/arm/include/asm/arch-am33xx/omap_gpmc.h +++ b/arch/arm/include/asm/arch-am33xx/omap_gpmc.h @@ -117,4 +117,47 @@ {.offset = 106,\ .length = 8 } } \ } + +#define GPMC_NAND_4K_HW_BCH8_ECC_LAYOUT {\ + .eccbytes = 112,\ + .eccpos = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\ + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,\ + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\ + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\ + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,\ + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,\ + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,\ + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,\ + 110, 111, 112, 113},\ + .oobfree = {\ + {.offset = 114,\ +.length = 110 } } \ +} + +#define GPMC_NAND_4K_HW_BCH16_ECC_LAYOUT {\ + .eccbytes = 208,\ + .eccpos = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\ + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,\ + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\ + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\ + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,\ + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,\ + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,\ + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,\ + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,\ + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,\ + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\ + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,\ + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\ + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,\ + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,\ + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,\ + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,\ + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209},\ + .oobfree = {\ + {.offset = 210,\ +.length = 14 } } \ +} #endif /* __ASM_ARCH_OMAP_GPMC_H */ diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index cee394e..5cdacc2 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -76,8 +76,8 @@ int omap_spl_dev_ready(struct mtd_info *mtd) /* * omap_hwecc_init - Initialize the Hardware ECC for NAND flash in - * GPMC controller - * @mtd:MTD device structure + * GPMC controller + * @mtd: MTD
Re: [U-Boot] [PATCH] powerpc/lib: fix unsafe register handling in wait_ticks
On 01/27/2013 06:03 PM, Mats Kärrman wrote: If watchdog is enabled, the arch/powerpc/lib/ticks.S::wait_ticks() function calls the function specified by the WATCHDOG_RESET macro. The wait_ticks function depends on the registers r0, r6 and r7 being preserved however that is not guaranteed, e.g. if the reset function is a C function this will probably overwrite r0 and cause an endless loop. The following patch changes to using r14+r15 instead of r6+r7 (to resemble what would have been generated by a C compiler) and saves all necessary registers on the stack. The patch has been tested on a custom MPC5125 based machine using the 512x powerpc architecture. Signed-off-by: Mats Karrman mats.karr...@tritech.se Cc: Wolfgang Denk w...@denx.de Acked-by: Joakim Tjernlund joakim.tjernl...@transmode.se Thanks for this fix. I just reproduced this problem on another MPC5200 based board (a4m2k) while implementing watchdog support. And this patch fixes the problem (hangup in wait_ticks). So: Tested-by: Stefan Roese s...@denx.de If someone wants to play with a C only impl. I THINK it this is a good starting point: #define WATCHDOG_RESET /*static inline */unsigned long long get_ticks(void) { union xx { unsigned long long r3_r4; struct yx { unsigned long r3; unsigned long r4; } xy; } res; register unsigned long tmp; do { asm (mftbu %0\n\t mftb %1\n\t mftbu %2 : =r(res.xy.r3), =r(res.xy.r4), =r(tmp)); } while (res.xy.r3 != tmp); return res.r3_r4; } wait_ticks(unsigned long wt) { unsigned long long ticks_end; ticks_end = get_ticks() + wt; WATCHDOG_RESET; do { } while((signed long long)ticks_end - (signed long long)get_ticks() = 0); } ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 1/2] mx23_olinuxino: Add default environment
Dear Stefano Babic, On 23/01/2013 21:30, Otavio Salvador wrote: This adds a default environment with support for MMC booting. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Applied (whole patchset) to u-boot-imx, thanks. Otavio, u-boot.sd is never generated for MX23, so the env is broken now. Please fix. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] am335x: NAND: add BCH16 and 4k page size support
This is tested with a custom AM3359 (rev 2.0) board. NAND chip: MT29F16G08ABABAWP This code allows me to boot from ROM code. The ROM code forces BCH16 on NAND chips with a 4k page size. BCH16 is not enabled by default. --- arch/arm/include/asm/arch-am33xx/cpu.h | 8 +- arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 43 drivers/mtd/nand/omap_gpmc.c | 150 +-- include/linux/mtd/mtd-abi.h | 2 +- 4 files changed, 148 insertions(+), 55 deletions(-) diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h index 16e8a80..0a1f1ff 100644 --- a/arch/arm/include/asm/arch-am33xx/cpu.h +++ b/arch/arm/include/asm/arch-am33xx/cpu.h @@ -78,6 +78,10 @@ struct bch_res_0_3 { u32 bch_result_x[4]; }; +struct bch_res_4_6 { + u32 bch_result_x[3]; +}; + struct gpmc { u8 res1[0x10]; u32 sysconfig; /* 0x10 */ @@ -107,7 +111,9 @@ struct gpmc { u8 res7[12];/* 0x224 */ u32 testmomde_ctrl; /* 0x230 */ u8 res8[12];/* 0x234 */ - struct bch_res_0_3 bch_result_0_3[2]; /* 0x240 */ + struct bch_res_0_3 bch_result_0_3; /* 0x240 */ + u32 dummy[44]; /* not used */ + struct bch_res_4_6 bch_result_4_6; /* 300 */ }; /* Used for board specific gpmc initialization */ diff --git a/arch/arm/include/asm/arch-am33xx/omap_gpmc.h b/arch/arm/include/asm/arch-am33xx/omap_gpmc.h index 572f9d0..534fa6e 100644 --- a/arch/arm/include/asm/arch-am33xx/omap_gpmc.h +++ b/arch/arm/include/asm/arch-am33xx/omap_gpmc.h @@ -117,4 +117,47 @@ {.offset = 106,\ .length = 8 } } \ } + +#define GPMC_NAND_4K_HW_BCH8_ECC_LAYOUT {\ + .eccbytes = 112,\ + .eccpos = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\ + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,\ + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\ + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\ + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,\ + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,\ + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,\ + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,\ + 110, 111, 112, 113},\ + .oobfree = {\ + {.offset = 114,\ +.length = 110 } } \ +} + +#define GPMC_NAND_4K_HW_BCH16_ECC_LAYOUT {\ + .eccbytes = 208,\ + .eccpos = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\ + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,\ + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\ + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\ + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,\ + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,\ + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,\ + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,\ + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,\ + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,\ + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\ + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,\ + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\ + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,\ + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,\ + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,\ + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,\ + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209},\ + .oobfree = {\ + {.offset = 210,\ +.length = 14 } } \ +} #endif /* __ASM_ARCH_OMAP_GPMC_H */ diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index cee394e..3c42a54 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -76,8 +76,8 @@ int omap_spl_dev_ready(struct mtd_info *mtd) /* * omap_hwecc_init - Initialize the Hardware ECC for NAND flash in - * GPMC controller - * @mtd:MTD device structure + * GPMC controller + * @mtd: MTD device structure * */ static void __maybe_unused omap_hwecc_init(struct nand_chip
Re: [U-Boot] [PATCH v6 1/2] mx23_olinuxino: Add default environment
On Mon, Jan 28, 2013 at 11:29 AM, Marek Vasut ma...@denx.de wrote: Dear Stefano Babic, On 23/01/2013 21:30, Otavio Salvador wrote: This adds a default environment with support for MMC booting. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Applied (whole patchset) to u-boot-imx, thanks. Otavio, u-boot.sd is never generated for MX23, so the env is broken now. Please fix. I proposed a patch for mxsboot which fixes it. I am waiting for your alternative patch for mxsboot. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 1/2] mx23_olinuxino: Add default environment
Dear Otavio Salvador, On Mon, Jan 28, 2013 at 11:29 AM, Marek Vasut ma...@denx.de wrote: Dear Stefano Babic, On 23/01/2013 21:30, Otavio Salvador wrote: This adds a default environment with support for MMC booting. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Applied (whole patchset) to u-boot-imx, thanks. Otavio, u-boot.sd is never generated for MX23, so the env is broken now. Please fix. I proposed a patch for mxsboot which fixes it. I am waiting for your alternative patch for mxsboot. There is no alternative patch, I'm still waiting for the resolution of the service RQ ticket. Did you hear anything from FSL already? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] FAT - problem with new mkcksum implementation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/28/2013 08:24 AM, Michal Simek wrote: 2013/1/28 Marek Vasut ma...@denx.de: Dear Michal Simek, Hi Marek, your patch fs: fat: Fix mkcksum() function parameters (sha1: ff04f6d1224d8952b566b8671222151495883073) is causing the problem on xilinx zynq platform. [PATCH] vfat: Fix mkcksum argument sizes Was probably not applied before release. Tom? yep. this patch fixed our issue. Please get me some tested-by and reviewed-by lines on the patch, thanks. - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRBo0DAAoJENk4IS6UOR1WlEYP/jPgjkos6HhAFv/XAP/4aVP8 gWA0nobx7W9o1yBNinQvPQumW6Bl+mKoZOzlmbnEJvFXDJWY3CIh1XDJdYpft4+P aBzQTnKaa98HkZoLtqIl3QQ8uZPiEG5ldG09n31ZqX8gmC+6ZOz1ebfrVtHpsbTD iWW/petDoj4j7qcN8FAqygQwm7wq6gRIg2pYf7ljEDq0NYu7H4AWVO4kCae2TGIT xL3Zb1pepP9aupFFPnvKW9EgPZaAigfosZRFyQey8A8JUe1tTgcWV5LuAq7rJSOa QSrz4z3CK6W/hOmQQrGNpdIQ80om2d63Rq9GYQIs8YfrsryhlhAGpV1GkgScdajn 4AfDGEZ98rbafdVrh3O1ZLnvY5hmxw66Y80n3onHOUgPL141PX773TIRAN0lN67Z Gc6Zm+W7+S0XkBBthg/Wgj9xn8aKIC/bvmIiVvvyqoqXzacn1f3912B5SOrX0fx/ 1AiT34leblgtz457iDYYHnuHJ5vvtvMN+2zU235yxdSYNrv8ql+KEy3Zx0zFiSGz oGnM4KBrLhrd+nIMLkzQ/vfClrelC3zVRyInmZlmixULNmlgHFxfEOrqigfVfmRG WTJg7BYzB8Kc+z4sJTkd1J/gb9eSnobtNh3uWvgYjaslXZVYx0MKAANPMjkthU/r neNYA3w1sSTFBVTJGY12 =qwEj -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] FAT - problem with new mkcksum implementation
2013/1/28 Tom Rini tr...@ti.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/28/2013 08:24 AM, Michal Simek wrote: 2013/1/28 Marek Vasut ma...@denx.de: Dear Michal Simek, Hi Marek, your patch fs: fat: Fix mkcksum() function parameters (sha1: ff04f6d1224d8952b566b8671222151495883073) is causing the problem on xilinx zynq platform. [PATCH] vfat: Fix mkcksum argument sizes Was probably not applied before release. Tom? yep. this patch fixed our issue. Please get me some tested-by and reviewed-by lines on the patch, thanks. ok. Tested-by: Michal Simek michal.si...@xilinx.com Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 1/2] mx23_olinuxino: Add default environment
On Mon, Jan 28, 2013 at 12:05 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 11:29 AM, Marek Vasut ma...@denx.de wrote: Dear Stefano Babic, On 23/01/2013 21:30, Otavio Salvador wrote: This adds a default environment with support for MMC booting. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Applied (whole patchset) to u-boot-imx, thanks. Otavio, u-boot.sd is never generated for MX23, so the env is broken now. Please fix. I proposed a patch for mxsboot which fixes it. I am waiting for your alternative patch for mxsboot. There is no alternative patch, There're; mine solution was a small header with 4 sector offset; yours was to reuse mx28 header and move it to 4 sectors offset. Both works for MX23. ... I'm still waiting for the resolution of the service RQ ticket. Did you hear anything from FSL already? Nothing yet but I think we can go with either solutions for now and depending on their feedback in future we can change it. I see no reason to hold a fix due it. We know two ways how to make it work so let's pick one and go with it for now. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/2] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
This fixes the gpio_led driver which needs to compare againt a STATUS_LED_ON to enable a led. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: None Changes in v2: None common/cmd_led.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/cmd_led.c b/common/cmd_led.c index 7f5ab43..84f79fa 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -110,13 +110,15 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (led_commands[i].on) led_commands[i].on(); else - __led_set(led_commands[i].mask, 1); + __led_set(led_commands[i].mask, + STATUS_LED_ON); break; case LED_OFF: if (led_commands[i].off) led_commands[i].off(); else - __led_set(led_commands[i].mask, 0); + __led_set(led_commands[i].mask, + STATUS_LED_OFF); break; case LED_TOGGLE: if (led_commands[i].toggle) -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED
This allow user to know if the bootloader is running, even without a serial console. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: - Added the MUX settings back (requested by Fabio) - Added name of the PIN in the board config file Changes in v2: - Remove MUX setting - not need board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 +++ board/olimex/mx23_olinuxino/spl_boot.c | 4 include/configs/mx23_olinuxino.h | 12 3 files changed, 23 insertions(+) diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 6a6053b..2501417 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -28,6 +28,9 @@ #include asm/arch/imx-regs.h #include asm/arch/clock.h #include asm/arch/sys_proto.h +#ifdef CONFIG_STATUS_LED +#include status_led.h +#endif DECLARE_GLOBAL_DATA_PTR; @@ -67,5 +70,9 @@ int board_init(void) /* Adress of boot parameters */ gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; +#if defined(CONFIG_STATUS_LED) defined(STATUS_LED_BOOT) + status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE); +#endif + return 0; } diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 7def8bc..3bbf5ad 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -84,6 +84,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI, MX23_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI, + /* Green LED */ + MX23_PAD_SSP1_DETECT__GPIO_2_1 | + (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL), + /* MMC 0 */ MX23_PAD_SSP1_CMD__SSP1_CMD | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA0__SSP1_DATA0 | MUX_CONFIG_SSP, diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index 7983c5d..ef8aaae 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -56,6 +56,7 @@ #defineCONFIG_CMD_EXT2 #defineCONFIG_CMD_FAT #defineCONFIG_CMD_GPIO +#defineCONFIG_CMD_LED #defineCONFIG_CMD_MMC /* @@ -112,6 +113,17 @@ #defineCONFIG_BAUDRATE 115200 /* Default baud rate */ /* + * Status LED + */ +#defineCONFIG_STATUS_LED +#defineCONFIG_GPIO_LED +#defineCONFIG_BOARD_SPECIFIC_LED +#defineSTATUS_LED_BOOT 0 +#defineSTATUS_LED_BIT 0x030a /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ +#defineSTATUS_LED_STATESTATUS_LED_ON +#defineSTATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) + +/* * MMC Driver */ #ifdef CONFIG_CMD_MMC -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED
Dear Otavio Salvador, [..] /* + * Status LED + */ +#define CONFIG_STATUS_LED +#define CONFIG_GPIO_LED +#define CONFIG_BOARD_SPECIFIC_LED +#define STATUS_LED_BOOT 0 +#define STATUS_LED_BIT 0x030a /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ Just use MX23_PAD_SSP1_DETECT__GPIO_2_1 directly ? +#define STATUS_LED_STATESTATUS_LED_ON +#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) + +/* * MMC Driver */ #ifdef CONFIG_CMD_MMC 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 v6 1/2] mx23_olinuxino: Add default environment
Dear Otavio Salvador, On Mon, Jan 28, 2013 at 12:05 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 11:29 AM, Marek Vasut ma...@denx.de wrote: Dear Stefano Babic, On 23/01/2013 21:30, Otavio Salvador wrote: This adds a default environment with support for MMC booting. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Applied (whole patchset) to u-boot-imx, thanks. Otavio, u-boot.sd is never generated for MX23, so the env is broken now. Please fix. I proposed a patch for mxsboot which fixes it. I am waiting for your alternative patch for mxsboot. There is no alternative patch, There're; mine solution was a small header with 4 sector offset; yours was to reuse mx28 header and move it to 4 sectors offset. Both works for MX23. ... I'm still waiting for the resolution of the service RQ ticket. Did you hear anything from FSL already? Nothing yet but I think we can go with either solutions for now and depending on their feedback in future we can change it. I see no reason to hold a fix due it. It's no fix, it's random code with no documentation backing it. We know two ways how to make it work so let's pick one and go with it for now. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br 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] vfat: Fix mkcksum argument sizes
2013/1/11 Marek Vasut ma...@denx.de: In case a function argument is known/fixed size array in C, the argument is still decoyed as pointer instead ( T f(U n[k]) ~= T fn(U *n) ) and therefore calling sizeof on the function argument will result in the size of the pointer, not the size of the array. The VFAT code contains such a bug, this patch fixes it. Reported-by: Aaron Williams aaron.willi...@cavium.com Signed-off-by: Marek Vasut ma...@denx.de Cc: Tom Rini tom.r...@gmail.com Cc: Aaron Williams aaron.willi...@cavium.com --- fs/fat/fat.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Tested-by: Michal Simek michal.si...@xilinx.com Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED
On Mon, Jan 28, 2013 at 1:10 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, [..] /* + * Status LED + */ +#define CONFIG_STATUS_LED +#define CONFIG_GPIO_LED +#define CONFIG_BOARD_SPECIFIC_LED +#define STATUS_LED_BOOT 0 +#define STATUS_LED_BIT 0x030a /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ Just use MX23_PAD_SSP1_DETECT__GPIO_2_1 directly ? make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/otavio/hacking/u-boot/drivers/mtd/spi' status_led.c:46:7: error: 'MX23_PAD_SSP1_DETECT__GPIO_2_1' undeclared here (not in a function) make[1]: Entering directory `/home/otavio/hacking/u-boot/drivers/mtd/ubi' ... -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED
Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:10 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, [..] /* + * Status LED + */ +#define CONFIG_STATUS_LED +#define CONFIG_GPIO_LED +#define CONFIG_BOARD_SPECIFIC_LED +#define STATUS_LED_BOOT 0 +#define STATUS_LED_BIT 0x030a /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ Just use MX23_PAD_SSP1_DETECT__GPIO_2_1 directly ? make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/otavio/hacking/u-boot/drivers/mtd/spi' status_led.c:46:7: error: 'MX23_PAD_SSP1_DETECT__GPIO_2_1' undeclared here (not in a function) #include iomux-mx23 missing ? make[1]: Entering directory `/home/otavio/hacking/u-boot/drivers/mtd/ubi' ... -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED
On Mon, Jan 28, 2013 at 1:18 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:10 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, [..] /* + * Status LED + */ +#define CONFIG_STATUS_LED +#define CONFIG_GPIO_LED +#define CONFIG_BOARD_SPECIFIC_LED +#define STATUS_LED_BOOT 0 +#define STATUS_LED_BIT 0x030a /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ Just use MX23_PAD_SSP1_DETECT__GPIO_2_1 directly ? make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/otavio/hacking/u-boot/drivers/mtd/spi' status_led.c:46:7: error: 'MX23_PAD_SSP1_DETECT__GPIO_2_1' undeclared here (not in a function) #include iomux-mx23 missing ? ... make[1]: Entering directory `/home/otavio/hacking/u-boot/tools' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h: Assembler messages: /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:38: Error: bad instruction `typedef u32 iomux_cfg_t' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:112: Error: bad instruction `static inline unsigned int PAD_BANK(iomux_cfg_t pad)' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:113: Error: junk at end of line, first unrecognized character is `{' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:114: Error: bad instruction `return (pad((iomux_cfg_t)0x70))0' ... I had try it before of course ;) -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/2] mx23_olinuxino: Add support for status LED
Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:18 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:10 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, [..] /* + * Status LED + */ +#define CONFIG_STATUS_LED +#define CONFIG_GPIO_LED +#define CONFIG_BOARD_SPECIFIC_LED +#define STATUS_LED_BOOT 0 +#define STATUS_LED_BIT 0x030a /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ Just use MX23_PAD_SSP1_DETECT__GPIO_2_1 directly ? make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/otavio/hacking/u-boot/drivers/mtd/spi' status_led.c:46:7: error: 'MX23_PAD_SSP1_DETECT__GPIO_2_1' undeclared here (not in a function) #include iomux-mx23 missing ? ... make[1]: Entering directory `/home/otavio/hacking/u-boot/tools' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h: Assembler messages: /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:38: Error: bad instruction `typedef u32 iomux_cfg_t' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:112: Error: bad instruction `static inline unsigned int PAD_BANK(iomux_cfg_t pad)' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:113: Error: junk at end of line, first unrecognized character is `{' /home/otavio/hacking/u-boot/include/asm/arch/iomux.h:114: Error: bad instruction `return (pad((iomux_cfg_t)0x70))0' ... I had try it before of course ;) So iomux.h is not safe to be included in assembler fixes ... fix it with some ifdef __ASSEMBLY__ as the rest of the header files are . Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/3] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
This fixes the gpio_led driver which needs to compare againt a STATUS_LED_ON to enable a led. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: None Changes in v3: None Changes in v2: None common/cmd_led.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/cmd_led.c b/common/cmd_led.c index 7f5ab43..84f79fa 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -110,13 +110,15 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (led_commands[i].on) led_commands[i].on(); else - __led_set(led_commands[i].mask, 1); + __led_set(led_commands[i].mask, + STATUS_LED_ON); break; case LED_OFF: if (led_commands[i].off) led_commands[i].off(); else - __led_set(led_commands[i].mask, 0); + __led_set(led_commands[i].mask, + STATUS_LED_OFF); break; case LED_TOGGLE: if (led_commands[i].toggle) -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/3] mxs: Fix iomux.h to not break build during assembly stage
Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + /* * IOMUX/PAD Bit field definitions * @@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count); +#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/ -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 3/3] mx23_olinuxino: Add support for status LED
This allow user to know if the bootloader is running, even without a serial console. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - Use MUX PIN macro Changes in v3: - Added the MUX settings back (requested by Fabio) - Added name of the PIN in the board config file Changes in v2: - Remove MUX setting - not need board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 +++ board/olimex/mx23_olinuxino/spl_boot.c | 4 include/configs/mx23_olinuxino.h | 14 ++ 3 files changed, 25 insertions(+) diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 6a6053b..2501417 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -28,6 +28,9 @@ #include asm/arch/imx-regs.h #include asm/arch/clock.h #include asm/arch/sys_proto.h +#ifdef CONFIG_STATUS_LED +#include status_led.h +#endif DECLARE_GLOBAL_DATA_PTR; @@ -67,5 +70,9 @@ int board_init(void) /* Adress of boot parameters */ gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; +#if defined(CONFIG_STATUS_LED) defined(STATUS_LED_BOOT) + status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE); +#endif + return 0; } diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 7def8bc..3bbf5ad 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -84,6 +84,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI, MX23_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI, + /* Green LED */ + MX23_PAD_SSP1_DETECT__GPIO_2_1 | + (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL), + /* MMC 0 */ MX23_PAD_SSP1_CMD__SSP1_CMD | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA0__SSP1_DATA0 | MUX_CONFIG_SSP, diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index 7983c5d..d019944 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -19,6 +19,8 @@ #ifndef __MX23_OLINUXINO_CONFIG_H__ #define __MX23_OLINUXINO_CONFIG_H__ +#include asm/arch/iomux-mx23.h + /* * SoC configurations */ @@ -56,6 +58,7 @@ #defineCONFIG_CMD_EXT2 #defineCONFIG_CMD_FAT #defineCONFIG_CMD_GPIO +#defineCONFIG_CMD_LED #defineCONFIG_CMD_MMC /* @@ -112,6 +115,17 @@ #defineCONFIG_BAUDRATE 115200 /* Default baud rate */ /* + * Status LED + */ +#defineCONFIG_STATUS_LED +#defineCONFIG_GPIO_LED +#defineCONFIG_BOARD_SPECIFIC_LED +#defineSTATUS_LED_BOOT 0 +#defineSTATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1 +#defineSTATUS_LED_STATESTATUS_LED_ON +#defineSTATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) + +/* * MMC Driver */ #ifdef CONFIG_CMD_MMC -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/3] mxs: Fix iomux.h to not break build during assembly stage
Dear Otavio Salvador, Missing commit message. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + Is this needed? /* * IOMUX/PAD Bit field definitions * @@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count); +#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/ 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 v4 2/3] mxs: Fix iomux.h to not break build during assembly stage
On Mon, Jan 28, 2013 at 1:57 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, Missing commit message. I think short description is clear enough. What you'd like me to put in long one? Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + Is this needed? Yes; or I would not have added it right? :) /* * IOMUX/PAD Bit field definitions * @@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count); +#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/ Best regards, Marek Vasut -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/7] Move Tegra EHCI drive to correct place
On 01/27/2013 04:48 PM, Marek Vasut wrote: Dear Stephen Warren, On 01/25/2013 07:26 PM, Marek Vasut wrote: Dear Lucas Stach, This moves out the Tegra EHCI driver from a platform specific directory to the standard driver/usb/host dir. This is a preparation needed to share this driver between Tegra20 and Tegra30. No functional change in here, so Tegra30 is still not working. Patch 6 could be a lot smaller if it were generated with -B, as GIT would detect that most of it is moving stuff over, but last time I did this it prevented git apply to work. So sorry for the big diff. I think I incorporated all changes needed to reflect the review feedback I got on this last time. I expect this series to go in through the Tegra tree. Last two don't apply, I applied first five and pushed. Marek, what about any conflicts this will cause with other patches in the Tegra tree? Especially since Lucas *explicitly* stated that he expected the series to go through the Tegra tree, I expect that some co-ordination is required here Ok, I can drop them from -USB, will you pick them ? I must have missed that part. That's a question for Tom. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/3] mxs: Fix iomux.h to not break build during assembly stage
Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:57 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, Missing commit message. I think short description is clear enough. What you'd like me to put in long one? Reasoning why this patch is necessary. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + Is this needed? Yes; or I would not have added it right? :) Why is it needed? /* * IOMUX/PAD Bit field definitions * @@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count); +#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/ Best regards, Marek Vasut -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br 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 02/10] lcd, tegra: remove unused cursor functions
Jeroen, -Original Message- From: Jeroen Hofstee [mailto:jer...@myspectrum.nl] Sent: Saturday, January 26, 2013 9:20 AM To: Tom Warren Cc: Simon Glass; u-boot@lists.denx.de; Anatolij Gustschin Subject: Re: [U-Boot] [PATCH 02/10] lcd, tegra: remove unused cursor functions Hello Tom, On 01/25/2013 10:18 PM, Tom Warren wrote: Jeroen, How will this all go in? Do you expect Anatolij to take it in via the main repo (u-boot.git/master)? I am not sure I understand exactly what you mean, but yes there are some conflicts awaiting. 2 pending drivers and another lcd cleanup patch. And yes I think it is easier to rebase those then to rebase this and Wolfgang's patch (if that is what you're asking), since the variables are deleted step by step. So simply not adding them is easier then getting rid of them again. The other lcd cleanup is smaller. I don't know how much trouble the board config changes will cause. To not break the pending drivers a new version of http://patchwork.ozlabs.org/patch/212378/ is needed though, since it does not apply after this patch set. Since that patch contains 2 lines, that should be easy (or can be manually merged by Anatolij). But it is up to Anatolij, how this actually goes in and to which branch. That's all I was asking - if I would be responsible for the tegra portion of the patch, or if it would all go in to TOT master. I'll take your response to mean that I have nothing to do here for the u-boot-tegra repo. Thanks Regards, Jeroen -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/7] Move Tegra EHCI drive to correct place
Marek, -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: Sunday, January 27, 2013 4:49 PM To: Stephen Warren Cc: Lucas Stach; u-boot@lists.denx.de; Tom Warren; Simon Glass Subject: Re: [PATCH v2 0/7] Move Tegra EHCI drive to correct place Dear Stephen Warren, On 01/25/2013 07:26 PM, Marek Vasut wrote: Dear Lucas Stach, This moves out the Tegra EHCI driver from a platform specific directory to the standard driver/usb/host dir. This is a preparation needed to share this driver between Tegra20 and Tegra30. No functional change in here, so Tegra30 is still not working. Patch 6 could be a lot smaller if it were generated with -B, as GIT would detect that most of it is moving stuff over, but last time I did this it prevented git apply to work. So sorry for the big diff. I think I incorporated all changes needed to reflect the review feedback I got on this last time. I expect this series to go in through the Tegra tree. Last two don't apply, I applied first five and pushed. Marek, what about any conflicts this will cause with other patches in the Tegra tree? Especially since Lucas *explicitly* stated that he expected the series to go through the Tegra tree, I expect that some co-ordination is required here Ok, I can drop them from -USB, will you pick them ? I must have missed that part. These will go thru the Tegra tree when they've gotten some review time (Simon just Acked some of them), and when Lucas fixes the build warning in patch 6. I'm waiting on a V2 patchset from Lucas, which I'd have thought would be clear from even a cursory read of the threads reviews for this series. Tom If nothing else, 01-05 build-test cleanly ;-) Best regards, Marek Vasut -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/3] mxs: Fix iomux.h to not break build during assembly stage
On Mon, Jan 28, 2013 at 2:16 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:57 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, Missing commit message. I think short description is clear enough. What you'd like me to put in long one? Reasoning why this patch is necessary. Well, it seems quite clear it fix a build failure when it is used in assembly stage; it is clear enough for me, in the shortlog Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + Is this needed? Yes; or I would not have added it right? :) Why is it needed? /* * IOMUX/PAD Bit field definitions * @@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count); +#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/ Best regards, Marek Vasut -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br Best regards, Marek Vasut -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: fdt: add back missing host1x node
Albert, -Original Message- From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] Sent: Saturday, January 26, 2013 3:57 AM To: Allen Martin Cc: Tom Warren; swar...@wwwdotorg.org; u-boot@lists.denx.de Subject: Re: [PATCH] tegra: fdt: add back missing host1x node Hi Allen, On Fri, 25 Jan 2013 16:51:09 -0800, Allen Martin amar...@nvidia.com wrote: Hi Albert, would it be possible for you to apply this directly to your u-boot-arm repository? It fixes a regression introduced by my previous patch: b7723f3 tegra: fdt: sort dts files So I wanted to make sure it gets applied before that previous patch makes it to u-boot/master, and Tom's not ready to do another tegra pull request yet. -Allen Actually, I did not take Tom's PR as it caused some warnings. Maybe your fix can get in the TI tree before a fixed PR is sent out? Have you got the right Tom? This is for the Tegra tree (u-boot-tegra), not TI, Tom Warren, not Tom Rini. My PR *has* been taken into the ARM/master branch, AFAICT, and I never release PRs with warnings or errors that aren't already pre-existing in other ARM builds (VCMA9 and smdk2410, for instance). Allen's fix is for a Tegra DT file, not for any TI board/SoC/etc. Thanks, Tom Amicalement, -- Albert. -- Nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/3] mxs: Fix iomux.h to not break build during assembly stage
Dear Otavio Salvador, On Mon, Jan 28, 2013 at 2:16 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:57 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, Missing commit message. I think short description is clear enough. What you'd like me to put in long one? Reasoning why this patch is necessary. Well, it seems quite clear it fix a build failure when it is used in assembly stage; it is clear enough for me, in the shortlog I don't understand why did you also add the header below. That's not clear. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + Is this needed? Yes; or I would not have added it right? :) Why is it needed? Here, I fail to understand what this has to do with fixing the inclusion of this in assembly files. 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 v3] console: USB: KBD: Fix incorrect autoboot timeout
Dear Tom Warren, Wolfgang, -Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Saturday, January 26, 2013 6:14 AM To: Marek Vasut Cc: Jim Lin; u-boot@lists.denx.de; Tom Warren; tr...@ti.com; albert.u.b...@aribaud.net Subject: Re: [PATCH 1/1 v3] console: USB: KBD: Fix incorrect autoboot timeout Dear Marek Vasut, In message 201301260417.54768.ma...@denx.de you wrote: Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are defined in configuration file and when tstc() function for checking key pressed takes longer time than 10 ms (e.g., 50 ms) to finish. Signed-off-by: Jim Lin ji...@nvidia.com Applied to u-boot-usb This is common code, and essentially unrelated to USB. It should go through Tom, not through the USB repo. Why do you expect this to go thru the Tegra tree? Tom Rini ... you're not the only Tom around here :p [...] 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 v3] console: USB: KBD: Fix incorrect autoboot timeout
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/28/2013 11:30 AM, Tom Warren wrote: Wolfgang, -Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Saturday, January 26, 2013 6:14 AM To: Marek Vasut Cc: Jim Lin; u-boot@lists.denx.de; Tom Warren; tr...@ti.com; albert.u.b...@aribaud.net Subject: Re: [PATCH 1/1 v3] console: USB: KBD: Fix incorrect autoboot timeout Dear Marek Vasut, In message 201301260417.54768.ma...@denx.de you wrote: Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are defined in configuration file and when tstc() function for checking key pressed takes longer time than 10 ms (e.g., 50 ms) to finish. Signed-off-by: Jim Lin ji...@nvidia.com Applied to u-boot-usb This is common code, and essentially unrelated to USB. It should go through Tom, not through the USB repo. Why do you expect this to go thru the Tegra tree? It's common code - shouldn't it at least go thru my parent repo (ARM), if no directly into u-boot.git/master? I think he means me :) - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRBqk8AAoJENk4IS6UOR1WnqwQAI0Gpysj7oZjelcF7XDYVOPu /9rIsi3ZiB5+xtENWTBV08Y8GKpfNIdqMyMqQ3V6kWFSTAVzoNZDtoX3KX01Vvc8 SZ8LDlpQFzW1cCYxLcRdXIOmCXrUoc/qoJgbmYYHrnlZOHmSW1rrZTE2iW9QUe69 4YfmWDD5sVx/fGKXZvbzYu1Nt24qWtCXxGZ0jWBv3mPpvOtnyfePeUKdHhakn8PE eTI9MUXXsOCX4Sbj2anPKbmp+W4f6bKvl0OpBBQNHSuD5tYthuM/YTpmhwSnaGtr 8QiJNIc7nliSmQh4y0XrIqEaN3KC6oIN6VjO2uM5+TVern9HYIazy+uXXRvQvA5c wq+Xb2mxIZf4vet9BbAWIpNN7w5I6adnC1APM5I47IMQyxGfesi4cdt6JY/X4M+z xr9DZo4kcmszhAfSNH12MndQfutH6INcZeOpMFFZe+2h51XrbufUsT3mNwvsmcCT 6+Ef1VoMfpB0ZrCPxk969twm8sXarD2d6KW5uO/jDJF3ENoXIUEEbZpT8Sz/mlgJ 9bNyddsEptXS4mRoUszcWItc5Stok1fNYmECkknpPFOm01s7x6XUuRBpV72jFiwM +/d7K+wAH8jm9y0Ij2Ya3w8bKnilEAA3nJpbr5K9wPLEFqNrX++es/44lxQGb/vI OjPexZLYrEG9okXEC83v =cV3l -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 1/3] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
This fixes the gpio_led driver which needs to compare againt a STATUS_LED_ON to enable a led. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None common/cmd_led.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/cmd_led.c b/common/cmd_led.c index 7f5ab43..84f79fa 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -110,13 +110,15 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (led_commands[i].on) led_commands[i].on(); else - __led_set(led_commands[i].mask, 1); + __led_set(led_commands[i].mask, + STATUS_LED_ON); break; case LED_OFF: if (led_commands[i].off) led_commands[i].off(); else - __led_set(led_commands[i].mask, 0); + __led_set(led_commands[i].mask, + STATUS_LED_OFF); break; case LED_TOGGLE: if (led_commands[i].toggle) -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 2/3] mxs: Fix iomux.h to not break build during assembly stage
This fixes the build failure when included in mx23_olinuxino.h board config; the addition of asm/types.h is due u32 being otherwise undefined. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v5: - Extend commit log Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + /* * IOMUX/PAD Bit field definitions * @@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count); +#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/ -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 3/3] mx23_olinuxino: Add support for status LED
This allow user to know if the bootloader is running, even without a serial console. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v5: None Changes in v4: - Use MUX PIN macro Changes in v3: - Added the MUX settings back (requested by Fabio) - Added name of the PIN in the board config file Changes in v2: - Remove MUX setting - not need board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 +++ board/olimex/mx23_olinuxino/spl_boot.c | 4 include/configs/mx23_olinuxino.h | 14 ++ 3 files changed, 25 insertions(+) diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 6a6053b..2501417 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -28,6 +28,9 @@ #include asm/arch/imx-regs.h #include asm/arch/clock.h #include asm/arch/sys_proto.h +#ifdef CONFIG_STATUS_LED +#include status_led.h +#endif DECLARE_GLOBAL_DATA_PTR; @@ -67,5 +70,9 @@ int board_init(void) /* Adress of boot parameters */ gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; +#if defined(CONFIG_STATUS_LED) defined(STATUS_LED_BOOT) + status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE); +#endif + return 0; } diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 7def8bc..3bbf5ad 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -84,6 +84,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI, MX23_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI, + /* Green LED */ + MX23_PAD_SSP1_DETECT__GPIO_2_1 | + (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL), + /* MMC 0 */ MX23_PAD_SSP1_CMD__SSP1_CMD | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA0__SSP1_DATA0 | MUX_CONFIG_SSP, diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index 7983c5d..d019944 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -19,6 +19,8 @@ #ifndef __MX23_OLINUXINO_CONFIG_H__ #define __MX23_OLINUXINO_CONFIG_H__ +#include asm/arch/iomux-mx23.h + /* * SoC configurations */ @@ -56,6 +58,7 @@ #defineCONFIG_CMD_EXT2 #defineCONFIG_CMD_FAT #defineCONFIG_CMD_GPIO +#defineCONFIG_CMD_LED #defineCONFIG_CMD_MMC /* @@ -112,6 +115,17 @@ #defineCONFIG_BAUDRATE 115200 /* Default baud rate */ /* + * Status LED + */ +#defineCONFIG_STATUS_LED +#defineCONFIG_GPIO_LED +#defineCONFIG_BOARD_SPECIFIC_LED +#defineSTATUS_LED_BOOT 0 +#defineSTATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1 +#defineSTATUS_LED_STATESTATUS_LED_ON +#defineSTATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) + +/* * MMC Driver */ #ifdef CONFIG_CMD_MMC -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/3] mxs: Fix iomux.h to not break build during assembly stage
On Mon, Jan 28, 2013 at 2:35 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 2:16 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Mon, Jan 28, 2013 at 1:57 PM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, Missing commit message. I think short description is clear enough. What you'd like me to put in long one? Reasoning why this patch is necessary. Well, it seems quite clear it fix a build failure when it is used in assembly stage; it is clear enough for me, in the shortlog I don't understand why did you also add the header below. That's not clear. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v4: - New patch Changes in v3: None Changes in v2: None arch/arm/include/asm/arch-mxs/iomux.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__ +#ifndef __ASSEMBLY__ + +#include asm/types.h + Is this needed? Yes; or I would not have added it right? :) Why is it needed? Here, I fail to understand what this has to do with fixing the inclusion of this in assembly files. I sent v5; hope it is fine now. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: fdt: add back missing host1x node
Hi Tom, On Mon, 28 Jan 2013 08:35:25 -0800, Tom Warren twar...@nvidia.com wrote: Albert, -Original Message- From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] Sent: Saturday, January 26, 2013 3:57 AM To: Allen Martin Cc: Tom Warren; swar...@wwwdotorg.org; u-boot@lists.denx.de Subject: Re: [PATCH] tegra: fdt: add back missing host1x node Hi Allen, On Fri, 25 Jan 2013 16:51:09 -0800, Allen Martin amar...@nvidia.com wrote: Hi Albert, would it be possible for you to apply this directly to your u-boot-arm repository? It fixes a regression introduced by my previous patch: b7723f3 tegra: fdt: sort dts files So I wanted to make sure it gets applied before that previous patch makes it to u-boot/master, and Tom's not ready to do another tegra pull request yet. -Allen Actually, I did not take Tom's PR as it caused some warnings. Maybe your fix can get in the TI tree before a fixed PR is sent out? Have you got the right Tom? This is for the Tegra tree (u-boot-tegra), not TI, Tom Warren, not Tom Rini. My PR *has* been taken into the ARM/master branch, AFAICT, and I never release PRs with warnings or errors that aren't already pre-existing in other ARM builds (VCMA9 and smdk2410, for instance). Allen's fix is for a Tegra DT file, not for any TI board/SoC/etc. My bad -- I've indeed mixed up Toms here. Thanks, Tom Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] mx23_olinuxino: Add support for status LED
On Mon, Jan 28, 2013 at 1:51 PM, Otavio Salvador ota...@ossystems.com.br wrote: /* + * Status LED + */ +#defineCONFIG_STATUS_LED +#defineCONFIG_GPIO_LED +#defineCONFIG_BOARD_SPECIFIC_LED +#defineSTATUS_LED_BOOT 0 +#defineSTATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1 Is this really correct? #define MX23_PAD_SSP1_DETECT__GPIO_2_1 MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_GPIO) Does the LED API need this symbol? I thought that you would only need to setup this pin as GPIO and then define something like: +#defineSTATUS_LED_BIT 1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] usb: mxs: Disable USB Port 1 for i.MX23
The i.MX23 just one USB port so disable the second controller probe when building for i.MX23. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- drivers/usb/host/ehci-mxs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 5062af5..28c8cde 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -50,10 +50,12 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) usb_base = MXS_USBCTRL0_BASE; phy_base = MXS_USBPHY0_BASE; break; +#ifdef CONFIG_MX28 case 1: usb_base = MXS_USBCTRL1_BASE; phy_base = MXS_USBPHY1_BASE; break; +#endif default: printf(CONFIG_EHCI_MXS_PORT (port = %d)\n, port); return -1; -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] mx23evk: Enable USB support
Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- include/configs/mx23evk.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index d206c95..99dfb8f 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -58,6 +58,7 @@ #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO #define CONFIG_CMD_MMC +#define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ /* Memory configurations */ @@ -122,6 +123,15 @@ #define CONFIG_MXS_MMC #endif +/* USB */ +#ifdef CONFIG_CMD_USB +#defineCONFIG_USB_EHCI +#defineCONFIG_USB_EHCI_MXS +#defineCONFIG_EHCI_MXS_PORT 0 +#defineCONFIG_EHCI_IS_TDI +#defineCONFIG_USB_STORAGE +#endif + /* Boot Linux */ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] mx23_olinuxino: Enable USB support
Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- include/configs/mx23_olinuxino.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index d019944..e081c49 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -60,6 +60,7 @@ #defineCONFIG_CMD_GPIO #defineCONFIG_CMD_LED #defineCONFIG_CMD_MMC +#defineCONFIG_CMD_USB /* * Memory configurations @@ -140,6 +141,15 @@ */ #define CONFIG_APBH_DMA +/* USB */ +#ifdef CONFIG_CMD_USB +#defineCONFIG_USB_EHCI +#defineCONFIG_USB_EHCI_MXS +#defineCONFIG_EHCI_MXS_PORT 0 +#defineCONFIG_EHCI_IS_TDI +#defineCONFIG_USB_STORAGE +#endif + /* * Boot Linux */ -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support
Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- board/olimex/mx23_olinuxino/mx23_olinuxino.c | 8 ++ board/olimex/mx23_olinuxino/spl_boot.c | 4 +++ include/configs/mx23_olinuxino.h | 41 ++-- 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..6077d70 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -53,6 +53,14 @@ int dram_init(void) return mxs_dram_init(); } +#ifdef CONFIG_CMD_NET +int board_eth_init(bd_t *bis) +{ + /* Power-on Ethernet */ + gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1); +} +#endif + #ifdef CONFIG_CMD_MMC static int mx23_olx_mmc_cd(int id) { diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..8f7ba0b 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP, MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP, + + /* Ethernet */ + MX23_PAD_GPMI_ALE__GPIO_0_17 | + (MXS_PAD_12MA | MXS_PAD_3V3), }; void board_init_ll(void) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index e081c49..9adbb9c 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -55,11 +55,13 @@ #defineCONFIG_DOS_PARTITION #defineCONFIG_CMD_CACHE +#defineCONFIG_CMD_DHCP #defineCONFIG_CMD_EXT2 #defineCONFIG_CMD_FAT #defineCONFIG_CMD_GPIO #defineCONFIG_CMD_LED #defineCONFIG_CMD_MMC +#defineCONFIG_CMD_NET #defineCONFIG_CMD_USB /* @@ -150,6 +152,12 @@ #defineCONFIG_USB_STORAGE #endif +/* Ethernet */ +#ifdef CONFIG_CMD_NET +#defineCONFIG_USB_HOST_ETHER +#defineCONFIG_USB_ETHER_SMSC95XX +#endif + /* * Boot Linux */ @@ -175,6 +183,7 @@ /* * Extra Environments */ + #define CONFIG_EXTRA_ENV_SETTINGS \ update_sd_firmware_filename=u-boot.sd\0 \ update_sd_firmware= /* Update the SD firmware partition */ \ @@ -191,6 +200,8 @@ fdt_file=imx23-olinuxino.dtb\0 \ fdt_addr=0x4100\0 \ boot_fdt=try\0 \ + ip_dyn=yes\0 \ + usbethaddr=00:11:22:33:44:55\0 \ mmcdev=0\0 \ mmcpart=2\0 \ mmcroot=/dev/mmcblk0p3 rw rootwait\0 \ @@ -216,6 +227,31 @@ fi; \ else \ bootm; \ + fi;\0 \ + netargs=setenv bootargs console=${console_mainline},${baudrate} \ + root=/dev/nfs \ + ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0 \ + netboot=echo Booting from net ...; \ + usb start; \ + run netargs; \ + if test ${ip_dyn} = yes; then \ + setenv get_cmd dhcp; \ + else \ + setenv get_cmd tftp; \ + fi; \ + ${get_cmd} ${uimage}; \ + if test ${boot_fdt} = yes; then \ + if ${get_cmd} ${fdt_addr} ${fdt_file}; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo WARN: Cannot load the DT; \ + fi; \ + fi; \ + else \ + bootm; \ fi;\0 #define CONFIG_BOOTCOMMAND \ @@ -225,10 +261,9 @@ else \ if run loaduimage; then \ run mmcboot; \ - else \ - echo ERR: Fail to boot from MMC; \ + else run netboot; \ fi; \ fi; \ - else exit; fi + else run netboot; fi #endif /* __MX23_OLINUXINO_CONFIG_H__ */ -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] mx23_olinuxino: Add support for status LED
On Mon, Jan 28, 2013 at 4:59 PM, Fabio Estevam feste...@gmail.com wrote: On Mon, Jan 28, 2013 at 1:51 PM, Otavio Salvador ota...@ossystems.com.br wrote: /* + * Status LED + */ +#defineCONFIG_STATUS_LED +#defineCONFIG_GPIO_LED +#defineCONFIG_BOARD_SPECIFIC_LED +#defineSTATUS_LED_BOOT 0 +#defineSTATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1 Is this really correct? #define MX23_PAD_SSP1_DETECT__GPIO_2_1 MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_GPIO) Does the LED API need this symbol? I thought that you would only need to setup this pin as GPIO and then define something like: +#defineSTATUS_LED_BIT 1 Maybe it can be done in a better way ... but I failed to figure the GPIO number to use. Any hint? -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support
On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador ota...@ossystems.com.br wrote: + ip_dyn=yes\0 \ + usbethaddr=00:11:22:33:44:55\0 \ You should not hardcode a MAC address. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support
On Mon, Jan 28, 2013 at 5:12 PM, Fabio Estevam feste...@gmail.com wrote: On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador ota...@ossystems.com.br wrote: + ip_dyn=yes\0 \ + usbethaddr=00:11:22:33:44:55\0 \ You should not hardcode a MAC address. It does not provide one. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support
Dear Otavio Salvador, On Mon, Jan 28, 2013 at 5:12 PM, Fabio Estevam feste...@gmail.com wrote: On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador ota...@ossystems.com.br wrote: + ip_dyn=yes\0 \ + usbethaddr=00:11:22:33:44:55\0 \ You should not hardcode a MAC address. It does not provide one. Your dongle? Then leave that up to user. Besides, there's a tool in tools/ for generating a random MAC. 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 3/4] mx23_olinuxino: Enable USB support
Dear Otavio Salvador, Missing commit message ... _AGAIN_ ... how many times do I have to repeat myself? Write it down or something already :/ Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- include/configs/mx23_olinuxino.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index d019944..e081c49 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -60,6 +60,7 @@ #define CONFIG_CMD_GPIO #define CONFIG_CMD_LED #define CONFIG_CMD_MMC +#define CONFIG_CMD_USB /* * Memory configurations @@ -140,6 +141,15 @@ */ #define CONFIG_APBH_DMA +/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT 0 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + /* * Boot Linux */ 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 4/4] mx23_olinuxino: Add ethernet support
On Mon, Jan 28, 2013 at 5:13 PM, Otavio Salvador ota...@ossystems.com.br wrote: You should not hardcode a MAC address. It does not provide one. Right, but you can not force all olinuxino boards to have the same MAC address, so just remove the MAC setting and each one can set its own. Also, please read: http://www.denx.de/wiki/view/DULG/WhereCanIGetAValidMACAddresshttp://www.denx.de/wiki/view/DULG/WhereCanIGetAValidMACAddress ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support
Dear Otavio Salvador, And again ... NAK Anyway, will the hub function properly if you toggle the GPIO in board_eth_init? I dont think so. [..] Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot