[U-Boot] [PATCH] arm: ls1021atwr: program the regulator for deep sleep
Program the external regulator to switch off voltage in deep sleep. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- board/freescale/ls1021atwr/ls1021atwr.c | 34 + 1 file changed, 34 insertions(+) diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index 2c8d6d1..37ec0ba 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -578,6 +578,37 @@ struct smmu_stream_id dev_stream_id[] = { { 0x18c, 0x0e, DEBUG }, }; +#ifdef CONFIG_DEEP_SLEEP +/* program the regulator (MC34VR500) to support deep sleep */ +void ls1twr_program_regulator(void) +{ + unsigned int i2c_bus; + u8 i2c_device_id; + +#define LS1TWR_I2C_BUS_MC34VR500 1 +#define MC34VR500_ADDR 0x8 +#define MC34VR500_DEVICEID 0x4 +#define MC34VR500_DEVICEID_MASK0x0f + + i2c_bus = i2c_get_bus_num(); + i2c_set_bus_num(LS1TWR_I2C_BUS_MC34VR500); + i2c_device_id = i2c_reg_read(MC34VR500_ADDR, 0x0) + MC34VR500_DEVICEID_MASK; + if (i2c_device_id != MC34VR500_DEVICEID) { + printf(The regulator (MC34VR500) does not exist. The device does not support deep sleep.\n); + return; + } + + i2c_reg_write(MC34VR500_ADDR, 0x31, 0x4); + i2c_reg_write(MC34VR500_ADDR, 0x4d, 0x4); + i2c_reg_write(MC34VR500_ADDR, 0x6d, 0x38); + i2c_reg_write(MC34VR500_ADDR, 0x6f, 0x37); + i2c_reg_write(MC34VR500_ADDR, 0x71, 0x30); + + i2c_set_bus_num(i2c_bus); +} +#endif + int board_init(void) { #ifndef CONFIG_SYS_FSL_NO_SERDES @@ -600,6 +631,9 @@ int board_init(void) u_qe_init(); #endif +#ifdef CONFIG_DEEP_SLEEP + ls1twr_program_regulator(); +#endif return 0; } -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
Hi 2015-05-14 7:08 GMT+02:00 Tim Harvey thar...@gateworks.com: The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING indicated by OCOTP_CFG3[17:16] which is at 0x440 in the Fusemap Description Table. Return this frequency so that it can be used elsewhere. Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the their Fusemap Description Table however Freescale has confirmed that these eFUSE bits match the description within the IMX6DQRM and that they will be added to the next revision of the respective reference manuals. These have been tested with IMX6 Quad/Solo/Dual-light 800Mhz and 1GHz grades. Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/cpu/armv7/mx6/soc.c | 41 +++ arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + 2 files changed, 42 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index dd34138..71fa1fb 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -83,6 +83,47 @@ u32 get_cpu_rev(void) return (type 12) | (reg + 0x10); } +/* + * OCOTP_CFG3[17:16] (see Fusemap Description Table offset 0x440) + * defines a 2-bit SPEED_GRADING + */ +#define OCOTP_CFG3_SPEED_SHIFT 16 +#define OCOTP_CFG3_SPEED_800MHZ0 +#define OCOTP_CFG3_SPEED_850MHZ1 +#define OCOTP_CFG3_SPEED_1GHZ 2 +#define OCOTP_CFG3_SPEED_1P2GHZ3 Note: 0x3 is defined as reserved (IMX6DQRM Rev 2, 06/2014). + +u32 get_cpu_speed_grade_hz(void) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = ocotp-bank[0]; + struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank-fuse_regs; + uint32_t val; + + val = readl(fuse-cfg3); + val = OCOTP_CFG3_SPEED_SHIFT; + val = 0x3; + + switch (val) { + /* Valid for IMX6DQ */ + case OCOTP_CFG3_SPEED_1P2GHZ: + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + return 12; + /* Valid for IMX6SX/IMX6SDL/IMX6DQ */ + case OCOTP_CFG3_SPEED_1GHZ: + return 99600; + /* Valid for IMX6DQ */ + case OCOTP_CFG3_SPEED_850MHZ: + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + return 85200; + /* Valid for IMX6SX/IMX6SDL/IMX6DQ */ + case OCOTP_CFG3_SPEED_800MHZ: + return 79200; + } + return 0; Do we really need the ifs inside the cases? The speed grading fuse value is read only and we must simply life with the value we read back. So I would drop the is_cpu_type(..) thing. greets -- Christian Gmeiner, MSc https://soundcloud.com/christian-gmeiner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] bugfix i.mx6 pwm: prevent overflow of period_c * duty_ns
On 06/05/2015 09:57, Brecht Neyrinck wrote: Prevent overflow by casting duty_ns to ull first. This bug came up when trying to create a 200 Hz PWM Signed-off-by: Brecht Neyrinck b...@psicontrol.com --- drivers/pwm/pwm-imx-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-imx-util.c b/drivers/pwm/pwm-imx-util.c index f1d0b35..79d86028 100644 --- a/drivers/pwm/pwm-imx-util.c +++ b/drivers/pwm/pwm-imx-util.c @@ -56,7 +56,7 @@ int pwm_imx_get_parms(int period_ns, int duty_ns, unsigned long *period_c, *prescale = *period_c / 0x1 + 1; *period_c /= *prescale; - c = (unsigned long long)(*period_c * duty_ns); + c = *period_c * (unsigned long long)duty_ns; do_div(c, period_ns); *duty_c = c; Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [patchv2] socfpga: move configuration options to config file
On Tue 2015-04-21 12:23:07, Pavel Machek wrote: Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config. Signed-off-by: Pavel Machek pa...@denx.de Ping? Please apply. --- v2: You need to add these to common/Kconfig as well as to your defconfig. Otherwise, they do not appear in the .config file. There exist CMD_RUN, CMD_PING, CMD_USB in common/Kconfig, but most of the others are missing. Ok, I did conversion only for those present in Kconfig. diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig index 0ebfbfc..5cfc56c 100644 --- a/configs/socfpga_cyclone5_defconfig +++ b/configs/socfpga_cyclone5_defconfig @@ -6,3 +6,8 @@ CONFIG_DEFAULT_DEVICE_TREE=socfpga_cyclone5_socdk CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_FPGA=y +CONFIG_CMD_NET=y +CONFIG_CMD_PING=y +CONFIG_CMD_USB=y diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig index 873b721..0cde0e9 100644 --- a/configs/socfpga_socrates_defconfig +++ b/configs/socfpga_socrates_defconfig @@ -6,3 +6,8 @@ CONFIG_DEFAULT_DEVICE_TREE=socfpga_cyclone5_socrates CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_FPGA=y +CONFIG_CMD_NET=y +CONFIG_CMD_PING=y +CONFIG_CMD_USB=y diff --git a/include/configs/socfpga_cyclone5.h b/include/configs/socfpga_cyclone5.h index 2e3a8b6..93a0572 100644 --- a/include/configs/socfpga_cyclone5.h +++ b/include/configs/socfpga_cyclone5.h @@ -22,19 +22,14 @@ #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_CACHE #define CONFIG_CMD_DFU -#define CONFIG_CMD_DHCP #define CONFIG_CMD_EXT4 #define CONFIG_CMD_EXT4_WRITE #define CONFIG_CMD_FAT -#define CONFIG_CMD_FPGA #define CONFIG_CMD_FS_GENERIC #define CONFIG_CMD_GREPENV #define CONFIG_CMD_MII #define CONFIG_CMD_MMC -#define CONFIG_CMD_NET -#define CONFIG_CMD_PING #define CONFIG_CMD_SETEXPR -#define CONFIG_CMD_USB #define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_REGEX /* Enable regular expression support */ -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/10 v2] i.MX6: move duplicated options to mx6_common to standardise mx6 config
Hi Peter, Soeren, On 11/05/2015 20:43, Soeren Moch wrote: Reviewed-by: Eric Nelson eric.nel...@boundarydevices.com Besides my comments on patch 8/10, for the whole series (especially the tbs2910 part): Acked-by: Soeren Moch sm...@web.de Thanks for this great cleanup! I will add my thanks for this great clean-up. Soeren, as you Acked this patchset, I will merge it together with you patches for tbs2910 [1..4], dropping patch 5. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/4] autoboot.c: Add feature to stop autobooting via SHA256 encrypted password
Hi Stefan, On 8 May 2015 at 09:52, Stefan Roese s...@denx.de wrote: This patch adds the feature to only stop the autobooting, and therefor boot into the U-Boot prompt, when the input string / password matches a values that is encypted via a SHA256 hash and saved in the environment. This feature is enabled by defined these config options: CONFIG_AUTOBOOT_KEYED CONFIG_AUTOBOOT_STOP_STR_SHA256 Signed-off-by: Stefan Roese s...@denx.de Cc: Simon Glass s...@chromium.org Cc: Magnus Lilja lilja.mag...@gmail.com --- v2: - AUTOBOOT_STOP_STR_SHA256 is a string and not bool - Add input key length check as suggested by Magnus - Add constant-length time compare function as suggested by Magnus May I ask why you don't go all the way and use the salt mechanism instead of just hashing the password? Regards; Magnus ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/4] autoboot.c: Add feature to stop autobooting via SHA256 encrypted password
Hi Magnus, On 15.05.2015 09:44, Magnus Lilja wrote: On 8 May 2015 at 09:52, Stefan Roese s...@denx.de wrote: This patch adds the feature to only stop the autobooting, and therefor boot into the U-Boot prompt, when the input string / password matches a values that is encypted via a SHA256 hash and saved in the environment. This feature is enabled by defined these config options: CONFIG_AUTOBOOT_KEYED CONFIG_AUTOBOOT_STOP_STR_SHA256 Signed-off-by: Stefan Roese s...@denx.de Cc: Simon Glass s...@chromium.org Cc: Magnus Lilja lilja.mag...@gmail.com --- v2: - AUTOBOOT_STOP_STR_SHA256 is a string and not bool - Add input key length check as suggested by Magnus - Add constant-length time compare function as suggested by Magnus May I ask why you don't go all the way and use the salt mechanism instead of just hashing the password? Because its a customer requirement to implement it in this simple way. Even though cracking will be easier than by using this salt mechanism. If someone needs this stronger encryption support at some time, I suggest to add it as an additional feature / option then. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] mv-common.h: Include support for device trees
On 14.05.2015 01:17, Kevin Smith wrote: Signed-off-by: Kevin Smith kevin.sm...@elecsyscorp.com --- include/configs/mv-common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index 51436da..03518b0 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -59,6 +59,8 @@ #define CONFIG_BOOTDELAY 3 /* default enable autoboot */ #define CONFIG_PREBOOT +#define CONFIG_OF_LIBFDT 1 /* Device tree support */ To enable this option, no value is needed. So #define CONFIG_OF_LIBFDT/* Device tree support */ should do as well and is preferred. Acked-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 v1 1/4] Kconfig: Enable usage of escape char '\' in string values
Hi Stefan, 2015-05-15 16:13 GMT+09:00 Stefan Roese s...@denx.de: Hi Masahiro, On 13.05.2015 03:34, Masahiro Yamada wrote: Hi, Simon, Stefan, 2015-05-12 7:41 GMT+09:00 Simon Glass s...@chromium.org: Hi Stefan, On 11 May 2015 at 07:27, Stefan Roese m...@roese.nl wrote: Hi Simon, Hi Masahiro, On 11.05.2015 09:58, Stefan Roese wrote: On 10.05.2015 16:48, Simon Glass wrote: On 7 May 2015 at 06:13, Stefan Roese s...@denx.de wrote: I might have missed something, but I failed to use the escape char '\' in strings. To pass a printf format string like foo %d bar\n via Kconfig to the code. Right now its not possible to use the escape character '\' in Kconfig string values correctly to e.g. set this string value test output\n. The '\n' will be converted to 'n'. The current implementation removes some of the '\' chars from the input string in conf_set_sym_val(). Examples: '\' - '' '\\'- '\' '\\\' - '\' '' - '\\' ... And then doubles the backslash chars in the output string in sym_escape_string_value(). Example: '\' - '' - '' '\\'- '\' - '\\' '\\\' - '\' - '\\' '' - '\\' - '' ... As you see in these examples, its impossible to generate a single '\' charater in the output string as its needed for something like '\n'. This patch now changes this behavior to not drop some backslashes in conf_set_sym_val() and to not add new backslashes in the resulting output string. Removing the function sym_escape_string_value() completely as its not needed anymore. Signed-off-by: Stefan Roese s...@denx.de Cc: Masahiro Yamada yamada.masah...@socionext.com Cc: Simon Glass s...@chromium.org --- scripts/kconfig/confdata.c | 20 +--- scripts/kconfig/symbol.c | 43 --- 2 files changed, 9 insertions(+), 54 deletions(-) This looks right to me. But I do see one problem - the default string for CONFIG_AUTOBOOT_PROMPT appears as: Autoboot in %d secondsn so something is still removing the \ in the Kconfig default; Right. Thanks for spotting. I'll fix this in v3. I could easily change the default string in the Kconfig file to Autoboot in %d seconds\\n. This works. But its a different syntax regarding using the escape character backslash compared to editing the .config file or editing the string in make menuconfig etc So I hesitate to fix it this way. Unfortunately fixing this issue in the code is not that easy. At least not for me. As the default values of the string values are set in the conf_parse() function (in scripts/kconfig/zconf.y). And I really have absolutely no experience with yacc / bison. Perhaps one of you guys has a quick fix to make this default value of strings compatible again so that this additional '\' is not needed in the Kconfig file? Well I am familiar with those tools but I think Masahiro probably knows a lot more here. I am not so familiar with Bison, and I am getting a bit busy these days. So, I cannot find time to take a close look. Sorry. If Simon (or someone else) could follow it up, that'd be nice. BTW, if you have already figured out that conf_parse() is the cause of the problem, you do not have to invoke Bison. Bison does not touch the C part. conf_parse() is just copied verbatim from zconf.y to zconf.tab.c_shipped. You can modify conf_parse() exactly in the same way in both of them. Thanks. Did it and found that zconfparse() is responsible for this default value configuration / parsing. I must be missing something, but I fail to see where this function is really implemented: $ git grep zconfparse scripts/kconfig/lkc.h:int zconfparse(void); scripts/kconfig/zconf.tab.c_shipped:#define yyparse zconfparse scripts/kconfig/zconf.tab.c_shipped:zconfparse(); scripts/kconfig/zconf.y:zconfparse(); Bison converts zconf.y into zconf.tab.c_shipped You will notice the following part. /* Substitute the variable and function names. */ #define yyparse zconfparse #define yylex zconflex I think zconfparse was taken from the basename of zconf.y And then, you will also notice the following part: /*--. | yyparse. | `--*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ yyparse is replaced with zconfparse by the prepreocessor, so this is the implementation of zconfparse(), and it is the parser generated by Bison. I think it is almost impossible to read the generated parser directly. Instead,
Re: [U-Boot] [PATCH v2 2/4] arm: mvebu: Update CBAR with SOC regs base
On 14.05.2015 01:17, Kevin Smith wrote: SMP-enabled Linux kernels read the CBAR register in CP15 to find the address of the SCU registers. After remapping internal registers, also update the CBAR so the kernel can find them. Thanks Kevin. Only some coding style related comments below: Signed-off-by: Kevin Smith kevin.sm...@elecsyscorp.com --- arch/arm/mach-mvebu/cpu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index 417fc35..2970e07 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -161,10 +161,17 @@ static void update_sdram_window_sizes(void) } #ifdef CONFIG_ARCH_CPU_INIT +static void set_cbar (u32 addr) +{ +asm (mcr p15, 4, %0, c15, c0 : : r (addr)); +} Indentation with tabs please. And no space before the (. + + int arch_cpu_init(void) { /* Linux expects the internal registers to be at 0xf100 */ writel(SOC_REGS_PHY_BASE, INTREG_BASE_ADDR_REG); + set_cbar (SOC_REGS_PHY_BASE + 0xC000); No space before the ( please. checkpatch should complain about these minor issues btw. So its always recommended to run it before sending the patches to the list. Please send an updated version and add my Acked-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] [patchv2] socfpga: move configuration options to config file
Hi. 2015-05-15 17:48 GMT+09:00 Pavel Machek pa...@denx.de: On Fri 2015-05-15 17:36:32, Masahiro Yamada wrote: 2015-05-15 17:31 GMT+09:00 Pavel Machek pa...@denx.de: On Tue 2015-04-21 12:23:07, Pavel Machek wrote: Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config. Signed-off-by: Pavel Machek pa...@denx.de Ping? Please apply. This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA. Yes, I'd like Marek to apply it. And Marek wanted your confirmation it looks reasonable... The defconfig files in u-boot/master have been all cleaned up by commit bd328eb38274ffaf04caaa8a6ecc09b7e19a650e Author: Joe Hershberger joe.hershber...@ni.com Date: Tue May 12 14:46:24 2015 -0500 Clean all defconfigs with savedefconfig If this patch is applied onto u-boot-socfpga now and then a pull-req is issued, it will cause a conflict. So, I recommend Marek to sync u-boot-socfpga/master with the mainline, and then v3 should be applied. Please use savedefconfig rather than adding entries to the bottom of the files. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] imx: mx6: add display of CPU temperature grade in print_cpuinfo()
2015-05-14 7:11 GMT+02:00 Tim Harvey thar...@gateworks.com: When CONFIG_IMX6_THERMAL is defined print the CPU temperature grade info along with the current temperature. Before: CPU: Temperature 42 C After: CPU: Automotive temperature grade (-40C to 125C) at 42C CPU: Industiral temperature grade (-40C to 105C) at 42C CPU: Extended Commercial temperature grade (-20C to 105C) at 42C Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: - moved display of CPU temperature grade to own patch and combined with the current temperature from the thermal sensor driver - add example output to description Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/imx-common/cpu.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 6b20482..f1b49bb 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -16,6 +16,7 @@ #include asm/arch/clock.h #include asm/arch/sys_proto.h #include asm/arch/crm_regs.h +#include imx_thermal.h #include ipu_pixfmt.h #include thermal.h #include sata.h @@ -146,7 +147,7 @@ int print_cpuinfo(void) #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) struct udevice *thermal_dev; - int cpu_tmp, ret; + int cpu_tmp, minc, maxc, ret; #endif cpurev = get_cpu_rev(); @@ -172,16 +173,34 @@ int print_cpuinfo(void) #endif #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) + puts(CPU: ); + if (!is_cpu_type(MXC_CPU_MX6SX)) { + switch (get_cpu_temp_grade(minc, maxc)) { + case TEMP_AUTOMOTIVE: + puts(Automotive temperature grade ); + break; + case TEMP_INDUSTRIAL: + puts(Industrial temperature grade ); + break; + case TEMP_EXTCOMMERCIAL: + puts(Extended Commercial temperature grade ); + break; + default: + puts(Commercial temperature grade ); + break; + } + printf((%dC to %dC), minc, maxc); + } For the additions above we do not need CONFIG_IMX6_THERMAL. ret = uclass_get_device(UCLASS_THERMAL, 0, thermal_dev); if (!ret) { ret = thermal_get_temp(thermal_dev, cpu_tmp); if (!ret) - printf(CPU: Temperature %d C\n, cpu_tmp); + printf( at %dC\n, cpu_tmp); else - printf(CPU: Temperature: invalid sensor data\n); + puts( - invalid sensor data\n); } else { - printf(CPU: Temperature: Can't find sensor device\n); + puts( - invalid sensor device\n); } #endif -- 1.9.1 greets -- Christian Gmeiner, MSc https://soundcloud.com/christian-gmeiner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/4] db-88f6820-gp.h: Load data blobs into lower memory
On 14.05.2015 01:17, Kevin Smith wrote: By default on this platform, u-boot loads data into high memory in the range of 0x7Fxx, which generates a data abort when the kernel tries to read it. Config the u-boot environment to load the device tree and initrd image into lower memory to make them accessible to the kernel. Signed-off-by: Kevin Smith kevin.sm...@elecsyscorp.com --- include/configs/db-88f6820-gp.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h index 12a24ce..490d74e 100644 --- a/include/configs/db-88f6820-gp.h +++ b/include/configs/db-88f6820-gp.h @@ -63,6 +63,11 @@ #define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ #define CONFIG_SYS_ALT_MEMTEST +/* Keep device tree and initrd in lower memory so the kernel can access them */ +#define CONFIG_EXTRA_ENV_SETTINGS \ +fdt_high=0x1000\0 \ +initrd_high=0x1000\0 Indentation with tabs please. Acked-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 v2] README.scrapyard: add entries for dead board, T4240EMU and sc3
On 15.05.2015 04:51, Masahiro Yamada wrote: Follow-up commit 7fc63cca611b (mpc85xx/T4240EMU: Remove T4240EMU board), and commit 27e721564591 (ppc4xx: Remove sc3 board), filling the blank fields. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com Reviewed-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 v2 1/4] mx6: add OTP bank1 registers
2015-05-14 7:11 GMT+02:00 Tim Harvey thar...@gateworks.com: Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/include/asm/arch-mx6/imx-regs.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index 9a4ad8b..35bb005 100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h @@ -640,6 +640,25 @@ struct fuse_bank0_regs { u32 rsvd7[3]; }; +struct fuse_bank1_regs { + u32 mem0; + u32 rsvd0[3]; + u32 mem1; + u32 rsvd1[3]; + u32 mem2; + u32 rsvd2[3]; + u32 mem3; + u32 rsvd3[3]; + u32 mem4; + u32 rsvd4[3]; + u32 ana0; + u32 rsvd5[3]; + u32 ana1; + u32 rsvd6[3]; + u32 ana2; + u32 rsvd7[3]; +}; + #ifdef CONFIG_MX6SX struct fuse_bank4_regs { u32 sjc_resp_low; -- 1.9.1 Reviewed-by: Christian Gmeiner christian.gmei...@gmail.com greets -- Christian Gmeiner, MSc https://soundcloud.com/christian-gmeiner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [patchv2] socfpga: move configuration options to config file
2015-05-15 17:31 GMT+09:00 Pavel Machek pa...@denx.de: On Tue 2015-04-21 12:23:07, Pavel Machek wrote: Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config. Signed-off-by: Pavel Machek pa...@denx.de Ping? Please apply. This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] u-boot: adjust config_cmd_default.h not to raise ton of warnings
Hi Pavel, 2015-05-15 17:36 GMT+09:00 Pavel Machek pa...@denx.de: On Fri 2015-05-01 11:14:11, Pavel Machek wrote: If there's duplicty between config system and config_cmd_default, a ton of warnings is raised, because one uses plain defines, and other defines it to 1. Adjust config_cmd_default.h not to provoke the warnings. Signed-off-by: Pavel Machek pa...@denx.de Ping? Yamada, can you apply this? Tom? I did not know this patch was delegated to me. At least, I see it is marked with trini. I am OK with this patch, but more inclined to agree with Stephen's comment: I believe the correct way to fix this is to fix the board config files that cause the defines to be duplicated Once you start to enable CONFIG_CMD_* in Kconfig, you should not include config_cmd_default.h. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv3] mtd: sf: Add CONFIG_SPI_N25Q256A_RESET for software-reset
On Friday, May 15, 2015 at 10:47:46 AM, Pavel Machek wrote: Seems like nothing much doing in micron side switch (JEDEC_MFR(info)) { case CFI_MFR_ST: /* Micron, actually */ /* Some Micron need WREN command; all will accept it */ need_wren = true; Umm. Take a closer look. There's no break, so it continues below. Ohh.. So Linux works for you.. then is it? Well, yes, but this code patch is actually not tested in my case, because u-boot already resets it for Linux. Anyway, is this what you'd like to see? Was my idea of checking in which mode the SPI NOR is first discarded ? [...] @@ -233,6 +234,30 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode, flash-poll_cmd = CMD_FLAG_STATUS; #endif + if (params-flags MICRON_RESET) { +#define CMD_RESET_ENABLE 0x66 +#define CMD_RESET_MEMORY 0x99 + int ret; The indent here seems funny. I think it'd be better to pull this reset procedure into a separate function. + /* + * This is needed for the SoCFPGA booting from SPI NOR flash + * e.g. (N25Q256A), as U-Boot SPL 2013-socfpga (only version + * working on that board) sets 4-byte addressing mode. + */ + ret = spi_flash_cmd(spi, CMD_RESET_ENABLE, NULL, 0); + if (ret) { + printf(SF: Failed issue enable reset command\n); + return ret; + } + + ret = spi_flash_cmd(spi, CMD_RESET_MEMORY, NULL, 0); + if (ret) { + printf(SF: Failed issue reset command\n); + return ret; + } + + printf(SF: Device software reset\n); + } Otherwise I think it's OK. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] u-boot: adjust config_cmd_default.h not to raise ton of warnings
On Fri 2015-05-01 11:14:11, Pavel Machek wrote: If there's duplicty between config system and config_cmd_default, a ton of warnings is raised, because one uses plain defines, and other defines it to 1. Adjust config_cmd_default.h not to provoke the warnings. Signed-off-by: Pavel Machek pa...@denx.de Ping? Yamada, can you apply this? Tom? Pavel diff --git a/include/config_cmd_default.h b/include/config_cmd_default.h index e79a13b..2f60d63 100644 --- a/include/config_cmd_default.h +++ b/include/config_cmd_default.h @@ -16,29 +16,29 @@ * hardware, not fully tested, etc.). */ -#define CONFIG_CMD_BDI /* bdinfo */ -#define CONFIG_CMD_BOOTD /* bootd*/ -#define CONFIG_CMD_CONSOLE /* coninfo */ -#define CONFIG_CMD_ECHO /* echo arguments */ -#define CONFIG_CMD_EDITENV /* editenv */ -#define CONFIG_CMD_ENV_EXISTS/* query whether env variables exists */ -#define CONFIG_CMD_FPGA /* FPGA configuration Support */ -#define CONFIG_CMD_IMI /* iminfo */ -#define CONFIG_CMD_ITEST /* Integer (and string) test*/ +#define CONFIG_CMD_BDI 1 /* bdinfo */ +#define CONFIG_CMD_BOOTD 1 /* bootd*/ +#define CONFIG_CMD_CONSOLE 1 /* coninfo */ +#define CONFIG_CMD_ECHO 1 /* echo arguments */ +#define CONFIG_CMD_EDITENV 1 /* editenv */ +#define CONFIG_CMD_ENV_EXISTS 1 /* query whether env variables exists */ +#define CONFIG_CMD_FPGA 1 /* FPGA configuration Support */ +#define CONFIG_CMD_IMI 1 /* iminfo */ +#define CONFIG_CMD_ITEST 1 /* Integer (and string) test*/ #ifndef CONFIG_SYS_NO_FLASH -#define CONFIG_CMD_FLASH /* flinfo, erase, protect */ -#define CONFIG_CMD_IMLS /* List all found images*/ +#define CONFIG_CMD_FLASH 1 /* flinfo, erase, protect */ +#define CONFIG_CMD_IMLS 1 /* List all found images*/ #endif -#define CONFIG_CMD_LOADB /* loadb*/ -#define CONFIG_CMD_LOADS /* loads*/ -#define CONFIG_CMD_MEMORY/* md mm nm mw cp cmp crc base loop */ -#define CONFIG_CMD_MISC /* Misc functions like sleep etc*/ -#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot*/ -#define CONFIG_CMD_NFS /* NFS support */ -#define CONFIG_CMD_RUN /* run command in env variable */ -#define CONFIG_CMD_SAVEENV /* saveenv */ -#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */ -#define CONFIG_CMD_SOURCE/* source command support */ -#define CONFIG_CMD_XIMG /* Load part of Multi Image */ +#define CONFIG_CMD_LOADB 1 /* loadb*/ +#define CONFIG_CMD_LOADS 1 /* loads*/ +#define CONFIG_CMD_MEMORY 1 /* md mm nm mw cp cmp crc base loop */ +#define CONFIG_CMD_MISC 1 /* Misc functions like sleep etc*/ +#define CONFIG_CMD_NET 1 /* bootp, tftpboot, rarpboot*/ +#define CONFIG_CMD_NFS 1 /* NFS support */ +#define CONFIG_CMD_RUN 1 /* run command in env variable */ +#define CONFIG_CMD_SAVEENV 1 /* saveenv */ +#define CONFIG_CMD_SETGETDCR 1 /* DCR support on 4xx */ +#define CONFIG_CMD_SOURCE 1 /* source command support */ +#define CONFIG_CMD_XIMG 1/* Load part of Multi Image */ #endif /* _CONFIG_CMD_DEFAULT_H */ -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv3] mtd: sf: Add CONFIG_SPI_N25Q256A_RESET for software-reset
Seems like nothing much doing in micron side switch (JEDEC_MFR(info)) { case CFI_MFR_ST: /* Micron, actually */ /* Some Micron need WREN command; all will accept it */ need_wren = true; Umm. Take a closer look. There's no break, so it continues below. Ohh.. So Linux works for you.. then is it? Well, yes, but this code patch is actually not tested in my case, because u-boot already resets it for Linux. Anyway, is this what you'd like to see? Pavel diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index 4158e13..5379f18 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -43,6 +43,7 @@ enum { SST_BP = 1 3, SST_WP = 1 4, WR_QPP = 1 5, + MICRON_RESET= 1 6, }; #define SST_WR (SST_BP | SST_WP) diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index c12e8c6..45525b5 100644 --- a/drivers/mtd/spi/sf_params.c +++ b/drivers/mtd/spi/sf_params.c @@ -85,7 +85,7 @@ const struct spi_flash_params spi_flash_params_table[] = { {N25Q128A, 0x20bb18, 0x0, 64 * 1024, 256, RD_FULL, WR_QPP}, {N25Q256,0x20ba19, 0x0, 64 * 1024, 512, RD_FULL, WR_QPP | SECT_4K}, {N25Q256A, 0x20bb19, 0x0, 64 * 1024, 512, RD_FULL, WR_QPP | SECT_4K}, - {N25Q512,0x20ba20, 0x0, 64 * 1024, 1024, RD_FULL, WR_QPP | E_FSR | SECT_4K}, + {N25Q512,0x20ba20, 0x0, 64 * 1024, 1024, RD_FULL, WR_QPP | E_FSR | SECT_4K | MICRON_RESET}, {N25Q512A, 0x20bb20, 0x0, 64 * 1024, 1024, RD_FULL, WR_QPP | E_FSR | SECT_4K}, {N25Q1024, 0x20ba21, 0x0, 64 * 1024, 2048, RD_FULL, WR_QPP | E_FSR | SECT_4K}, {N25Q1024A, 0x20bb21, 0x0, 64 * 1024, 2048, RD_FULL, WR_QPP | E_FSR | SECT_4K}, diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 201471c..04666b9 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -8,6 +8,7 @@ * SPDX-License-Identifier:GPL-2.0+ */ +#define DEBUG #include common.h #include dm.h #include errno.h @@ -233,6 +234,30 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode, flash-poll_cmd = CMD_FLAG_STATUS; #endif + if (params-flags MICRON_RESET) { +#define CMD_RESET_ENABLE 0x66 +#define CMD_RESET_MEMORY 0x99 + int ret; + /* +* This is needed for the SoCFPGA booting from SPI NOR flash +* e.g. (N25Q256A), as U-Boot SPL 2013-socfpga (only version +* working on that board) sets 4-byte addressing mode. +*/ + ret = spi_flash_cmd(spi, CMD_RESET_ENABLE, NULL, 0); + if (ret) { + printf(SF: Failed issue enable reset command\n); + return ret; + } + + ret = spi_flash_cmd(spi, CMD_RESET_MEMORY, NULL, 0); + if (ret) { + printf(SF: Failed issue reset command\n); + return ret; + } + + printf(SF: Device software reset\n); + } + /* Configure the BAR - discover bank cmds and read current bank */ #ifdef CONFIG_SPI_FLASH_BAR u8 curr_bank = 0; @@ -369,7 +394,7 @@ int spi_flash_probe_slave(struct spi_slave *spi, struct spi_flash *flash) ((flash-dual_flash SF_SINGLE_FLASH) (flash-size SPI_FLASH_16MB_BOUN 1))) { puts(SF: Warning - Only lower 16MiB accessible,); - puts( Full access #define CONFIG_SPI_FLASH_BAR\n); + puts( For full access, #define CONFIG_SPI_FLASH_BAR\n); } #endif -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [patchv2] socfpga: move configuration options to config file
On Fri 2015-05-15 17:36:32, Masahiro Yamada wrote: 2015-05-15 17:31 GMT+09:00 Pavel Machek pa...@denx.de: On Tue 2015-04-21 12:23:07, Pavel Machek wrote: Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config. Signed-off-by: Pavel Machek pa...@denx.de Ping? Please apply. This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA. Yes, I'd like Marek to apply it. And Marek wanted your confirmation it looks reasonable... Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/4] Kconfig: Enable usage of escape char '\' in string values
Hi Masahiro, On 13.05.2015 03:34, Masahiro Yamada wrote: Hi, Simon, Stefan, 2015-05-12 7:41 GMT+09:00 Simon Glass s...@chromium.org: Hi Stefan, On 11 May 2015 at 07:27, Stefan Roese m...@roese.nl wrote: Hi Simon, Hi Masahiro, On 11.05.2015 09:58, Stefan Roese wrote: On 10.05.2015 16:48, Simon Glass wrote: On 7 May 2015 at 06:13, Stefan Roese s...@denx.de wrote: I might have missed something, but I failed to use the escape char '\' in strings. To pass a printf format string like foo %d bar\n via Kconfig to the code. Right now its not possible to use the escape character '\' in Kconfig string values correctly to e.g. set this string value test output\n. The '\n' will be converted to 'n'. The current implementation removes some of the '\' chars from the input string in conf_set_sym_val(). Examples: '\' - '' '\\'- '\' '\\\' - '\' '' - '\\' ... And then doubles the backslash chars in the output string in sym_escape_string_value(). Example: '\' - '' - '' '\\'- '\' - '\\' '\\\' - '\' - '\\' '' - '\\' - '' ... As you see in these examples, its impossible to generate a single '\' charater in the output string as its needed for something like '\n'. This patch now changes this behavior to not drop some backslashes in conf_set_sym_val() and to not add new backslashes in the resulting output string. Removing the function sym_escape_string_value() completely as its not needed anymore. Signed-off-by: Stefan Roese s...@denx.de Cc: Masahiro Yamada yamada.masah...@socionext.com Cc: Simon Glass s...@chromium.org --- scripts/kconfig/confdata.c | 20 +--- scripts/kconfig/symbol.c | 43 --- 2 files changed, 9 insertions(+), 54 deletions(-) This looks right to me. But I do see one problem - the default string for CONFIG_AUTOBOOT_PROMPT appears as: Autoboot in %d secondsn so something is still removing the \ in the Kconfig default; Right. Thanks for spotting. I'll fix this in v3. I could easily change the default string in the Kconfig file to Autoboot in %d seconds\\n. This works. But its a different syntax regarding using the escape character backslash compared to editing the .config file or editing the string in make menuconfig etc So I hesitate to fix it this way. Unfortunately fixing this issue in the code is not that easy. At least not for me. As the default values of the string values are set in the conf_parse() function (in scripts/kconfig/zconf.y). And I really have absolutely no experience with yacc / bison. Perhaps one of you guys has a quick fix to make this default value of strings compatible again so that this additional '\' is not needed in the Kconfig file? Well I am familiar with those tools but I think Masahiro probably knows a lot more here. I am not so familiar with Bison, and I am getting a bit busy these days. So, I cannot find time to take a close look. Sorry. If Simon (or someone else) could follow it up, that'd be nice. BTW, if you have already figured out that conf_parse() is the cause of the problem, you do not have to invoke Bison. Bison does not touch the C part. conf_parse() is just copied verbatim from zconf.y to zconf.tab.c_shipped. You can modify conf_parse() exactly in the same way in both of them. Thanks. Did it and found that zconfparse() is responsible for this default value configuration / parsing. I must be missing something, but I fail to see where this function is really implemented: $ git grep zconfparse scripts/kconfig/lkc.h:int zconfparse(void); scripts/kconfig/zconf.tab.c_shipped:#define yyparse zconfparse scripts/kconfig/zconf.tab.c_shipped:zconfparse(); scripts/kconfig/zconf.y:zconfparse(); I'm inclined to just add this additional backslash to the default value in Kconfig. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] imx: mx6: add get_cpu_temp_grade to obtain cpu temperature grade from OTP
2015-05-14 7:11 GMT+02:00 Tim Harvey thar...@gateworks.com: The MX6 has a temperature grade defined by OCOTP_MEM0[7:6] which is at 0x480 in the Fusemap Description Table in the reference manual. Return this value as well as min/max temperature based on the value. Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the their Fusemap Description Table however Freescale has confirmed that these eFUSE bits match the description within the IMX6DQRM and that they will be added to the next revision of the respective reference manuals. This has been tested with IMX6 Automative and Industrial parts. Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: - split out adding get_cpu_temp_grade to its own patch - added note about support of MX6SDL and MX6SX Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/cpu/armv7/mx6/soc.c | 38 +++ arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + include/imx_thermal.h | 6 + 3 files changed, 45 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index 71fa1fb..6f501ac 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -124,6 +124,44 @@ u32 get_cpu_speed_grade_hz(void) return 0; } +/* + * OCOTP_MEM0[7:6] (see Fusemap Description Table offset 0x480) + * defines a 2-bit Temperature Grade + * + * return temperature grade and min/max temperature in celcius + */ +#define OCOTP_MEM0_TEMP_SHIFT 6 + +u32 get_cpu_temp_grade(int *minc, int *maxc) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = ocotp-bank[1]; + struct fuse_bank1_regs *fuse = + (struct fuse_bank1_regs *)bank-fuse_regs; + uint32_t val; + + val = readl(fuse-mem0); + val = OCOTP_MEM0_TEMP_SHIFT; + val = 0x3; + + if (minc maxc) { + if (val == TEMP_AUTOMOTIVE) { + *minc = -40; + *maxc = 125; + } else if (val == TEMP_INDUSTRIAL) { + *minc = -40; + *maxc = 105; + } else if (val == TEMP_EXTCOMMERCIAL) { + *minc = -20; + *maxc = 105; + } else { + *minc = 0; + *maxc = 95; + } + } + return val; +} + #ifdef CONFIG_REVISION_TAG u32 __weak get_board_rev(void) { diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index a2cd0a9..c583291 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -17,6 +17,7 @@ u32 get_nr_cpus(void); u32 get_cpu_rev(void); u32 get_cpu_speed_grade_hz(void); +u32 get_cpu_temp_grade(int *minc, int *maxc); /* returns MXC_CPU_ value */ #define cpu_type(rev) (((rev) 12)0xff) diff --git a/include/imx_thermal.h b/include/imx_thermal.h index be13652..8ce333c 100644 --- a/include/imx_thermal.h +++ b/include/imx_thermal.h @@ -8,6 +8,12 @@ #ifndef _IMX_THERMAL_H_ #define _IMX_THERMAL_H_ +/* CPU Temperature Grades */ +#define TEMP_COMMERCIAL 0 +#define TEMP_EXTCOMMERCIAL 1 +#define TEMP_INDUSTRIAL 2 +#define TEMP_AUTOMOTIVE 3 + struct imx_thermal_plat { void *regs; int fuse_bank; -- 1.9.1 Reviewed-by: Christian Gmeiner christian.gmei...@gmail.com greets -- Christian Gmeiner, MSc https://soundcloud.com/christian-gmeiner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv3] mtd: sf: Add CONFIG_SPI_N25Q256A_RESET for software-reset
On Fri 2015-05-15 11:36:11, Marek Vasut wrote: On Friday, May 15, 2015 at 10:47:46 AM, Pavel Machek wrote: Seems like nothing much doing in micron side switch (JEDEC_MFR(info)) { case CFI_MFR_ST: /* Micron, actually */ /* Some Micron need WREN command; all will accept it */ need_wren = true; Umm. Take a closer look. There's no break, so it continues below. Ohh.. So Linux works for you.. then is it? Well, yes, but this code patch is actually not tested in my case, because u-boot already resets it for Linux. Anyway, is this what you'd like to see? Was my idea of checking in which mode the SPI NOR is first discarded ? Yes, better just reset it. [...] @@ -233,6 +234,30 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode, flash-poll_cmd = CMD_FLAG_STATUS; #endif + if (params-flags MICRON_RESET) { +#define CMD_RESET_ENABLE 0x66 +#define CMD_RESET_MEMORY 0x99 + int ret; The indent here seems funny. I think it'd be better to pull this reset procedure into a separate function. Can do, but I need to know if this is what Jagan wanted, first. Pavel + /* +* This is needed for the SoCFPGA booting from SPI NOR flash +* e.g. (N25Q256A), as U-Boot SPL 2013-socfpga (only version +* working on that board) sets 4-byte addressing mode. +*/ + ret = spi_flash_cmd(spi, CMD_RESET_ENABLE, NULL, 0); + if (ret) { + printf(SF: Failed issue enable reset command\n); + return ret; + } + + ret = spi_flash_cmd(spi, CMD_RESET_MEMORY, NULL, 0); + if (ret) { + printf(SF: Failed issue reset command\n); + return ret; + } + + printf(SF: Device software reset\n); + } Otherwise I think it's OK. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] hummingboard: Remove mx6solo specific support
Hi Fabio, On 11/05/2015 18:02, Fabio Estevam wrote: Hummingboard dual, dual-lite and solo are now supported via SPL mechanism. Remove the previous hummingboard support, which does not use SPL and supported only the solo variant. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] mx6cuboxi: Mention Cubox-i in the README
On 11/05/2015 18:02, Fabio Estevam wrote: Cubox-i boards are also supported, so update the README file. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH] tools: get-toolchais: a tool to get cross-tools for all architectures
When we send patches, we are supposed to test them by build utilities such as MAKEALL, buildman. When we want to test global changes, the first hurdle is, I think, to collect toolchains for all the architectures. We have some documents about build utilities, but I have not seen any official information about how to get the suitable cross-tools. Of course, it is possible to build them from sources, but it is not necessarily feasible. Fortunately, the kernel.org site provides us pre-built toolchains, but some architectures are missing. Also, some boards fail to build with the kernel.org tools. We sometimes see, where can I get the compiler for this architecture? things on the ML. We should be able to prepare cross-compilers more easily. It is true that buildman provides --fetch-arch option for downloading kernel.org toolchains, but it does not have access to others. And what we really want to know is most likely how to get compilers for such minor architectures as kernel.org does not provide. This tool intends to be more generic design without hard-coding such kernel.org things. To achieve that, this tool consists of two files: Python script (this file) and the database file containing URLs of tarballs. We just need to update the latter when new version compilers are released (or better compilers are found.) The file is in the form of RFC 822 for easier editing. The script only uses Python libraries, not relies on external programs although it displays wget-like log when downloading tarballs. :-) This is RFC because I am thinking it can be more brushed up. If the basis idea is OK, I will improve code, add more comments. Note this script is written in Python 3 and only works on Python 3.3 or later. I do not think it is too much limitation, but some popular distributions under support might include older version. For example, looks like Ubuntu 12.04 LTS is shipped with Python 3.2. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- tools/get-toolchains | 400 +++ tools/toolchains.cfg | 24 2 files changed, 424 insertions(+) create mode 100755 tools/get-toolchains create mode 100644 tools/toolchains.cfg diff --git a/tools/get-toolchains b/tools/get-toolchains new file mode 100755 index 000..7cb4d5c --- /dev/null +++ b/tools/get-toolchains @@ -0,0 +1,400 @@ +#!/usr/bin/env python3 +# +# Author: Masahiro Yamada yamada.masah...@socionext.com +# +# SPDX-License-Identifier: GPL-2.0+ +# + + +Get toolchains for U-boot. + +When we send patches, we are supposed to test them by build utilities +such as MAKEALL, buildman. When we want to test global changes, the +first hurdle is, I think, to collect toolchains for all the architectures. + +We have some documents about build utilities, but I have not seen any +official information about how to get the suitable cross-tools. +Of course, it is possible to build them from sources, but it is not +necessarily feasible. + +Fortunately, the kernel.org site provides us pre-built toolchains, but +some architectures are missing. Also, some boards fail to build with +the kernel.org tools. We sometimes see, where can I get the compiler +for this architecture? things on the ML. We should be able to prepare +cross-compilers more easily. + +It is true that buildman provides --fetch-arch option for downloading +kernel.org toolchains, but it does not have access to others. And what +we really want to know is most likely how to get compilers for such minor +architectures as kernel.org does not provide. + +This tool intends to be more generic design without hard-coding such +kernel.org things. + +To achieve that, this tool consists of two files: +Python script (this file) and the database file containing URLs of tarballs. + +We just need to update the latter when new version compilers are released +(or better compilers are found.) The file is in the form of RFC 822 for +easier editing. + +The script only uses Python libraries, not relies on external programs +although it displays wget-like log when downloading tarballs. :-) + +Usage +- + +Just run + + $ tools/get-toolchains + +Tarballs will be downloaded, extracted, and installed for all the +architectures. Finally, settings that might be useful for shell +and buildman will be displayed. + +You can pass architectures to the arguments if you only want to obtain +particular toolchains. For example, to get ARM and AARCH64 tools, do this: + + $ tools/get-toolchains arm aarch64 + +Options +--- + + -c, --config + Specify the custom database file. If not specified, DEFAULT_CONFIG + (toolchains.cfg) is used. + + -d, --destdir + Specify where to install the toolchains. Tools are installed into + DEFAULT_DESTDIR (~/.u-boot-toolchains) by default, but you may wish + to install them under /opt, /usr/local/, or somewhere else. + + -k, --keep-tarballs + Keep downloaded tarballs, which might be useful when you want to +
Re: [U-Boot] [PATCH] warp: README: Fix typo
On 12/05/2015 18:19, Fabio Estevam wrote: Fix the spelling of 'successful'. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- board/warp/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/warp/README b/board/warp/README index 0e1f076..db3100e 100644 --- a/board/warp/README +++ b/board/warp/README @@ -43,8 +43,8 @@ Transfer u-boot.imx that will be flashed into the eMMC: $ sudo dfu-util -D u-boot.imx -a boot -Then on the U-boot prompt the following message should be seen after a succesful -upgrade: +Then on the U-boot prompt the following message should be seen after a +successful upgrade: #DOWNLOAD ... OK Ctrl+C to exit ... Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 03/10] imx6: move generic imx6 options to mx6_common.h
Hi Peter, On 12/05/2015 12:51, Tom Rini wrote: On Tue, May 12, 2015 at 10:40:25AM +0200, Markus Niebel wrote: Hello Peter, sorry for the noise, did not see v2 of your series. Just one thing: Am 11.05.2015 um 18:22 schrieb Peter Robinson: All boards define CONFIG_MX6, CONFIG_DISPLAY_BOARDINFO, CONFIG_DISPLAY_CPUINFO and CONFIG_SYS_GENERIC_BOARD so define them in mx6_common Signed-off-by: Peter Robinson pbrobin...@gmail.com Reviewed-by: Tom Rini trini at konsulko.com [...] diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index 85bf039..fc19fbb 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -38,4 +38,9 @@ #include asm/imx-common/gpio.h #include config_cmd_default.h +#define CONFIG_MX6 Here we need an #if !defined(CONFIG_MX6) because secomx6quq7 (and soon hopefully other boards) sets this via Kconfig under arch/arm/cpu/armv7/mx6 Oh good catch. Would it be hard to just make everyone do this via Kconfig instead? I would expect not... What do you mind about this ? Can you fix it directly in a V3 ? Thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] mxs: Possible in bug in mxs_enable_4p2_dcdc_input
Hi Stefan, On 13/05/2015 08:02, Stefan Wahren wrote: Hi, during the study of DC-DC handling in u-boot i noticed a possible bug. In case the DC-DC is already enabled the function returns without reenabling brown out detection. I don't think that's okay. A possible fix would be to do the check if DC-DC is already enabled before disabling brown out detection. This idea is attached as a draft. If it's acceptable i will send a proper patch. It looks like we agree on your changes. Can you send then a proper patch with your Signed-off-by ? Thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [patchv2] socfpga: move configuration options to config file
On Friday, May 15, 2015 at 11:00:37 AM, Masahiro Yamada wrote: Hi. Hi! 2015-05-15 17:48 GMT+09:00 Pavel Machek pa...@denx.de: On Fri 2015-05-15 17:36:32, Masahiro Yamada wrote: 2015-05-15 17:31 GMT+09:00 Pavel Machek pa...@denx.de: On Tue 2015-04-21 12:23:07, Pavel Machek wrote: Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config. Signed-off-by: Pavel Machek pa...@denx.de Ping? Please apply. This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA. Yes, I'd like Marek to apply it. And Marek wanted your confirmation it looks reasonable... The defconfig files in u-boot/master have been all cleaned up by commit bd328eb38274ffaf04caaa8a6ecc09b7e19a650e Author: Joe Hershberger joe.hershber...@ni.com Date: Tue May 12 14:46:24 2015 -0500 Clean all defconfigs with savedefconfig If this patch is applied onto u-boot-socfpga now and then a pull-req is issued, it will cause a conflict. So, I recommend Marek to sync u-boot-socfpga/master with the mainline, and then v3 should be applied. Yes Sir, synched! Please use savedefconfig rather than adding entries to the bottom of the 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] [Resend PATCH 2/4] arm: imx6: tqma6: implement IMX_CONFIG with Kconfig
Hi Markus, On 12/05/2015 14:18, Markus Niebel wrote: From: Markus Niebel markus.nie...@tq-group.com Now that we have the Kconfig based CPU type selection, use this to fill the IMX_CONFIG automatically Signed-off-by: Markus Niebel markus.nie...@tq-group.com --- board/tqc/tqma6/Kconfig | 4 configs/tqma6q_mba6_mmc_defconfig | 2 +- configs/tqma6q_mba6_spi_defconfig | 2 +- configs/tqma6s_mba6_mmc_defconfig | 2 +- configs/tqma6s_mba6_spi_defconfig | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig index 3e4d9f5..ce47ba4 100644 --- a/board/tqc/tqma6/Kconfig +++ b/board/tqc/tqma6/Kconfig @@ -33,4 +33,8 @@ config TQMA6S endchoice +config IMX_CONFIG + default board/tqc/tqma6/tqma6q.cfg if TQMA6Q + default board/tqc/tqma6/tqma6s.cfg if TQMA6S + endif diff --git a/configs/tqma6q_mba6_mmc_defconfig b/configs/tqma6q_mba6_mmc_defconfig index 42d8928..59e7859 100644 --- a/configs/tqma6q_mba6_mmc_defconfig +++ b/configs/tqma6q_mba6_mmc_defconfig @@ -2,4 +2,4 @@ CONFIG_ARM=y CONFIG_ARCH_MX6=y CONFIG_TARGET_TQMA6=y CONFIG_TQMA6Q=y -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT diff --git a/configs/tqma6q_mba6_spi_defconfig b/configs/tqma6q_mba6_spi_defconfig index 7371b3d..db65778 100644 --- a/configs/tqma6q_mba6_spi_defconfig +++ b/configs/tqma6q_mba6_spi_defconfig @@ -2,4 +2,4 @@ CONFIG_ARM=y CONFIG_ARCH_MX6=y CONFIG_TARGET_TQMA6=y CONFIG_TQMA6Q=y -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT diff --git a/configs/tqma6s_mba6_mmc_defconfig b/configs/tqma6s_mba6_mmc_defconfig index b7feb18..6c0763d 100644 --- a/configs/tqma6s_mba6_mmc_defconfig +++ b/configs/tqma6s_mba6_mmc_defconfig @@ -2,4 +2,4 @@ CONFIG_ARM=y CONFIG_ARCH_MX6=y CONFIG_TARGET_TQMA6=y CONFIG_TQMA6S=y -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT diff --git a/configs/tqma6s_mba6_spi_defconfig b/configs/tqma6s_mba6_spi_defconfig index 24d07cd..4873ffb 100644 --- a/configs/tqma6s_mba6_spi_defconfig +++ b/configs/tqma6s_mba6_spi_defconfig @@ -2,4 +2,4 @@ CONFIG_ARM=y CONFIG_ARCH_MX6=y CONFIG_TARGET_TQMA6=y CONFIG_TQMA6S=y -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT Rather it does not work. By compiling envcrc (host), the options are not set and it fails: cc -Wp,-MD,tools/.envcrc.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch/arm/include -I./lib/libfdt -I./tools -DCONFIG_SYS_TEXT_BASE=0x4fc0 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -c -o tools/envcrc.o tools/envcrc.c In file included from include/config.h:5:0, from tools/envcrc.c:19: include/configs/tqma6.h:342:2: error: #error need to define boot source This happens for the SPI boards, not for MMC - I have not checked why. Can you investigate this issue ? Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] imx: mx6: add display of CPU temperature grade in print_cpuinfo()
On Fri, May 15, 2015 at 1:14 AM, Christian Gmeiner christian.gmei...@gmail.com wrote: 2015-05-14 7:11 GMT+02:00 Tim Harvey thar...@gateworks.com: When CONFIG_IMX6_THERMAL is defined print the CPU temperature grade info along with the current temperature. Before: CPU: Temperature 42 C After: CPU: Automotive temperature grade (-40C to 125C) at 42C CPU: Industiral temperature grade (-40C to 105C) at 42C CPU: Extended Commercial temperature grade (-20C to 105C) at 42C Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: - moved display of CPU temperature grade to own patch and combined with the current temperature from the thermal sensor driver - add example output to description Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/imx-common/cpu.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 6b20482..f1b49bb 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -16,6 +16,7 @@ #include asm/arch/clock.h #include asm/arch/sys_proto.h #include asm/arch/crm_regs.h +#include imx_thermal.h #include ipu_pixfmt.h #include thermal.h #include sata.h @@ -146,7 +147,7 @@ int print_cpuinfo(void) #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) struct udevice *thermal_dev; - int cpu_tmp, ret; + int cpu_tmp, minc, maxc, ret; #endif cpurev = get_cpu_rev(); @@ -172,16 +173,34 @@ int print_cpuinfo(void) #endif #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) + puts(CPU: ); + if (!is_cpu_type(MXC_CPU_MX6SX)) { + switch (get_cpu_temp_grade(minc, maxc)) { + case TEMP_AUTOMOTIVE: + puts(Automotive temperature grade ); + break; + case TEMP_INDUSTRIAL: + puts(Industrial temperature grade ); + break; + case TEMP_EXTCOMMERCIAL: + puts(Extended Commercial temperature grade ); + break; + default: + puts(Commercial temperature grade ); + break; + } + printf((%dC to %dC), minc, maxc); + } For the additions above we do not need CONFIG_IMX6_THERMAL. Hi Christian, Thanks for the review. Its true that CONFIG_IMX6_THERMAL is not needed for cpu temperature grade but I felt that there would be resistance in general to adding additional lines in print_cpuinfo without allowing them to be easily disabled. I felt that temperature grade and current temperature made sense to go together in this fasion. Looking over this though did remind me that now that Freescale has told me that the IMX6SX has the same OTP registers/definitions for temperature grade programmed I can remove the skip for MX6SX. I would however sure like to have someone with an actual MX6SX enable that code and give us some testing feedback. Regards, Tim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx6: Set shared override bit in PL310 AUX_CTRL register
Hi Fabio, On 11/03/2015 21:12, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Having bit 22 cleared in the PL310 Auxiliary Control register (shared attribute override enable) has the side effect of transforming Normal Shared Non-cacheable reads into Cacheable no-allocate reads. Coherent DMA buffers in Linux always have a Cacheable alias via the kernel linear mapping and the processor can speculatively load cache lines into the PL310 controller. With bit 22 cleared, Non-cacheable reads would unexpectedly hit such cache lines leading to buffer corruption. This was inspired by a patch from Catalin Marinas [1] and also from recent discussions in the linux-arm-kernel list [2] where Russell King and Rob Herring suggested that bootloaders should initialize the cache. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2010-November/031810.html [2] https://lkml.org/lkml/2015/2/20/199 Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/armv7/mx6/soc.c | 8 arch/arm/include/asm/pl310.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index ef02972..5aab305 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -506,6 +506,14 @@ void v7_outer_cache_enable(void) struct pl310_regs *const pl310 = (struct pl310_regs *)L2_PL310_BASE; unsigned int val; + + /* + * Set bit 22 in the auxiliary control register. If this bit + * is cleared, PL310 treats Normal Shared Non-cacheable + * accesses as Cacheable no-allocate. + */ + setbits_le32(pl310-pl310_aux_ctrl, L310_SHARED_ATT_OVERRIDE_ENABLE); + #if defined CONFIG_MX6SL struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR; val = readl(iomux-gpr[11]); diff --git a/arch/arm/include/asm/pl310.h b/arch/arm/include/asm/pl310.h index ddc245b..de7650e 100644 --- a/arch/arm/include/asm/pl310.h +++ b/arch/arm/include/asm/pl310.h @@ -16,6 +16,8 @@ #define L2X0_STNDBY_MODE_EN (1 0) #define L2X0_CTRL_EN 1 +#define L310_SHARED_ATT_OVERRIDE_ENABLE (1 22) + struct pl310_regs { u32 pl310_cache_id; u32 pl310_cache_type; It looks like from the discussion and the following threads that a general solution cannot be easy found. I agree with you to apply it at least for i.MX6, and let's see if in the future we can factorize it for other SOCs. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 2/2] imx: mx27 move GPIO_PORTx to gpio.h
On 14 May 2015 at 17:29, Peng Fan peng@freescale.com wrote: These GPIO_PORTx macros should be in gpio.h, but not in imx-regs.h. Also, imx-regs.h and iomux-v3.h has same macro defintion for GPIO_PORTx, and both of them are included in mxc_i2c.c(include mxc_i2c.h). This will incur build warnings with macro redefinition. Since iomux-v3.h is not compatible with mx27, we can not simply include iomux-v3.h for mx27, so move the GPIO_PORTx to gpio.h to fix the build warning. Signed-off-by: Peng Fan peng@freescale.com --- Changes v5: Take Fabio's suggestion. Since iomux-v3.h is not compatible with mx27, we can not directly include iomux-v3.h for mx27. Move the GPIO_PORTx to gpio.h which should be not in imx-regs.h. Changes v4: New patch. we include mxc_i2c.h in driver/i2c/mxc_i2c.c in patch 1/2. mxc_i2c.h includes iomux-v3.h. Since iomux-v3.h have some macros which also exists in asm/arch-xx/imx-regs.h, this will introudce compile warnings such as redefined macro. Changes v3: none Changes v2: none arch/arm/include/asm/arch-mx27/gpio.h | 20 arch/arm/include/asm/arch-mx27/imx-regs.h | 22 -- 2 files changed, 20 insertions(+), 22 deletions(-) Applied to u-boot-dm, take 2, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 13/13] sandbox: defconfig: enable support of sandbox PMIC drivers
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This commit enables: - emulated i2c PMIC driver - sandbox PMIC I/O driver - sandbox PMIC's regulator driver Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - none --- configs/sandbox_defconfig | 7 +++ 1 file changed, 7 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 08/13] sandbox: i2c: search child emul dev and check its uclass id
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: The function get_emul() in sandbox i2c bus driver, always returns first child as i2c emul device. This may only work for i2c devices with a single child, which is an only i2c emul device. In case when i2c device has more than one child (e.g. PMIC), and one is i2c emul, then the function should search it by check uclass id for each child. This patch add this change to the get_emul(). Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Cc: Simon Glass s...@chromium.org Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - none --- drivers/i2c/sandbox_i2c.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 10/13] test: dm: add sandbox PMIC framework tests
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This change adds new file to sandbox driver model test environment. The file is: test/dm/power.c, and it includes tests for PMIC framework, which includes PMIC uclass and REGULATOR uclass. All tests are based od Sandbox PMIC emulated device. Some test constants for this device are defined in the header: include/power/sandbox_pmic.h PMIC tests includes: - pmic get - tests, that pmic_get() returns the requested device - pmic I/O - tests I/O by writing and reading some values to PMIC's registers and then compares, that the write/read values are equal. The regulator tests includes: - Regulator get by devname/platname - Voltage set/get - Current set/get - Enable set/get - Mode set/get - Autoset - List autoset For the regulator 'get' test, the returned device pointers are compared, and their names are also compared to the requested one. Every other test, first sets the given attribute and next try to get it. The test pass, when the set/get values are equal. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - test: dm: split power.c into pmic.c and regulator.c - regulator tests: cleanup --- include/power/sandbox_pmic.h | 33 + test/dm/Makefile | 2 + test/dm/pmic.c | 69 + test/dm/regulator.c | 325 +++ 4 files changed, 429 insertions(+) create mode 100644 test/dm/pmic.c create mode 100644 test/dm/regulator.c Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 09/13] sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This commit adds emulation of sandbox PMIC device, which includes: - PMIC I2C emulation driver - PMIC I/O driver (UCLASS_PMIC) - PMIC regulator driver (UCLASS_REGULATOR) The sandbox PMIC has 12 significant registers and 4 as padding to 16 bytes, which allows using 'i2c md' command with the default count (16). The sandbox PMIC provides regulators: - 2x BUCK - 2x LDO Each, with adjustable output: - Enable state - Voltage - Current limit (LDO1/BUCK1 only) - Operation mode (different for BUCK and LDO) Each attribute has it's own register, beside the enable state, which depends on operation mode. The header file: sandbox_pmic.h includes PMIC's default register values, which are set on i2c pmic emul driver's probe() method. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - pmic emul driver: get the default register settings from fdt - cleanup of sandbox_pmic.h --- doc/device-tree-bindings/pmic/sandbox.txt | 35 +++ doc/device-tree-bindings/regulator/sandbox.txt | 45 drivers/power/pmic/Kconfig | 25 ++ drivers/power/pmic/Makefile| 3 +- drivers/power/pmic/i2c_pmic_emul.c | 142 ++ drivers/power/pmic/sandbox.c | 79 ++ drivers/power/regulator/Kconfig| 30 +++ drivers/power/regulator/Makefile | 1 + drivers/power/regulator/sandbox.c | 355 + include/power/sandbox_pmic.h | 105 10 files changed, 819 insertions(+), 1 deletion(-) create mode 100644 doc/device-tree-bindings/pmic/sandbox.txt create mode 100644 doc/device-tree-bindings/regulator/sandbox.txt create mode 100644 drivers/power/pmic/i2c_pmic_emul.c create mode 100644 drivers/power/pmic/sandbox.c create mode 100644 drivers/power/regulator/sandbox.c create mode 100644 include/power/sandbox_pmic.h Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 11/13] test: dm: test.dts - move to sandbox dts directory
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: The file test.dts from driver model test directory, was compiled by call dtc in script: test/dm/test-dm.sh. This doesn't allow for including of dtsi files and using of C preprocessor routines in this dts file. Since the mentioned script builds U-Boot before tests, then moving the test.dts file into sandbox dts directory is reasonable. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - new commit --- arch/sandbox/dts/Makefile | 1 + arch/sandbox/dts/test.dts | 230 ++ test/dm/.gitignore| 1 - test/dm/test-dm.sh| 3 +- test/dm/test-main.c | 3 +- test/dm/test.dts | 230 -- 6 files changed, 233 insertions(+), 235 deletions(-) create mode 100644 arch/sandbox/dts/test.dts delete mode 100644 test/dm/.gitignore delete mode 100644 test/dm/test.dts Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 12/13] sandbox: dts: add sandbox_pmic.dtsi and include it to sandbox.dts and test.dts
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This commit adds dtsi file for Sandbox PMIC. It fully describes the PMIC by: - i2c emul node - with a default settings of 16 registers - 2x buck regulator nodes - 2x ldo regulator nodes The default register settings are set with preprocessor macros: - VAL2REG(min[uV/uA], step[uV/uA], val[uV/uA]) - VAL2OMREG(mode id) Both defined in file: - include/dt-bindings/pmic/sandbox_pmic.h The Voltage ranges of each regulator can be found in: - include/power/sandbox_pmic.h The new file is included into: - sandbox.dts - test.dts Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - move sandbox PMIC node into sandbox_pmic.dtsi - add sandbox_pmic.h into dt-bindings directory - add pmic node to: sandbox.dts and test.dts --- arch/sandbox/dts/sandbox.dts| 4 ++ arch/sandbox/dts/sandbox_pmic.dtsi | 78 + arch/sandbox/dts/test.dts | 6 +++ include/dt-bindings/pmic/sandbox_pmic.h | 35 +++ 4 files changed, 123 insertions(+) create mode 100644 arch/sandbox/dts/sandbox_pmic.dtsi create mode 100644 include/dt-bindings/pmic/sandbox_pmic.h Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/3] add boot_get_loadables() to load listed images
Hi Karl, On 13 May 2015 at 06:53, Karl Apsite karl.aps...@dornerworks.com wrote: From: Karl Apsite karl.aps...@dornerworks.com Added a trimmed down instance of boot_get_thing() to satisfy the minimum requierments of the added feature. The function follows the normal patterns set by other boot_getthing's, which should make it a bit easier to combine them all together into one boot_get_image() function in a later refactor. Documentation for the new function can be found in source: common/image.c Signed-off-by: Karl Apsite karl.aps...@dornerworks.com --- common/bootm.c | 22 + common/image-fit.c | 8 - common/image.c | 93 + include/bootstage.h | 1 + include/image.h | 5 ++- 5 files changed, 127 insertions(+), 2 deletions(-) This looks fine to me. Can you please add documentation - doc/uImage.FIT A few bits below. diff --git a/common/bootm.c b/common/bootm.c index 6842029..f04e49b 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -240,6 +240,23 @@ static int bootm_find_fdt(int flag, int argc, char * const argv[]) } #endif +#if defined(CONFIG_FIT) +static int bootm_find_loadables(int flag, int argc, char * const argv[]) +{ + int ret; + + /* find all of the loadables */ + ret = boot_get_loadable(argc, argv, images, IH_ARCH_DEFAULT, + NULL, NULL); + if (ret) { + puts(Loadable(s) is corrupt or invalid\n); printf() here (we are trying to avoid using puts() so that one day we can make it compatible with the C library puts in that it automatically outputs \n). + return 1; + } + + return 0; +} +#endif + int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]) { if (bootm_find_ramdisk(flag, argc, argv)) @@ -250,6 +267,11 @@ int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]) return 1; #endif +#if defined(CONFIG_FIT) + if (bootm_find_loadables(flag, argc, argv)) + return 1; +#endif + return 0; } diff --git a/common/image-fit.c b/common/image-fit.c index 245264d..fe23c13 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1544,6 +1544,8 @@ static const char *fit_get_image_type_property(int type) return FIT_RAMDISK_PROP; case IH_TYPE_X86_SETUP: return FIT_SETUP_PROP; + case IH_TYPE_LOADABLE: + return FIT_LOADABLE_PROP; } return unknown; @@ -1661,7 +1663,11 @@ int fit_image_load(bootm_headers_t *images, ulong addr, os_ok = image_type == IH_TYPE_FLATDT || fit_image_check_os(fit, noffset, IH_OS_LINUX) || fit_image_check_os(fit, noffset, IH_OS_OPENRTOS); - if (!type_ok || !os_ok) { + + /* If either of the checks fail, we should report an error, but /* * If either ... * what it is */ +* if the image type is coming from the loadables field, we +* don't care about what it is */ + if ((!type_ok || !os_ok) image_type != IH_TYPE_LOADABLE) { fit_image_get_os(fit, noffset, os); printf(No %s %s %s Image\n, genimg_get_os_name(os), diff --git a/common/image.c b/common/image.c index fdec496..dc7e795 100644 --- a/common/image.c +++ b/common/image.c @@ -1165,6 +1165,99 @@ int boot_get_setup(bootm_headers_t *images, uint8_t arch, #endif } +/** + * boot_get_loadable - routine to load a list of binaries to memory + * @argc: Ignored Argument + * @argv: Ignored Argument + * @images: pointer to the bootm images structure + * @arch: expected architecture for the image + * @ld_start: Ignored Argument + * @ld_len: Ignored Argument + * + * boot_get_loadable() will take the given FIT configuration, and look + * for a field named loadables. Loadables, is a list of elements in + * the FIT given as strings. exe: + * loadables = linux_kernel@1, fdt@2; + * this function will attempt to parse each string, and load the + * corresponding element from the FIT into memory. Once placed, + * no aditional actions are taken. + * + * returns: @return + * 0, if only valid images or no images are found + * error code, if an error occurs during fit_image_load Great docs. + */ +#if defined(CONFIG_FIT) +int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images, + uint8_t arch, const ulong *ld_start, ulong * const ld_len) +{ + /* +* These variabels are used to hold the current image location +* in system memory. +*/ + ulong tmp_img_addr; + /* These are not used */ + ulong img_data, img_len; + void *buf; + char *uname; + char *uname_end; + int len, fit_img_result; blank line + /* Check to see if the images struct
Re: [U-Boot] [PATCH v2 1/2] imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
Hi Christian, On 15/05/2015 09:53, Christian Gmeiner wrote: Hi 2015-05-14 7:08 GMT+02:00 Tim Harvey thar...@gateworks.com: The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING indicated by OCOTP_CFG3[17:16] which is at 0x440 in the Fusemap Description Table. Return this frequency so that it can be used elsewhere. Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the their Fusemap Description Table however Freescale has confirmed that these eFUSE bits match the description within the IMX6DQRM and that they will be added to the next revision of the respective reference manuals. These have been tested with IMX6 Quad/Solo/Dual-light 800Mhz and 1GHz grades. Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/cpu/armv7/mx6/soc.c | 41 +++ arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + 2 files changed, 42 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index dd34138..71fa1fb 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -83,6 +83,47 @@ u32 get_cpu_rev(void) return (type 12) | (reg + 0x10); } +/* + * OCOTP_CFG3[17:16] (see Fusemap Description Table offset 0x440) + * defines a 2-bit SPEED_GRADING + */ +#define OCOTP_CFG3_SPEED_SHIFT 16 +#define OCOTP_CFG3_SPEED_800MHZ0 +#define OCOTP_CFG3_SPEED_850MHZ1 +#define OCOTP_CFG3_SPEED_1GHZ 2 +#define OCOTP_CFG3_SPEED_1P2GHZ3 Note: 0x3 is defined as reserved (IMX6DQRM Rev 2, 06/2014). That means that the manual is buggy, if the SOC returns exactly this value ;-) + +u32 get_cpu_speed_grade_hz(void) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = ocotp-bank[0]; + struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank-fuse_regs; + uint32_t val; + + val = readl(fuse-cfg3); + val = OCOTP_CFG3_SPEED_SHIFT; + val = 0x3; + + switch (val) { + /* Valid for IMX6DQ */ + case OCOTP_CFG3_SPEED_1P2GHZ: + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + return 12; + /* Valid for IMX6SX/IMX6SDL/IMX6DQ */ + case OCOTP_CFG3_SPEED_1GHZ: + return 99600; + /* Valid for IMX6DQ */ + case OCOTP_CFG3_SPEED_850MHZ: + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + return 85200; + /* Valid for IMX6SX/IMX6SDL/IMX6DQ */ + case OCOTP_CFG3_SPEED_800MHZ: + return 79200; + } + return 0; Do we really need the ifs inside the cases? The speed grading fuse value is read only and we must simply life with the value we read back. So I would drop the is_cpu_type(..) thing. Function does not returns the value of the fuse, else it should returns val. The value is parsed for consistency, and if it is not, 0 means a failure. IMHO this interpretation is correct - I would agree with you only if the return value would be the read value, but it is not. Best regards, Stefano Babic greets -- Christian Gmeiner, MSc https://soundcloud.com/christian-gmeiner -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] imx: mx6: add display of CPU temperature grade in print_cpuinfo()
Hi Tim, On 15/05/2015 15:31, Tim Harvey wrote: Right. My proposal is to merge the currrent patchset, enabling for IMX6SX again when someone will test it. Best regards, Stefano Babic Stefano, Yes, that sounds like the best approach. What were your thoughts on enabling the second CPU: line just to display the temperature grade if CONFIG_IMX6_THERMAL was not enabled? As you said, printing a lot can be disturbing for someone, and letting the possibility to turn out prints is not bad. I will let the board maintainer to decide it. I'm surprised someone on this list hasn't already tested this on IMX6SX. I am quite convinced that patches are tested by a few until they are merged. If there is a ready-to-use tree, people are more motivated to test it. Fabio - certainly you must have a reference board with an IMX6SX and could enable/test that the CPU markings agree with what is detected/displayed via OTP? Of course, I could delay for applying this patchset if Fabio / someone has the possibility to test it with 6X. Anyway, running on 6X is protected by the check on the cpu, and I do not see problems to merge it. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: dek_blob: Add explicit include for mapmem
On 04/05/2015 16:53, ulises.carde...@freescale.com wrote: From: Ulises Cardenas ulises.carde...@freescale.com Boards such as imx6q_sabresd might not have mapmem.h as part of their common library. This causes a build error if the DEK blob command is enabled. Fix: make explicit the include of mapmem.h Signed-off-by: Ulises Cardenas ulises.carde...@freescale.com --- arch/arm/imx-common/cmd_dek.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/imx-common/cmd_dek.c b/arch/arm/imx-common/cmd_dek.c index d93d5fb..ada8adf 100644 --- a/arch/arm/imx-common/cmd_dek.c +++ b/arch/arm/imx-common/cmd_dek.c @@ -14,6 +14,7 @@ #include linux/compiler.h #include fsl_sec.h #include asm/arch/clock.h +#include mapmem.h DECLARE_GLOBAL_DATA_PTR; Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] tbs2910: use default CONFIG_SYS_PBSIZE
On 05/05/2015 23:09, Soeren Moch wrote: Since there is a default CONFIG_SYS_PBSIZE definition in config_fallbacks.h, this setting is no longer required in board configurations. Signed-off-by: Soeren Moch sm...@web.de --- Cc: Stefano Babic sba...@denx.de --- include/configs/tbs2910.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index ea4666d..9efb8c2 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -39,8 +39,6 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_CBSIZE1024 -#define CONFIG_SYS_PBSIZE \ - (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) #define CONFIG_SYS_HZ1000 /* Physical Memory Map */ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] tbs2910: only enable vga output for stdout/stderr when hdmi detected
On 05/05/2015 23:09, Soeren Moch wrote: Only enable graphical output for stdout/stderr (and a usb keyboard for stdin) when a hdmi device is detected. Serial console is always enabled for stdin/stdout/stderr. Signed-off-by: Soeren Moch sm...@web.de --- Cc: Stefano Babic sba...@denx.de --- include/configs/tbs2910.h | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index e5828e0..ea4666d 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -183,7 +183,13 @@ #ifdef CONFIG_USB_KEYBOARD #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE #define CONFIG_SYS_STDIO_DEREGISTER -#define CONFIG_PREBOOT if hdmidet; then usb start; fi +#define CONFIG_PREBOOT \ + if hdmidet; then \ + usb start; \ + run set_con_usb_hdmi; \ + else \ + run set_con_serial; \ + fi; #endif /* CONFIG_USB_KEYBOARD */ #endif /* CONFIG_CMD_USB */ @@ -241,9 +247,12 @@ bootm 0x1080 0x10d0\0 \ console=ttymxc0\0 \ fan=gpio set 92\0 \ - stdin=serial,usbkbd\0 \ - stdout=serial,vga\0 \ - stderr=serial,vga\0 + set_con_serial=setenv stdin serial; \ + setenv stdout serial; \ + setenv stderr serial;\0 \ + set_con_usb_hdmi=setenv stdin serial,usbkbd; \ + setenv stdout serial,vga; \ + setenv stderr serial,vga;\0 #define CONFIG_BOOTCOMMAND \ mmc rescan; \ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] tbs2910: support for usb otg host mode
On 05/05/2015 23:09, Soeren Moch wrote: Add support for USB OTG host mode. Only high speed devices supported so far (e.g. usb 2.0 hub required to connect a keyboard). Signed-off-by: Soeren Moch sm...@web.de --- Cc: Stefano Babic sba...@denx.de --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 3/3] Remove the bootm_find_other() wrapper
Hi Karl, On 13 May 2015 at 06:54, Karl Apsite karl.aps...@dornerworks.com wrote: The bootm_find_other() function was only called once, and ran a quick check before it called bootm_find_images(). This wrapper function was removed by moving the conditional to do_bootm_states (where find_other was being called) and calling bootm_find_images directly. Signed-off-by: Karl Apsite karl.aps...@dornerworks.com --- common/bootm.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index ae0d674..13f2bc9 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -241,19 +241,6 @@ int bootm_find_images(int flag, int argc, char * const argv[]) return 0; } - -static int bootm_find_other(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) -{ - if (((images.os.type == IH_TYPE_KERNEL) || -(images.os.type == IH_TYPE_KERNEL_NOLOAD) || -(images.os.type == IH_TYPE_MULTI)) - (images.os.os == IH_OS_LINUX || -images.os.os == IH_OS_VXWORKS)) - return bootm_find_images(flag, argc, argv); - - return 0; -} #endif /* USE_HOSTC */ /** @@ -581,7 +568,15 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], ret = bootm_find_os(cmdtp, flag, argc, argv); if (!ret (states BOOTM_STATE_FINDOTHER)) { - ret = bootm_find_other(cmdtp, flag, argc, argv); + if (((images.os.type == IH_TYPE_KERNEL) || +(images.os.type == IH_TYPE_KERNEL_NOLOAD) || +(images.os.type == IH_TYPE_MULTI)) + (images.os.os == IH_OS_LINUX || +images.os.os == IH_OS_VXWORKS)) + ret = bootm_find_images(flag, argc, argv); + else + ret = 0; + do_bootm_states() is already too long. Can we keep the bootm_find_other() function? Calling it here matches the rest of the code within do_bootm_states(). argc = 0; /* consume the args */ } -- 2.3.7 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] include: introduce include/linux/io.h as a wrapper of asm/io.h
In the latest Linux coding style, linux/io.h should be included rather than asm/io.h. To follow this standard also in U-Boot, add include/linux/io.h. Currently, it just includes asm/io.h. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- Changes in v2: - Fix a typo s/introcude/introduce/ - Remove a redundant whitespace include/linux/io.h | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 include/linux/io.h diff --git a/include/linux/io.h b/include/linux/io.h new file mode 100644 index 000..1b36a22 --- /dev/null +++ b/include/linux/io.h @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _LINUX_IO_H +#define _LINUX_IO_H + +#include asm/io.h + +#endif /* _LINUX_IO_H */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/10 v2] i.MX6: move duplicated options to mx6_common to standardise mx6 config
On 15.05.2015 11:35, Stefano Babic wrote: Hi Peter, Soeren, On 11/05/2015 20:43, Soeren Moch wrote: Reviewed-by: Eric Nelson eric.nel...@boundarydevices.com Besides my comments on patch 8/10, for the whole series (especially the tbs2910 part): Acked-by: Soeren Moch sm...@web.de Thanks for this great cleanup! I will add my thanks for this great clean-up. Soeren, as you Acked this patchset, I will merge it together with you patches for tbs2910 [1..4], dropping patch 5. Hi Stefano, that's fine thanks! Soeren ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] imx: mx6: add display of CPU temperature grade in print_cpuinfo()
Hi Tim, On Fri, May 15, 2015 at 10:31 AM, Tim Harvey thar...@gateworks.com wrote: Yes, that sounds like the best approach. What were your thoughts on enabling the second CPU: line just to display the temperature grade if CONFIG_IMX6_THERMAL was not enabled? I'm surprised someone on this list hasn't already tested this on IMX6SX. Fabio - certainly you must have a reference board with an IMX6SX and could enable/test that the CPU markings agree with what is detected/displayed via OTP? Yes, I do have a mx6sx sdb board, but the one I have is from the old silicon and I had issues event with the temperature reading, so I prefer not to rely on my testing. Ye Li / Peng / Nitin, Could some of you please test Tim's series on a mx6sx sdb and let us know what it displays on the CPU lines? Thanks, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 00/13] PMIC/REGULATOR cleanup and Sandbox tests
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: Hello Simon, This patchset fixes the build issues. It changes the last three top commits of u-boot-dm/next. So it is rebased onto: 4e9a6eb dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMIC The rebased version, can be fetched from: https://github.com/bobenstein/u-boot.git branch: dm-pmic-v5-sandbox Best regards, Przemyslaw Marczak Przemyslaw Marczak (13): odroid: dts: add 'voltage-regulators' description to max77686 node odroid: enable driver model pmic/regulator API and MAX77686 drivers dm: pmic: code cleanup of PMIC uclass driver dm: regulator: uclass driver code cleanup common: cmd pmic: command cleanup common: cmd regulator: command cleanup doc: driver-model: pmic-framework.txt - cleanup sandbox: i2c: search child emul dev and check its uclass id sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator test: dm: add sandbox PMIC framework tests test: dm: test.dts - move to sandbox dts directory sandbox: dts: add sandbox_pmic.dtsi and include it to sandbox.dts and test.dts sandbox: defconfig: enable support of sandbox PMIC drivers arch/arm/dts/exynos4412-odroid.dts | 253 ++ arch/sandbox/dts/Makefile | 1 + arch/sandbox/dts/sandbox.dts | 4 + arch/sandbox/dts/sandbox_pmic.dtsi | 78 ++ arch/sandbox/dts/test.dts | 236 board/samsung/common/misc.c| 1 + board/samsung/odroid/odroid.c | 76 +++--- common/cmd_pmic.c | 131 - common/cmd_regulator.c | 239 + configs/odroid_defconfig | 8 +- configs/sandbox_defconfig | 7 + doc/device-tree-bindings/pmic/sandbox.txt | 35 +++ doc/device-tree-bindings/regulator/sandbox.txt | 45 doc/driver-model/pmic-framework.txt| 20 +- drivers/i2c/sandbox_i2c.c | 20 +- drivers/power/pmic/Kconfig | 27 +- drivers/power/pmic/Makefile| 3 +- drivers/power/pmic/i2c_pmic_emul.c | 142 ++ drivers/power/pmic/max77686.c | 15 +- drivers/power/pmic/pmic-uclass.c | 31 +-- drivers/power/pmic/sandbox.c | 79 ++ drivers/power/regulator/Kconfig| 32 ++- drivers/power/regulator/Makefile | 1 + drivers/power/regulator/regulator-uclass.c | 104 +--- drivers/power/regulator/sandbox.c | 355 + include/configs/odroid.h | 5 - include/dt-bindings/pmic/sandbox_pmic.h| 35 +++ include/power/pmic.h | 39 +-- include/power/regulator.h | 116 include/power/sandbox_pmic.h | 138 ++ test/dm/.gitignore | 1 - test/dm/Makefile | 2 + test/dm/pmic.c | 69 + test/dm/regulator.c| 325 ++ test/dm/test-dm.sh | 3 +- test/dm/test-main.c| 3 +- test/dm/test.dts | 230 37 files changed, 2287 insertions(+), 622 deletions(-) create mode 100644 arch/sandbox/dts/sandbox_pmic.dtsi create mode 100644 arch/sandbox/dts/test.dts create mode 100644 doc/device-tree-bindings/pmic/sandbox.txt create mode 100644 doc/device-tree-bindings/regulator/sandbox.txt create mode 100644 drivers/power/pmic/i2c_pmic_emul.c create mode 100644 drivers/power/pmic/sandbox.c create mode 100644 drivers/power/regulator/sandbox.c create mode 100644 include/dt-bindings/pmic/sandbox_pmic.h create mode 100644 include/power/sandbox_pmic.h delete mode 100644 test/dm/.gitignore create mode 100644 test/dm/pmic.c create mode 100644 test/dm/regulator.c delete mode 100644 test/dm/test.dts -- 1.9.1 I've pulled this in from u-boot-dm/next to master. - Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 02/13] odroid: enable driver model pmic/regulator API and MAX77686 drivers
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This change enables the configs required to init and setup max77686 regulator driver, using the new driver model pmic and regulator API. And also changes the old pmic framework calls to the new ones. This commits enables: - CONFIG_ERRNO_STR - CONFIG_DM_PMIC - CONFIG_DM_PMIC_CMD - CONFIG_DM_PMIC_MAX77686 - CONFIG_DM_REGULATOR - CONFIG_DM_REGULATOR_CMD - CONFIG_DM_REGULATOR_MAX77686 And removes the unused: - CONFIG_DM_I2C_COMPAT - CONFIG_POWER - CONFIG_POWER_I2C - CONFIG_POWER_MAX77686 Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org --- Change V2: - split two commits for odroid into one --- board/samsung/common/misc.c | 1 + board/samsung/odroid/odroid.c | 77 +-- configs/odroid_defconfig | 8 - include/configs/odroid.h | 5 --- 4 files changed, 53 insertions(+), 38 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] wandboard: Switch to SPL support
Hi Fabio, On 12/05/2015 01:50, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Currently we need to build one U-boot image for each of the wandboard variants: quad, dual-lite and solo. By switching to SPL we can support all these variants with a single binary, which is very convenient. Based on the work from Richard Hu. Tested kernel booting on the three boards. Signed-off-by: Richard Hu hak...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/Kconfig | 1 + board/wandboard/MAINTAINERS | 4 +- board/wandboard/Makefile | 2 +- board/wandboard/README | 22 +-- board/wandboard/spl.c| 317 +++ board/wandboard/wandboard.c | 176 -- configs/wandboard_defconfig | 6 + configs/wandboard_dl_defconfig | 3 - configs/wandboard_quad_defconfig | 3 - configs/wandboard_solo_defconfig | 3 - include/configs/wandboard.h | 27 ++-- 11 files changed, 448 insertions(+), 116 deletions(-) create mode 100644 board/wandboard/spl.c create mode 100644 configs/wandboard_defconfig delete mode 100644 configs/wandboard_dl_defconfig delete mode 100644 configs/wandboard_quad_defconfig delete mode 100644 configs/wandboard_solo_defconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 00be305..ca7448e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -493,6 +493,7 @@ config TARGET_UDOO config TARGET_WANDBOARD bool Support wandboard select CPU_V7 + select SUPPORT_SPL config TARGET_WARP bool Support WaRP diff --git a/board/wandboard/MAINTAINERS b/board/wandboard/MAINTAINERS index b986980..0680517 100644 --- a/board/wandboard/MAINTAINERS +++ b/board/wandboard/MAINTAINERS @@ -3,6 +3,4 @@ M:Fabio Estevam fabio.este...@freescale.com S: Maintained F: board/wandboard/ F: include/configs/wandboard.h -F: configs/wandboard_dl_defconfig -F: configs/wandboard_quad_defconfig -F: configs/wandboard_solo_defconfig +F: configs/wandboard_defconfig diff --git a/board/wandboard/Makefile b/board/wandboard/Makefile index 5b50eca..db9f4a6 100644 --- a/board/wandboard/Makefile +++ b/board/wandboard/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := wandboard.o +obj-y := wandboard.o spl.o diff --git a/board/wandboard/README b/board/wandboard/README index 1f678e1..c6c0132 100644 --- a/board/wandboard/README +++ b/board/wandboard/README @@ -12,31 +12,25 @@ http://www.wandboard.org/ Building U-boot for Wandboard - -To build U-Boot for the Wandboard Dual Lite version: +To build U-Boot for the Wandboard: -$ make wandboard_dl_config -$ make - -To build U-Boot for the Wandboard Solo version: - -$ make wandboard_solo_config -$ make - -To build U-Boot for the Wandboard Quad version: - -$ make wandboard_quad_config +$ make wandboard_config $ make Flashing U-boot into the SD card -- After the 'make' command completes, the generated 'u-boot.imx' binary must be +- After the 'make' command completes, the generated 'SPL' binary must be flashed into the SD card; -$ sudo dd if=u-boot.imx of=/dev/mmcblk0 bs=512 seek=2; sync +$ sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync (Note - the SD card node may vary, so adjust this as needed). +- Flash the u-boot.img image into the SD card: + +sudo dd if=u-boot.img of=/dev/mmcblk0 bs=1k seek=69; sync + - Insert the SD card into the slot located in the bottom of the board (same side as the mx6 processor) diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c new file mode 100644 index 000..77afae7 --- /dev/null +++ b/board/wandboard/spl.c @@ -0,0 +1,317 @@ +/* + * Copyright (C) 2014 Wandboard + * Author: Tungyi Lin tungyilin1...@gmail.com + * Richard Hu hak...@gmail.com + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/video.h +#include mmc.h +#include fsl_esdhc.h +#include asm/arch/crm_regs.h +#include asm/io.h +#include asm/arch/sys_proto.h +#include spl.h + +DECLARE_GLOBAL_DATA_PTR; + +#if defined(CONFIG_SPL_BUILD) +#include asm/arch/mx6-ddr.h +/* + * Driving strength: + * 0x30 == 40 Ohm + * 0x28 == 48 Ohm + */ + +#define IMX6DQ_DRIVE_STRENGTH0x30 +#define IMX6SDL_DRIVE_STRENGTH 0x28 + +/* configure MX6Q/DUAL mmdc DDR io registers */ +static struct mx6dq_iomux_ddr_regs mx6dq_ddr_ioregs = { + .dram_sdclk_0 = IMX6DQ_DRIVE_STRENGTH, + .dram_sdclk_1 = IMX6DQ_DRIVE_STRENGTH, + .dram_cas = IMX6DQ_DRIVE_STRENGTH, + .dram_ras =
[U-Boot] [PATCH] include: introcude include/linux/io.h as a wrapper of asm/io.h
In Linux coding style, linux/io.h should be included rather than asm/io.h. To follow this style in U-boot, add include/linux/io.h. Currently, it just includes asm/io.h. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- include/linux/io.h | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 include/linux/io.h diff --git a/include/linux/io.h b/include/linux/io.h new file mode 100644 index 000..1803edb --- /dev/null +++ b/include/linux/io.h @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _LINUX_IO_H +#define _LINUX_IO_H + +#include asm/io.h + +#endif /* _LINUX_IO_H */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx6: Set shared override bit in PL310 AUX_CTRL register
Hi Stefano, On Fri, May 15, 2015 at 10:35 AM, Stefano Babic sba...@denx.de wrote: It looks like from the discussion and the following threads that a general solution cannot be easy found. I agree with you to apply it at least for i.MX6, and let's see if in the future we can factorize it for other SOCs. That sounds good! Thanks ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] arm, imx6, i2c: add I2C4 for MX6DL
On 13/05/2015 07:50, Heiko Schocher wrote: add I2C4 modul for MX6DL based boards. Signed-off-by: Heiko Schocher h...@denx.de --- checkpatch shows: WARNING: line over 80 characters +#define MXC_CCM_CCGR1_I2C4_SERIAL_MASK (3 MXC_CCM_CCGR1_I2C4_SERIAL_OFFSET) but the hole file is full of lines longer than80 characters, so I let this line in the old style ... Changes in v2: - add comment from Stefano Babic - reworked patch on base of commit f8cb101e1e3f5 - follow up patch cleans up different define naming arch/arm/cpu/armv7/mx6/clock.c | 33 +--- arch/arm/imx-common/i2c-mxv7.c | 5 - arch/arm/include/asm/arch-mx6/crm_regs.h | 2 ++ arch/arm/include/asm/arch-mx6/imx-regs.h | 1 + drivers/i2c/mxc_i2c.c| 5 - 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 055f44e..ae99945 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -140,23 +140,34 @@ int enable_usdhc_clk(unsigned char enable, unsigned bus_num) #endif #ifdef CONFIG_SYS_I2C_MXC -/* i2c_num can be from 0 - 2 */ +/* i2c_num can be from 0 - 3 */ int enable_i2c_clk(unsigned char enable, unsigned i2c_num) { u32 reg; u32 mask; - if (i2c_num 2) + if (i2c_num 3) return -EINVAL; - - mask = MXC_CCM_CCGR_CG_MASK - (MXC_CCM_CCGR2_I2C1_SERIAL_OFFSET + (i2c_num 1)); - reg = __raw_readl(imx_ccm-CCGR2); - if (enable) - reg |= mask; - else - reg = ~mask; - __raw_writel(reg, imx_ccm-CCGR2); + if (i2c_num 3) { + mask = MXC_CCM_CCGR_CG_MASK + (MXC_CCM_CCGR2_I2C1_SERIAL_OFFSET + + (i2c_num 1)); + reg = __raw_readl(imx_ccm-CCGR2); + if (enable) + reg |= mask; + else + reg = ~mask; + __raw_writel(reg, imx_ccm-CCGR2); + } else { + mask = MXC_CCM_CCGR_CG_MASK + (MXC_CCM_CCGR1_I2C4_SERIAL_OFFSET); + reg = __raw_readl(imx_ccm-CCGR1); + if (enable) + reg |= mask; + else + reg = ~mask; + __raw_writel(reg, imx_ccm-CCGR1); + } return 0; } #endif diff --git a/arch/arm/imx-common/i2c-mxv7.c b/arch/arm/imx-common/i2c-mxv7.c index 1a632e7..33205fb 100644 --- a/arch/arm/imx-common/i2c-mxv7.c +++ b/arch/arm/imx-common/i2c-mxv7.c @@ -67,9 +67,12 @@ static void * const i2c_bases[] = { #ifdef I2C3_BASE_ADDR (void *)I2C3_BASE_ADDR, #endif +#ifdef I2C4_BASE_ADDR + (void *)I2C4_BASE_ADDR, +#endif }; -/* i2c_index can be from 0 - 2 */ +/* i2c_index can be from 0 - 3 */ int setup_i2c(unsigned i2c_index, int speed, int slave_addr, struct i2c_pads_info *p) { diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h b/arch/arm/include/asm/arch-mx6/crm_regs.h index 0592ce0..887d048 100644 --- a/arch/arm/include/asm/arch-mx6/crm_regs.h +++ b/arch/arm/include/asm/arch-mx6/crm_regs.h @@ -592,6 +592,8 @@ struct mxc_ccm_reg { #define MXC_CCM_CCGR2_I2C2_SERIAL_MASK (3 MXC_CCM_CCGR2_I2C2_SERIAL_OFFSET) #define MXC_CCM_CCGR2_I2C3_SERIAL_OFFSET 10 #define MXC_CCM_CCGR2_I2C3_SERIAL_MASK (3 MXC_CCM_CCGR2_I2C3_SERIAL_OFFSET) +#define MXC_CCM_CCGR1_I2C4_SERIAL_OFFSET 8 +#define MXC_CCM_CCGR1_I2C4_SERIAL_MASK (3 MXC_CCM_CCGR1_I2C4_SERIAL_OFFSET) #define MXC_CCM_CCGR2_OCOTP_CTRL_OFFSET 12 #define MXC_CCM_CCGR2_OCOTP_CTRL_MASK(3 MXC_CCM_CCGR2_OCOTP_CTRL_OFFSET) #define MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_OFFSET14 diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index 9a4ad8b..3d3d137 100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h @@ -277,6 +277,7 @@ #define UART3_BASE (AIPS2_OFF_BASE_ADDR + 0x6C000) #define UART4_BASE (AIPS2_OFF_BASE_ADDR + 0x7) #define UART5_BASE (AIPS2_OFF_BASE_ADDR + 0x74000) +#define I2C4_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x78000) #define IP2APB_USBPHY1_BASE_ADDR(AIPS2_OFF_BASE_ADDR + 0x78000) #define IP2APB_USBPHY2_BASE_ADDR(AIPS2_OFF_BASE_ADDR + 0x7C000) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 42782cb..c258a2b 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -421,7 +421,10 @@ static void * const i2c_bases[] = { defined(CONFIG_MX6) || defined(CONFIG_LS102XA) (void *)I2C1_BASE_ADDR, (void *)I2C2_BASE_ADDR, - (void *)I2C3_BASE_ADDR +
Re: [U-Boot] [PATCH V2 01/13] odroid: dts: add 'voltage-regulators' description to max77686 node
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: Adding regulators subnode to fdt max77686 node, allows properly init regulators by the max77686 regulator driver. This enables the complete functionality of the regulator command. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org --- arch/arm/dts/exynos4412-odroid.dts | 253 + 1 file changed, 253 insertions(+) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 06/13] common: cmd regulator: command cleanup
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This commit cleanups the regulator command. The first change, is adjusting regulator dev command to use regulator-name constraint, for setting the operating device. Thanks to this, the regulator_get() function is removed. This also updates do_list() function, with loop over uclass_find_* function calls, to prevent probe of all listed regulators. This also cleanups the printing in command. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - none --- common/cmd_regulator.c | 239 + 1 file changed, 122 insertions(+), 117 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 05/13] common: cmd pmic: command cleanup
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This commit cleanups the use of function: failed(). The new function name is: failure(), and it is used for print errno and the errno-related message only. The second change is choosing PMIC device by it's name, instead of seq number. Thanks to this change, for set the current device, call of pmic_get() is enough. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - none --- common/cmd_pmic.c | 131 +++--- 1 file changed, 55 insertions(+), 76 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 07/13] doc: driver-model: pmic-framework.txt - cleanup
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This commit cleanups the PMIC framework documentation. Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - none Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 03/13] dm: pmic: code cleanup of PMIC uclass driver
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: The cleanup includes: - pmic.h - fix mistakes in a few comments - pmic operations: value 'reg_count' - redefine as function call - fix function name: pmic_bind_childs() - pmic_bind_children() - pmic_bind_children: change the 'while' loop with the 'for' - add implementation of pmic_reg_count() method - pmic_bind_children() - update function call name - Kconfig: add new line at the end of file - Update MAX77686 driver code Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - cleanup of the pmic_bind_children() loop - split with: dm: pmic: max77686: update driver code --- drivers/power/pmic/Kconfig | 2 +- drivers/power/pmic/max77686.c| 15 ++- drivers/power/pmic/pmic-uclass.c | 31 +-- include/power/pmic.h | 39 --- 4 files changed, 40 insertions(+), 47 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 04/13] dm: regulator: uclass driver code cleanup
On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: This cleanup includes: - remove of the preprocessor macros which pointed to long name functions - update of the names of some regulator uclass driver functions - cleanup of the function regulator_autoset() - reword of some comments of regulator uclass header file - regulator_get_by_platname: check error for uclass_find_* function calls - add function: regulator_name_is_unique - regulator post_bind(): check regulator name uniqueness - fix mistakes in: regulator/Kconfig - regulator.h: update comments - odroid u3: cleanup the regulator calls Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested on sandbox: Tested-by: Simon Glass s...@chromium.org --- Changes V2: - odroid u3: cleanup the regulator calls --- board/samsung/odroid/odroid.c | 9 +-- drivers/power/regulator/Kconfig| 2 +- drivers/power/regulator/regulator-uclass.c | 104 +- include/power/regulator.h | 116 +++-- 4 files changed, 132 insertions(+), 99 deletions(-) Applied to u-boot-dm, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 18/20] Add Chrome OS config header
On 05/13/2015 07:19 AM, Simon Glass wrote: Hi Stephen, On 25 February 2015 at 16:28, Stephen Warren swar...@wwwdotorg.org wrote: On 02/17/2015 03:29 PM, Simon Glass wrote: From: Doug Anderson diand...@chromium.org This header includes useful scripts which can be used with any board that can boot Chrome OS. In particular, 'run nvboot' will boot a board without verified boot enabled. I think this needs a bit of minification for an upstream U-Boot. In particular, many of the environment variables overlap semantically or by name with those from include/config_distro_*.h, and I'd like to see any U-Boot for the Tegra Chromebooks (at least) support booting both ChromeOS kernels and arbitrary distros using the environment from config_distro_bootcmd.h. That would be good. I think it is possible also, although I haven't been able to make it work so far. I can get it to find the kernel, although not the one that it needs and the U-Boot scripts are in a different place on the disk in Chrome OS. Also the command line args are wrong. I would not expect the scripts from config_distro_bootcmd.h to just work for ChromeOS; I'd expect it to be an alternate set of scripts. I'm mainly looking for the ChromeOS scripts to use the same variables where they mean the same thing, to avoid having two completely different sets. Re: the command-line; wouldn't the ChromeOS scripts just set bootargs from scratch whenever they were used? The scripts in config_distro_bootcmd.h expect the complete command-line to come from the extlinux.conf or boot.scr file that they load; the scripts in config_distro_bootcmd.h shouldn't be providing a command-line. So I think for now we should either apply this as it is (since it works) or wait until someone has time to rationalise things a bit and figure out how to support Chrome OS booting in the distro stuff. I really think this should be cleaned up before it's applied. As soon as it's applied, it'll serve as an example and other boards will pick up the same code. That'll make the eventual required cleanup more involved. +#define CONFIG_CROS_FULL There are a ton of macros in here without much in the way of explanation. Shouldn't everything be documented in the README? The documentation for these is at the top of the file: + * In anticipation of implementing early firmware selection, these defines + * signal the features that are required in U-Boot. Not all of them by far; I mean things like CONFIG_CHROMEOS, CONFIG_CHROMEOS_TEST, CONFIG_CHROMEOS_CONST_FLAG, CONFIG_VBOOT_REGION_READ, CONFIG_CROS_RO, CONFIG_CHROMEOS_DISPLAY, CONFIG_CROS_LEGACY_VBOOT, CONFIG_CHROMEOS_USB, and probably a variety of others I didn't pick up in a quick scan. I don't see any of those in u-boot/master as of a few days ago either, so I think they're all introduced new in this patch? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/6] cmd_ide: Eliminate build warnings in atapi_inquiry()
Elinimate the following build warning in atapi_inquiry(): warning: assignment from incompatible pointer type [enabled by default] Signed-off-by: Bin Meng bmeng...@gmail.com --- common/cmd_ide.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 04a6d9b..ecd3e9d 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -79,7 +79,7 @@ static void ident_cpy (unsigned char *dest, unsigned char *src, unsigned int len #ifdef CONFIG_ATAPI static voidatapi_inquiry(block_dev_desc_t *dev_desc); -static ulong atapi_read(int device, ulong blknr, lbaint_t blkcnt, +static ulong atapi_read(int device, lbaint_t blknr, lbaint_t blkcnt, void *buffer); #endif @@ -1388,13 +1388,13 @@ static void atapi_inquiry(block_dev_desc_t *dev_desc) #define ATAPI_READ_BLOCK_SIZE 2048/* assuming CD part */ #define ATAPI_READ_MAX_BLOCK (ATAPI_READ_MAX_BYTES/ATAPI_READ_BLOCK_SIZE) -ulong atapi_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer) +ulong atapi_read(int device, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { ulong n = 0; unsigned char ccb[12]; /* Command descriptor block */ ulong cnt; - debug(atapi_read dev %d start %lX, blocks LBAF buffer at %lX\n, + debug(atapi_read dev %d start LBAF blocks LBAF buffer at %lX\n, device, blknr, blkcnt, (ulong) buffer); do { -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/6] drivers: block: Remove the ata_piix driver
This driver was originally added to support the native IDE mode for Intel chipset, however it has some bugs like not supporting ATAPI devices, endianess issue, or even broken build when CONFIG_LAB48. Given no board is using this driver as of today, rather than fixing all these issues we just remove it from the source tree. Signed-off-by: Bin Meng bmeng...@gmail.com --- drivers/block/Makefile | 1 - drivers/block/ata_piix.c | 717 --- drivers/block/ata_piix.h | 71 - 3 files changed, 789 deletions(-) delete mode 100644 drivers/block/ata_piix.c delete mode 100644 drivers/block/ata_piix.h diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 8697da4..f161c01 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -6,7 +6,6 @@ # obj-$(CONFIG_SCSI_AHCI) += ahci.o -obj-$(CONFIG_ATA_PIIX) += ata_piix.o obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o obj-$(CONFIG_FSL_SATA) += fsl_sata.o obj-$(CONFIG_IDE_FTIDE020) += ftide020.o diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c deleted file mode 100644 index 3042684..000 --- a/drivers/block/ata_piix.c +++ /dev/null @@ -1,717 +0,0 @@ -/* - * Copyright (C) Procsys. All rights reserved. - * Author: Mushtaq Khan mushta...@procsys.com - * mushtaqk_...@yahoo.co.in - * - * SPDX-License-Identifier:GPL-2.0+ - * - * with the reference to ata_piix driver in kernel 2.4.32 - */ - -/* - * This file contains SATA controller and SATA drive initialization functions - */ - -#include common.h -#include asm/io.h -#include pci.h -#include command.h -#include config.h -#include asm/byteorder.h -#include part.h -#include ide.h -#include ata.h -#include sata.h - -#define DEBUG_SATA 0 /* For debug prints set DEBUG_SATA to 1 */ - -#define SATA_DECL -#define DRV_DECL /* For file specific declarations */ -#include ata_piix.h - -/* Macros realted to PCI */ -#define PCI_SATA_BUS 0x00 -#define PCI_SATA_DEV 0x1f -#define PCI_SATA_FUNC 0x02 - -#define PCI_SATA_BASE1 0x10 -#define PCI_SATA_BASE2 0x14 -#define PCI_SATA_BASE3 0x18 -#define PCI_SATA_BASE4 0x1c -#define PCI_SATA_BASE5 0x20 -#define PCI_PMR 0x90 -#define PCI_PI 0x09 -#define PCI_PCS 0x92 -#define PCI_DMA_CTL 0x48 - -#define PORT_PRESENT (10) -#define PORT_ENABLED (14) - -u32 bdf; -u32 iobase1; /* Primary cmd block */ -u32 iobase2; /* Primary ctl block */ -u32 iobase3; /* Sec cmd block */ -u32 iobase4; /* sec ctl block */ -u32 iobase5; /* BMDMA*/ - -int pci_sata_init(void) -{ - u32 bus = PCI_SATA_BUS; - u32 dev = PCI_SATA_DEV; - u32 fun = PCI_SATA_FUNC; - u16 cmd = 0; - u8 lat = 0, pcibios_max_latency = 0xff; - u8 pmr; /* Port mapping reg */ - u8 pi; /* Prgming Interface reg */ - - bdf = PCI_BDF(bus, dev, fun); - pci_read_config_dword(bdf, PCI_SATA_BASE1, iobase1); - pci_read_config_dword(bdf, PCI_SATA_BASE2, iobase2); - pci_read_config_dword(bdf, PCI_SATA_BASE3, iobase3); - pci_read_config_dword(bdf, PCI_SATA_BASE4, iobase4); - pci_read_config_dword(bdf, PCI_SATA_BASE5, iobase5); - - if ((iobase1 == 0x) || (iobase2 == 0x) || - (iobase3 == 0x) || (iobase4 == 0x) || - (iobase5 == 0x)) { - /* ERROR */ - printf(error no base addr for SATA controller\n); - return 1; - } - - iobase1 = 0xFFFE; - iobase2 = 0xFFFE; - iobase3 = 0xFFFE; - iobase4 = 0xFFFE; - iobase5 = 0xFFFE; - - /* check for mode */ - pci_read_config_byte(bdf, PCI_PMR, pmr); - if (pmr 1) { - puts(combined mode not supported\n); - return 1; - } - - pci_read_config_byte(bdf, PCI_PI, pi); - if ((pi 0x05) != 0x05) { - puts(Sata is in Legacy mode\n); - return 1; - } else - puts(sata is in Native mode\n); - - /* MASTER CFG AND IO CFG */ - pci_read_config_word(bdf, PCI_COMMAND, cmd); - cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_IO; - pci_write_config_word(bdf, PCI_COMMAND, cmd); - pci_read_config_byte(dev, PCI_LATENCY_TIMER, lat); - - if (lat 16) - lat = (64 = pcibios_max_latency) ? 64 : pcibios_max_latency; - else if (lat pcibios_max_latency) - lat = pcibios_max_latency; - pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); - - return 0; -} - -int sata_bus_probe(int port_no) -{ - int orig_mask, mask; - u16 pcs; - - mask = (PORT_PRESENT port_no); - pci_read_config_word(bdf, PCI_PCS, pcs); - orig_mask = (int) pcs 0xff; - if ((orig_mask mask) != mask) - return 0; - else - return 1; -} - -int init_sata(int dev) -{ - static int done; - u8 i, rv =
[U-Boot] [PATCH 1/6] pci: Allow debug message output in pci_auto.c
Remove the '#undef DEBUG' in pci_auto.c so that we can enable debug message output. Signed-off-by: Bin Meng bmeng...@gmail.com --- drivers/pci/pci_auto.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index e8da977..43965d8 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -14,7 +14,6 @@ #include errno.h #include pci.h -#undef DEBUG #ifdef DEBUG #define DEBUGF(x...) printf(x) #else -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/6] x86: qemu: Add ATA/SATA support
Enable legacy IDE support on the pc target and AHCI support on the q35 target. Default configuration is to support the pc target. Signed-off-by: Bin Meng bmeng...@gmail.com --- include/configs/qemu-x86.h | 26 +- include/pci_ids.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h index e2a223f..77f88d2 100644 --- a/include/configs/qemu-x86.h +++ b/include/configs/qemu-x86.h @@ -36,8 +36,32 @@ stdout=serial,vga\0 \ stderr=serial,vga\0 +/* + * ATA/SATA support for QEMU x86 targets + * - Only legacy IDE controller is supported for QEMU '-M pc' target + * - AHCI controller is supported for QEMU '-M q35' target + * + * Default configuraion is to support the QEMU default x86 target + * Undefine CONFIG_CMD_IDE to support q35 target + */ +#define CONFIG_CMD_IDE +#ifdef CONFIG_CMD_IDE +#define CONFIG_SYS_IDE_MAXBUS 2 +#define CONFIG_SYS_IDE_MAXDEVICE 4 +#define CONFIG_SYS_ATA_BASE_ADDR 0 +#define CONFIG_SYS_ATA_DATA_OFFSET 0 +#define CONFIG_SYS_ATA_REG_OFFSET 0 +#define CONFIG_SYS_ATA_ALT_OFFSET 0 +#define CONFIG_SYS_ATA_IDE0_OFFSET 0x1f0 +#define CONFIG_SYS_ATA_IDE1_OFFSET 0x170 +#define CONFIG_ATAPI + +#undef CONFIG_SCSI_AHCI +#undef CONFIG_CMD_SCSI +#else #define CONFIG_SCSI_DEV_LIST \ - {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_1} + {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_AHCI} +#endif /* GPIO is not supported */ #undef CONFIG_INTEL_ICH6_GPIO diff --git a/include/pci_ids.h b/include/pci_ids.h index 2e66851..5771e12 100644 --- a/include/pci_ids.h +++ b/include/pci_ids.h @@ -2838,6 +2838,7 @@ #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 #define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916 #define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918 +#define PCI_DEVICE_ID_INTEL_ICH9_AHCI 0x2922 #define PCI_DEVICE_ID_INTEL_I7_MCR 0x2c18 #define PCI_DEVICE_ID_INTEL_I7_MC_TAD 0x2c19 #define PCI_DEVICE_ID_INTEL_I7_MC_RAS 0x2c1a -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/6] pci: Do not skip legacy IDE device configutation
The legacy IDE device has a BAR4 (Bus Master Interface BAR) which needs to be configured. Signed-off-by: Bin Meng bmeng...@gmail.com --- drivers/pci/pci_auto.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index 43965d8..7c10983 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -20,8 +20,6 @@ #define DEBUGF(x...) #endif /* DEBUG */ -#definePCIAUTO_IDE_MODE_MASK 0x05 - /* the user can define CONFIG_SYS_PCI_CACHE_LINE_SIZE to avoid problems */ #ifndef CONFIG_SYS_PCI_CACHE_LINE_SIZE #define CONFIG_SYS_PCI_CACHE_LINE_SIZE 8 @@ -424,7 +422,6 @@ int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev) { unsigned int sub_bus = PCI_BUS(dev); unsigned short class; - unsigned char prg_iface; int n; pci_hose_read_config_word(hose, dev, PCI_CLASS_DEVICE, class); @@ -460,17 +457,6 @@ int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev) #endif break; - case PCI_CLASS_STORAGE_IDE: - pci_hose_read_config_byte(hose, dev, PCI_CLASS_PROG, prg_iface); - if (!(prg_iface PCIAUTO_IDE_MODE_MASK)) { - DEBUGF(PCI Autoconfig: Skipping legacy mode IDE controller\n); - return sub_bus; - } - - pciauto_setup_device(hose, dev, 6, hose-pci_mem, - hose-pci_prefetch, hose-pci_io); - break; - case PCI_CLASS_BRIDGE_CARDBUS: /* * just do a minimal setup of the bridge, -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 17/19] imx: ventana: add pmic_setup to SPL
We need to do any PMIC setup in the SPL if we are to bypass U-Boot for falcon mode. Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: rebased --- board/gateworks/gw_ventana/gw_ventana_spl.c | 3 +++ include/configs/gw_ventana.h| 1 + 2 files changed, 4 insertions(+) diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index 79cb594..2bec428 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -551,6 +551,9 @@ void spl_board_init(void) default: puts(Unknown boot device\n); } + + /* PMIC init */ + setup_pmic(); } void reset_cpu(ulong addr) diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 663e9c5..533cbc3 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -13,6 +13,7 @@ #define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_POWER_SUPPORT /* Location in NAND to read U-Boot from */ #define CONFIG_SYS_NAND_U_BOOT_OFFS (14 * SZ_1M) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/5] tbs2910: add CONFIG_SUPPORT_EMMC_BOOT
On 05/05/2015 23:09, Soeren Moch wrote: Add emmc boot partition commands to be able to select the boot partition. Signed-off-by: Soeren Moch sm...@web.de --- Cc: Stefano Babic sba...@denx.de --- include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 9efb8c2..1f3c3d8 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -102,6 +102,7 @@ #define CONFIG_MMC #define CONFIG_CMD_MMC #define CONFIG_GENERIC_MMC +#define CONFIG_SUPPORT_EMMC_BOOT #define CONFIG_BOUNCE_BUFFER /* Ethernet */ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] imx: mx6: add display of CPU temperature grade in print_cpuinfo()
Hi Tim, On 15/05/2015 15:16, Tim Harvey wrote: On Fri, May 15, 2015 at 1:14 AM, Christian Gmeiner christian.gmei...@gmail.com wrote: 2015-05-14 7:11 GMT+02:00 Tim Harvey thar...@gateworks.com: When CONFIG_IMX6_THERMAL is defined print the CPU temperature grade info along with the current temperature. Before: CPU: Temperature 42 C After: CPU: Automotive temperature grade (-40C to 125C) at 42C CPU: Industiral temperature grade (-40C to 105C) at 42C CPU: Extended Commercial temperature grade (-20C to 105C) at 42C Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: - moved display of CPU temperature grade to own patch and combined with the current temperature from the thermal sensor driver - add example output to description Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/imx-common/cpu.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 6b20482..f1b49bb 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -16,6 +16,7 @@ #include asm/arch/clock.h #include asm/arch/sys_proto.h #include asm/arch/crm_regs.h +#include imx_thermal.h #include ipu_pixfmt.h #include thermal.h #include sata.h @@ -146,7 +147,7 @@ int print_cpuinfo(void) #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) struct udevice *thermal_dev; - int cpu_tmp, ret; + int cpu_tmp, minc, maxc, ret; #endif cpurev = get_cpu_rev(); @@ -172,16 +173,34 @@ int print_cpuinfo(void) #endif #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) + puts(CPU: ); + if (!is_cpu_type(MXC_CPU_MX6SX)) { + switch (get_cpu_temp_grade(minc, maxc)) { + case TEMP_AUTOMOTIVE: + puts(Automotive temperature grade ); + break; + case TEMP_INDUSTRIAL: + puts(Industrial temperature grade ); + break; + case TEMP_EXTCOMMERCIAL: + puts(Extended Commercial temperature grade ); + break; + default: + puts(Commercial temperature grade ); + break; + } + printf((%dC to %dC), minc, maxc); + } For the additions above we do not need CONFIG_IMX6_THERMAL. Hi Christian, Thanks for the review. Its true that CONFIG_IMX6_THERMAL is not needed for cpu temperature grade but I felt that there would be resistance in general to adding additional lines in print_cpuinfo without allowing them to be easily disabled. Agree on this point. I felt that temperature grade and current temperature made sense to go together in this fasion. Looking over this though did remind me that now that Freescale has told me that the IMX6SX has the same OTP registers/definitions for temperature grade programmed I can remove the skip for MX6SX. I would however sure like to have someone with an actual MX6SX enable that code and give us some testing feedback. Right. My proposal is to merge the currrent patchset, enabling for IMX6SX again when someone will test it. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] imx: mx6: add display of CPU temperature grade in print_cpuinfo()
On Fri, May 15, 2015 at 6:24 AM, Stefano Babic sba...@denx.de wrote: Hi Tim, On 15/05/2015 15:16, Tim Harvey wrote: On Fri, May 15, 2015 at 1:14 AM, Christian Gmeiner christian.gmei...@gmail.com wrote: 2015-05-14 7:11 GMT+02:00 Tim Harvey thar...@gateworks.com: When CONFIG_IMX6_THERMAL is defined print the CPU temperature grade info along with the current temperature. Before: CPU: Temperature 42 C After: CPU: Automotive temperature grade (-40C to 125C) at 42C CPU: Industiral temperature grade (-40C to 105C) at 42C CPU: Extended Commercial temperature grade (-20C to 105C) at 42C Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: - moved display of CPU temperature grade to own patch and combined with the current temperature from the thermal sensor driver - add example output to description Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/imx-common/cpu.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 6b20482..f1b49bb 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -16,6 +16,7 @@ #include asm/arch/clock.h #include asm/arch/sys_proto.h #include asm/arch/crm_regs.h +#include imx_thermal.h #include ipu_pixfmt.h #include thermal.h #include sata.h @@ -146,7 +147,7 @@ int print_cpuinfo(void) #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) struct udevice *thermal_dev; - int cpu_tmp, ret; + int cpu_tmp, minc, maxc, ret; #endif cpurev = get_cpu_rev(); @@ -172,16 +173,34 @@ int print_cpuinfo(void) #endif #if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) + puts(CPU: ); + if (!is_cpu_type(MXC_CPU_MX6SX)) { + switch (get_cpu_temp_grade(minc, maxc)) { + case TEMP_AUTOMOTIVE: + puts(Automotive temperature grade ); + break; + case TEMP_INDUSTRIAL: + puts(Industrial temperature grade ); + break; + case TEMP_EXTCOMMERCIAL: + puts(Extended Commercial temperature grade ); + break; + default: + puts(Commercial temperature grade ); + break; + } + printf((%dC to %dC), minc, maxc); + } For the additions above we do not need CONFIG_IMX6_THERMAL. Hi Christian, Thanks for the review. Its true that CONFIG_IMX6_THERMAL is not needed for cpu temperature grade but I felt that there would be resistance in general to adding additional lines in print_cpuinfo without allowing them to be easily disabled. Agree on this point. I felt that temperature grade and current temperature made sense to go together in this fasion. Looking over this though did remind me that now that Freescale has told me that the IMX6SX has the same OTP registers/definitions for temperature grade programmed I can remove the skip for MX6SX. I would however sure like to have someone with an actual MX6SX enable that code and give us some testing feedback. Right. My proposal is to merge the currrent patchset, enabling for IMX6SX again when someone will test it. Best regards, Stefano Babic Stefano, Yes, that sounds like the best approach. What were your thoughts on enabling the second CPU: line just to display the temperature grade if CONFIG_IMX6_THERMAL was not enabled? I'm surprised someone on this list hasn't already tested this on IMX6SX. Fabio - certainly you must have a reference board with an IMX6SX and could enable/test that the CPU markings agree with what is detected/displayed via OTP? Tim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
On Fri, May 15, 2015 at 12:53 AM, Christian Gmeiner christian.gmei...@gmail.com wrote: Hi 2015-05-14 7:08 GMT+02:00 Tim Harvey thar...@gateworks.com: The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING indicated by OCOTP_CFG3[17:16] which is at 0x440 in the Fusemap Description Table. Return this frequency so that it can be used elsewhere. Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the their Fusemap Description Table however Freescale has confirmed that these eFUSE bits match the description within the IMX6DQRM and that they will be added to the next revision of the respective reference manuals. These have been tested with IMX6 Quad/Solo/Dual-light 800Mhz and 1GHz grades. Signed-off-by: Tim Harvey thar...@gateworks.com --- arch/arm/cpu/armv7/mx6/soc.c | 41 +++ arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + 2 files changed, 42 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index dd34138..71fa1fb 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -83,6 +83,47 @@ u32 get_cpu_rev(void) return (type 12) | (reg + 0x10); } +/* + * OCOTP_CFG3[17:16] (see Fusemap Description Table offset 0x440) + * defines a 2-bit SPEED_GRADING + */ +#define OCOTP_CFG3_SPEED_SHIFT 16 +#define OCOTP_CFG3_SPEED_800MHZ0 +#define OCOTP_CFG3_SPEED_850MHZ1 +#define OCOTP_CFG3_SPEED_1GHZ 2 +#define OCOTP_CFG3_SPEED_1P2GHZ3 Note: 0x3 is defined as reserved (IMX6DQRM Rev 2, 06/2014). Right - this goes back to the fact that the RM's are full of omissions in this area. I've gotten confirmation of sorts from Freescale that the above is what is used. Still, I would love to see some testing and I only have 800MHz/1GHz ranges, so if anyone out there with a IMX6DUAL or IMX6QUAD at 1.2GHz could verify this works please do. + +u32 get_cpu_speed_grade_hz(void) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = ocotp-bank[0]; + struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank-fuse_regs; + uint32_t val; + + val = readl(fuse-cfg3); + val = OCOTP_CFG3_SPEED_SHIFT; + val = 0x3; + + switch (val) { + /* Valid for IMX6DQ */ + case OCOTP_CFG3_SPEED_1P2GHZ: + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + return 12; + /* Valid for IMX6SX/IMX6SDL/IMX6DQ */ + case OCOTP_CFG3_SPEED_1GHZ: + return 99600; + /* Valid for IMX6DQ */ + case OCOTP_CFG3_SPEED_850MHZ: + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + return 85200; + /* Valid for IMX6SX/IMX6SDL/IMX6DQ */ + case OCOTP_CFG3_SPEED_800MHZ: + return 79200; + } + return 0; Do we really need the ifs inside the cases? The speed grading fuse value is read only and we must simply life with the value we read back. So I would drop the is_cpu_type(..) thing. I've had a bit of a difficult time getting verification from Freescale that all IMX6 CPU's use the exact same OTP register and setting for this which is why I'm asking for testing. I haven't gotten a simple 'yes' to that question but instead of been giving small snippets of information. Not a single one of the RM's agree's with the other in this area (most marked as reserved or omit the register or omit the values altogether) My personal feeling is that the speed grades (and temp grades for that matter) are the same for all IMX6 and even though the datasheets for the IMX6SDL/IMX6SX state they don't 'sell' a 850MHz or 1.2GHz speed grade we should honor the setting (meaning I agree with you that we should remove the if's). Tim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 1/2] i2c: mxc: refactor i2c driver and support dm
On 14 May 2015 at 17:29, Peng Fan peng@freescale.com wrote: 1. Introduce a new structure `struct mxc_i2c_bus`, this structure will used for non-DM and DM. 2. Remove `struct mxc_i2c_regs` structure, but use register offset to access registers based on `base` entry of `struct mxc_i2c_bus`. 3. Remove most `#ifdef I2C_QUIRK_REG`. Using driver_data to contain platform flags. A new flag is introduced, I2C_QUIRK_FLAG. 4. Most functions use `struct mxc_i2c_bus` as one of the parameters. Make most functions common to DM and non-DM, try to avoid duplicated code. 5. Support DM, but pinctrl is not included. Pinmux setting is still set by setup_i2c, but we do not need bus_i2c_init for DM. 6. struct i2c_parms and struct sram_data are removed. 7. Remove bus_i2c_read bus_i2c_write prototype in header file. The frist paramter of bus_i2c_init is modified to i2c index. Add new prototype i2c_idle_bus and force_bus_idle. Since bus_i2c_init is not good for DM I2C and pinctrl is missed, we use a weak function for i2c_idle_bus. Board file take the responsibility to implement this function, like this: int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus) { if (i2c_bus-index == 0) force_bus_idle(i2c_pads_info0); else if (i2c_bus-index == 1) force_bus_idle(i2c_pads_info1); else xx } 8. Introduce a weak function, enable_i2c_clk 9. Tested on an i.MX7 platform. Log info: = dm tree Class Probed Name root[ + ]root_driver simple_bus [ ]|-- soc simple_bus [ ]| |-- aips-bus@3000 simple_bus [ ]| | |-- anatop@3036 simple_bus [ ]| | `-- snvs@3037 simple_bus [ ]| |-- aips-bus@3040 simple_bus [ ]| `-- aips-bus@3080 i2c [ ]| |-- i2c@30a2 i2c [ ]| `-- i2c@30a4 simple_bus [ ]`-- regulators = i2c dev 0 Setting bus to 0 = i2c probe Valid chip addresses: 08 50 = i2c md 8 31 0031: 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 Signed-off-by: Peng Fan peng@freescale.com Acked-by: Simon Glass s...@chromium.org --- Changes v5: none Changes v4: 1. fix build errors 2. Introduce a weak function enable_i2c_clk. 3. add Simon's Acked-by. 4. Add test log in commit log. Changes v3: 1. remove bus_i2c_init for DM, introuduce a weak function i2c_idle_bus. 2. remove static return type for force_idle_bus, since we need to call it in i2c_idle_bus which may be implemented in board file. This does not hurt for non-DM. Changes v2: 1. Refactor driver, remove register access based on structure, but use 'base + offset' 2. Introduce mxc_i2c_bus structure 3. Introduce I2C_QUIRK_FLAG and remove most I2C_QUIRK_REG and use driver_data to contain the flags for different platforms 4. Avoid duplicated code between DM and non-DM part 5. The function name i2c_init_transfer is not changed. 6. Remove bus_i2c_read/write prototype from header file 7. change bus_i2c_init's first parameter to i2c index 8. Rename patch name, since refactor non-DM part. arch/arm/imx-common/i2c-mxv7.c| 7 +- arch/arm/include/asm/imx-common/mxc_i2c.h | 38 +- drivers/i2c/mxc_i2c.c | 581 -- 3 files changed, 433 insertions(+), 193 deletions(-) Applied to u-boot-dm, take 2, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 2/3] Combine bootm_find_thing functions together
Hi Karl, On 13 May 2015 at 06:53, Karl Apsite karl.aps...@dornerworks.com wrote: bootm_find_ramdisk_fdt() renamed to bootm_find_images() for readability. The function bootm_find_ramdisk_fdt() appears to be a simple wrapper for bootm_find_ramdisk(), bootm_find_fdt(), and now bootm_find_loadables(). I didn't see any other callers entering a bootm_findthing, so removing the wrapper, and condensing these together hopefully makes the code a little simpler. Signed-off-by: Karl Apsite karl.aps...@dornerworks.com --- common/bootm.c | 37 ++--- common/cmd_bootm.c | 4 ++-- include/bootm.h| 2 +- 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index f04e49b..ae0d674 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -206,7 +206,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int bootm_find_ramdisk(int flag, int argc, char * const argv[]) +int bootm_find_images(int flag, int argc, char * const argv[]) { int ret; @@ -218,14 +218,7 @@ static int bootm_find_ramdisk(int flag, int argc, char * const argv[]) return 1; } - return 0; -} - #if defined(CONFIG_OF_LIBFDT) -static int bootm_find_fdt(int flag, int argc, char * const argv[]) -{ - int ret; - /* find flattened device tree */ ret = boot_get_fdt(flag, argc, argv, IH_ARCH_DEFAULT, images, images.ft_addr, images.ft_len); @@ -233,18 +226,10 @@ static int bootm_find_fdt(int flag, int argc, char * const argv[]) puts(Could not find a valid device tree\n); return 1; } - set_working_fdt_addr((ulong)images.ft_addr); - - return 0; -} #endif #if defined(CONFIG_FIT) -static int bootm_find_loadables(int flag, int argc, char * const argv[]) -{ - int ret; - /* find all of the loadables */ ret = boot_get_loadable(argc, argv, images, IH_ARCH_DEFAULT, NULL, NULL); @@ -252,24 +237,6 @@ static int bootm_find_loadables(int flag, int argc, char * const argv[]) puts(Loadable(s) is corrupt or invalid\n); return 1; } - - return 0; -} -#endif - -int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]) -{ - if (bootm_find_ramdisk(flag, argc, argv)) - return 1; - -#if defined(CONFIG_OF_LIBFDT) - if (bootm_find_fdt(flag, argc, argv)) - return 1; -#endif - -#if defined(CONFIG_FIT) - if (bootm_find_loadables(flag, argc, argv)) - return 1; #endif return 0; @@ -283,7 +250,7 @@ static int bootm_find_other(cmd_tbl_t *cmdtp, int flag, int argc, (images.os.type == IH_TYPE_MULTI)) (images.os.os == IH_OS_LINUX || images.os.os == IH_OS_VXWORKS)) - return bootm_find_ramdisk_fdt(flag, argc, argv); + return bootm_find_images(flag, argc, argv); return 0; } diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 6b6aca6..48738ac 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -580,7 +580,7 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not * have a header that provide this informaiton. */ - if (bootm_find_ramdisk_fdt(flag, argc, argv)) + if (bootm_find_images(flag, argc, argv)) return 1; return 0; @@ -721,7 +721,7 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not * have a header that provide this informaiton. */ - if (bootm_find_ramdisk_fdt(flag, argc, argv)) + if (bootm_find_images(flag, argc, argv)) return 1; return 0; diff --git a/include/bootm.h b/include/bootm.h index 6181488..4981377 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -49,7 +49,7 @@ int boot_selected_os(int argc, char * const argv[], int state, ulong bootm_disable_interrupts(void); /* This is a special function used by booti/bootz */ -int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]); +int bootm_find_images(int flag, int argc, char * const argv[]); Can you please add a proper functoin comment for this function? Parameters, what it does, return value etc... int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], int states, bootm_headers_t *images, int boot_progress); -- 2.3.7 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 3/3] Remove the bootm_find_other() wrapper
Hi Karl, On 15 May 2015 at 07:58, Simon Glass s...@chromium.org wrote: Hi Karl, On 13 May 2015 at 06:54, Karl Apsite karl.aps...@dornerworks.com wrote: The bootm_find_other() function was only called once, and ran a quick check before it called bootm_find_images(). This wrapper function was removed by moving the conditional to do_bootm_states (where find_other was being called) and calling bootm_find_images directly. Signed-off-by: Karl Apsite karl.aps...@dornerworks.com --- common/bootm.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index ae0d674..13f2bc9 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -241,19 +241,6 @@ int bootm_find_images(int flag, int argc, char * const argv[]) return 0; } - -static int bootm_find_other(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) -{ - if (((images.os.type == IH_TYPE_KERNEL) || -(images.os.type == IH_TYPE_KERNEL_NOLOAD) || -(images.os.type == IH_TYPE_MULTI)) - (images.os.os == IH_OS_LINUX || -images.os.os == IH_OS_VXWORKS)) - return bootm_find_images(flag, argc, argv); - - return 0; -} #endif /* USE_HOSTC */ /** @@ -581,7 +568,15 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], ret = bootm_find_os(cmdtp, flag, argc, argv); if (!ret (states BOOTM_STATE_FINDOTHER)) { - ret = bootm_find_other(cmdtp, flag, argc, argv); + if (((images.os.type == IH_TYPE_KERNEL) || +(images.os.type == IH_TYPE_KERNEL_NOLOAD) || +(images.os.type == IH_TYPE_MULTI)) + (images.os.os == IH_OS_LINUX || +images.os.os == IH_OS_VXWORKS)) + ret = bootm_find_images(flag, argc, argv); + else + ret = 0; + do_bootm_states() is already too long. Can we keep the bootm_find_other() function? Calling it here matches the rest of the code within do_bootm_states(). It's fine to rename if i you like. argc = 0; /* consume the args */ } -- 2.3.7 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-dm.git
Hi Tom, This includes Przemyslaw's PMIC framework for driver model and the rest of Han's OHCI work which was requested to come through the driver model tree instead of USB, The MXC GPIO_PORTx patch (and its friend) were sent only yesterday, but the v5 version just includes a change requested after I had already applied it. I dropped the v4 patches when I rebased against mainline, and added the v5. The following changes since commit 4588d61a284aa2306d4b83954a650c066f1f569c: arch/arm/lib/bootm-fdt.c: Guard the include of asm/armv7.h (2015-05-14 11:07:03 -0400) are available in the git repository at: git://git.denx.de/u-boot-dm.git for you to fetch changes up to 19f74d885f4bfa714010efbe2eea496045002c72: sandbox: defconfig: enable support of sandbox PMIC drivers (2015-05-14 20:00:00 -0600) Hans de Goede (19): usb: Fix handover of full-speed devices from ehci to companion usb: usb_control_msg() propagate controller error code usb: legacy_hub_port_reset() check and propagate usb_set_port_feature() errors usb: Stop reset procedure when a dev is handed over to a companion hcd dm: usb: Prefix ehci interrupt-queue functions with _ehci_ dm: usb: Add support for interrupt queues to the dm usb code dm: usb: Move printing of usb scan status to usb_scan_bus() dm: usb: Add support for companion controllers dm: usb: Do not scan companion buses if no devices where handed over usb: ohci: Do not resubmit and leak urbs for interrupt packets usb: ohci: Remove unnecessary delays from hc_start and power power-on paths usb: ohci: Skip unnecessary mdelay(1) calls in various places usb: ohci: Add dm support sunxi: ehci: Convert to the driver-model sunxi: ohci: Add ohci usb host controller support usb: ohci: Do not reuse ed for interrupt endpoints of different devices usb: ohci: Add an ohci_alloc_urb() function usb: ohci: Add support for interrupt queues sunxi: Change usb-kbd interrupt polling to use an usb interrupt queue Peng Fan (2): imx: mx27 move GPIO_PORTx to gpio.h i2c: mxc: refactor i2c driver and support dm Przemyslaw Marczak (26): exynos5: fix build break by adding CONFIG_POWER exynos4-common: remove the unsued CONFIG_CMD_PMIC lib: Kconfig: add entry for errno_str() function dm: pmic: add implementation of driver model pmic uclass dm: regulator: add implementation of driver model regulator uclass dm: pmic: add pmic command dm: regulator: add regulator command pmic: max77686 set the same compatible as in the kernel dm: pmic: add max77686 pmic driver dm: regulator: add max77686 regulator driver dm: regulator: add fixed voltage regulator driver doc: driver-model: pmic and regulator uclass documentation dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMIC odroid: dts: add 'voltage-regulators' description to max77686 node odroid: enable driver model pmic/regulator API and MAX77686 drivers dm: pmic: code cleanup of PMIC uclass driver dm: regulator: uclass driver code cleanup common: cmd pmic: command cleanup common: cmd regulator: command cleanup doc: driver-model: pmic-framework.txt - cleanup sandbox: i2c: search child emul dev and check its uclass id sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator test: dm: add sandbox PMIC framework tests test: dm: test.dts - move to sandbox dts directory sandbox: dts: add sandbox_pmic.dtsi and include it to sandbox.dts and test.dts sandbox: defconfig: enable support of sandbox PMIC drivers Simon Glass (14): bootstage: Add IDs for SPI flash reading and decompression dm: i2c: Implement 'i2c bus' command for driver model dm: i2c: Add a function to find out the chip offset length tpm: Support using driver model with I2C tpm: Rename Infineon TPM to slb9645tt dm: gpio: Fix comment typo in GPIOD_IS_IN arm: Include the .got section in the binary arm: Add a prototype for save_boot_params_ret() sandbox: Correct error handling in state_read_file() sandbox: Add missing errno.h includes in a few files sandbox: cros_ec: Support EC_CMD_ENTERING_MODE emulation sandbox: spi: Add newline to printf() in sandbox_sf_probe sandbox: Fix warning in display_options sandbox: Support wide-screen LCD emulation Vincent Palatin (1): usb: add device connection/disconnection detection Makefile | 3 +- arch/arm/config.mk | 3 +- arch/arm/dts/exynos4412-odroid.dts | 255 - arch/arm/dts/exynos4412-trats2.dts | 2 +- arch/arm/dts/exynos5250-smdk5250.dts | 2 +- arch/arm/dts/exynos5250-snow.dts
[U-Boot] [PATCH v2 09/19] imx: ventana: (cosmetic) clean up size defines for improved readability
Use the SZ_1M and SZ_1K macros from linuz/sizes.h for improved readability Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: no changes - rebased --- include/configs/gw_ventana.h | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index dd7188b..663e9c5 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -7,12 +7,14 @@ #ifndef __CONFIG_H #define __CONFIG_H +#include linux/sizes.h + /* SPL */ #define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_MMC_SUPPORT /* Location in NAND to read U-Boot from */ -#define CONFIG_SYS_NAND_U_BOOT_OFFS (14 * 1024 * 1024) +#define CONFIG_SYS_NAND_U_BOOT_OFFS (14 * SZ_1M) #include imx6_spl.h /* common IMX6 SPL configuration */ #include mx6_common.h @@ -35,7 +37,7 @@ #define CONFIG_SYS_GENERIC_BOARD /* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) +#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) /* Init Functions */ #define CONFIG_BOARD_EARLY_INIT_F @@ -308,19 +310,19 @@ #define CONFIG_ENV_IS_IN_NAND #endif #if defined(CONFIG_ENV_IS_IN_MMC) - #define CONFIG_ENV_OFFSET (6 * 64 * 1024) - #define CONFIG_ENV_SIZE(8 * 1024) + #define CONFIG_ENV_OFFSET (384 * SZ_1K) + #define CONFIG_ENV_SIZE(8 * SZ_1K) #define CONFIG_SYS_MMC_ENV_DEV 0 #elif defined(CONFIG_ENV_IS_IN_NAND) - #define CONFIG_ENV_OFFSET (16 20) - #define CONFIG_ENV_SECT_SIZE (128 10) + #define CONFIG_ENV_OFFSET (16 * SZ_1M) + #define CONFIG_ENV_SECT_SIZE (128 * SZ_1K) #define CONFIG_ENV_SIZECONFIG_ENV_SECT_SIZE - #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 10)) + #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 * SZ_1K)) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH) - #define CONFIG_ENV_OFFSET (512 * 1024) - #define CONFIG_ENV_SECT_SIZE (64 * 1024) - #define CONFIG_ENV_SIZE(8 * 1024) + #define CONFIG_ENV_OFFSET(512 * SZ_1K) + #define CONFIG_ENV_SECT_SIZE (64 * SZ_1K) + #define CONFIG_ENV_SIZE (8 * SZ_1K) #define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS #define CONFIG_ENV_SPI_MODECONFIG_SF_DEFAULT_MODE -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PULL] Please pull u-boot-imx
Hi Tom, please pull from u-boot-imx, thanks ! The following changes since commit ace97d26176a3ebc9ec07738450de93eea35975c: Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze (2015-04-29 06:46:33 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master for you to fetch changes up to 6f63370510ebd7b6dfc83ef4cc6bfd448ecc5dc2: imx: ventana: use stack relocation (2015-05-15 16:42:14 +0200) Brecht Neyrinck (1): bugfix i.mx6 pwm: prevent overflow of period_c * duty_ns Fabio Estevam (11): mx6cuboxi: Add HDMI output support mx6cuboxi: Add USB host support mx6cuboxi: Allow HDMI and USB keyboard to be stdout/stdin logos: Add Solidrun's logo mx6cuboxi: Fix Ethernet PHY detection problem mx6cuboxi: Pull down PAD_ENET_RXD0/RXD1 mx6cuboxi: Skip usb initialization when booting without HDMI hummingboard: Remove mx6solo specific support mx6cuboxi: Mention Cubox-i in the README warp: README: Fix typo mx6: Set shared override bit in PL310 AUX_CTRL register Heiko Schocher (2): arm, imx6, i2c: add I2C4 for MX6DL i2c, mxc: rework i2c base address names for different SoCs Nikolay Dimitrov (2): arm: mx6: Clamp MMDC and DDR3 clocks for timing calculations arm: mx6: ddr3: Remove dead code Soeren Moch (4): tbs2910: support for usb otg host mode tbs2910: only enable vga output for stdout/stderr when hdmi detected tbs2910: use default CONFIG_SYS_PBSIZE tbs2910: add CONFIG_SUPPORT_EMMC_BOOT Stefan Roese (2): arm: mx6: tqma6: Fix USB and add other filesystems arm: mx6: tqma6: Update to optionally configure an alternative SPI setup Stefano Babic (2): Merge branch 'master' of git://git.denx.de/u-boot Merge branch 'master' of git://git.denx.de/u-boot Tim Harvey (17): imx: ventana: fix boot to SD imx: ventana: set dtype env var to boot media imx: ventana: display SPL boot device imx: ventana: config: enable gpio command imx: ventana: config: enable driver model imx: ventana: register gpio's with gpio_request imx: ventana: enable DM_SERIAL imx: ventana: config: enable Thermal support imx: ventana: fix pcie reset for GW522x imx: ventana: default msata/pci mux to pci before PCI enumeration imx: ventana: split out common functions between SPL and uboot imx: ventana: move GSC boot watchdog disable function to gsc.c imx: ventana: detect pmic using i2c probe instead of board model imx: ventana: use common uart and i2c setup functions in SPL imx: ventana: add gpio setup to SPL imx: ventana: add GSC boot watchdog disable to SPL imx: ventana: use stack relocation Ulises Cardenas (2): Fix mxc_hab documenation imx: dek_blob: Add explicit include for mapmem arch/arm/Kconfig| 5 - arch/arm/cpu/armv7/mx6/clock.c | 33 +++-- arch/arm/cpu/armv7/mx6/ddr.c| 52 +++ arch/arm/cpu/armv7/mx6/soc.c| 8 + arch/arm/imx-common/cmd_dek.c | 1 + arch/arm/imx-common/i2c-mxv7.c | 5 +- arch/arm/include/asm/arch-imx/imx-regs.h| 2 +- arch/arm/include/asm/arch-mx25/imx-regs.h | 6 +- arch/arm/include/asm/arch-mx27/imx-regs.h | 4 +- arch/arm/include/asm/arch-mx6/crm_regs.h| 2 + arch/arm/include/asm/arch-mx6/imx-regs.h| 1 + arch/arm/include/asm/arch-vf610/imx-regs.h | 2 +- arch/arm/include/asm/pl310.h| 2 + board/gateworks/gw_ventana/Makefile | 2 +- board/gateworks/gw_ventana/common.c | 827 +++ board/gateworks/gw_ventana/common.h | 98 + board/gateworks/gw_ventana/gsc.c| 27 board/gateworks/gw_ventana/gsc.h| 1 + board/gateworks/gw_ventana/gw_ventana.c | 911 ++ board/gateworks/gw_ventana/gw_ventana_spl.c | 86 +-- board/solidrun/hummingboard/Kconfig | 15 -- board/solidrun/hummingboard/MAINTAINERS | 6 - board/solidrun/hummingboard/Makefile| 9 -- board/solidrun/hummingboard/README | 40 - board/solidrun/hummingboard/hummingboard.c | 182 --- board/solidrun/hummingboard/solo.cfg| 25 board/solidrun/mx6cuboxi/README | 10 +- board/solidrun/mx6cuboxi/mx6cuboxi.c| 158 +++- board/tbs/tbs2910/tbs2910.c | 10 ++ board/tqc/tqma6/tqma6.c | 2 +- board/warp/README | 4 +- configs/gwventana_defconfig | 2 + configs/hummingboard_solo_defconfig
Re: [U-Boot] [PATCH 20/20] tegra: config: nyan-big: Add options required by Chrome OS boot
On 05/13/2015 07:56 AM, Simon Glass wrote: Hi Stephen, On 25 February 2015 at 16:31, Stephen Warren swar...@wwwdotorg.org wrote: On 02/17/2015 03:29 PM, Simon Glass wrote: We need to match the device tree in the FIT with the U-Boot model so we can automatically select the right device tree. Also adjust the load address so that the device tree is not in the way when a zImage kernel tries to extract itself. We don't tend to use LOADADDR in any of the default boot scripts any more. Rather, we explicitly load files to a semantic location indicated by one of the following variables in tegra124-common.h: #define MEM_LAYOUT_ENV_SETTINGS \ scriptaddr=0x9000\0 \ pxefile_addr_r=0x9010\0 \ kernel_addr_r=0x8100\0 \ fdt_addr_r=0x8200\0 \ ramdisk_addr_r=0x8210\0 Perhaps the ChromeOS boot scripts could be adjusted to use one/some of those variables? If the value of CONFIG_LOADADDR isn't appropriate, perhaps we should fix it for all Tegra SoCs/boards? I forgot about this comment sorry. I had problems with the image overwriting itself. It is a bzImage inside a FIT so doesn't use the proper FIT decompression. Anyway I'd like to clarify what is meant by kernel_addr_r. Is that where the FIT is loaded or where the kernel will decompress to, or something else? kernel_addr_r is the address in RAM at which a kernel zImage is loaded by config_distro_bootcmd.h scripts (and likely other scripts too). It's usually deliberately chosen to be a fair way into RAM, so that when the zImage decompresses (to approx the start of RAM), the decompressed image doesn't overlap the compressed image at kernel_addr_r. This avoids the kernel decompressor having to move/copy the zImage somewhere else before copying to avoid any overlap during decompression. config_distro_bootcmd.h doesn't support FIT, so I haven't tried out loading FIT images. That said, if U-Boot simply jumps to the location of the kernel in the FIT image itself without any copying, I would expect everything to work fine if you loaded a FIT image to kernel_addr_r. However, if the processing of the FIT image requires the kernel to be copied out of the FIT image to some other location, you'd have to carefully choose that location so it didn't overlap anything. I'd strongly recommend avoiding any unnecessary copies like that though, if at all possible, from the perspective of both pointlessly wasted execution time and simplicity of the boot process. Perhaps storing a a kernel_noload image type inside the FIT rather than a kernel image type might help there? Perhaps you want to introduce a new standard variable that defines where FIT images are loaded. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/6] x86: Add CONFIG_LBA48 and remove CONFIG_ATAPI in x86-common.h
Enable CONFIG_LBA48 to support large disks. CONFIG_ATAPI is only needed by cmd_ide.c which is not common for modern x86 targets, hence remove it. Signed-off-by: Bin Meng bmeng...@gmail.com --- include/configs/x86-common.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 0b61615..3912b39 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -37,6 +37,7 @@ #define CONFIG_SCSI_AHCI #ifdef CONFIG_SCSI_AHCI #define CONFIG_LIBATA +#define CONFIG_LBA48 #define CONFIG_SYS_64BIT_LBA #define CONFIG_SYS_SCSI_MAX_SCSI_ID2 @@ -76,10 +77,6 @@ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SUPPORT_VFAT -/ - * ATAPI support (experimental) - / -#define CONFIG_ATAPI / * DISK Partition support -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 08/19] imx: ventana: config: use MMC SPL RAW support
Switch to MMC RAW support for SPL. We will place the uboot.img at 69KB. Signed-off-by: Tim Harvey thar...@gateworks.com --- v2: remove unnecessary CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR define Signed-off-by: Tim Harvey thar...@gateworks.com --- include/configs/gw_ventana.h | 4 1 file changed, 4 deletions(-) diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index b20b338..dd7188b 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -11,10 +11,6 @@ #define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_MMC_SUPPORT -#define CONFIG_SPL_FAT_SUPPORT -/* -#define CONFIG_SPL_SATA_SUPPORT -*/ /* Location in NAND to read U-Boot from */ #define CONFIG_SYS_NAND_U_BOOT_OFFS (14 * 1024 * 1024) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 00/13] PMIC/REGULATOR cleanup and Sandbox tests
Hello Simon, On 05/15/2015 03:55 PM, Simon Glass wrote: On 13 May 2015 at 05:38, Przemyslaw Marczak p.marc...@samsung.com wrote: Hello Simon, This patchset fixes the build issues. It changes the last three top commits of u-boot-dm/next. So it is rebased onto: 4e9a6eb dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMIC The rebased version, can be fetched from: https://github.com/bobenstein/u-boot.git branch: dm-pmic-v5-sandbox Best regards, Przemyslaw Marczak Przemyslaw Marczak (13): odroid: dts: add 'voltage-regulators' description to max77686 node odroid: enable driver model pmic/regulator API and MAX77686 drivers dm: pmic: code cleanup of PMIC uclass driver dm: regulator: uclass driver code cleanup common: cmd pmic: command cleanup common: cmd regulator: command cleanup doc: driver-model: pmic-framework.txt - cleanup sandbox: i2c: search child emul dev and check its uclass id sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator test: dm: add sandbox PMIC framework tests test: dm: test.dts - move to sandbox dts directory sandbox: dts: add sandbox_pmic.dtsi and include it to sandbox.dts and test.dts sandbox: defconfig: enable support of sandbox PMIC drivers arch/arm/dts/exynos4412-odroid.dts | 253 ++ arch/sandbox/dts/Makefile | 1 + arch/sandbox/dts/sandbox.dts | 4 + arch/sandbox/dts/sandbox_pmic.dtsi | 78 ++ arch/sandbox/dts/test.dts | 236 board/samsung/common/misc.c| 1 + board/samsung/odroid/odroid.c | 76 +++--- common/cmd_pmic.c | 131 - common/cmd_regulator.c | 239 + configs/odroid_defconfig | 8 +- configs/sandbox_defconfig | 7 + doc/device-tree-bindings/pmic/sandbox.txt | 35 +++ doc/device-tree-bindings/regulator/sandbox.txt | 45 doc/driver-model/pmic-framework.txt| 20 +- drivers/i2c/sandbox_i2c.c | 20 +- drivers/power/pmic/Kconfig | 27 +- drivers/power/pmic/Makefile| 3 +- drivers/power/pmic/i2c_pmic_emul.c | 142 ++ drivers/power/pmic/max77686.c | 15 +- drivers/power/pmic/pmic-uclass.c | 31 +-- drivers/power/pmic/sandbox.c | 79 ++ drivers/power/regulator/Kconfig| 32 ++- drivers/power/regulator/Makefile | 1 + drivers/power/regulator/regulator-uclass.c | 104 +--- drivers/power/regulator/sandbox.c | 355 + include/configs/odroid.h | 5 - include/dt-bindings/pmic/sandbox_pmic.h| 35 +++ include/power/pmic.h | 39 +-- include/power/regulator.h | 116 include/power/sandbox_pmic.h | 138 ++ test/dm/.gitignore | 1 - test/dm/Makefile | 2 + test/dm/pmic.c | 69 + test/dm/regulator.c| 325 ++ test/dm/test-dm.sh | 3 +- test/dm/test-main.c| 3 +- test/dm/test.dts | 230 37 files changed, 2287 insertions(+), 622 deletions(-) create mode 100644 arch/sandbox/dts/sandbox_pmic.dtsi create mode 100644 arch/sandbox/dts/test.dts create mode 100644 doc/device-tree-bindings/pmic/sandbox.txt create mode 100644 doc/device-tree-bindings/regulator/sandbox.txt create mode 100644 drivers/power/pmic/i2c_pmic_emul.c create mode 100644 drivers/power/pmic/sandbox.c create mode 100644 drivers/power/regulator/sandbox.c create mode 100644 include/dt-bindings/pmic/sandbox_pmic.h create mode 100644 include/power/sandbox_pmic.h delete mode 100644 test/dm/.gitignore create mode 100644 test/dm/pmic.c create mode 100644 test/dm/regulator.c delete mode 100644 test/dm/test.dts -- 1.9.1 I've pulled this in from u-boot-dm/next to master. - Simon Thank you, this is great information! And also thank you for the review of all the versions. Best regards, -- Przemyslaw Marczak Samsung RD Institute Poland Samsung Electronics p.marc...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
On Fri, May 15, 2015 at 7:34 PM, Troy Kisky troy.ki...@boundarydevices.com wrote: ... CPU: Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz) ... TO1.0 is the first one and had some issues. We need testing with current production TO not alpha customers one. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
On 5/15/2015 3:57 PM, Otavio Salvador wrote: On Fri, May 15, 2015 at 7:34 PM, Troy Kisky troy.ki...@boundarydevices.com wrote: ... CPU: Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz) ... TO1.0 is the first one and had some issues. We need testing with current production TO not alpha customers one. Thanks for pointing that out, Otavio. Troy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 07/10] moveconfig: Output a list of failed boards
If boards fail, output that list to a file so that it can easily be passed back into moveconfig.py using the -d option. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: None Changes in v2: None tools/moveconfig.py | 4 1 file changed, 4 insertions(+) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 15b0f2b..9e923da 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -728,6 +728,10 @@ class Slots: for line in msg: print sys.stderr, color_text(self.options.color, COLOR_LIGHT_RED, line) +ffail = open('moveconfig.failed', 'w') +for failed_board in failed_boards: +ffail.write(%s\n % failed_board) +ffail.close() def move_config(config_attrs, options): Move config options to defconfig files. -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 06/10] moveconfig: Remove probable debug print
This print seems to be redundant and unformatted compared to the next few lines, so remove it. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: None Changes in v2: None tools/moveconfig.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 25cee21..15b0f2b 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -725,7 +725,6 @@ class Slots: if len(failed_boards) 0: msg = [ The following boards were not processed due to error: ] msg += failed_boards -print msg for line in msg: print sys.stderr, color_text(self.options.color, COLOR_LIGHT_RED, line) -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 02/10] moveconfig: Ignore duplicate configs when moving
When moving configs, it is important to know what was defined in the config header even if it duplicates the configs coming from Kconfig. This is specifically needed for the case where a config is set to default 'y' in the Kconfig. This would previously cause the actual value from the include config to be filtered out, and moveconfig.py would think that it was 'n'... This means that the value that should be 'y' is now (in every defconfig) set to 'not set'. tools/moveconfig.py now defines KCONFIG_IGNORE_DUPLICATES to prevent the filtering from happening and selecting wrong values for the defconfig. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: -New for version 3 Changes in v2: None scripts/Makefile.autoconf | 3 ++- tools/moveconfig.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf index f054081..36bfa17 100644 --- a/scripts/Makefile.autoconf +++ b/scripts/Makefile.autoconf @@ -58,7 +58,8 @@ quiet_cmd_autoconf = GEN $@ $(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h $@.tmp { \ sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp | \ while read line; do \ - if ! grep -q $${line%=*}= include/config/auto.conf; then \ + if [ -n ${KCONFIG_IGNORE_DUPLICATES} ] || \ + ! grep -q $${line%=*}= include/config/auto.conf; then \ echo $$line; \ fi \ done $@; \ diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 544f6af..d3009de 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -632,6 +632,7 @@ class Slot: cmd = list(self.make_cmd) if cross_compile: cmd.append('CROSS_COMPILE=%s' % cross_compile) +cmd.append('KCONFIG_IGNORE_DUPLICATES=1') cmd.append('include/config/auto.conf') self.ps = subprocess.Popen(cmd, stdout=self.devnull) self.state = STATE_AUTOCONF -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 10/10] moveconfig: Print status about the processed defconfigs
This gives a basic idea about progress. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: -New for version 3 Changes in v2: None tools/moveconfig.py | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 685b47b..fca0197 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -568,7 +568,7 @@ class Slot: pass shutil.rmtree(self.build_dir) -def add(self, defconfig): +def add(self, defconfig, num, total): Assign a new subprocess for defconfig and add it to the slot. If the slot is vacant, create a new subprocess for processing the @@ -588,6 +588,8 @@ class Slot: self.ps = subprocess.Popen(cmd, stdout=self.devnull) self.defconfig = defconfig self.state = STATE_DEFCONFIG +self.num = num +self.total = total return True def poll(self): @@ -634,6 +636,9 @@ class Slot: if self.state == STATE_AUTOCONF: self.parser.update_defconfig(self.defconfig) +print ' %d defconfigs out of %d\r' % (self.num + 1, self.total), +sys.stdout.flush() + Save off the defconfig in a consistent way cmd = list(self.make_cmd) cmd.append('savedefconfig') @@ -688,7 +693,7 @@ class Slots: for i in range(options.jobs): self.slots.append(Slot(config_attrs, options, devnull, make_cmd)) -def add(self, defconfig): +def add(self, defconfig, num, total): Add a new subprocess if a vacant slot is found. Arguments: @@ -698,7 +703,7 @@ class Slots: Return True on success or False on failure for slot in self.slots: -if slot.add(defconfig): +if slot.add(defconfig, num, total): return True return False @@ -784,8 +789,8 @@ def move_config(config_attrs, options): # Main loop to process defconfig files: # Add a new subprocess into a vacant slot. # Sleep if there is no available slot. -for defconfig in defconfigs: -while not slots.add(defconfig): +for i, defconfig in enumerate(defconfigs): +while not slots.add(defconfig, i, len(defconfigs)): while not slots.available(): # No available slot: sleep for a while time.sleep(SLEEP_TIME) @@ -794,6 +799,7 @@ def move_config(config_attrs, options): while not slots.empty(): time.sleep(SLEEP_TIME) +print '' slots.show_failed_boards() def bad_recipe(filename, linenum, msg): -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 08/10] moveconfig: Print a message for missing compiler
A common case for failed builds is a missing compiler. Print a message for that case to tell the user concisely which compiler was expected that was not found. This patch also has the effect of not printing build errors any longer. The next patch will add a switch to optionally bring that back. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: None Changes in v2: None tools/moveconfig.py | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 9e923da..f986f55 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -166,6 +166,7 @@ import os import re import shutil import subprocess +from subprocess import PIPE import sys import tempfile import time @@ -606,11 +607,14 @@ class Slot: return False if self.ps.poll() != 0: - +errmsg = 'Failed to process.' +errout = self.ps.stderr.read() +if errout.find('gcc: command not found') != -1: +errmsg = 'Compiler not found (%s)' % self.cross_compile print sys.stderr, log_msg(self.options.color, COLOR_LIGHT_RED, self.defconfig, - failed to process.) + errmsg), if self.options.exit_on_error: sys.exit(Exit on error.) else: @@ -644,13 +648,13 @@ class Slot: self.state = STATE_IDLE return True -cross_compile = self.parser.get_cross_compile() +self.cross_compile = self.parser.get_cross_compile() cmd = list(self.make_cmd) -if cross_compile: -cmd.append('CROSS_COMPILE=%s' % cross_compile) +if self.cross_compile: +cmd.append('CROSS_COMPILE=%s' % self.cross_compile) cmd.append('KCONFIG_IGNORE_DUPLICATES=1') cmd.append('include/config/auto.conf') -self.ps = subprocess.Popen(cmd, stdout=self.devnull) +self.ps = subprocess.Popen(cmd, stdout=self.devnull, stderr=PIPE) self.state = STATE_AUTOCONF return False -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 09/10] moveconfig: Add a switch to enable printing errors
In some cases the build for the autoconf breaks. This outputs the errors following the status so that action can be taken without building again manually. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: None Changes in v2: -New for version 2 tools/moveconfig.py | 9 + 1 file changed, 9 insertions(+) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index f986f55..685b47b 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -153,6 +153,9 @@ Available options Specify the number of threads to run simultaneously. If not specified, the number of threads is the same as the number of CPU cores. + -v, --verbose + Show any build errors as boards are built + To see the complete list of supported options, run $ tools/moveconfig.py -h @@ -615,6 +618,9 @@ class Slot: COLOR_LIGHT_RED, self.defconfig, errmsg), +if self.options.verbose: +print sys.stderr, color_text(self.options.color, +COLOR_LIGHT_CYAN, errout) if self.options.exit_on_error: sys.exit(Exit on error.) else: @@ -882,6 +888,9 @@ def main(): help='only cleanup the headers') parser.add_option('-j', '--jobs', type='int', default=cpu_count, help='the number of jobs to run simultaneously') +parser.add_option('-v', '--verbose', dest='verbose', + action='store_true', default=False, + help='show any build errors as boards are built') parser.usage += ' recipe_file\n\n' + \ 'The recipe_file should describe config options you want to move.\n' + \ 'Each line should contain config_name, type, default_value\n\n' + \ -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 05/10] moveconfig: Cleanup headers in arch and board
Some config.h files live in arch and board directories. They will need to be cleaned up as well, so run the same filters there. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: -New for version 4 Changes in v3: None Changes in v2: None tools/moveconfig.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index b6db058..25cee21 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -352,6 +352,16 @@ def cleanup_headers(config_attrs, dry_run): if not fnmatch.fnmatch(filename, '*~'): cleanup_one_header(os.path.join(dirpath, filename), patterns, dry_run) +for (dirpath, dirnames, filenames) in os.walk('arch'): +for filename in filenames: +if not fnmatch.fnmatch(filename, '*~'): +cleanup_one_header(os.path.join(dirpath, filename), patterns, + dry_run) +for (dirpath, dirnames, filenames) in os.walk('board'): +for filename in filenames: +if not fnmatch.fnmatch(filename, '*~'): +cleanup_one_header(os.path.join(dirpath, filename), patterns, + dry_run) ### classes ### class KconfigParser: -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 04/10] moveconfig: Add a switch to only cleanup headers
In some case you may want to only cleanup the headers. Make it possible without waiting for all boards to compile. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: -New for version 3 Changes in v2: None tools/moveconfig.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 3f31e81..b6db058 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -146,6 +146,9 @@ Available options Exit immediately if Make exits with a non-zero status while processing a defconfig file. + -H, --headers-only + Only cleanup the headers; skip the defconfig processing + -j, --jobs Specify the number of threads to run simultaneously. If not specified, the number of threads is the same as the number of CPU cores. @@ -770,8 +773,6 @@ def move_config(config_attrs, options): slots.show_failed_boards() -cleanup_headers(config_attrs, options.dry_run) - def bad_recipe(filename, linenum, msg): Print error message with the file name and the line number and exit. sys.exit(%s: line %d: error : % (filename, linenum) + msg) @@ -859,6 +860,9 @@ def main(): parser.add_option('-e', '--exit-on-error', action='store_true', default=False, help='exit immediately on any error') +parser.add_option('-H', '--headers-only', dest='cleanup_headers_only', + action='store_true', default=False, + help='only cleanup the headers') parser.add_option('-j', '--jobs', type='int', default=cpu_count, help='the number of jobs to run simultaneously') parser.usage += ' recipe_file\n\n' + \ @@ -879,7 +883,10 @@ def main(): update_cross_compile() -move_config(config_attrs, options) +if not options.cleanup_headers_only: +move_config(config_attrs, options) + +cleanup_headers(config_attrs, options.dry_run) if __name__ == '__main__': main() -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 01/10] moveconfig: Always run savedefconfig on the moved config
This will ensure that the order of the defconfig entries will always match that of the Kconfig files. After one slightly painful (but still early in the process) pass over all boards, this should keep the defconfigs clean from here on. Users must edit the Kconfig first to add the menu entries and then run moveconfig.py to update the defconfig files and the include configs. As such, moveconfig.py cannot compare against the '.config' contents. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- This is based on https://patchwork.ozlabs.org/patch/472591/ Changes in v4: -Rebased series on Masahiro's v2 Changes in v3: None Changes in v2: None tools/moveconfig.py | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index c39ea95..544f6af 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -46,6 +46,9 @@ should look like this: CONFIG_CMD_USB bool n CONFIG_SYS_TEXT_BASE hex 0x +Next you must edit the Kconfig to add the menu entries for the configs +you are moving. + And then run this tool giving the file name of the recipe $ tools/moveconfig.py recipe @@ -192,6 +195,7 @@ CROSS_COMPILE = { STATE_IDLE = 0 STATE_DEFCONFIG = 1 STATE_AUTOCONF = 2 +STATE_SAVEDEFCONFIG = 3 ACTION_MOVE = 0 ACTION_DEFAULT_VALUE = 1 @@ -390,8 +394,7 @@ class KconfigParser: return CROSS_COMPILE.get(arch, '') -def parse_one_config(self, config_attr, defconfig_lines, - dotconfig_lines, autoconf_lines): +def parse_one_config(self, config_attr, defconfig_lines, autoconf_lines): Parse .config, defconfig, include/autoconf.mk for one config. This function looks for the config options in the lines from @@ -402,7 +405,6 @@ class KconfigParser: config_attr: A dictionary including the name, the type, and the default value of the target config. defconfig_lines: lines from the original defconfig file. - dotconfig_lines: lines from the .config file. autoconf_lines: lines from the include/autoconf.mk file. Returns: @@ -418,7 +420,7 @@ class KconfigParser: else: default = config + '=' + config_attr['default'] -for line in defconfig_lines + dotconfig_lines: +for line in defconfig_lines: line = line.rstrip() if line.startswith(config + '=') or line == not_set: return (ACTION_ALREADY_EXIST, line) @@ -463,15 +465,12 @@ class KconfigParser: with open(defconfig_path) as f: defconfig_lines = f.readlines() -with open(dotconfig_path) as f: -dotconfig_lines = f.readlines() - with open(autoconf_path) as f: autoconf_lines = f.readlines() for config_attr in self.config_attrs: result = self.parse_one_config(config_attr, defconfig_lines, - dotconfig_lines, autoconf_lines) + autoconf_lines) results.append(result) log = '' @@ -499,7 +498,7 @@ class KconfigParser: print log, if not self.options.dry_run: -with open(defconfig_path, 'a') as f: +with open(dotconfig_path, 'a') as f: for (action, value) in results: if action == ACTION_MOVE: f.write(value + '\n') @@ -608,6 +607,24 @@ class Slot: if self.state == STATE_AUTOCONF: self.parser.update_defconfig(self.defconfig) + +Save off the defconfig in a consistent way +cmd = list(self.make_cmd) +cmd.append('savedefconfig') +self.ps = subprocess.Popen(cmd, stdout=self.devnull, + stderr=self.devnull) +self.state = STATE_SAVEDEFCONFIG +return False + +if self.state == STATE_SAVEDEFCONFIG: +defconfig_path = os.path.join(self.build_dir, 'defconfig') +if not os.path.exists(defconfig_path): +print sys.stderr, log_msg(self.options.color, + COLOR_LIGHT_RED, + self.defconfig, + 'The defconfig was not updated') +shutil.move(defconfig_path, +os.path.join('configs', self.defconfig)) self.state = STATE_IDLE return True -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 03/10] moveconfig: Add a parameter to accept a list to build
This is helpful to re-attempt to move failed boards from a previous run without starting over. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v4: None Changes in v3: -Fixed command line options order (alphabetize) Changes in v2: -New for version 2 tools/moveconfig.py | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index d3009de..3f31e81 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -135,6 +135,9 @@ Available options Surround each portion of the log with escape sequences to display it in color on the terminal. + -d, --defconfigs + Specify a file containing a list of defconfigs to move + -n, --dry-run Peform a trial run that does not make any changes. It is useful to see what is going to happen before one actually runs it. @@ -734,12 +737,21 @@ def move_config(config_attrs, options): config_attr['type'], config_attr['default']) -# All the defconfig files to be processed -defconfigs = [] -for (dirpath, dirnames, filenames) in os.walk('configs'): -dirpath = dirpath[len('configs') + 1:] -for filename in fnmatch.filter(filenames, '*_defconfig'): -defconfigs.append(os.path.join(dirpath, filename)) +if options.defconfigs: +defconfigs = [line.strip() for line in open(options.defconfigs, 'r')] +for i, defconfig in enumerate(defconfigs): +if not defconfig.endswith('_defconfig'): +defconfigs[i] = defconfig + '_defconfig' +if not os.path.exists(os.path.join('configs', defconfigs[i])): +sys.exit('%s - defconfig does not exist. Stopping.' % + defconfigs[i]) +else: +# All the defconfig files to be processed +defconfigs = [] +for (dirpath, dirnames, filenames) in os.walk('configs'): +dirpath = dirpath[len('configs') + 1:] +for filename in fnmatch.filter(filenames, '*_defconfig'): +defconfigs.append(os.path.join(dirpath, filename)) slots = Slots(config_attrs, options) @@ -840,6 +852,8 @@ def main(): # Add options here parser.add_option('-c', '--color', action='store_true', default=False, help='display the log in color') +parser.add_option('-d', '--defconfigs', type='string', + help='a file containing a list of defconfigs to move') parser.add_option('-n', '--dry-run', action='store_true', default=False, help='perform a trial run (show log with no changes)') parser.add_option('-e', '--exit-on-error', action='store_true', -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
On 5/15/2015 1:43 PM, Troy Kisky wrote: On 5/15/2015 1:38 PM, Tim Harvey wrote: On Fri, May 15, 2015 at 12:54 PM, Troy Kisky troy.ki...@boundarydevices.com wrote: On 5/15/2015 7:32 AM, Stefano Babic wrote: Hi Christian, On 15/05/2015 16:26, Christian Gmeiner wrote: Function does not returns the value of the fuse, else it should returns val. The value is parsed for consistency, and if it is not, 0 means a failure. IMHO this interpretation is correct - I would agree with you only if the return value would be the read value, but it is not. If all mx6 variants use the same otp register/values, then the ifs are _NOT_ needed. I hope that later testings/doc updates/etc proofs it and we can get rid of the superfluous ifs. Ok - let's see if this can be proofed. It looks like we have to test and ask the hardware for that instead of relying on the documentation. Best regards, Stefano Babic On our imx6sx board the patch outputs U-Boot 2015.04-00074-g1bd6819 (May 15 2015 - 12:44:22) CPU: Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz) Reset cause: WDOG Board: Nitrogen6sx __ Did you want me to test some variation of this? Thanks Troy Troy, As far as the frequency grade goes if you know the actual part number is a 1GHz part then that looks good - thanks for the test! Right, it is a 1GHz part. Could you provide similar results for the thermal grade patch series as well? (you will need to enable imx6 thermal sensor and remove the if (!imx6sx) around the print). Will do. Thanks! Tim Ok. I think I gave bad info The part number is PCIMX6X4AVM08AA, which should be -40 to 125 C, 800 MHz and u-boot prints U-Boot 2015.07-rc1-01048-gc4f95cb-dirty (May 15 2015 - 14:46:05) CPU: Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz) CPU: Extended Commercial temperature grade (-20C to 105C) ___ U-boot then freezes in uclass_get_device(UCLASS_THERMAL, 0, thermal_dev); Troy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 08/19] imx: ventana: config: use MMC SPL RAW support
Hi Tim, On 13/05/2015 01:23, Tim Harvey wrote: On Fri, May 8, 2015 at 6:36 PM, Fabio Estevam feste...@gmail.com wrote: Hi Tim, On Fri, May 8, 2015 at 10:28 PM, Tim Harvey thar...@gateworks.com wrote: Switch to MMC RAW support for SPL. We will place the uboot.img at 69KB. Signed-off-by: Tim Harvey thar...@gateworks.com --- include/configs/gw_ventana.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 63af20c..e18e262 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -11,10 +11,8 @@ #define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_MMC_SUPPORT -#define CONFIG_SPL_FAT_SUPPORT -/* -#define CONFIG_SPL_SATA_SUPPORT -*/ +/* Location on MMC to read U-Boot from */ +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 138 /* 69KB */ No need to define this as it is the default from imx6_spl.h Fabio, Thanks for pointing that out - I'll remove it. Then rework the commit message, pointing to the remove of SPL_FAT and SPL_SATA. I like that your patchset is fully orthogonal - rewieving is easier and I do not miss your changes - thanks for that ! For that reason, I am applying most of your patches - you do not need to post the whole patchset again. Due to rework in this one, I would like you repost in a new patchset only these ones: imx: ventana: config: use MMC SPL RAW support (this one) imx: ventana: (cosmetic) clean up size defines for improved readability imx: ventana: add pmic_setup to SPL imx: ventana: config: enable Falcon mode I am merging the rest of your patches Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
Hi Christian, On 15/05/2015 16:26, Christian Gmeiner wrote: Function does not returns the value of the fuse, else it should returns val. The value is parsed for consistency, and if it is not, 0 means a failure. IMHO this interpretation is correct - I would agree with you only if the return value would be the read value, but it is not. If all mx6 variants use the same otp register/values, then the ifs are _NOT_ needed. I hope that later testings/doc updates/etc proofs it and we can get rid of the superfluous ifs. Ok - let's see if this can be proofed. It looks like we have to test and ask the hardware for that instead of relying on the documentation. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot