* [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup
@ 2014-02-27 13:53 Lucas Stach
2014-02-27 13:53 ` [PATCH 2/5] ARM: i.MX: edmqmx6: correct MMDC init Lucas Stach
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Lucas Stach @ 2014-02-27 13:53 UTC (permalink / raw)
To: barebox
This was broken with commit 2a1f5f802e
"ARM: rename boards to more consistent naming"
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
The bad commit is currently in -master, so this patch
should go there to avoid a breaking this board with the
.03 release.
---
arch/arm/boards/datamodul-edm-qmx6/lowlevel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
index de7cc98efebe..33e0152bc743 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
@@ -164,8 +164,8 @@ ENTRY_FUNCTION(start_imx6_realq7, r0, r1, r2)
* inside valid SDRAM instead of SRAM.
*/
memcpy((void *)sdram, (void *)fdt,
- __dtb_imx6q_dmo_edmqmx6_start -
- __dtb_imx6q_dmo_edmqmx6_end);
+ __dtb_imx6q_dmo_edmqmx6_end -
+ __dtb_imx6q_dmo_edmqmx6_start);
fdt = sdram;
}
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/5] ARM: i.MX: edmqmx6: correct MMDC init
2014-02-27 13:53 [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Lucas Stach
@ 2014-02-27 13:53 ` Lucas Stach
2014-02-27 13:53 ` [PATCH 3/5] ARM: i.MX: edmqmx6: choose the environment at the correct time Lucas Stach
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Lucas Stach @ 2014-02-27 13:53 UTC (permalink / raw)
To: barebox
From: Philipp Zabel <p.zabel@pengutronix.de>
This is a squashed commit of the following downstream
commits:
- Set CS0_END in MMDC0_MDASP to 32Gb (4GB)T
- Fix writes to MMDC0_MDSCR
- Enable bank interleaving (BI_ON) and set write
additional latency (WALAT) to 1 cycle in MMDC0_MDMISC
- Set ARCR_DYN_JMP=1 and ARCR_DYN_MAX=15 in MMDC0_MAARCR
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/datamodul-edm-qmx6/lowlevel.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
index 33e0152bc743..81b6ac4cbe0a 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
@@ -99,24 +99,19 @@ static void sdram_init(void)
writel(0x8A8F7934, 0x021b000c);
writel(0xDB568E65, 0x021b0010);
writel(0x01FF00DB, 0x021b0014);
- writel(0x00000740, 0x021b0018);
+ writel(0x00011740, 0x021b0018);
writel(0x00008000, 0x021b001c);
writel(0x000026d2, 0x021b002c);
writel(0x008F0E21, 0x021b0030);
- writel(0x00000047, 0x021b0040);
- writel(0x11420000, 0x021b0400);
+ writel(0x0000007f, 0x021b0040);
+ writel(0x114201f0, 0x021b0400);
writel(0x11420000, 0x021b4400);
writel(0x841A0000, 0x021b0000);
writel(0x04108032, 0x021b001c);
- writel(0x00008033, 0x021b001c);
+ writel(0x00028033, 0x021b001c);
writel(0x00048031, 0x021b001c);
writel(0x09308030, 0x021b001c);
writel(0x04008040, 0x021b001c);
- writel(0x0410803A, 0x021b001c);
- writel(0x0000803B, 0x021b001c);
- writel(0x00048039, 0x021b001c);
- writel(0x09308038, 0x021b001c);
- writel(0x04008048, 0x021b001c);
writel(0x00005800, 0x021b0020);
writel(0x00011117, 0x021b0818);
writel(0x00011117, 0x021b4818);
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/5] ARM: i.MX: edmqmx6: choose the environment at the correct time
2014-02-27 13:53 [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Lucas Stach
2014-02-27 13:53 ` [PATCH 2/5] ARM: i.MX: edmqmx6: correct MMDC init Lucas Stach
@ 2014-02-27 13:53 ` Lucas Stach
2014-02-27 13:53 ` [PATCH 4/5] ARM: i.MX: edmqmx6: set display GPIOs Lucas Stach
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Lucas Stach @ 2014-02-27 13:53 UTC (permalink / raw)
To: barebox
From: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2 lst:
- correct compatible
- proper function naming
---
arch/arm/boards/datamodul-edm-qmx6/board.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index 8a49beee2faa..3184912c4782 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -111,15 +111,11 @@ static int realq7_env_init(void)
}
late_initcall(realq7_env_init);
-static int realq7_console_init(void)
+static int realq7_device_init(void)
{
if (!of_machine_is_compatible("dmo,imx6q-edmqmx6"))
return 0;
- barebox_set_hostname("eDM-QMX6");
-
- imx6_init_lowlevel();
-
switch (bootsource_get()) {
case BOOTSOURCE_MMC:
of_device_enable_path("/chosen/environment-emmc");
@@ -132,4 +128,17 @@ static int realq7_console_init(void)
return 0;
}
-postcore_initcall(realq7_console_init);
+device_initcall(realq7_device_init);
+
+static int realq7_postcore_init(void)
+{
+ if (!of_machine_is_compatible("dmo,imx6q-edmqmx6"))
+ return 0;
+
+ barebox_set_hostname("eDM-QMX6");
+
+ imx6_init_lowlevel();
+
+ return 0;
+}
+postcore_initcall(realq7_postcore_init);
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/5] ARM: i.MX: edmqmx6: set display GPIOs
2014-02-27 13:53 [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Lucas Stach
2014-02-27 13:53 ` [PATCH 2/5] ARM: i.MX: edmqmx6: correct MMDC init Lucas Stach
2014-02-27 13:53 ` [PATCH 3/5] ARM: i.MX: edmqmx6: choose the environment at the correct time Lucas Stach
@ 2014-02-27 13:53 ` Lucas Stach
2014-02-27 13:53 ` [PATCH 5/5] ARM: i.MX: edmqmx6: choose correct env when booting from SD Lucas Stach
2014-02-27 20:10 ` [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Lucas Stach @ 2014-02-27 13:53 UTC (permalink / raw)
To: barebox
From: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2 lst:
- move to device initcall
- use IMX_GPIO_NR macro
---
arch/arm/boards/datamodul-edm-qmx6/board.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index 3184912c4782..b0b4ae98d446 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -116,6 +116,9 @@ static int realq7_device_init(void)
if (!of_machine_is_compatible("dmo,imx6q-edmqmx6"))
return 0;
+ gpio_direction_output(IMX_GPIO_NR(2, 22), 1);
+ gpio_direction_output(IMX_GPIO_NR(2, 21), 1);
+
switch (bootsource_get()) {
case BOOTSOURCE_MMC:
of_device_enable_path("/chosen/environment-emmc");
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/5] ARM: i.MX: edmqmx6: choose correct env when booting from SD
2014-02-27 13:53 [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Lucas Stach
` (2 preceding siblings ...)
2014-02-27 13:53 ` [PATCH 4/5] ARM: i.MX: edmqmx6: set display GPIOs Lucas Stach
@ 2014-02-27 13:53 ` Lucas Stach
2014-02-27 20:10 ` [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Lucas Stach @ 2014-02-27 13:53 UTC (permalink / raw)
To: barebox
When booting from SD Card we don't want to load an env
from EMMC.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/datamodul-edm-qmx6/board.c | 9 ++++++++-
arch/arm/dts/imx6q-dmo-edmqmx6.dts | 25 ++++++++++++++++++++++++-
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index b0b4ae98d446..fd02d7a3de1d 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -121,7 +121,14 @@ static int realq7_device_init(void)
switch (bootsource_get()) {
case BOOTSOURCE_MMC:
- of_device_enable_path("/chosen/environment-emmc");
+ switch (bootsource_get_instance()) {
+ case 2:
+ of_device_enable_path("/chosen/environment-sd");
+ break;
+ case 3:
+ of_device_enable_path("/chosen/environment-emmc");
+ break;
+ }
break;
default:
case BOOTSOURCE_SPI:
diff --git a/arch/arm/dts/imx6q-dmo-edmqmx6.dts b/arch/arm/dts/imx6q-dmo-edmqmx6.dts
index 9fe128410640..4cd1c55ff82e 100644
--- a/arch/arm/dts/imx6q-dmo-edmqmx6.dts
+++ b/arch/arm/dts/imx6q-dmo-edmqmx6.dts
@@ -20,6 +20,12 @@
chosen {
linux,stdout-path = "/soc/aips-bus@02100000/serial@021e8000";
+ environment-sd {
+ compatible = "barebox,environment";
+ device-path = &usdhc3, "partname:barebox-environment";
+ status = "disabled";
+ };
+
environment-emmc {
compatible = "barebox,environment";
device-path = &usdhc4, "partname:barebox-environment";
@@ -386,6 +392,18 @@
pinctrl-0 = <&pinctrl_usdhc3>;
vmmc-supply = <®_3p3v>;
status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0x80000>;
+ };
+ partition@1 {
+ label = "barebox-environment";
+ reg = <0x80000 0x80000>;
+ };
};
&usdhc4 {
@@ -395,11 +413,16 @@
non-removable;
bus-width = <8>;
status = "okay";
+
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
- label = "barebox-environment";
+ label = "barebox";
reg = <0x0 0x80000>;
};
+ partition@1 {
+ label = "barebox-environment";
+ reg = <0x80000 0x80000>;
+ };
};
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup
2014-02-27 13:53 [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Lucas Stach
` (3 preceding siblings ...)
2014-02-27 13:53 ` [PATCH 5/5] ARM: i.MX: edmqmx6: choose correct env when booting from SD Lucas Stach
@ 2014-02-27 20:10 ` Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2014-02-27 20:10 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Thu, Feb 27, 2014 at 02:53:19PM +0100, Lucas Stach wrote:
> This was broken with commit 2a1f5f802e
> "ARM: rename boards to more consistent naming"
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Applied, thanks
Sascha
> ---
> The bad commit is currently in -master, so this patch
> should go there to avoid a breaking this board with the
> .03 release.
> ---
> arch/arm/boards/datamodul-edm-qmx6/lowlevel.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
> index de7cc98efebe..33e0152bc743 100644
> --- a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
> +++ b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
> @@ -164,8 +164,8 @@ ENTRY_FUNCTION(start_imx6_realq7, r0, r1, r2)
> * inside valid SDRAM instead of SRAM.
> */
> memcpy((void *)sdram, (void *)fdt,
> - __dtb_imx6q_dmo_edmqmx6_start -
> - __dtb_imx6q_dmo_edmqmx6_end);
> + __dtb_imx6q_dmo_edmqmx6_end -
> + __dtb_imx6q_dmo_edmqmx6_start);
> fdt = sdram;
> }
>
> --
> 1.8.5.3
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-27 20:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-27 13:53 [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Lucas Stach
2014-02-27 13:53 ` [PATCH 2/5] ARM: i.MX: edmqmx6: correct MMDC init Lucas Stach
2014-02-27 13:53 ` [PATCH 3/5] ARM: i.MX: edmqmx6: choose the environment at the correct time Lucas Stach
2014-02-27 13:53 ` [PATCH 4/5] ARM: i.MX: edmqmx6: set display GPIOs Lucas Stach
2014-02-27 13:53 ` [PATCH 5/5] ARM: i.MX: edmqmx6: choose correct env when booting from SD Lucas Stach
2014-02-27 20:10 ` [PATCH 1/5] ARM: i.MX: edmqmx6: fix startup Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox