[U-Boot] [PATCH v3 2/5] imx: mx6sabre common: Factorize the Pfuze init function

2014-11-06 Thread Ye . Li
Since the Pfuze initializations are similar on various mx6 SABRE
boards. Factorize the initialization to a common function in file
board/freescale/common/pfuze.c. So that all SABRE boards BSP can
share the function.

Signed-off-by: Ye.Li b37...@freescale.com
---
Changes since v1:
- Factorize the pfuze init function for sabre boards

Changes since v2:
- Replace the magic value to definitions in pfuze driver.

 board/freescale/common/Makefile |1 +
 board/freescale/common/pfuze.c  |   54 +++
 board/freescale/common/pfuze.h  |   12 
 3 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 board/freescale/common/pfuze.c
 create mode 100644 board/freescale/common/pfuze.h

diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 32b5a3b..25a1bc1 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -53,6 +53,7 @@ obj-$(CONFIG_P5040DS) += ics307_clk.o
 obj-$(CONFIG_VSC_CROSSBAR)+= vsc3316_3308.o
 obj-$(CONFIG_IDT8T49N222A) += idt8t49n222a_serdes_clk.o
 obj-$(CONFIG_ZM7300)   += zm7300.o
+obj-$(CONFIG_POWER_PFUZE100)   += pfuze.o
 
 # deal with common files for P-series corenet based devices
 obj-$(CONFIG_P2041RDB) += p_corenet/
diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c
new file mode 100644
index 000..b6893c7
--- /dev/null
+++ b/board/freescale/common/pfuze.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+#include power/pmic.h
+#include power/pfuze100_pmic.h
+
+struct pmic * pfuze_common_init(unsigned char i2cbus)
+{
+   struct pmic *p;
+   int ret;
+   unsigned int reg;
+
+   ret = power_pfuze100_init(i2cbus);
+   if (ret)
+   return NULL;
+
+   p = pmic_get(PFUZE100);
+   ret = pmic_probe(p);
+   if (ret)
+   return NULL;
+
+   pmic_reg_read(p, PFUZE100_DEVICEID, reg);
+   printf(PMIC:  PFUZE100 ID=0x%02x\n, reg);
+
+   /* Set SW1AB stanby volage to 0.975V */
+   pmic_reg_read(p, PFUZE100_SW1ABSTBY, reg);
+   reg = ~SW1x_STBY_MASK;
+   reg |= SW1x_0_975V;
+   pmic_reg_write(p, PFUZE100_SW1ABSTBY, reg);
+
+   /* Set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
+   pmic_reg_read(p, PUZE_100_SW1ABCONF, reg);
+   reg = ~SW1xCONF_DVSSPEED_MASK;
+   reg |= SW1xCONF_DVSSPEED_4US;
+   pmic_reg_write(p, PUZE_100_SW1ABCONF, reg);
+
+   /* Set SW1C standby voltage to 0.975V */
+   pmic_reg_read(p, PFUZE100_SW1CSTBY, reg);
+   reg = ~SW1x_STBY_MASK;
+   reg |= SW1x_0_975V;
+   pmic_reg_write(p, PFUZE100_SW1CSTBY, reg);
+
+   /* Set SW1C/VDDSOC step ramp up time from 16us to 4us/25mV */
+   pmic_reg_read(p, PFUZE100_SW1CCONF, reg);
+   reg = ~SW1xCONF_DVSSPEED_MASK;
+   reg |= SW1xCONF_DVSSPEED_4US;
+   pmic_reg_write(p, PFUZE100_SW1CCONF, reg);
+
+   return p;
+}
diff --git a/board/freescale/common/pfuze.h b/board/freescale/common/pfuze.h
new file mode 100644
index 000..c5d1771
--- /dev/null
+++ b/board/freescale/common/pfuze.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __PFUZE_BOARD_HELPER__
+#define __PFUZE_BOARD_HELPER__
+
+struct pmic * pfuze_common_init(unsigned char i2cbus);
+
+#endif
-- 
1.7.4.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 3/5] imx: mx6sabresd: Use the pfuze common init function

2014-11-06 Thread Ye . Li
Modify the pfuze init for mx6sabresd to use the shared
pfuze_common_init function. And move this initialization to
power_init_board.

Signed-off-by: Ye.Li b37...@freescale.com
---
Changes since v1:
- Change to use pfuze common init function for sabre boards.

Changes since v2:
- Move the pfuze init to power_init_board

 board/freescale/mx6sabresd/mx6sabresd.c |   52 +-
 1 files changed, 9 insertions(+), 43 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 3d81fff..bc3cd25 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -27,6 +27,7 @@
 #include i2c.h
 #include power/pmic.h
 #include power/pfuze100_pmic.h
+#include ../common/pfuze.h
 DECLARE_GLOBAL_DATA_PTR;
 
 #define UART_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
@@ -517,60 +518,27 @@ int board_init(void)
return 0;
 }
 
-static int pfuze_init(void)
+int power_init_board(void)
 {
struct pmic *p;
-   int ret;
unsigned int reg;
 
-   ret = power_pfuze100_init(I2C_PMIC);
-   if (ret)
-   return ret;
-
-   p = pmic_get(PFUZE100);
-   ret = pmic_probe(p);
-   if (ret)
-   return ret;
-
-   pmic_reg_read(p, PFUZE100_DEVICEID, reg);
-   printf(PMIC:  PFUZE100 ID=0x%02x\n, reg);
+   p = pfuze_common_init(I2C_PMIC);
+   if (!p)
+   return -ENODEV;
 
/* Increase VGEN3 from 2.5 to 2.8V */
pmic_reg_read(p, PFUZE100_VGEN3VOL, reg);
-   reg = ~0xf;
-   reg |= 0xa;
+   reg = ~LDO_VOL_MASK;
+   reg |= LDOB_2_80V;
pmic_reg_write(p, PFUZE100_VGEN3VOL, reg);
 
/* Increase VGEN5 from 2.8 to 3V */
pmic_reg_read(p, PFUZE100_VGEN5VOL, reg);
-   reg = ~0xf;
-   reg |= 0xc;
+   reg = ~LDO_VOL_MASK;
+   reg |= LDOB_3_00V;
pmic_reg_write(p, PFUZE100_VGEN5VOL, reg);
 
-   /* Set SW1AB stanby volage to 0.975V */
-   pmic_reg_read(p, PFUZE100_SW1ABSTBY, reg);
-   reg = ~0x3f;
-   reg |= 0x1b;
-   pmic_reg_write(p, PFUZE100_SW1ABSTBY, reg);
-
-   /* Set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
-   pmic_reg_read(p, PUZE_100_SW1ABCONF, reg);
-   reg = ~0xc0;
-   reg |= 0x40;
-   pmic_reg_write(p, PUZE_100_SW1ABCONF, reg);
-
-   /* Set SW1C standby voltage to 0.975V */
-   pmic_reg_read(p, PFUZE100_SW1CSTBY, reg);
-   reg = ~0x3f;
-   reg |= 0x1b;
-   pmic_reg_write(p, PFUZE100_SW1CSTBY, reg);
-
-   /* Set SW1C/VDDSOC step ramp up time from 16us to 4us/25mV */
-   pmic_reg_read(p, PFUZE100_SW1CCONF, reg);
-   reg = ~0xc0;
-   reg |= 0x40;
-   pmic_reg_write(p, PFUZE100_SW1CCONF, reg);
-
return 0;
 }
 
@@ -597,8 +565,6 @@ int board_late_init(void)
 #ifdef CONFIG_CMD_BMODE
add_board_boot_modes(board_boot_modes);
 #endif
-   pfuze_init();
-
return 0;
 }
 
-- 
1.7.4.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 1/5] power: pfuze100: Update definitions for buck regulators

2014-11-06 Thread Ye . Li
Add definitions for buck regulators (SW1A/B/C) registers and voltage
values.

Signed-off-by: Ye.Li b37...@freescale.com
---
Changes since v1:
- None

Changes since v2:
- Create this patch for updating registers definitions and magic value.

 include/power/pfuze100_pmic.h |   80 +
 1 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/include/power/pfuze100_pmic.h b/include/power/pfuze100_pmic.h
index 0002f1e..1118489 100644
--- a/include/power/pfuze100_pmic.h
+++ b/include/power/pfuze100_pmic.h
@@ -38,6 +38,86 @@ enum {
 };
 
 /*
+ * Buck Regulators
+ */
+
+/* SW1A/B/C Output Voltage Configuration */
+#define SW1x_0_300V 0
+#define SW1x_0_325V 1
+#define SW1x_0_350V 2
+#define SW1x_0_375V 3
+#define SW1x_0_400V 4
+#define SW1x_0_425V 5
+#define SW1x_0_450V 6
+#define SW1x_0_475V 7
+#define SW1x_0_500V 8
+#define SW1x_0_525V 9
+#define SW1x_0_550V 10
+#define SW1x_0_575V 11
+#define SW1x_0_600V 12
+#define SW1x_0_625V 13
+#define SW1x_0_650V 14
+#define SW1x_0_675V 15
+#define SW1x_0_700V 16
+#define SW1x_0_725V 17
+#define SW1x_0_750V 18
+#define SW1x_0_775V 19
+#define SW1x_0_800V 20
+#define SW1x_0_825V 21
+#define SW1x_0_850V 22
+#define SW1x_0_875V 23
+#define SW1x_0_900V 24
+#define SW1x_0_925V 25
+#define SW1x_0_950V 26
+#define SW1x_0_975V 27
+#define SW1x_1_000V 28
+#define SW1x_1_025V 29
+#define SW1x_1_050V 30
+#define SW1x_1_075V 31
+#define SW1x_1_100V 32
+#define SW1x_1_125V 33
+#define SW1x_1_150V 34
+#define SW1x_1_175V 35
+#define SW1x_1_200V 36
+#define SW1x_1_225V 37
+#define SW1x_1_250V 38
+#define SW1x_1_275V 39
+#define SW1x_1_300V 40
+#define SW1x_1_325V 41
+#define SW1x_1_350V 42
+#define SW1x_1_375V 43
+#define SW1x_1_400V 44
+#define SW1x_1_425V 45
+#define SW1x_1_450V 46
+#define SW1x_1_475V 47
+#define SW1x_1_500V 48
+#define SW1x_1_525V 49
+#define SW1x_1_550V 50
+#define SW1x_1_575V 51
+#define SW1x_1_600V 52
+#define SW1x_1_625V 53
+#define SW1x_1_650V 54
+#define SW1x_1_675V 55
+#define SW1x_1_700V 56
+#define SW1x_1_725V 57
+#define SW1x_1_750V 58
+#define SW1x_1_775V 59
+#define SW1x_1_800V 60
+#define SW1x_1_825V 61
+#define SW1x_1_850V 62
+#define SW1x_1_875V 63
+
+#define SW1x_NORMAL_MASK  0x3f
+#define SW1x_STBY_MASK0x3f
+#define SW1x_OFF_MASK 0x3f
+
+#define SW1xCONF_DVSSPEED_MASK 0xc0
+#define SW1xCONF_DVSSPEED_2US  0x00
+#define SW1xCONF_DVSSPEED_4US  0x40
+#define SW1xCONF_DVSSPEED_8US  0x80
+#define SW1xCONF_DVSSPEED_16US 0xc0
+
+/*
  * LDO Configuration
  */
 
-- 
1.7.4.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 5/5] imx: imx6q/dlsabreauto: Add PMIC Pfuze100 support

2014-11-06 Thread Ye . Li
Add the pfuze100 initialization in power_init_board for imx6q/dl
sabreauto board.

Signed-off-by: Ye.Li b37...@freescale.com
---
Changes since v1:
- Change to use pfuze common init function for sabre boards.

Changes since v2:
- Move the pfuze init to power_init_board

 board/freescale/mx6qsabreauto/mx6qsabreauto.c |   15 +++
 include/configs/mx6qsabreauto.h   |6 ++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c 
b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 42ae6fa..182625c 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -28,6 +28,8 @@
 #include asm/imx-common/video.h
 #include asm/arch/crm_regs.h
 #include pca953x.h
+#include power/pmic.h
+#include ../common/pfuze.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -48,6 +50,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
 
+#define I2C_PMIC   1
+
 int dram_init(void)
 {
gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -364,6 +368,17 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
 }
 #endif
 
+int power_init_board(void)
+{
+   struct pmic *p;
+
+   p = pfuze_common_init(I2C_PMIC);
+   if (!p)
+   return -ENODEV;
+
+   return 0;
+}
+
 #ifdef CONFIG_CMD_BMODE
 static const struct boot_mode board_boot_modes[] = {
/* 4 bit bus width */
diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
index 235dd6d..91161fa 100644
--- a/include/configs/mx6qsabreauto.h
+++ b/include/configs/mx6qsabreauto.h
@@ -48,4 +48,10 @@
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_SPEED   10
 
+/* PMIC */
+#define CONFIG_POWER
+#define CONFIG_POWER_I2C
+#define CONFIG_POWER_PFUZE100
+#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
+
 #endif /* __MX6QSABREAUTO_CONFIG_H */
-- 
1.7.4.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 4/5] imx: mx6sxsabresd: Use the pfuze common init function

2014-11-06 Thread Ye . Li
Modify the pfuze init for mx6sxsabresd to use the shared
pfuze_common_init function. And move this initialization to
power_init_board.

Signed-off-by: Ye.Li b37...@freescale.com
---
Changes since v1:
- Change to use pfuze common init function for sabre boards.

Changes since v2:
- Move the pfuze init to power_init_board

 board/freescale/mx6sxsabresd/mx6sxsabresd.c |   48 ---
 1 files changed, 7 insertions(+), 41 deletions(-)

diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c 
b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 68d3718..54c84ed 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -25,6 +25,7 @@
 #include netdev.h
 #include power/pmic.h
 #include power/pfuze100_pmic.h
+#include ../common/pfuze.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -170,52 +171,19 @@ static struct i2c_pads_info i2c_pad_info1 = {
},
 };
 
-static int pfuze_init(void)
+int power_init_board(void)
 {
struct pmic *p;
-   int ret;
unsigned int reg;
 
-   ret = power_pfuze100_init(I2C_PMIC);
-   if (ret)
-   return ret;
-
-   p = pmic_get(PFUZE100);
-   ret = pmic_probe(p);
-   if (ret)
-   return ret;
-
-   pmic_reg_read(p, PFUZE100_DEVICEID, reg);
-   printf(PMIC:  PFUZE100 ID=0x%02x\n, reg);
-
-   /* Set SW1AB standby voltage to 0.975V */
-   pmic_reg_read(p, PFUZE100_SW1ABSTBY, reg);
-   reg = ~0x3f;
-   reg |= 0x1b;
-   pmic_reg_write(p, PFUZE100_SW1ABSTBY, reg);
-
-   /* Set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
-   pmic_reg_read(p, PUZE_100_SW1ABCONF, reg);
-   reg = ~0xc0;
-   reg |= 0x40;
-   pmic_reg_write(p, PUZE_100_SW1ABCONF, reg);
-
-   /* Set SW1C standby voltage to 0.975V */
-   pmic_reg_read(p, PFUZE100_SW1CSTBY, reg);
-   reg = ~0x3f;
-   reg |= 0x1b;
-   pmic_reg_write(p, PFUZE100_SW1CSTBY, reg);
-
-   /* Set SW1C/VDDSOC step ramp up time from 16us to 4us/25mV */
-   pmic_reg_read(p, PFUZE100_SW1CCONF, reg);
-   reg = ~0xc0;
-   reg |= 0x40;
-   pmic_reg_write(p, PFUZE100_SW1CCONF, reg);
+   p = pfuze_common_init(I2C_PMIC);
+   if (!p)
+   return -ENODEV;
 
/* Enable power of VGEN5 3V3, needed for SD3 */
pmic_reg_read(p, PFUZE100_VGEN5VOL, reg);
-   reg = ~0x1F;
-   reg |= 0x1F;
+   reg = ~LDO_VOL_MASK;
+   reg |= (LDOB_3_30V | (1  LDO_EN));
pmic_reg_write(p, PFUZE100_VGEN5VOL, reg);
 
return 0;
@@ -282,8 +250,6 @@ int board_init(void)
 
 int board_late_init(void)
 {
-   pfuze_init();
-
return 0;
 }
 
-- 
1.7.4.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] uboot uImage binary does not boot in Qemu

2014-11-06 Thread pegasus711
I cross compiled u-boot's latest version 2014-10 using buildroot's built-in
cross compiler and generated uboot.bin. 

When I try to invoke it like so: 


it throws an error complaining wrong image format:


I've checked qemu's sources and as per 'uboot_image.h' , the only valid type
numbers are from 0 through to 8. I am unable to understand the number 52
here.

I've followed many articles on the internet in which u-boot is booted within
Qemu and I do not see anything different that they are doing. I am confused.

Hoping for some pointers.




--
View this message in context: 
http://u-boot.10912.n7.nabble.com/uboot-uImage-binary-does-not-boot-in-Qemu-tp194858.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] Odroid-XU3: Add support for Odroid-XU3

2014-11-06 Thread Lukasz Majewski
Hi Hyungwon,

 Dear Lukasz Majewski,
 
 On Wed, 05 Nov 2014 11:29:53 +0100
 Lukasz Majewski l.majew...@samsung.com wrote:
 
   +#undef CONFIG_EXYNOS_SPL
   +#undef CONFIG_SILENT_CONSOLE
   +#undef CONFIG_CROS_EC
   +#undef CONFIG_CROS_EC_SPI
   +#undef CONFIG_CROS_EC_I2C
   +#undef CONFIG_CROS_EC_KEYB
   +#undef CONFIG_CMD_CROS_EC
   +#undef CONFIG_KEYBOARD
   +#undef CONFIG_SPI_BOOTING
   +#undef CONFIG_ENV_IS_IN_SPI_FLASH
   +#undef CONFIG_SPI_FLASH
   +#undef CONFIG_EXYNOS_SPI
   +#undef CONFIG_CMD_SF
   +#undef CONFIG_CMD_SPI
   +#undef CONFIG_SPI_FLASH_WINBOND
   +#undef CONFIG_SPI_FLASH_GIGADEVICE
   +#undef CONFIG_OF_SPI
   +#undef CONFIG_FIT_BEST_MATCH
   +#undef CONFIG_USB_BOOTING
   +#undef CONFIG_CMD_NET
   +#undef CONFIG_SMC911X
   +#undef CONFIG_CMD_PXE
   +#undef CONFIG_MENU
   +#undef CONFIG_ENV_IS_IN_SPI_FLASH
  
  Cannot we just remove those CONFIG_* , instead of using #undef?
  
 
 We can remove all of them without harm or at least no error in
 operation except for CONFIG_CMD_NET. Some boards including chromebook
 uses common config file with Odroid XU3. I don't know whether they
 need ethernet driver for their work or not. I have no device. Will it
 be good to remove the config from exynos5-common.h and add them to
 the config file which inherit exynos5-common.h?

I think that we can keep only the CONFIG_CMD_NET if it doesn't hurt XU3
build.

 
 Best regards,
 Hyungwon Hwang
 



-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Query on the ci_udc driver for USB client implementation

2014-11-06 Thread Lukasz Majewski
Hi Sanchayan,

 
 
 On Tuesday 04 November 2014 09:58 PM, Lukasz Majewski wrote:
  Hi Sanchayan,
  
  On Tuesday 04 November 2014 10:25 AM, Marek Vasut wrote:
  On Monday, November 03, 2014 at 04:46:48 PM, Fabio Estevam wrote:
  On Mon, Nov 3, 2014 at 3:33 AM, Sanchayan Maity
 
  maitysancha...@gmail.com wrote:
  Hello,
 
  Any pointers?
 
  Adding Marek and Stefan on Cc in case they can provide some help.
 
  Regards,
 
  Fabio Estevam
 
  Thanks  Regards,
  Sanchayan Maity.
 
  On Thursday 30 October 2014 11:14 AM, Sanchayan Maity wrote:
  Hello,
 
  I am currently implementing USB Host and client support for
  Freescale Vybrid platform in u-boot. I managed to get the host
  implementation working.
 
  For the host side, usb start calls usb_init(), which in turns
  call, usb_lowlevel_init(), from there into the ehic_hcd_init()
  of my implementation. So, setting up the necessary clocks and
  plls for USB in my implementation and then setting up the
  usb_ehci, ehci_hccr and echi_hcor structures was all. The flow
  and setup required i was able to trace.
 
  The USB client part is not clear to me. I was thinking i can
  use the ci_udc driver somehow to implement the client part.
  How can i use the ci_udc driver to implement client
  functionality?. From what i could see, the
  usb_gadget_driver_register() is suppose to be the first call.
  But, i couldn't trace from where this gets called or the flow
  and setup is suppose to be. OR Is a separate client driver
  required and nothing generic can be used akin to how it could
  be done for host?
 
  See include/configs/sansa_fuze_plus.h , you need the gadget driver
  for the function you want to implement , in this case it's
  ethernet for example (selected via CONFIG_USB_ETH_CDC ).
 
  An example of DFU/UMS can be found in
  include/configs/exynos4-common.h and to activate those, you need
  to use the 'dfu' or 'ums' commands.
 
  Thank you Marek. I had enabled usb ether options already and was
  trying to test USB client functionality with RNDIS. For some reason
  it was not working and i was not able to trace the issue and
  subsequently was not sure about the client part. Your inputs
  cleared my doubts. I tried UMS and DFU. UMS is working just fine
  and i can download the respective images through DFU. Though this
  DFU is not working full proof, but, i can figure that out now i
  feel. 
  
  I'm very happy that UMS is working seamlessly. What kind of trouble
  do you have with DFU?
 
 Hello,
 
 I have a memory alignment problem with DFU as of now. 
 
 mtdparts is as below
 device nand0 fsl_nfc, # parts = 4
  #: namesizeoffset  mask_flags
  0: vf-bcb  0x0002  0x  1
  1: u-boot  0x0016  0x0002  1
  2: u-boot-env  0x0008  0x0018  0
  3: ubi 0x3fe0  0x0020  0
 
 active partition: nand0,0 - (vf-bcb) 0x0002 @ 0x
 
 defaults:
 mtdids  : nand0=fsl_nfc
 mtdparts:
 mtdparts=fsl_nfc:128k(vf-bcb)ro,1408k(u-boot)ro,512k(u-boot-env),-(ubi)
 
 As per the above, setenv dfu_alt_info vf-bcb part 0,1;u-boot part
 0,2;ubi part 0,4 and CONFIG_SYS_CACHELINE_SIZE is 32.
 
 I have a ubifs image and i was trying to write it by running dfu 0
 nand 4 in u-boot and sudo dfu-util -D ubifs.img -a ubi on the
 host. I got the error as below.
 
 dfu_get_buf: Could not memalign 0x80 bytes
 
 Setting CONFIG_SYS_DFU_DATA_BUF_SIZE to (1024*1024) resolved this.
 After this, trying an update as above, did not give me an updated ubi
 (which i check by booting to user space) and doing a nand erase.part
 on ubi partition and then repeating the procedure results in Bad
 Linux ARM zImage magic!. After looking a bit online, at the below
 two links
 
 http://lists.denx.de/pipermail/u-boot/2013-May/155089.html
 http://www.linux-mtd.infradead.org/faq/ubifs.html#L_mkfubifs
 
 I started trying ubinize. Getting the memory alignment issues again
 now :). I have tried 1, 2, 4 and 8Mb for the dfu data buffer size. So
 i am trying to figure this out at the moment. I am probably missing
 something. :)

On our boards we have eMMC memory, so I'm not so familiar with NAND
DFU problems.

However, I would advise you to pose this question to any of AM335x
boards maintainer (e.g. Tom Rini) since they use NAND on their boards.

 
 --Best Regards,
 Sanchayan.
 
  
 
  Thanks again for your inputs. Cheers!
 
  Best Regards,
  Sanchayan.
 
 
  Sorry if i am asking this question in the wrong place. I
  couldn't find anyone in the u-boot IRC channel nor find
  something similar to the kernel-newbies mailing list.
 
  There isn't any, so ask away ;-)
 
  Hope i am asking the right questions.
  [...]
 
  Best regards,
  Marek Vasut
 
  
  
  



-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de

Re: [U-Boot] [PATCH 6/6] linux/kernel.h: sync min, max, min3, max3 macros with Linux

2014-11-06 Thread Lukasz Majewski
Hi Masahiro,

 U-Boot has never cared about the type when we get max/min of two
 values, but Linux Kernel does.  This commit gets min, max, min3, max3
 macros synced with the kernel introduing type checks.
 
 Many of references of those macros must be fixed to suppress warnings.
 We have two options:
  - Use min, max, min3, max3 only when the arguments have the same type
(or add casts to the arguments)
  - Use min_t/max_t instead with the appropriate type for the first
argument
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 ---
 
  arch/arm/cpu/arm1176/tnetv107x/clock.c|  5 ++-
  arch/arm/cpu/armv7/exynos/clock.c |  4 +-
  arch/arm/cpu/armv7/tegra20/display.c  |  4 +-
  arch/avr32/cpu/at32ap700x/clk.c   |  2 +-
  arch/blackfin/cpu/jtag-console.c  |  2 +-
  arch/blackfin/lib/string.c|  2 +-
  arch/powerpc/cpu/mpc85xx/tlb.c|  2 +-
  arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c| 32 ++--
  arch/powerpc/lib/bootm.c  |  2 +-
  arch/sandbox/cpu/start.c  |  2 +-
  arch/x86/cpu/coreboot/pci.c   |  2 +-
  arch/x86/cpu/coreboot/sdram.c |  2 +-
  board/freescale/common/sys_eeprom.c   |  6 +--
  board/gdsys/p1022/controlcenterd-id.c |  5 ++-
  board/imgtec/malta/malta.c|  2 +-
  common/cmd_elf.c  | 12 +++---
  common/cmd_sf.c   | 16 
  common/env_nand.c |  4 +-
  common/fdt_support.c  |  3 +-
  common/lcd.c  |  6 +--
  common/usb_hub.c  |  3 +-
  drivers/block/ahci.c  |  2 +-
  drivers/ddr/fsl/ctrl_regs.c   | 22 +--
  drivers/ddr/fsl/lc_common_dimm_params.c   | 62
 ++-
 drivers/ddr/fsl/main.c|  3 +-
 drivers/dfu/dfu.c |  2 +-
 drivers/i2c/fsl_i2c.c |  2 +-
 drivers/misc/cros_ec_spi.c|  2 +-
 drivers/mmc/fsl_esdhc.c   |  2 +-
 drivers/mmc/pxa_mmc_gen.c |  6 +--
 drivers/mtd/nand/denali_spl.c |  2 +-
 drivers/mtd/spi/sandbox.c |  2 +-
 drivers/mtd/spi/sf_ops.c  |  5 ++-
 drivers/net/netconsole.c  |  2 +-
 drivers/pci/pci.c |  6 ++-
 drivers/pci/pci_auto.c|  2 +-
 drivers/serial/usbtty.c   |  2 +-
 drivers/spi/fsl_espi.c|  4 +-
 drivers/spi/mxc_spi.c |  2 +-
 drivers/spi/spi-uclass.c  |  2 +-
 drivers/tpm/tpm_tis_lpc.c |  2 +-
 drivers/usb/gadget/composite.c|  4 +-
 drivers/usb/gadget/designware_udc.c   |  4 +-
 drivers/usb/gadget/pxa27x_udc.c   |  3 +-
 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c |  4 +-

From my side:
Acked-by: Lukasz Majewski l.majew...@samsung.com

Tested-by: Lukasz Majewski l.majew...@samsung.com

Test HW: Trats2 (Exynos4412)

-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/5] usb: s3c-otg: Remove useless include

2014-11-06 Thread Lukasz Majewski
Hi Marek,

 Remove the useless inclusion of arch/arm/gpio.h , which is completely
 bogus in this driver.
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Chin Liang See cl...@altera.com
 Cc: Dinh Nguyen dingu...@opensource.altera.com
 Cc: Vince Bridgers vbrid...@altera.com
 Cc: Pavel Machek pa...@denx.de
 Cc: Stefan Roese s...@denx.de
 Cc: Lukasz Majewski l.majew...@samsung.com
 ---
  drivers/usb/gadget/s3c_udc_otg.c | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/drivers/usb/gadget/s3c_udc_otg.c
 b/drivers/usb/gadget/s3c_udc_otg.c index b9816df..7508b1a 100644
 --- a/drivers/usb/gadget/s3c_udc_otg.c
 +++ b/drivers/usb/gadget/s3c_udc_otg.c
 @@ -31,7 +31,6 @@
  #include asm/io.h
  
  #include asm/mach-types.h
 -#include asm/arch/gpio.h
  
  #include regs-otg.h
  #include usb/lin_gadget_compat.h

Acked-by: Lukasz Majewski l.majew...@samsung.com

-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/5] usb: s3c-otg: Encapsulate PHY control

2014-11-06 Thread Lukasz Majewski
Hi Marek,

 Encapsulate the Samsung PHY control and it's register accesses
 into the otg_phy_init() and otg_phy_off() functions.
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Chin Liang See cl...@altera.com
 Cc: Dinh Nguyen dingu...@opensource.altera.com
 Cc: Vince Bridgers vbrid...@altera.com
 Cc: Pavel Machek pa...@denx.de
 Cc: Stefan Roese s...@denx.de
 Cc: Lukasz Majewski l.majew...@samsung.com
 ---
  drivers/usb/gadget/s3c_udc_otg.c | 12 
  1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/usb/gadget/s3c_udc_otg.c
 b/drivers/usb/gadget/s3c_udc_otg.c index 7508b1a..b808ddaf 100644
 --- a/drivers/usb/gadget/s3c_udc_otg.c
 +++ b/drivers/usb/gadget/s3c_udc_otg.c
 @@ -145,8 +145,6 @@ static struct usb_ep_ops s3c_ep_ops = {
  
  void __iomem *regs_otg;
  struct s3c_usbotg_reg *reg;
 -struct s3c_usbotg_phy *phy;
 -static unsigned int usb_phy_ctrl;
  
  bool dfu_usb_get_reset(void)
  {
 @@ -155,6 +153,10 @@ bool dfu_usb_get_reset(void)
  
  void otg_phy_init(struct s3c_udc *dev)
  {
 + unsigned int usb_phy_ctrl = dev-pdata-usb_phy_ctrl;
 + struct s3c_usbotg_phy *phy =
 + (struct s3c_usbotg_phy *)dev-pdata-regs_phy;
 +
   dev-pdata-phy_control(1);
  
   /*USB PHY0 Enable */
 @@ -189,6 +191,10 @@ void otg_phy_init(struct s3c_udc *dev)
  
  void otg_phy_off(struct s3c_udc *dev)
  {
 + unsigned int usb_phy_ctrl = dev-pdata-usb_phy_ctrl;
 + struct s3c_usbotg_phy *phy =
 + (struct s3c_usbotg_phy *)dev-pdata-regs_phy;
 +
   /* reset controller just in case */
   writel(PHY_SW_RST0, phy-rstcon);
   udelay(20);
 @@ -853,9 +859,7 @@ int s3c_udc_probe(struct s3c_plat_otg_data *pdata)
  
   dev-pdata = pdata;
  
 - phy = (struct s3c_usbotg_phy *)pdata-regs_phy;
   reg = (struct s3c_usbotg_reg *)pdata-regs_otg;
 - usb_phy_ctrl = pdata-usb_phy_ctrl;
  
   /* regs_otg = (void *)pdata-regs_otg; */
  

Acked-by: Lukasz Majewski l.majew...@samsung.com

Tested-by: Lukasz Majewski l.majew...@samsung.com

HW: Trats2 (Exynos4412) - on top of v2014.10

-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/5] usb: s3c-otg: Split out PHY control

2014-11-06 Thread Lukasz Majewski
Hi Marek,

 Split the Samsung specific PHY control into a separate file
 and compile this into the S3C OTG driver only if used on a
 Samsung system.
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Chin Liang See cl...@altera.com
 Cc: Dinh Nguyen dingu...@opensource.altera.com
 Cc: Vince Bridgers vbrid...@altera.com
 Cc: Pavel Machek pa...@denx.de
 Cc: Stefan Roese s...@denx.de
 Cc: Lukasz Majewski l.majew...@samsung.com
 ---
  drivers/usb/gadget/Makefile  |  1 +
  drivers/usb/gadget/s3c_udc_otg.c | 64 +--
  drivers/usb/gadget/s3c_udc_otg_phy.c | 99
 
 include/configs/exynos4-common.h |  1 +
 include/configs/s5p_goni.h   |  1 +
 include/configs/s5pc210_universal.h  |  1 +
 include/configs/smdkv310.h   |  1 + 7 files changed, 106
 insertions(+), 62 deletions(-) create mode 100644
 drivers/usb/gadget/s3c_udc_otg_phy.c
 
 diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
 index 2efd5a4..70bb550 100644
 --- a/drivers/usb/gadget/Makefile
 +++ b/drivers/usb/gadget/Makefile
 @@ -12,6 +12,7 @@ obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o
 usbstring.o ifdef CONFIG_USB_GADGET
  obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
  obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
 +obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG_PHY) += s3c_udc_otg_phy.o
  obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
  obj-$(CONFIG_CI_UDC) += ci_udc.o
  obj-$(CONFIG_THOR_FUNCTION) += f_thor.o
 diff --git a/drivers/usb/gadget/s3c_udc_otg.c
 b/drivers/usb/gadget/s3c_udc_otg.c index b808ddaf..b910053 100644
 --- a/drivers/usb/gadget/s3c_udc_otg.c
 +++ b/drivers/usb/gadget/s3c_udc_otg.c
 @@ -151,68 +151,8 @@ bool dfu_usb_get_reset(void)
   return !!(readl(reg-gintsts)  INT_RESET);
  }
  
 -void otg_phy_init(struct s3c_udc *dev)
 -{
 - unsigned int usb_phy_ctrl = dev-pdata-usb_phy_ctrl;
 - struct s3c_usbotg_phy *phy =
 - (struct s3c_usbotg_phy *)dev-pdata-regs_phy;
 -
 - dev-pdata-phy_control(1);
 -
 - /*USB PHY0 Enable */
 - printf(USB PHY0 Enable\n);
 -
 - /* Enable PHY */
 - writel(readl(usb_phy_ctrl) | USB_PHY_CTRL_EN0, usb_phy_ctrl);
 -
 - if (dev-pdata-usb_flags == PHY0_SLEEP) /* C210 Universal */
 - writel((readl(phy-phypwr)
 - ~(PHY_0_SLEEP | OTG_DISABLE_0 |
 ANALOG_PWRDOWN)
 - ~FORCE_SUSPEND_0), phy-phypwr);
 - else /* C110 GONI */
 - writel((readl(phy-phypwr) ~(OTG_DISABLE_0 |
 ANALOG_PWRDOWN)
 - ~FORCE_SUSPEND_0), phy-phypwr);
 -
 - if (s5p_cpu_id == 0x4412)
 - writel((readl(phy-phyclk) 
 ~(EXYNOS4X12_ID_PULLUP0 |
 - EXYNOS4X12_COMMON_ON_N0)) |
 EXYNOS4X12_CLK_SEL_24MHZ,
 -phy-phyclk); /* PLL 24Mhz */
 - else
 - writel((readl(phy-phyclk)  ~(ID_PULLUP0 |
 COMMON_ON_N0)) |
 -CLK_SEL_24MHZ, phy-phyclk); /* PLL 24Mhz */
 -
 - writel((readl(phy-rstcon) ~(LINK_SW_RST | PHYLNK_SW_RST))
 -| PHY_SW_RST0, phy-rstcon);
 - udelay(10);
 - writel(readl(phy-rstcon)
 -~(PHY_SW_RST0 | LINK_SW_RST | PHYLNK_SW_RST),
 phy-rstcon);
 - udelay(10);
 -}
 -
 -void otg_phy_off(struct s3c_udc *dev)
 -{
 - unsigned int usb_phy_ctrl = dev-pdata-usb_phy_ctrl;
 - struct s3c_usbotg_phy *phy =
 - (struct s3c_usbotg_phy *)dev-pdata-regs_phy;
 -
 - /* reset controller just in case */
 - writel(PHY_SW_RST0, phy-rstcon);
 - udelay(20);
 - writel(readl(phy-phypwr) ~PHY_SW_RST0, phy-rstcon);
 - udelay(20);
 -
 - writel(readl(phy-phypwr) | OTG_DISABLE_0 | ANALOG_PWRDOWN
 -| FORCE_SUSPEND_0, phy-phypwr);
 -
 - writel(readl(usb_phy_ctrl) ~USB_PHY_CTRL_EN0, usb_phy_ctrl);
 -
 - writel((readl(phy-phyclk)  ~(ID_PULLUP0 | COMMON_ON_N0)),
 -   phy-phyclk);
 -
 - udelay(1);
 -
 - dev-pdata-phy_control(0);
 -}
 +__weak void otg_phy_init(struct s3c_udc *dev) {}
 +__weak void otg_phy_off(struct s3c_udc *dev) {}
  
  /***/
  
 diff --git a/drivers/usb/gadget/s3c_udc_otg_phy.c
 b/drivers/usb/gadget/s3c_udc_otg_phy.c new file mode 100644
 index 000..055fe86
 --- /dev/null
 +++ b/drivers/usb/gadget/s3c_udc_otg_phy.c
 @@ -0,0 +1,99 @@
 +/*
 + * drivers/usb/gadget/s3c_udc_otg.c
 + * Samsung S3C on-chip full/high speed USB OTG 2.0 device controllers
 + *
 + * Copyright (C) 2008 for Samsung Electronics
 + *
 + * BSP Support for Samsung's UDC driver
 + * available at:
 + *
 git://git.kernel.org/pub/scm/linux/kernel/git/kki_ap/linux-2.6-samsung.git
 + *
 + * State machine bugfixes:
 + * Marek Szyprowski m.szyprow...@samsung.com
 + *
 + * Ported to u-boot:
 + * Marek Szyprowski m.szyprow...@samsung.com
 + * Lukasz Majewski l.majew...@samsumg.com
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +#include common.h
 +#include asm/errno.h
 +#include linux/list.h
 +#include 

[U-Boot] [PATCH] test: ums: Add sleep before unmount directory

2014-11-06 Thread Lukasz Majewski
This change helps to run script on machines with quite long uptime.
Without this the following error emerges:

File: ./dat_14M.img
umount: /mnt/tmp-ums-test: device is busy.
(In some cases useful info about processes that use
 the device is found by lsof(8) or fuser(1))
TX: md5sum:083d3d22b542d3ecba61b12d17e03f9f
mount: /dev/sdd6 already mounted or /mnt/tmp-ums-test busy
mount: according to mtab, /dev/sdd6 is already mounted on /mnt/tmp-ums-test

Signed-off-by: Lukasz Majewski l.majew...@samsung.com
---
 test/ums/ums_gadget_test.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/ums/ums_gadget_test.sh b/test/ums/ums_gadget_test.sh
index 56d4616..f862332 100755
--- a/test/ums/ums_gadget_test.sh
+++ b/test/ums/ums_gadget_test.sh
@@ -59,6 +59,7 @@ ums_test_file () {
 fi
 
 cp ./$1 $MNT_DIR
+sleep 2
 umount $MNT_DIR
 
 
-- 
2.0.0.rc2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] blackfin: spi: move spi max chip select to spi.h

2014-11-06 Thread Scott Jiang
Ping.

Scott

2014-09-25 17:25 GMT+08:00 Scott Jiang scott.jiang.li...@gmail.com:
 This macro is only related to spi. So it's better to place it in spi.h.

 Signed-off-by: Scott Jiang scott.jiang.li...@gmail.com
 ---
  arch/blackfin/include/asm/config-pre.h   |3 ---
  arch/blackfin/include/asm/mach-common/bits/spi.h |1 +
  2 files changed, 1 insertion(+), 3 deletions(-)

 diff --git a/arch/blackfin/include/asm/config-pre.h 
 b/arch/blackfin/include/asm/config-pre.h
 index 2d8b293..189cb05 100644
 --- a/arch/blackfin/include/asm/config-pre.h
 +++ b/arch/blackfin/include/asm/config-pre.h
 @@ -70,9 +70,6 @@ static inline const char *get_bfin_boot_mode(int bfin_boot)
  # define BFIN_BOOT_SPI_SSEL 1
  #endif

 -/* Define to get a GPIO CS with the Blackfin SPI controller */
 -#define MAX_CTRL_CS 8
 -
  /* There is no Blackfin/NetBSD port */
  #undef CONFIG_BOOTM_NETBSD

 diff --git a/arch/blackfin/include/asm/mach-common/bits/spi.h 
 b/arch/blackfin/include/asm/mach-common/bits/spi.h
 index 869dcb0..180cfaa 100644
 --- a/arch/blackfin/include/asm/mach-common/bits/spi.h
 +++ b/arch/blackfin/include/asm/mach-common/bits/spi.h
 @@ -64,4 +64,5 @@
  #define RXS0x0020  /* SPI_RDBR Data Buffer Status 
 (Full/Empty*) */
  #define TXCOL  0x0040  /* Transmit Collision Error (Corrupt 
 Data May Have Been Sent) */

 +#define MAX_CTRL_CS 7
  #endif
 --
 1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] spi: add common spi3 controller driver

2014-11-06 Thread Scott Jiang
Ping.

Scott

2014-09-25 17:25 GMT+08:00 Scott Jiang scott.jiang.li...@gmail.com:
 SPI3 controller is not only used on BF609 platform. So we add a common 
 controller
 driver and leave machine specific configuration in board drivers.
 Remove obsolete spi6xx.h and select new board driver in configuration file.

 Signed-off-by: Scott Jiang scott.jiang.li...@gmail.com
 ---
  drivers/spi/Makefile   |1 +
  drivers/spi/adi_spi3.c |  222 
  .../bits/spi6xx.h = drivers/spi/adi_spi3.h|   27 +-
  drivers/spi/bfin_spi6xx.c  |  279 
 ++--
  include/configs/bf609-ezkit.h  |1 +
  5 files changed, 262 insertions(+), 268 deletions(-)
  create mode 100644 drivers/spi/adi_spi3.c
  rename arch/blackfin/include/asm/mach-common/bits/spi6xx.h = 
 drivers/spi/adi_spi3.h (95%)

 diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
 index f02c35a..e0c82e6 100644
 --- a/drivers/spi/Makefile
 +++ b/drivers/spi/Makefile
 @@ -16,6 +16,7 @@ obj-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o
  obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o
  obj-$(CONFIG_BFIN_SPI) += bfin_spi.o
  obj-$(CONFIG_BFIN_SPI6XX) += bfin_spi6xx.o
 +obj-$(CONFIG_ADI_SPI3) += adi_spi3.o
  obj-$(CONFIG_CF_SPI) += cf_spi.o
  obj-$(CONFIG_CF_QSPI) += cf_qspi.o
  obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o
 diff --git a/drivers/spi/adi_spi3.c b/drivers/spi/adi_spi3.c
 new file mode 100644
 index 000..89c914a
 --- /dev/null
 +++ b/drivers/spi/adi_spi3.c
 @@ -0,0 +1,222 @@
 +/*
 + * Analog Devices SPI3 controller driver
 + *
 + * Copyright (c) 2014 Analog Devices Inc.
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
 + * published by the Free Software Foundation.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +
 +#include common.h
 +#include malloc.h
 +#include spi.h
 +#include asm/io.h
 +#include asm/gpio.h
 +#include asm/clock.h
 +#include adi_spi3.h
 +
 +#define to_adi_spi_slave(s) container_of(s, struct adi_spi_slave, slave)
 +
 +int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 +{
 +   if (is_gpio_cs(cs))
 +   return gpio_is_valid(gpio_cs(cs));
 +   else
 +   return adi_spi_cs_valid(bus, cs);
 +}
 +
 +void spi_cs_activate(struct spi_slave *slave)
 +{
 +   struct adi_spi_slave *sdev = to_adi_spi_slave(slave);
 +
 +   if (is_gpio_cs(slave-cs)) {
 +   unsigned int cs = gpio_cs(slave-cs);
 +   gpio_set_value(cs, sdev-cs_pol);
 +   } else {
 +   u32 ssel;
 +   ssel = readl(sdev-regs-ssel);
 +   ssel |= BIT_SSEL_EN(slave-cs);
 +   if (sdev-cs_pol)
 +   ssel |= BIT_SSEL_VAL(slave-cs);
 +   else
 +   ssel = ~BIT_SSEL_VAL(slave-cs);
 +   writel(ssel, sdev-regs-ssel);
 +   }
 +}
 +
 +void spi_cs_deactivate(struct spi_slave *slave)
 +{
 +   struct adi_spi_slave *sdev = to_adi_spi_slave(slave);
 +
 +   if (is_gpio_cs(slave-cs)) {
 +   unsigned int cs = gpio_cs(slave-cs);
 +   gpio_set_value(cs, !sdev-cs_pol);
 +   gpio_set_value(cs, 1);
 +   } else {
 +   u32 ssel;
 +   ssel = readl(sdev-regs-ssel);
 +   if (sdev-cs_pol)
 +   ssel = ~BIT_SSEL_VAL(slave-cs);
 +   else
 +   ssel |= BIT_SSEL_VAL(slave-cs);
 +   /* deassert cs */
 +   writel(ssel, sdev-regs-ssel);
 +   /* disable cs */
 +   ssel = ~BIT_SSEL_EN(slave-cs);
 +   writel(ssel, sdev-regs-ssel);
 +   }
 +}
 +
 +void spi_init()
 +{
 +}
 +
 +void spi_set_speed(struct spi_slave *slave, uint hz)
 +{
 +   struct adi_spi_slave *sdev = to_adi_spi_slave(slave);
 +   u32 clock;
 +
 +   clock = get_spi_clk() / hz;
 +   if (clock)
 +   clock--;
 +   sdev-clock = clock;
 +}
 +
 +struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 +   unsigned int max_hz, unsigned int mode)
 +{
 +   struct adi_spi_slave *sdev;
 +
 +   if (!spi_cs_is_valid(bus, cs))
 +   return NULL;
 +
 +   if (max_hz  get_spi_clk())
 +   return NULL;
 +
 +   sdev = adi_spi_setup(bus, cs);
 +   if (!sdev)
 +   return NULL;
 +
 +   sdev-control = SPI_CTL_EN | SPI_CTL_MSTR;
 +   if (mode  SPI_CPHA)
 +   sdev-control |= SPI_CTL_CPHA;
 +   if (mode  SPI_CPOL)
 +   sdev-control |= SPI_CTL_CPOL;
 +   if (mode  SPI_LSB_FIRST)
 +   sdev-control |= 

[U-Boot] [PATCH] mtd: sf: Zap ramtron driver

2014-11-06 Thread Jagannadha Sutradharudu Teki
Removed ramtron driver since the EMK boards are
no longer been active, and these are the only boards
used this flash driver.

Commit details for EMK zap:
ppc/arm: zap EMK boards
(sha1: d58a9451e7339ed4cf2b2627e534611f427fb791)

Signed-off-by: Jagannadha Sutradharudu Teki jagannadh.t...@gmail.com
Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de
---
 drivers/mtd/spi/Makefile  |   1 -
 drivers/mtd/spi/ramtron.c | 404 --
 2 files changed, 405 deletions(-)
 delete mode 100644 drivers/mtd/spi/ramtron.c

diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index 15789a0..c61b784 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -17,6 +17,5 @@ obj-$(CONFIG_SPI_FLASH) += sf_probe.o
 #endif
 obj-$(CONFIG_CMD_SF) += sf.o
 obj-$(CONFIG_SPI_FLASH) += sf_ops.o sf_params.o
-obj-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o
 obj-$(CONFIG_SPI_FLASH_SANDBOX) += sandbox.o
 obj-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o
diff --git a/drivers/mtd/spi/ramtron.c b/drivers/mtd/spi/ramtron.c
deleted file mode 100644
index a23032c..000
--- a/drivers/mtd/spi/ramtron.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * (C) Copyright 2010
- * Reinhard Meyer, EMK Elektronik, reinhard.me...@emk-elektronik.de
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-/*
- * Note: RAMTRON SPI FRAMs are ferroelectric, nonvolatile RAMs
- * with an interface identical to SPI flash devices.
- * However since they behave like RAM there are no delays or
- * busy polls required. They can sustain read or write at the
- * allowed SPI bus speed, which can be 40 MHz for some devices.
- *
- * Unfortunately some RAMTRON devices do not have a means of
- * identifying them. They will leave the SO line undriven when
- * the READ-ID command is issued. It is therefore mandatory
- * that the MISO line has a proper pull-up, so that READ-ID
- * will return a row of 0xff. This 0xff pseudo-id will cause
- * probes by all vendor specific functions that are designed
- * to handle it. If the MISO line is not pulled up, READ-ID
- * could return any random noise, even mimicking another
- * device.
- *
- * We use CONFIG_SPI_FRAM_RAMTRON_NON_JEDEC
- * to define which device will be assumed after a simple status
- * register verify. This method is prone to false positive
- * detection and should therefore be the last to be tried.
- * Enter it in the last position in the table in spi_flash.c!
- *
- * The define CONFIG_SPI_FRAM_RAMTRON_NON_JEDEC both activates
- * compilation of the special handler and defines the device
- * to assume.
- */
-
-#include common.h
-#include malloc.h
-#include spi.h
-#include spi_flash.h
-#include sf_internal.h
-
-/*
- * Properties of supported FRAMs
- * Note: speed is currently not used because we have no method to deliver that
- * value to the upper layers
- */
-struct ramtron_spi_fram_params {
-   u32 size;   /* size in bytes */
-   u8  addr_len;   /* number of address bytes */
-   u8  merge_cmd;  /* some address bits are in the command byte */
-   u8  id1;/* device ID 1 (family, density) */
-   u8  id2;/* device ID 2 (sub, rev, rsvd) */
-   u32 speed;  /* max. SPI clock in Hz */
-   const char *name;   /* name for display and/or matching */
-};
-
-struct ramtron_spi_fram {
-   struct spi_flash flash;
-   const struct ramtron_spi_fram_params *params;
-};
-
-static inline struct ramtron_spi_fram *to_ramtron_spi_fram(struct spi_flash
-*flash)
-{
-   return container_of(flash, struct ramtron_spi_fram, flash);
-}
-
-/*
- * table describing supported FRAM chips:
- * chips without RDID command must have the values 0xff for id1 and id2
- */
-static const struct ramtron_spi_fram_params ramtron_spi_fram_table[] = {
-   {
-   .size = 32*1024,
-   .addr_len = 2,
-   .merge_cmd = 0,
-   .id1 = 0x22,
-   .id2 = 0x00,
-   .speed = 4000,
-   .name = FM25V02,
-   },
-   {
-   .size = 32*1024,
-   .addr_len = 2,
-   .merge_cmd = 0,
-   .id1 = 0x22,
-   .id2 = 0x01,
-   .speed = 4000,
-   .name = FM25VN02,
-   },
-   {
-   .size = 64*1024,
-   .addr_len = 2,
-   .merge_cmd = 0,
-   .id1 = 0x23,
-   .id2 = 0x00,
-   .speed = 4000,
-   .name = FM25V05,
-   },
-   {
-   .size = 64*1024,
-   .addr_len = 2,
-   .merge_cmd = 0,
-   .id1 = 0x23,
-   .id2 = 0x01,
-   .speed = 4000,
-   .name = FM25VN05,
-   },
-   {
-   .size = 128*1024,
-   .addr_len = 3,
-   .merge_cmd = 0,
-   .id1 = 0x24,
- 

[U-Boot] [PATCH] exynos: dts: Correct USB vbus-gpio numbering for Snow

2014-11-06 Thread Sjoerd Simons
The current vbus GPIOs on snow make very little sense, their number is
far above the maximum. As a result, USB doesn't work on snow.

Correct the GPIO numbering so they match the current scheme for exynos5.
Tested both EHCI and XHCI to correctly work after this change.

Signed-off-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk
---
 arch/arm/dts/exynos5250-snow.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/exynos5250-snow.dts b/arch/arm/dts/exynos5250-snow.dts
index 6fd9275..95af025 100644
--- a/arch/arm/dts/exynos5250-snow.dts
+++ b/arch/arm/dts/exynos5250-snow.dts
@@ -131,11 +131,11 @@
};
 
ehci@1211 {
-   samsung,vbus-gpio = gpio 0x309 0; /* X11 */
+   samsung,vbus-gpio = gpio 0xb1 0; /* X11 */
};
 
xhci@1200 {
-   samsung,vbus-gpio = gpio 0x317 0; /* X27 */
+   samsung,vbus-gpio = gpio 0xbf 0; /* X27 */
};
 
tmu@1006 {
-- 
2.1.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM: UniPhier: move DDR related configuration to Kconfig

2014-11-06 Thread Masahiro Yamada
Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 arch/arm/cpu/armv7/uniphier/Kconfig | 23 +++
 arch/arm/cpu/armv7/uniphier/dram_init.c |  2 +-
 arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile|  3 +--
 arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c  |  4 
 arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile   |  3 +--
 arch/arm/cpu/armv7/uniphier/ph1-pro4/umc_init.c |  4 
 arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile   |  3 +--
 arch/arm/cpu/armv7/uniphier/ph1-sld8/umc_init.c |  4 
 include/configs/ph1_ld4.h   |  2 --
 include/configs/ph1_pro4.h  |  2 --
 include/configs/ph1_sld8.h  |  2 --
 11 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig 
b/arch/arm/cpu/armv7/uniphier/Kconfig
index f013dc3..011c6d9 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -32,4 +32,27 @@ config CMD_PINMON
  The boot mode pins are latched when the system reset is deasserted
  and determine which device the system should load a boot image from.
 
+config DRAM_INIT
+   bool
+   default SPL_BUILD
+
+choice
+   prompt DDR3 Frequency select
+   depends on DRAM_INIT
+
+config DDR_FREQ_1600
+   bool DDR3 1600
+   depends on MACH_PH1_PRO4 || MACH_PH1_LD4
+
+config DDR_FREQ_1333
+   bool DDR3 1333
+   depends on MACH_PH1_LD4 || MACH_PH1_SLD8
+
+endchoice
+
+config DDR_FREQ
+   int
+   default 1333 if DDR_FREQ_1333
+   default 1600 if DDR_FREQ_1600
+
 endmenu
diff --git a/arch/arm/cpu/armv7/uniphier/dram_init.c 
b/arch/arm/cpu/armv7/uniphier/dram_init.c
index 5465a0e..7de657b 100644
--- a/arch/arm/cpu/armv7/uniphier/dram_init.c
+++ b/arch/arm/cpu/armv7/uniphier/dram_init.c
@@ -16,7 +16,7 @@ int dram_init(void)
DECLARE_GLOBAL_DATA_PTR;
gd-ram_size = CONFIG_SYS_SDRAM_SIZE;
 
-#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
+#ifdef CONFIG_DRAM_INIT
led_write(B, 4, , );
 
{
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile 
b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile
index 781b511..5722ee2 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile
+++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile
@@ -7,5 +7,4 @@ obj-y += platdevice.o
 obj-y += boot-mode.o
 obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o bcu_init.o \
sbc_init.o sg_init.o pll_init.o clkrst_init.o pinctrl.o
-obj-$(CONFIG_SPL_BUILD) += pll_spectrum.o \
-   umc_init.o
+obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c 
b/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c
index 1344ac1..ebcbaab 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c
+++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c
@@ -149,10 +149,6 @@ int umc_init(void)
CONFIG_SDRAM1_SIZE / 0x0800);
 }
 
-#if CONFIG_DDR_FREQ != 1333  CONFIG_DDR_FREQ != 1600
-#error Unsupported DDR Frequency.
-#endif
-
 #if (CONFIG_SDRAM0_SIZE == 0x0800 || CONFIG_SDRAM0_SIZE == 0x1000)  \
 (CONFIG_SDRAM1_SIZE == 0x0800 || CONFIG_SDRAM1_SIZE == 0x1000)  \
 CONFIG_DDR_NUM_CH0 == 1  CONFIG_DDR_NUM_CH1 == 1
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile 
b/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile
index e11f4f6..25a1202 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile
+++ b/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile
@@ -7,5 +7,4 @@ obj-y += platdevice.o
 obj-y += boot-mode.o
 obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o sbc_init.o \
sg_init.o pll_init.o clkrst_init.o pinctrl.o
-obj-$(CONFIG_SPL_BUILD) += pll_spectrum.o \
-   umc_init.o
+obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-pro4/umc_init.c 
b/arch/arm/cpu/armv7/uniphier/ph1-pro4/umc_init.c
index dd46287..328b2f4 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-pro4/umc_init.c
+++ b/arch/arm/cpu/armv7/uniphier/ph1-pro4/umc_init.c
@@ -122,10 +122,6 @@ int umc_init(void)
CONFIG_SDRAM1_SIZE / 0x0800);
 }
 
-#if CONFIG_DDR_FREQ != 1600
-#error Unsupported DDR frequency.
-#endif
-
 #if ((CONFIG_SDRAM0_SIZE == 0x2000  CONFIG_DDR_NUM_CH0 == 2) || \
  (CONFIG_SDRAM0_SIZE == 0x1000  CONFIG_DDR_NUM_CH0 == 1))  \
 ((CONFIG_SDRAM1_SIZE == 0x2000  CONFIG_DDR_NUM_CH1 == 2) || \
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile 
b/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile
index 781b511..5722ee2 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile
+++ b/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile
@@ -7,5 +7,4 @@ obj-y += platdevice.o
 obj-y += boot-mode.o
 obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o bcu_init.o \
sbc_init.o sg_init.o pll_init.o clkrst_init.o pinctrl.o

[U-Boot] [PATCH v4 0/2] Adds support for Exynos5422 odroid xu3 board

2014-11-06 Thread Hyungwon Hwang
This is v4 of the patchset adding support Odroud XU3 board.

link to the previous version:
v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html
v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html

This patchset fixes GPIO information of Exynos5420 which is needed to
support Exynos5422 Odroid XU3 board. On the base of the fixes, this
patchset adds support for Exynos5422 Odroid XU3 board. I have done this
work on the master branch in http://git.denx.de/u-boot-samsung.git with
patches by Akshay Saraswat.

link: https://patchwork.ozlabs.org/patch/400043/

Changes for v2:
- Add a patch to add new common setup header file for Odroid X2/U3
and Odroid XU3

Changes for v3:
- Remove the patch which adds new common setup header file from v2
- Remove the wrong patch to fix GPIO information of Exynos 5800
- Remove unnecessary node from DT file
- Remove unnecessary features from config file
- Fix some trivial typos in comments

Changes for v4:
- Add MMC FIFO buffer's configuration to DT file
- Make CONFIG_OF_CONTROL be set by the target information
- Add basic document to doc/README.odroid-xu3
- Add CONFIG_CMD_EXT4 to config file
- Add environment size and offset to config file
- Add extra default environment to make bootable without modification
- Remove unnecessary features from config file

Hyungwon Hwang (2):
  exynos5: fix GPIO information of exynos5420
  Odroid-XU3: Add support for Odroid-XU3

 arch/arm/cpu/armv7/exynos/Kconfig   |   5 +
 arch/arm/dts/Makefile   |   3 +-
 arch/arm/dts/exynos5422-odroidxu3.dts   |  60 +
 arch/arm/include/asm/arch-exynos/cpu.h  |  11 +-
 arch/arm/include/asm/arch-exynos/gpio.h | 232 +++-
 board/samsung/odroid-xu3/Kconfig|  12 ++
 board/samsung/odroid-xu3/MAINTAINERS|   6 +
 board/samsung/odroid-xu3/Makefile   |   7 +
 board/samsung/odroid-xu3/odroid-xu3.c   | 131 ++
 board/samsung/odroid-xu3/setup.h|  95 +
 configs/odroid-xu3_defconfig|   4 +
 doc/README.odroid-xu3   | 134 ++
 include/configs/odroid_xu3.h| 144 
 13 files changed, 717 insertions(+), 127 deletions(-)
 create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts
 create mode 100644 board/samsung/odroid-xu3/Kconfig
 create mode 100644 board/samsung/odroid-xu3/MAINTAINERS
 create mode 100644 board/samsung/odroid-xu3/Makefile
 create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c
 create mode 100644 board/samsung/odroid-xu3/setup.h
 create mode 100644 configs/odroid-xu3_defconfig
 create mode 100644 doc/README.odroid-xu3
 create mode 100644 include/configs/odroid_xu3.h

-- 
1.8.3.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 1/2] exynos5: fix GPIO information of exynos5420

2014-11-06 Thread Hyungwon Hwang
This patch fixes wrong GPIO information such as GPIO bank, table which
is used to convert GPIO name to index, bank base address, and etc.

Signed-off-by: Hyungwon Hwang human.hw...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
Cc: Lukasz Majewski l.majew...@samsung.com
---
Changes for v4:
- None
 arch/arm/include/asm/arch-exynos/cpu.h  |  11 +-
 arch/arm/include/asm/arch-exynos/gpio.h | 232 +++-
 2 files changed, 117 insertions(+), 126 deletions(-)

diff --git a/arch/arm/include/asm/arch-exynos/cpu.h 
b/arch/arm/include/asm/arch-exynos/cpu.h
index 7c5c4ff..da4ac6b 100644
--- a/arch/arm/include/asm/arch-exynos/cpu.h
+++ b/arch/arm/include/asm/arch-exynos/cpu.h
@@ -139,7 +139,7 @@
 
 /* EXYNOS5420 */
 #define EXYNOS5420_AUDIOSS_BASE0x0381
-#define EXYNOS5420_GPIO_PART6_BASE 0x0386
+#define EXYNOS5420_GPIO_PART5_BASE 0x0386
 #define EXYNOS5420_PRO_ID  0x1000
 #define EXYNOS5420_CLOCK_BASE  0x1001
 #define EXYNOS5420_POWER_BASE  0x1004
@@ -161,11 +161,10 @@
 #define EXYNOS5420_I2S_BASE0x12D6
 #define EXYNOS5420_PWMTIMER_BASE   0x12DD
 #define EXYNOS5420_SPI_ISP_BASE0x131A
-#define EXYNOS5420_GPIO_PART2_BASE 0x1340
-#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00
-#define EXYNOS5420_GPIO_PART4_BASE 0x1341
-#define EXYNOS5420_GPIO_PART5_BASE 0x1400
-#define EXYNOS5420_GPIO_PART1_BASE 0x1401
+#define EXYNOS5420_GPIO_PART1_BASE 0x1340
+#define EXYNOS5420_GPIO_PART2_BASE 0x1341
+#define EXYNOS5420_GPIO_PART3_BASE 0x1400
+#define EXYNOS5420_GPIO_PART4_BASE 0x1401
 #define EXYNOS5420_MIPI_DSIM_BASE  0x1450
 #define EXYNOS5420_DP_BASE 0x145B
 
diff --git a/arch/arm/include/asm/arch-exynos/gpio.h 
b/arch/arm/include/asm/arch-exynos/gpio.h
index 32e045a..431ae3a 100644
--- a/arch/arm/include/asm/arch-exynos/gpio.h
+++ b/arch/arm/include/asm/arch-exynos/gpio.h
@@ -1028,83 +1028,7 @@ enum exynos5_gpio_pin {
 };
 
 enum exynos5420_gpio_pin {
-   /* GPIO_PART1_STARTS */
-   EXYNOS5420_GPIO_A00,/* 0 */
-   EXYNOS5420_GPIO_A01,
-   EXYNOS5420_GPIO_A02,
-   EXYNOS5420_GPIO_A03,
-   EXYNOS5420_GPIO_A04,
-   EXYNOS5420_GPIO_A05,
-   EXYNOS5420_GPIO_A06,
-   EXYNOS5420_GPIO_A07,
-   EXYNOS5420_GPIO_A10,/* 8 */
-   EXYNOS5420_GPIO_A11,
-   EXYNOS5420_GPIO_A12,
-   EXYNOS5420_GPIO_A13,
-   EXYNOS5420_GPIO_A14,
-   EXYNOS5420_GPIO_A15,
-   EXYNOS5420_GPIO_A16,
-   EXYNOS5420_GPIO_A17,
-   EXYNOS5420_GPIO_A20,/* 16 0x10 */
-   EXYNOS5420_GPIO_A21,
-   EXYNOS5420_GPIO_A22,
-   EXYNOS5420_GPIO_A23,
-   EXYNOS5420_GPIO_A24,
-   EXYNOS5420_GPIO_A25,
-   EXYNOS5420_GPIO_A26,
-   EXYNOS5420_GPIO_A27,
-   EXYNOS5420_GPIO_B00,/* 24 0x18 */
-   EXYNOS5420_GPIO_B01,
-   EXYNOS5420_GPIO_B02,
-   EXYNOS5420_GPIO_B03,
-   EXYNOS5420_GPIO_B04,
-   EXYNOS5420_GPIO_B05,
-   EXYNOS5420_GPIO_B06,
-   EXYNOS5420_GPIO_B07,
-   EXYNOS5420_GPIO_B10,/* 32 0x20 */
-   EXYNOS5420_GPIO_B11,
-   EXYNOS5420_GPIO_B12,
-   EXYNOS5420_GPIO_B13,
-   EXYNOS5420_GPIO_B14,
-   EXYNOS5420_GPIO_B15,
-   EXYNOS5420_GPIO_B16,
-   EXYNOS5420_GPIO_B17,
-   EXYNOS5420_GPIO_B20,/* 40 0x28 */
-   EXYNOS5420_GPIO_B21,
-   EXYNOS5420_GPIO_B22,
-   EXYNOS5420_GPIO_B23,
-   EXYNOS5420_GPIO_B24,
-   EXYNOS5420_GPIO_B25,
-   EXYNOS5420_GPIO_B26,
-   EXYNOS5420_GPIO_B27,
-   EXYNOS5420_GPIO_B30,/* 48 0x30 */
-   EXYNOS5420_GPIO_B31,
-   EXYNOS5420_GPIO_B32,
-   EXYNOS5420_GPIO_B33,
-   EXYNOS5420_GPIO_B34,
-   EXYNOS5420_GPIO_B35,
-   EXYNOS5420_GPIO_B36,
-   EXYNOS5420_GPIO_B37,
-   EXYNOS5420_GPIO_B40,/* 56 0x38 */
-   EXYNOS5420_GPIO_B41,
-   EXYNOS5420_GPIO_B42,
-   EXYNOS5420_GPIO_B43,
-   EXYNOS5420_GPIO_B44,
-   EXYNOS5420_GPIO_B45,
-   EXYNOS5420_GPIO_B46,
-   EXYNOS5420_GPIO_B47,
-   EXYNOS5420_GPIO_H00,/* 64 0x40 */
-   EXYNOS5420_GPIO_H01,
-   EXYNOS5420_GPIO_H02,
-   EXYNOS5420_GPIO_H03,
-   EXYNOS5420_GPIO_H04,
-   EXYNOS5420_GPIO_H05,
-   EXYNOS5420_GPIO_H06,
-   EXYNOS5420_GPIO_H07,
-
-   /* GPIO PART 2 STARTS*/
-   EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */
-   EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1,
+   EXYNOS5420_GPIO_Y70,
EXYNOS5420_GPIO_Y71,
EXYNOS5420_GPIO_Y72,
EXYNOS5420_GPIO_Y73,
@@ -1112,10 +1036,7 @@ enum exynos5420_gpio_pin {
EXYNOS5420_GPIO_Y75,
EXYNOS5420_GPIO_Y76,
EXYNOS5420_GPIO_Y77,
-
-   /* GPIO PART 3 STARTS*/
-   EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */
-   EXYNOS5420_GPIO_X00 = EXYNOS5420_GPIO_MAX_PORT_PART_2,
+

[U-Boot] [PATCH v4 2/2] Odroid-XU3: Add support for Odroid-XU3

2014-11-06 Thread Hyungwon Hwang
This patch adds support for Odroid-XU3.

Signed-off-by: Hyungwon Hwang human.hw...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
Cc: Lukasz Majewski l.majew...@samsung.com
---
Changes for v3:
- Remove unnecessary node from DT file
- Remove unnecessary features from config file
- Remove unnecessary macros from board-specific header file
- Fix some trivial typos in comments
Changes for v4:
- Add MMC FIFO buffer's configuration to DT file
- Make CONFIG_OF_CONTROL be set by the target information
- Add basic document to doc/README.odroid-xu3
- Add CONFIG_CMD_EXT4 to config file
- Add environment size and offset to config file
- Add extra default environment to make bootable without modification
- Remove unnecessary features from config file
 arch/arm/cpu/armv7/exynos/Kconfig |   5 ++
 arch/arm/dts/Makefile |   3 +-
 arch/arm/dts/exynos5422-odroidxu3.dts |  60 ++
 board/samsung/odroid-xu3/Kconfig  |  12 +++
 board/samsung/odroid-xu3/MAINTAINERS  |   6 ++
 board/samsung/odroid-xu3/Makefile |   7 ++
 board/samsung/odroid-xu3/odroid-xu3.c | 131 +++
 board/samsung/odroid-xu3/setup.h  |  95 ++
 configs/odroid-xu3_defconfig  |   4 +
 doc/README.odroid-xu3 | 134 +++
 include/configs/odroid_xu3.h  | 144 ++
 11 files changed, 600 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts
 create mode 100644 board/samsung/odroid-xu3/Kconfig
 create mode 100644 board/samsung/odroid-xu3/MAINTAINERS
 create mode 100644 board/samsung/odroid-xu3/Makefile
 create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c
 create mode 100644 board/samsung/odroid-xu3/setup.h
 create mode 100644 configs/odroid-xu3_defconfig
 create mode 100644 doc/README.odroid-xu3
 create mode 100644 include/configs/odroid_xu3.h

diff --git a/arch/arm/cpu/armv7/exynos/Kconfig 
b/arch/arm/cpu/armv7/exynos/Kconfig
index 3a25fee..d0530f0 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -22,6 +22,10 @@ config TARGET_TRATS2
 config TARGET_ODROID
bool Exynos4412 Odroid board
 
+config TARGET_ODROID_XU3
+   bool Exynos5422 Odroid board
+   select OF_CONTROL if !SPL_BUILD
+
 config TARGET_ARNDALE
bool Exynos5250 Arndale board
select OF_CONTROL if !SPL_BUILD
@@ -60,6 +64,7 @@ source board/samsung/universal_c210/Kconfig
 source board/samsung/origen/Kconfig
 source board/samsung/trats2/Kconfig
 source board/samsung/odroid/Kconfig
+source board/samsung/odroid-xu3/Kconfig
 source board/samsung/arndale/Kconfig
 source board/samsung/smdk5250/Kconfig
 source board/samsung/smdk5420/Kconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 2dcfcc0..66191f9 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -12,7 +12,8 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
exynos5250-smdk5250.dtb \
exynos5420-smdk5420.dtb \
exynos5420-peach-pit.dtb \
-   exynos5800-peach-pi.dtb
+   exynos5800-peach-pi.dtb \
+   exynos5422-odroidxu3.dtb
 dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
tegra20-medcom-wide.dtb \
tegra20-paz00.dtb \
diff --git a/arch/arm/dts/exynos5422-odroidxu3.dts 
b/arch/arm/dts/exynos5422-odroidxu3.dts
new file mode 100644
index 000..21c0023
--- /dev/null
+++ b/arch/arm/dts/exynos5422-odroidxu3.dts
@@ -0,0 +1,60 @@
+/*
+ * Odroid XU3 device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+/include/ exynos54xx.dtsi
+
+/ {
+   model = Odroid XU3 based on EXYNOS5422;
+   compatible = samsung,odroidxu3, samsung,exynos5;
+
+   aliases {
+   serial0 = /serial@12C0;
+   console = /serial@12C2;
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0x4000 0x1000
+   0x5000 0x1000
+   0x6000 0x1000
+   0x7000 0x1000
+   0x8000 0x1000
+   0x9000 0x1000
+   0xa000 0x1000
+   0xb000 0xea0;
+   };
+
+   serial@12C2 {
+   status=okay;
+   };
+
+   mmc@1220 {
+   samsung,bus-width = 8;
+   samsung,timing = 1 3 3;
+   samsung,removable = 0;
+   samsung,pre-init;
+   fifoth_val = 0x200f0020;
+   };
+
+   mmc@1221 {
+   status = disabled;
+   };
+
+   mmc@1222 {
+   samsung,bus-width = 4;
+   samsung,timing = 1 2 3;
+   samsung,removable = 1;
+   

[U-Boot] arch/arm/lib/board.c - uninitialized vars

2014-11-06 Thread Wolfgang Denk
Hi,

I'm trying to clean up some warnings/errors detected when running
cppcheck on the U-Boot source tree.  For arch/arm/lib/board.c
I get this:

[arch/arm/lib/board.c:445]: (error) Uninitialized variable: id
[arch/arm/lib/board.c:422]: (error) Uninitialized variable: addr_sp

The problem is not usually detected by GCC depending on which macros
are active, here especially CONFIG_SPL_BUILD

The relevant code was last touched / introduced by commit f1d2b313:
ARM: add relocation support some two years ago...

I have some questions regarding the CONFIG_SPL_BUILD else case
(i. e. when building with CONFIG_SPL_BUILD defined):

422 addr_sp += 128; /* leave 32 words for abort-stack   */

Is this correct?  The stack is growing downward, so should the '+' not
be replaced by a '-', like we do a few lines above:

412 /* leave 3 words for abort-stack*/
413 addr_sp -= 12;

Why do we need 128 words in the CONFIG_SPL_BUILD case, but only 3
otherwise?

Should we not move the alignment for ABI compliance part outside the
CONFIG_SPL_BUILD if/else case, i. e. should this not always be done?


And of course, how should we correctly initialize the id and
addr_sp variable in both cases?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Der Dativ ist dem Genitiv sein Tod.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook

2014-11-06 Thread Nikita Kiryanov

Hi Stefano,

On 11/05/2014 02:32 PM, Stefano Babic wrote:

Hi Nikita,

On 29/10/2014 16:56, Nikita Kiryanov wrote:

Introduce board specific function board_preboot_os() to allow for board
specific config before we boot.

Signed-off-by: Nikita Kiryanov nik...@compulab.co.il
Cc: Igor Grinberg grinb...@compulab.co.il
Cc: Stefano Babic sba...@denx.de
Cc: Tom Rini tr...@ti.com
Cc: Jeroen Hofstee jer...@myspectrum.nl
Cc: Otavio Salvador ota...@ossystems.com.br
---
Changes in V2:
- Added board_preboot_os to bootm.h
- Split cm_fx6 stuff into a separate patch

  common/bootm_os.c | 7 +++
  include/bootm.h   | 1 +
  2 files changed, 8 insertions(+)



There is something that does not convince me. Really, the general
statement should be to turn all devices off before booting the kernel,
because this is what Linux expects. That said, this could be later
solved with dm, because we will can iterate through all drivers and call
a shutdown function.

Currently, preboot functions are turning off the hardware, so the name
is already misleading. And I see that arch_preboot_os() was also
convinced (because it is weak) to become a board_preboot, for example
here: board/renesas/koelsch/koelsch.c (and in other renesas
implementation, too).

I have some concerns adding a new weak function, that enables some
further hooks inside board code. I find it not well scalable.
In your case, you need such as sata_shutdown(), and it should be
responsibility of the general sata code to call something specific for
the board, if necessary.

In current code, bootm_disable_interrupts() calls also usb_stop() and
eth_halt(), - nothing to do with the name of the function. IMHO it
should be better to move the code to shutdown interface inside
boot_selected_os(), or having a common function disable_hardware()
that calls usb_stop(), eth_halt() and then, why not, a sata_stop().

There is also in arch/arm/imx-common/cpu.c a derived implementation for
arch_preboot_os(). Really it has nothing to do with arch, as I can see:
it shuts down only the IPU. But it is another hook, and IMHO it is
better stopping sata here as adding a hidden callback.


You make some good points.
I'll switch to using arch_preboot_os until there's a better way of doing
this.

--
Regards,
Nikita Kiryanov
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] MCF: uninitialized variables

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[arch/m68k/cpu/mcf5227x/speed.c:89]: (error) Uninitialized variable: bootmode
[arch/m68k/cpu/mcf532x/speed.c:248]: (error) Uninitialized variable: fout
[arch/m68k/cpu/mcf5445x/speed.c:194]: (error) Uninitialized variable: bootmode

Could you please have a look how to fix this?

Eventually this could be used as opportunity to clean up the code a
bit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It usually takes more than three weeks to prepare  a  good  impromptu
speech.  - Mark Twain
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] MPC85xx: Uninitialized variables and other problems

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[arch/powerpc/cpu/mpc85xx/cmd_errata.c:62]: (error) Uninitialized variable: x108

[board/freescale/common/cds_pci_ft.c:36]: (error) Possible null pointer 
dereference: map
[board/freescale/common/cds_pci_ft.c:52]: (error) Uninitialized variable: len

[board/freescale/t4qds/eth.c:289]: (error) Undefined behavior: Variable 'buf' 
is used as parameter and destination in s[n]printf().
[board/freescale/t4qds/eth.c:298]: (error) Undefined behavior: Variable 'buf' 
is used as parameter and destination in s[n]printf().
[board/freescale/t4qds/eth.c:307]: (error) Undefined behavior: Variable 'buf' 
is used as parameter and destination in s[n]printf().
[board/freescale/t4qds/eth.c:316]: (error) Undefined behavior: Variable 'buf' 
is used as parameter and destination in s[n]printf().

[drivers/ddr/fsl/ctrl_regs.c:1659]: (error) Uninitialized variable: wr
[drivers/ddr/fsl/ctrl_regs.c:2257]: (error) Uninitialized variable: ea
[drivers/ddr/fsl/ctrl_regs.c:2256]: (error) Uninitialized variable: sa
[drivers/ddr/fsl/ctrl_regs.c:1985]: (error) Uninitialized variable: zqcs_init

[drivers/mmc/fsl_esdhc_spl.c:95]: (error) Dereferencing 'tmp_buf' after it is 
deallocated / released
[drivers/mmc/fsl_esdhc_spl.c:98]: (error) Memory pointed to by 'tmp_buf' is 
freed twice.
[drivers/mmc/fsl_esdhc_spl.c:101]: (error) Dereferencing 'tmp_buf' after it is 
deallocated / released
[drivers/mmc/fsl_esdhc_spl.c:104]: (error) Memory pointed to by 'tmp_buf' is 
freed twice.



Can you please have a look and fix these?

Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A person who is more than casually interested in computers should  be
well  schooled in machine language, since it is a fundamental part of
a computer.   -- Donald Knuth
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] sandbox: Uninitialized variable

2014-11-06 Thread Wolfgang Denk
Dear Simon,

cppcheck reports:

[arch/sandbox/cpu/start.c:132]: (error) Uninitialized variable: err

And also:

[arch/sandbox/cpu/os.c:371]: (error) Memory leak: fname


Could you please have a look?

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Eeeek!
'eval' on strings should have been named 'evil'.-- Tom Phoenix in
pine.gso.3.96.980526121813.27437n-100...@user2.teleport.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] arch/arm/lib/board.c - uninitialized vars

2014-11-06 Thread Heiko Schocher

Hello Wolfgang,

Am 06.11.2014 12:28, schrieb Wolfgang Denk:

Hi,

I'm trying to clean up some warnings/errors detected when running
cppcheck on the U-Boot source tree.  For arch/arm/lib/board.c
I get this:

[arch/arm/lib/board.c:445]: (error) Uninitialized variable: id
[arch/arm/lib/board.c:422]: (error) Uninitialized variable: addr_sp

The problem is not usually detected by GCC depending on which macros
are active, here especially CONFIG_SPL_BUILD

The relevant code was last touched / introduced by commit f1d2b313:
ARM: add relocation support some two years ago...

I have some questions regarding the CONFIG_SPL_BUILD else case
(i. e. when building with CONFIG_SPL_BUILD defined):

422 addr_sp += 128; /* leave 32 words for abort-stack   */

Is this correct?  The stack is growing downward, so should the '+' not
be replaced by a '-', like we do a few lines above:


No, this is a typo ... it must be a -



412 /* leave 3 words for abort-stack*/
413 addr_sp -= 12;

Why do we need 128 words in the CONFIG_SPL_BUILD case, but only 3
otherwise?


Good question ...


Should we not move the alignment for ABI compliance part outside the
CONFIG_SPL_BUILD if/else case, i. e. should this not always be done?


Yes, I think thats correct.

But looking into common/board_f.c ... there it is also done only
for the not SPL case ...

going back in history ...

http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/arm926ejs/start.S;h=cf40ce12928359c5238d02a32ed361ccc153c101;hb=a59e27997637a2395ae2cc7f809127f24119a167
here I see:

leave 32 words for abort-stack
leave 3 words for abort-stack
8-byte alignment for ABI compliance

without SPL (former PRELOADER) define mess ...

http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/arm1136/start.S;h=41eb82dae246b9509545f051daac605a02b7db05;hb=a59e27997637a2395ae2cc7f809127f24119a167#l179
here:

#ifdef CONFIG_PRELOADER
leave 32 words for abort-stack
#else
leave 3 words for abort-stack
#endif
8-byte alignment for ABI compliance

http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/pxa/start.S;h=e07c8c2e0e70744c45152c1649cef65f87825708;hb=a59e27997637a2395ae2cc7f809127f24119a167
here
leave 3 words for abort-stack
8-byte alignment for ABI compliance

no leave 32 words for abort-stack

... :-(


And of course, how should we correctly initialize the id and
addr_sp variable in both cases?


Hmm.. they are initialized for the !SPL case ... and in the
SPL case, board__init_f is used from ./arch/arm/lib/spl.c
or overwritten from SoC dependend code, like done in:

./arch/arm/cpu/arm926ejs/davinci/spl.c

- so I think, we can drop the CONFIG_SPL_BUILD in
u-boot:/arch/arm/lib/board.c board_init_f(), as it is not used, thats
maybe the reason, why this issue never poped up!

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] CONFIG_LCD_BMP_RLE8 and MCC200 dead code?

2014-11-06 Thread Nikita Kiryanov

Hi all,

I've been trying to do some cleanup in common/lcd.c, and noticed some
unused code:

One is the CONFIG_LCD_BMP_REL8 stuff. This code was added 2 years ago
in patch 45d7f52511f43b71b623a502fdf31feb905f70a1, and so far it has
no users (sandbox.h defines it, but only to fix a compilation error,
see commit 0156444cf7e77e92fed7a61d6c6123b349f1d600).

The other case is MCC200 specific #ifdefs. It handles 1bpp BMPs, which
I don't think is likely to be used by current and future boards, and
the board itself is old, and has no maintainer. Perhaps this board
can be removed?

--
Regards,
Nikita Kiryanov
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [board/gdsys/405ep/iocon.c:372]: (error) Uninitialized variable: fpga_features

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[board/gdsys/405ep/iocon.c:372]: (error) Uninitialized variable:
fpga_features

can you please have a look?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If you believe that feeling bad or worrying long enough will change a
past or future event, then you are residing on another planet with  a
different reality system.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [board/keymile/km82xx/km82xx.c:311]: (error) Uninitialized variable: psize

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[board/keymile/km82xx/km82xx.c:311]: (error) Uninitialized variable:
psize

can you please have a look?  Thanks!


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
An expert is a person who avoids the small errors while  sweeping  on
to the grand fallacy.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [board/muas3001/muas3001.c:270]: (error) Uninitialized variable: psize

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[board/muas3001/muas3001.c:270]: (error) Uninitialized variable: psize

can you please have a look?  Thanks!


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Faith may be defined briefly as an illogical belief in the  occurence
of the improbable.- H. L. Mencken
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[common/cmd_ini.c:137]: (error) Uninitialized variable: line

can you please have a look?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
365 Days of drinking Lo-Cal beer.   = 1 Lite-year
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [drivers/misc/cros_ec.c:704]: (error) Uninitialized variable: req

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[drivers/misc/cros_ec.c:704]: (error) Uninitialized variable: req

can you please have a look?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Dear Lord: I just want *one* one-armed manager so  I  never  have  to
hear On the other hand, again.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [drivers/mtd/ubi/eba.c:1275]: (error) Uninitialized variable: aeb

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[drivers/mtd/ubi/eba.c:1275]: (error) Uninitialized variable: aeb

can you please have a look?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If you're not part of the solution, then you're part of the  precipi-
tate.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [drivers/net/e1000.c:2251]: (error) Uninitialized variable: phy_data

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[drivers/net/e1000.c:2251]: (error) Uninitialized variable: phy_data
[drivers/net/e1000.c:2261]: (error) Uninitialized variable: phy_data
[drivers/net/e1000.c:2303]: (error) Uninitialized variable: phy_data
[drivers/net/e1000.c:2313]: (error) Uninitialized variable: phy_data
[drivers/net/e1000.c:2380]: (error) Uninitialized variable: phy_data
[drivers/net/e1000.c:2428]: (error) Uninitialized variable: phy_data

can you please have a look?  Thanks!


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Never face facts; if you do, you'll never get up in the morning.
- Marlo Thomas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [drivers/usb/gadget/f_dfu.c:687]: (error) Uninitialized variable: d

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[drivers/usb/gadget/f_dfu.c:687]: (error) Uninitialized variable: d

can you please have a look?  Thanks!


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You could end up being oddly sad and full of a strange, diffuse  com-
passion  which would lead you to believe that it might be a good idea
to wipe out the whole human race and start again with amoebas.
 - Terry Pratchett, _Guards! Guards!_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [drivers/usb/musb-new/musb_core.c:2166]: (error) Uninitialized variable: musb

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[drivers/usb/musb-new/musb_core.c:2166]: (error) Uninitialized
variable: musb
[drivers/usb/musb-new/musb_host.c:1918]: (error) Uninitialized
variable: idle


can you please have a look?  Thanks!


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Be wiser than other people if you can, but do not tell them so.
   -- Philip Earl of Chesterfield
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [fs/zfs/zfs.c:743]: (error) Uninitialized variable: ct

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[fs/zfs/zfs.c:743]: (error) Uninitialized variable: ct
[fs/zfs/zfs.c:937]: (error) Memory leak: l
[fs/zfs/zfs.c:1048]: (error) Memory leak: zapbuf
[fs/zfs/zfs.c:1083]: (error) Memory leak: zapbuf
[fs/zfs/zfs.c:1141]: (error) Memory leak: dnbuf
[fs/zfs/zfs.c:1372]: (error) Memory leak: osp 
[fs/zfs/zfs.c:1726]: (error) Memory leak: nvlist
[fs/zfs/zfs.c:1869]: (error) Memory leak: ub_array
[fs/zfs/zfs.c:1957]: (error) Memory leak: osp 
[fs/zfs/zfs.c:2047]: (error) Memory leak: sahdrp


can you please have a look?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.  - Henry Spencer, University of Toronto Unix hack
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [board/gdsys/405ep/iocon.c:372]: (error) Uninitialized variable: fpga_features

2014-11-06 Thread Dirk Eibach
Hello Wolfgang,

2014-11-06 13:31 GMT+01:00 Wolfgang Denk w...@denx.de:
 Hello,

 cppcheck reports:

 [board/gdsys/405ep/iocon.c:372]: (error) Uninitialized variable:
 fpga_features

 can you please have a look?  Thanks!

oops, nice one, thanks.

Will fix.

Cheers
Dirk
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[net/eth.c:64]: (error) Uninitialized variable: skip_state

can you please have a look?  Thanks!


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
What we anticipate seldom occurs;  what  we  least  expect  generally
happens.  - Bengamin Disraeli
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] doc: fix documentation of out-of-tree build

2014-11-06 Thread Timo Ketola
Correct environment variable for output directory is KBUILD_OUTPUT.

Signed-off-by: Timo Ketola t...@exertus.fi
---
v2 changes:
- Fixed the example in the doc/README.kwbimage file functionally
correct


 README  |6 +++---
 doc/README.kwbimage |4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README b/README
index 7b5538e..c3a9dfc 100644
--- a/README
+++ b/README
@@ -5012,14 +5012,14 @@ this behavior and build U-Boot to some external 
directory:
make O=/tmp/build NAME_defconfig
make O=/tmp/build all
 
-2. Set environment variable BUILD_DIR to point to the desired location:
+2. Set environment variable KBUILD_OUTPUT to point to the desired location:
 
-   export BUILD_DIR=/tmp/build
+   export KBUILD_OUTPUT=/tmp/build
make distclean
make NAME_defconfig
make all
 
-Note that the command line O= setting overrides the BUILD_DIR environment
+Note that the command line O= setting overrides the KBUILD_OUTPUT environment
 variable.
 
 
diff --git a/doc/README.kwbimage b/doc/README.kwbimage
index 13f6f92..762b2e3 100644
--- a/doc/README.kwbimage
+++ b/doc/README.kwbimage
@@ -30,10 +30,10 @@ kwbimage support available with mkimage utility will 
generate kirkwood boot
 image that can be flashed on the board NAND/SPI flash.  The make target
 which uses mkimage to produce such an image is u-boot.kwb.  For example:
 
-  export BUILD_DIR=/tmp/build
+  export KBUILD_OUTPUT=/tmp/build
   make distclean
   make yourboard_config
-  make $BUILD_DIR/u-boot.kwb
+  make u-boot.kwb
 
 
 Board specific configuration file specifications:
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [scripts/docproc.c:398]: (error) Common realloc mistake

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[scripts/docproc.c:398]: (error) Common realloc mistake: 'data' nulled
but not freed upon failure
[scripts/docproc.c:422]: (error) Common realloc mistake: 'all_list'
nulled but not freed upon failure

can you please have a look?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
F u cn rd ths u cnt spl wrth a dm!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL (Secondary Program Loader) on iMX6SL

2014-11-06 Thread Fabio Estevam
Hi John,

On Thu, Nov 6, 2014 at 12:54 AM, John Tobias john.tobias...@gmail.com wrote:
 Hi Fabio,

 The SPL support that I have done for sabresd is not %100 done. I just
 did that for the testing and to see if I could load the SPL image.

 Btw, I saw in freescale repository that they have the plugin feature.
 I enabled it but it didn't work. When I load the image, it jump to
 0x00907000.

 Do you know how does it work?.

You should not focus on the plugin feature. It was posted a few days
ago and the general agreement is that spl should be used instead.

For spl example on mx6, you can look at gw_ventana, cm_fx6 and novena
boards as references.

Regards,

Fabio Estevam
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [scripts/kconfig/nconf.gui.c:375]: (error) Common realloc mistake

2014-11-06 Thread Wolfgang Denk
Hello,

cppcheck reports:

[scripts/kconfig/confdata.c:983]: (error) Resource leak: tristate
[scripts/kconfig/nconf.gui.c:375]: (error) Common realloc mistake:
'result' nulled but not freed upon failure
[scripts/kconfig/nconf.gui.c:481]: (error) Common realloc mistake:
'result' nulled but not freed upon failure
[scripts/kconfig/symbol.c:904]: (error) Common realloc mistake: 'res'
nulled but not freed upon failure
[scripts/kconfig/zconf.lex.c:817]: (error) Common realloc mistake:
'text' nulled but not freed upon failure

can you please have a look?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
How many seconds are there in a year? If I tell you there are 3.155 x
10^7, you won't even try to remember it. On the other hand, who could
forget that, to within half a percent, pi seconds is  a  nanocentury.
   -- Tom Duff, Bell Labs
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] arch/arm/lib/board.c - uninitialized vars

2014-11-06 Thread Wolfgang Denk
Dear Heiko,

In message 545b6539.9090...@denx.de you wrote:
 
 - so I think, we can drop the CONFIG_SPL_BUILD in
 u-boot:/arch/arm/lib/board.c board_init_f(), as it is not used, thats
 maybe the reason, why this issue never poped up!

I agree - this appears to be dead code.

Albert, what do you think?


And, most important: Who is going to provide a patch?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
He'd been wrong, there _was_ a light at the end of the tunnel, and it
was a flamethrower. - Terry Pratchett, _Mort_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] CONFIG_LCD_BMP_RLE8 and MCC200 dead code?

2014-11-06 Thread Wolfgang Denk
Dear Nikita,

In message 545b6844.2060...@compulab.co.il you wrote:
 
 I've been trying to do some cleanup in common/lcd.c, and noticed some
 unused code:

Thanks!

 The other case is MCC200 specific #ifdefs. It handles 1bpp BMPs, which
 I don't think is likely to be used by current and future boards, and
 the board itself is old, and has no maintainer. Perhaps this board
 can be removed?

I agree.  We should remove the MCC200 and PRS200 boards.

Can you submit such a patch, please?  TIA...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is your destiny. - Darth Vader
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] usb_storage: skip all unknown devices when probing

2014-11-06 Thread Soeren Moch
Not only skip storage devices with DEV_TYPE_UNKNOWN, but also all devices
which are unknown to u-boot (e.g., are not HARDDISK, TAPE, CDROM, OPDISK).

This especially avoids long timeouts when probing for external usb harddisks
which provide Enclosure Services.

Signed-off-by: Soeren Moch sm...@web.de
--
Cc: Marek Vasut ma...@denx.de
Cc: Tom Rini tr...@ti.com
---
 common/usb_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index eb7706c..0ac7b48 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1351,7 +1351,7 @@ int usb_stor_get_info(struct usb_device *dev, struct 
us_data *ss,
perq = usb_stor_buf[0];
modi = usb_stor_buf[1];
 
-   if ((perq  0x1f) == 0x1f) {
+   if ((perq  0x1f)  DEV_TYPE_OPDISK) {
/* skip unknown devices */
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] [drivers/usb/gadget/f_dfu.c:687]: (error) Uninitialized variable: d

2014-11-06 Thread Lukasz Majewski
Hi Wolfgang,

 Hello,
 
 cppcheck reports:
 
 [drivers/usb/gadget/f_dfu.c:687]: (error) Uninitialized variable: d
 
 can you please have a look?  Thanks!

I will look on it, but first at a first glance it all looks correct. We
definitely need usb_interface descriptor...

 
 
 Best regards,
 
 Wolfgang Denk
 



-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/9] cppcheck cleanup: fix nullPointer errors

2014-11-06 Thread Wolfgang Denk
There are a number of places where U-Boot intentionally and legally
accesses physical address 0x, for example when installing
exception vectors on systems where these are located in low memory.

Add cppcheck-suppress nullPointer comments to silence cppcheck
where this is intentional and legal.

Signed-off-by: Wolfgang Denk w...@denx.de
---
 arch/arm/cpu/arm926ejs/mxs/mxs.c  | 2 ++
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 2 ++
 arch/arm/cpu/armv7/zynq/ddrc.c| 1 +
 arch/blackfin/cpu/initcode.c  | 1 +
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 5 -
 arch/sh/lib/zimageboot.c  | 1 +
 board/esd/pci405/cmd_pci405.c | 4 +++-
 board/keymile/common/common.c | 1 +
 board/scb9328/flash.c | 2 ++
 9 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index 365542f..ef130ae 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -83,7 +83,9 @@ void mx28_fixup_vt(uint32_t start_addr)
int i;
 
for (i = 0; i  8; i++) {
+   /* cppcheck-suppress nullPointer */
vt[i] = ldr_pc;
+   /* cppcheck-suppress nullPointer */
vt[i + 8] = start_addr + (4 * i);
}
 }
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c 
b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index d3e1369..d29b9aa 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -118,6 +118,8 @@ static void mxs_spl_fixup_vectors(void)
 * fine.
 */
extern uint32_t _start;
+
+   /* cppcheck-suppress nullPointer */
memcpy(0x0, _start, 0x60);
 }
 
diff --git a/arch/arm/cpu/armv7/zynq/ddrc.c b/arch/arm/cpu/armv7/zynq/ddrc.c
index 1ea086d..d74f8db 100644
--- a/arch/arm/cpu/armv7/zynq/ddrc.c
+++ b/arch/arm/cpu/armv7/zynq/ddrc.c
@@ -40,6 +40,7 @@ void zynq_ddrc_init(void)
 * first stage bootloader. To get ECC to work all memory has
 * been initialized by writing any value.
 */
+   /* cppcheck-suppress nullPointer */
memset((void *)0, 0, 1 * 1024 * 1024);
} else {
puts(ECC disabled );
diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index 2e640af..fde54ea 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
@@ -955,6 +955,7 @@ check_hibernation(ADI_BOOT_DATA *bs, u16 vr_ctl, bool 
put_into_srfs)
uint32_t *hibernate_magic = 0;
 
SSYNC();
+   /* cppcheck-suppress nullPointer */
if (hibernate_magic[0] == 0xDEADBEEF) {
serial_putc('c');
bfin_write_EVT15(hibernate_magic[1]);
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c 
b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 47b712d..072387a 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -161,9 +161,12 @@ void cpu_init_early_f(void *fdt)
setup_ifc_sram = (void *)SRAM_BASE_ADDR;
dst = (u32 *) SRAM_BASE_ADDR;
src = (u32 *) setup_ifc;
-   for (i = 0; i  1024; i++)
+   for (i = 0; i  1024; i++) {
+   /* cppcheck-suppress nullPointer */
*dst++ = *src++;
+   }
 
+   /* cppcheck-suppress nullPointer */
setup_ifc_sram();
 
/* CLEANUP */
diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c
index 86d3998..3fea5f5 100644
--- a/arch/sh/lib/zimageboot.c
+++ b/arch/sh/lib/zimageboot.c
@@ -45,6 +45,7 @@ int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
bootargs = getenv(bootargs);
 
/* Clear zero page */
+   /* cppcheck-suppress nullPointer */
memset(param, 0, 0x1000);
 
/* Set commandline */
diff --git a/board/esd/pci405/cmd_pci405.c b/board/esd/pci405/cmd_pci405.c
index 55c20d0..29c688a 100644
--- a/board/esd/pci405/cmd_pci405.c
+++ b/board/esd/pci405/cmd_pci405.c
@@ -23,7 +23,7 @@
  */
 int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
-   unsigned int *ptr = 0;
+   unsigned int *ptr;
int count = 0;
int count2 = 0;
int i;
@@ -35,12 +35,14 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
 * Mark sync address
 */
ptr = 0;
+   /* cppcheck-suppress nullPointer */
*ptr = 0x;
puts(\nWaiting for image from pci host -);
 
/*
 * Wait for host to write the start address
 */
+   /* cppcheck-suppress nullPointer */
while (*ptr == 0x) {
count++;
if (!(count % 100)) {
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 2ddb3da..b9aff1a 100644
--- a/board/keymile/common/common.c
+++ 

[U-Boot] [PATCH 0/9] cppcheck cleanup

2014-11-06 Thread Wolfgang Denk
The following patches clean up a number of errors and warnings
detected by running the cppcheck [1] tool over the U-Boot source
tree.  This discovers a number of issues that escape GCC, for example
because they are inside #ifdef branches which are never compiled for
any of the tested configurations.

This is just an initial patch series; some other error reports have
been sent to the respective code maintainers, so more patches should
follow soon.

The command used for these tests was:

$ cd u-boot
$ cppcheck --force --quiet --inline-suppr .

[1] http://cppcheck.sourceforge.net/

Wolfgang Denk (9):
  cppcheck cleanup: fix nullPointer errors
  board/cogent/lcd.c: fix syntax error
  drivers/usb/host/isp116x-hcd.c: fix syntax error
  drivers/net/uli526x.c: fix syntax error
  common/cmd_fitupd.c: restore corrupted file
  board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow
  board/renesas/ecovec/ecovec.c: fix buffer overflow
  ARM: MXS: fix Uninitialized variable error
  board/esd/common/auto_update.c: fix Uninitialized variable

 arch/arm/cpu/arm926ejs/mxs/mxs.c  |  2 ++
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c |  2 ++
 arch/arm/cpu/arm926ejs/mxs/timer.c|  2 ++
 arch/arm/cpu/armv7/zynq/ddrc.c|  1 +
 arch/blackfin/cpu/initcode.c  |  1 +
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c |  5 -
 arch/sh/lib/zimageboot.c  |  1 +
 board/cogent/lcd.c|  2 +-
 board/esd/common/auto_update.c|  3 +--
 board/esd/pci405/cmd_pci405.c |  4 +++-
 board/keymile/common/common.c |  1 +
 board/matrix_vision/mvblx/sys_eeprom.c|  2 +-
 board/renesas/ecovec/ecovec.c |  2 +-
 board/scb9328/flash.c |  2 ++
 common/cmd_fitupd.c   | 14 +-
 drivers/net/uli526x.c |  2 +-
 drivers/usb/host/isp116x-hcd.c|  2 +-
 17 files changed, 30 insertions(+), 18 deletions(-)

-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/9] board/cogent/lcd.c: fix syntax error

2014-11-06 Thread Wolfgang Denk
Fix error detected by cppcheck:

[board/cogent/lcd.c:237]: (error) Invalid number of character (()
when these macros are defined:
'CONFIG_SHOW_ACTIVITY;CONFIG_STATUS_LED'.

Signed-off-by: Wolfgang Denk w...@denx.de
---
 board/cogent/lcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/cogent/lcd.c b/board/cogent/lcd.c
index 8e90f98..05ffc4d 100644
--- a/board/cogent/lcd.c
+++ b/board/cogent/lcd.c
@@ -234,7 +234,7 @@ lcd_heartbeat(void)
 void board_show_activity (ulong timestamp)
 {
 #ifdef CONFIG_STATUS_LED
-   if ((timestamp % (CONFIG_SYS_HZ / 2) == 0)
+   if ((timestamp % (CONFIG_SYS_HZ / 2)) == 0)
lcd_heartbeat ();
 #endif
 }
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/9] board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow

2014-11-06 Thread Wolfgang Denk
Fix error detected by cppcheck:

[board/matrix_vision/mvblx/sys_eeprom.c:353]: (error) Buffer is
accessed out of bounds.

Signed-off-by: Wolfgang Denk w...@denx.de
cc: Michael Jones michael.jo...@matrix-vision.de
---
 board/matrix_vision/mvblx/sys_eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/matrix_vision/mvblx/sys_eeprom.c 
b/board/matrix_vision/mvblx/sys_eeprom.c
index 1a2ac8d..db42987 100644
--- a/board/matrix_vision/mvblx/sys_eeprom.c
+++ b/board/matrix_vision/mvblx/sys_eeprom.c
@@ -348,7 +348,7 @@ int mac_read_from_eeprom(void)
 
if (memcmp(e.mac, \0\0\0\0\0\0, 6) 
memcmp(e.mac, \xFF\xFF\xFF\xFF\xFF\xFF, 6)) {
-   char ethaddr[9];
+   char ethaddr[18];
 
sprintf(ethaddr, %02X:%02X:%02X:%02X:%02X:%02X,
e.mac[0],
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/9] drivers/usb/host/isp116x-hcd.c: fix syntax error

2014-11-06 Thread Wolfgang Denk
Fix error detected by cppcheck:

[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined: ''.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined: 'ISP116X_HCD_OC_ENABLE'.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined:
'ISP116X_HCD_REMOTE_WAKEUP_ENABLE'.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined: 'ISP116X_HCD_SEL15kRES'.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined:
'ISP116X_HCD_USE_EXTRA_DELAY'.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined: 'ISP116X_HCD_USE_UDELAY'.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined: 'TRACE'.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined: 'TRACE;VERBOSE'.
[drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
character (() when these macros are defined: 'VERBOSE'.

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Stephen Warren swar...@wwwdotorg.org
Cc: Marek Vasut ma...@denx.de
---
 drivers/usb/host/isp116x-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 46e4cee..35d4e9f 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1279,7 +1279,7 @@ int isp116x_check_id(struct isp116x *isp116x)
return 0;
 }
 
-int usb_lowlevel_init(int index, enum usb_init_type init, void **controller))
+int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
 {
struct isp116x *isp116x = isp116x_dev;
 
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 7/9] board/renesas/ecovec/ecovec.c: fix buffer overflow

2014-11-06 Thread Wolfgang Denk
Fix error detected by cppcheck:

[board/renesas/ecovec/ecovec.c:66]: (error) Buffer is accessed out of
bounds.

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Nobuhiro Iwamatsu iwamatsu.nobuh...@renesas.com
---
 board/renesas/ecovec/ecovec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/renesas/ecovec/ecovec.c b/board/renesas/ecovec/ecovec.c
index 2804d91..d862d99 100644
--- a/board/renesas/ecovec/ecovec.c
+++ b/board/renesas/ecovec/ecovec.c
@@ -41,7 +41,7 @@ static void debug_led(u8 led)
 int board_late_init(void)
 {
u8 mac[6];
-   char env_mac[17];
+   char env_mac[18];
 
udelay(1000);
 
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/9] common/cmd_fitupd.c: restore corrupted file

2014-11-06 Thread Wolfgang Denk
This file got corrupted by the automatic editin of commit 1a45966 Add
GPL-2.0+ SPDX-License-Identifier to source files; restore the
opiginal content and manually insert the SPDX ID.

The bug was detected by running cppcheck, which reported:
[common/cmd_fitupd.c:8]: (error) Invalid number of character ({) when
these macros are defined: 'CONFIG_UPDATE_TFTP'.

Signed-off-by: Wolfgang Denk w...@denx.de
---
 common/cmd_fitupd.c | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/common/cmd_fitupd.c b/common/cmd_fitupd.c
index e811473..b045974 100644
--- a/common/cmd_fitupd.c
+++ b/common/cmd_fitupd.c
@@ -1,12 +1,8 @@
-de net.h
-
-#if !defined(CONFIG_UPDATE_TFTP)
-#error CONFIG_UPDATE_TFTP required
-#endif
-
-static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-   ulong addr = 0Un the root directory of the source tree for details.
+/*
+ * (C) Copyright 2011
+ * Andreas Pretzsch, carpe noctem engineering, a...@cn-eng.de
+ *
+ * SPDX-License-Identifier:GPL-2.0+
  */
 
 #include common.h
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 8/9] ARM: MXS: fix Uninitialized variable error

2014-11-06 Thread Wolfgang Denk
cppcheck reports:

[arch/arm/cpu/arm926ejs/mxs/timer.c:96]: (error) Uninitialized
variable: now

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Marek Vasut ma...@denx.de
Cc: Stefano Babic sba...@denx.de
---
 arch/arm/cpu/arm926ejs/mxs/timer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c 
b/arch/arm/cpu/arm926ejs/mxs/timer.c
index 99d3fb8..f2e7225 100644
--- a/arch/arm/cpu/arm926ejs/mxs/timer.c
+++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
@@ -91,6 +91,8 @@ unsigned long long get_ticks(void)
TIMROT_RUNNING_COUNTn_RUNNING_COUNT_OFFSET;
 #elif defined(CONFIG_MX28)
now = readl(timrot_regs-hw_timrot_running_count0);
+#else
+#error Don't know how to read timrot_regs
 #endif
 
if (lastdec = now) {
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 9/9] board/esd/common/auto_update.c: fix Uninitialized variable

2014-11-06 Thread Wolfgang Denk
cppcheck reports:

[board/esd/common/auto_update.c:458]: (error) Uninitialized variable: cnt

The variable is not really used anywhere, so remove it.

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Matthias Fuchs matthias.fu...@esd-electronics.com
---
 board/esd/common/auto_update.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c
index 85c3567..b168074 100644
--- a/board/esd/common/auto_update.c
+++ b/board/esd/common/auto_update.c
@@ -377,7 +377,7 @@ int do_auto_update(void)
 {
block_dev_desc_t *stor_dev = NULL;
long sz;
-   int i, res, cnt, old_ctrlc;
+   int i, res, old_ctrlc;
char buffer[32];
char str[80];
int n;
@@ -455,7 +455,6 @@ int do_auto_update(void)
clear_ctrlc ();
break;
}
-   cnt++;
} while (res  0);
}
 
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/9] drivers/net/uli526x.c: fix syntax error

2014-11-06 Thread Wolfgang Denk
Fix error detected by cppcheck:

[drivers/net/uli526x.c:551]: (error) printf format string requires 3
parameters but only 2 are given.

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Roy Zang tie-fei.z...@freescale.com
---
 drivers/net/uli526x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index 538f11e..9526faa 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -548,7 +548,7 @@ static int uli526x_rx_packet(struct eth_device *dev)
 
rdes0 = le32_to_cpu(rxptr-rdes0);
 #ifdef RX_DEBUG
-   printf(%s(): rxptr-rdes0=%x:%x\n, __FUNCTION__, rxptr-rdes0);
+   printf(%s(): rxptr-rdes0=%x\n, __FUNCTION__, rxptr-rdes0);
 #endif
if (!(rdes0  0x8000)) {/* packet owner check */
if ((rdes0  0x300) != 0x300) {
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [drivers/usb/gadget/f_dfu.c:687]: (error) Uninitialized variable: d

2014-11-06 Thread Wolfgang Denk
Dear Lukasz,

In message 20141106135936.26788299@amdc2363 you wrote:
 
  [drivers/usb/gadget/f_dfu.c:687]: (error) Uninitialized variable: d
...
 I will look on it, but first at a first glance it all looks correct. We
 definitely need usb_interface descriptor...

You are right.  This appears to be a false positive.  Strange...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is dangerous to be right on a subject  on  which  the  established
authorities are wrong.-- Voltaire
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/6] linux/kernel.h: sync min, max, min3, max3 macros with Linux

2014-11-06 Thread Pavel Machek
On Wed 2014-11-05 07:02:23, Marek Vasut wrote:
 On Wednesday, November 05, 2014 at 06:06:09 AM, Masahiro Yamada wrote:
  Hi Pavel,
  
  Thanks for your close checking.
  
  
  On Tue, 4 Nov 2014 20:50:13 +0100
  
  Pavel Machek pa...@denx.de wrote:
   On Tue 2014-11-04 20:26:26, Masahiro Yamada wrote:
U-Boot has never cared about the type when we get max/min of two
values, but Linux Kernel does.  This commit gets min, max, min3, max3
macros synced with the kernel introduing type checks.
   
   introducing
  
  I will fix this.
 
 Are you linting the patches with aspell or something ?

My eyes do this automatically. I tried to find a switch to turn it
off, but could not, so far.

:-),
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 3/9] drivers/usb/host/isp116x-hcd.c: fix syntax error

2014-11-06 Thread Marek Vasut
On Thursday, November 06, 2014 at 02:02:59 PM, Wolfgang Denk wrote:
 Fix error detected by cppcheck:
 
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined: ''.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined: 'ISP116X_HCD_OC_ENABLE'.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined:
 'ISP116X_HCD_REMOTE_WAKEUP_ENABLE'.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined: 'ISP116X_HCD_SEL15kRES'.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined:
 'ISP116X_HCD_USE_EXTRA_DELAY'.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined: 'ISP116X_HCD_USE_UDELAY'.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined: 'TRACE'.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined: 'TRACE;VERBOSE'.
 [drivers/usb/host/isp116x-hcd.c:1282]: (error) Invalid number of
 character (() when these macros are defined: 'VERBOSE'.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Stephen Warren swar...@wwwdotorg.org
 Cc: Marek Vasut ma...@denx.de

A brief grep:
marex@bfu:u-boot$ git grep USB_ISP116X_HCD
drivers/usb/host/Makefile:obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
include/usb.h:  defined(CONFIG_USB_SL811HS) || defined(CONFIG_USB_ISP116X_HCD) 
|| \
marex@bfu:u-boot$

gives me a better idea on how to resolve this bug ... scrap this code 
altogether. Looks like the code was unused forever. Can you prepare a
patch for that please ?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [scripts/docproc.c:398]: (error) Common realloc mistake

2014-11-06 Thread Marek Vasut
On Thursday, November 06, 2014 at 01:42:41 PM, Wolfgang Denk wrote:
 Hello,

Hello,

 cppcheck reports:
 
 [scripts/docproc.c:398]: (error) Common realloc mistake: 'data' nulled
 but not freed upon failure
 [scripts/docproc.c:422]: (error) Common realloc mistake: 'all_list'
 nulled but not freed upon failure
 
 can you please have a look?  Thanks!

This looks unresolved in mainline Linux as well. I'm currently really
pressed, so I cannot take an immediate action. I believe it would be
worth reporting it to mainline Linux guys as well though.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [drivers/usb/musb-new/musb_core.c:2166]: (error) Uninitialized variable: musb

2014-11-06 Thread Marek Vasut
On Thursday, November 06, 2014 at 01:36:22 PM, Wolfgang Denk wrote:
 Hello,

Hi,

 cppcheck reports:
 
 [drivers/usb/musb-new/musb_core.c:2166]: (error) Uninitialized
 variable: musb
 [drivers/usb/musb-new/musb_host.c:1918]: (error) Uninitialized
 variable: idle
 
 
 can you please have a look?  Thanks!

CC Tom.

On a related note, we have two MUSB drivers in U-Boot. Which one
is used and which one is not ? Can we get rid of one of those ?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 9/9] board/esd/common/auto_update.c: fix Uninitialized variable

2014-11-06 Thread Matthias Fuchs
On 11/06/2014 02:03 PM, Wolfgang Denk wrote:
 cppcheck reports:
 
 [board/esd/common/auto_update.c:458]: (error) Uninitialized variable: cnt
 
 The variable is not really used anywhere, so remove it.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Matthias Fuchs matthias.fu...@esd-electronics.com
 ---
  board/esd/common/auto_update.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c
 index 85c3567..b168074 100644
 --- a/board/esd/common/auto_update.c
 +++ b/board/esd/common/auto_update.c
 @@ -377,7 +377,7 @@ int do_auto_update(void)
  {
   block_dev_desc_t *stor_dev = NULL;
   long sz;
 - int i, res, cnt, old_ctrlc;
 + int i, res, old_ctrlc;
   char buffer[32];
   char str[80];
   int n;
 @@ -455,7 +455,6 @@ int do_auto_update(void)
   clear_ctrlc ();
   break;
   }
 - cnt++;
   } while (res  0);
   }
  
 
Thanks for fixing!

Acked-by: Matthias Fuchs matthias.fu...@esd.eu

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] km/km82xx: remove CONFIG_SYS_RAMBOOT

2014-11-06 Thread Holger Brunck
This define is never set in our setup, so we can remove it safely. The
former code causes cppcheck to complain about:
[board/keymile/km82xx/km82xx.c:311]: (error) Uninitialized variable:
psize

Signed-off-by: Holger Brunck holger.bru...@keymile.com
cc: Valentin Longchamp valentin.longch...@keymile.com
cc: Wolfgang Denk w...@denx.de
---
 board/keymile/km82xx/km82xx.c | 2 --
 include/configs/km82xx.h  | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c
index dfbfab8..cb13a0b 100644
--- a/board/keymile/km82xx/km82xx.c
+++ b/board/keymile/km82xx/km82xx.c
@@ -300,11 +300,9 @@ phys_size_t initdram(int board_type)
out_8(memctl-memc_psrt, CONFIG_SYS_PSRT);
out_be16(memctl-memc_mptpr, CONFIG_SYS_MPTPR);
 
-#ifndef CONFIG_SYS_RAMBOOT
/* 60x SDRAM setup:
 */
psize = probe_sdram(memctl);
-#endif /* CONFIG_SYS_RAMBOOT */
 
icache_enable();
 
diff --git a/include/configs/km82xx.h b/include/configs/km82xx.h
index 029c348..220975d 100644
--- a/include/configs/km82xx.h
+++ b/include/configs/km82xx.h
@@ -204,9 +204,6 @@

 
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE
-#if (CONFIG_SYS_MONITOR_BASE  CONFIG_SYS_FLASH_BASE)
-#define CONFIG_SYS_RAMBOOT
-#endif
 
 #define CONFIG_SYS_MONITOR_LEN (768  10)
 
-- 
2.1.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: move select CPU_V7 to ARCH_SUNXI

2014-11-06 Thread Hans de Goede
Hi,

On 11/06/2014 03:36 AM, Masahiro Yamada wrote:
 CPU_V7 is select'ed by all the MACH_SUN*I.
 
 While we are here, let's delete the redundant string typedef
 of SYS_CONFIG_NAME.
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com

I deliberately put the CPU_V7 where it is because I think it is
likely we will see V8 sunxi hardware in the future.

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/9] board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow

2014-11-06 Thread Michael Jones

On 11/06/2014 02:03 PM, Wolfgang Denk wrote:

Fix error detected by cppcheck:

[board/matrix_vision/mvblx/sys_eeprom.c:353]: (error) Buffer is
accessed out of bounds.

Signed-off-by: Wolfgang Denk w...@denx.de
cc: Michael Jones michael.jo...@matrix-vision.de
---
  board/matrix_vision/mvblx/sys_eeprom.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/matrix_vision/mvblx/sys_eeprom.c 
b/board/matrix_vision/mvblx/sys_eeprom.c
index 1a2ac8d..db42987 100644
--- a/board/matrix_vision/mvblx/sys_eeprom.c
+++ b/board/matrix_vision/mvblx/sys_eeprom.c
@@ -348,7 +348,7 @@ int mac_read_from_eeprom(void)

if (memcmp(e.mac, \0\0\0\0\0\0, 6) 
memcmp(e.mac, \xFF\xFF\xFF\xFF\xFF\xFF, 6)) {
-   char ethaddr[9];
+   char ethaddr[18];

sprintf(ethaddr, %02X:%02X:%02X:%02X:%02X:%02X,
e.mac[0],



Thanks for the fix.

Acked-by: Michael Jones michael.jo...@matrix-vision.de
-
VISION 2014 in Stuttgart | 04.11.2014 - 06.11.2014
Meet us at the VISION show Hall 1 - Stand E12
-

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Uwe Furtner, Erhard Meier
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [drivers/mtd/ubi/eba.c:1275]: (error) Uninitialized variable: aeb

2014-11-06 Thread Heiko Schocher

Hello Wolfgang,

Am 06.11.2014 13:34, schrieb Wolfgang Denk:

Hello,

cppcheck reports:

[drivers/mtd/ubi/eba.c:1275]: (error) Uninitialized variable: aeb

can you please have a look?  Thanks!


I see in drivers/mtd/ubi/eba.c:

1267:ubi_rb_for_each_entry(rb, aeb, av-root, u.rb)
1268:scan_eba[i][aeb-lnum] = aeb-pnum;
1269:
1270:av = ubi_find_av(ai_fastmap, idx2vol_id(ubi, i));
1271:if (!av)
1272:   continue;
1273:
1274:ubi_rb_for_each_entry(rb, aeb, av-root, u.rb)
1275:fm_eba[i][aeb-lnum] = aeb-pnum;

Why does cppcheck only report line 1275 not also line 1268 and also
1351? I could not currently see, why this pops up for line 1274 ...

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] powerpc, muas3001: remove CONFIG_SYS_RAMBOOT

2014-11-06 Thread Heiko Schocher
cppcheck reports:

[board/muas3001/muas3001.c:270]: (error) Uninitialized variable: psize

remove the CONFIG_SYS_RAMBOOT define to prevent this error report.

Signed-off-by: Heiko Schocher h...@denx.de
Reported-by: Wolfgang Denk w...@denx.de

---

 board/muas3001/muas3001.c  | 4 
 include/configs/muas3001.h | 4 
 2 files changed, 8 deletions(-)

diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c
index 08eb5e8..812a7f1 100644
--- a/board/muas3001/muas3001.c
+++ b/board/muas3001/muas3001.c
@@ -243,14 +243,11 @@ phys_size_t initdram (int board_type)
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
volatile memctl8260_t *memctl = immap-im_memctl;
long psize;
-#ifndef CONFIG_SYS_RAMBOOT
long sizelittle, sizebig;
-#endif
 
memctl-memc_psrt = CONFIG_SYS_PSRT;
memctl-memc_mptpr = CONFIG_SYS_MPTPR;
 
-#ifndef CONFIG_SYS_RAMBOOT
/* 60x SDRAM setup:
 */
sizelittle = try_init (memctl, CONFIG_SYS_PSDMR_LITTLE, 
CONFIG_SYS_OR1_LITTLE,
@@ -263,7 +260,6 @@ phys_size_t initdram (int board_type)
psize = try_init (memctl, CONFIG_SYS_PSDMR_LITTLE, 
CONFIG_SYS_OR1_LITTLE,
  (uchar *) 
CONFIG_SYS_SDRAM_BASE);
}
-#endif /* CONFIG_SYS_RAMBOOT */
 
icache_enable ();
 
diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index 7343c94..df2ecc1 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -206,10 +206,6 @@
 #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
 
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE
-#if (CONFIG_SYS_MONITOR_BASE  CONFIG_SYS_FLASH_BASE)
-#define CONFIG_SYS_RAMBOOT
-#endif
-
 #define CONFIG_SYS_MONITOR_LEN (256  10) /* Reserve 256KB for 
Monitor */
 
 #define CONFIG_ENV_IS_IN_FLASH
-- 
1.8.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: move select CPU_V7 to ARCH_SUNXI

2014-11-06 Thread Masahiro YAMADA
Hi Hans,


2014-11-06 22:56 GMT+09:00 Hans de Goede hdego...@redhat.com:
 Hi,

 On 11/06/2014 03:36 AM, Masahiro Yamada wrote:
 CPU_V7 is select'ed by all the MACH_SUN*I.

 While we are here, let's delete the redundant string typedef
 of SYS_CONFIG_NAME.

 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com

 I deliberately put the CPU_V7 where it is because I think it is
 likely we will see V8 sunxi hardware in the future.


Understood. Just disregards this patch.


-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 02/11] arm: omap5: tps659038: rename regulator defines

2014-11-06 Thread Felipe Balbi
Those regulators don't have any coupling with
what they supply, so remove the suffixes in order
to not confuse anybody.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/cpu/armv7/omap5/hw_data.c  | 10 +-
 arch/arm/include/asm/arch-omap5/clock.h | 10 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap5/hw_data.c 
b/arch/arm/cpu/armv7/omap5/hw_data.c
index 0257383..8b4d53a 100644
--- a/arch/arm/cpu/armv7/omap5/hw_data.c
+++ b/arch/arm/cpu/armv7/omap5/hw_data.c
@@ -365,31 +365,31 @@ struct vcores_data dra752_volts = {
.mpu.value  = VDD_MPU_DRA752,
.mpu.efuse.reg  = STD_FUSE_OPP_VMIN_MPU_NOM,
.mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
-   .mpu.addr   = TPS659038_REG_ADDR_SMPS12_MPU,
+   .mpu.addr   = TPS659038_REG_ADDR_SMPS12,
.mpu.pmic   = tps659038,
 
.eve.value  = VDD_EVE_DRA752,
.eve.efuse.reg  = STD_FUSE_OPP_VMIN_DSPEVE_NOM,
.eve.efuse.reg_bits = DRA752_EFUSE_REGBITS,
-   .eve.addr   = TPS659038_REG_ADDR_SMPS45_EVE,
+   .eve.addr   = TPS659038_REG_ADDR_SMPS45,
.eve.pmic   = tps659038,
 
.gpu.value  = VDD_GPU_DRA752,
.gpu.efuse.reg  = STD_FUSE_OPP_VMIN_GPU_NOM,
.gpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
-   .gpu.addr   = TPS659038_REG_ADDR_SMPS6_GPU,
+   .gpu.addr   = TPS659038_REG_ADDR_SMPS6,
.gpu.pmic   = tps659038,
 
.core.value = VDD_CORE_DRA752,
.core.efuse.reg = STD_FUSE_OPP_VMIN_CORE_NOM,
.core.efuse.reg_bits = DRA752_EFUSE_REGBITS,
-   .core.addr  = TPS659038_REG_ADDR_SMPS7_CORE,
+   .core.addr  = TPS659038_REG_ADDR_SMPS7,
.core.pmic  = tps659038,
 
.iva.value  = VDD_IVA_DRA752,
.iva.efuse.reg  = STD_FUSE_OPP_VMIN_IVA_NOM,
.iva.efuse.reg_bits = DRA752_EFUSE_REGBITS,
-   .iva.addr   = TPS659038_REG_ADDR_SMPS8_IVA,
+   .iva.addr   = TPS659038_REG_ADDR_SMPS8,
.iva.pmic   = tps659038,
 };
 
diff --git a/arch/arm/include/asm/arch-omap5/clock.h 
b/arch/arm/include/asm/arch-omap5/clock.h
index 30d9de2..7eacba2 100644
--- a/arch/arm/include/asm/arch-omap5/clock.h
+++ b/arch/arm/include/asm/arch-omap5/clock.h
@@ -278,11 +278,11 @@
 
 /* TPS659038 */
 #define TPS659038_I2C_SLAVE_ADDR   0x58
-#define TPS659038_REG_ADDR_SMPS12_MPU  0x23
-#define TPS659038_REG_ADDR_SMPS45_EVE  0x2B
-#define TPS659038_REG_ADDR_SMPS6_GPU   0x2F
-#define TPS659038_REG_ADDR_SMPS7_CORE  0x33
-#define TPS659038_REG_ADDR_SMPS8_IVA   0x37
+#define TPS659038_REG_ADDR_SMPS12  0x23
+#define TPS659038_REG_ADDR_SMPS45  0x2B
+#define TPS659038_REG_ADDR_SMPS6   0x2F
+#define TPS659038_REG_ADDR_SMPS7   0x33
+#define TPS659038_REG_ADDR_SMPS8   0x37
 
 /* TPS */
 #define TPS62361_I2C_SLAVE_ADDR0x60
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 07/11] arm: omap5: make hw_init_data weak

2014-11-06 Thread Felipe Balbi
this way we can let boards overwrite based
on what they need.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/cpu/armv7/omap5/hw_data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/omap5/hw_data.c 
b/arch/arm/cpu/armv7/omap5/hw_data.c
index 8b4d53a..95f1686 100644
--- a/arch/arm/cpu/armv7/omap5/hw_data.c
+++ b/arch/arm/cpu/armv7/omap5/hw_data.c
@@ -593,7 +593,7 @@ const struct ctrl_ioregs ioregs_dra72x_es1 = {
.ctrl_ddr_ctrl_ext_0 = 0xA200,
 };
 
-void hw_data_init(void)
+void __weak hw_data_init(void)
 {
u32 omap_rev = omap_revision();
 
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 04/11] usb: phy: omap_usb_phy: fix build breakage

2014-11-06 Thread Felipe Balbi
there's no such function usb3_phy_power(),
it's likely that author meant to call,
usb_phy_power() instead, but that's already
called properly from xhci-omap.c.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/phy/omap_usb_phy.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c
index f78d532..52a3664 100644
--- a/drivers/usb/phy/omap_usb_phy.c
+++ b/drivers/usb/phy/omap_usb_phy.c
@@ -118,7 +118,6 @@ void usb_phy_power(int on)
 void omap_usb3_phy_init(struct omap_usb3_phy *phy_regs)
 {
omap_usb_dpll_lock(phy_regs);
-
usb3_phy_partial_powerup(phy_regs);
/*
 * Give enough time for the PHY to partially power-up before
@@ -126,7 +125,6 @@ void omap_usb3_phy_init(struct omap_usb3_phy *phy_regs)
 * team.
 */
mdelay(100);
-   usb3_phy_power(1);
 }
 
 static void omap_enable_usb3_phy(struct omap_xhci *omap)
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 03/11] arm: dra7xx: prcm: add missing registers

2014-11-06 Thread Felipe Balbi
some boards might want to use USB1 for host,
without fiddling those registers it'll be
impossible.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/cpu/armv7/omap5/prcm-regs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap5/prcm-regs.c 
b/arch/arm/cpu/armv7/omap5/prcm-regs.c
index ff08ef4..0745d42 100644
--- a/arch/arm/cpu/armv7/omap5/prcm-regs.c
+++ b/arch/arm/cpu/armv7/omap5/prcm-regs.c
@@ -376,6 +376,7 @@ struct omap_sys_ctrl_regs const omap5_ctrl = {
 
 struct omap_sys_ctrl_regs const dra7xx_ctrl = {
.control_status = 0x4A002134,
+   .control_phy_power_usb  = 0x4A002370,
.control_phy_power_sata = 0x4A002374,
.control_core_mac_id_0_lo   = 0x4A002514,
.control_core_mac_id_0_hi   = 0x4A002518,
@@ -800,6 +801,7 @@ struct prcm_regs const dra7xx_prcm = {
.cm_clkmode_dpll_dsp= 0x4a005234,
.cm_shadow_freq_config1 = 0x4a005260,
.cm_clkmode_dpll_gmac   = 0x4a0052a8,
+   .cm_coreaon_usb_phy_core_clkctrl= 0x4a008640,
.cm_coreaon_usb_phy2_core_clkctrl = 0x4a008688,
 
/* cm1.mpu */
@@ -906,6 +908,7 @@ struct prcm_regs const dra7xx_prcm = {
.cm_gmac_gmac_clkctrl   = 0x4a0093d0,
.cm_l3init_ocp2scp1_clkctrl = 0x4a0093e0,
.cm_l3init_ocp2scp3_clkctrl = 0x4a0093e8,
+   .cm_l3init_usb_otg_ss_clkctrl   = 0x4a0093f0,
 
/* cm2.l4per */
.cm_l4per_clkstctrl = 0x4a009700,
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 01/11] arm: omap5: don't enable misc_init_r by default

2014-11-06 Thread Felipe Balbi
Out of all OMAP5-like boards, only one of them
needs CONFIG_MISC_INIT_R, so it's best to enable
that for that particular board only, instead of
enabling for all boards unconditionally.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 board/ti/dra7xx/evm.c | 12 
 include/configs/cm_t54.h  |  1 -
 include/configs/omap5_uevm.h  |  1 +
 include/configs/ti_omap5_common.h |  1 -
 4 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 37df7b2..6522241 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -96,18 +96,6 @@ int board_late_init(void)
return 0;
 }
 
-/**
- * @brief misc_init_r - Configure EVM board specific configurations
- * such as power configurations, ethernet initialization as phase2 of
- * boot sequence
- *
- * @return 0
- */
-int misc_init_r(void)
-{
-   return 0;
-}
-
 static void do_set_mux32(u32 base,
 struct pad_conf_entry const *array, int size)
 {
diff --git a/include/configs/cm_t54.h b/include/configs/cm_t54.h
index 641ab48..92ce1e1 100644
--- a/include/configs/cm_t54.h
+++ b/include/configs/cm_t54.h
@@ -16,7 +16,6 @@
 
 #include configs/ti_omap5_common.h
 
-#undef CONFIG_MISC_INIT_R
 #undef CONFIG_SPL_OS_BOOT
 
 /* Enable Generic board */
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index e8dc462..e07795f 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -23,6 +23,7 @@
 #define CONFIG_SYS_NS16550_COM3UART3_BASE
 #define CONFIG_BAUDRATE115200
 
+#define CONFIG_MISC_INIT_R
 /* MMC ENV related defines */
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV 1   /* SLOT2: eMMC(1) */
diff --git a/include/configs/ti_omap5_common.h 
b/include/configs/ti_omap5_common.h
index 3166392..5b03fb1 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -19,7 +19,6 @@
 
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
-#define CONFIG_MISC_INIT_R
 #define CONFIG_ARCH_CPU_INIT
 
 #define CONFIG_SYS_CACHELINE_SIZE  64
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 05/11] arm: omap-common: emif: allow to map memory without interleaving

2014-11-06 Thread Felipe Balbi
If we want to have two sections, one on each EMIF, without
interleaving, current code wouldn't enable emif2. Fix that
problem.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/cpu/armv7/omap-common/emif-common.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/emif-common.c 
b/arch/arm/cpu/armv7/omap-common/emif-common.c
index c8e9bc8..e601ba1 100644
--- a/arch/arm/cpu/armv7/omap-common/emif-common.c
+++ b/arch/arm/cpu/armv7/omap-common/emif-common.c
@@ -1226,13 +1226,14 @@ void dmm_init(u32 base)
emif1_enabled = 1;
emif2_enabled = 1;
break;
-   } else if (valid == 1) {
+   }
+
+   if (valid == 1)
emif1_enabled = 1;
-   } else if (valid == 2) {
+
+   if (valid == 2)
emif2_enabled = 1;
-   }
}
-
 }
 
 static void do_bug0039_workaround(u32 base)
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 11/11] beagle_x15: add board support for Beagle x15

2014-11-06 Thread Felipe Balbi
This is the bare minimum support for Beagle x15
into u-boot. There is still quite some work in
order to get this in good shape, but it's a
start.

Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Nishanth Menon n...@ti.com
---
 arch/arm/cpu/armv7/omap5/Kconfig  |   4 +
 board/ti/beagle_x15/Kconfig   |  12 ++
 board/ti/beagle_x15/Makefile  |   8 +
 board/ti/beagle_x15/board.c   | 328 ++
 board/ti/beagle_x15/mux_data.h|  55 +++
 configs/beagle_x15_defconfig  |   5 +
 include/configs/beagle_x15.h  |  89 +++
 include/configs/ti_omap5_common.h |   2 +
 8 files changed, 503 insertions(+)
 create mode 100644 board/ti/beagle_x15/Kconfig
 create mode 100644 board/ti/beagle_x15/Makefile
 create mode 100644 board/ti/beagle_x15/board.c
 create mode 100644 board/ti/beagle_x15/mux_data.h
 create mode 100644 configs/beagle_x15_defconfig
 create mode 100644 include/configs/beagle_x15.h

diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index 129982c..aca862d 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -12,6 +12,9 @@ config TARGET_OMAP5_UEVM
 config TARGET_DRA7XX_EVM
bool TI DRA7XX
 
+config TARGET_BEAGLE_X15
+   bool BeagleBoard X15
+
 endchoice
 
 config SYS_SOC
@@ -20,5 +23,6 @@ config SYS_SOC
 source board/compulab/cm_t54/Kconfig
 source board/ti/omap5_uevm/Kconfig
 source board/ti/dra7xx/Kconfig
+source board/ti/beagle_x15/Kconfig
 
 endif
diff --git a/board/ti/beagle_x15/Kconfig b/board/ti/beagle_x15/Kconfig
new file mode 100644
index 000..a305ff1
--- /dev/null
+++ b/board/ti/beagle_x15/Kconfig
@@ -0,0 +1,12 @@
+if TARGET_BEAGLE_X15
+
+config SYS_BOARD
+   default beagle_x15
+
+config SYS_VENDOR
+   default ti
+
+config SYS_CONFIG_NAME
+   default beagle_x15
+
+endif
diff --git a/board/ti/beagle_x15/Makefile b/board/ti/beagle_x15/Makefile
new file mode 100644
index 000..5cd6873
--- /dev/null
+++ b/board/ti/beagle_x15/Makefile
@@ -0,0 +1,8 @@
+#
+# (C) Copyright 2014
+# Texas Instruments, www.ti.com
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y  := board.o
diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c
new file mode 100644
index 000..5cafc87
--- /dev/null
+++ b/board/ti/beagle_x15/board.c
@@ -0,0 +1,328 @@
+/*
+ * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * Author: Felipe Balbi ba...@ti.com
+ *
+ * Based on board/ti/dra7xx/evm.c
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+#include palmas.h
+#include sata.h
+#include usb.h
+#include asm/omap_common.h
+#include asm/emif.h
+#include asm/arch/clock.h
+#include asm/arch/sys_proto.h
+#include asm/arch/mmc_host_def.h
+#include asm/arch/sata.h
+#include asm/arch/gpio.h
+#include environment.h
+
+#include mux_data.h
+
+#ifdef CONFIG_DRIVER_TI_CPSW
+#include cpsw.h
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+const struct omap_sysinfo sysinfo = {
+   Board: BeagleBoard x15\n
+};
+
+static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
+   .dmm_lisa_map_3 = 0x80740300,
+   .is_ma_present  = 0x1
+};
+
+void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
+{
+   *dmm_lisa_regs = beagle_x15_lisa_regs;
+}
+
+static const struct emif_regs beagle_x15_ddr3_532mhz_emif_regs = {
+   .sdram_config_init  = 0x61851B32, /* dont know what to do about 
this */
+   .sdram_config   = 0x61851B32,
+   .sdram_config2  = 0x,
+   .ref_ctrl   = 0x1035,
+   .sdram_tim1 = 0xCEEF266B,
+   .sdram_tim2 = 0x328F7FDA,
+   .sdram_tim3 = 0x027F88A8,
+   .read_idle_ctrl = 0x00050001, /* not sure where in gel file */
+   .zq_config  = 0x0007190B,
+   .temp_alert_config  = 0x,
+   .emif_ddr_phy_ctlr_1_init = 0x0E24400A, /* not sure what to do about 
this */
+   .emif_ddr_phy_ctlr_1= 0x0E24400A, /* based on non hw level enabled 
*/
+   .emif_ddr_ext_phy_ctrl_1 = 0x10040100, /* not sure wherein gel file */
+   .emif_ddr_ext_phy_ctrl_2 = 0x00740074,
+   .emif_ddr_ext_phy_ctrl_3 = 0x00780078,
+   .emif_ddr_ext_phy_ctrl_4 = 0x007c007c,
+   .emif_ddr_ext_phy_ctrl_5 = 0x007b007b,
+   .emif_rd_wr_lvl_rmp_win = 0x,
+   .emif_rd_wr_lvl_rmp_ctl = 0x, /* based on non hw level enabled 
*/
+   .emif_rd_wr_lvl_ctl = 0x, /* not sure where based in gel 
file */
+   .emif_rd_wr_exec_thresh = 0x0305
+};
+
+void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
+{
+   *regs = beagle_x15_ddr3_532mhz_emif_regs;
+}
+
+static const u32 beagle_x15_ddr3_ext_phy_ctrl_const_regs[] = {
+   0x00800080, // 6
+
+
+   0x00360036, // 7
+   0x00340034, // 8
+   0x00360036, // 9
+   0x00350035, // 10
+   0x00350035, // 11
+
+   0x01ff01ff, // 12
+   

[U-Boot] [PATCH 08/11] arm: omap5: sdram: mark emif_get_ext_phy_ctrl_const_regs __weak

2014-11-06 Thread Felipe Balbi
this will allow for boards to overwrite those
in case memory setup is different.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/cpu/armv7/omap5/sdram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/omap5/sdram.c b/arch/arm/cpu/armv7/omap5/sdram.c
index 065199b..7d8cec0 100644
--- a/arch/arm/cpu/armv7/omap5/sdram.c
+++ b/arch/arm/cpu/armv7/omap5/sdram.c
@@ -513,7 +513,7 @@ const struct lpddr2_mr_regs mr_regs = {
.mr16   = MR16_REF_FULL_ARRAY
 };
 
-static void emif_get_ext_phy_ctrl_const_regs(u32 emif_nr,
+void __weak emif_get_ext_phy_ctrl_const_regs(u32 emif_nr,
 const u32 **regs,
 u32 *size)
 {
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 06/11] configs: omap5_common : Boot rootfs from sd card by default

2014-11-06 Thread Felipe Balbi
From: Franklin S Cooper Jr fcoo...@ti.com

* Since the emmc isn't always programed trying to load the fs from the
  emmc causes boot failures/kernel panic.

* The current bootcmd is set to:
  bootcmd=run findfdt; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; \
  setenv mmcroot /dev/mmcblk0p2 rw; run mmcboot;

My guess is the env variables should be set so that sd card boot
(dt,kernel,fs) is the default and then fallback to emmc if it fails (no
sd card detected)

The current bootcmd attempts to set mmcroot to the sd card rootfs but
that code doesn't run due to mmcboot being ran early on.

Signed-off-by: Franklin Cooper Jr. fcoo...@ti.com
Signed-off-by: Felipe Balbi ba...@ti.com
---
 include/configs/ti_omap5_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/ti_omap5_common.h 
b/include/configs/ti_omap5_common.h
index 5b03fb1..de96d7d 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -78,7 +78,7 @@
partitions= PARTS_DEFAULT \0 \
optargs=\0 \
mmcdev=0\0 \
-   mmcroot=/dev/mmcblk1p2 rw\0 \
+   mmcroot=/dev/mmcblk0p2 rw\0 \
mmcrootfstype=ext4 rootwait\0 \
mmcargs=setenv bootargs console=${console}  \
${optargs}  \
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 10/11] arm: omap: add support for am57xx devices

2014-11-06 Thread Felipe Balbi
just add a few ifdefs around because this
device is very similar to dra7xxx.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/cpu/armv7/omap-common/boot-common.c | 2 +-
 arch/arm/include/asm/arch-omap5/clock.h  | 2 +-
 arch/arm/include/asm/arch-omap5/omap.h   | 4 ++--
 drivers/mmc/omap_hsmmc.c | 5 +++--
 drivers/power/palmas.c   | 2 +-
 drivers/spi/ti_qspi.c| 8 
 include/linux/usb/xhci-omap.h| 4 
 7 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c 
b/arch/arm/cpu/armv7/omap-common/boot-common.c
index fb535eb..b819fe2 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -57,7 +57,7 @@ void save_omap_boot_params(void)
}
}
 
-#ifdef CONFIG_DRA7XX
+#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
/*
 * We get different values for QSPI_1 and QSPI_4 being used, but
 * don't actually care about this difference.  Rather than
diff --git a/arch/arm/include/asm/arch-omap5/clock.h 
b/arch/arm/include/asm/arch-omap5/clock.h
index 7eacba2..0dc584b 100644
--- a/arch/arm/include/asm/arch-omap5/clock.h
+++ b/arch/arm/include/asm/arch-omap5/clock.h
@@ -314,7 +314,7 @@
  */
 #define CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC31219
 
-#ifdef CONFIG_DRA7XX
+#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
 #define V_OSCK 2000/* Clock output from T2 */
 #else
 #define V_OSCK 1920/* Clock output from T2 */
diff --git a/arch/arm/include/asm/arch-omap5/omap.h 
b/arch/arm/include/asm/arch-omap5/omap.h
index b9600cf..e218159 100644
--- a/arch/arm/include/asm/arch-omap5/omap.h
+++ b/arch/arm/include/asm/arch-omap5/omap.h
@@ -27,7 +27,7 @@
 #define CONTROL_CORE_ID_CODE   0x4A002204
 #define CONTROL_WKUP_ID_CODE   0x4AE0C204
 
-#ifdef CONFIG_DRA7XX
+#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
 #define CONTROL_ID_CODECONTROL_WKUP_ID_CODE
 #else
 #define CONTROL_ID_CODECONTROL_CORE_ID_CODE
@@ -163,7 +163,7 @@ struct s32ktimer {
  * much larger) and do not, at this time, make use of the additional
  * space.
  */
-#ifdef CONFIG_DRA7XX
+#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
 #define NON_SECURE_SRAM_START  0x4030
 #define NON_SECURE_SRAM_END0x4038  /* Not inclusive */
 #else
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index ef2cbf9..1bfbe2a 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -661,7 +661,8 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint 
f_max, int cd_gpio,
case 1:
priv_data-base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE;
 #if (defined(CONFIG_OMAP44XX) || defined(CONFIG_OMAP54XX) || \
- defined(CONFIG_DRA7XX))  defined(CONFIG_HSMMC2_8BIT)
+ defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX))  \
+   defined(CONFIG_HSMMC2_8BIT)
/* Enable 8-bit interface for eMMC on OMAP4/5 or DRA7XX */
host_caps_val |= MMC_MODE_8BIT;
 #endif
@@ -670,7 +671,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint 
f_max, int cd_gpio,
 #ifdef OMAP_HSMMC3_BASE
case 2:
priv_data-base_addr = (struct hsmmc *)OMAP_HSMMC3_BASE;
-#if defined(CONFIG_DRA7XX)  defined(CONFIG_HSMMC3_8BIT)
+#if (defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX))  
defined(CONFIG_HSMMC3_8BIT)
/* Enable 8-bit interface for eMMC on DRA7XX */
host_caps_val |= MMC_MODE_8BIT;
 #endif
diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c
index cfbc9dc..6430fe0 100644
--- a/drivers/power/palmas.c
+++ b/drivers/power/palmas.c
@@ -27,7 +27,7 @@ int palmas_mmc1_poweron_ldo(void)
 {
u8 val = 0;
 
-#if defined(CONFIG_DRA7XX)
+#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
/*
 * Currently valid for the dra7xx_evm board:
 * Set TPS659038 LDO1 to 3.0 V
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index fd7fea8..857b604 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -102,7 +102,7 @@ static void ti_spi_setup_spi_register(struct ti_qspi_slave 
*qslave)
struct spi_slave *slave = qslave-slave;
u32 memval = 0;
 
-#ifdef CONFIG_DRA7XX
+#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
slave-memory_map = (void *)MMAP_START_ADDR_DRA;
 #else
slave-memory_map = (void *)MMAP_START_ADDR_AM43x;
@@ -244,7 +244,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, 
const void *dout,
uint status;
int timeout;
 
-#ifdef CONFIG_DRA7XX
+#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)
int val;
 #endif
 
@@ -254,7 +254,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, 
const void *dout,
/* Setup mmap flags */
if (flags  SPI_XFER_MMAP) {
 

[U-Boot] [PATCH 09/11] arm: omap_common: expose tps659038 and dra7xx_dplls

2014-11-06 Thread Felipe Balbi
expose those two definitions so they can be
used by another board which we're adding in upcoming
patches.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/include/asm/omap_common.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/omap_common.h 
b/arch/arm/include/asm/omap_common.h
index 1838234..323952f 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -540,6 +540,7 @@ extern struct prcm_regs const omap5_es2_prcm;
 extern struct prcm_regs const omap4_prcm;
 extern struct prcm_regs const dra7xx_prcm;
 extern struct dplls const **dplls_data;
+extern struct dplls dra7xx_dplls;
 extern struct vcores_data const **omap_vcores;
 extern const u32 sys_clk_array[8];
 extern struct omap_sys_ctrl_regs const **ctrl;
@@ -547,6 +548,8 @@ extern struct omap_sys_ctrl_regs const omap4_ctrl;
 extern struct omap_sys_ctrl_regs const omap5_ctrl;
 extern struct omap_sys_ctrl_regs const dra7xx_ctrl;
 
+extern struct pmic_data tps659038;
+
 void hw_data_init(void);
 
 const struct dpll_params *get_mpu_dpll_params(struct dplls const *);
-- 
2.1.0.GIT

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/11] beagle_x15: add board support for Beagle x15

2014-11-06 Thread menon.nisha...@gmail.com
On Thu, Nov 6, 2014 at 8:28 AM, Felipe Balbi ba...@ti.com wrote:
 This is the bare minimum support for Beagle x15
 into u-boot. There is still quite some work in
 order to get this in good shape, but it's a
 start.


Sorry, I should have commented earlier :)

we could expand this a little more here?
How about:
BeagleBoard-X15 is the next generation Open Source Hardware
BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ A15
processor. The platform features 2GB DDR3L (w/dual 32bit busses),
eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60), separate LCD
port, video In port, 4GB eMMC, uSD, Analog audio in/out, dual 1G
Ethernet.

For more information, refer to:
http://www.elinux.org/Beagleboard:BeagleBoard-X15

ofcourse - the wiki is yet to be built up..

 Signed-off-by: Felipe Balbi ba...@ti.com
 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  arch/arm/cpu/armv7/omap5/Kconfig  |   4 +
  board/ti/beagle_x15/Kconfig   |  12 ++
  board/ti/beagle_x15/Makefile  |   8 +
  board/ti/beagle_x15/board.c   | 328 
 ++
  board/ti/beagle_x15/mux_data.h|  55 +++
  configs/beagle_x15_defconfig  |   5 +
  include/configs/beagle_x15.h  |  89 +++
  include/configs/ti_omap5_common.h |   2 +
  8 files changed, 503 insertions(+)
  create mode 100644 board/ti/beagle_x15/Kconfig
  create mode 100644 board/ti/beagle_x15/Makefile
  create mode 100644 board/ti/beagle_x15/board.c
  create mode 100644 board/ti/beagle_x15/mux_data.h
  create mode 100644 configs/beagle_x15_defconfig
  create mode 100644 include/configs/beagle_x15.h

 diff --git a/arch/arm/cpu/armv7/omap5/Kconfig 
 b/arch/arm/cpu/armv7/omap5/Kconfig
 index 129982c..aca862d 100644
 --- a/arch/arm/cpu/armv7/omap5/Kconfig
 +++ b/arch/arm/cpu/armv7/omap5/Kconfig
 @@ -12,6 +12,9 @@ config TARGET_OMAP5_UEVM
  config TARGET_DRA7XX_EVM
 bool TI DRA7XX

 +config TARGET_BEAGLE_X15
 +   bool BeagleBoard X15
 +
  endchoice

  config SYS_SOC
 @@ -20,5 +23,6 @@ config SYS_SOC
  source board/compulab/cm_t54/Kconfig
  source board/ti/omap5_uevm/Kconfig
  source board/ti/dra7xx/Kconfig
 +source board/ti/beagle_x15/Kconfig

  endif
 diff --git a/board/ti/beagle_x15/Kconfig b/board/ti/beagle_x15/Kconfig
 new file mode 100644
 index 000..a305ff1
 --- /dev/null
 +++ b/board/ti/beagle_x15/Kconfig
 @@ -0,0 +1,12 @@
 +if TARGET_BEAGLE_X15
 +
 +config SYS_BOARD
 +   default beagle_x15
 +
 +config SYS_VENDOR
 +   default ti
 +
 +config SYS_CONFIG_NAME
 +   default beagle_x15
 +
 +endif
 diff --git a/board/ti/beagle_x15/Makefile b/board/ti/beagle_x15/Makefile
 new file mode 100644
 index 000..5cd6873
 --- /dev/null
 +++ b/board/ti/beagle_x15/Makefile
 @@ -0,0 +1,8 @@
 +#
 +# (C) Copyright 2014
 +# Texas Instruments, www.ti.com
 +#
 +# SPDX-License-Identifier: GPL-2.0+
 +#
 +
 +obj-y  := board.o
 diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c
 new file mode 100644
 index 000..5cafc87
 --- /dev/null
 +++ b/board/ti/beagle_x15/board.c
 @@ -0,0 +1,328 @@
 +/*
 + * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
 + *
 + * Author: Felipe Balbi ba...@ti.com
 + *
 + * Based on board/ti/dra7xx/evm.c
 + *
 + * SPDX-License-Identifier:GPL-2.0+
 + */
 +
 +#include common.h
 +#include palmas.h
 +#include sata.h
 +#include usb.h
 +#include asm/omap_common.h
 +#include asm/emif.h
 +#include asm/arch/clock.h
 +#include asm/arch/sys_proto.h
 +#include asm/arch/mmc_host_def.h
 +#include asm/arch/sata.h
 +#include asm/arch/gpio.h
 +#include environment.h
 +
 +#include mux_data.h
 +
 +#ifdef CONFIG_DRIVER_TI_CPSW
 +#include cpsw.h
 +#endif
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +const struct omap_sysinfo sysinfo = {
 +   Board: BeagleBoard x15\n
 +};
 +
 +static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
 +   .dmm_lisa_map_3 = 0x80740300,
 +   .is_ma_present  = 0x1
 +};
 +
 +void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
 +{
 +   *dmm_lisa_regs = beagle_x15_lisa_regs;
 +}
 +
 +static const struct emif_regs beagle_x15_ddr3_532mhz_emif_regs = {
 +   .sdram_config_init  = 0x61851B32, /* dont know what to do about 
 this */
 +   .sdram_config   = 0x61851B32,
 +   .sdram_config2  = 0x,
 +   .ref_ctrl   = 0x1035,
 +   .sdram_tim1 = 0xCEEF266B,
 +   .sdram_tim2 = 0x328F7FDA,
 +   .sdram_tim3 = 0x027F88A8,
 +   .read_idle_ctrl = 0x00050001, /* not sure where in gel file */
 +   .zq_config  = 0x0007190B,
 +   .temp_alert_config  = 0x,
 +   .emif_ddr_phy_ctlr_1_init = 0x0E24400A, /* not sure what to do about 
 this */
 +   .emif_ddr_phy_ctlr_1= 0x0E24400A, /* based on non hw level 
 enabled */
 +   .emif_ddr_ext_phy_ctrl_1 = 0x10040100, /* not sure wherein gel file */
 +   .emif_ddr_ext_phy_ctrl_2 = 0x00740074,

[U-Boot] [PATCH 2/2] mx6sabresd: Staticize when possible

2014-11-06 Thread Fabio Estevam
Annotate 'static' when appropriate for the variables used locally.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx6sabresd/mx6sabresd.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index e221981..8e2bc25 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -60,12 +60,12 @@ int dram_init(void)
return 0;
 }
 
-iomux_v3_cfg_t const uart1_pads[] = {
+static iomux_v3_cfg_t const uart1_pads[] = {
MX6_PAD_CSI0_DAT10__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
MX6_PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
-iomux_v3_cfg_t const enet_pads[] = {
+static iomux_v3_cfg_t const enet_pads[] = {
MX6_PAD_ENET_MDIO__ENET_MDIO| MUX_PAD_CTRL(ENET_PAD_CTRL),
MX6_PAD_ENET_MDC__ENET_MDC  | MUX_PAD_CTRL(ENET_PAD_CTRL),
MX6_PAD_RGMII_TXC__RGMII_TXC| MUX_PAD_CTRL(ENET_PAD_CTRL),
@@ -95,7 +95,7 @@ static void setup_iomux_enet(void)
gpio_set_value(IMX_GPIO_NR(1, 25), 1);
 }
 
-iomux_v3_cfg_t const usdhc2_pads[] = {
+static iomux_v3_cfg_t const usdhc2_pads[] = {
MX6_PAD_SD2_CLK__SD2_CLK| MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD2_CMD__SD2_CMD| MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -109,7 +109,7 @@ iomux_v3_cfg_t const usdhc2_pads[] = {
MX6_PAD_NANDF_D2__GPIO2_IO02| MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */
 };
 
-iomux_v3_cfg_t const usdhc3_pads[] = {
+static iomux_v3_cfg_t const usdhc3_pads[] = {
MX6_PAD_SD3_CLK__SD3_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD3_CMD__SD3_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -123,7 +123,7 @@ iomux_v3_cfg_t const usdhc3_pads[] = {
MX6_PAD_NANDF_D0__GPIO2_IO00| MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */
 };
 
-iomux_v3_cfg_t const usdhc4_pads[] = {
+static iomux_v3_cfg_t const usdhc4_pads[] = {
MX6_PAD_SD4_CLK__SD4_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD4_CMD__SD4_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -136,7 +136,7 @@ iomux_v3_cfg_t const usdhc4_pads[] = {
MX6_PAD_SD4_DAT7__SD4_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
 };
 
-iomux_v3_cfg_t const ecspi1_pads[] = {
+static iomux_v3_cfg_t const ecspi1_pads[] = {
MX6_PAD_KEY_COL0__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),
MX6_PAD_KEY_COL1__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),
MX6_PAD_KEY_ROW0__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/11] beagle_x15: add board support for Beagle x15

2014-11-06 Thread Felipe Balbi
On Thu, Nov 06, 2014 at 08:35:41AM -0600, menon.nisha...@gmail.com wrote:
 On Thu, Nov 6, 2014 at 8:28 AM, Felipe Balbi ba...@ti.com wrote:
  This is the bare minimum support for Beagle x15
  into u-boot. There is still quite some work in
  order to get this in good shape, but it's a
  start.
 
 
 Sorry, I should have commented earlier :)
 
 we could expand this a little more here?
 How about:
 BeagleBoard-X15 is the next generation Open Source Hardware
 BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ A15
 processor. The platform features 2GB DDR3L (w/dual 32bit busses),
 eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60), separate LCD
 port, video In port, 4GB eMMC, uSD, Analog audio in/out, dual 1G
 Ethernet.
 
 For more information, refer to:
 http://www.elinux.org/Beagleboard:BeagleBoard-X15
 
 ofcourse - the wiki is yet to be built up..

will do, it has been a while since this stopped being bare minimum
anyway. It's actually pretty complete from u-boot's point of view.

-- 
balbi


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 11/11] beagle_x15: add board support for Beagle x15

2014-11-06 Thread Felipe Balbi
BeagleBoard-X15 is the next generation Open Source
Hardware BeagleBoard based on TI's AM5728 SoC
featuring dual core 1.5GHZ A15 processor. The
platform features 2GB DDR3L (w/dual 32bit busses),
eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60),
separate LCD port, video In port, 4GB eMMC, uSD,
Analog audio in/out, dual 1G Ethernet.

For more information, refer to:
http://www.elinux.org/Beagleboard:BeagleBoard-X15

Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Nishanth Menon n...@ti.com
---

changes since v1:
new commit log

 arch/arm/cpu/armv7/omap5/Kconfig  |   4 +
 board/ti/beagle_x15/Kconfig   |  12 ++
 board/ti/beagle_x15/Makefile  |   8 +
 board/ti/beagle_x15/board.c   | 328 ++
 board/ti/beagle_x15/mux_data.h|  55 +++
 configs/beagle_x15_defconfig  |   5 +
 include/configs/beagle_x15.h  |  89 +++
 include/configs/ti_omap5_common.h |   2 +
 8 files changed, 503 insertions(+)
 create mode 100644 board/ti/beagle_x15/Kconfig
 create mode 100644 board/ti/beagle_x15/Makefile
 create mode 100644 board/ti/beagle_x15/board.c
 create mode 100644 board/ti/beagle_x15/mux_data.h
 create mode 100644 configs/beagle_x15_defconfig
 create mode 100644 include/configs/beagle_x15.h

diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index 129982c..aca862d 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -12,6 +12,9 @@ config TARGET_OMAP5_UEVM
 config TARGET_DRA7XX_EVM
bool TI DRA7XX
 
+config TARGET_BEAGLE_X15
+   bool BeagleBoard X15
+
 endchoice
 
 config SYS_SOC
@@ -20,5 +23,6 @@ config SYS_SOC
 source board/compulab/cm_t54/Kconfig
 source board/ti/omap5_uevm/Kconfig
 source board/ti/dra7xx/Kconfig
+source board/ti/beagle_x15/Kconfig
 
 endif
diff --git a/board/ti/beagle_x15/Kconfig b/board/ti/beagle_x15/Kconfig
new file mode 100644
index 000..a305ff1
--- /dev/null
+++ b/board/ti/beagle_x15/Kconfig
@@ -0,0 +1,12 @@
+if TARGET_BEAGLE_X15
+
+config SYS_BOARD
+   default beagle_x15
+
+config SYS_VENDOR
+   default ti
+
+config SYS_CONFIG_NAME
+   default beagle_x15
+
+endif
diff --git a/board/ti/beagle_x15/Makefile b/board/ti/beagle_x15/Makefile
new file mode 100644
index 000..5cd6873
--- /dev/null
+++ b/board/ti/beagle_x15/Makefile
@@ -0,0 +1,8 @@
+#
+# (C) Copyright 2014
+# Texas Instruments, www.ti.com
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y  := board.o
diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c
new file mode 100644
index 000..5cafc87
--- /dev/null
+++ b/board/ti/beagle_x15/board.c
@@ -0,0 +1,328 @@
+/*
+ * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * Author: Felipe Balbi ba...@ti.com
+ *
+ * Based on board/ti/dra7xx/evm.c
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+#include palmas.h
+#include sata.h
+#include usb.h
+#include asm/omap_common.h
+#include asm/emif.h
+#include asm/arch/clock.h
+#include asm/arch/sys_proto.h
+#include asm/arch/mmc_host_def.h
+#include asm/arch/sata.h
+#include asm/arch/gpio.h
+#include environment.h
+
+#include mux_data.h
+
+#ifdef CONFIG_DRIVER_TI_CPSW
+#include cpsw.h
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+const struct omap_sysinfo sysinfo = {
+   Board: BeagleBoard x15\n
+};
+
+static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
+   .dmm_lisa_map_3 = 0x80740300,
+   .is_ma_present  = 0x1
+};
+
+void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
+{
+   *dmm_lisa_regs = beagle_x15_lisa_regs;
+}
+
+static const struct emif_regs beagle_x15_ddr3_532mhz_emif_regs = {
+   .sdram_config_init  = 0x61851B32, /* dont know what to do about 
this */
+   .sdram_config   = 0x61851B32,
+   .sdram_config2  = 0x,
+   .ref_ctrl   = 0x1035,
+   .sdram_tim1 = 0xCEEF266B,
+   .sdram_tim2 = 0x328F7FDA,
+   .sdram_tim3 = 0x027F88A8,
+   .read_idle_ctrl = 0x00050001, /* not sure where in gel file */
+   .zq_config  = 0x0007190B,
+   .temp_alert_config  = 0x,
+   .emif_ddr_phy_ctlr_1_init = 0x0E24400A, /* not sure what to do about 
this */
+   .emif_ddr_phy_ctlr_1= 0x0E24400A, /* based on non hw level enabled 
*/
+   .emif_ddr_ext_phy_ctrl_1 = 0x10040100, /* not sure wherein gel file */
+   .emif_ddr_ext_phy_ctrl_2 = 0x00740074,
+   .emif_ddr_ext_phy_ctrl_3 = 0x00780078,
+   .emif_ddr_ext_phy_ctrl_4 = 0x007c007c,
+   .emif_ddr_ext_phy_ctrl_5 = 0x007b007b,
+   .emif_rd_wr_lvl_rmp_win = 0x,
+   .emif_rd_wr_lvl_rmp_ctl = 0x, /* based on non hw level enabled 
*/
+   .emif_rd_wr_lvl_ctl = 0x, /* not sure where based in gel 
file */
+   .emif_rd_wr_exec_thresh = 0x0305
+};
+
+void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
+{
+ 

Re: [U-Boot] [PATCH v2 11/11] beagle_x15: add board support for Beagle x15

2014-11-06 Thread menon.nisha...@gmail.com
On Thu, Nov 6, 2014 at 8:44 AM, Felipe Balbi ba...@ti.com wrote:
 BeagleBoard-X15 is the next generation Open Source
 Hardware BeagleBoard based on TI's AM5728 SoC
 featuring dual core 1.5GHZ A15 processor. The
 platform features 2GB DDR3L (w/dual 32bit busses),
 eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60),
 separate LCD port, video In port, 4GB eMMC, uSD,
 Analog audio in/out, dual 1G Ethernet.

 For more information, refer to:
 http://www.elinux.org/Beagleboard:BeagleBoard-X15

 Signed-off-by: Felipe Balbi ba...@ti.com
 Signed-off-by: Nishanth Menon n...@ti.com
 ---


awesome - looks good to me. Thanks for doing this.

 changes since v1:
 new commit log

  arch/arm/cpu/armv7/omap5/Kconfig  |   4 +
  board/ti/beagle_x15/Kconfig   |  12 ++
  board/ti/beagle_x15/Makefile  |   8 +
  board/ti/beagle_x15/board.c   | 328 
 ++
  board/ti/beagle_x15/mux_data.h|  55 +++
  configs/beagle_x15_defconfig  |   5 +
  include/configs/beagle_x15.h  |  89 +++
  include/configs/ti_omap5_common.h |   2 +
  8 files changed, 503 insertions(+)
  create mode 100644 board/ti/beagle_x15/Kconfig
  create mode 100644 board/ti/beagle_x15/Makefile
  create mode 100644 board/ti/beagle_x15/board.c
  create mode 100644 board/ti/beagle_x15/mux_data.h
  create mode 100644 configs/beagle_x15_defconfig
  create mode 100644 include/configs/beagle_x15.h

 diff --git a/arch/arm/cpu/armv7/omap5/Kconfig 
 b/arch/arm/cpu/armv7/omap5/Kconfig
 index 129982c..aca862d 100644
 --- a/arch/arm/cpu/armv7/omap5/Kconfig
 +++ b/arch/arm/cpu/armv7/omap5/Kconfig
 @@ -12,6 +12,9 @@ config TARGET_OMAP5_UEVM
  config TARGET_DRA7XX_EVM
 bool TI DRA7XX

 +config TARGET_BEAGLE_X15
 +   bool BeagleBoard X15
 +
  endchoice

  config SYS_SOC
 @@ -20,5 +23,6 @@ config SYS_SOC
  source board/compulab/cm_t54/Kconfig
  source board/ti/omap5_uevm/Kconfig
  source board/ti/dra7xx/Kconfig
 +source board/ti/beagle_x15/Kconfig

  endif
 diff --git a/board/ti/beagle_x15/Kconfig b/board/ti/beagle_x15/Kconfig
 new file mode 100644
 index 000..a305ff1
 --- /dev/null
 +++ b/board/ti/beagle_x15/Kconfig
 @@ -0,0 +1,12 @@
 +if TARGET_BEAGLE_X15
 +
 +config SYS_BOARD
 +   default beagle_x15
 +
 +config SYS_VENDOR
 +   default ti
 +
 +config SYS_CONFIG_NAME
 +   default beagle_x15
 +
 +endif
 diff --git a/board/ti/beagle_x15/Makefile b/board/ti/beagle_x15/Makefile
 new file mode 100644
 index 000..5cd6873
 --- /dev/null
 +++ b/board/ti/beagle_x15/Makefile
 @@ -0,0 +1,8 @@
 +#
 +# (C) Copyright 2014
 +# Texas Instruments, www.ti.com
 +#
 +# SPDX-License-Identifier: GPL-2.0+
 +#
 +
 +obj-y  := board.o
 diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c
 new file mode 100644
 index 000..5cafc87
 --- /dev/null
 +++ b/board/ti/beagle_x15/board.c
 @@ -0,0 +1,328 @@
 +/*
 + * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
 + *
 + * Author: Felipe Balbi ba...@ti.com
 + *
 + * Based on board/ti/dra7xx/evm.c
 + *
 + * SPDX-License-Identifier:GPL-2.0+
 + */
 +
 +#include common.h
 +#include palmas.h
 +#include sata.h
 +#include usb.h
 +#include asm/omap_common.h
 +#include asm/emif.h
 +#include asm/arch/clock.h
 +#include asm/arch/sys_proto.h
 +#include asm/arch/mmc_host_def.h
 +#include asm/arch/sata.h
 +#include asm/arch/gpio.h
 +#include environment.h
 +
 +#include mux_data.h
 +
 +#ifdef CONFIG_DRIVER_TI_CPSW
 +#include cpsw.h
 +#endif
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +const struct omap_sysinfo sysinfo = {
 +   Board: BeagleBoard x15\n
 +};
 +
 +static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
 +   .dmm_lisa_map_3 = 0x80740300,
 +   .is_ma_present  = 0x1
 +};
 +
 +void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
 +{
 +   *dmm_lisa_regs = beagle_x15_lisa_regs;
 +}
 +
 +static const struct emif_regs beagle_x15_ddr3_532mhz_emif_regs = {
 +   .sdram_config_init  = 0x61851B32, /* dont know what to do about 
 this */
 +   .sdram_config   = 0x61851B32,
 +   .sdram_config2  = 0x,
 +   .ref_ctrl   = 0x1035,
 +   .sdram_tim1 = 0xCEEF266B,
 +   .sdram_tim2 = 0x328F7FDA,
 +   .sdram_tim3 = 0x027F88A8,
 +   .read_idle_ctrl = 0x00050001, /* not sure where in gel file */
 +   .zq_config  = 0x0007190B,
 +   .temp_alert_config  = 0x,
 +   .emif_ddr_phy_ctlr_1_init = 0x0E24400A, /* not sure what to do about 
 this */
 +   .emif_ddr_phy_ctlr_1= 0x0E24400A, /* based on non hw level 
 enabled */
 +   .emif_ddr_ext_phy_ctrl_1 = 0x10040100, /* not sure wherein gel file */
 +   .emif_ddr_ext_phy_ctrl_2 = 0x00740074,
 +   .emif_ddr_ext_phy_ctrl_3 = 0x00780078,
 +   .emif_ddr_ext_phy_ctrl_4 = 0x007c007c,
 +   .emif_ddr_ext_phy_ctrl_5 = 0x007b007b,
 +   .emif_rd_wr_lvl_rmp_win = 0x,
 +   

[U-Boot] [PATCH 1/2] mx6sabresd: Fix error handling in board_mmc_init()

2014-11-06 Thread Fabio Estevam
When an invalid USDHC port is passed we should return -EINVAL instead of 0.

Also, return the error immediately on fsl_esdhc_initialize() failure.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx6sabresd/mx6sabresd.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 3d81fff..e221981 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -253,7 +253,7 @@ int board_mmc_getcd(struct mmc *mmc)
 
 int board_mmc_init(bd_t *bis)
 {
-   s32 status = 0;
+   int ret;
int i;
 
/*
@@ -286,13 +286,15 @@ int board_mmc_init(bd_t *bis)
printf(Warning: you configured more USDHC controllers
   (%d) then supported by the board (%d)\n,
   i + 1, CONFIG_SYS_FSL_USDHC_NUM);
-   return status;
+   return -EINVAL;
}
 
-   status |= fsl_esdhc_initialize(bis, usdhc_cfg[i]);
+   ret = fsl_esdhc_initialize(bis, usdhc_cfg[i]);
+   if (ret)
+   return ret;
}
 
-   return status;
+   return 0;
 }
 #endif
 
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [drivers/mtd/ubi/eba.c:1275]: (error) Uninitialized variable: aeb

2014-11-06 Thread Wolfgang Denk
Dear Heiko,

In message 545b81d9.6070...@denx.de you wrote:
 
  [drivers/mtd/ubi/eba.c:1275]: (error) Uninitialized variable: aeb
 
  can you please have a look?  Thanks!
 
 I see in drivers/mtd/ubi/eba.c:
 
 1267:ubi_rb_for_each_entry(rb, aeb, av-root, u.rb)
 1268:scan_eba[i][aeb-lnum] = aeb-pnum;
 1269:
 1270:av = ubi_find_av(ai_fastmap, idx2vol_id(ubi, i));
 1271:if (!av)
 1272:   continue;
 1273:
 1274:ubi_rb_for_each_entry(rb, aeb, av-root, u.rb)
 1275:fm_eba[i][aeb-lnum] = aeb-pnum;
 
 Why does cppcheck only report line 1275 not also line 1268 and also
 1351? I could not currently see, why this pops up for line 1274 ...

we should also look at the ubi_rb_for_each_entry() macro:

 912 #define ubi_rb_for_each_entry(rb, pos, root, member)   
  \
 913 for (rb = rb_first(root),  
  \
 914  pos = (rb ? container_of(rb, typeof(*pos), member) : NULL);   
  \
 915  rb;   
  \
 916  rb = rb_next(rb), 
  \
 917  pos = (rb ? container_of(rb, typeof(*pos), member) : NULL))

We can see there, that this will always set pos, i. e. the 2nd
argument, to a well-defined value.

Looks like a false positive to me, then.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Where would we be without rhetorical questions?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?

2014-11-06 Thread harsha kiran
Hi !

For our project, we are trying to build the Bootloader with a Software
partnumber. and i want it to be displayed on the first U-boot print..


U-Boot 2014.07 (Nov 05 2014 - 16:27:50) PN#12345678-001

I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

I was able to do this by adding the following in the boards.cfg file..

Active  arm armv7  am33xx  ti 
am335x_abb_ubootam335x_abb_uboot_npa_dev
am335x_abb_uboot:SERIAL4,CONS_INDEX=4,NPA_DEV,IDENT_STRING=PN#12345678-001 

But i want to pass the IDENT_STRING from the command line to build the
u-boot..the command i use is 

sudo make ARCH=arm
CROSS_COMPILE=/abb/compilers/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-
-j8 -s am335x_abb_uboot_npa_dev_config

is there a way i can pass this argument while building the u-boot? 

Thanks,
Harsha






--
View this message in context: 
http://u-boot.10912.n7.nabble.com/Can-i-pass-pass-an-environmental-variable-or-argument-from-command-line-to-build-u-boot-tp194962.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?

2014-11-06 Thread Tom Rini
On Thu, Nov 06, 2014 at 08:30:35AM -0700, harsha kiran wrote:

 Hi !
 
 For our project, we are trying to build the Bootloader with a Software
 partnumber. and i want it to be displayed on the first U-boot print..

Upgrade to current mainline and you can use CONFIG_LOCALVERSION for what
you want.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, U-boot, v2] net: phy: marvell: add errata w/a for 88E151* chips

2014-11-06 Thread Tom Rini
On Thu, Oct 30, 2014 at 06:59:43PM +0200, Ivan Khoronzhuk wrote:

 From: Hao Zhang hzh...@ti.com
 
 As per Marvell Release Notes - Alaska 88E1510/88E1518/88E1512/88E1514
 Rev A0, Errata Section 3.1 Marvell PHY has an errata which requires
 that certain registers get written in order to restart
 autonegotiation.
 
 Signed-off-by: Hao Zhang hzh...@ti.com
 Signed-off-by: Ivan Khoronzhuk ivan.khoronz...@ti.com
 Reviewed-by: Stefan Roese s...@denx.de

Applied to u-boot-ti/master, thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, U-boot] net: phy: marvell: add errata w/a for 88E151* chips

2014-11-06 Thread Tom Rini
On Wed, Nov 05, 2014 at 04:30:33PM -0500, Tom Rini wrote:
 On Wed, Oct 29, 2014 at 08:38:23PM +0200, Khoronzhuk, Ivan wrote:
 
  From: Hao Zhang hzh...@ti.com
  
  As per Marvell Release Notes - Alaska 88E1510/88E1518/88E1512/88E1514
  Rev A0, Errata Section 3.1 Marvell PHY has an errata which requires
  that certain registers get written in order to restart
  autonegotiation.
  
  Signed-off-by: Hao Zhang hzh...@ti.com
  Signed-off-by: Ivan Khoronzhuk ivan.khoronz...@ti.com
 
 Applied to u-boot-ti/master, thanks!

... Ivan pointed out there's a v2, dropping this one and getting the
right one.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [common/cmd_ini.c:137]: (error) Uninitialized variable: line

2014-11-06 Thread Tom Rini
On Thu, Nov 06, 2014 at 01:32:59PM +0100, Wolfgang Denk wrote:

 Hello,
 
 cppcheck reports:
 
 [common/cmd_ini.c:137]: (error) Uninitialized variable: line
 
 can you please have a look?  Thanks!

trini@bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --version
Cppcheck 1.52
trini@bill-the-cat:~/work/u-boot/u-boot-ti (master)$ cppcheck --force
--inline-suppr common/cmd_ini.c 
Checking common/cmd_ini.c...
Checking common/cmd_ini.c: CONFIG_INI_ALLOW_MULTILINE...
Checking common/cmd_ini.c: CONFIG_INI_CASE_INSENSITIVE...
Checking common/cmd_ini.c: CONFIG_INI_MAX_LINE...
Checking common/cmd_ini.c: CONFIG_INI_MAX_NAME...
Checking common/cmd_ini.c: CONFIG_INI_MAX_SECTION...

And I don't see anything.  I did this since manually inspecting things
and the code looks correct here but I could see cppcheck failing to
figure it out (and I could see the code being optimized, we pass line as
a pointer but then also return that back..).

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL (Secondary Program Loader) on iMX6SL

2014-11-06 Thread John Tobias
Hi Fabio,

Thanks for the info. I will try to send some patch or file for iMX6
SabreSD and for iMX6SL-evk later today.

Regards,

john

On Thu, Nov 6, 2014 at 4:43 AM, Fabio Estevam feste...@gmail.com wrote:
 Hi John,

 On Thu, Nov 6, 2014 at 12:54 AM, John Tobias john.tobias...@gmail.com wrote:
 Hi Fabio,

 The SPL support that I have done for sabresd is not %100 done. I just
 did that for the testing and to see if I could load the SPL image.

 Btw, I saw in freescale repository that they have the plugin feature.
 I enabled it but it didn't work. When I load the image, it jump to
 0x00907000.

 Do you know how does it work?.

 You should not focus on the plugin feature. It was posted a few days
 ago and the general agreement is that spl should be used instead.

 For spl example on mx6, you can look at gw_ventana, cm_fx6 and novena
 boards as references.

 Regards,

 Fabio Estevam
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [net/eth.c:64]: (error) Uninitialized variable: skip_state

2014-11-06 Thread Tom Rini
On Thu, Nov 06, 2014 at 01:37:23PM +0100, Wolfgang Denk wrote:

 Hello,
 
 cppcheck reports:
 
 [net/eth.c:64]: (error) Uninitialized variable: skip_state
 
 can you please have a look?  Thanks!

Dense code, like cmd_ini.c my cppcheck is OK and looking at the code
manually I think it's fine too:
return ((skip_state = getenv(enetvar)) != NULL);

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?

2014-11-06 Thread harsha kiran
Thanks Rini,

We have freeze the code base of bootloader for 2014-07 main line.

What can be another alternate approach? i was looking at the make file and i
see that they take everything before _config and is sorted to find all the
right pieces from boards.cfg file

%_config:: outputmakefile
@$(MKCONFIG) -A $(@:_config=)

i was thinking to add something which can parse the Partnumber after the
_config..i am not sure if its a good approach..

Thanks,
Harsha



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/Can-i-pass-pass-an-environmental-variable-or-argument-from-command-line-to-build-u-boot-tp194962p194969.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] test: ums: Add sleep before unmount directory

2014-11-06 Thread Stephen Warren

On 11/06/2014 03:23 AM, Lukasz Majewski wrote:

This change helps to run script on machines with quite long uptime.
Without this the following error emerges:

File: ./dat_14M.img
umount: /mnt/tmp-ums-test: device is busy.
 (In some cases useful info about processes that use
  the device is found by lsof(8) or fuser(1))
TX: md5sum:083d3d22b542d3ecba61b12d17e03f9f
mount: /dev/sdd6 already mounted or /mnt/tmp-ums-test busy
mount: according to mtab, /dev/sdd6 is already mounted on /mnt/tmp-ums-test



diff --git a/test/ums/ums_gadget_test.sh b/test/ums/ums_gadget_test.sh



  cp ./$1 $MNT_DIR
+sleep 2
  umount $MNT_DIR


I don't think there's any guarantee the 2 is the exact correct amount 
of time to sleep; I presume you derived the value by trying some values 
until you found one that works, and so the actual value required may 
vary from system to system. How about something like the following, 
which I use in a script that copies a new kernel to an SD card, where I 
experienced a similar issue:


while true; do
sudo umount /mnt/C-ROOT/
if [ $? -eq 0 ]; then
break
fi
echo sleeping to wait for umount...
sleep 1
done
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?

2014-11-06 Thread Masahiro YAMADA
Hi harsha,



2014-11-07 1:43 GMT+09:00 harsha kiran kj.h.ki...@us.abb.com:
 Thanks Rini,

 We have freeze the code base of bootloader for 2014-07 main line.

 What can be another alternate approach? i was looking at the make file and i
 see that they take everything before _config and is sorted to find all the
 right pieces from boards.cfg file

 %_config:: outputmakefile
 @$(MKCONFIG) -A $(@:_config=)

 i was thinking to add something which can parse the Partnumber after the
 _config..i am not sure if its a good approach..



Why don't you save your favorite version string into a file localversion?
This feature is available in v2014.07.



masahiro@oscar:~/workspace/u-boot$ git describe
v2014.07
masahiro@oscar:~/workspace/u-boot$ echo PN#1234567  localversion 
 make sandbox_config all
Configuring for sandbox board...
  GEN include/autoconf.mk.dep
  GEN include/autoconf.mk
  CHK include/config/uboot.release
  UPD include/config/uboot.release
  CHK include/generated/version_autogenerated.h
  UPD include/generated/version_autogenerated.h
  CHK include/generated/timestamp_autogenerated.h
  UPD include/generated/timestamp_autogenerated.h
  CC  lib/asm-offsets.s
  GEN include/generated/generic-asm-offsets.h
[ snip ]
  CC  test/dm/ut.o
  CC  test/dm/core.o
  CC  test/dm/gpio.o
  LD  test/dm/built-in.o
  LD  u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot.bin
masahiro@oscar:~/workspace/u-boot$ ./u-boot


U-Boot 2014.07PN#1234567 (Nov 07 2014 - 02:19:30)

DRAM:  128 MiB
Using default environment

In:serial
Out:   lcd
Err:   lcd
=




-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Can i pass pass an environmental variable or argument from command line to build u-boot?

2014-11-06 Thread harsha kiran
Thank you guys.

This is exactly what i wanted.

Thanks,
Harsha



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/Can-i-pass-pass-an-environmental-variable-or-argument-from-command-line-to-build-u-boot-tp194962p194972.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] CONFIG_LCD_BMP_RLE8 and MCC200 dead code?

2014-11-06 Thread Nikita Kiryanov

Hi Wolfgang,

On 11/06/2014 02:50 PM, Wolfgang Denk wrote:

Dear Nikita,

In message 545b6844.2060...@compulab.co.il you wrote:


I've been trying to do some cleanup in common/lcd.c, and noticed some
unused code:


Thanks!


The other case is MCC200 specific #ifdefs. It handles 1bpp BMPs, which
I don't think is likely to be used by current and future boards, and
the board itself is old, and has no maintainer. Perhaps this board
can be removed?


I agree.  We should remove the MCC200 and PRS200 boards.

Can you submit such a patch, please?  TIA...


Sure. I'll prepare one tomorrow..



Best regards,

Wolfgang Denk



--
Regards,
Nikita Kiryanov
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   3   >