Skip to contentSkip to conversation

imx: apf27: the board no longer boot with latest git kernel

DISCUSSION Philippe Reynes 2 participants 7 messages Jun 27, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

I've tested the lastest linus git kernel, and this kernel no longer boot on my armadeus apf27. The last line of the log are (after, the kernel is stalled) :

[    0.000000] CPU identified as i.MX27, silicon rev 2.1
[    0.000000] Switching to timer-based delay loop, resolution 60ns
[    0.000024] sched_clock: 32 bits at 16MHz, resolution 60ns, wraps every 129171917793ns
[    0.008172] clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 114963006693 ns
[    0.020252] Console: colour dummy device 80x30
[    0.024894] Calibrating delay loop (skipped), value calculated using timer frequency..

I've done a bisect and the commit that raise this issue is :
db2ae4b4f6b79bd11d6461d41bd0966b0006f20b
ARM: imx: provide gpt device specific irq functions

Do you also reproduce this issue please ? or may be I've missed to enable an new option ?

Regards,
Philippe

reviewer
#1 lore raw

Hi Philippe,

Quoted 14 lines · Philippe Reynes

Hi all,

I've tested the lastest linus git kernel, and this kernel no longer boot on my armadeus apf27. The last line of the log are (after, the kernel is stalled) :

[    0.000000] CPU identified as i.MX27, silicon rev 2.1
[    0.000000] Switching to timer-based delay loop, resolution 60ns
[    0.000024] sched_clock: 32 bits at 16MHz, resolution 60ns, wraps every
129171917793ns
[    0.008172] clocksource mxc_timer1: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 114963006693 ns
[    0.020252] Console: colour dummy device 80x30
[    0.024894] Calibrating delay loop (skipped), value calculated using
Quoted 8 lines

timer frequency..

I've done a bisect and the commit that raise this issue is :
db2ae4b4f6b79bd11d6461d41bd0966b0006f20b
ARM: imx: provide gpt device specific irq functions

Do you also reproduce this issue please ? or may be I've missed to enable an new option ?

I don't have access to a mx27 board at the moment, but I am wondering if the change below would fix the problem:

drivers/clocksource/timer-imx-gpt.c +1 -0
@@ -528,6 +528,7 @@ static void __init imx6dl_timer_init_dt(struct device_node *
 }
 
 CLOCKSOURCE_OF_DECLARE(imx1_timer, "fsl,imx1-gpt", imx1_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(imx27_timer, "fsl,imx27-gpt", imx1_timer_init_dt);
 CLOCKSOURCE_OF_DECLARE(imx21_timer, "fsl,imx21-gpt", imx21_timer_init_dt);
 CLOCKSOURCE_OF_DECLARE(imx31_timer, "fsl,imx31-gpt", imx31_timer_init_dt);
 CLOCKSOURCE_OF_DECLARE(imx25_timer, "fsl,imx25-gpt", imx31_timer_init_dt);

Regards,

Fabio Estevam

#2 lore raw

Hi Fabio,

Quoted 23 lines · Fabio Estevam

Hi Philippe,

Quoted 20 lines · Philippe Reynes

Hi all,

I've tested the lastest linus git kernel, and this kernel no longer boot on my armadeus apf27. The last line of the log are (after, the kernel is stalled) :

[    0.000000] CPU identified as i.MX27, silicon rev 2.1
[    0.000000] Switching to timer-based delay loop, resolution 60ns
[    0.000024] sched_clock: 32 bits at 16MHz, resolution 60ns, wraps every
129171917793ns
[    0.008172] clocksource mxc_timer1: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 114963006693 ns
[    0.020252] Console: colour dummy device 80x30
[    0.024894] Calibrating delay loop (skipped), value calculated using

timer frequency..

I've done a bisect and the commit that raise this issue is :
db2ae4b4f6b79bd11d6461d41bd0966b0006f20b
ARM: imx: provide gpt device specific irq functions

Quoted 5 lines
Quoted 2 lines

Do you also reproduce this issue please ? or may be I've missed to enable an new option ?

I don't have access to a mx27 board at the moment, but I am wondering if the change below would fix the problem:

I've got one, and I can do the test.

drivers/clocksource/timer-imx-gpt.c static void __init imx6dl_timer_init_dt(struct device_node * · line 534

Quoted 10 lines
drivers/clocksource/timer-imx-gpt.c +1 -0
@@ -528,6 +528,7 @@ static void __init imx6dl_timer_init_dt(struct device_node *
  }
 
  CLOCKSOURCE_OF_DECLARE(imx1_timer, "fsl,imx1-gpt", imx1_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(imx27_timer, "fsl,imx27-gpt", imx1_timer_init_dt);
  CLOCKSOURCE_OF_DECLARE(imx21_timer, "fsl,imx21-gpt", imx21_timer_init_dt);
  CLOCKSOURCE_OF_DECLARE(imx31_timer, "fsl,imx31-gpt", imx31_timer_init_dt);
  CLOCKSOURCE_OF_DECLARE(imx25_timer, "fsl,imx25-gpt", imx31_timer_init_dt);

I've looked the code in drivers/clocksource/timer-imx-gpt.c, in the definition of imx_gpt_type, there is :

	GPT_TYPE_IMX21,		/* i.MX21/27 */

So I've done a little change in your patch, I've used imx21_timer_init_dt for imx27 :

drivers/clocksource/timer-imx-gpt.c +1 -0
@@ -529,6 +529,7 @@ static void __init imx6dl_timer_init_dt(struct device_node *np)
  
  CLOCKSOURCE_OF_DECLARE(imx1_timer, "fsl,imx1-gpt", imx1_timer_init_dt);
  CLOCKSOURCE_OF_DECLARE(imx21_timer, "fsl,imx21-gpt", imx21_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(imx27_timer, "fsl,imx27-gpt", imx21_timer_init_dt);
  CLOCKSOURCE_OF_DECLARE(imx31_timer, "fsl,imx31-gpt", imx31_timer_init_dt);
  CLOCKSOURCE_OF_DECLARE(imx25_timer, "fsl,imx25-gpt", imx31_timer_init_dt);
  CLOCKSOURCE_OF_DECLARE(imx50_timer, "fsl,imx50-gpt", imx31_timer_init_dt);

I've tested it, and it works fine, now my apf27 (imx27) boot without any issue. So good catch, thanks a lot for this patch.

I may send a patch on lkml if you want.

Quoted 3 lines

Regards,

Fabio Estevam

Regards,
Philippe

reviewer
#3 lore raw
Quoted 20 lines · Philippe Reynes

I've looked the code in drivers/clocksource/timer-imx-gpt.c, in the definition
of imx_gpt_type, there is :

        GPT_TYPE_IMX21,         /* i.MX21/27 */

So I've done a little change in your patch, I've used imx21_timer_init_dt for
imx27 :

drivers/clocksource/timer-imx-gpt.c +1 -0
@@ -529,6 +529,7 @@ static void __init imx6dl_timer_init_dt(struct
 device_node *np)
  CLOCKSOURCE_OF_DECLARE(imx1_timer, "fsl,imx1-gpt", imx1_timer_init_dt);
 CLOCKSOURCE_OF_DECLARE(imx21_timer, "fsl,imx21-gpt", imx21_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(imx27_timer, "fsl,imx27-gpt", imx21_timer_init_dt);
 CLOCKSOURCE_OF_DECLARE(imx31_timer, "fsl,imx31-gpt", imx31_timer_init_dt);
 CLOCKSOURCE_OF_DECLARE(imx25_timer, "fsl,imx25-gpt", imx31_timer_init_dt);
 CLOCKSOURCE_OF_DECLARE(imx50_timer, "fsl,imx50-gpt", imx31_timer_init_dt);
Quoted 3 lines

I've tested it, and it works fine, now my apf27 (imx27) boot without any issue.
So good catch, thanks a lot for this patch.

Excellent :-)

Quoted 2 lines

I may send a patch on lkml if you want.

Yes, please submit a formal patch.

I thought it was imx1_timer_init_dt because in imx27.dtsi we have:

compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";

So I am wondering if this is correct or it should be

compatible = "fsl,imx27-gpt", "fsl,imx21-gpt"; instead?

Regards,

Fabio Estevam

reviewer
#4 lore raw

Philippe,

Quoted 9 lines · Fabio Estevam

Yes, please submit a formal patch.

I thought it was imx1_timer_init_dt because in imx27.dtsi we have:

compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";

So I am wondering if this is correct or it should be

compatible = "fsl,imx27-gpt", "fsl,imx21-gpt"; instead?

In addition to the drivers/clocksource/timer-imx-gpt.c patch, could you also try the change below?

arch/arm/boot/dts/imx27.dtsi +6 -6
@@ -108,7 +108,7 @@
             };
 
             gpt1: timer at 10003000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                 reg = <0x10003000 0x1000>;
                 interrupts = <26>;
                 clocks = <&clks IMX27_CLK_GPT1_IPG_GATE>,
@@ -117,7 +117,7 @@
             };
 
             gpt2: timer at 10004000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                 reg = <0x10004000 0x1000>;
                 interrupts = <25>;
                 clocks = <&clks IMX27_CLK_GPT2_IPG_GATE>,
@@ -126,7 +126,7 @@
             };
 
             gpt3: timer at 10005000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                 reg = <0x10005000 0x1000>;
                 interrupts = <24>;
                 clocks = <&clks IMX27_CLK_GPT3_IPG_GATE>,
@@ -376,7 +376,7 @@
             };
 
             gpt4: timer at 10019000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                 reg = <0x10019000 0x1000>;
                 interrupts = <4>;
                 clocks = <&clks IMX27_CLK_GPT4_IPG_GATE>,
@@ -385,7 +385,7 @@
             };
 
             gpt5: timer at 1001a000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                 reg = <0x1001a000 0x1000>;
                 interrupts = <3>;
                 clocks = <&clks IMX27_CLK_GPT5_IPG_GATE>,
@@ -436,7 +436,7 @@
             };
 
             gpt6: timer at 1001f000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                 reg = <0x1001f000 0x1000>;
                 interrupts = <2>;
                 clocks = <&clks IMX27_CLK_GPT6_IPG_GATE>,
#5 lore raw

Hi Fabio,

Quoted 8 lines · Fabio Estevam

Philippe,

Quoted 4 lines · Fabio Estevam

Yes, please submit a formal patch.

I thought it was imx1_timer_init_dt because in imx27.dtsi we have:

Quoted 8 lines
Quoted 5 lines

compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";

So I am wondering if this is correct or it should be

compatible = "fsl,imx27-gpt", "fsl,imx21-gpt"; instead?

In addition to the drivers/clocksource/timer-imx-gpt.c patch, could you also try the change below?

Yes, I do it

Quoted 48 lines
arch/arm/boot/dts/imx27.dtsi +5 -5
@@ -108,7 +108,7 @@
              };
 
              gpt1: timer at 10003000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                  reg =<0x10003000 0x1000>;
                  interrupts =<26>;
                  clocks =<&clks IMX27_CLK_GPT1_IPG_GATE>,
@@ -117,7 +117,7 @@
              };
 
              gpt2: timer at 10004000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                  reg =<0x10004000 0x1000>;
                  interrupts =<25>;
                  clocks =<&clks IMX27_CLK_GPT2_IPG_GATE>,
@@ -126,7 +126,7 @@
              };
 
              gpt3: timer at 10005000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                  reg =<0x10005000 0x1000>;
                  interrupts =<24>;
                  clocks =<&clks IMX27_CLK_GPT3_IPG_GATE>,
@@ -376,7 +376,7 @@
              };
 
              gpt4: timer at 10019000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                  reg =<0x10019000 0x1000>;
                  interrupts =<4>;
                  clocks =<&clks IMX27_CLK_GPT4_IPG_GATE>,
@@ -385,7 +385,7 @@
              };
 
              gpt5: timer at 1001a000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                  reg =<0x1001a000 0x1000>;
                  interrupts =<3>;
                  clocks =<&clks IMX27_CLK_GPT5_IPG_GATE>,

arch/arm/boot/dts/imx27.dtsi line 442

Quoted 8 lines
arch/arm/boot/dts/imx27.dtsi +1 -1
@@ -436,7 +436,7 @@
              };
 
              gpt6: timer at 1001f000 {
-                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
+                compatible = "fsl,imx27-gpt", "fsl,imx21-gpt";
                  reg =<0x1001f000 0x1000>;
                  interrupts =<2>;
                  clocks =<&clks IMX27_CLK_GPT6_IPG_GATE>,

I've tested this change, and it works fine.
In the file drivers/clocksource/timer-imx-gpt.c, there is :
#define imx21_gpt_irq_disable imx1_gpt_irq_disable #define imx21_gpt_irq_enable imx1_gpt_irq_enable So I think that using imx1 or imx21 has the same result;

Do you think I should put both change in on patch ? Or is it better to do two patches please ?

Regards,
Philippe

reviewer
#6 lore raw

Hi Philippe,

Quoted 8 lines · Philippe Reynes

I've tested this change, and it works fine.
In the file drivers/clocksource/timer-imx-gpt.c, there is :
#define imx21_gpt_irq_disable imx1_gpt_irq_disable #define imx21_gpt_irq_enable imx1_gpt_irq_enable So I think that using imx1 or imx21 has the same result;

Do you think I should put both change in on patch ? Or is it better to do two patches please ?

I think they should be separate patches.

Let's do the following: you sent the drivers/clocksource/timer-imx-gpt.c fix and I will send the dtsi change.

Thanks,

Fabio Estevam