Skip to contentSkip to conversation

Marvell Armada 375 and 38x timer support

PATCH New Ezequiel Garcia 4 participants 10 messages Feb 10, 2014 – Feb 11, 2014

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

cover Marvell Armada 375 and 38x timer support

Hello Daniel,

This small series adds support for the two new Marvell ARM SoCs:
the Armada 375 and Armada 38x.

These new SoCs are based on Cortex-A9 CPU cores, and share a number of peripherals with their predecessors in the mach-mvebu family. The core support (arch/arm/mach-mvebu) for these SOCs have just been posted, and we're aiming at having this merged for 3.15.

The A375 SoC timer is modeled matching the A370 timer, while the A38x SoC timer is modeled matching the AXP timer. However, we'd like to keep the compatible strings as SoC-specific.

In the past, we've had trouble chosing a common compatible string, resulting in the introduction of per-SoC compatibles. Such compatible-string change of course implies breaking backards compatibility, and was only possible after agreeing that the old compatible wasn't used in production.

So, in order to avoid such problems, we think it's better to keep them separate.

Gregory CLEMENT (2):
clocksource: armada-370-xp: Add support for Armada 375
clocksource: armada-370-xp: Add support for Armada 38x

 .../bindings/timer/marvell,armada-370-xp-timer.txt | 13 ++++++++----
 drivers/clocksource/time-armada-370-xp.c           | 23 +++++++++++++++++++++-
 2 files changed, 31 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/2 clocksource: armada-370-xp: Add support for Armada 375

From: Gregory CLEMENT <[email protected]>

The Armada 375 has a 25 Mhz fixed clock, but it is non-functional. Therefore, let's use the A370 initialization for now, using the provided parent clock.

---
 .../bindings/timer/marvell,armada-370-xp-timer.txt          | 13 +++++++++----
 drivers/clocksource/time-armada-370-xp.c                    | 13 ++++++++++++-
 2 files changed, 21 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt +9 -4
index f455182..59894fb 100644
@@ -1,9 +1,11 @@
-Marvell Armada 370 and Armada XP Timers
----------------------------------------
+Marvell Armada 370, 375 and XP Timers
+-------------------------------------
 
 Required properties:
-- compatible: Should be either "marvell,armada-370-timer" or
-  "marvell,armada-xp-timer" as appropriate.
+- compatible: Should be either:
+    - "marvell,armada-370-timer"
+    - "marvell,armada-375-timer"
+    - "marvell,armada-xp-timer"
 - interrupts: Should contain the list of Global Timer interrupts and
   then local timer interrupts
 - reg: Should contain location and length for timers register. First
@@ -13,6 +15,9 @@ Required properties:
 Clocks required for compatible = "marvell,armada-370-timer":
 - clocks : Must contain a single entry describing the clock input
 
+Clocks required for compatible = "marvell,armada-375-timer":
+- clocks : Must contain a single entry describing the clock input
+
 Clocks required for compatible = "marvell,armada-xp-timer":
 - clocks : Must contain an entry for each entry in clock-names.
 - clock-names : Must include the following entries:
drivers/clocksource/time-armada-370-xp.c +12 -1
index ee8691b..87eda6d 100644
@@ -15,12 +15,15 @@
  * used as clock_event_device.
  *
  * ---
- * Clocksource driver for Armada 370 and Armada XP SoC.
+ * Clocksource driver for Armada 370, Armada 375 and Armada XP SoC.
  * This driver implements one compatible string for each SoC, given
  * each has its own characteristics:
  *
  *   * Armada 370 has no 25 MHz fixed timer.
  *
+ *   * Armada 375 has a non-usable 25 Mhz fixed timer, due to hardware
+ *     issues.
+ *
  *   * Armada XP cannot work properly without such 25 MHz fixed timer as
  *     doing otherwise leads to using a clocksource whose frequency varies
  *     when doing cpufreq frequency changes.
@@ -316,3 +319,11 @@ static void __init armada_370_timer_init(struct device_node *np)
 }
 CLOCKSOURCE_OF_DECLARE(armada_370, "marvell,armada-370-timer",
 		       armada_370_timer_init);
+
+/*
+ * Currently support the Armada 375 timer as identical to the Armada 370.
+ * However, let's keep a SoC-specific compatible string to allow to change
+ * this in the future.
+ */
+CLOCKSOURCE_OF_DECLARE(armada_375, "marvell,armada-375-timer",
+		       armada_370_timer_init);
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 2/2 clocksource: armada-370-xp: Add support for Armada 38x

In reply to Ezequiel Garcia

From: Gregory CLEMENT <[email protected]>

The Armada 38x has a 25 Mhz fixed clock. Therefore, we can model it as compatible to the Armada XP timer for now. Nevertheless, we introduce a new compatible string to allow future changes.

---
 drivers/clocksource/time-armada-370-xp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/clocksource/time-armada-370-xp.c +10 -0
index 87eda6d..9fd20b2 100644
@@ -24,6 +24,8 @@
  *   * Armada 375 has a non-usable 25 Mhz fixed timer, due to hardware
  *     issues.
  *
+ *   * Armada 380 has a 25 Mhz fixed timer.
+ *
  *   * Armada XP cannot work properly without such 25 MHz fixed timer as
  *     doing otherwise leads to using a clocksource whose frequency varies
  *     when doing cpufreq frequency changes.
@@ -327,3 +329,11 @@ CLOCKSOURCE_OF_DECLARE(armada_370, "marvell,armada-370-timer",
  */
 CLOCKSOURCE_OF_DECLARE(armada_375, "marvell,armada-375-timer",
 		       armada_370_timer_init);
+
+/*
+ * Support the Armada 38x timer as identical to the Armada XP, using the
+ * available 25 MHz clock. We maintain a SoC-specific compatible string to
+ * allow to change this in the future.
+ */
+CLOCKSOURCE_OF_DECLARE(armada_380, "marvell,armada-380-timer",
+		       armada_xp_timer_init);
Signature · 1 line
1.8.1.5
#3 lore raw

cover Marvell Armada 375 and 38x timer support

In reply to Ezequiel Garcia
Quoted 22 lines · Ezequiel Garcia

Hello Daniel,

This small series adds support for the two new Marvell ARM SoCs:
the Armada 375 and Armada 38x.

These new SoCs are based on Cortex-A9 CPU cores, and share a number of peripherals with their predecessors in the mach-mvebu family. The core support (arch/arm/mach-mvebu) for these SOCs have just been posted, and we're aiming at having this merged for 3.15.

The A375 SoC timer is modeled matching the A370 timer, while the A38x SoC timer is modeled matching the AXP timer. However, we'd like to keep the compatible strings as SoC-specific.

In the past, we've had trouble chosing a common compatible string, resulting in the introduction of per-SoC compatibles. Such compatible-string change of course implies breaking backards compatibility, and was only possible after agreeing that the old compatible wasn't used in production.

So, in order to avoid such problems, we think it's better to keep them separate.

Quoted 7 lines

Gregory CLEMENT (2):
clocksource: armada-370-xp: Add support for Armada 375
clocksource: armada-370-xp: Add support for Armada 38x

  .../bindings/timer/marvell,armada-370-xp-timer.txt | 13 ++++++++----
  drivers/clocksource/time-armada-370-xp.c           | 23 +++++++++++++++++++++-
  2 files changed, 31 insertions(+), 5 deletions(-)

Applied to my tree for 3.15.

Thanks !

-- Daniel

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#4 lore raw

cover Marvell Armada 375 and 38x timer support

Daniel,

Quoted 27 lines · Daniel Lezcano
Quoted 26 lines · Ezequiel Garcia

Hello Daniel,

This small series adds support for the two new Marvell ARM SoCs:
the Armada 375 and Armada 38x.

These new SoCs are based on Cortex-A9 CPU cores, and share a number of peripherals with their predecessors in the mach-mvebu family. The core support (arch/arm/mach-mvebu) for these SOCs have just been posted, and we're aiming at having this merged for 3.15.

The A375 SoC timer is modeled matching the A370 timer, while the A38x SoC timer is modeled matching the AXP timer. However, we'd like to keep the compatible strings as SoC-specific.

In the past, we've had trouble chosing a common compatible string, resulting in the introduction of per-SoC compatibles. Such compatible-string change of course implies breaking backards compatibility, and was only possible after agreeing that the old compatible wasn't used in production.

So, in order to avoid such problems, we think it's better to keep them separate.

Gregory CLEMENT (2):
clocksource: armada-370-xp: Add support for Armada 375
clocksource: armada-370-xp: Add support for Armada 38x

Quoted 5 lines
Quoted 3 lines
 .../bindings/timer/marvell,armada-370-xp-timer.txt | 13 ++++++++----
 drivers/clocksource/time-armada-370-xp.c           | 23 +++++++++++++++++++++-
 2 files changed, 31 insertions(+), 5 deletions(-)

Applied to my tree for 3.15.

Please hold off until we've resolved the discussion regarding adding unneeded compatible strings. It's under patch 6 in the main series adding support for this new SoC.

[PATCH 06/11] ARM: mvebu: add Armada 380/385 support to the system-controller driver

thx,

Jason.

#5 lore raw

cover Marvell Armada 375 and 38x timer support

Quoted 34 lines · Jason Cooper

Daniel,

Quoted 31 lines · Daniel Lezcano
Quoted 29 lines · Ezequiel Garcia

Hello Daniel,

This small series adds support for the two new Marvell ARM SoCs:
the Armada 375 and Armada 38x.

These new SoCs are based on Cortex-A9 CPU cores, and share a number of peripherals with their predecessors in the mach-mvebu family. The core support (arch/arm/mach-mvebu) for these SOCs have just been posted, and we're aiming at having this merged for 3.15.

The A375 SoC timer is modeled matching the A370 timer, while the A38x SoC timer is modeled matching the AXP timer. However, we'd like to keep the compatible strings as SoC-specific.

In the past, we've had trouble chosing a common compatible string, resulting in the introduction of per-SoC compatibles. Such compatible-string change of course implies breaking backards compatibility, and was only possible after agreeing that the old compatible wasn't used in production.

So, in order to avoid such problems, we think it's better to keep them separate.

Gregory CLEMENT (2):
clocksource: armada-370-xp: Add support for Armada 375
clocksource: armada-370-xp: Add support for Armada 38x

  .../bindings/timer/marvell,armada-370-xp-timer.txt | 13 ++++++++----
  drivers/clocksource/time-armada-370-xp.c           | 23 +++++++++++++++++++++-
  2 files changed, 31 insertions(+), 5 deletions(-)
Quoted 7 lines
Quoted 1 line

Applied to my tree for 3.15.

Please hold off until we've resolved the discussion regarding adding unneeded compatible strings. It's under patch 6 in the main series adding support for this new SoC.

[PATCH 06/11] ARM: mvebu: add Armada 380/385 support to the system-controller driver

Ok, thanks for the heads up.

-- Daniel

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#6 lore raw

cover Marvell Armada 375 and 38x timer support

Daniel,

Quoted 7 lines · Daniel Lezcano
Quoted 7 lines
Quoted 2 lines

Applied to my tree for 3.15.

Please hold off until we've resolved the discussion regarding adding unneeded compatible strings. It's under patch 6 in the main series adding support for this new SoC.

Yes, please drop it for now.

Quoted 4 lines
Quoted 1 line

[PATCH 06/11] ARM: mvebu: add Armada 380/385 support to the system-controller driver

Ok, thanks for the heads up.

Ah, my bad! I should have added a warning about the discussion as I did for the MBus patches. See:

http://www.spinics.net/lists/arm-kernel/msg306480.html

Signature · 3 lines
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
#7 lore raw

cover Marvell Armada 375 and 38x timer support

In reply to Jason Cooper
Quoted 34 lines · Jason Cooper

Daniel,

Quoted 31 lines · Daniel Lezcano
Quoted 29 lines · Ezequiel Garcia

Hello Daniel,

This small series adds support for the two new Marvell ARM SoCs:
the Armada 375 and Armada 38x.

These new SoCs are based on Cortex-A9 CPU cores, and share a number of peripherals with their predecessors in the mach-mvebu family. The core support (arch/arm/mach-mvebu) for these SOCs have just been posted, and we're aiming at having this merged for 3.15.

The A375 SoC timer is modeled matching the A370 timer, while the A38x SoC timer is modeled matching the AXP timer. However, we'd like to keep the compatible strings as SoC-specific.

In the past, we've had trouble chosing a common compatible string, resulting in the introduction of per-SoC compatibles. Such compatible-string change of course implies breaking backards compatibility, and was only possible after agreeing that the old compatible wasn't used in production.

So, in order to avoid such problems, we think it's better to keep them separate.

Gregory CLEMENT (2):
clocksource: armada-370-xp: Add support for Armada 375
clocksource: armada-370-xp: Add support for Armada 38x

 .../bindings/timer/marvell,armada-370-xp-timer.txt | 13 ++++++++----
 drivers/clocksource/time-armada-370-xp.c           | 23 +++++++++++++++++++++-
 2 files changed, 31 insertions(+), 5 deletions(-)
Quoted 8 lines
Quoted 1 line

Applied to my tree for 3.15.

Please hold off until we've resolved the discussion regarding adding unneeded compatible strings. It's under patch 6 in the main series adding support for this new SoC.

[PATCH 06/11] ARM: mvebu: add Armada 380/385 support to the system-controller driver

I still believe that having different compatible strings for different IP even if at first sight they look similar.

Moreover we are already aware of some issue on this SoC such as the 25Mhz timer which don't work (yet) on Armada 375.

Thanks,

Gregory

Quoted 9 lines

thx,

Jason.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#8 lore raw

cover Marvell Armada 375 and 38x timer support

In reply to Ezequiel Garcia

Daniel,

Quoted 4 lines · Ezequiel Garcia

This small series adds support for the two new Marvell ARM SoCs:
the Armada 375 and Armada 38x.

Please omit these patches entirely, we don't need them.

The new agreement [1] is to add SoC-specific compatible strings and also declare the nodes as compatibles with the already supported SoC, whenever appropriate.

[..]

Quoted 3 lines

The A375 SoC timer is modeled matching the A370 timer, while the A38x SoC timer is modeled matching the AXP timer.

So, as per the statement above, the devicetree for Armada 375 and Armada 38x would have these timer nodes, respectively:

  timer {
      compatible = "marvell,armada-375-timer", "marvell,armada-370-timer"
  }

  timer {
      compatible = "marvell,armada-380-timer", "marvell,armada-xp-timer"
  }

(Because the Armada 375 timer uses the provided parent clock, whereas the Armada 380 timer uses the fixed 25 MHz clock).

Therefore, we don't need any changes in the clocksource driver for now.

[1] http://www.spinics.net/lists/arm-kernel/msg306727.html

Signature · 3 lines
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
#9 lore raw

cover Marvell Armada 375 and 38x timer support

Quoted 9 lines · Ezequiel Garcia

Daniel,

Quoted 4 lines · Ezequiel Garcia

This small series adds support for the two new Marvell ARM SoCs:
the Armada 375 and Armada 38x.

Please omit these patches entirely, we don't need them.

Roger.

Quoted 27 lines

The new agreement [1] is to add SoC-specific compatible strings and also declare the nodes as compatibles with the already supported SoC, whenever appropriate.

[..]

Quoted 3 lines

The A375 SoC timer is modeled matching the A370 timer, while the A38x SoC timer is modeled matching the AXP timer.

So, as per the statement above, the devicetree for Armada 375 and Armada 38x would have these timer nodes, respectively:

   timer {
       compatible = "marvell,armada-375-timer", "marvell,armada-370-timer"
   }

   timer {
       compatible = "marvell,armada-380-timer", "marvell,armada-xp-timer"
   }

(Because the Armada 375 timer uses the provided parent clock, whereas the Armada 380 timer uses the fixed 25 MHz clock).

Therefore, we don't need any changes in the clocksource driver for now.

[1] http://www.spinics.net/lists/arm-kernel/msg306727.html

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog