Re: [PATCH] tqma6: Fix DDR configuration

2023-11-23 Thread Markus Niebel
Hello Miquel,

> Initially investigating a Linux network issue causing a lot of drop and
> poor network performances on a custom system based on a TQMA6A module
> (based on an iMX6Q), [1st link below].
> 
> I eventually correlated my observations with a contention at the NIC
> level when in concurrency with the graphics pipeline. Troubleshooting
> this in the kernel lead to disabling DMA bursts accesses made by the IPU
> in order to avoid triggering the QoS at the interconnect level, reducing
> from 50 to 10% the drop rate on eth0, [2nd link below]. The solution
> worked on my setup but not on others, which still suffered from
> abnormally high drop rates even with this "fix".
> 
> After looking a while into TQ Systems BSP I figured out a number of
> differences in recent U-Boot out-of-tree patches they had in their
> repository [3rd link]. Parsing the differences one after the other lead
> me to this final solution.
> 
> The reset pad of the DDR controller was apparently misconfigured, Bit
> 18-19 picturing the "DDR select field". The current value b11 is
> reserved. The only defined value as of version 6 of the iMX6Q manual was
> b00 "DDR3 and LPDDR2 mode". In practice no register difference has been
> spotted after changing this configuration but all issues tracked thus
> far just vanished. All previous fixes have been proven irrelevant. Just
> clearing this field solved all our network issues and the drop rate as
> measured by iperf3 felt back to 0%.
> 
> Link: 
> https://lore.kernel.org/netdev/20231012193410.3d1812cf@xps-13/
> 
> Link: 
> https://lists.freedesktop.org/archives/dri-devel/2023-October/428251.html
> 
> Link: 
> https://github.com/tq-systems/u-boot-tqmaxx/commit/15eb6abbefbf6916c28467b85485911dad3da6bc
> 
> Signed-off-by: Miquel Raynal <
> miquel.ray...@bootlin.com
> >
> ---
>  board/tq/tqma6/tqma6q.cfg | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/tq/tqma6/tqma6q.cfg b/board/tq/tqma6/tqma6q.cfg
> index a49489aed3f..a345c4de93d 100644
> --- a/board/tq/tqma6/tqma6q.cfg
> +++ b/board/tq/tqma6/tqma6q.cfg
> @@ -36,7 +36,7 @@ DATA 4, MX6_IOM_DRAM_SDCLK_1, 0x8030
>  DATA 4, MX6_IOM_DRAM_CAS, 0x8030
>  DATA 4, MX6_IOM_DRAM_RAS, 0x8030
>  DATA 4, MX6_IOM_GRP_ADDDS, 0x0030
> -DATA 4, MX6_IOM_DRAM_RESET, 0x000C3030
> +DATA 4, MX6_IOM_DRAM_RESET, 0x3030

Thank you for pointing this out. Originally this error came from an
older/ancient reference manual. Sorry that we missed to bring this
upstream. We will send the changes for DCD data in the next days.

>  DATA 4, MX6_IOM_DRAM_SDCKE0, 0x3000
>  DATA 4, MX6_IOM_DRAM_SDCKE1, 0x
>  DATA 4, MX6_IOM_DRAM_SDBA2, 0x
> -- 
> 2.34.1

Markus

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



[PATCH v2 3/3] configs: tqma6: enable DM_THERMAL

2023-03-27 Thread Markus Niebel
Enabling this gives some informal output at boot time.

Signed-off-by: Markus Niebel 
---
 configs/tqma6dl_mba6_mmc_defconfig | 2 ++
 configs/tqma6dl_mba6_spi_defconfig | 2 ++
 configs/tqma6q_mba6_mmc_defconfig  | 2 ++
 configs/tqma6q_mba6_spi_defconfig  | 2 ++
 configs/tqma6s_mba6_mmc_defconfig  | 2 ++
 configs/tqma6s_mba6_spi_defconfig  | 2 ++
 6 files changed, 12 insertions(+)

diff --git a/configs/tqma6dl_mba6_mmc_defconfig 
b/configs/tqma6dl_mba6_mmc_defconfig
index a848dc84590..34d0dddfcbd 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -65,3 +65,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6dl_mba6_spi_defconfig 
b/configs/tqma6dl_mba6_spi_defconfig
index d1db8cce477..1bd7f8d7b39 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -69,3 +69,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index cc57c7b8bf3..f1f42322940 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -65,3 +65,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 8776aef29c5..cc8616fcfe6 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -69,3 +69,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index a613279f72b..bd9476cf743 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -65,3 +65,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index ef7733f4f7d..a9aa3fc8506 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -69,3 +69,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
-- 
2.25.1



[PATCH v2 2/3] configs: tqma6: enable DM for MDIO / PHY

2023-03-27 Thread Markus Niebel
Since this works with current device trees, enabled these.

Signed-off-by: Markus Niebel 
---
 configs/tqma6dl_mba6_mmc_defconfig | 3 +++
 configs/tqma6dl_mba6_spi_defconfig | 3 +++
 configs/tqma6q_mba6_mmc_defconfig  | 3 +++
 configs/tqma6q_mba6_spi_defconfig  | 3 +++
 configs/tqma6s_mba6_mmc_defconfig  | 3 +++
 configs/tqma6s_mba6_spi_defconfig  | 3 +++
 6 files changed, 18 insertions(+)

diff --git a/configs/tqma6dl_mba6_mmc_defconfig 
b/configs/tqma6dl_mba6_mmc_defconfig
index 3f19430d653..a848dc84590 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -51,7 +51,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6dl_mba6_spi_defconfig 
b/configs/tqma6dl_mba6_spi_defconfig
index 1a30d58a756..d1db8cce477 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -55,7 +55,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index aa3ee0e3e96..cc57c7b8bf3 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -51,7 +51,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 5407d095082..8776aef29c5 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -55,7 +55,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 84eb98fcaef..a613279f72b 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -51,7 +51,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 76e447a606b..ef7733f4f7d 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -55,7 +55,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
-- 
2.25.1



[PATCH v2 1/3] configs: tqma6: switch to DM_SERIAL

2023-03-27 Thread Markus Niebel
Usage without DM_SERIAL is deprecated. Fix this.

Signed-off-by: Markus Niebel 
---
 configs/tqma6dl_mba6_mmc_defconfig | 2 +-
 configs/tqma6dl_mba6_spi_defconfig | 2 +-
 configs/tqma6q_mba6_mmc_defconfig  | 2 +-
 configs/tqma6q_mba6_spi_defconfig  | 2 +-
 configs/tqma6s_mba6_mmc_defconfig  | 2 +-
 configs/tqma6s_mba6_spi_defconfig  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configs/tqma6dl_mba6_mmc_defconfig 
b/configs/tqma6dl_mba6_mmc_defconfig
index a02ee927852..3f19430d653 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -61,4 +61,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6dl_mba6_spi_defconfig 
b/configs/tqma6dl_mba6_spi_defconfig
index 8f7e0ac1019..1a30d58a756 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -65,4 +65,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 48822f388c8..aa3ee0e3e96 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -61,4 +61,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index ed774262aec..5407d095082 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -65,4 +65,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 9400c648121..84eb98fcaef 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -61,4 +61,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index ddbf9a757e6..76e447a606b 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -65,4 +65,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
-- 
2.25.1



[PATCH v2 0/3] configs: tqma6: defconfig updates

2023-03-27 Thread Markus Niebel
Update defconfigs for TQMa6x family of boards. Primary goal
is to do the overdue switch to DM_SERIAL. While at it, use
also DM for MDIO / PHY and enable DM_THERMAL.

v2:
Change topic from boards to configs. No further changes.
Add Tom Rini to receivers since most of the changes over the
last years were authored by him.

Markus Niebel (3):
  configs: tqma6: switch to DM_SERIAL
  configs: tqma6: enable DM for MDIO / PHY
  configs: tqma6: enable DM_THERMAL

 configs/tqma6dl_mba6_mmc_defconfig | 7 ++-
 configs/tqma6dl_mba6_spi_defconfig | 7 ++-
 configs/tqma6q_mba6_mmc_defconfig  | 7 ++-
 configs/tqma6q_mba6_spi_defconfig  | 7 ++-
 configs/tqma6s_mba6_mmc_defconfig  | 7 ++-
 configs/tqma6s_mba6_spi_defconfig  | 7 ++-
 6 files changed, 36 insertions(+), 6 deletions(-)

-- 
2.25.1



[PATCH 3/3] boards: tqma6: enable DM_THERMAL

2023-03-20 Thread Markus Niebel
Enabling this gives some informal output at boot time.

Signed-off-by: Markus Niebel 
---
 configs/tqma6dl_mba6_mmc_defconfig | 2 ++
 configs/tqma6dl_mba6_spi_defconfig | 2 ++
 configs/tqma6q_mba6_mmc_defconfig  | 2 ++
 configs/tqma6q_mba6_spi_defconfig  | 2 ++
 configs/tqma6s_mba6_mmc_defconfig  | 2 ++
 configs/tqma6s_mba6_spi_defconfig  | 2 ++
 6 files changed, 12 insertions(+)

diff --git a/configs/tqma6dl_mba6_mmc_defconfig 
b/configs/tqma6dl_mba6_mmc_defconfig
index a848dc84590..34d0dddfcbd 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -65,3 +65,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6dl_mba6_spi_defconfig 
b/configs/tqma6dl_mba6_spi_defconfig
index d1db8cce477..1bd7f8d7b39 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -69,3 +69,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index cc57c7b8bf3..f1f42322940 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -65,3 +65,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 8776aef29c5..cc8616fcfe6 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -69,3 +69,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index a613279f72b..bd9476cf743 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -65,3 +65,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index ef7733f4f7d..a9aa3fc8506 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -69,3 +69,5 @@ CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_THERMAL=y
-- 
2.25.1



[PATCH 2/3] boards: tqma6: enable DM for MDIO / PHY

2023-03-20 Thread Markus Niebel
Since this works with current device trees, enabled these.

Signed-off-by: Markus Niebel 
---
 configs/tqma6dl_mba6_mmc_defconfig | 3 +++
 configs/tqma6dl_mba6_spi_defconfig | 3 +++
 configs/tqma6q_mba6_mmc_defconfig  | 3 +++
 configs/tqma6q_mba6_spi_defconfig  | 3 +++
 configs/tqma6s_mba6_mmc_defconfig  | 3 +++
 configs/tqma6s_mba6_spi_defconfig  | 3 +++
 6 files changed, 18 insertions(+)

diff --git a/configs/tqma6dl_mba6_mmc_defconfig 
b/configs/tqma6dl_mba6_mmc_defconfig
index 3f19430d653..a848dc84590 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -51,7 +51,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6dl_mba6_spi_defconfig 
b/configs/tqma6dl_mba6_spi_defconfig
index 1a30d58a756..d1db8cce477 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -55,7 +55,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index aa3ee0e3e96..cc57c7b8bf3 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -51,7 +51,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 5407d095082..8776aef29c5 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -55,7 +55,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 84eb98fcaef..a613279f72b 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -51,7 +51,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 76e447a606b..ef7733f4f7d 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -55,7 +55,10 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_FEC_MXC=y
+CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
-- 
2.25.1



[PATCH 1/3] boards: tqma6: switch to DM_SERIAL

2023-03-20 Thread Markus Niebel
Usage without DM_SERIAL is deprecated. Fix this.

Signed-off-by: Markus Niebel 
---
 configs/tqma6dl_mba6_mmc_defconfig | 2 +-
 configs/tqma6dl_mba6_spi_defconfig | 2 +-
 configs/tqma6q_mba6_mmc_defconfig  | 2 +-
 configs/tqma6q_mba6_spi_defconfig  | 2 +-
 configs/tqma6s_mba6_mmc_defconfig  | 2 +-
 configs/tqma6s_mba6_spi_defconfig  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configs/tqma6dl_mba6_mmc_defconfig 
b/configs/tqma6dl_mba6_mmc_defconfig
index a02ee927852..3f19430d653 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -61,4 +61,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6dl_mba6_spi_defconfig 
b/configs/tqma6dl_mba6_spi_defconfig
index 8f7e0ac1019..1a30d58a756 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -65,4 +65,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 48822f388c8..aa3ee0e3e96 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -61,4 +61,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index ed774262aec..5407d095082 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -65,4 +65,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 9400c648121..84eb98fcaef 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -61,4 +61,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index ddbf9a757e6..76e447a606b 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -65,4 +65,4 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
-# CONFIG_SPECIFY_CONSOLE_INDEX is not set
+CONFIG_DM_SERIAL=y
-- 
2.25.1



[PATCH 0/3] boards: tqma6: defconfig updates

2023-03-20 Thread Markus Niebel
Update defconfigs for TQMa6x family of boards. Primary goal
is to do the overdue switch to DM_SERIAL. While at it, use
also DM for MDIO / PHY and enable DM_THERMAL.

Markus Niebel (3):
  boards: tqma6: switch to DM_SERIAL
  boards: tqma6: enable DM for MDIO / PHY
  boards: tqma6: enable DM_THERMAL

 configs/tqma6dl_mba6_mmc_defconfig | 7 ++-
 configs/tqma6dl_mba6_spi_defconfig | 7 ++-
 configs/tqma6q_mba6_mmc_defconfig  | 7 ++-
 configs/tqma6q_mba6_spi_defconfig  | 7 ++-
 configs/tqma6s_mba6_mmc_defconfig  | 7 ++-
 configs/tqma6s_mba6_spi_defconfig  | 7 ++-
 6 files changed, 36 insertions(+), 6 deletions(-)

-- 
2.25.1



[PATCH] cmd/mmc: fix output of mmc info for e-MMC

2022-02-10 Thread Markus Niebel
From: Max Merchel 

e-MMC and SD standards differ for some CID fields:

- 6 Byte Name - assigned by Manufacturer (SD 5 Byte)
- 1 Byte OEM - assigned by Jedec  (SD 2 Byte)

See e-MMC standard (JEDEC Standard No. 84-B51), 7.2.3 (OID) and 7.2.4 (PNM)

Signed-off-by: Max Merchel 
Signed-off-by: Markus Niebel 
---
 cmd/mmc.c | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/cmd/mmc.c b/cmd/mmc.c
index 96d81ffdf36..ca5622c45d0 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -22,10 +22,18 @@ static void print_mmcinfo(struct mmc *mmc)
 
printf("Device: %s\n", mmc->cfg->name);
printf("Manufacturer ID: %x\n", mmc->cid[0] >> 24);
-   printf("OEM: %x\n", (mmc->cid[0] >> 8) & 0x);
-   printf("Name: %c%c%c%c%c \n", mmc->cid[0] & 0xff,
-   (mmc->cid[1] >> 24), (mmc->cid[1] >> 16) & 0xff,
-   (mmc->cid[1] >> 8) & 0xff, mmc->cid[1] & 0xff);
+   if (IS_SD(mmc)) {
+   printf("OEM: %x\n", (mmc->cid[0] >> 8) & 0x);
+   printf("Name: %c%c%c%c%c \n", mmc->cid[0] & 0xff,
+   (mmc->cid[1] >> 24), (mmc->cid[1] >> 16) & 0xff,
+   (mmc->cid[1] >> 8) & 0xff, mmc->cid[1] & 0xff);
+   } else {
+   printf("OEM: %x\n", (mmc->cid[0] >> 8) & 0xff);
+   printf("Name: %c%c%c%c%c%c \n", mmc->cid[0] & 0xff,
+   (mmc->cid[1] >> 24), (mmc->cid[1] >> 16) & 0xff,
+   (mmc->cid[1] >> 8) & 0xff, mmc->cid[1] & 0xff,
+   (mmc->cid[2] >> 24));
+   }
 
printf("Bus Speed: %d\n", mmc->clock);
 #if CONFIG_IS_ENABLED(MMC_VERBOSE)
-- 
2.17.1



[U-Boot] [PATCH v2 1/2] arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings

2017-02-28 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

We have a Kconfig name for the module types. Let's Use it.
Some feature selections and configurations are based on the
module. Module selection selects the CPU type.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/tqma6_mba6.c | 13 +++--
 include/configs/tqma6.h  |  8 
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index 4db1a0b..b51751d 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -54,19 +54,19 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
PAD_CTL_ODE | PAD_CTL_SRE_FAST)
 
-#if defined(CONFIG_MX6Q)
+#if defined(CONFIG_TQMA6Q)
 
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0790
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e07ac
 
-#elif defined(CONFIG_MX6S)
+#elif defined(CONFIG_TQMA6S)
 
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0768
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e0788
 
 #else
 
-#error "need to define target CPU"
+#error "need to select module"
 
 #endif
 
@@ -259,14 +259,15 @@ int board_phy_config(struct phy_device *phydev)
 {
 /*
  * optimized pad skew values depends on CPU variant on the TQMa6x module:
- * i.MX6Q/D or i.MX6DL/S
+ * CONFIG_TQMA6Q: i.MX6Q/D
+ * CONFIG_TQMA6S: i.MX6S
  */
-#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
+#if defined(CONFIG_TQMA6Q)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0032
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
 #define MBA6X_KSZ9031_TX_SKEW  0x2036
-#elif defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
+#elif defined(CONFIG_TQMA6S)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0030
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 1c0a762..2a63686 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -18,17 +18,17 @@
 /* #endif */
 
 /* place code in last 4 MiB of RAM */
-#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
+#if defined(CONFIG_TQMA6S)
 #define CONFIG_SYS_TEXT_BASE   0x2fc0
-#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6D)
+#elif defined(CONFIG_TQMA6Q)
 #define CONFIG_SYS_TEXT_BASE   0x4fc0
 #endif
 
 #include "mx6_common.h"
 
-#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
+#if defined(CONFIG_TQMA6S)
 #define PHYS_SDRAM_SIZE(512u * SZ_1M)
-#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6D)
+#elif defined(CONFIG_TQMA6Q)
 #define PHYS_SDRAM_SIZE(1024u * SZ_1M)
 #endif
 
-- 
1.9.1

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


[U-Boot] [PATCH v2 2/2] arm: imx6: tqma6: add support for TQMa6DL variant

2017-02-28 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

This adds support for TQMa6DL using i.MX6DL and 1GiB DRAM
Since The module will use the same devicetree, we patch
the ram size in ft_board_setup.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/Kconfig|   7 +++
 board/tqc/tqma6/README |   3 +
 board/tqc/tqma6/tqma6.c|   7 +++
 board/tqc/tqma6/tqma6_mba6.c   |   5 +-
 board/tqc/tqma6/tqma6dl.cfg| 125 +
 configs/tqma6dl_mba6_mmc_defconfig |  34 ++
 configs/tqma6dl_mba6_spi_defconfig |  35 +++
 include/configs/tqma6.h|  10 +--
 include/configs/tqma6_mba6.h   |   5 +-
 9 files changed, 223 insertions(+), 8 deletions(-)
 create mode 100644 board/tqc/tqma6/tqma6dl.cfg
 create mode 100644 configs/tqma6dl_mba6_mmc_defconfig
 create mode 100644 configs/tqma6dl_mba6_spi_defconfig

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 5dafa38..6df4134 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -22,6 +22,12 @@ config TQMA6Q
help
  select TQMa6Q / TQMa6D with i.MX6Q/D and 1GiB DRAM
 
+config TQMA6DL
+   bool "TQMa6DL"
+   select MX6DL
+   help
+ select TQMa6DL with i.MX6DL and 1GiB DRAM
+
 config TQMA6S
bool "TQMa6S"
select MX6S
@@ -70,6 +76,7 @@ endchoice
 
 config IMX_CONFIG
default "board/tqc/tqma6/tqma6q.cfg" if TQMA6Q
+   default "board/tqc/tqma6/tqma6dl.cfg" if TQMA6DL
default "board/tqc/tqma6/tqma6s.cfg" if TQMA6S
 
 endif
diff --git a/board/tqc/tqma6/README b/board/tqc/tqma6/README
index 2c012e7..c47cb21 100644
--- a/board/tqc/tqma6/README
+++ b/board/tqc/tqma6/README
@@ -21,6 +21,7 @@ To build U-Boot for the TQ Systems TQMa6 modules:
 
 x is a placeholder for the CPU variant
 q - means i.MX6Q/D: TQMa6Q (i.MX6Q) and TQMa6D  (i.MX6D)
+dl - means i.MX6DL: TQMa6DL  (i.MX6DL)
 s - means i.MX6S: TQMa6S  (i.MX6S)
 
 baseboard is a placeholder for the boot device
@@ -31,5 +32,7 @@ This gives the following configurations:
 
 tqma6q_mba6_mmc_config
 tqma6q_mba6_spi_config
+tqma6dl_mba6_mmc_config
+tqma6dl_mba6_spi_config
 tqma6s_mba6_mmc_config
 tqma6s_mba6_spi_config
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index c8fc95d..775ca21 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -267,8 +267,15 @@ int checkboard(void)
  * Device Tree Support
  */
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
+#define MODELSTRLEN 32u
 int ft_board_setup(void *blob, bd_t *bd)
 {
+   char modelstr[MODELSTRLEN];
+
+   snprintf(modelstr, MODELSTRLEN, "TQ %s on %s", tqma6_get_boardname(),
+tqma6_bb_get_boardname());
+   do_fixup_by_path_string(blob, "/", "model", modelstr);
+   fdt_fixup_memory(blob, (u64)PHYS_SDRAM, (u64)gd->ram_size);
/* bring in eMMC dsr settings */
do_fixup_by_path_u32(blob,
 "/soc/aips-bus@0210/usdhc@02198000",
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index b51751d..65a8eab 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -59,7 +59,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0790
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e07ac
 
-#elif defined(CONFIG_TQMA6S)
+#elif defined(CONFIG_TQMA6S) || defined(CONFIG_TQMA6DL)
 
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0768
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e0788
@@ -261,13 +261,14 @@ int board_phy_config(struct phy_device *phydev)
  * optimized pad skew values depends on CPU variant on the TQMa6x module:
  * CONFIG_TQMA6Q: i.MX6Q/D
  * CONFIG_TQMA6S: i.MX6S
+ * CONFIG_TQMA6DL: i.MX6DL
  */
 #if defined(CONFIG_TQMA6Q)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0032
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
 #define MBA6X_KSZ9031_TX_SKEW  0x2036
-#elif defined(CONFIG_TQMA6S)
+#elif defined(CONFIG_TQMA6S) || defined(CONFIG_TQMA6DL)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0030
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
diff --git a/board/tqc/tqma6/tqma6dl.cfg b/board/tqc/tqma6/tqma6dl.cfg
new file mode 100644
index 000..716033f
--- /dev/null
+++ b/board/tqc/tqma6/tqma6dl.cfg
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2014 - 2015 Markus Niebel <markus.nie...@tq-group.com>
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ *
+ * Refer doc/README.imximage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ */
+
+/* image version */
+IMAGE_VERSION 2
+
+#define __ASSEMBLY__
+#include 
+
+/*
+ * Boot Device : one of
+ * spi, sd (the board has no nand neither onenand)
+ */
+#i

[U-Boot] [PATCH v2 0/2] Support additional Variant for TQMa6 SOM

2017-02-28 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

Add support for the SOM variant featuring i.MX6DL. This needs a new
DCD config. The first patch is a small preparation.

Changes for v2:
- Rebase on u-boot-imx master
- Fix minor issues in defconfig files

Markus Niebel (2):
  arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
  arm: imx6: tqma6: add support for TQMa6DL variant

 board/tqc/tqma6/Kconfig|   7 +++
 board/tqc/tqma6/README |   3 +
 board/tqc/tqma6/tqma6.c|   7 +++
 board/tqc/tqma6/tqma6_mba6.c   |  14 +++--
 board/tqc/tqma6/tqma6dl.cfg| 125 +
 configs/tqma6dl_mba6_mmc_defconfig |  36 +++
 configs/tqma6dl_mba6_spi_defconfig |  37 +++
 include/configs/tqma6.h|  16 ++---
 include/configs/tqma6_mba6.h   |   5 +-
 9 files changed, 235 insertions(+), 15 deletions(-)
 create mode 100644 board/tqc/tqma6/tqma6dl.cfg
 create mode 100644 configs/tqma6dl_mba6_mmc_defconfig
 create mode 100644 configs/tqma6dl_mba6_spi_defconfig

-- 
1.9.1

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


Re: [U-Boot] [PATCH 0/2] Support additional Variant for TQMa6 SOM

2017-02-28 Thread Markus Niebel
Hello Stefano,

Am Sonntag, den 26.02.2017, 12:57 +0100 schrieb Stefano Babic:
> On 03/02/2017 15:20, Markus Niebel wrote:
> > From: Markus Niebel <markus.nie...@tq-group.com>
> > 
> > Add support for the SOM variant featuring i.MX6DL. This needs a new
> > DCD config. The first patch is a small preparation.
> > 
> > Markus Niebel (2):
> >   arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
> >   arm: imx6: tqma6: add support for TQMa6DL variant
> > 
> >  board/tqc/tqma6/Kconfig|   7 +++
> >  board/tqc/tqma6/README |   3 +
> >  board/tqc/tqma6/tqma6.c|   7 +++
> >  board/tqc/tqma6/tqma6_mba6.c   |  14 +++--
> >  board/tqc/tqma6/tqma6dl.cfg| 125 
> > +
> >  configs/tqma6dl_mba6_mmc_defconfig |  36 +++
> >  configs/tqma6dl_mba6_spi_defconfig |  37 +++
> >  include/configs/tqma6.h|  16 ++---
> >  include/configs/tqma6_mba6.h   |   5 +-
> >  9 files changed, 235 insertions(+), 15 deletions(-)
> >  create mode 100644 board/tqc/tqma6/tqma6dl.cfg
> >  create mode 100644 configs/tqma6dl_mba6_mmc_defconfig
> >  create mode 100644 configs/tqma6dl_mba6_spi_defconfig
> > 
> 
> Applied to u-boot-imx, thanks !
> 

I noticed, that I did a minor mistake (naming of default device tree) in
the two defconfig files. Since at the moment the series is in imx-next,
would you prefer a v2 or a patch that fixes this?

> Best regards,
> Stefano
> 

Best regards,
Markus

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


[U-Boot] [PATCH 6/6] tqma6: [cosmetic] sanitize environment defines

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 include/configs/tqma6.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 9225bc1..1c0a762 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -291,7 +291,7 @@
"uboot=u-boot.imx\0"   \
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0"   \
"fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0"  \
-   "console=" CONSOLE_DEV "\0" \
+   "console=" CONSOLE_DEV "\0"\
"cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \
"fdt_high=0x\0"\
"initrd_high=0x\0" \
-- 
1.9.1

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


[U-Boot] [PATCH 2/5] imx6: tqma6: use lower driver stength for I2C pins

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

The current driver stength is too high, leading to spec violations
on the falling edge. Fix it with values from HW

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/tqma6.c  | 2 +-
 board/tqc/tqma6/tqma6_mba6.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 59b4a6c..49917c1 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -47,7 +47,7 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
 
 #define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
-   PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_DSE_80ohm | PAD_CTL_HYS |   \
PAD_CTL_ODE | PAD_CTL_SRE_FAST)
 
 int dram_init(void)
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index 4db1a0b..af92967 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -51,7 +51,7 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
 
 #define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
-   PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_DSE_80ohm | PAD_CTL_HYS |   \
PAD_CTL_ODE | PAD_CTL_SRE_FAST)
 
 #if defined(CONFIG_MX6Q)
-- 
1.9.1

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


[U-Boot] [PATCH 3/5] imx6: tqma6: disable spi CS unused in U-Boot

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

Since the CS are not in use, do not map them. User of starterkit
mainboard is free to use them otherwise. When using these pins later
in the OS for instance as GPIO IRQ pin, they need to be input.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/tqma6_mba6.c | 22 --
 1 file changed, 22 deletions(-)

diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index af92967..02705be 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -234,27 +234,6 @@ static void mba6_setup_i2c(void)
printf("setup I2C1 failed: %d\n", ret);
 }
 
-
-static iomux_v3_cfg_t const mba6_ecspi1_pads[] = {
-   NEW_PAD_CTRL(MX6_PAD_EIM_D24__GPIO3_IO24, SPI_PAD_CTRL),
-   NEW_PAD_CTRL(MX6_PAD_EIM_D25__GPIO3_IO25, SPI_PAD_CTRL),
-};
-
-static unsigned const mba6_ecspi1_cs[] = {
-   IMX_GPIO_NR(3, 24),
-   IMX_GPIO_NR(3, 25),
-};
-
-static void mba6_setup_iomuxc_spi(void)
-{
-   unsigned i;
-
-   for (i = 0; i < ARRAY_SIZE(mba6_ecspi1_cs); ++i)
-   gpio_direction_output(mba6_ecspi1_cs[i], 1);
-   imx_iomux_v3_setup_multiple_pads(mba6_ecspi1_pads,
-ARRAY_SIZE(mba6_ecspi1_pads));
-}
-
 int board_phy_config(struct phy_device *phydev)
 {
 /*
@@ -341,7 +320,6 @@ int tqma6_bb_board_early_init_f(void)
 int tqma6_bb_board_init(void)
 {
mba6_setup_i2c();
-   mba6_setup_iomuxc_spi();
/* do it here - to have reset completed */
mba6_setup_iomuxc_enet();
 
-- 
1.9.1

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


[U-Boot] [PATCH 5/5] mx6: tqma6: clear enet clk sel for mba6

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

we have external ref clock from phy.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/tqma6_mba6.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index 6d63953..1c5b953 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -114,6 +114,11 @@ static iomux_v3_cfg_t const mba6_enet_pads[] = {
 
 static void mba6_setup_iomuxc_enet(void)
 {
+   struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
+
+   /* clear gpr1[ENET_CLK_SEL] for externel clock */
+   clrbits_le32(_regs->gpr[1], IOMUXC_GPR1_ENET_CLK_SEL_MASK);
+
__raw_writel(IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM_DISABLE,
 (void *)IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM);
__raw_writel(IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII_1P5V,
-- 
1.9.1

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


[U-Boot] [PATCH 1/5] imx6: tqma6: implement power_init_board

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

PMIC implements proper I2C bus switching,
implement power_init_board instead handling in
board_late_init.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/tqma6.c | 22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index c8fc95d..59b4a6c 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -232,25 +232,27 @@ static const char *tqma6_get_boardname(void)
};
 }
 
-int board_late_init(void)
+/* setup board specific PMIC */
+int power_init_board(void)
 {
struct pmic *p;
-   u32 reg;
-
-   setenv("board_name", tqma6_get_boardname());
+   u32 reg, rev;
 
-   /*
-* configure PFUZE100 PMIC:
-* TODO: should go to power_init_board if bus switching is
-* fixed in generic power code
-*/
power_pfuze100_init(TQMA6_PFUZE100_I2C_BUS);
p = pmic_get("PFUZE100");
if (p && !pmic_probe(p)) {
pmic_reg_read(p, PFUZE100_DEVICEID, );
-   printf("PMIC: PFUZE100 ID=0x%02x\n", reg);
+   pmic_reg_read(p, PFUZE100_REVID, );
+   printf("PMIC: PFUZE100 ID=0x%02x REV=0x%02x\n", reg, rev);
}
 
+   return 0;
+}
+
+int board_late_init(void)
+{
+   setenv("board_name", tqma6_get_boardname());
+
tqma6_bb_board_late_init();
 
return 0;
-- 
1.9.1

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


[U-Boot] [PATCH 4/5] imx6: tqma6: adjust ethernet phy reset delay

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

fix the reset delay which was to short

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/tqma6_mba6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index 02705be..6d63953 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -125,7 +125,7 @@ static void mba6_setup_iomuxc_enet(void)
/* Reset PHY */
gpio_direction_output(ENET_PHY_RESET_GPIO , 0);
/* Need delay 10ms after power on according to KSZ9031 spec */
-   udelay(1000 * 10);
+   mdelay(10);
gpio_set_value(ENET_PHY_RESET_GPIO, 1);
/*
 * KSZ9031 manual: 100 usec wait time after reset before communication
@@ -133,7 +133,7 @@ static void mba6_setup_iomuxc_enet(void)
 * BUGBUG: hardware has an RC const that needs > 10 msec from 0->1 on
 * reset before the phy sees a high level
 */
-   udelay(200);
+   mdelay(15);
 }
 
 static iomux_v3_cfg_t const mba6_uart2_pads[] = {
-- 
1.9.1

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


[U-Boot] [PATCH 0/5] mx6: tqma6: series of small fixes

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

Markus Niebel (5):
  imx6: tqma6: implement power_init_board
  imx6: tqma6: use lower driver stength for I2C pins
  imx6: tqma6: disable spi CS unused in U-Boot
  imx6: tqma6: adjust ethernet phy reset delay
  mx6: tqma6: clear enet clk sel for mba6

 board/tqc/tqma6/tqma6.c  | 24 +---
 board/tqc/tqma6/tqma6_mba6.c | 33 -
 2 files changed, 21 insertions(+), 36 deletions(-)

-- 
1.9.1

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


[U-Boot] [PATCH 4/6] mx6: tqma6: add rootfsmode environment for mmc / sd

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 include/configs/tqma6.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 874b44b..311221d 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -295,6 +295,7 @@
"cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \
"fdt_high=0x\0"\
"initrd_high=0x\0" \
+   "rootfsmode=ro\0"  \
"addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \
"addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0"  \
"addfb=setenv bootargs ${bootargs} "   \
@@ -303,7 +304,8 @@
"mmcblkdev=0\0"\
"mmcargs=run addmmc addtty addfb addcma\0" \
"addmmc=setenv bootargs ${bootargs} "  \
-   "root=/dev/mmcblk${mmcblkdev}p${mmcpart} rw rootwait\0"\
+   "root=/dev/mmcblk${mmcblkdev}p${mmcpart} ${rootfsmode} "   \
+   "rootwait\0"   \
"mmcboot=echo Booting from mmc ...; "  \
"setenv bootargs; "\
"run mmcargs; "\
-- 
1.9.1

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


[U-Boot] [PATCH 3/6] mx6: tqma6: fix typo in env

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

there was a double bracketed var ref. fix this.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 include/configs/tqma6.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index dce9c25..874b44b 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -262,7 +262,7 @@
__stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; "   \
"setexpr offset ${fdt_start} * "   \
__stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; "   \
-   "sf read ${${fdt_addr}} ${offset} ${size}; "   \
+   "sf read ${fdt_addr} ${offset} ${size}; "  \
"setenv size ; setenv offset\0"\
 
 #define CONFIG_BOOTCOMMAND 
\
-- 
1.9.1

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


[U-Boot] [PATCH 1/6] arm: imx6: tqma6: add configurable CMA size

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

depending on the use case different CMA sizes are
needed for linux. Add env var to enable passing CMA size
via kernel command line

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 include/configs/tqma6.h | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 09783a2..ceb4626 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -281,6 +281,9 @@
 /* 128 MiB offset as in ARM related docu for linux suggested */
 #define TQMA6_FDT_ADDRESS  0x1800
 
+/* set to a resonable value, changeable by user */
+#define TQMA6_CMA_SIZE 160M
+
 #define CONFIG_EXTRA_ENV_SETTINGS  
\
"board=tqma6\0"\
"uimage=uImage\0"  \
@@ -293,14 +296,16 @@
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0"   \
"fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0"  \
"console=" CONSOLE_DEV "\0" \
+   "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \
"fdt_high=0x\0"\
"initrd_high=0x\0" \
+   "addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \
"addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0"  \
"addfb=setenv bootargs ${bootargs} "   \
"imx-fbdev.legacyfb_depth=32 consoleblank=0\0" \
"mmcpart=2\0"  \
"mmcblkdev=0\0"\
-   "mmcargs=run addmmc addtty addfb\0"\
+   "mmcargs=run addmmc addtty addfb addcma\0" \
"addmmc=setenv bootargs ${bootargs} "  \
"root=/dev/mmcblk${mmcblkdev}p${mmcpart} rw rootwait\0"\
"mmcboot=echo Booting from mmc ...; "  \
@@ -317,7 +322,7 @@
"netdev=eth0\0"\
"rootpath=/srv/nfs/tqma6\0"\
"ipmode=static\0"  \
-   "netargs=run addnfs addip addtty addfb\0"  \
+   "netargs=run addnfs addip addtty addfb addcma\0"   \
"addnfs=setenv bootargs ${bootargs} "  \
"root=/dev/nfs rw "\
"nfsroot=${serverip}:${rootpath},v3,tcp;\0"\
-- 
1.9.1

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


[U-Boot] [PATCH 2/6] imx6: tqma6: rely on default setting for tftp and nfs

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

Playing with USB-to-Ethernet dongles it turns out,
that these will not work with special settings

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 include/configs/tqma6.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index ceb4626..dce9c25 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -93,10 +93,6 @@
 #define CONFIG_MII
 
 #define CONFIG_ARP_TIMEOUT 200UL
-/* Network config - Allow larger/faster download for TFTP/NFS */
-#define CONFIG_IP_DEFRAG
-#define CONFIG_TFTP_BLOCKSIZE  4096
-#define CONFIG_NFS_READ_SIZE   4096
 
 /* Command definition */
 #define CONFIG_CMD_BMODE
-- 
1.9.1

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


[U-Boot] [PATCH 5/6] tqma6: fix rounding in env

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

need to add before div in mmc update scripts. Otherwise we could
write one block more ba acident

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 include/configs/tqma6.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 311221d..9225bc1 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -133,8 +133,8 @@
"update_uboot=if tftp ${uboot}; then " \
"if itest ${filesize} > 0; then "  \
"mmc dev ${mmcdev}; mmc rescan; "  \
-   "setexpr blkc ${filesize} / 0x200; "   \
-   "setexpr blkc ${blkc} + 1; "   \
+   "setexpr blkc ${filesize} + 0x1ff; "   \
+   "setexpr blkc ${blkc} / 0x200; "   \
"if itest ${blkc} <= ${uboot_size}; then " \
"mmc write ${loadaddr} ${uboot_start} "\
"${blkc}; "\
@@ -145,8 +145,8 @@
"if tftp ${kernel}; then " \
"if itest ${filesize} > 0; then "  \
"mmc dev ${mmcdev}; mmc rescan; "  \
-   "setexpr blkc ${filesize} / 0x200; "   \
-   "setexpr blkc ${blkc} + 1; "   \
+   "setexpr blkc ${filesize} + 0x1ff; "   \
+   "setexpr blkc ${blkc} / 0x200; "   \
"if itest ${blkc} <= ${kernel_size}; then "\
"mmc write ${loadaddr} "   \
"${kernel_start} ${blkc}; "\
@@ -157,8 +157,8 @@
"update_fdt=if tftp ${fdt_file}; then "\
"if itest ${filesize} > 0; then "  \
"mmc dev ${mmcdev}; mmc rescan; "  \
-   "setexpr blkc ${filesize} / 0x200; "   \
-   "setexpr blkc ${blkc} + 1; "   \
+   "setexpr blkc ${filesize} + 0x1ff; "   \
+   "setexpr blkc ${blkc} / 0x200; "   \
"if itest ${blkc} <= ${fdt_size}; then "   \
"mmc write ${loadaddr} ${fdt_start} ${blkc}; " \
"fi; " \
-- 
1.9.1

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


[U-Boot] [PATCH 0/6] mx6: tqma6: small config and env fixes

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>


Markus Niebel (6):
  arm: imx6: tqma6: add configurable CMA size
  imx6: tqma6: rely on default setting for tftp and nfs
  mx6: tqma6: fix typo in env
  mx6: tqma6: add rootfsmode environment for mmc / sd
  tqma6: fix rounding in env
  tqma6: [cosmetic] sanitize environment defines

 include/configs/tqma6.h | 33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

-- 
1.9.1

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


[U-Boot] [PATCH] cmd_mmc: fix arg parsing for setdsr subcmd

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

The handler do_setdsr receives only the dsr parameter,
the action is parsed before.

Error was introduced when restructuring the mmc command
implementation in commit 1fd93c6e7d8a1e4d6261058cefab11b875ded252.

Reported-by: Michael Krummsdorf <michael.krummsd...@tq-group.com>
Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 cmd/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/mmc.c b/cmd/mmc.c
index b8dcc26..f83032e 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -710,7 +710,7 @@ static int do_mmc_setdsr(cmd_tbl_t *cmdtp, int flag,
 
if (argc != 2)
return CMD_RET_USAGE;
-   val = simple_strtoul(argv[2], NULL, 16);
+   val = simple_strtoul(argv[1], NULL, 16);
 
mmc = find_mmc_device(curr_device);
if (!mmc) {
-- 
1.9.1

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


[U-Boot] [PATCH 2/2] arm: imx6: tqma6: add support for TQMa6DL variant

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

This adds support for TQMa6DL using i.MX6DL and 1GiB DRAM
Since The module will use the same devicetree, we patch
the ram size in ft_board_setup.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/Kconfig|   7 +++
 board/tqc/tqma6/README |   3 +
 board/tqc/tqma6/tqma6.c|   7 +++
 board/tqc/tqma6/tqma6_mba6.c   |   5 +-
 board/tqc/tqma6/tqma6dl.cfg| 125 +
 configs/tqma6dl_mba6_mmc_defconfig |  36 +++
 configs/tqma6dl_mba6_spi_defconfig |  37 +++
 include/configs/tqma6.h|  10 +--
 include/configs/tqma6_mba6.h   |   5 +-
 9 files changed, 227 insertions(+), 8 deletions(-)
 create mode 100644 board/tqc/tqma6/tqma6dl.cfg
 create mode 100644 configs/tqma6dl_mba6_mmc_defconfig
 create mode 100644 configs/tqma6dl_mba6_spi_defconfig

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 5dafa38..6df4134 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -22,6 +22,12 @@ config TQMA6Q
help
  select TQMa6Q / TQMa6D with i.MX6Q/D and 1GiB DRAM
 
+config TQMA6DL
+   bool "TQMa6DL"
+   select MX6DL
+   help
+ select TQMa6DL with i.MX6DL and 1GiB DRAM
+
 config TQMA6S
bool "TQMa6S"
select MX6S
@@ -70,6 +76,7 @@ endchoice
 
 config IMX_CONFIG
default "board/tqc/tqma6/tqma6q.cfg" if TQMA6Q
+   default "board/tqc/tqma6/tqma6dl.cfg" if TQMA6DL
default "board/tqc/tqma6/tqma6s.cfg" if TQMA6S
 
 endif
diff --git a/board/tqc/tqma6/README b/board/tqc/tqma6/README
index 2c012e7..c47cb21 100644
--- a/board/tqc/tqma6/README
+++ b/board/tqc/tqma6/README
@@ -21,6 +21,7 @@ To build U-Boot for the TQ Systems TQMa6 modules:
 
 x is a placeholder for the CPU variant
 q - means i.MX6Q/D: TQMa6Q (i.MX6Q) and TQMa6D  (i.MX6D)
+dl - means i.MX6DL: TQMa6DL  (i.MX6DL)
 s - means i.MX6S: TQMa6S  (i.MX6S)
 
 baseboard is a placeholder for the boot device
@@ -31,5 +32,7 @@ This gives the following configurations:
 
 tqma6q_mba6_mmc_config
 tqma6q_mba6_spi_config
+tqma6dl_mba6_mmc_config
+tqma6dl_mba6_spi_config
 tqma6s_mba6_mmc_config
 tqma6s_mba6_spi_config
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index c8fc95d..775ca21 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -267,8 +267,15 @@ int checkboard(void)
  * Device Tree Support
  */
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
+#define MODELSTRLEN 32u
 int ft_board_setup(void *blob, bd_t *bd)
 {
+   char modelstr[MODELSTRLEN];
+
+   snprintf(modelstr, MODELSTRLEN, "TQ %s on %s", tqma6_get_boardname(),
+tqma6_bb_get_boardname());
+   do_fixup_by_path_string(blob, "/", "model", modelstr);
+   fdt_fixup_memory(blob, (u64)PHYS_SDRAM, (u64)gd->ram_size);
/* bring in eMMC dsr settings */
do_fixup_by_path_u32(blob,
 "/soc/aips-bus@0210/usdhc@02198000",
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index b51751d..65a8eab 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -59,7 +59,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0790
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e07ac
 
-#elif defined(CONFIG_TQMA6S)
+#elif defined(CONFIG_TQMA6S) || defined(CONFIG_TQMA6DL)
 
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0768
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e0788
@@ -261,13 +261,14 @@ int board_phy_config(struct phy_device *phydev)
  * optimized pad skew values depends on CPU variant on the TQMa6x module:
  * CONFIG_TQMA6Q: i.MX6Q/D
  * CONFIG_TQMA6S: i.MX6S
+ * CONFIG_TQMA6DL: i.MX6DL
  */
 #if defined(CONFIG_TQMA6Q)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0032
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
 #define MBA6X_KSZ9031_TX_SKEW  0x2036
-#elif defined(CONFIG_TQMA6S)
+#elif defined(CONFIG_TQMA6S) || defined(CONFIG_TQMA6DL)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0030
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
diff --git a/board/tqc/tqma6/tqma6dl.cfg b/board/tqc/tqma6/tqma6dl.cfg
new file mode 100644
index 000..716033f
--- /dev/null
+++ b/board/tqc/tqma6/tqma6dl.cfg
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2014 - 2015 Markus Niebel <markus.nie...@tq-group.com>
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ *
+ * Refer doc/README.imximage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ */
+
+/* image version */
+IMAGE_VERSION 2
+
+#define __ASSEMBLY__
+#include 
+
+/*
+ * Boot Device : one of
+ * spi, sd (the board has no nand neither onenand)
+ */
+#i

[U-Boot] [PATCH 0/2] Support additional Variant for TQMa6 SOM

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

Add support for the SOM variant featuring i.MX6DL. This needs a new
DCD config. The first patch is a small preparation.

Markus Niebel (2):
  arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
  arm: imx6: tqma6: add support for TQMa6DL variant

 board/tqc/tqma6/Kconfig|   7 +++
 board/tqc/tqma6/README |   3 +
 board/tqc/tqma6/tqma6.c|   7 +++
 board/tqc/tqma6/tqma6_mba6.c   |  14 +++--
 board/tqc/tqma6/tqma6dl.cfg| 125 +
 configs/tqma6dl_mba6_mmc_defconfig |  36 +++
 configs/tqma6dl_mba6_spi_defconfig |  37 +++
 include/configs/tqma6.h|  16 ++---
 include/configs/tqma6_mba6.h   |   5 +-
 9 files changed, 235 insertions(+), 15 deletions(-)
 create mode 100644 board/tqc/tqma6/tqma6dl.cfg
 create mode 100644 configs/tqma6dl_mba6_mmc_defconfig
 create mode 100644 configs/tqma6dl_mba6_spi_defconfig

-- 
1.9.1

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


[U-Boot] [PATCH 1/2] arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings

2017-02-03 Thread Markus Niebel
From: Markus Niebel <markus.nie...@tq-group.com>

We have a Kconfig name for the module types. Let's Use it.
Some feature selections and configurations are based on the
module. Module selection selects the CPU type.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>
---
 board/tqc/tqma6/tqma6_mba6.c | 13 +++--
 include/configs/tqma6.h  |  8 
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index 4db1a0b..b51751d 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -54,19 +54,19 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
PAD_CTL_ODE | PAD_CTL_SRE_FAST)
 
-#if defined(CONFIG_MX6Q)
+#if defined(CONFIG_TQMA6Q)
 
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0790
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e07ac
 
-#elif defined(CONFIG_MX6S)
+#elif defined(CONFIG_TQMA6S)
 
 #define IOMUX_SW_PAD_CTRL_GRP_DDR_TYPE_RGMII   0x02e0768
 #define IOMUX_SW_PAD_CTRL_GRP_RGMII_TERM   0x02e0788
 
 #else
 
-#error "need to define target CPU"
+#error "need to select module"
 
 #endif
 
@@ -259,14 +259,15 @@ int board_phy_config(struct phy_device *phydev)
 {
 /*
  * optimized pad skew values depends on CPU variant on the TQMa6x module:
- * i.MX6Q/D or i.MX6DL/S
+ * CONFIG_TQMA6Q: i.MX6Q/D
+ * CONFIG_TQMA6S: i.MX6S
  */
-#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
+#if defined(CONFIG_TQMA6Q)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0032
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
 #define MBA6X_KSZ9031_TX_SKEW  0x2036
-#elif defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
+#elif defined(CONFIG_TQMA6S)
 #define MBA6X_KSZ9031_CTRL_SKEW0x0030
 #define MBA6X_KSZ9031_CLK_SKEW 0x03ff
 #define MBA6X_KSZ9031_RX_SKEW  0x
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 09783a2..b47f9b8 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -18,17 +18,17 @@
 /* #endif */
 
 /* place code in last 4 MiB of RAM */
-#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
+#if defined(CONFIG_TQMA6S)
 #define CONFIG_SYS_TEXT_BASE   0x2fc0
-#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6D)
+#elif defined(CONFIG_TQMA6Q)
 #define CONFIG_SYS_TEXT_BASE   0x4fc0
 #endif
 
 #include "mx6_common.h"
 
-#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
+#if defined(CONFIG_TQMA6S)
 #define PHYS_SDRAM_SIZE(512u * SZ_1M)
-#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6D)
+#elif defined(CONFIG_TQMA6Q)
 #define PHYS_SDRAM_SIZE(1024u * SZ_1M)
 #endif
 
-- 
1.9.1

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


Re: [U-Boot] [PATCH v8 05/23] net: Kconfig: Add FEC_MXC entry

2016-10-26 Thread Markus Niebel
Hello

Am Montag, den 24.10.2016, 17:27 +0530 schrieb Jagan Teki:
> From: Jagan Teki 
> 
> Added kconfig for FEC_MXC driver.
> 
> Cc: Joe Hershberger 
> Cc: Simon Glass 
> Cc: Fabio Estevam 
> Cc: Stefano Babic 
> Cc: Peng Fan 
> Cc: Matteo Lisi 
> Cc: Michael Trimarchi 
> Signed-off-by: Jagan Teki 
> ---
>  drivers/net/Kconfig | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index 302c005..7b9961d 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -129,6 +129,13 @@ config ETHOC
>   help
> This MAC is present in OpenRISC and Xtensa XTFPGA boards.
>  
> +config FEC_MXC
> + bool "FEC Ethernet controller"
afaik this deriver is also used on i.MX53 / i.MX7 and others
> + depends on MX6
> + help
this IP-core supports 1GBit at least for i.MX6QDL and i.MX7
> +   This driver supports the 10/100 Fast Ethernet controller for
> +   NXP i.MX processors.
> +
>  config MVPP2
>   bool "Marvell Armada 375 network interface support"
>   depends on ARMADA_375

Markus

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


Re: [U-Boot] [PATCH v8 01/23] serial: Kconfig: Add MXC_UART entry

2016-10-26 Thread Markus Niebel
Hello

Am Montag, den 24.10.2016, 17:27 +0530 schrieb Jagan Teki:
> From: Jagan Teki 
> 
> Added kconfig for MXC_UART driver.
> 
> Cc: Simon Glass 
> Cc: Fabio Estevam 
> Cc: Stefano Babic 
> Cc: Peng Fan 
> Cc: Matteo Lisi 
> Cc: Michael Trimarchi 
> Signed-off-by: Jagan Teki 
> ---
>  drivers/serial/Kconfig | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 541cf2e..317d158 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -309,6 +309,13 @@ config MVEBU_A3700_UART
> Choose this option to add support for UART driver on the Marvell
> Armada 3700 SoC. The base address is configured via DT.
>  
> +config MXC_UART
> + bool "IMX serial port support"
> + depends on MX6
isn't this driver not used for i.MX53 etc?
> + help
> +   If you have a machine based on a Motorola IMX CPU you
should we use current company name: Motorola -> NXP / Freescale?
> +   can enable its onboard serial port by enabling this option.
> +
>  config PIC32_SERIAL
>   bool "Support for Microchip PIC32 on-chip UART"
>   depends on DM_SERIAL && MACH_PIC32

Markus

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


Re: [U-Boot] U-Boot - Download URL and certificates

2015-10-08 Thread Markus Niebel
Hello

Am 07.10.2015 um 21:22 schrieb Wolfgang Denk:
> Dear Markus,
> 
> In message <56122fa6.8010...@tqsc.de> you wrote:
>>
>> we are facing problems with downloading U-Boot tarballs and
>> automated build systems.
> 
> Tarballs?  But that should be trivial.  Tarballs are easily available
> on the FTP server.  They are also eavailable on ACD, but this is not
> exactly easy to script.  See [1], bullet # 2 for details.
> 
> Alternatively, you can always use the snapshot links from the git
> repository to dynamically create and download tarballs of arbitrary
> versions in the git repo.  This is also trivial to script (but please
> minimize such use to the necessary, as it puts a high load on the git
> server).
> 
> 
>> The old URL are redirected to owncloud.denx.de and owncloud.denx.de
>> uses a self signed certificate.
> 
> What exactly do you mean by "old URL"?
> 

Thank you for clarification. When digging a bit deeper I saw that
something on out side messes with URLs - there is a mixup with 
ftp and http - and in fact http://ftp.denx.de gets redirected to an
owncloud URL. Have to look in this.

> owncloud.denx.de is in no way used for distributing the mainline
> versions of U-Boot.  We host a number of customer specific
> repositories there, that's true, but these customers know how to
> access it.  I don't think that there are any TQ specific repositories
> on our owncloud server.
> 
> 
>> Did we miss the hint where to get the certificate(s)?
> 
> I think you must be doing something wrong.  No certificates are needed
> to download the tarballs from the FTP server, ACD or git. 
> 
> 
> [1] http://www.denx.de/wiki/U-Boot/SourceCode
> 
> 
> Hope this helps.
> 

Thanks again and sorry for the noise

Best regards,

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


[U-Boot] U-Boot - Download URL and certificates

2015-10-05 Thread Markus Niebel
Hello,

we are facing problems with downloading U-Boot tarballs and automated build 
systems. The old URL are redirected to owncloud.denx.de and owncloud.denx.de 
uses a self signed certificate. 

To make things a little bit complexer - we need to use a proxy for all web 
accesses. The download breaks 
because the certificate can not be verified.

Did we miss the hint where to get the certificate(s)?

Any help is appreciated.

Best regards,

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


Re: [U-Boot] [PATCH 1/2] mx6: remove SYS_SOC from board Kconfig

2015-09-07 Thread Markus Niebel
Hello,

Am 07.09.2015 um 08:59 schrieb Peng Fan:
> Remove duplicated SYS_SOC Kconfig entry from board Kconfig,
> because we have this entry in arch/arm/cpu/armv7/mx6/Kconfig.
> 
> Signed-off-by: Peng Fan <peng@freescale.com>
> Cc: Stefano Babic <sba...@denx.de>
> Cc: Heiko Schocher <h...@denx.de>
> Cc: Christian Gmeiner <christian.gmei...@gmail.com>
> Cc: Stefan Roese <s...@denx.de>
> Cc: Troy Kisky <troy.ki...@boundarydevices.com>
> Cc: Nikita Kiryanov <nik...@compulab.co.il>
> Cc: "Eric Bénard" <e...@eukrea.com>
> Cc: Fabio Estevam <fabio.este...@freescale.com>
> Cc: Tim Harvey <thar...@gateworks.com>
> Cc: Marek Vasut <ma...@denx.de>
> Cc: Markus Niebel <markus.nie...@tq-group.com>
> Cc: Otavio Salvador <ota...@ossystems.com.br>
> ---
>  board/aristainetos/Kconfig  | 9 -
>  board/bachmann/ot1200/Kconfig   | 3 ---
>  board/barco/platinum/Kconfig| 6 --
>  board/barco/titanium/Kconfig| 3 ---
>  board/boundary/nitrogen6x/Kconfig   | 3 ---
>  board/compulab/cm_fx6/Kconfig   | 3 ---
>  board/congatec/cgtqmx6eval/Kconfig  | 3 ---
>  board/embest/mx6boards/Kconfig  | 3 ---
>  board/freescale/mx6qarm2/Kconfig| 3 ---
>  board/freescale/mx6qsabreauto/Kconfig   | 3 ---
>  board/freescale/mx6sabresd/Kconfig  | 3 ---
>  board/freescale/mx6slevk/Kconfig| 3 ---
>  board/freescale/mx6sxsabresd/Kconfig| 3 ---
>  board/freescale/mx6ul_14x14_evk/Kconfig | 3 ---
>  board/gateworks/gw_ventana/Kconfig  | 3 ---
>  board/kosagi/novena/Kconfig | 3 ---
>  board/solidrun/mx6cuboxi/Kconfig| 3 ---
>  board/tqc/tqma6/Kconfig | 3 ---
>  board/udoo/Kconfig  | 3 ---
>  board/wandboard/Kconfig | 3 ---
>  board/warp/Kconfig  | 3 ---
>  21 files changed, 72 deletions(-)
> 
> diff --git a/board/aristainetos/Kconfig b/board/aristainetos/Kconfig
> index e987f38..e416c9a 100644
> --- a/board/aristainetos/Kconfig
> +++ b/board/aristainetos/Kconfig
> @@ -3,9 +3,6 @@ if TARGET_ARISTAINETOS
>  config SYS_BOARD
>   default "aristainetos"
>  
> -config SYS_SOC
> - default "mx6"
> -
>  config SYS_CONFIG_NAME
>   default "aristainetos"
>  
> @@ -16,9 +13,6 @@ if TARGET_ARISTAINETOS2
>  config SYS_BOARD
>   default "aristainetos"
>  
> -config SYS_SOC
> - default "mx6"
> -
>  config SYS_CONFIG_NAME
>   default "aristainetos2"
>  
> @@ -29,9 +23,6 @@ if TARGET_ARISTAINETOS2B
>  config SYS_BOARD
>   default "aristainetos"
>  
> -config SYS_SOC
> - default "mx6"
> -
>  config SYS_CONFIG_NAME
>   default "aristainetos2b"
>  
> diff --git a/board/bachmann/ot1200/Kconfig b/board/bachmann/ot1200/Kconfig
> index 7f8a6a1..4ccb60a 100644
> --- a/board/bachmann/ot1200/Kconfig
> +++ b/board/bachmann/ot1200/Kconfig
> @@ -6,9 +6,6 @@ config SYS_BOARD
>  config SYS_VENDOR
>   default "bachmann"
>  
> -config SYS_SOC
> - default "mx6"
> -
>  config SYS_CONFIG_NAME
>   default "ot1200"
>  
> diff --git a/board/barco/platinum/Kconfig b/board/barco/platinum/Kconfig
> index 8bbad24..cc0648c 100644
> --- a/board/barco/platinum/Kconfig
> +++ b/board/barco/platinum/Kconfig
> @@ -6,9 +6,6 @@ config SYS_CPU
>  config SYS_VENDOR
>   default "barco"
>  
> -config SYS_SOC
> - default "mx6"
> -
>  config SYS_BOARD
>   default "platinum"
>  
> @@ -25,9 +22,6 @@ config SYS_CPU
>  config SYS_VENDOR
>   default "barco"
>  
> -config SYS_SOC
> - default "mx6"
> -
>  config SYS_BOARD
>   default "platinum"
>  
> diff --git a/board/barco/titanium/Kconfig b/board/barco/titanium/Kconfig
> index b6f7c85..21bc36e 100644
> --- a/board/barco/titanium/Kconfig
> +++ b/board/barco/titanium/Kconfig
> @@ -6,9 +6,6 @@ config SYS_BOARD
>  config SYS_VENDOR
>   default "barco"
>  
> -config SYS_SOC
> - default "mx6"
> -
>  config SYS_CONFIG_NAME
>   default "titanium"
>  
> diff --git a/board/boundary/nitrogen6x/Kconfig 
> b/board/boundary/nitrogen6x/Kconfig
> index 03b0f6f..f4db56d 100644
> --- a/board/boundary/nitrogen6x/Kconfig
> +++ b/board/boundary/nitrogen6x/Kconfig
> @@ -6,9 +6,6 @@ config SYS_BOARD
>  config SYS_VENDOR
>   default "boundary"
>  
> -config SYS_SOC
> - default "mx6&

Re: [U-Boot] armv7 DMA and cache mangement functions

2015-08-28 Thread Markus Niebel
Am 27.08.2015 um 19:41 schrieb Mark Rutland:
 On Mon, Aug 24, 2015 at 08:54:17AM +0100, Markus Niebel wrote:
 Hello,

 I'm not an expert in the low level details of this area. So please sorry if 
 there are
 wrong assumptions in this post post.

 Hardware: i.MX6 Solo (TQMa6 on custom Mainboard)
 U-Boot: 2014.10
 gcc: 4.8.3 

 We see an error using TFTP on i.MX6 that seems to triggered, if the code / 
 data size goes
 over a limit. Code changes have nothing to do with network stack, network 
 drivers, 
 memory mangement. TFTP will completely unusable: device sees frequently 
 erroneous packages 
 with different of wierd errors. If code stays below this size all works fine.

 Up to now we checked a lot of things. The following brought us to the 
 assumption, that this
 could be cache related:

 dynamically disable data cache before doing TFTP:TFTP works well again
 running with disabled L2 cache (data cache enabled): TFTP works well again

 Looking at the code in drivers/net/fec_mxc.c, function fec_recv we see a 
 call to
 invalidate_dcache_range before accessing the received ethernet data. When 
 looking at
 the code for invalidate_dcache_range in arch/arm/cpu/armv7/cache_v7.c an 
 comparing
 how the things done in linux and barebox we noticed that the order of L2 
 chache / data cache
 invalidation is just swapped there. Applying this to the receive code for 
 fec_mxc,
 TFTP will work again.

 Question: is the order of cache invalidation important?
 
 The order is important.
 
 Consider the case where both the external and architected caches contain
 stale (but clean) cache lines for the region you care about.
 
 If you invalidate the architected caches before the external L2, the
 architected caches may speculatively fetch (stale) data from the L2
 before the L2 is cleaned, and so in the end you may still see stale
 data in the architected caches.
 
 If you invalidate the L2 first, the architected caches could
 speculatively fetch from the L2 (stale) or memory (new) while this is in
 progress, but they will then be invalidated, and from then on can only
 fetch the new data.
 
 That assumes that both levels were clean to begin with. If they are not,
 then additional maintenance is required. It's also conceivable that
 caches could be implemented such that the above is insufficient, YMMV.
 

Thank you for the clarification. Given your statement the code in question:

arch/arm/cpu/armv7/cache_v7.c

/*
 * Invalidates range in all levels of D-cache/unified cache used:
 * Affects the range [start, stop - 1]
 */
void invalidate_dcache_range(unsigned long start, unsigned long stop)
{
v7_dcache_maint_range(start, stop, ARMV7_DCACHE_INVAL_RANGE);

v7_outer_cache_inval_range(start, stop);
}

is wrong - and also the flush_dcache_all logic.

Given 
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14802.html
the chache invalidate handler needs to be fixed in a way, that also the 
platforms providing
atomic maintenance are taken in account.

Correct me if I'm wrong.

Regards 

Markus

 Thanks,
 Mark.
 

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


[U-Boot] [RFC PATCH] arm: cache_v7: fix dcache invalidation

2015-08-28 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

according to

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14802.html

and the clarification given by Marc Rutland of ARM

data cache invalidation should go from outer to inner cache.
This patch corrects the order in

flush_dcache_range
flush_dcache_all

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 arch/arm/cpu/armv7/cache_v7.c | 8 
 include/configs/tqma6.h   | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index a5aa4fa..81eb286 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -235,9 +235,9 @@ static void v7_inval_tlb(void)
 
 void invalidate_dcache_all(void)
 {
-   v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL);
-
v7_outer_cache_inval_all();
+
+   v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL);
 }
 
 /*
@@ -257,9 +257,9 @@ void flush_dcache_all(void)
  */
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
-   v7_dcache_maint_range(start, stop, ARMV7_DCACHE_INVAL_RANGE);
-
v7_outer_cache_inval_range(start, stop);
+
+   v7_dcache_maint_range(start, stop, ARMV7_DCACHE_INVAL_RANGE);
 }
 
 /*
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index f7fade1..0a0cbbe 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -111,10 +111,11 @@
 
 #define CONFIG_ARP_TIMEOUT 200UL
 /* Network config - Allow larger/faster download for TFTP/NFS */
+/*
 #define CONFIG_IP_DEFRAG
 #define CONFIG_TFTP_BLOCKSIZE  4096
 #define CONFIG_NFS_READ_SIZE   4096
-
+*/
 /* Command definition */
 #define CONFIG_CMD_BMODE
 
-- 
2.3.0

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


[U-Boot] [RFC PATCH v2] arm: cache_v7: fix dcache invalidation

2015-08-28 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

according to

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14802.html

and the clarification given by Marc Rutland of ARM

data cache invalidation should go from outer to inner cache.
This patch corrects the order in

flush_dcache_range
flush_dcache_all

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
Changes for v2:
- delete non related stuff (thanks to Hannes Schmelzer)

 arch/arm/cpu/armv7/cache_v7.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index a5aa4fa..81eb286 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -235,9 +235,9 @@ static void v7_inval_tlb(void)
 
 void invalidate_dcache_all(void)
 {
-   v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL);
-
v7_outer_cache_inval_all();
+
+   v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL);
 }
 
 /*
@@ -257,9 +257,9 @@ void flush_dcache_all(void)
  */
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
-   v7_dcache_maint_range(start, stop, ARMV7_DCACHE_INVAL_RANGE);
-
v7_outer_cache_inval_range(start, stop);
+
+   v7_dcache_maint_range(start, stop, ARMV7_DCACHE_INVAL_RANGE);
 }
 
 /*
-- 
2.3.0

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


Re: [U-Boot] [RFC PATCH] arm: cache_v7: fix dcache invalidation

2015-08-28 Thread Markus Niebel
Am 28.08.2015 um 15:37 schrieb Hannes Schmelzer:
 Hi Markus,
 
 On 2015-08-28 15:12, Markus Niebel wrote:
 /*
 diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
 index f7fade1..0a0cbbe 100644
 --- a/include/configs/tqma6.h
 +++ b/include/configs/tqma6.h
 @@ -111,10 +111,11 @@
 #define CONFIG_ARP_TIMEOUT200UL
   /* Network config - Allow larger/faster download for TFTP/NFS */
 +/*
   #define CONFIG_IP_DEFRAG
   #define CONFIG_TFTP_BLOCKSIZE4096
   #define CONFIG_NFS_READ_SIZE4096
 -
 +*/
   /* Command definition */
   #define CONFIG_CMD_BMODE
 Is this change some mistake ?

You are right. Should not be here - sorry.

 If not, please separate it from your first patch.
 
 best regards,
 Hannes
 

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


Re: [U-Boot] armv7 DMA and cache mangement functions

2015-08-27 Thread Markus Niebel
just a friendly ping:

Am 24.08.2015 um 09:54 schrieb Markus Niebel:
 Hello,
 
 I'm not an expert in the low level details of this area. So please sorry if 
 there are
 wrong assumptions in this post post.
 
 Hardware: i.MX6 Solo (TQMa6 on custom Mainboard)
 U-Boot: 2014.10
 gcc: 4.8.3 
 
 We see an error using TFTP on i.MX6 that seems to triggered, if the code / 
 data size goes
 over a limit. Code changes have nothing to do with network stack, network 
 drivers, 
 memory mangement. TFTP will completely unusable: device sees frequently 
 erroneous packages 
 with different of wierd errors. If code stays below this size all works fine.
 
 Up to now we checked a lot of things. The following brought us to the 
 assumption, that this
 could be cache related:
 
 dynamically disable data cache before doing TFTP: TFTP works well again
 running with disabled L2 cache (data cache enabled):  TFTP works well again
 
 Looking at the code in drivers/net/fec_mxc.c, function fec_recv we see a call 
 to
 invalidate_dcache_range before accessing the received ethernet data. When 
 looking at
 the code for invalidate_dcache_range in arch/arm/cpu/armv7/cache_v7.c an 
 comparing
 how the things done in linux and barebox we noticed that the order of L2 
 chache / data cache
 invalidation is just swapped there. Applying this to the receive code for 
 fec_mxc,
 TFTP will work again.
 
 Question: is the order of cache invalidation important?
 
 Thanks
 
 Markus
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
 

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


[U-Boot] armv7 DMA and cache mangement functions

2015-08-24 Thread Markus Niebel
Hello,

I'm not an expert in the low level details of this area. So please sorry if 
there are
wrong assumptions in this post post.

Hardware: i.MX6 Solo (TQMa6 on custom Mainboard)
U-Boot: 2014.10
gcc: 4.8.3 

We see an error using TFTP on i.MX6 that seems to triggered, if the code / data 
size goes
over a limit. Code changes have nothing to do with network stack, network 
drivers, 
memory mangement. TFTP will completely unusable: device sees frequently 
erroneous packages 
with different of wierd errors. If code stays below this size all works fine.

Up to now we checked a lot of things. The following brought us to the 
assumption, that this
could be cache related:

dynamically disable data cache before doing TFTP:   TFTP works well again
running with disabled L2 cache (data cache enabled):TFTP works well again

Looking at the code in drivers/net/fec_mxc.c, function fec_recv we see a call to
invalidate_dcache_range before accessing the received ethernet data. When 
looking at
the code for invalidate_dcache_range in arch/arm/cpu/armv7/cache_v7.c an 
comparing
how the things done in linux and barebox we noticed that the order of L2 chache 
/ data cache
invalidation is just swapped there. Applying this to the receive code for 
fec_mxc,
TFTP will work again.

Question: is the order of cache invalidation important?

Thanks

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


Re: [U-Boot] [PATCH v2] arm: mx6: tqma6: Add WRU-IV baseboard for the TQMa6 SoM

2015-07-24 Thread Markus Niebel
Hello Stefan,

sorry for replaying late.

Am 06.07.2015 um 13:36 schrieb Stefan Roese:
 This patch adds support for the OHB System AG baseboard
 with is equipped with the TQMa6S SoM.
 
 Signed-off-by: Stefan Roese s...@denx.de

Acked-by Markus Niebel markus.nie...@tq-group.com

 Cc: Markus Niebel markus.nie...@tq-group.com
 Cc: Stefano Babic sba...@denx.de
 ---
 v2:
 - board_eth_init() simplified as suggested by Markus
 - PHY reset GPIO only defined once as suggested by Markus
 - All GPIOs are now requested before usage as suggested by Markus
 - Used new tqma6 Kconfig IF as suggested by Markus
 

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


Re: [U-Boot] [PATCH] gpio: mxc_gpio: enable DM gpio before relocation

2015-06-17 Thread Markus Niebel
Hello Simon,

Am 16.06.2015 um 23:44 schrieb Simon Glass:
 Hi Markus,
 
 On 16 June 2015 at 01:08, Markus Niebel list-09_u-b...@tqsc.de wrote:
 From: Markus Niebel markus.nie...@tq-group.com

 gpio often are needed to detect revision and variants.
 Therefore gpio should be available ASAP.

 Signed-off-by: Markus Niebel markus.nie...@tq-group.com
 ---
  drivers/gpio/mxc_gpio.c | 1 +
  1 file changed, 1 insertion(+)

 diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
 index 2012f99..925758a 100644
 --- a/drivers/gpio/mxc_gpio.c
 +++ b/drivers/gpio/mxc_gpio.c
 @@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = {
 .priv_auto_alloc_size = sizeof(struct mxc_bank_info),
 .of_match = mxc_gpio_ids,
 .bind   = mxc_gpio_bind,
 +   .flags  = DM_FLAG_PRE_RELOC,
  };

  #ifndef CONFIG_OF_CONTROL
 --
 2.3.0

 
 This should really be done in the device tree with the
 u-boot,dm-pre-reloc property for the particular GPIO banks you need. I
 don't think this should be a global setting.
 

I totally agree for the longer run - but tegra gpio does it the same way.

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


Re: [U-Boot] [PATCH] gpio: mxc_gpio: enable DM gpio before relocation

2015-06-17 Thread Markus Niebel
Am 17.06.2015 um 17:04 schrieb Simon Glass:
 Hi Markus,
 
 On 17 June 2015 at 00:18, Markus Niebel list-09_u-b...@tqsc.de wrote:

 Hello Simon,

 Am 16.06.2015 um 23:44 schrieb Simon Glass:
 Hi Markus,

 On 16 June 2015 at 01:08, Markus Niebel list-09_u-b...@tqsc.de wrote:
 From: Markus Niebel markus.nie...@tq-group.com

 gpio often are needed to detect revision and variants.
 Therefore gpio should be available ASAP.

 Signed-off-by: Markus Niebel markus.nie...@tq-group.com
 ---
  drivers/gpio/mxc_gpio.c | 1 +
  1 file changed, 1 insertion(+)

 diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
 index 2012f99..925758a 100644
 --- a/drivers/gpio/mxc_gpio.c
 +++ b/drivers/gpio/mxc_gpio.c
 @@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = {
 .priv_auto_alloc_size = sizeof(struct mxc_bank_info),
 .of_match = mxc_gpio_ids,
 .bind   = mxc_gpio_bind,
 +   .flags  = DM_FLAG_PRE_RELOC,
  };

  #ifndef CONFIG_OF_CONTROL
 --
 2.3.0


 This should really be done in the device tree with the
 u-boot,dm-pre-reloc property for the particular GPIO banks you need. I
 don't think this should be a global setting.


 I totally agree for the longer run - but tegra gpio does it the same way.
 
 That's because it currently doesn't use device tree in SPL. I'll take
 a look at converting it over.
 
 Is your GPIO driver used in SPL?
 

As far as I understand: include/configs/imx6_spl.h defines 
CONFIG_SPL_GPIO_SUPPORT. So every mx6 board
using SPL includes GPIO. I2C driver for different imx SOC also uses GPIO for 
the bus reset logic. 
But I'm not too deep in the SPL stuff. BTW there is also no device tree support 
for mx6 in the moment 
in U-Boot.

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


[U-Boot] [PATCH] gpio: mxc_gpio: enable DM gpio before relocation

2015-06-16 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

gpio often are needed to detect revision and variants.
Therefore gpio should be available ASAP.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 drivers/gpio/mxc_gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 2012f99..925758a 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = {
.priv_auto_alloc_size = sizeof(struct mxc_bank_info),
.of_match = mxc_gpio_ids,
.bind   = mxc_gpio_bind,
+   .flags  = DM_FLAG_PRE_RELOC,
 };
 
 #ifndef CONFIG_OF_CONTROL
-- 
2.3.0

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


Re: [U-Boot] [PATCH] arm: mx6: tqma6: Add WRU-IV baseboard for the TQMa6 SoM

2015-06-15 Thread Markus Niebel
Hallo Stefan,

Am 15.06.2015 um 13:48 schrieb Stefan Roese:
 This patch adds support for the OHB System AG baseboard
 with is equipped with the TQMa6S SoM.
 
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Markus Niebel markus.nie...@tq-group.com
 Cc: Stefano Babic sba...@denx.de
 ---
  board/tqc/tqma6/Makefile  |   1 +
  board/tqc/tqma6/tqma6_wru4.c  | 352 
 ++
  configs/tqma6s_wru4_mmc_defconfig |  10 ++
  include/configs/tqma6.h   |   2 +
  include/configs/tqma6_wru4.h  |  71 
  5 files changed, 436 insertions(+)
  create mode 100644 board/tqc/tqma6/tqma6_wru4.c
  create mode 100644 configs/tqma6s_wru4_mmc_defconfig
  create mode 100644 include/configs/tqma6_wru4.h
 
 diff --git a/board/tqc/tqma6/Makefile b/board/tqc/tqma6/Makefile
 index 9ee6920..19b56d0 100644
 --- a/board/tqc/tqma6/Makefile
 +++ b/board/tqc/tqma6/Makefile
 @@ -7,3 +7,4 @@
  obj-y  := tqma6.o
  
  obj-$(CONFIG_MBA6) += tqma6_mba6.o
 +obj-$(CONFIG_WRU4) += tqma6_wru4.o
 diff --git a/board/tqc/tqma6/tqma6_wru4.c b/board/tqc/tqma6/tqma6_wru4.c
 new file mode 100644
 index 000..1f47e8c
 --- /dev/null
 +++ b/board/tqc/tqma6/tqma6_wru4.c
 @@ -0,0 +1,352 @@
 +/*
 + * Copyright (C) 2012 Freescale Semiconductor, Inc.
 + * Author: Fabio Estevam fabio.este...@freescale.com
 + *
 + * Copyright (C) 2013, 2014 TQ Systems (ported SabreSD to TQMa6x)
 + * Author: Markus Niebel markus.nie...@tq-group.com
 + *
 + * Copyright (C) 2015 Stefan Roese s...@denx.de
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +#include asm/io.h
 +#include asm/arch/clock.h
 +#include asm/arch/mx6-pins.h
 +#include asm/arch/imx-regs.h
 +#include asm/arch/iomux.h
 +#include asm/arch/sys_proto.h
 +#include asm/errno.h
 +#include asm/gpio.h
 +#include asm/imx-common/boot_mode.h
 +#include asm/imx-common/mxc_i2c.h
 +
 +#include common.h
 +#include fsl_esdhc.h
 +#include libfdt.h
 +#include malloc.h
 +#include i2c.h
 +#include micrel.h
 +#include miiphy.h
 +#include mmc.h
 +#include netdev.h
 +
 +#include tqma6_bb.h
 +
 +/* UART */
 +#define UART4_PAD_CTRL ( \
 + PAD_CTL_HYS |   \
 + PAD_CTL_PUS_100K_UP |   \
 + PAD_CTL_PUE |   \
 + PAD_CTL_PKE |   \
 + PAD_CTL_SPEED_MED | \
 + PAD_CTL_DSE_40ohm | \
 + PAD_CTL_SRE_SLOW\
 + )
 +
 +static iomux_v3_cfg_t const uart4_pads[] = {
 + NEW_PAD_CTRL(MX6_PAD_CSI0_DAT17__UART4_CTS_B, UART4_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_CSI0_DAT16__UART4_RTS_B, UART4_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_CSI0_DAT13__UART4_RX_DATA, UART4_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_CSI0_DAT12__UART4_TX_DATA, UART4_PAD_CTRL),
 +};
 +
 +static void setup_iomuxc_uart4(void)
 +{
 + imx_iomux_v3_setup_multiple_pads(uart4_pads, ARRAY_SIZE(uart4_pads));
 +}
 +
 +/* MMC */
 +#define USDHC2_PAD_CTRL (\
 + PAD_CTL_HYS |   \
 + PAD_CTL_PUS_47K_UP |\
 + PAD_CTL_SPEED_LOW | \
 + PAD_CTL_DSE_80ohm | \
 + PAD_CTL_SRE_FAST\
 + )
 +
 +#define USDHC2_CLK_PAD_CTRL (\
 + PAD_CTL_HYS |   \
 + PAD_CTL_PUS_47K_UP |\
 + PAD_CTL_SPEED_LOW | \
 + PAD_CTL_DSE_40ohm | \
 + PAD_CTL_SRE_FAST\
 + )
 +
 +static iomux_v3_cfg_t const usdhc2_pads[] = {
 + NEW_PAD_CTRL(MX6_PAD_SD2_CLK__SD2_CLK, USDHC2_CLK_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_SD2_CMD__SD2_CMD, USDHC2_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_SD2_DAT0__SD2_DATA0, USDHC2_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_SD2_DAT1__SD2_DATA1, USDHC2_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_SD2_DAT2__SD2_DATA2, USDHC2_PAD_CTRL),
 + NEW_PAD_CTRL(MX6_PAD_SD2_DAT3__SD2_DATA3, USDHC2_PAD_CTRL),
 +
 + NEW_PAD_CTRL(MX6_PAD_GPIO_4__GPIO1_IO04, USDHC2_PAD_CTRL), /* CD */
 + NEW_PAD_CTRL(MX6_PAD_GPIO_2__SD2_WP, USDHC2_PAD_CTRL), /* WP */
 +};
 +
 +#define USDHC2_CD_GPIO IMX_GPIO_NR(1, 4)
 +#define USDHC2_WP_GPIO IMX_GPIO_NR(1, 2)
 +
 +static struct fsl_esdhc_cfg usdhc2_cfg = {
 + .esdhc_base = USDHC2_BASE_ADDR,
 + .max_bus_width = 4,
 +};
 +
 +int tqma6_bb_board_mmc_getcd(struct mmc *mmc)
 +{
 + struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 + int ret = 0;
 +
 + if (cfg-esdhc_base == USDHC2_BASE_ADDR)
 + ret = !gpio_get_value(USDHC2_CD_GPIO);
 +
 + return ret;
 +}
 +
 +int tqma6_bb_board_mmc_getwp(struct mmc *mmc)
 +{
 + struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 + int ret = 0;
 +
 + if (cfg-esdhc_base == USDHC2_BASE_ADDR)
 + ret = gpio_get_value(USDHC2_WP_GPIO);
 +
 + return ret;
 +}
 +
 +int tqma6_bb_board_mmc_init(bd_t *bis

Re: [U-Boot] [PATCH v2 0/5] arm: imx6: tqma6: Kconfig rework

2015-06-15 Thread Markus Niebel
Hello,

Am 04.06.2015 um 17:25 schrieb Markus Niebel:
 From: Markus Niebel markus.nie...@tq-group.com
 
 This series extends the Kconfig options for TQMa6 to
 enable removal of CONFIG_SYS_EXTRA_OPTIONS for this boards.
 
 To enable env device / boot device configuration the first patch
 includes the Kconfig generated header in the board configuration
 header.
 
 To enable CPU selection the second patch moves the board selection
 to the i.MX6 CPU menu as implemented by the Seco mx6 boards
 
 Changed for v2:
 - rebase to current u-boot-imx
 - add new patch to fix envcrc build for non default boot / env 
   devices
 - regenerate defconfigs to exclude defaults
 

Did just notice, that I forgot Stefano in CC.
Shall I resend or spin v3 - maybe I should change the Kconfig
choices to be optional instead of having a default.
Also would it be better t squash the last 4 patches?

 Markus Niebel (5):
   arm: imx6: tqma6: add kconfig to board header
   arm: mx6: tqma6: CPU type selection via Kconfig
   arm: imx6: tqma6: implement IMX_CONFIG with Kconfig
   arm: imx6: tqma6: boot device selection via Kconfig
   arm: imx6: tqma6: implement KConfig baseboard selection
 
  arch/arm/Kconfig  |  5 
  arch/arm/cpu/armv7/mx6/Kconfig|  5 
  board/tqc/tqma6/Kconfig   | 58 
 +++
  configs/tqma6q_mba6_mmc_defconfig |  2 +-
  configs/tqma6q_mba6_spi_defconfig |  3 +-
  configs/tqma6s_mba6_mmc_defconfig |  3 +-
  configs/tqma6s_mba6_spi_defconfig |  4 ++-
  include/configs/tqma6.h   |  1 +
  8 files changed, 72 insertions(+), 9 deletions(-)
 

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


[U-Boot] [PATCH v2 0/5] arm: imx6: tqma6: Kconfig rework

2015-06-04 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This series extends the Kconfig options for TQMa6 to
enable removal of CONFIG_SYS_EXTRA_OPTIONS for this boards.

To enable env device / boot device configuration the first patch
includes the Kconfig generated header in the board configuration
header.

To enable CPU selection the second patch moves the board selection
to the i.MX6 CPU menu as implemented by the Seco mx6 boards

Changed for v2:
- rebase to current u-boot-imx
- add new patch to fix envcrc build for non default boot / env 
  devices
- regenerate defconfigs to exclude defaults

Markus Niebel (5):
  arm: imx6: tqma6: add kconfig to board header
  arm: mx6: tqma6: CPU type selection via Kconfig
  arm: imx6: tqma6: implement IMX_CONFIG with Kconfig
  arm: imx6: tqma6: boot device selection via Kconfig
  arm: imx6: tqma6: implement KConfig baseboard selection

 arch/arm/Kconfig  |  5 
 arch/arm/cpu/armv7/mx6/Kconfig|  5 
 board/tqc/tqma6/Kconfig   | 58 +++
 configs/tqma6q_mba6_mmc_defconfig |  2 +-
 configs/tqma6q_mba6_spi_defconfig |  3 +-
 configs/tqma6s_mba6_mmc_defconfig |  3 +-
 configs/tqma6s_mba6_spi_defconfig |  4 ++-
 include/configs/tqma6.h   |  1 +
 8 files changed, 72 insertions(+), 9 deletions(-)

-- 
2.3.0

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


[U-Boot] [PATCH v2 4/5] arm: imx6: tqma6: boot device selection via Kconfig

2015-06-04 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
Changes for v2:
- regenerate defconfigs

 board/tqc/tqma6/Kconfig   | 19 +++
 configs/tqma6q_mba6_mmc_defconfig |  2 +-
 configs/tqma6q_mba6_spi_defconfig |  3 ++-
 configs/tqma6s_mba6_mmc_defconfig |  2 +-
 configs/tqma6s_mba6_spi_defconfig |  3 ++-
 5 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index ce47ba4..132e82f 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -33,6 +33,25 @@ config TQMA6S
 
 endchoice
 
+choice
+   prompt TQMa6 boot configuration
+   default TQMA6X_MMC_BOOT
+   help
+ Configure boot device. This is also used to implement environment
+ location.
+
+config TQMA6X_MMC_BOOT
+   bool MMC / SD Boot
+   help
+ Boot from eMMC / SD Card
+
+config TQMA6X_SPI_BOOT
+   bool SPI NOR Boot
+   help
+ Boot from on board SPI NOR flash
+
+endchoice
+
 config IMX_CONFIG
default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
default board/tqc/tqma6/tqma6s.cfg if TQMA6S
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index ffdceb3..82a19b9 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -1,4 +1,4 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index dc88151..102291d 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 6c0763d..09a820e 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 4873ffb..d874dc2 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
-- 
2.3.0

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


[U-Boot] [PATCH v2 1/5] arm: imx6: tqma6: add kconfig to board header

2015-06-04 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

this is needed later to have Kconfig generated
stuff as define.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 include/configs/tqma6.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 4c93c9b..f9de0c6 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -9,6 +9,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include linux/kconfig.h
 /* SPL */
 /* #if defined(CONFIG_SPL_BUILD) */
 
-- 
2.3.0

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


[U-Boot] [PATCH v2 3/5] arm: imx6: tqma6: implement IMX_CONFIG with Kconfig

2015-06-04 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Now that we have the Kconfig based CPU type selection,
use this to fill the IMX_CONFIG automatically

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
Changes for v2:
- regenerate defconfigs

 board/tqc/tqma6/Kconfig   | 4 
 configs/tqma6q_mba6_mmc_defconfig | 2 +-
 configs/tqma6q_mba6_spi_defconfig | 2 +-
 configs/tqma6s_mba6_mmc_defconfig | 2 +-
 configs/tqma6s_mba6_spi_defconfig | 2 +-
 5 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 3e4d9f5..ce47ba4 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -33,4 +33,8 @@ config TQMA6S
 
 endchoice
 
+config IMX_CONFIG
+   default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
+   default board/tqc/tqma6/tqma6s.cfg if TQMA6S
+
 endif
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index e6dcc99..ffdceb3 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -1,4 +1,4 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index ab811a9..dc88151 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -1,4 +1,4 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index b7feb18..6c0763d 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 24d07cd..4873ffb 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
-- 
2.3.0

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


[U-Boot] [PATCH v2 2/5] arm: mx6: tqma6: CPU type selection via Kconfig

2015-06-04 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This is the first patch to remove the
CONFIG_SYS_EXTRA_OPTIONS.

This patch implements CPU type selection from Kconfig.
Further Kconfig stuff is added later.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
Changes in v2:
- regenerate defconfigs

 arch/arm/Kconfig  |  5 -
 arch/arm/cpu/armv7/mx6/Kconfig|  5 +
 board/tqc/tqma6/Kconfig   | 21 +
 configs/tqma6q_mba6_mmc_defconfig |  3 ++-
 configs/tqma6q_mba6_spi_defconfig |  3 ++-
 configs/tqma6s_mba6_mmc_defconfig |  4 +++-
 configs/tqma6s_mba6_spi_defconfig |  4 +++-
 7 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b62842f..2ea6643 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -576,10 +576,6 @@ config TARGET_TBS2910
bool Support tbs2910
select CPU_V7
 
-config TARGET_TQMA6
-   bool TQ Systems TQMa6 board
-   select CPU_V7
-
 config TARGET_OT1200
bool Bachmann OT1200
select CPU_V7
@@ -954,7 +950,6 @@ source board/ti/ti816x/Kconfig
 source board/timll/devkit3250/Kconfig
 source board/toradex/colibri_pxa270/Kconfig
 source board/toradex/colibri_vf/Kconfig
-source board/tqc/tqma6/Kconfig
 source board/trizepsiv/Kconfig
 source board/ttcontrol/vision2/Kconfig
 source board/udoo/Kconfig
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 1282be3..10908c4 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -33,11 +33,16 @@ config TARGET_SECOMX6
bool Support secomx6 boards
select CPU_V7
 
+config TARGET_TQMA6
+   bool TQ Systems TQMa6 board
+   select CPU_V7
+
 endchoice
 
 config SYS_SOC
default mx6
 
 source board/seco/Kconfig
+source board/tqc/tqma6/Kconfig
 
 endif
diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index f8b3d1f..3e4d9f5 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -12,4 +12,25 @@ config SYS_SOC
 config SYS_CONFIG_NAME
default tqma6
 
+choice
+   prompt TQMa6 SoC variant
+   default TQMA6Q
+   help
+ select the TQMa6 module variant. The variants differing in the used
+ i.MX6 CPU type and DRAM
+
+config TQMA6Q
+   bool TQMa6Q / TQMa6D
+   select MX6Q
+   help
+ select TQMa6Q / TQMa6D with i.MX6Q/D and 1GiB DRAM
+
+config TQMA6S
+   bool TQMa6S
+   select MX6S
+   help
+ select TQMa6S with i.MX6S and 512 MiB DRAM
+
+endchoice
+
 endif
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 627883a..e6dcc99 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -1,3 +1,4 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index a56a802..ab811a9 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -1,3 +1,4 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_SPI_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 51958e2..b7feb18 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -1,3 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_MMC_BOOT
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index f94f704..24d07cd 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -1,3 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
-- 
2.3.0

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


[U-Boot] [PATCH v2 5/5] arm: imx6: tqma6: implement KConfig baseboard selection

2015-06-04 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

this finally removes the need for extra settings in
defconfig

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
Changes for v2:
- add default for new choice
- regenerate defconfigs

 board/tqc/tqma6/Kconfig   | 14 ++
 configs/tqma6q_mba6_mmc_defconfig |  1 -
 configs/tqma6q_mba6_spi_defconfig |  1 -
 configs/tqma6s_mba6_mmc_defconfig |  1 -
 configs/tqma6s_mba6_spi_defconfig |  1 -
 5 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 132e82f..b56237d 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -52,6 +52,20 @@ config TQMA6X_SPI_BOOT
 
 endchoice
 
+choice
+   prompt TQMa6 base board variant
+   default MBA6
+   help
+ Select base board for TQMa6
+
+config MBA6
+   bool TQMa6 on MBa6 Starterkit
+   help
+ Select the MBa6 starterkit. This features a GigE Phy, USB, SD-Card
+ etc.
+
+endchoice
+
 config IMX_CONFIG
default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
default board/tqc/tqma6/tqma6s.cfg if TQMA6S
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 82a19b9..7e67132 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -1,4 +1,3 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 102291d..1f91f6d 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -2,4 +2,3 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6X_SPI_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 09a820e..2eb891b 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,3 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index d874dc2..92b9711 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -3,4 +3,3 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
 CONFIG_TQMA6X_SPI_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
-- 
2.3.0

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


Re: [U-Boot] [PATCH] mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX

2015-05-28 Thread Markus Niebel
Am 28.05.2015 um 12:21 schrieb Stefano Babic:
 Hi Fabio,
 
 On 28/05/2015 11:52, Stefano Babic wrote:
 On 27/05/2015 04:22, Fabio Estevam wrote:
 From: Fabio Estevam fabio.este...@freescale.com

 Commit 8183058188cd2d942 (imx6: centralise common boot options in
 mx6_common.h) broke boot on mx6sl and mx6sx by assuming that all mx6
 SoCs use the same LOADADDR/SYS_TEXT_BASE range, which is not correct.

 DDR on mx6sx/mx6sl starts at 0x8000.

 Adjust LOADADDR/SYS_TEXT_BASE to the proper values for mx6sx/mx6sl,
 so that these SoCs can boot again.

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---
  include/configs/mx6_common.h | 7 ++-
  1 file changed, 6 insertions(+), 1 deletion(-)

 diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
 index 233c6d2..bd16ec2 100644
 --- a/include/configs/mx6_common.h
 +++ b/include/configs/mx6_common.h
 @@ -53,10 +53,15 @@
  #define CONFIG_REVISION_TAG
  
  /* Boot options */
 +#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL))
 +#define CONFIG_LOADADDR0x8200
 +#define CONFIG_SYS_TEXT_BASE   0x8780
 +#else
  #define CONFIG_LOADADDR0x1200
 +#define CONFIG_SYS_TEXT_BASE   0x1780
 +#endif
  #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
  #ifndef CONFIG_SYS_TEXT_BASE
 -#define CONFIG_SYS_TEXT_BASE   0x1780
  #endif
  #ifndef CONFIG_BOOTDELAY
  #define CONFIG_BOOTDELAY   3


 Applied to u-boot-imx, thanks !

 
 Sorry, it is not. This breaks (warnings) the tqma6 board. At least we
 have to undefine CONFIG_SYS_TEXT_BASE in tqma6.h because this board
 redefines it. I added Markus (b oard maintainer in CC), as he can better
 explain while this single board requires different CONFIG_SYS_TEXT_BASE.
 From the addresses I guess he will avoid relocation.
 

We do it to have the U-Boot at the end of RAM - some projects using the TQMa6
requires that we have most of RAM available - for instance during system 
updates.

Markus

 Best regards,
 Stefano Babic
 
 
 


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


Re: [U-Boot] [Patch v3 0/4] imx: mx6: use OTP for teperature grade info

2015-05-20 Thread Markus Niebel
Am 18.05.2015 um 15:56 schrieb Tim Harvey:
 Use Temperature grade info in OTP/eFUSE for thermal management and display of
 thermal data.
 
 Cc: Stefan Roese s...@denx.de
 Cc: Eric Nelson eric.nel...@boundarydevices.com
 Cc: Heiko Schocher h...@denx.de
 Cc: Nikita Kiryanov nik...@compulab.co.il
 Cc: Jon Nettleton jon.nettle...@gmail.com
 Cc: Jason Liu r64...@freescale.com
 Cc: Ye Li b37...@freescale.com
 Cc: Fabio Estevam fabio.este...@freescale.com
 Cc: Christian Gmeiner christian.gmei...@gmail.com
 Cc: Markus Niebel markus.nie...@tq-group.com
 Cc: Peng Fan b51...@freescale.com
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---
 v3:
  - include display of temperature grade for IMX6SX
 v2:
  - split into two series: 1 for CPU frequency, other for Temperature grade
 
 Tim Harvey (4):
   mx6: add OTP bank1 registers
   imx: mx6: add get_cpu_temp_grade to obtain cpu temperature grade from
 OTP
   imx: mx6: add display of CPU temperature grade in print_cpuinfo()
   thermal: imx_thermal: use CPU temperature grade for trip points
 
  arch/arm/cpu/armv7/mx6/soc.c  | 38 
 +++
  arch/arm/imx-common/cpu.c | 25 
  arch/arm/include/asm/arch-mx6/imx-regs.h  | 19 
  arch/arm/include/asm/arch-mx6/sys_proto.h |  1 +
  drivers/thermal/imx_thermal.c | 29 +++
  include/imx_thermal.h |  6 +
  6 files changed, 104 insertions(+), 14 deletions(-)
 

Tested on TQMa6Q and TQMa6D

following patches were also applied:
https://patchwork.ozlabs.org/patch/473405/
https://patchwork.ozlabs.org/patch/473406/

Tested-by: Markus Niebel markus.nie...@tq-group.com

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


Re: [U-Boot] [Resend PATCH 2/4] arm: imx6: tqma6: implement IMX_CONFIG with Kconfig

2015-05-18 Thread Markus Niebel
Hello Stefano,

Am 15.05.2015 um 14:38 schrieb Stefano Babic:
 Hi Markus,
 
 On 12/05/2015 14:18, Markus Niebel wrote:
 From: Markus Niebel markus.nie...@tq-group.com

 Now that we have the Kconfig based CPU type selection,
 use this to fill the IMX_CONFIG automatically

 Signed-off-by: Markus Niebel markus.nie...@tq-group.com
 ---
  board/tqc/tqma6/Kconfig   | 4 
  configs/tqma6q_mba6_mmc_defconfig | 2 +-
  configs/tqma6q_mba6_spi_defconfig | 2 +-
  configs/tqma6s_mba6_mmc_defconfig | 2 +-
  configs/tqma6s_mba6_spi_defconfig | 2 +-
  5 files changed, 8 insertions(+), 4 deletions(-)

 diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
 index 3e4d9f5..ce47ba4 100644
 --- a/board/tqc/tqma6/Kconfig
 +++ b/board/tqc/tqma6/Kconfig
 @@ -33,4 +33,8 @@ config TQMA6S
  
  endchoice
  
 +config IMX_CONFIG
 +default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
 +default board/tqc/tqma6/tqma6s.cfg if TQMA6S
 +
  endif
 diff --git a/configs/tqma6q_mba6_mmc_defconfig 
 b/configs/tqma6q_mba6_mmc_defconfig
 index 42d8928..59e7859 100644
 --- a/configs/tqma6q_mba6_mmc_defconfig
 +++ b/configs/tqma6q_mba6_mmc_defconfig
 @@ -2,4 +2,4 @@ CONFIG_ARM=y
  CONFIG_ARCH_MX6=y
  CONFIG_TARGET_TQMA6=y
  CONFIG_TQMA6Q=y
 -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
 +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
 diff --git a/configs/tqma6q_mba6_spi_defconfig 
 b/configs/tqma6q_mba6_spi_defconfig
 index 7371b3d..db65778 100644
 --- a/configs/tqma6q_mba6_spi_defconfig
 +++ b/configs/tqma6q_mba6_spi_defconfig
 @@ -2,4 +2,4 @@ CONFIG_ARM=y
  CONFIG_ARCH_MX6=y
  CONFIG_TARGET_TQMA6=y
  CONFIG_TQMA6Q=y
 -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
 +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
 diff --git a/configs/tqma6s_mba6_mmc_defconfig 
 b/configs/tqma6s_mba6_mmc_defconfig
 index b7feb18..6c0763d 100644
 --- a/configs/tqma6s_mba6_mmc_defconfig
 +++ b/configs/tqma6s_mba6_mmc_defconfig
 @@ -2,4 +2,4 @@ CONFIG_ARM=y
  CONFIG_ARCH_MX6=y
  CONFIG_TARGET_TQMA6=y
  CONFIG_TQMA6S=y
 -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
 +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
 diff --git a/configs/tqma6s_mba6_spi_defconfig 
 b/configs/tqma6s_mba6_spi_defconfig
 index 24d07cd..4873ffb 100644
 --- a/configs/tqma6s_mba6_spi_defconfig
 +++ b/configs/tqma6s_mba6_spi_defconfig
 @@ -2,4 +2,4 @@ CONFIG_ARM=y
  CONFIG_ARCH_MX6=y
  CONFIG_TARGET_TQMA6=y
  CONFIG_TQMA6S=y
 -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
 +CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT

 
 
 Rather it does not work. By compiling envcrc (host), the options are not
 set and it fails:
 
   cc -Wp,-MD,tools/.envcrc.o.d -Wall -Wstrict-prototypes -O2
 -fomit-frame-pointer   -include ./include/libfdt_env.h -idirafterinclude
 -idirafter./arch/arm/include -I./lib/libfdt -I./tools
 -DCONFIG_SYS_TEXT_BASE=0x4fc0 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES
 -D_GNU_SOURCE  -c -o tools/envcrc.o tools/envcrc.c
 In file included from include/config.h:5:0,
  from tools/envcrc.c:19:
 include/configs/tqma6.h:342:2: error: #error need to define boot source
 
 This happens for the SPI boards, not for MMC - I have not checked why.
 
 Can you investigate this issue ?

First: sorry for inconvinience!

Seems to be an issue with the new build system - env tools do not see the 
kconfig defines when tqma6.h is preprocessed. I'm not sure what's the best
solution: if I include linux/kconfig.h at top of tqma6.h this build break 
is fixed. The canyonlands board  makes this, too. But I have the feeling 
that this should be better done at a central place, shouldn't it?


 Best regards,
 Stefano Babic


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


Re: [U-Boot] [PATCH 03/10] imx6: move generic imx6 options to mx6_common.h

2015-05-12 Thread Markus Niebel
Hello Peter,

Am 11.05.2015 um 13:23 schrieb Peter Robinson:
 All boards define CONFIG_MX6, CONFIG_DISPLAY_BOARDINFO, CONFIG_DISPLAY_CPUINFO
 and CONFIG_SYS_GENERIC_BOARD so define them in mx6_common
 
 Signed-off-by: Peter Robinson pbrobin...@gmail.com
 
 ---
  include/configs/aristainetos.h  | 7 ---
  include/configs/cgtqmx6eval.h   | 5 -
  include/configs/cm_fx6.h| 7 ---
  include/configs/embestmx6boards.h   | 7 ---
  include/configs/gw_ventana.h| 5 -
  include/configs/hummingboard.h  | 6 --
  include/configs/mx6_common.h| 5 +
  include/configs/mx6cuboxi.h | 4 
  include/configs/mx6qarm2.h  | 7 ---
  include/configs/mx6sabre_common.h   | 7 ---
  include/configs/mx6slevk.h  | 6 --
  include/configs/mx6sxsabresd.h  | 5 -
  include/configs/nitrogen6x.h| 4 
  include/configs/novena.h| 4 
  include/configs/ot1200.h| 4 
  include/configs/platinum.h  | 6 --
  include/configs/platinum_picon.h| 2 --
  include/configs/platinum_titanium.h | 2 --
  include/configs/secomx6quq7.h   | 4 
  include/configs/tbs2910.h   | 4 
  include/configs/titanium.h  | 3 ---
  include/configs/tqma6.h | 6 --
  include/configs/udoo.h  | 6 --
  include/configs/wandboard.h | 6 --
  include/configs/warp.h  | 5 -
  25 files changed, 5 insertions(+), 122 deletions(-)
 
 diff --git a/include/configs/aristainetos.h b/include/configs/aristainetos.h
 index 7bac18c..2865ef6 100644
 --- a/include/configs/aristainetos.h
 +++ b/include/configs/aristainetos.h
 @@ -13,20 +13,13 @@
  #ifndef __ARISTAINETOS_CONFIG_H
  #define __ARISTAINETOS_CONFIG_H
  
 -#define CONFIG_MX6
 -
  #include mx6_common.h
  
 -#define CONFIG_DISPLAY_CPUINFO
 -#define CONFIG_DISPLAY_BOARDINFO
 -
  #define CONFIG_MACH_TYPE 4501
  #define CONFIG_MMCROOT   /dev/mmcblk0p1
  #define CONFIG_HOSTNAME  aristainetos
  #define PHYS_SDRAM_SIZE  (1u * 1024 * 1024 * 1024)
  
 -#define CONFIG_SYS_GENERIC_BOARD
 -
  /* Size of malloc() pool */
  #define CONFIG_SYS_MALLOC_LEN(64 * SZ_1M)
  
 diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
 index d6018fd..fff950e 100644
 --- a/include/configs/cgtqmx6eval.h
 +++ b/include/configs/cgtqmx6eval.h
 @@ -13,13 +13,8 @@
  #ifndef __CONFIG_CGTQMX6EVAL_H
  #define __CONFIG_CGTQMX6EVAL_H
  
 -#define CONFIG_MX6
 -
  #include mx6_common.h
  
 -#define CONFIG_DISPLAY_CPUINFO
 -#define CONFIG_DISPLAY_BOARDINFO
 -
  #define CONFIG_MACH_TYPE 4122
  
  #define CONFIG_CMDLINE_TAG
 diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
 index 8fd6350..c0607a4 100644
 --- a/include/configs/cm_fx6.h
 +++ b/include/configs/cm_fx6.h
 @@ -14,7 +14,6 @@
  #include mx6_common.h
  
  /* Machine config */
 -#define CONFIG_MX6
  #define CONFIG_SYS_LITTLE_ENDIAN
  #define CONFIG_MACH_TYPE 4273
  
 @@ -22,11 +21,6 @@
  #define CONFIG_CMD_GPIO
  #endif
  
 -/* Display information on boot */
 -#define CONFIG_DISPLAY_CPUINFO
 -#define CONFIG_DISPLAY_BOARDINFO
 -#define CONFIG_TIMESTAMP
 -
  /* CMD */
  #define CONFIG_CMD_GREPENV
  #undef CONFIG_CMD_FLASH
 @@ -274,7 +268,6 @@
  #define CONFIG_SERIAL_TAG
  
  /* misc */
 -#define CONFIG_SYS_GENERIC_BOARD
  #define CONFIG_STACKSIZE (128 * 1024)
  #define CONFIG_SYS_MALLOC_LEN(10 * 1024 * 1024)
  #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS   800 /* 400 KB */
 diff --git a/include/configs/embestmx6boards.h 
 b/include/configs/embestmx6boards.h
 index c327e9b..90ba948 100644
 --- a/include/configs/embestmx6boards.h
 +++ b/include/configs/embestmx6boards.h
 @@ -15,19 +15,12 @@
  
  #include mx6_common.h
  
 -#define CONFIG_SYS_GENERIC_BOARD
 -
  #define CONFIG_MXC_UART_BASE UART2_BASE
  #define CONFIG_CONSOLE_DEV   ttymxc1
  #define CONFIG_MMCROOT   /dev/mmcblk1p2
  
  #define PHYS_SDRAM_SIZE  (1u * 1024 * 1024 * 1024)
  
 -#define CONFIG_MX6
 -
 -#define CONFIG_DISPLAY_CPUINFO
 -#define CONFIG_DISPLAY_BOARDINFO
 -
  #define CONFIG_CMDLINE_TAG
  #define CONFIG_SETUP_MEMORY_TAGS
  #define CONFIG_INITRD_TAG
 diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
 index 7e33f9d..fcdc7fd 100644
 --- a/include/configs/gw_ventana.h
 +++ b/include/configs/gw_ventana.h
 @@ -19,9 +19,6 @@
  
  #include imx6_spl.h  /* common IMX6 SPL configuration */
  #include mx6_common.h
 -#define CONFIG_MX6
 -#define CONFIG_DISPLAY_CPUINFO /* display cpu info */
 -#define CONFIG_DISPLAY_BOARDINFO_LATE  /* display board info (after reloc) */
  
  #define CONFIG_MACH_TYPE 4520   /* Gateworks Ventana Platform */
  
 @@ -32,8 +29,6 @@
  #define CONFIG_SERIAL_TAG
  #define CONFIG_REVISION_TAG
  
 -#define CONFIG_SYS_GENERIC_BOARD
 -
  /* Size of malloc() pool 

[U-Boot] [Patch 1/2] arm: mx6: tqma6: fix spelling error in condition

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 include/configs/tqma6_mba6.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/tqma6_mba6.h b/include/configs/tqma6_mba6.h
index 88c0067..2f52598 100644
--- a/include/configs/tqma6_mba6.h
+++ b/include/configs/tqma6_mba6.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014 Markus Niebel markus.nie...@tq-group.com
+ * Copyright (C) 2013 - 2015 Markus Niebel markus.nie...@tq-group.com
  *
  * Configuration settings for the TQ Systems TQMa6Q,S module.
  *
@@ -11,7 +11,7 @@
 
 #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 #define CONFIG_DEFAULT_FDT_FILEimx6dl-mba6x.dtb
-#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
+#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6D)
 #define CONFIG_DEFAULT_FDT_FILEimx6q-mba6x.dtb
 #endif
 
-- 
2.3.0

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


[U-Boot] [patch][U-Boot 4/4] arm: imx6: tqma6: implement KConfig baseboard selection

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

this finally removes the need for extra settings in
defconfig

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/Kconfig   | 11 +++
 configs/tqma6q_mba6_mmc_defconfig |  2 +-
 configs/tqma6q_mba6_spi_defconfig |  2 +-
 configs/tqma6s_mba6_mmc_defconfig |  2 +-
 configs/tqma6s_mba6_spi_defconfig |  2 +-
 5 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 132e82f..5612f27 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -52,6 +52,17 @@ config TQMA6X_SPI_BOOT
 
 endchoice
 
+choice
+   prompt TQMa6 base board variant
+
+config MBA6
+   bool TQMa6 on MBa6 Starterkit
+   help
+ Select the MBa6 starterkit. This features a GigE Phy, USB, SD-Card
+ etc.
+
+endchoice
+
 config IMX_CONFIG
default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
default board/tqc/tqma6/tqma6s.cfg if TQMA6S
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index c57ee5a..9a78a7e 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
 CONFIG_TQMA6X_MMC_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
\ No newline at end of file
+CONFIG_MBA6=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index dbc366b..1808d35 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
 CONFIG_TQMA6X_SPI_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
+CONFIG_MBA6=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 4e7317e..5dcf0a1 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
 CONFIG_TQMA6X_MMC_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
+CONFIG_MBA6=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index d874dc2..0946f39 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
 CONFIG_TQMA6X_SPI_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
+CONFIG_MBA6=y
-- 
2.3.0

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


Re: [U-Boot] [PATCH 03/10] imx6: move generic imx6 options to mx6_common.h

2015-05-12 Thread Markus Niebel
Hello

Am 12.05.2015 um 12:51 schrieb Tom Rini:
 On Tue, May 12, 2015 at 10:40:25AM +0200, Markus Niebel wrote:
 
 Hello Peter,

 sorry for the noise, did not see v2 of your series. Just one thing:

 Am 11.05.2015 um 18:22 schrieb Peter Robinson:
 All boards define CONFIG_MX6, CONFIG_DISPLAY_BOARDINFO, 
 CONFIG_DISPLAY_CPUINFO
 and CONFIG_SYS_GENERIC_BOARD so define them in mx6_common

 Signed-off-by: Peter Robinson pbrobin...@gmail.com
 Reviewed-by: Tom Rini trini at konsulko.com

 [...] 

  
 diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
 index 85bf039..fc19fbb 100644
 --- a/include/configs/mx6_common.h
 +++ b/include/configs/mx6_common.h
 @@ -38,4 +38,9 @@
  #include asm/imx-common/gpio.h
  #include config_cmd_default.h
  
 +#define CONFIG_MX6

 Here we need an #if !defined(CONFIG_MX6) because secomx6quq7
 (and soon hopefully other boards) sets this via Kconfig under
 arch/arm/cpu/armv7/mx6
 
 Oh good catch.  Would it be hard to just make everyone do this via
 Kconfig instead?  I would expect not...
 

See the series for TQMa6 I posted. Main point is to delete inclusion
of the board Kconfig from arch/arm/Kconfig and to add them to
source them from arch/arm/cpu/armv7/mx6/Kconfig.

As a side effect the CPU type can then also be selected using Kconfig ...

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

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


[U-Boot] [Patch 0/2] arm: imx6: tqma6: minor config fixes

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Two minor config fixes for the TQMa6 modules

Markus Niebel (2):
  arm: mx6: tqma6: fix spelling error in condition
  arm: mx6: tqma6: use default CONFIG_SYS_PBSIZE

 include/configs/tqma6.h  | 3 ---
 include/configs/tqma6_mba6.h | 4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

-- 
2.3.0

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


[U-Boot] [Patch 2/2] arm: mx6: tqma6: use default CONFIG_SYS_PBSIZE

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

this removes a config entry and uses the default value
defined in config_fallbacks.h. This implements the same
behaviour as a patch series for other i.MX6 boards from
Freescale

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 include/configs/tqma6.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 012fa1c..7c06d37 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -416,9 +416,6 @@
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_SYS_CBSIZE  512
 
-/* Print Buffer Size */
-#define CONFIG_SYS_PBSIZE  (CONFIG_SYS_CBSIZE + \
-sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_MAXARGS 16
 #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE
 
-- 
2.3.0

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


Re: [U-Boot] [PATCH 03/10] imx6: move generic imx6 options to mx6_common.h

2015-05-12 Thread Markus Niebel
Hello Peter,

sorry for the noise, did not see v2 of your series. Just one thing:

Am 11.05.2015 um 18:22 schrieb Peter Robinson:
 All boards define CONFIG_MX6, CONFIG_DISPLAY_BOARDINFO, CONFIG_DISPLAY_CPUINFO
 and CONFIG_SYS_GENERIC_BOARD so define them in mx6_common
 
 Signed-off-by: Peter Robinson pbrobin...@gmail.com
 Reviewed-by: Tom Rini trini at konsulko.com

[...] 

  
 diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
 index 85bf039..fc19fbb 100644
 --- a/include/configs/mx6_common.h
 +++ b/include/configs/mx6_common.h
 @@ -38,4 +38,9 @@
  #include asm/imx-common/gpio.h
  #include config_cmd_default.h
  
 +#define CONFIG_MX6

Here we need an #if !defined(CONFIG_MX6) because secomx6quq7
(and soon hopefully other boards) sets this via Kconfig under
arch/arm/cpu/armv7/mx6

[...]

Regards

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


[U-Boot] [Resend PATCH 1/4] arm: mx6: tqma6: CPU type selection via Kconfig

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This is the first patch to remove the
CONFIG_SYS_EXTRA_OPTIONS.

This patch implements CPU type selection from Kconfig.
Further Kconfig stuff is added later.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 arch/arm/Kconfig  |  5 -
 arch/arm/cpu/armv7/mx6/Kconfig|  5 +
 board/tqc/tqma6/Kconfig   | 21 +
 configs/tqma6q_mba6_mmc_defconfig |  4 +++-
 configs/tqma6q_mba6_spi_defconfig |  4 +++-
 configs/tqma6s_mba6_mmc_defconfig |  4 +++-
 configs/tqma6s_mba6_spi_defconfig |  4 +++-
 include/configs/tqma6.h   |  2 --
 8 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cee3126..33d3341 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -574,10 +574,6 @@ config TARGET_TBS2910
bool Support tbs2910
select CPU_V7
 
-config TARGET_TQMA6
-   bool TQ Systems TQMa6 board
-   select CPU_V7
-
 config TARGET_OT1200
bool Bachmann OT1200
select CPU_V7
@@ -953,7 +949,6 @@ source board/ti/ti816x/Kconfig
 source board/timll/devkit3250/Kconfig
 source board/toradex/colibri_pxa270/Kconfig
 source board/toradex/colibri_vf/Kconfig
-source board/tqc/tqma6/Kconfig
 source board/trizepsiv/Kconfig
 source board/ttcontrol/vision2/Kconfig
 source board/udoo/Kconfig
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 076ba52..662596f 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -32,11 +32,16 @@ config TARGET_SECOMX6
bool Support secomx6 boards
select CPU_V7
 
+config TARGET_TQMA6
+   bool TQ Systems TQMa6 board
+   select CPU_V7
+
 endchoice
 
 config SYS_SOC
default mx6
 
 source board/seco/Kconfig
+source board/tqc/tqma6/Kconfig
 
 endif
diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index f8b3d1f..3e4d9f5 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -12,4 +12,25 @@ config SYS_SOC
 config SYS_CONFIG_NAME
default tqma6
 
+choice
+   prompt TQMa6 SoC variant
+   default TQMA6Q
+   help
+ select the TQMa6 module variant. The variants differing in the used
+ i.MX6 CPU type and DRAM
+
+config TQMA6Q
+   bool TQMa6Q / TQMa6D
+   select MX6Q
+   help
+ select TQMa6Q / TQMa6D with i.MX6Q/D and 1GiB DRAM
+
+config TQMA6S
+   bool TQMa6S
+   select MX6S
+   help
+ select TQMa6S with i.MX6S and 512 MiB DRAM
+
+endchoice
+
 endif
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 4ee9238..42d8928 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_MMC_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6Q=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 86d4ca3..7371b3d 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_SPI_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6Q=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 5efce6a..b7feb18 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_MMC_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index e8b3afd..24d07cd 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_SPI_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 012fa1c..fc94670 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_MX6
-
 /* SPL */
 /* #if defined(CONFIG_SPL_BUILD) */
 
-- 
2.3.0

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


[U-Boot] [Resend PATCH 3/4] arm: imx6: tqma6: boot device selection via Kconfig

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/Kconfig   | 19 +++
 configs/tqma6q_mba6_mmc_defconfig |  3 ++-
 configs/tqma6q_mba6_spi_defconfig |  3 ++-
 configs/tqma6s_mba6_mmc_defconfig |  3 ++-
 configs/tqma6s_mba6_spi_defconfig |  3 ++-
 5 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index ce47ba4..132e82f 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -33,6 +33,25 @@ config TQMA6S
 
 endchoice
 
+choice
+   prompt TQMa6 boot configuration
+   default TQMA6X_MMC_BOOT
+   help
+ Configure boot device. This is also used to implement environment
+ location.
+
+config TQMA6X_MMC_BOOT
+   bool MMC / SD Boot
+   help
+ Boot from eMMC / SD Card
+
+config TQMA6X_SPI_BOOT
+   bool SPI NOR Boot
+   help
+ Boot from on board SPI NOR flash
+
+endchoice
+
 config IMX_CONFIG
default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
default board/tqc/tqma6/tqma6s.cfg if TQMA6S
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 59e7859..c57ee5a 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_TQMA6X_MMC_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
\ No newline at end of file
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index db65778..dbc366b 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 6c0763d..4e7317e 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_TQMA6X_MMC_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 4873ffb..d874dc2 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
-- 
2.3.0

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


Re: [U-Boot] [patch][U-Boot 0/4] arm: imx6: tqma6: Kconfig rework

2015-05-12 Thread Markus Niebel
Am 12.05.2015 um 12:11 schrieb Markus Niebel:
Sorry, forgot to remove old version of patches.
Will resend them.

 From: Markus Niebel markus.nie...@tq-group.com
 
 This series extends the Kconfig options for TQMa6 to
 enable removal of CONFIG_SYS_EXTRA_OPTIONS for this boards.
 
 To enable CPU selection the first patch moves the board selection
 to the i.MX6 CPU menu as implemented by the Seco mx6 boards
 
 Markus Niebel (4):
   arm: mx6: tqma6: CPU type selection via Kconfig
   arm: imx6: tqma6: implement IMX_CONFIG with Kconfig
   arm: imx6: tqma6: boot device selection via Kconfig
   arm: imx6: tqma6: implement KConfig baseboard selection
 
  arch/arm/Kconfig  |  5 
  arch/arm/cpu/armv7/mx6/Kconfig|  5 
  board/tqc/tqma6/Kconfig   | 55 
 +++
  configs/tqma6q_mba6_mmc_defconfig |  5 +++-
  configs/tqma6q_mba6_spi_defconfig |  5 +++-
  configs/tqma6s_mba6_mmc_defconfig |  5 +++-
  configs/tqma6s_mba6_spi_defconfig |  5 +++-
  include/configs/tqma6.h   |  2 --
  8 files changed, 76 insertions(+), 11 deletions(-)
 

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


[U-Boot] [Resend PATCH 4/4] arm: imx6: tqma6: implement KConfig baseboard selection

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

this finally removes the need for extra settings in
defconfig

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/Kconfig   | 11 +++
 configs/tqma6q_mba6_mmc_defconfig |  2 +-
 configs/tqma6q_mba6_spi_defconfig |  2 +-
 configs/tqma6s_mba6_mmc_defconfig |  2 +-
 configs/tqma6s_mba6_spi_defconfig |  2 +-
 5 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 132e82f..5612f27 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -52,6 +52,17 @@ config TQMA6X_SPI_BOOT
 
 endchoice
 
+choice
+   prompt TQMa6 base board variant
+
+config MBA6
+   bool TQMa6 on MBa6 Starterkit
+   help
+ Select the MBa6 starterkit. This features a GigE Phy, USB, SD-Card
+ etc.
+
+endchoice
+
 config IMX_CONFIG
default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
default board/tqc/tqma6/tqma6s.cfg if TQMA6S
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index c57ee5a..9a78a7e 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
 CONFIG_TQMA6X_MMC_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
\ No newline at end of file
+CONFIG_MBA6=y
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index dbc366b..1808d35 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
 CONFIG_TQMA6X_SPI_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
+CONFIG_MBA6=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 4e7317e..5dcf0a1 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
 CONFIG_TQMA6X_MMC_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
+CONFIG_MBA6=y
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index d874dc2..0946f39 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -3,4 +3,4 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
 CONFIG_TQMA6X_SPI_BOOT=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6
+CONFIG_MBA6=y
-- 
2.3.0

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


[U-Boot] [Resend PATCH 0/4] arm: imx6: tqma6: Kconfig rework

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This series extends the Kconfig options for TQMa6 to
enable removal of CONFIG_SYS_EXTRA_OPTIONS for this boards.

To enable CPU selection the first patch moves the board selection
to the i.MX6 CPU menu as implemented by the Seco mx6 boards

Markus Niebel (4):
  arm: mx6: tqma6: CPU type selection via Kconfig
  arm: imx6: tqma6: implement IMX_CONFIG with Kconfig
  arm: imx6: tqma6: boot device selection via Kconfig
  arm: imx6: tqma6: implement KConfig baseboard selection

 arch/arm/Kconfig  |  5 
 arch/arm/cpu/armv7/mx6/Kconfig|  5 
 board/tqc/tqma6/Kconfig   | 55 +++
 configs/tqma6q_mba6_mmc_defconfig |  5 +++-
 configs/tqma6q_mba6_spi_defconfig |  5 +++-
 configs/tqma6s_mba6_mmc_defconfig |  5 +++-
 configs/tqma6s_mba6_spi_defconfig |  5 +++-
 include/configs/tqma6.h   |  2 --
 8 files changed, 76 insertions(+), 11 deletions(-)

-- 
2.3.0

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


[U-Boot] [Resend PATCH 2/4] arm: imx6: tqma6: implement IMX_CONFIG with Kconfig

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Now that we have the Kconfig based CPU type selection,
use this to fill the IMX_CONFIG automatically

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/Kconfig   | 4 
 configs/tqma6q_mba6_mmc_defconfig | 2 +-
 configs/tqma6q_mba6_spi_defconfig | 2 +-
 configs/tqma6s_mba6_mmc_defconfig | 2 +-
 configs/tqma6s_mba6_spi_defconfig | 2 +-
 5 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 3e4d9f5..ce47ba4 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -33,4 +33,8 @@ config TQMA6S
 
 endchoice
 
+config IMX_CONFIG
+   default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
+   default board/tqc/tqma6/tqma6s.cfg if TQMA6S
+
 endif
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 42d8928..59e7859 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 7371b3d..db65778 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index b7feb18..6c0763d 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 24d07cd..4873ffb 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
-- 
2.3.0

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


[U-Boot] [patch][U-Boot 1/4] arm: mx6: tqma6: allow CPU type selection via Kconfig

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This is the first patch to remove the
CONFIG_SYS_EXTRA_OPTIONS.

This patch implements CPU type selection from Kconfig.
Further Kconfig stuff is added later.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 arch/arm/Kconfig  |  5 -
 arch/arm/cpu/armv7/mx6/Kconfig|  5 +
 board/tqc/tqma6/Kconfig   | 21 +
 configs/tqma6q_mba6_mmc_defconfig |  4 +++-
 configs/tqma6q_mba6_spi_defconfig |  4 +++-
 configs/tqma6s_mba6_mmc_defconfig |  4 +++-
 configs/tqma6s_mba6_spi_defconfig |  4 +++-
 include/configs/tqma6.h   |  2 --
 8 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cee3126..33d3341 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -574,10 +574,6 @@ config TARGET_TBS2910
bool Support tbs2910
select CPU_V7
 
-config TARGET_TQMA6
-   bool TQ Systems TQMa6 board
-   select CPU_V7
-
 config TARGET_OT1200
bool Bachmann OT1200
select CPU_V7
@@ -953,7 +949,6 @@ source board/ti/ti816x/Kconfig
 source board/timll/devkit3250/Kconfig
 source board/toradex/colibri_pxa270/Kconfig
 source board/toradex/colibri_vf/Kconfig
-source board/tqc/tqma6/Kconfig
 source board/trizepsiv/Kconfig
 source board/ttcontrol/vision2/Kconfig
 source board/udoo/Kconfig
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 076ba52..662596f 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -32,11 +32,16 @@ config TARGET_SECOMX6
bool Support secomx6 boards
select CPU_V7
 
+config TARGET_TQMA6
+   bool TQ Systems TQMa6 board
+   select CPU_V7
+
 endchoice
 
 config SYS_SOC
default mx6
 
 source board/seco/Kconfig
+source board/tqc/tqma6/Kconfig
 
 endif
diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index f8b3d1f..3e4d9f5 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -12,4 +12,25 @@ config SYS_SOC
 config SYS_CONFIG_NAME
default tqma6
 
+choice
+   prompt TQMa6 SoC variant
+   default TQMA6Q
+   help
+ select the TQMa6 module variant. The variants differing in the used
+ i.MX6 CPU type and DRAM
+
+config TQMA6Q
+   bool TQMa6Q / TQMa6D
+   select MX6Q
+   help
+ select TQMa6Q / TQMa6D with i.MX6Q/D and 1GiB DRAM
+
+config TQMA6S
+   bool TQMa6S
+   select MX6S
+   help
+ select TQMa6S with i.MX6S and 512 MiB DRAM
+
+endchoice
+
 endif
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 4ee9238..42d8928 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_MMC_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6Q=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 86d4ca3..7371b3d 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_SPI_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6Q=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 5efce6a..b7feb18 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_MMC_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index e8b3afd..24d07cd 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_SPI_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 012fa1c..fc94670 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_MX6
-
 /* SPL */
 /* #if defined(CONFIG_SPL_BUILD) */
 
-- 
2.3.0

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


[U-Boot] [patch][U-Boot 2/4] arm: imx6: tqma6: implement IMX_CONFIG with Kconfig

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Now that we have the Kconfig based CPU type selection,
use this to fill the IMX_CONFIG automatically

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/Kconfig   | 4 
 configs/tqma6q_mba6_mmc_defconfig | 2 +-
 configs/tqma6q_mba6_spi_defconfig | 2 +-
 configs/tqma6s_mba6_mmc_defconfig | 2 +-
 configs/tqma6s_mba6_spi_defconfig | 2 +-
 5 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index 3e4d9f5..ce47ba4 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -33,4 +33,8 @@ config TQMA6S
 
 endchoice
 
+config IMX_CONFIG
+   default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
+   default board/tqc/tqma6/tqma6s.cfg if TQMA6S
+
 endif
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 42d8928..59e7859 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 7371b3d..db65778 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index b7feb18..6c0763d 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 24d07cd..4873ffb 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
+CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
-- 
2.3.0

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


[U-Boot] [patch][U-Boot 1/4] arm: mx6: tqma6: CPU type selection via Kconfig

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This is the first patch to remove the
CONFIG_SYS_EXTRA_OPTIONS.

This patch implements CPU type selection from Kconfig.
Further Kconfig stuff is added later.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 arch/arm/Kconfig  |  5 -
 arch/arm/cpu/armv7/mx6/Kconfig|  5 +
 board/tqc/tqma6/Kconfig   | 21 +
 configs/tqma6q_mba6_mmc_defconfig |  4 +++-
 configs/tqma6q_mba6_spi_defconfig |  4 +++-
 configs/tqma6s_mba6_mmc_defconfig |  4 +++-
 configs/tqma6s_mba6_spi_defconfig |  4 +++-
 include/configs/tqma6.h   |  2 --
 8 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cee3126..33d3341 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -574,10 +574,6 @@ config TARGET_TBS2910
bool Support tbs2910
select CPU_V7
 
-config TARGET_TQMA6
-   bool TQ Systems TQMa6 board
-   select CPU_V7
-
 config TARGET_OT1200
bool Bachmann OT1200
select CPU_V7
@@ -953,7 +949,6 @@ source board/ti/ti816x/Kconfig
 source board/timll/devkit3250/Kconfig
 source board/toradex/colibri_pxa270/Kconfig
 source board/toradex/colibri_vf/Kconfig
-source board/tqc/tqma6/Kconfig
 source board/trizepsiv/Kconfig
 source board/ttcontrol/vision2/Kconfig
 source board/udoo/Kconfig
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 076ba52..662596f 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -32,11 +32,16 @@ config TARGET_SECOMX6
bool Support secomx6 boards
select CPU_V7
 
+config TARGET_TQMA6
+   bool TQ Systems TQMa6 board
+   select CPU_V7
+
 endchoice
 
 config SYS_SOC
default mx6
 
 source board/seco/Kconfig
+source board/tqc/tqma6/Kconfig
 
 endif
diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index f8b3d1f..3e4d9f5 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -12,4 +12,25 @@ config SYS_SOC
 config SYS_CONFIG_NAME
default tqma6
 
+choice
+   prompt TQMa6 SoC variant
+   default TQMA6Q
+   help
+ select the TQMa6 module variant. The variants differing in the used
+ i.MX6 CPU type and DRAM
+
+config TQMA6Q
+   bool TQMa6Q / TQMa6D
+   select MX6Q
+   help
+ select TQMa6Q / TQMa6D with i.MX6Q/D and 1GiB DRAM
+
+config TQMA6S
+   bool TQMa6S
+   select MX6S
+   help
+ select TQMa6S with i.MX6S and 512 MiB DRAM
+
+endchoice
+
 endif
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 4ee9238..42d8928 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_MMC_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6Q=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index 86d4ca3..7371b3d 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MX6Q,MBA6,TQMA6X_SPI_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6Q=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6q.cfg,MBA6,TQMA6X_SPI_BOOT
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 5efce6a..b7feb18 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_MMC_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_MMC_BOOT
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index e8b3afd..24d07cd 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -1,3 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MX6S,MBA6,TQMA6X_SPI_BOOT
 CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
+CONFIG_TQMA6S=y
+CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/tqc/tqma6/tqma6s.cfg,MBA6,TQMA6X_SPI_BOOT
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 012fa1c..fc94670 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_MX6
-
 /* SPL */
 /* #if defined(CONFIG_SPL_BUILD) */
 
-- 
2.3.0

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


[U-Boot] [patch][U-Boot 3/4] arm: imx6: tqma6: boot device selection via Kconfig

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/Kconfig   | 19 +++
 configs/tqma6q_mba6_mmc_defconfig |  3 ++-
 configs/tqma6q_mba6_spi_defconfig |  3 ++-
 configs/tqma6s_mba6_mmc_defconfig |  3 ++-
 configs/tqma6s_mba6_spi_defconfig |  3 ++-
 5 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index ce47ba4..132e82f 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -33,6 +33,25 @@ config TQMA6S
 
 endchoice
 
+choice
+   prompt TQMa6 boot configuration
+   default TQMA6X_MMC_BOOT
+   help
+ Configure boot device. This is also used to implement environment
+ location.
+
+config TQMA6X_MMC_BOOT
+   bool MMC / SD Boot
+   help
+ Boot from eMMC / SD Card
+
+config TQMA6X_SPI_BOOT
+   bool SPI NOR Boot
+   help
+ Boot from on board SPI NOR flash
+
+endchoice
+
 config IMX_CONFIG
default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
default board/tqc/tqma6/tqma6s.cfg if TQMA6S
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 59e7859..c57ee5a 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_TQMA6X_MMC_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
\ No newline at end of file
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index db65778..dbc366b 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 6c0763d..4e7317e 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_TQMA6X_MMC_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 4873ffb..d874dc2 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
-- 
2.3.0

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


[U-Boot] [patch][U-Boot 0/4] arm: imx6: tqma6: Kconfig rework

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This series extends the Kconfig options for TQMa6 to
enable removal of CONFIG_SYS_EXTRA_OPTIONS for this boards.

To enable CPU selection the first patch moves the board selection
to the i.MX6 CPU menu as implemented by the Seco mx6 boards

Markus Niebel (4):
  arm: mx6: tqma6: CPU type selection via Kconfig
  arm: imx6: tqma6: implement IMX_CONFIG with Kconfig
  arm: imx6: tqma6: boot device selection via Kconfig
  arm: imx6: tqma6: implement KConfig baseboard selection

 arch/arm/Kconfig  |  5 
 arch/arm/cpu/armv7/mx6/Kconfig|  5 
 board/tqc/tqma6/Kconfig   | 55 +++
 configs/tqma6q_mba6_mmc_defconfig |  5 +++-
 configs/tqma6q_mba6_spi_defconfig |  5 +++-
 configs/tqma6s_mba6_mmc_defconfig |  5 +++-
 configs/tqma6s_mba6_spi_defconfig |  5 +++-
 include/configs/tqma6.h   |  2 --
 8 files changed, 76 insertions(+), 11 deletions(-)

-- 
2.3.0

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


[U-Boot] [patch][U-Boot 3/4] tqma6: implement boot device options

2015-05-12 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/Kconfig   | 19 +++
 configs/tqma6q_mba6_mmc_defconfig |  3 ++-
 configs/tqma6q_mba6_spi_defconfig |  3 ++-
 configs/tqma6s_mba6_mmc_defconfig |  3 ++-
 configs/tqma6s_mba6_spi_defconfig |  3 ++-
 5 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig
index ce47ba4..132e82f 100644
--- a/board/tqc/tqma6/Kconfig
+++ b/board/tqc/tqma6/Kconfig
@@ -33,6 +33,25 @@ config TQMA6S
 
 endchoice
 
+choice
+   prompt TQMa6 boot configuration
+   default TQMA6X_MMC_BOOT
+   help
+ Configure boot device. This is also used to implement environment
+ location.
+
+config TQMA6X_MMC_BOOT
+   bool MMC / SD Boot
+   help
+ Boot from eMMC / SD Card
+
+config TQMA6X_SPI_BOOT
+   bool SPI NOR Boot
+   help
+ Boot from on board SPI NOR flash
+
+endchoice
+
 config IMX_CONFIG
default board/tqc/tqma6/tqma6q.cfg if TQMA6Q
default board/tqc/tqma6/tqma6s.cfg if TQMA6S
diff --git a/configs/tqma6q_mba6_mmc_defconfig 
b/configs/tqma6q_mba6_mmc_defconfig
index 59e7859..c57ee5a 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_TQMA6X_MMC_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
\ No newline at end of file
diff --git a/configs/tqma6q_mba6_spi_defconfig 
b/configs/tqma6q_mba6_spi_defconfig
index db65778..dbc366b 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6Q=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_mmc_defconfig 
b/configs/tqma6s_mba6_mmc_defconfig
index 6c0763d..4e7317e 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_MMC_BOOT
+CONFIG_TQMA6X_MMC_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
diff --git a/configs/tqma6s_mba6_spi_defconfig 
b/configs/tqma6s_mba6_spi_defconfig
index 4873ffb..d874dc2 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TQMA6=y
 CONFIG_TQMA6S=y
-CONFIG_SYS_EXTRA_OPTIONS=MBA6,TQMA6X_SPI_BOOT
+CONFIG_TQMA6X_SPI_BOOT=y
+CONFIG_SYS_EXTRA_OPTIONS=MBA6
-- 
2.3.0

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


Re: [U-Boot] [PATCH 0/4]: imx: mx6: use OTP for temperature grade and freq grade

2015-05-08 Thread Markus Niebel
Hello Tim,

Am 07.05.2015 um 17:55 schrieb Tim Harvey:
 On Tue, Apr 28, 2015 at 10:31 AM, Tim Harvey thar...@gateworks.com wrote:
 On Tue, Apr 28, 2015 at 10:11 AM, Stefan Roese s...@denx.de wrote:
 Hi Tim,

 On 28.04.2015 17:44, Tim Harvey wrote:

 The MX6 has OTP bits specifying the processor speed grade as well as
 temperature grade.

 This series adds functions to return this information as well as adds the
 details to the CPU info displayed.

 Additionally we use the temperature grade to replace the hard-coded limits
 in imx_thermal.c

 I expect some possible discussion/debate regarding the displaying of this
 info,
 but perhaps adding the functions to obtain the info and use it for
 imx_thermal
 is beyond debate. Please let me know.


 Could you please send (or include in the commit text) an example, how these
 infos are displayed now in the bootup log? Best in comparison to the old
 log. To see the output change resulting from the patchset.

 Thanks,
 Stefan


 Stefan,

 Good point - as I am guessing there will be debate about the 'amount'
 of info displayed and am open to suggestions on how to word it and/or
 how to enable it. In future revs of the patchset I'll be more explicit
 in the commit logs, but for now with the series applied I get this:

 IMX6Q automotive (1GHz capable) powering up at 800MHz:
 - before:
 CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
 - after Patch 1/4:
 CPU:   Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz)
 - after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
 CPU:   Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz)

 IMX6S industrial (800MHz capable) powering up at 800MHz:
 - before:
 CPU:   Freescale i.MX6SOLO rev1.2 at 792 MHz
 - after Patch 1/4: (max speed == cur speed)
 CPU:   Freescale i.MX6SOLO rev1.2 792 MHz
 - after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
 CPU:   Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz

 When I submit the next version I will split out adding the functions
 to get speed-grade and temperature-grade from using those functions in
 cpu_printinfo() as well as some may not be happy with adding more info
 to cpu_printinfo() but may find value in setting the thermal limits of
 imx_thermal properly based on temp-grade (Patch 4/4).

 Tim
 
 Stefano,
 
 I've cc'd all the maintainers I could find of MX6 based boards for
 comment on adding this text to the mx6 print_cpuinfo. I would like to
 see some ack/review from them otherwise I would think silence is
 considered a thumbs up ;)
 

Where do get the speed grade ant temperature grade information from i.MX6SOLO / 
DL from?
The fusemap in the reference manual says nothing about these info for SOLO / DL 
and a Freescale
FAE stated that these information is not present in the fuses for SOLO / DL.

Regards, 

Markus

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

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


Re: [U-Boot] [PATCH 1/4] imx: mx6: display max cpu frequency in print_cpuinfo()

2015-04-29 Thread Markus Niebel
Hello Tim,

Am 28.04.2015 um 17:44 schrieb Tim Harvey:
 The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING
 (OCOTP_CFG3[17:16]).
 
 Display this value to make it clear the difference regarding the CPU speed
 currently running at vs the max speed allowed per grade. Note that the power
 on CPU speed is determined by OCOTP_CFG4[18].
 
 I see no indication in the IMX6SX reference manual that it has the same CPU
 speed grades in this OTP register.
 

AFAIK there is no speed grading info for i.MX6 Solo / DualLight in OTP. 

 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---
  arch/arm/cpu/armv7/mx6/soc.c  | 26 ++
  arch/arm/imx-common/cpu.c | 17 +
  arch/arm/include/asm/arch-mx6/sys_proto.h |  1 +
  arch/arm/include/asm/proc |  1 +
  4 files changed, 45 insertions(+)
  create mode 12 arch/arm/include/asm/proc
 
 diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
 index dd34138..dc422a6 100644
 --- a/arch/arm/cpu/armv7/mx6/soc.c
 +++ b/arch/arm/cpu/armv7/mx6/soc.c
 @@ -83,6 +83,32 @@ u32 get_cpu_rev(void)
   return (type  12) | (reg + 0x10);
  }
  
 +#define OCOTP_CFG3_SPEED_SHIFT  16
 +#define OCOTP_CFG3_SPEED_1P2GHZ 0x3
 +#define OCOTP_CFG3_SPEED_996MHZ 0x2
 +#define OCOTP_CFG3_SPEED_852MHZ 0x1
 +
 +u32 get_cpu_speed_grade_hz(void)
 +{
 + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
 + struct fuse_bank *bank = ocotp-bank[0];
 + struct fuse_bank0_regs *fuse =
 + (struct fuse_bank0_regs *)bank-fuse_regs;
 + uint32_t val;
 +
 + val = readl(fuse-cfg3);
 + val = OCOTP_CFG3_SPEED_SHIFT;
 + val = 0x3;
 +
 + if (val == OCOTP_CFG3_SPEED_1P2GHZ)
 + return 12;
 + if (val == OCOTP_CFG3_SPEED_996MHZ)
 + return 99600;
 + if (val == OCOTP_CFG3_SPEED_852MHZ)
 + return 85200;
 + return 79200;
 +}
 +
  #ifdef CONFIG_REVISION_TAG
  u32 __weak get_board_rev(void)
  {
 diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
 index 067d08f..ead7f08 100644
 --- a/arch/arm/imx-common/cpu.c
 +++ b/arch/arm/imx-common/cpu.c
 @@ -151,11 +151,28 @@ int print_cpuinfo(void)
  
   cpurev = get_cpu_rev();
  
 +#if defined(CONFIG_MX6)
 + printf(CPU:   Freescale i.MX%s rev%d.%d,
 + get_imx_type((cpurev  0xFF000)  12),
 + (cpurev  0x000F0)  4,
 + (cpurev  0xF)  0);
 + if (is_cpu_type(MXC_CPU_MX6SX))
 + printf( at %d MHz, mxc_get_clock(MXC_ARM_CLK) / 100);
 + else {
 + printf( %d MHz, get_cpu_speed_grade_hz() / 100);
 + if (get_cpu_speed_grade_hz() != mxc_get_clock(MXC_ARM_CLK)) {
 + printf( (at %d MHz),
 +mxc_get_clock(MXC_ARM_CLK) / 100);
 + }
 + }
 + puts(\n);
 +#else
   printf(CPU:   Freescale i.MX%s rev%d.%d at %d MHz\n,
   get_imx_type((cpurev  0xFF000)  12),
   (cpurev  0x000F0)  4,
   (cpurev  0xF)  0,
   mxc_get_clock(MXC_ARM_CLK) / 100);
 +#endif
  
  #if defined(CONFIG_MX6)  defined(CONFIG_IMX6_THERMAL)
   ret = uclass_get_device(UCLASS_THERMAL, 0, thermal_dev);
 diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h 
 b/arch/arm/include/asm/arch-mx6/sys_proto.h
 index 28ba844..a2cd0a9 100644
 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h
 +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
 @@ -16,6 +16,7 @@
  
  u32 get_nr_cpus(void);
  u32 get_cpu_rev(void);
 +u32 get_cpu_speed_grade_hz(void);
  
  /* returns MXC_CPU_ value */
  #define cpu_type(rev) (((rev)  12)0xff)
 diff --git a/arch/arm/include/asm/proc b/arch/arm/include/asm/proc
 new file mode 12
 index 000..c7f3c20
 --- /dev/null
 +++ b/arch/arm/include/asm/proc
 @@ -0,0 +1 @@
 +proc-armv
 \ No newline at end of file
 

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


Re: [U-Boot] [PATCH 2/3] arm: mx6: tqma6: Update to optionally configure an alternative SPI setup

2015-03-13 Thread Markus Niebel
Hello Stefan,
Am 12.03.2015 um 16:18 schrieb Stefan Roese:
 Hi Markus,
 
 On 12.03.2015 15:25, Markus Niebel wrote:
 Am 12.03.2015 um 13:34 schrieb Stefan Roese:
 By making the tqma6_iomuxc_spi() weak, this patch adds the possibility to
 add a different function for this SPI configuration. This can be used
 by other baseboards, that might have a different SPI setup.

 This patch will be used by the upcoming WRU-IV board support which also
 uses the TQMa6 SoM.

 Signed-off-by: Stefan Roese s...@denx.de
 ---
   board/tqc/tqma6/tqma6.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
 index c9e163e..29db838 100644
 --- a/board/tqc/tqma6/tqma6.c
 +++ b/board/tqc/tqma6/tqma6.c
 @@ -145,7 +145,7 @@ static unsigned const tqma6_ecspi1_cs[] = {
   TQMA6_SF_CS_GPIO,
   };

 -static void tqma6_iomuxc_spi(void)
 +__weak void tqma6_iomuxc_spi(void)
   {
   unsigned i;

 When implementing an baseboard specific init handler, we will get
 a warning about unused
 tqma6_ecspi1_pads and tqma6_ecspi1_cs, or did I miss something?
 
 I'm not getting one with the current (unfinished) WRU4 baseboard. Which has 
 no SPI.
 
Oops, not understand the weak mechanism completely - compiler sees usage of data
in weak function but linker selects function from baseboard - correct?
If this is the case, we have only the duplication of IOMUX and CS gpio.

 Just as a thought (not ready): Could we supply CS initialisation
 data via defines in the
 baseboard config header and append it to the tables if needed?
 
 Not sure if I understand this correctly. Could you give an example? Again, my 
 current baseboard has no SPI at all.
 

tqma6_iomux_spi is for the SPI controller the serial nor is connected,
so baseboard specific data are additional CS.

You could solve the data duplication using 

#define TQMA6_BB_ECSPI1_CS_GPIO IMX_GPIO_NR(n, mm),
#define TQMA6_BB_CS_PAD_CTRLNEW_PAD_CTRL(MX6_PAD_bla__GPIOn, IOmm, 
PAD_CTRL)

and in the board file:

if !defined(TQMA6_BB_ECSPI1_CS_GPIO)
#define TQMA6_BB_ECSPI1_CS_GPIO
#endif

static unsigned const tqma6_ecspi1_cs[] = {
   TQMA6_SF_CS_GPIO,
   TQMA6_BB_ECSPI1_CS_GPIO  
};

But OK, this looks not very nice

As I said, not completely ready, but would prevent some code duplication.

 Thanks,
 Stefan
 

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


Re: [U-Boot] [PATCH 2/3] arm: mx6: tqma6: Update to optionally configure an alternative SPI setup

2015-03-13 Thread Markus Niebel
Hello Stefan,
Am 13.03.2015 um 14:25 schrieb Stefan Roese:
 Hi Markus,
 
 On 13.03.2015 10:05, Markus Niebel wrote:

 Not sure if I understand this correctly. Could you give an example? Again, 
 my current baseboard has no SPI at all.


 tqma6_iomux_spi is for the SPI controller the serial nor is connected,
 so baseboard specific data are additional CS.

 You could solve the data duplication using

 #define TQMA6_BB_ECSPI1_CS_GPIOIMX_GPIO_NR(n, mm),
 #define TQMA6_BB_CS_PAD_CTRLNEW_PAD_CTRL(MX6_PAD_bla__GPIOn, IOmm, 
 PAD_CTRL)

 and in the board file:

 if !defined(TQMA6_BB_ECSPI1_CS_GPIO)
 #define TQMA6_BB_ECSPI1_CS_GPIO
 #endif

 static unsigned const tqma6_ecspi1_cs[] = {
 TQMA6_SF_CS_GPIO,
 TQMA6_BB_ECSPI1_CS_GPIO   
 };

 But OK, this looks not very nice

 As I said, not completely ready, but would prevent some code duplication.
 
 With my current approach we have code duplication. I suggest we give this 
 version a try and see if it scales for other, future baseboards as well. If 
 not, we can always try a solution like you described above.
 
 Okay?

Yes, Okay.

you can add my Acked-by
 
 Thanks,
 Stefan
 
Regards

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


Re: [U-Boot] [PATCH 1/3] arm: mx6: tqma6: Fix USB and add other filesystems

2015-03-12 Thread Markus Niebel
Am 12.03.2015 um 13:34 schrieb Stefan Roese:
 This patch fixes the USB EHCI support on the TQMa6 SoM. Additionally
 some filesystems are added, included the generic FS commands (e.g.
 ls...).
 
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Markus Niebel markus.nie...@tq-group.com
 Cc: Stefano Babic sba...@denx.de
 ---
  include/configs/tqma6.h | 7 +--
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
 index a099687..9022550 100644
 --- a/include/configs/tqma6.h
 +++ b/include/configs/tqma6.h
 @@ -125,16 +125,19 @@
  #define CONFIG_USB_STORAGE
  #define CONFIG_USB_HOST_ETHER
  #define CONFIG_USB_ETHER_SMSC95XX
 -#define CONFIG_MXC_USB_PORT  1
  #define CONFIG_MXC_USB_PORTSC(PORT_PTS_UTMI | PORT_PTS_PTW)
 -#define CONFIG_MXC_USB_FLAGS 0
 +#define CONFIG_USB_MAX_CONTROLLER_COUNT  2
 +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
  
  /* Fuses */
  #define CONFIG_MXC_OCOTP
  #define CONFIG_CMD_FUSE
  
  #define CONFIG_CMD_EXT2
 +#define CONFIG_CMD_EXT4
 +#define CONFIG_CMD_EXT4_WRITE
  #define CONFIG_CMD_FAT
 +#define CONFIG_CMD_FS_GENERIC
  #define CONFIG_DOS_PARTITION
  
  #define CONFIG_CMD_PING
 
Acked-By: Markus Niebel markus.nie...@tq-group.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] arm: mx6: tqma6: Extract baseboard configs into separate config file

2015-03-12 Thread Markus Niebel
Hello Stefan,

I like the idea - did not know at time when we brought it to mainline that 
splitting configs
is an allowed way. See comment.

Am 12.03.2015 um 13:34 schrieb Stefan Roese:
 This patch extracts all baseboard specific defines into a separate config 
 file.
 This makes it easier to add other baseboards that use the TQMa6 SoM.
 
 This patch will be used by the upcoming WRU-IV board support which also
 uses the TQMa6 SoM.
 
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Markus Niebel markus.nie...@tq-group.com
 Cc: Stefano Babic sba...@denx.de
 ---
  include/configs/tqma6.h  | 52 
 ++--
  include/configs/tqma6_mba6.h | 32 +++
  2 files changed, 43 insertions(+), 41 deletions(-)
  create mode 100644 include/configs/tqma6_mba6.h
 
 diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
 index 9022550..69b6b57 100644
 --- a/include/configs/tqma6.h
 +++ b/include/configs/tqma6.h
 @@ -35,16 +35,6 @@
  #define PHYS_SDRAM_SIZE  (1024u * SZ_1M)
  #endif
  
 -#if defined(CONFIG_MBA6)
 -
 -#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 -#define CONFIG_DEFAULT_FDT_FILE  imx6dl-mba6x.dtb
 -#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
 -#define CONFIG_DEFAULT_FDT_FILE  imx6q-mba6x.dtb
 -#endif
 -
 -#endif
 -
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DISPLAY_BOARDINFO
  #define CONFIG_SYS_GENERIC_BOARD
 @@ -85,11 +75,6 @@
  
  /* I2C SYSMON (LM75) */
  #define CONFIG_DTT_LM75
 -#if defined(CONFIG_MBA6)
 -#define CONFIG_DTT_SENSORS   { 0, 1 }
 -#else
 -#define CONFIG_DTT_SENSORS   { 0 }
This will be lost for baseboards not implementing DTT_SENSORS feature
 -#endif
  #define CONFIG_DTT_MAX_TEMP  70
  #define CONFIG_DTT_MIN_TEMP  -30
  #define CONFIG_DTT_HYSTERESIS3
 @@ -150,38 +135,12 @@
  #define CONFIG_PHYLIB
  #define CONFIG_MII
  
 -#if defined(CONFIG_MBA6)
 -
 -#define CONFIG_FEC_XCV_TYPE  RGMII
 -#define CONFIG_ETHPRIME  FEC
 -
 -#define CONFIG_FEC_MXC_PHYADDR   0x03
 -#define CONFIG_PHY_MICREL
 -#define CONFIG_PHY_KSZ9031
 -
 -#else
 -
 -#error define PHY to use for your baseboard
 -
 -#endif
 -
  #define CONFIG_ARP_TIMEOUT   200UL
  /* Network config - Allow larger/faster download for TFTP/NFS */
  #define CONFIG_IP_DEFRAG
  #define CONFIG_TFTP_BLOCKSIZE4096
  #define CONFIG_NFS_READ_SIZE 4096
  
 -#if defined(CONFIG_MBA6)
 -
 -#define CONFIG_MXC_UART_BASE UART2_BASE
 -#define CONFIG_CONSOLE_DEV   ttymxc1
 -
 -#else
 -
 -#error define baseboard specific things (uart, number of SD-card slots)
 -
 -#endif
 -
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
  #define CONFIG_CONS_INDEX1
 @@ -495,4 +454,15 @@
  #define CONFIG_CMD_CACHE
  #endif
  
 +/*
 + * All the defines above are for the TQMa6 SoM
 + *
 + * Now include the baseboard specific configuration
 + */
 +#ifdef CONFIG_MBA6
 +#include tqma6_mba6.h
 +#else
 +#error No baseboard for the TQMa6 defined!
 +#endif

Maybe this is the right place to add something like:

/* support at least the sensor on TQMa6 SOM */
#if !defined(CONFIG_DTT_SENSORS)
#define CONFIG_DTT_SENSORS  { 0 }
#endif
 +
  #endif /* __CONFIG_H */
 diff --git a/include/configs/tqma6_mba6.h b/include/configs/tqma6_mba6.h
 new file mode 100644
 index 000..a16120a
 --- /dev/null
 +++ b/include/configs/tqma6_mba6.h
 @@ -0,0 +1,32 @@
 +/*
 + * Copyright (C) 2013, 2014 Markus Niebel markus.nie...@tq-group.com
 + *
 + * Configuration settings for the TQ Systems TQMa6Q,S module.
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +#ifndef __CONFIG_TQMA6_MBA6_H
 +#define __CONFIG_TQMA6_MBA6_H
 +
 +/* And now the baseboard specific configuration */
Please delete this comment. 
 +
 +#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 +#define CONFIG_DEFAULT_FDT_FILE  imx6dl-mba6x.dtb
 +#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
 +#define CONFIG_DEFAULT_FDT_FILE  imx6q-mba6x.dtb
 +#endif
 +
 +#define CONFIG_DTT_SENSORS   { 0, 1 }
 +
 +#define CONFIG_FEC_XCV_TYPE  RGMII
 +#define CONFIG_ETHPRIME  FEC
 +
 +#define CONFIG_FEC_MXC_PHYADDR   0x03
 +#define CONFIG_PHY_MICREL
 +#define CONFIG_PHY_KSZ9031
 +
 +#define CONFIG_MXC_UART_BASE UART2_BASE
 +#define CONFIG_CONSOLE_DEV   ttymxc1
 +
 +#endif /* __CONFIG_TQMA6_MBA6_H */
 
Regards

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


Re: [U-Boot] [PATCH 2/3] arm: mx6: tqma6: Update to optionally configure an alternative SPI setup

2015-03-12 Thread Markus Niebel
Hello Stefan,

Am 12.03.2015 um 13:34 schrieb Stefan Roese:
 By making the tqma6_iomuxc_spi() weak, this patch adds the possibility to
 add a different function for this SPI configuration. This can be used
 by other baseboards, that might have a different SPI setup.
 
 This patch will be used by the upcoming WRU-IV board support which also
 uses the TQMa6 SoM.
 
 Signed-off-by: Stefan Roese s...@denx.de
 ---
  board/tqc/tqma6/tqma6.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
 index c9e163e..29db838 100644
 --- a/board/tqc/tqma6/tqma6.c
 +++ b/board/tqc/tqma6/tqma6.c
 @@ -145,7 +145,7 @@ static unsigned const tqma6_ecspi1_cs[] = {
   TQMA6_SF_CS_GPIO,
  };
  
 -static void tqma6_iomuxc_spi(void)
 +__weak void tqma6_iomuxc_spi(void)
  {
   unsigned i;
  
When implementing an baseboard specific init handler, we will get a warning 
about unused 
tqma6_ecspi1_pads and tqma6_ecspi1_cs, or did I miss something?

Just as a thought (not ready): Could we supply CS initialisation data via 
defines in the
baseboard config header and append it to the tables if needed?

Regards

Markus


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


Re: [U-Boot] [PATCH 3/3 v2] arm: mx6: tqma6: Extract baseboard configs into separate config file

2015-03-12 Thread Markus Niebel
Am 12.03.2015 um 16:34 schrieb Stefan Roese:
 This patch extracts all baseboard specific defines into a separate config 
 file.
 This makes it easier to add other baseboards that use the TQMa6 SoM.
 
 This patch will be used by the upcoming WRU-IV board support which also
 uses the TQMa6 SoM.
 
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Markus Niebel markus.nie...@tq-group.com
 Cc: Stefano Babic sba...@denx.de
 ---
 v2:
 - Move default DTT sensor definion to end of config header
   for baseboards not implementing any additional sensors
 - Remove comment
 
  include/configs/tqma6.h  | 57 
 +---
  include/configs/tqma6_mba6.h | 30 +++
  2 files changed, 46 insertions(+), 41 deletions(-)
  create mode 100644 include/configs/tqma6_mba6.h
 
 diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
 index 9022550..d064c81 100644
 --- a/include/configs/tqma6.h
 +++ b/include/configs/tqma6.h
 @@ -35,16 +35,6 @@
  #define PHYS_SDRAM_SIZE  (1024u * SZ_1M)
  #endif
  
 -#if defined(CONFIG_MBA6)
 -
 -#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 -#define CONFIG_DEFAULT_FDT_FILE  imx6dl-mba6x.dtb
 -#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
 -#define CONFIG_DEFAULT_FDT_FILE  imx6q-mba6x.dtb
 -#endif
 -
 -#endif
 -
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DISPLAY_BOARDINFO
  #define CONFIG_SYS_GENERIC_BOARD
 @@ -85,11 +75,6 @@
  
  /* I2C SYSMON (LM75) */
  #define CONFIG_DTT_LM75
 -#if defined(CONFIG_MBA6)
 -#define CONFIG_DTT_SENSORS   { 0, 1 }
 -#else
 -#define CONFIG_DTT_SENSORS   { 0 }
 -#endif
  #define CONFIG_DTT_MAX_TEMP  70
  #define CONFIG_DTT_MIN_TEMP  -30
  #define CONFIG_DTT_HYSTERESIS3
 @@ -150,38 +135,12 @@
  #define CONFIG_PHYLIB
  #define CONFIG_MII
  
 -#if defined(CONFIG_MBA6)
 -
 -#define CONFIG_FEC_XCV_TYPE  RGMII
 -#define CONFIG_ETHPRIME  FEC
 -
 -#define CONFIG_FEC_MXC_PHYADDR   0x03
 -#define CONFIG_PHY_MICREL
 -#define CONFIG_PHY_KSZ9031
 -
 -#else
 -
 -#error define PHY to use for your baseboard
 -
 -#endif
 -
  #define CONFIG_ARP_TIMEOUT   200UL
  /* Network config - Allow larger/faster download for TFTP/NFS */
  #define CONFIG_IP_DEFRAG
  #define CONFIG_TFTP_BLOCKSIZE4096
  #define CONFIG_NFS_READ_SIZE 4096
  
 -#if defined(CONFIG_MBA6)
 -
 -#define CONFIG_MXC_UART_BASE UART2_BASE
 -#define CONFIG_CONSOLE_DEV   ttymxc1
 -
 -#else
 -
 -#error define baseboard specific things (uart, number of SD-card slots)
 -
 -#endif
 -
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
  #define CONFIG_CONS_INDEX1
 @@ -495,4 +454,20 @@
  #define CONFIG_CMD_CACHE
  #endif
  
 +/*
 + * All the defines above are for the TQMa6 SoM
 + *
 + * Now include the baseboard specific configuration
 + */
 +#ifdef CONFIG_MBA6
 +#include tqma6_mba6.h
 +#else
 +#error No baseboard for the TQMa6 defined!
 +#endif
 +
 +/* Support at least the sensor on TQMa6 SOM */
 +#if !defined(CONFIG_DTT_SENSORS)
 +#define CONFIG_DTT_SENSORS   { 0 }
 +#endif
 +
  #endif /* __CONFIG_H */
 diff --git a/include/configs/tqma6_mba6.h b/include/configs/tqma6_mba6.h
 new file mode 100644
 index 000..88c0067
 --- /dev/null
 +++ b/include/configs/tqma6_mba6.h
 @@ -0,0 +1,30 @@
 +/*
 + * Copyright (C) 2013, 2014 Markus Niebel markus.nie...@tq-group.com
 + *
 + * Configuration settings for the TQ Systems TQMa6Q,S module.
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +#ifndef __CONFIG_TQMA6_MBA6_H
 +#define __CONFIG_TQMA6_MBA6_H
 +
 +#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 +#define CONFIG_DEFAULT_FDT_FILE  imx6dl-mba6x.dtb
 +#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
 +#define CONFIG_DEFAULT_FDT_FILE  imx6q-mba6x.dtb
 +#endif
 +
 +#define CONFIG_DTT_SENSORS   { 0, 1 }
 +
 +#define CONFIG_FEC_XCV_TYPE  RGMII
 +#define CONFIG_ETHPRIME  FEC
 +
 +#define CONFIG_FEC_MXC_PHYADDR   0x03
 +#define CONFIG_PHY_MICREL
 +#define CONFIG_PHY_KSZ9031
 +
 +#define CONFIG_MXC_UART_BASE UART2_BASE
 +#define CONFIG_CONSOLE_DEV   ttymxc1
 +
 +#endif /* __CONFIG_TQMA6_MBA6_H */
 
Acked-By: Markus Niebel markus.nie...@tq-group.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH ] MMC: add MMC_VERSION_5_0

2014-12-09 Thread Markus Niebel
Am 18.11.2014 um 15:13 schrieb Markus Niebel:

Ping - any comments?

 From: Markus Niebel markus.nie...@tq-group.com
 
 Signed-off-by: Markus Niebel markus.nie...@tq-group.com
 ---
  drivers/mmc/mmc.c | 3 +++
  include/mmc.h | 1 +
  2 files changed, 4 insertions(+)
 
 diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
 index 24b0989..144c7f7 100644
 --- a/drivers/mmc/mmc.c
 +++ b/drivers/mmc/mmc.c
 @@ -1001,6 +1001,9 @@ static int mmc_startup(struct mmc *mmc)
   case 6:
   mmc-version = MMC_VERSION_4_5;
   break;
 + case 7:
 + mmc-version = MMC_VERSION_5_0;
 + break;
   }
  
   /*
 diff --git a/include/mmc.h b/include/mmc.h
 index cb91565..51ee24b 100644
 --- a/include/mmc.h
 +++ b/include/mmc.h
 @@ -31,6 +31,7 @@
  #define MMC_VERSION_4_3  (MMC_VERSION_MMC | 0x403)
  #define MMC_VERSION_4_41 (MMC_VERSION_MMC | 0x429)
  #define MMC_VERSION_4_5  (MMC_VERSION_MMC | 0x405)
 +#define MMC_VERSION_5_0  (MMC_VERSION_MMC | 0x500)
  
  #define MMC_MODE_HS  (1  0)
  #define MMC_MODE_HS_52MHz(1  1)
 

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


Re: [U-Boot] [PATCH] bootz: fix silent console

2014-11-25 Thread Markus Niebel
Hello Simon,

Am 20.11.2014 um 20:15 schrieb Simon Glass:
 Hi Markus,
 
 On 18 November 2014 12:52, Markus Niebel list-09_u-b...@tqsc.de wrote:
 From: Markus Niebel markus.nie...@tq-group.com

 fixup was lost during split between command code and logic.

 Signed-off-by: Markus Niebel markus.nie...@tq-group.com
 ---
  common/bootm.c | 2 +-
  common/cmd_bootm.c | 6 ++
  include/bootm.h| 2 ++
  3 files changed, 9 insertions(+), 1 deletion(-)

 diff --git a/common/bootm.c b/common/bootm.c
 index 6b3ea8c..94b9503 100644
 --- a/common/bootm.c
 +++ b/common/bootm.c
 @@ -467,7 +467,7 @@ ulong bootm_disable_interrupts(void)
  #define CONSOLE_ARG console=
  #define CONSOLE_ARG_LEN (sizeof(CONSOLE_ARG) - 1)

 -static void fixup_silent_linux(void)
 +void fixup_silent_linux(void)
  {
 char *buf;
 const char *env_val;
 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
 index 6723360..d3e410a 100644
 --- a/common/cmd_bootm.c
 +++ b/common/cmd_bootm.c
 @@ -596,6 +596,12 @@ int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char 
 * const argv[])
  * disable interrupts ourselves
  */
 bootm_disable_interrupts();
 +#if defined(CONFIG_SILENT_CONSOLE)  !defined(CONFIG_SILENT_U_BOOT_ONLY)
 +   /*
 +* same goes for fixup_silent_linux
 +*/
 +   fixup_silent_linux();
 +#endif

 images.os.os = IH_OS_LINUX;
 ret = do_bootm_states(cmdtp, flag, argc, argv,
 diff --git a/include/bootm.h b/include/bootm.h
 index b3d1a62..8e094b3 100644
 --- a/include/bootm.h
 +++ b/include/bootm.h
 @@ -50,6 +50,8 @@ ulong bootm_disable_interrupts(void);

  /* This is a special function used by booti/bootz */
  int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]);
 +/* This function is used also used by bootz */
 +void fixup_silent_linux(void);

  int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const 
 argv[],
 int states, bootm_headers_t *images, int boot_progress);
 
 Quite a bit of effort was expended trying to join this code back
 together rather than having two separate code paths for bootm and
 bootz.

I Understand

 
 Since this is cmdline-related, I suggest something like this:
 
 - Enable BOOTM_STATE_OS_CMDLINE for all archs in do_bootm()
 - Call fixup_silent_linux() in do_bootm_states() when processing
 BOOTM_STATE_OS_CMDLINE
 - Add BOOTM_STATE_OS_CMDLINE to the do_bootm_states() call in do_bootz()
 

I read through the code to find out, what the implications of your
suggestions were. Since I'm not very familiar with this piece of code,
please correct me, If i'm wrong:

- rename the arch specific do_bootm_linux to arch_bootm_linux
- implement a generic version of do_bootm_linux inside bootm_os.c 
- call arch_bootm_linux from generic do_bootm_linux 
- move the call to fixup_silent_linux to new do_bootm_linux for the
  BOOTM_STATE_OS_CMDLINE case 
- mask BOOTM_STATE_OS_CMDLINE before calling arch_bootm_linux for all but
  MIPS and PPC 

because this seems a bit intrusive I'm not sure. But if this is the wy to go, I
will prepare a patch.

 Or similar...that way we keep bootm and bootz in sync. The separate
 call to bootm_disable_interrupts() is unfortunate but is a problem for
 another day.
 
 Regards,
 Simon
 
Regards,
Markus
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH ] MMC: fix user capacity for partitioned eMMC card

2014-11-21 Thread Markus Niebel
Hello Jaehoon Chung

Am 21.11.2014 um 11:50 schrieb Jaehoon Chung:
 Hi, Markus.
 
 On 11/18/2014 11:11 PM, Markus Niebel wrote:
 From: Markus Niebel markus.nie...@tq-group.com

 if the card claims to be high capacity and the card
 is partitioned the capacity shall still be read from
 ext_csd SEC_COUNT even if the resulting capacity is
 smaller than 2 GiB
 
 I have one question. 
 smaller than 2GiB means the size after completed partition?

Yes. Some cards enable a pseudo SLC mode using the enhanced partition attribute.
This results in reduced sizes after completion.

Tested with a 4 GB Micron eMMC (resulting size is around 1.8 GiB)

 
 Best Regards,
 Jaehoon Chung
 

Best Regards

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


[U-Boot] [PATCH 2/4] tqma6: add missing include

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Add include needed to have prototype for board_spi_cs_gpio

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/tqma6.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index fd1bd59..5e913d7 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -17,6 +17,7 @@
 #include asm/gpio.h
 #include asm/io.h
 #include asm/imx-common/mxc_i2c.h
+#include asm/imx-common/spi.h
 #include common.h
 #include fsl_esdhc.h
 #include libfdt.h
-- 
2.1.1

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


[U-Boot] [PATCH 3/4] tqma6: add warning on failed setup_i2c

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

setup_i2c has a return value. Use it to give feedback
on error.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/tqma6.c  | 10 --
 board/tqc/tqma6/tqma6_mba6.c | 10 --
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 5e913d7..b7f4eb7 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -181,8 +181,14 @@ static struct i2c_pads_info tqma6_i2c3_pads = {
 
 static void tqma6_setup_i2c(void)
 {
-   /* use logical index for bus, e.g. I2C1 - 0 */
-   setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, tqma6_i2c3_pads);
+   int ret;
+   /*
+* use logical index for bus, e.g. I2C1 - 0
+* warn on error
+*/
+   ret = setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, tqma6_i2c3_pads);
+   if (ret)
+   printf(setup I2C3 failed: %d\n, ret);
 }
 
 int board_early_init_f(void)
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index fd59287..6f4cffd 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -224,8 +224,14 @@ static struct i2c_pads_info mba6_i2c1_pads = {
 
 static void mba6_setup_i2c(void)
 {
-   /* use logical index for bus, e.g. I2C1 - 0 */
-   setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, mba6_i2c1_pads);
+   int ret;
+   /*
+* use logical index for bus, e.g. I2C1 - 0
+* warn on error
+*/
+   ret = setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, mba6_i2c1_pads);
+   if (ret)
+   printf(setup I2C1 failed: %d\n, ret);
 }
 
 
-- 
2.1.1

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


[U-Boot] [RESEND PATCH 0/4] tqma6: improvements and cleanup

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This series contains some cosmetic and code cleanups.
No functional changes.

resend because of typo in Mailaddress.

Markus Niebel (4):
  tqma6: (cosmetic) remove CONFIG_FLASH_SECTOR_SIZE
  tqma6: add missing include
  tqma6: add warning on failed setup_i2c
  tqma6: use imx_ddr_size

 board/tqc/tqma6/tqma6.c  | 13 ++---
 board/tqc/tqma6/tqma6_mba6.c | 10 --
 include/configs/tqma6.h  | 28 ++--
 3 files changed, 32 insertions(+), 19 deletions(-)

-- 
2.1.1

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


[U-Boot] [PATCH 4/4] tqma6: use imx_ddr_size

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/tqma6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index b7f4eb7..e480d57 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -51,7 +51,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-   gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+   gd-ram_size = imx_ddr_size();
 
return 0;
 }
-- 
2.1.1

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


[U-Boot] [PATCH 1/4] tqma6: (cosmetic) remove CONFIG_FLASH_SECTOR_SIZE

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This is nowhere documented and only used
by two other boards. Replace it with
TQMA6_SPI_FLASH_SECTOR_SIZE.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 include/configs/tqma6.h | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index c94eee1..a099687 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -68,6 +68,8 @@
 #define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_STMICRO
 
+#define TQMA6_SPI_FLASH_SECTOR_SIZESZ_64K
+
 #define CONFIG_CMD_SF
 #define CONFIG_SF_DEFAULT_BUS  0
 #define CONFIG_SF_DEFAULT_CS   0
@@ -275,12 +277,10 @@
 
 #elif defined(CONFIG_TQMA6X_SPI_BOOT)
 
-#define CONFIG_FLASH_SECTOR_SIZE   0x1
-
 #define TQMA6_UBOOT_OFFSET 0x400
 #define TQMA6_UBOOT_SECTOR_START   0x0
 /* max u-boot size: 512k */
-#define TQMA6_UBOOT_SECTOR_SIZECONFIG_FLASH_SECTOR_SIZE
+#define TQMA6_UBOOT_SECTOR_SIZETQMA6_SPI_FLASH_SECTOR_SIZE
 #define TQMA6_UBOOT_SECTOR_COUNT   0x8
 #define TQMA6_UBOOT_SIZE   (TQMA6_UBOOT_SECTOR_SIZE * \
 TQMA6_UBOOT_SECTOR_COUNT)
@@ -288,7 +288,7 @@
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 #define CONFIG_ENV_OFFSET  (TQMA6_UBOOT_SIZE)
-#define CONFIG_ENV_SECT_SIZE   CONFIG_FLASH_SECTOR_SIZE
+#define CONFIG_ENV_SECT_SIZE   TQMA6_SPI_FLASH_SECTOR_SIZE
 #define CONFIG_ENV_OFFSET_REDUND   (CONFIG_ENV_OFFSET + \
 CONFIG_ENV_SECT_SIZE)
 
@@ -299,7 +299,7 @@
 
 #define TQMA6_FDT_OFFSET   (CONFIG_ENV_OFFSET_REDUND + \
 CONFIG_ENV_SECT_SIZE)
-#define TQMA6_FDT_SECT_SIZE(CONFIG_FLASH_SECTOR_SIZE)
+#define TQMA6_FDT_SECT_SIZE(TQMA6_SPI_FLASH_SECTOR_SIZE)
 
 #define TQMA6_FDT_SECTOR_START 0x0a /* 8 Sector u-boot, 2 Sector env */
 #define TQMA6_FDT_SECTOR_COUNT 0x01
@@ -320,7 +320,7 @@
setexpr blkc ${filesize} +   \
__stringify(TQMA6_UBOOT_OFFSET) ;\
setexpr size ${uboot_sectors} *  \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
if itest ${blkc} = ${size}; then\
sf probe;\
sf erase 0 ${size};  \
@@ -332,9 +332,9 @@
update_kernel=run kernel_name; if tftp ${kernel}; then   \
if itest ${filesize}  0; then   \
setexpr size ${kernel_sectors} * \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
setexpr offset ${kernel_start} * \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
if itest ${filesize} = ${size}; then\
sf probe;\
sf erase ${offset} ${size};  \
@@ -346,9 +346,9 @@
update_fdt=if tftp ${fdt_file}; then \
if itest ${filesize}  0; then   \
setexpr size ${fdt_sectors} *\
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
setexpr offset ${fdt_start} *\
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
if itest ${filesize} = ${size}; then\
sf probe;\
sf erase ${offset} ${size};  \
@@ -359,16 +359,16 @@
setenv filesize 0; setenv size ; setenv offset\0 \
loadimage=sf probe;  \
setexpr size ${kernel_sectors} * \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
setexpr offset ${kernel_start

[U-Boot] [PATCH] bootz: fix silent console

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

fixup was lost during split between command code and logic.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 common/bootm.c | 2 +-
 common/cmd_bootm.c | 6 ++
 include/bootm.h| 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/bootm.c b/common/bootm.c
index 6b3ea8c..94b9503 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -467,7 +467,7 @@ ulong bootm_disable_interrupts(void)
 #define CONSOLE_ARG console=
 #define CONSOLE_ARG_LEN (sizeof(CONSOLE_ARG) - 1)
 
-static void fixup_silent_linux(void)
+void fixup_silent_linux(void)
 {
char *buf;
const char *env_val;
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 6723360..d3e410a 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -596,6 +596,12 @@ int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
 * disable interrupts ourselves
 */
bootm_disable_interrupts();
+#if defined(CONFIG_SILENT_CONSOLE)  !defined(CONFIG_SILENT_U_BOOT_ONLY)
+   /*
+* same goes for fixup_silent_linux
+*/
+   fixup_silent_linux();
+#endif
 
images.os.os = IH_OS_LINUX;
ret = do_bootm_states(cmdtp, flag, argc, argv,
diff --git a/include/bootm.h b/include/bootm.h
index b3d1a62..8e094b3 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -50,6 +50,8 @@ ulong bootm_disable_interrupts(void);
 
 /* This is a special function used by booti/bootz */
 int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]);
+/* This function is used also used by bootz */
+void fixup_silent_linux(void);
 
 int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
int states, bootm_headers_t *images, int boot_progress);
-- 
2.1.1

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


[U-Boot] [PATCH ] MMC: fix user capacity for partitioned eMMC card

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

if the card claims to be high capacity and the card
is partitioned the capacity shall still be read from
ext_csd SEC_COUNT even if the resulting capacity is
smaller than 2 GiB

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 drivers/mmc/mmc.c | 15 +++
 include/mmc.h |  3 +++
 2 files changed, 18 insertions(+)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 44a4feb..24b0989 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1022,6 +1022,21 @@ static int mmc_startup(struct mmc *mmc)
mmc-erase_grp_size =
ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] *
MMC_MAX_BLOCK_LEN * 1024;
+   /*
+* if high capacity and partition setting completed
+* SEC_COUNT is valid even if it is smaller than 2 GiB
+* JEDEC Standard JESD84-B45, 6.2.4
+*/
+   if (mmc-high_capacity 
+   (ext_csd[EXT_CSD_PARTITION_SETTING] 
+EXT_CSD_PARTITION_SETTING_COMPLETED)) {
+   capacity = (ext_csd[EXT_CSD_SEC_CNT]) |
+   (ext_csd[EXT_CSD_SEC_CNT + 1]  8) |
+   (ext_csd[EXT_CSD_SEC_CNT + 2]  16) |
+   (ext_csd[EXT_CSD_SEC_CNT + 3]  24);
+   capacity *= MMC_MAX_BLOCK_LEN;
+   mmc-capacity_user = capacity;
+   }
} else {
/* Calculate the group size from the csd value. */
int erase_gsz, erase_gmul;
diff --git a/include/mmc.h b/include/mmc.h
index d74a190..cb91565 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -147,6 +147,7 @@
  * EXT_CSD fields
  */
 #define EXT_CSD_GP_SIZE_MULT   143 /* R/W */
+#define EXT_CSD_PARTITION_SETTING  155 /* R/W */
 #define EXT_CSD_PARTITIONS_ATTRIBUTE   156 /* R/W */
 #define EXT_CSD_PARTITIONING_SUPPORT   160 /* RO */
 #define EXT_CSD_RST_N_FUNCTION 162 /* R/W */
@@ -197,6 +198,8 @@
 #define EXT_CSD_BOOT_BUS_WIDTH_RESET(x)(x  2)
 #define EXT_CSD_BOOT_BUS_WIDTH_WIDTH(x)(x)
 
+#define EXT_CSD_PARTITION_SETTING_COMPLETED(1  0)
+
 #define R1_ILLEGAL_COMMAND (1  22)
 #define R1_APP_CMD (1  5)
 
-- 
2.1.1

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


[U-Boot] [PATCH ] MMC: add MMC_VERSION_5_0

2014-11-18 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 drivers/mmc/mmc.c | 3 +++
 include/mmc.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 24b0989..144c7f7 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1001,6 +1001,9 @@ static int mmc_startup(struct mmc *mmc)
case 6:
mmc-version = MMC_VERSION_4_5;
break;
+   case 7:
+   mmc-version = MMC_VERSION_5_0;
+   break;
}
 
/*
diff --git a/include/mmc.h b/include/mmc.h
index cb91565..51ee24b 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -31,6 +31,7 @@
 #define MMC_VERSION_4_3(MMC_VERSION_MMC | 0x403)
 #define MMC_VERSION_4_41   (MMC_VERSION_MMC | 0x429)
 #define MMC_VERSION_4_5(MMC_VERSION_MMC | 0x405)
+#define MMC_VERSION_5_0(MMC_VERSION_MMC | 0x500)
 
 #define MMC_MODE_HS(1  0)
 #define MMC_MODE_HS_52MHz  (1  1)
-- 
2.1.1

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


[U-Boot] [PATCH 1/4] tqma6: (cosmetic) remove CONFIG_FLASH_SECTOR_SIZE

2014-11-14 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This is nowhere documented and only used
by two other boards. Replace it with
TQMA6_SPI_FLASH_SECTOR_SIZE.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 include/configs/tqma6.h | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index c94eee1..a099687 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -68,6 +68,8 @@
 #define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_STMICRO
 
+#define TQMA6_SPI_FLASH_SECTOR_SIZESZ_64K
+
 #define CONFIG_CMD_SF
 #define CONFIG_SF_DEFAULT_BUS  0
 #define CONFIG_SF_DEFAULT_CS   0
@@ -275,12 +277,10 @@
 
 #elif defined(CONFIG_TQMA6X_SPI_BOOT)
 
-#define CONFIG_FLASH_SECTOR_SIZE   0x1
-
 #define TQMA6_UBOOT_OFFSET 0x400
 #define TQMA6_UBOOT_SECTOR_START   0x0
 /* max u-boot size: 512k */
-#define TQMA6_UBOOT_SECTOR_SIZECONFIG_FLASH_SECTOR_SIZE
+#define TQMA6_UBOOT_SECTOR_SIZETQMA6_SPI_FLASH_SECTOR_SIZE
 #define TQMA6_UBOOT_SECTOR_COUNT   0x8
 #define TQMA6_UBOOT_SIZE   (TQMA6_UBOOT_SECTOR_SIZE * \
 TQMA6_UBOOT_SECTOR_COUNT)
@@ -288,7 +288,7 @@
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 #define CONFIG_ENV_OFFSET  (TQMA6_UBOOT_SIZE)
-#define CONFIG_ENV_SECT_SIZE   CONFIG_FLASH_SECTOR_SIZE
+#define CONFIG_ENV_SECT_SIZE   TQMA6_SPI_FLASH_SECTOR_SIZE
 #define CONFIG_ENV_OFFSET_REDUND   (CONFIG_ENV_OFFSET + \
 CONFIG_ENV_SECT_SIZE)
 
@@ -299,7 +299,7 @@
 
 #define TQMA6_FDT_OFFSET   (CONFIG_ENV_OFFSET_REDUND + \
 CONFIG_ENV_SECT_SIZE)
-#define TQMA6_FDT_SECT_SIZE(CONFIG_FLASH_SECTOR_SIZE)
+#define TQMA6_FDT_SECT_SIZE(TQMA6_SPI_FLASH_SECTOR_SIZE)
 
 #define TQMA6_FDT_SECTOR_START 0x0a /* 8 Sector u-boot, 2 Sector env */
 #define TQMA6_FDT_SECTOR_COUNT 0x01
@@ -320,7 +320,7 @@
setexpr blkc ${filesize} +   \
__stringify(TQMA6_UBOOT_OFFSET) ;\
setexpr size ${uboot_sectors} *  \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
if itest ${blkc} = ${size}; then\
sf probe;\
sf erase 0 ${size};  \
@@ -332,9 +332,9 @@
update_kernel=run kernel_name; if tftp ${kernel}; then   \
if itest ${filesize}  0; then   \
setexpr size ${kernel_sectors} * \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
setexpr offset ${kernel_start} * \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
if itest ${filesize} = ${size}; then\
sf probe;\
sf erase ${offset} ${size};  \
@@ -346,9 +346,9 @@
update_fdt=if tftp ${fdt_file}; then \
if itest ${filesize}  0; then   \
setexpr size ${fdt_sectors} *\
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
setexpr offset ${fdt_start} *\
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
if itest ${filesize} = ${size}; then\
sf probe;\
sf erase ${offset} ${size};  \
@@ -359,16 +359,16 @@
setenv filesize 0; setenv size ; setenv offset\0 \
loadimage=sf probe;  \
setexpr size ${kernel_sectors} * \
-   __stringify(CONFIG_FLASH_SECTOR_SIZE);   \
+   __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE);\
setexpr offset ${kernel_start

[U-Boot] [PATCH 4/4] tqma6: use imx_ddr_size

2014-11-14 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/tqma6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index b7f4eb7..e480d57 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -51,7 +51,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-   gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+   gd-ram_size = imx_ddr_size();
 
return 0;
 }
-- 
2.1.1

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


[U-Boot] [PATCH 3/4] tqma6: add warning on failed setup_i2c

2014-11-14 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

setup_i2c has a return value. Use it to give feedback
on error.

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/tqma6.c  | 10 --
 board/tqc/tqma6/tqma6_mba6.c | 10 --
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 5e913d7..b7f4eb7 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -181,8 +181,14 @@ static struct i2c_pads_info tqma6_i2c3_pads = {
 
 static void tqma6_setup_i2c(void)
 {
-   /* use logical index for bus, e.g. I2C1 - 0 */
-   setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, tqma6_i2c3_pads);
+   int ret;
+   /*
+* use logical index for bus, e.g. I2C1 - 0
+* warn on error
+*/
+   ret = setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, tqma6_i2c3_pads);
+   if (ret)
+   printf(setup I2C3 failed: %d\n, ret);
 }
 
 int board_early_init_f(void)
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index fd59287..6f4cffd 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -224,8 +224,14 @@ static struct i2c_pads_info mba6_i2c1_pads = {
 
 static void mba6_setup_i2c(void)
 {
-   /* use logical index for bus, e.g. I2C1 - 0 */
-   setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, mba6_i2c1_pads);
+   int ret;
+   /*
+* use logical index for bus, e.g. I2C1 - 0
+* warn on error
+*/
+   ret = setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, mba6_i2c1_pads);
+   if (ret)
+   printf(setup I2C1 failed: %d\n, ret);
 }
 
 
-- 
2.1.1

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


[U-Boot] [PATCH 2/4] tqma6: add missing include

2014-11-14 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

Add include needed to have prototype for board_spi_cs_gpio

Signed-off-by: Markus Niebel markus.nie...@tq-group.com
---
 board/tqc/tqma6/tqma6.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index fd1bd59..5e913d7 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -17,6 +17,7 @@
 #include asm/gpio.h
 #include asm/io.h
 #include asm/imx-common/mxc_i2c.h
+#include asm/imx-common/spi.h
 #include common.h
 #include fsl_esdhc.h
 #include libfdt.h
-- 
2.1.1

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


[U-Boot] [PATCH 0/4] tqma6: improvements and cleanup

2014-11-14 Thread Markus Niebel
From: Markus Niebel markus.nie...@tq-group.com

This series contains some cosmetic and code cleanups.
No functional changes.

Markus Niebel (4):
  tqma6: (cosmetic) remove CONFIG_FLASH_SECTOR_SIZE
  tqma6: add missing include
  tqma6: add warning on failed setup_i2c
  tqma6: use imx_ddr_size

 board/tqc/tqma6/tqma6.c  | 13 ++---
 board/tqc/tqma6/tqma6_mba6.c | 10 --
 include/configs/tqma6.h  | 28 ++--
 3 files changed, 32 insertions(+), 19 deletions(-)

-- 
2.1.1

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


  1   2   >