Re: [U-Boot] [PATCH v3 3/4] net: phy: Force master mode A20-OLinuXino-Lime2

2016-03-25 Thread Iain Paton
On 24/03/16 06:46, Michael Haas wrote:
> Force master mode on the A20-OLinuXino-Lime2. This change is required
> to get a reliable link at gigabit speeds.
> 
> Signed-off-by: Michael Haas <h...@computerlinguist.org>

Acked-by: Iain Paton <ipat...@gmail.com>

Glad to see someone finally got to the bottom of this. On the boards I have 
I only see the problem intermittantly, perhaps 2% of boots so virtually 
impossible to know if anything fixed it. 

Is something needed in the kernel as well, or is it sufficient to do it in 
u-boot?

Iain

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


Re: [U-Boot] [PATCH v2 1/3] sunxi: sun4i: improve cpu clock selection method

2015-03-30 Thread Iain Paton
On 29/03/15 13:39, Hans de Goede wrote:
 Hi,
 
 On 28-03-15 11:25, Iain Paton wrote:
 clock_set_pll1 would pick the next highest available cpu clock speed if
 a value not in the pre defined table was selected. this potentially
 results in overclocking the soc.

 reverse the selection method so that we select the next lowest speed
 and add the missing 912Mhz setting that's requested by sun7i which also
 uses the sun4i clock code.

 Signed-off-by: Iain Paton ipat...@gmail.com
 
 Thanks for the new set.
 
 I've found one small issue with the second patch:
 sunxi: use CONFIG_SYS_CLK_FREQ to set cpu clock
 
 sun7i.h contained the following:
 
 #define CONFIG_SYS_CLK_FREQ2400
 #define CONFIG_TIMER_CLK_FREQCONFIG_SYS_CLK_FREQ
 
 Which is a conflicting usage of CONFIG_SYS_CLK_FREQ compared to the new
 usage introduced by your patch. I've fixed this by changing the above
 to:
 
 #define CONFIG_TIMER_CLK_FREQ2400
 
 And run some compile and runtime tests.
 
 Everything builds and works fine with this change added, so I've pushed
 these 3 commits + one other fix to: u-boot-sunxi/master

Apologies for missing that. Thanks for the fixup.

Did you see any compile or runtime errors?

I definately did build and boot the result several times before sending it, 
especially to verify the behaviour of the first patch.

So I'm curious as to how I missed it and you found the issue.

Rgds,
Iain

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


Re: [U-Boot] [PATCH 1/3] sunxi: sun4i: add missing 912MHz clock divisors

2015-03-28 Thread Iain Paton
On 27/03/15 14:04, Ian Campbell wrote:
 On Fri, 2015-03-27 at 00:10 +, Iain Paton wrote:
 clock divisors table was missing an entry for 912MHz. The same table is
 used for sun7i where the default boot clock is 912MHz, resulting in A20
 boards being overclocked to 960MHz
 
 Apart from the missing entry, should it not be the case that we pick the
 highest frequency = than the requested frequency, rather than the next
 available (potentially higher) frequency?
 
 IOW I'd expect things to be underclocked at 768MHz without this change,
 which would mean that clock_set_pll1 is buggy.

Perhaps, however the selection algorithm is so trivial that I have 
difficulty beleiving that picking next highest was anything other than 
deliberate and the intended outcome.

I'll send a revised version that changes it to next lowest.

Rgds,
Iain


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


Re: [U-Boot] [PATCH 2/3] sunxi: promote CONFIG_CLK_FULL_SPEED to be selectable through Kconfig

2015-03-28 Thread Iain Paton
On 27/03/15 13:57, Hans de Goede wrote:
 Hi,
 
 On 27-03-15 01:12, Iain Paton wrote:
 in order to allow for this to be set differently per board, remove the
 define from the associated soc headers and allow the user to choose a
 value through a Kconfig setting

 Signed-off-by: Iain Paton ipat...@gmail.com
 
 Thanks, but if we're going to do this, then can you please rename
 CLK_FULL_SPEED to SYS_CLK_FREQ, as that is already defined in
 
 ./Kconfig

Sure thing, I'd missed that there was already a suitable variable.
Updated version on the way.

Rgds,
Iain

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


[U-Boot] [PATCH v2 1/3] sunxi: sun4i: improve cpu clock selection method

2015-03-28 Thread Iain Paton
clock_set_pll1 would pick the next highest available cpu clock speed if
a value not in the pre defined table was selected. this potentially
results in overclocking the soc.

reverse the selection method so that we select the next lowest speed
and add the missing 912Mhz setting that's requested by sun7i which also
uses the sun4i clock code.

Signed-off-by: Iain Paton ipat...@gmail.com
---
 arch/arm/cpu/armv7/sunxi/clock_sun4i.c | 35 ++
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c 
b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
index 49f4032..c3e04af 100644
--- a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
+++ b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
@@ -100,22 +100,23 @@ static struct {
unsigned int freq;
 } pll1_para[] = {
/* This array must be ordered by frequency. */
-   { PLL1_CFG(16, 0, 0, 0), 38400 },
-   { PLL1_CFG(16, 1, 0, 0), 76800 },
-   { PLL1_CFG(20, 1, 0, 0), 96000 },
-   { PLL1_CFG(21, 1, 0, 0), 100800},
-   { PLL1_CFG(22, 1, 0, 0), 105600},
-   { PLL1_CFG(23, 1, 0, 0), 110400},
-   { PLL1_CFG(24, 1, 0, 0), 115200},
-   { PLL1_CFG(25, 1, 0, 0), 12},
-   { PLL1_CFG(26, 1, 0, 0), 124800},
-   { PLL1_CFG(27, 1, 0, 0), 129600},
-   { PLL1_CFG(28, 1, 0, 0), 134400},
-   { PLL1_CFG(29, 1, 0, 0), 139200},
-   { PLL1_CFG(30, 1, 0, 0), 144000},
{ PLL1_CFG(31, 1, 0, 0), 148800},
-   /* Final catchall entry */
-   { PLL1_CFG(31, 1, 0, 0), ~0},
+   { PLL1_CFG(30, 1, 0, 0), 144000},
+   { PLL1_CFG(29, 1, 0, 0), 139200},
+   { PLL1_CFG(28, 1, 0, 0), 134400},
+   { PLL1_CFG(27, 1, 0, 0), 129600},
+   { PLL1_CFG(26, 1, 0, 0), 124800},
+   { PLL1_CFG(25, 1, 0, 0), 12},
+   { PLL1_CFG(24, 1, 0, 0), 115200},
+   { PLL1_CFG(23, 1, 0, 0), 110400},
+   { PLL1_CFG(22, 1, 0, 0), 105600},
+   { PLL1_CFG(21, 1, 0, 0), 100800},
+   { PLL1_CFG(20, 1, 0, 0), 96000 },
+   { PLL1_CFG(19, 1, 0, 0), 91200 },
+   { PLL1_CFG(16, 1, 0, 0), 76800 },
+   /* Final catchall entry 384MHz*/
+   { PLL1_CFG(16, 0, 0, 0), 0 },
+
 };
 
 void clock_set_pll1(unsigned int hz)
@@ -126,10 +127,12 @@ void clock_set_pll1(unsigned int hz)
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
 
/* Find target frequency */
-   while (pll1_para[i].freq  hz)
+   while (pll1_para[i].freq  hz)
i++;
 
hz = pll1_para[i].freq;
+   if (! hz)
+   hz = 38400;
 
/* Calculate system clock divisors */
axi = DIV_ROUND_UP(hz, 43200);  /* Max 450MHz */
-- 
2.1.3

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


[U-Boot] [PATCH v2 2/3] sunxi: use CONFIG_SYS_CLK_FREQ to set cpu clock

2015-03-28 Thread Iain Paton
make the CPU clock selectable via Kconfig

this removes the sunxi specific CONFIG_CLK_FULL_SPEED defined in each
soc header and replaces it's use in board/sunxi/board.c with
CONFIG_SYS_CLK_FREQ from Kconfig which allows us to configure board
specific frequency on boot

Signed-off-by: Iain Paton ipat...@gmail.com
---
 Kconfig | 2 +-
 board/sunxi/Kconfig | 4 
 board/sunxi/board.c | 2 +-
 include/configs/sun4i.h | 1 -
 include/configs/sun5i.h | 1 -
 include/configs/sun6i.h | 1 -
 include/configs/sun7i.h | 1 -
 include/configs/sun8i.h | 1 -
 8 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/Kconfig b/Kconfig
index 8f96c94..a6aa7ac 100644
--- a/Kconfig
+++ b/Kconfig
@@ -184,7 +184,7 @@ config SYS_TEXT_BASE
  TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
 
 config SYS_CLK_FREQ
-   depends on ARC
+   depends on ARC || ARCH_SUNXI
int CPU clock frequency
help
  TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 9d0eb91..2fcab60 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -132,6 +132,10 @@ endchoice
 
 endif
 
+config SYS_CLK_FREQ
+   default 91200 if MACH_SUN7I
+   default 100800 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || 
MACH_SUN8I
+
 config SYS_CONFIG_NAME
default sun4i if MACH_SUN4I
default sun5i if MACH_SUN5I
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e1891d1..808bf82 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -215,7 +215,7 @@ void sunxi_board_init(void)
 * assured it's being powered with suitable core voltage
 */
if (!power_failed)
-   clock_set_pll1(CONFIG_CLK_FULL_SPEED);
+   clock_set_pll1(CONFIG_SYS_CLK_FREQ);
else
printf(Failed to set core voltage! Can't set CPU frequency\n);
 }
diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h
index 1537e53..7cd5c69 100644
--- a/include/configs/sun4i.h
+++ b/include/configs/sun4i.h
@@ -11,7 +11,6 @@
 /*
  * A10 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun5i.h b/include/configs/sun5i.h
index e755531..e0470d4 100644
--- a/include/configs/sun5i.h
+++ b/include/configs/sun5i.h
@@ -11,7 +11,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h
index f5e11dd..617c1cd 100644
--- a/include/configs/sun6i.h
+++ b/include/configs/sun6i.h
@@ -14,7 +14,6 @@
 /*
  * A31 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
index f817f73..0bb756f 100644
--- a/include/configs/sun7i.h
+++ b/include/configs/sun7i.h
@@ -12,7 +12,6 @@
 /*
  * A20 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  91200
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
index 3bdedb3..79796d7 100644
--- a/include/configs/sun8i.h
+++ b/include/configs/sun8i.h
@@ -12,7 +12,6 @@
 /*
  * A23 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
-- 
2.1.3

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


[U-Boot] [PATCH v2 3/3] sunxi: a10-LIME set the cpu clock at boot to 912MHz

2015-03-28 Thread Iain Paton
following kernel patches to reduce the cpu clock to 912MHz due to 
reported instability at 1008MHz, select 912MHz as the boot speed 
for the a10-lime

Signed-off-by: Iain Paton ipat...@gmail.com
---
 configs/A10-OLinuXino-Lime_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index 48a0705..3e19424 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -7,3 +7,4 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=123
 CONFIG_DRAM_EMR1=4
+CONFIG_SYS_CLK_FREQ=91200
-- 
2.1.3

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


Re: [U-Boot] Regression in usb-storage in u-boot 2015.04 ???

2015-03-27 Thread Iain Paton
On 26/03/15 19:08, Hans de Goede wrote:

 Perhaps someone can test the reproducer on another board
 with usb:

on an A20-OLinuXino-lime2

U-Boot SPL 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11)
DRAM: 1024 MiB
CPU: 91200Hz, AXI/AHB/APB: 3/2/2

U-Boot 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
SCSI:  SUNXI SCSI INIT
SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst 
Net:   dwmac.1c5
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 2 USB Device(s) found
   scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0 
sunxi# usb start
sunxi# usb reset
resetting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80
2 USB Device(s) found
   scanning usb for storage devices... 1 Storage Device(s) found


that EHCI timeout appears to be random, it pops up maybe 20% of the time.

tried with a few different usb sticks and couldn't reproduce it.

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


[U-Boot] [PATCH 1/3] sunxi: sun4i: add missing 912MHz clock divisors

2015-03-26 Thread Iain Paton
clock divisors table was missing an entry for 912MHz. The same table is
used for sun7i where the default boot clock is 912MHz, resulting in A20
boards being overclocked to 960MHz

Signed-off-by: Iain Paton ipat...@gmail.com
---
 arch/arm/cpu/armv7/sunxi/clock_sun4i.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c 
b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
index 49f4032..c720e96 100644
--- a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
+++ b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
@@ -102,6 +102,7 @@ static struct {
/* This array must be ordered by frequency. */
{ PLL1_CFG(16, 0, 0, 0), 38400 },
{ PLL1_CFG(16, 1, 0, 0), 76800 },
+   { PLL1_CFG(19, 1, 0, 0), 91200 },
{ PLL1_CFG(20, 1, 0, 0), 96000 },
{ PLL1_CFG(21, 1, 0, 0), 100800},
{ PLL1_CFG(22, 1, 0, 0), 105600},
-- 
2.1.3

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


[U-Boot] [PATCH 2/3] sunxi: promote CONFIG_CLK_FULL_SPEED to be selectable through Kconfig

2015-03-26 Thread Iain Paton
in order to allow for this to be set differently per board, remove the
define from the associated soc headers and allow the user to choose a
value through a Kconfig setting

Signed-off-by: Iain Paton ipat...@gmail.com
---
 board/sunxi/Kconfig | 8 
 include/configs/sun4i.h | 1 -
 include/configs/sun5i.h | 1 -
 include/configs/sun6i.h | 1 -
 include/configs/sun7i.h | 1 -
 include/configs/sun8i.h | 1 -
 6 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 9d0eb91..d0905a7 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -33,6 +33,14 @@ config MACH_SUN8I
 
 endchoice
 
+config CLK_FULL_SPEED
+   int sunxi cpu clock speed
+   default 91200 if MACH_SUN7I
+   default 100800 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || 
MACH_SUN8I
+   ---help---
+   Set the cpu clock speed in Hz, valid values 384, 768, 912, 1008 MHz 
+   must be a multiple of 48MHz
+
 config DRAM_CLK
int sunxi dram clock speed
default 312 if MACH_SUN6I || MACH_SUN8I
diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h
index 1537e53..7cd5c69 100644
--- a/include/configs/sun4i.h
+++ b/include/configs/sun4i.h
@@ -11,7 +11,6 @@
 /*
  * A10 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun5i.h b/include/configs/sun5i.h
index e755531..e0470d4 100644
--- a/include/configs/sun5i.h
+++ b/include/configs/sun5i.h
@@ -11,7 +11,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h
index f5e11dd..617c1cd 100644
--- a/include/configs/sun6i.h
+++ b/include/configs/sun6i.h
@@ -14,7 +14,6 @@
 /*
  * A31 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
index f817f73..0bb756f 100644
--- a/include/configs/sun7i.h
+++ b/include/configs/sun7i.h
@@ -12,7 +12,6 @@
 /*
  * A20 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  91200
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
index 3bdedb3..79796d7 100644
--- a/include/configs/sun8i.h
+++ b/include/configs/sun8i.h
@@ -12,7 +12,6 @@
 /*
  * A23 specific configuration
  */
-#define CONFIG_CLK_FULL_SPEED  100800
 
 #ifdef CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SUNXI
-- 
2.1.3

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


[U-Boot] [PATCH 3/3] sunxi: a10-LIME set the cpu clock at boot to 912MHz

2015-03-26 Thread Iain Paton
following kernel patches to reduce the cpu clock to 912MHz due to reported
instability at 1008MHz, select 912MHz as the boot speed for the a10-lime

Signed-off-by: Iain Paton ipat...@gmail.com
---
 configs/A10-OLinuXino-Lime_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index 48a0705..d017e36 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -7,3 +7,4 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=123
 CONFIG_DRAM_EMR1=4
+CONFIG_CLK_FULL_SPEED=91200
-- 
2.1.3

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


[U-Boot] [PATCH] sunxi: axp209: fix incorrect limits on ldo3

2015-03-25 Thread Iain Paton
board/sunxi/board.c tries to set ldo3 to 2.8v however drivers/power/axp209.c
contains an incorrect limit on ldo3 of 2.275v

The origin of the incorrect limit seems likely due to some inconsistencies
in the axp209 datasheet. ldo3 is described with different limits in 
different sections. register 0x29 uses 7 bits for voltage configuration
while the 2.275v limit would apply if only 6 bits were used.
Probably this is a cutpaste error from register 0x23

The linux kernel driver has the correct limit and operation up to the 2.8v
required by my board has been physically verified with a multimeter.

Signed-off-by: Iain Paton ipat...@gmail.com
---
 drivers/power/axp209.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 4565398..f8c9b77 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -119,7 +119,7 @@ int axp209_set_ldo3(int mvolt)
if (mvolt == -1)
cfg = 0x80; /* determined by LDO3IN pin */
else
-   cfg = axp209_mvolt_to_cfg(mvolt, 700, 2275, 25);
+   cfg = axp209_mvolt_to_cfg(mvolt, 700, 3500, 25);
 
return axp209_write(AXP209_LDO3_VOLTAGE, cfg);
 }
-- 
2.1.3

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


[U-Boot] [PATCH 1/2] embestmx6boards: convert to use config_distro_defaults.h

2014-12-14 Thread Iain Paton
Update to use config_distro_defaults.h and remove explicit settings

Signed-off-by: Iain Paton ipat...@gmail.com
---
 include/configs/embestmx6boards.h | 21 -
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/include/configs/embestmx6boards.h 
b/include/configs/embestmx6boards.h
index 185edbe..c62c8ec 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -78,14 +78,7 @@
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
 #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_DOS_PARTITION
-
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NET
+
 #define CONFIG_FEC_MXC
 #define CONFIG_MII
 #define IMX_FEC_BASE   ENET_BASE_ADDR
@@ -114,14 +107,12 @@
 
 /* Command definition */
 #include config_cmd_default.h
+#undef CONFIG_CMD_FPGA
 
 #define CONFIG_CMD_BMODE
-#define CONFIG_CMD_BOOTZ
 #define CONFIG_CMD_SETEXPR
 #undef CONFIG_CMD_IMLS
 
-#define CONFIG_BOOTDELAY   1
-
 #define CONFIG_LOADADDR0x1200
 #define CONFIG_SYS_TEXT_BASE   0x1780
 
@@ -255,10 +246,7 @@
 #define CONFIG_ARP_TIMEOUT 200UL
 
 /* Miscellaneous configurable options */
-#define CONFIG_SYS_LONGHELP
-#define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2  
-#define CONFIG_AUTO_COMPLETE
 #define CONFIG_SYS_CBSIZE  256
 
 /* Print Buffer Size */
@@ -272,7 +260,6 @@
 
 #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
 
-#define CONFIG_CMDLINE_EDITING
 #define CONFIG_STACKSIZE   (128 * 1024)
 
 /* Physical Memory Map */
@@ -312,8 +299,6 @@
 #define CONFIG_ENV_SPI_MAX_HZ  CONFIG_SF_DEFAULT_SPEED
 #endif
 
-#define CONFIG_OF_LIBFDT
-
 #ifndef CONFIG_SYS_DCACHE_OFF
 #define CONFIG_CMD_CACHE
 #endif
@@ -335,4 +320,6 @@
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 
+#include config_distro_defaults.h
+
 #endif /* __RIOTBOARD_CONFIG_H */
-- 
2.1.3

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


[U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf

2014-12-14 Thread Iain Paton
Set ptuuid and fsuuid variables to the partition / filesystem
where we found extlinux.conf which allows us to use a replaceable
parameter in the append line in extlinux.conf like this

append root=PARTUUID=${ptuuid}

this means we never have to hardcode a root=/dev/mmcblk0p1 type path
anywhere.

Signed-off-by: Iain Paton ipat...@gmail.com
---

Since the uuids are only looked for after we've already found extlinux.conf
there's little cost/risk to making them available.
I realise that assuming extlinux.conf is on the root partition isn't perfect
but for the common case where it will be, there are many advantages to 
this.

 include/config_distro_bootcmd.h  | 2 ++
 include/config_distro_defaults.h | 4 
 2 files changed, 6 insertions(+)

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index be616e8..dd4ab09 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -166,6 +166,8 @@
bootpart=1\0 \
\
boot_extlinux=  \
+   part uuid ${devtype} ${devnum}:${bootpart} ptuuid;  \
+   fsuuid ${devtype} ${devnum}:${bootpart} fsuuid; \
sysboot ${devtype} ${devnum}:${bootpart} any\
${scriptaddr} ${prefix}extlinux/extlinux.conf\0 \
\
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
index 1ecc0bb..03e1efb 100644
--- a/include/config_distro_defaults.h
+++ b/include/config_distro_defaults.h
@@ -38,8 +38,10 @@
 #define CONFIG_CMD_EXT4
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_FS_GENERIC
+#define CONFIG_CMD_FS_UUID
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NET
+#define CONFIG_CMD_PART
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_PXE
 
@@ -53,4 +55,6 @@
 #define CONFIG_SUPPORT_RAW_INITRD
 #define CONFIG_SYS_HUSH_PARSER
 
+#define CONFIG_PARTITION_UUIDS
+
 #endif /* _CONFIG_CMD_DISTRO_DEFAULTS_H */
-- 
2.1.3

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


[U-Boot] [PATCH 2/2] embestmx6boards: convert to use config_distro_bootcmd.h

2014-12-14 Thread Iain Paton
Since the Riot  Mars boards are dev boards it's likely people will want to
run standard distros on them. So replace the current boot scripts with the
standard one from config_distro_bootcmd.h

Signed-off-by: Iain Paton ipat...@gmail.com
---
 include/configs/embestmx6boards.h | 168 +-
 1 file changed, 39 insertions(+), 129 deletions(-)

diff --git a/include/configs/embestmx6boards.h 
b/include/configs/embestmx6boards.h
index c62c8ec..b4b3ae8 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -116,133 +116,6 @@
 #define CONFIG_LOADADDR0x1200
 #define CONFIG_SYS_TEXT_BASE   0x1780
 
-#ifdef CONFIG_SUPPORT_EMMC_BOOT
-#define EMMC_ENV \
-   emmcdev=2\0 \
-   update_emmc_firmware= \
-   if test ${ip_dyn} = yes; then  \
-   setenv get_cmd dhcp;  \
-   else  \
-   setenv get_cmd tftp;  \
-   fi;  \
-   if ${get_cmd} ${update_sd_firmware_filename}; then  \
-   if mmc dev ${emmcdev}; then   \
-   setexpr fw_sz ${filesize} / 0x200;  \
-   setexpr fw_sz ${fw_sz} + 1;   \
-   mmc write ${loadaddr} 0x2 ${fw_sz};  \
-   fi;   \
-   fi\0
-#else
-#define EMMC_ENV 
-#endif
-
-#ifdef CONFIG_CMD_SF
-#define SF_ENV \
-   update_spi_firmware= \
-   if test ${ip_dyn} = yes; then  \
-   setenv get_cmd dhcp;  \
-   else  \
-   setenv get_cmd tftp;  \
-   fi;  \
-   if ${get_cmd} ${update_spi_firmware_filename}; then  \
-   if sf probe; then \
-   sf erase 0 0xc;  \
-   sf write ${loadaddr} 0x400 ${filesize};  \
-   fi;   \
-   fi\0
-#else
-#define SF_ENV 
-#endif
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-   script=boot.scr\0 \
-   image=zImage\0 \
-   fdt_file= CONFIG_DEFAULT_FDT_FILE \0 \
-   fdt_addr=0x1800\0 \
-   boot_fdt=try\0 \
-   ip_dyn=yes\0 \
-   console= CONFIG_CONSOLE_DEV \0 \
-   fdt_high=0x\0   \
-   initrd_high=0x\0 \
-   mmcdev= __stringify(CONFIG_SYS_MMC_ENV_DEV) \0 \
-   mmcpart=1\0 \
-   mmcroot= CONFIG_MMCROOT  rootwait rw\0 \
-   update_sd_firmware= \
-   if test ${ip_dyn} = yes; then  \
-   setenv get_cmd dhcp;  \
-   else  \
-   setenv get_cmd tftp;  \
-   fi;  \
-   if mmc dev ${mmcdev}; then\
-   if ${get_cmd} ${update_sd_firmware_filename}; then  \
-   setexpr fw_sz ${filesize} / 0x200;  \
-   setexpr fw_sz ${fw_sz} + 1;   \
-   mmc write ${loadaddr} 0x2 ${fw_sz};  \
-   fi;   \
-   fi\0 \
-   EMMC_ENV  \
-   SF_ENV\
-   mmcargs=setenv bootargs console=${console},${baudrate}  \
-   root=${mmcroot}\0 \
-   loadbootscript= \
-   fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
-   bootscript=echo Running bootscript from mmc ...;  \
-   source\0 \
-   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
-   loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
-   mmcboot=echo Booting from mmc ...;  \
-   run mmcargs;  \
-   if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
-   if run loadfdt; then  \
-   bootz ${loadaddr} - ${fdt_addr};  \
-   else  \
-   if test ${boot_fdt} = try; then  \
-   bootz;  \
-   else  \
-   echo WARN: Cannot load the DT;  \
-   fi;  \
-   fi;  \
-   else  \
-   bootz;  \
-   fi;\0 \
-   netargs=setenv bootargs console=${console},${baudrate}  \
-   root=/dev/nfs  \
-   ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0 \
-   netboot=echo Booting from net ...;  \
-   run netargs;  \
-   if test ${ip_dyn} = yes; then  \
-   setenv get_cmd dhcp;  \
-   else  \
-   setenv get_cmd tftp;  \
-   fi;  \
-   ${get_cmd} ${image};  \
-   if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
-   if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootz ${loadaddr} - ${fdt_addr};  \
-   else

Re: [U-Boot] [PATCH] embestmx6boards: Increase boot delay to 3s

2014-12-14 Thread Iain Paton
On 13/12/14 17:03, Eric Bénard wrote:
 Hi Nikolay,
 
 Le Sat, 13 Dec 2014 18:05:15 +0200,
 Nikolay Dimitrov picmas...@mail.bg a écrit :
 On 12/13/2014 04:16 PM, Eric Bénard wrote:

 This will increase the boot time by 2 seconds : why is that needed ?

 Thanks for commenting. My intent is to give by default a reasonable
 time for the end-user to react and break the boot-sequence if needed
 (and avoid the nasty racing against the clock for this precious
 key-press).

 My motivation for this is that I see RIoTboard/MarsBoard mostly as
 boards that people can use for experimentation/prototyping, and not as
 a finished end-product, thus my thinking that the slightly increased
 boot-time won't be a critical issue for such applications. Still
 everyone can change the delay at will if they want to optimize the boot.

 Other hobby boards also have similarly handy boot-timings, like
 Wandboard (5s), Novena (5s), Udoo (3s).

 OK seems reasonable.

I disagree. I think it's an unnecessary, unneeded, unreasonable tripling 
of the boot time.

Rather than leaving people to patch out this unwanted behaviour, I'd suggest 
promoting CONFIG_BOOTDELAY into a Kconfig option, leaving the default as-is.

This allows the people who want it to configure it easily.

In any case the rationale given, that the Riotboard is a dev board used for
experimenting, doesn't imply a change like this one. It implies a conversion 
to use config_distro_bootcmd.h like the patches I've just posted.
This also leads to a slightly less unreasonable increase in bootdelay to 2s 
from config_distro_defaults.h

Using config_distro_bootcmd also means that we can largely ignore the u-boot 
shell altogether and just use extlinux.conf instead
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf

2014-12-14 Thread Iain Paton
On 14/12/14 17:22, Stephen Warren wrote:
 On 12/14/2014 07:52 AM, Iain Paton wrote:
 Set ptuuid and fsuuid variables to the partition / filesystem
 where we found extlinux.conf which allows us to use a replaceable
 parameter in the append line in extlinux.conf like this

 append root=PARTUUID=${ptuuid}

 this means we never have to hardcode a root=/dev/mmcblk0p1 type path
 anywhere.
 
 Wouldn't the distro/... that creates extlinux.conf simply put the UUID
 into the file when it's generated? That's how things normally work in
 similar setups such as grub.conf...

Perhaps, but that's just another assumption. No less valid than mine, just
different.

 Since the uuids are only looked for after we've already found extlinux.conf
 there's little cost/risk to making them available.
 I realise that assuming extlinux.conf is on the root partition isn't perfect
 but for the common case where it will be, there are many advantages to 
 this.
 
 ... and completely avoids the issue of U-Boot making assumptions about
 the partition layout that the distro installer used.

Well making some information available hardly forces anyone to use it.

I'd like to be able to make use of some of the commands and information that
are available and to do it in a way that's compatible with 
config_distro_bootcmd.
Perhaps by expanding it's capabilities along the way, if that's acceptable.

Part of my motivation is to decouple the assumption that the user writable 
UUID will never change on disk and make the system unbootable and difficult 
to recover, using extlinux.conf is one step, the patch is another.

Ideally I want to largely ignore the u-boot environment and just use 
extlinux.conf, but without access to some of the discovered information 
from the boot process I'm just moving a set of hard coded assumptions from 
point A to point B. I may as well just use boot.scr in this case.

Is the intention that config_distro_bootcmd be rigid and inflexible, only 
catering to a single way of doing things?


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


Re: [U-Boot] [PATCH] embestmx6boards: Increase boot delay to 3s

2014-12-14 Thread Iain Paton
On 14/12/14 20:56, Nikolay Dimitrov wrote:

 In summary - I won't carry a war for this change, as it doesn't worth 
 it. I just tried to contribute a tiny bit of improvement to the already 
 excellent work of Eric, so we can have a silk-smooth out-of-the-box 
 U-Boot user experience, and I'm doing this as an actual riotboard user. 
 That's all.

I'm a riotboard user too, and have contributed towards it's success in my 
own ways. The choice of 1s hasn't been a problem for the many people using 
the Debian images I provided.

Anyway, it's in the interest of Riot/Mars to move towards the 
config_distro_* way of doing things longer term as it's likely to gain
easy support by the general distros that way.

Assuming those patches get accepted, the bootdelay ends up in the 
common config shared by all boards using config_distro_defaults. 
Over time I suspect that's likely to include most of the general dev 
boards.

It's still likely to be worth moving it to Kconfig as both of us will 
probably want to change it to our own preferences regardless :)


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


[U-Boot] [PATCH] sun7i: Add support for Olimex A20-OLinuXino-LIME2

2014-09-28 Thread Iain Paton
This adds support for the Olimex A20-OLinuXino-Lime2
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2

Differences to previous Lime boards are 1GB RAM and gigabit ethernet

Signed-off-by: Iain Paton ipat...@gmail.com
---

patch is substantially the same as the one previously posted to linux-sunxi
by HeHoPMaJIeH gamis...@gmail.com just updated for mainline.
The settings have been tested on real hardware, however I'm limited to the
two boards that I have. As yet there are no downloads available from Olimex 
for this board, so it's unknown if they will go for a more conservative
setting.

 board/sunxi/MAINTAINERS   |  6 ++
 board/sunxi/Makefile  |  1 +
 board/sunxi/dram_a20_olinuxino_l2.c   | 31 +++
 configs/A20-OLinuXino-Lime2_defconfig |  5 +
 4 files changed, 43 insertions(+)
 create mode 100644 board/sunxi/dram_a20_olinuxino_l2.c
 create mode 100644 configs/A20-OLinuXino-Lime2_defconfig

diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index 4f32195..4ed82cf 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -38,3 +38,9 @@ M:FUKAUMI Naoki nao...@gmail.com
 S: Maintained
 F: board/sunxi/dram_a20_olinuxino_l.c
 F: configs/A20-OLinuXino-Lime_defconfig
+
+A20-OLINUXINO-LIME2 BOARD
+M: Iain Paton ipat...@gmail.com
+S: Maintained
+F: board/sunxi/dram_a20_olinuxino_l2.c
+F: configs/A20-OLinuXino-Lime2_defconfig
diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index 56073a0..d63a6d2 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_A10S_OLINUXINO_M)+= 
dram_a10s_olinuxino_m.o
 obj-$(CONFIG_A13_OLINUXINO)+= dram_a13_olinuxino.o
 obj-$(CONFIG_A13_OLINUXINOM)   += dram_a13_oli_micro.o
 obj-$(CONFIG_A20_OLINUXINO_L)  += dram_a20_olinuxino_l.o
+obj-$(CONFIG_A20_OLINUXINO_L2) += dram_a20_olinuxino_l2.o
 obj-$(CONFIG_A20_OLINUXINO_M)  += dram_sun7i_384_1024_iow16.o
 # This is not a typo, uses the same mem settings as the a10s-olinuxino-m
 obj-$(CONFIG_AUXTEK_T004)  += dram_a10s_olinuxino_m.o
diff --git a/board/sunxi/dram_a20_olinuxino_l2.c 
b/board/sunxi/dram_a20_olinuxino_l2.c
new file mode 100644
index 000..2115d37
--- /dev/null
+++ b/board/sunxi/dram_a20_olinuxino_l2.c
@@ -0,0 +1,31 @@
+/* this file is generated, don't edit it yourself */
+
+#include common.h
+#include asm/arch/dram.h
+
+static struct dram_para dram_para = {
+   .clock = 480,
+   .type = 3,
+   .rank_num = 1,
+   .density = 4096,
+   .io_width = 16,
+   .bus_width = 32,
+   .cas = 9,
+   .zq = 0x7f,
+   .odt_en = 0,
+   .size = 1024,
+   .tpr0 = 0x42d899b7,
+   .tpr1 = 0xa090,
+   .tpr2 = 0x22a00,
+   .tpr3 = 0,
+   .tpr4 = 0,
+   .tpr5 = 0,
+   .emr1 = 0x4,
+   .emr2 = 0x10,
+   .emr3 = 0,
+};
+
+unsigned long sunxi_dram_init(void)
+{
+   return dramc_init(dram_para);
+}
diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
new file mode 100644
index 000..75ef872
--- /dev/null
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -0,0 +1,5 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS=A20_OLINUXINO_L2,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI
+CONFIG_FDTFILE=sun7i-a20-olinuxino-lime2.dtb
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUN7I=y
-- 
1.8.5.1

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


Re: [U-Boot] [linux-sunxi] Re: [PATCH v2 10/10] ARM: sun6i: Add Colombus board defconfig

2014-09-28 Thread Iain Paton
On 28/09/14 17:20, Ian Campbell wrote:

 You mean these two?
 sun7i: Add support for Olimex A20-OLinuXino-LIME2
 mmc: sunxi: add SDHC support for sun6i/sun7i/sun8i
 
 The latter seems like a feature to me, or at least the changelog doesn't
 give any rationale why it should go in now rather than waiting for the
 next merge window (i.e. why it's a bugfix, what the upside is to justify
 its inclusion now). How much testing has it had and what are the
 potential downsides?
 
 WRT the new board (and new boards generally), I'm in two minds. On the
 one hand they are pretty low risk (can't regress anything else, at least
 not in this case), on the other we are 6 weeks past the close of the
 merge window and 2 from the release date, so we are pretty far along.
 Where do we draw the line?

FWIW, the Lime2 is very new, I had no expectations it would make it 
into 2014.10 - although I'd not complain if it does!

Seems unlikely the dts will make it into 3.17 either, so there's probably 
no rush. 
Anyone needing either can pick up the patches themselves until next 
release.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] embestmx6boards: Fix CONFIG_CONSOLE_DEV

2014-06-09 Thread Iain Paton
On 09/06/14 17:35, Fabio Estevam wrote:
 mars and riot boards use UART2 as console, so CONFIG_CONSOLE_DEV should point
 to 'ttymxc1' instead.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---
 Untested as I don't have access to this board.
 
  include/configs/embestmx6boards.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/configs/embestmx6boards.h 
 b/include/configs/embestmx6boards.h
 index eb91c44..1d5fde6 100644
 --- a/include/configs/embestmx6boards.h
 +++ b/include/configs/embestmx6boards.h
 @@ -20,7 +20,7 @@
  #include linux/sizes.h
  
  #define CONFIG_MXC_UART_BASE UART2_BASE
 -#define CONFIG_CONSOLE_DEV   ttymxc0
 +#define CONFIG_CONSOLE_DEV   ttymxc1
  #define CONFIG_MMCROOT   /dev/mmcblk1p2
  
  #define PHYS_SDRAM_SIZE  (1u * 1024 * 1024 * 1024)
 

Tested-by: Iain Paton ipat...@gmail.com

I expect that, like me, most people will never see a problem with this as 
it's not used to define the u-Boot console.
For the kernel console, most people are likely to simply use boot.scr to 
override it or completely replace bootcmd with one that doesn't force 
booting from emmc.

Either way, changing this is the correct thing to do.

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


Re: [U-Boot] [PATCH] embestmx6boards: Fix the dtb file name for riotboard

2014-06-09 Thread Iain Paton
On 09/06/14 17:42, Fabio Estevam wrote:
 The name of the dtb file used in the kernel is 'imx6dl-riotboard.dtb', so fix
 it accordingly.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---
  include/configs/embestmx6boards.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/configs/embestmx6boards.h 
 b/include/configs/embestmx6boards.h
 index 1d5fde6..f1000f3 100644
 --- a/include/configs/embestmx6boards.h
 +++ b/include/configs/embestmx6boards.h
 @@ -293,7 +293,7 @@
  
  #if defined(CONFIG_ENV_IS_IN_MMC)
  /* RiOTboard */
 -#define CONFIG_DEFAULT_FDT_FILE  imx6s-riotboard.dtb
 +#define CONFIG_DEFAULT_FDT_FILE  imx6dl-riotboard.dtb
  #define CONFIG_SYS_FSL_USDHC_NUM 3
  #define CONFIG_SYS_MMC_ENV_DEV   2   /* SDHC4 */
  #define CONFIG_ENV_OFFSET(6 * 64 * 1024)
 

Tested-by: Iain Paton ipat...@gmail.com

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


[U-Boot] [PATCH] embest/mx6boards: only toggle eMMC usdhc3 RST line on MarSboard

2014-06-09 Thread Iain Paton
On MarS usdhc3 is eMMC, on RIoT usdhc3 is uSD and eMMC is usdhc4.

Don't run the MarS specific eMMC reset code on usdhc3 when 
board_type == BOARD_IS_RIOTBOARD

Signed-off-by: Iain Paton ipat...@gmail.com
---
 board/embest/mx6boards/mx6boards.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/embest/mx6boards/mx6boards.c 
b/board/embest/mx6boards/mx6boards.c
index d06b57d..530ea4f 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -246,6 +246,7 @@ int board_mmc_init(bd_t *bis)
riotboard_usdhc3_pads,
ARRAY_SIZE(riotboard_usdhc3_pads));
gpio_direction_input(USDHC3_CD_GPIO);
+   } else {
gpio_direction_output(IMX_GPIO_NR(7, 8) , 0);
udelay(250);
gpio_set_value(IMX_GPIO_NR(7, 8), 1);
-- 
1.8.5.1

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


[U-Boot] [PATCH] embestmx6boards: convert to generic board

2014-06-09 Thread Iain Paton
Enable CONFIG_SYS_GENERIC_BOARD to remove warning on boot.

Signed-off-by: Iain Paton ipat...@gmail.com
---
diff --git a/include/configs/embestmx6boards.h 
b/include/configs/embestmx6boards.h
index fbf47a7..2d4332b 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -19,6 +19,8 @@
 #include mx6_common.h
 #include linux/sizes.h
 
+#define CONFIG_SYS_GENERIC_BOARD
+
 #define CONFIG_MXC_UART_BASE   UART2_BASE
 #define CONFIG_CONSOLE_DEV ttymxc0
 #define CONFIG_MMCROOT /dev/mmcblk1p2
-- 
1.8.5.1

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