Skip to contentSkip to conversation

clksrc: delete nomadik MTU non-DT boot path

PATCH New Linus Walleij 3 participants 7 messages Nov 19, 2013 – Nov 20, 2013 Clocksource, clockevent drivers

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 clksrc: delete nomadik MTU non-DT boot path

Both platforms using the MTU (Nomadik and Ux500) have now been converted to use device tree exclusively, thus let us delete this platform data header and make this driver a fully self-contained DT-only driver.

Cc Daniel Lezcano <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Lee Jones <[email protected]>

---
Daniel/tglx: seeking an ACK from either of you guys to take this in the ux500-devicetree branch where the last user is deleted.

---
 drivers/clocksource/nomadik-mtu.c                  | 23 +++++-----------------
 .../linux/platform_data/clocksource-nomadik-mtu.h  |  9 ---------
 2 files changed, 5 insertions(+), 27 deletions(-)
 delete mode 100644 include/linux/platform_data/clocksource-nomadik-mtu.h
drivers/clocksource/nomadik-mtu.c +5 -18
index ed7b73b508e0..f00b5c9ce8b6 100644
@@ -20,7 +20,6 @@
 #include <linux/jiffies.h>
 #include <linux/delay.h>
 #include <linux/err.h>
-#include <linux/platform_data/clocksource-nomadik-mtu.h>
 #include <linux/sched_clock.h>
 #include <asm/mach/time.h>
 
@@ -103,7 +102,7 @@ static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev)
 	return 0;
 }
 
-void nmdk_clkevt_reset(void)
+static void nmdk_clkevt_reset(void)
 {
 	if (clkevt_periodic) {
 		/* Timer: configure load and background-load, and fire it up */
@@ -144,7 +143,7 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode,
 	}
 }
 
-void nmdk_clksrc_reset(void)
+static void nmdk_clksrc_reset(void)
 {
 	/* Disable */
 	writel(0, mtu_base + MTU_CR(0));
@@ -192,8 +191,8 @@ static struct irqaction nmdk_timer_irq = {
 	.dev_id		= &nmdk_clkevt,
 };
 
-static void __init __nmdk_timer_init(void __iomem *base, int irq,
-				     struct clk *pclk, struct clk *clk)
+static void __init nmdk_timer_init(void __iomem *base, int irq,
+				   struct clk *pclk, struct clk *clk)
 {
 	unsigned long rate;
 
@@ -245,18 +244,6 @@ static void __init __nmdk_timer_init(void __iomem *base, int irq,
 	register_current_timer_delay(&mtu_delay_timer);
 }
 
-void __init nmdk_timer_init(void __iomem *base, int irq)
-{
-	struct clk *clk0, *pclk0;
-
-	pclk0 = clk_get_sys("mtu0", "apb_pclk");
-	BUG_ON(IS_ERR(pclk0));
-	clk0 = clk_get_sys("mtu0", NULL);
-	BUG_ON(IS_ERR(clk0));
-
-	__nmdk_timer_init(base, irq, pclk0, clk0);
-}
-
 static void __init nmdk_timer_of_init(struct device_node *node)
 {
 	struct clk *pclk;
@@ -280,7 +267,7 @@ static void __init nmdk_timer_of_init(struct device_node *node)
 	if (irq <= 0)
 		panic("Can't parse IRQ");
 
-	__nmdk_timer_init(base, irq, pclk, clk);
+	nmdk_timer_init(base, irq, pclk, clk);
 }
 CLOCKSOURCE_OF_DECLARE(nomadik_mtu, "st,nomadik-mtu",
 		       nmdk_timer_of_init);
include/linux/platform_data/clocksource-nomadik-mtu.h deleted +0 -9
deleted file mode 100644
index 80088973b734..000000000000
@@ -1,9 +0,0 @@
-#ifndef __PLAT_MTU_H
-#define __PLAT_MTU_H
-
-void nmdk_timer_init(void __iomem *base, int irq);
-void nmdk_clkevt_reset(void);
-void nmdk_clksrc_reset(void);
-
-#endif /* __PLAT_MTU_H */
-
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/2 clksrc: delete nomadik MTU non-DT boot path

Quoted 9 lines · Linus Walleij

Both platforms using the MTU (Nomadik and Ux500) have now been converted to use device tree exclusively, thus let us delete this platform data header and make this driver a fully self-contained DT-only driver.

Cc Daniel Lezcano <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Lee Jones <[email protected]>

A sidenote: there is a comment in arch/arm/mach-ux500/timer.c "/* TODO: Once MTU has been DT:ed place code above into else. */" but I did not see any changes related to this TODO.

Quoted 94 lines

---
Daniel/tglx: seeking an ACK from either of you guys to take this in the ux500-devicetree branch where the last user is deleted.

---
  drivers/clocksource/nomadik-mtu.c                  | 23 +++++-----------------
  .../linux/platform_data/clocksource-nomadik-mtu.h  |  9 ---------
  2 files changed, 5 insertions(+), 27 deletions(-)

delete mode 100644 include/linux/platform_data/clocksource-nomadik-mtu.h

drivers/clocksource/nomadik-mtu.c +5 -18
index ed7b73b508e0..f00b5c9ce8b6 100644
@@ -20,7 +20,6 @@
  #include <linux/jiffies.h>
  #include <linux/delay.h>
  #include <linux/err.h>
-#include <linux/platform_data/clocksource-nomadik-mtu.h>
  #include <linux/sched_clock.h>
  #include <asm/mach/time.h>
 
@@ -103,7 +102,7 @@ static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev)
  	return 0;
  }
 
-void nmdk_clkevt_reset(void)
+static void nmdk_clkevt_reset(void)
  {
  	if (clkevt_periodic) {
  		/* Timer: configure load and background-load, and fire it up */
@@ -144,7 +143,7 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode,
  	}
  }
 
-void nmdk_clksrc_reset(void)
+static void nmdk_clksrc_reset(void)
  {
  	/* Disable */
  	writel(0, mtu_base + MTU_CR(0));
@@ -192,8 +191,8 @@ static struct irqaction nmdk_timer_irq = {
  	.dev_id		= &nmdk_clkevt,
  };
 
-static void __init __nmdk_timer_init(void __iomem *base, int irq,
-				     struct clk *pclk, struct clk *clk)
+static void __init nmdk_timer_init(void __iomem *base, int irq,
+				   struct clk *pclk, struct clk *clk)
  {
  	unsigned long rate;
 
@@ -245,18 +244,6 @@ static void __init __nmdk_timer_init(void __iomem *base, int irq,
  	register_current_timer_delay(&mtu_delay_timer);
  }
 
-void __init nmdk_timer_init(void __iomem *base, int irq)
-{
-	struct clk *clk0, *pclk0;
-
-	pclk0 = clk_get_sys("mtu0", "apb_pclk");
-	BUG_ON(IS_ERR(pclk0));
-	clk0 = clk_get_sys("mtu0", NULL);
-	BUG_ON(IS_ERR(clk0));
-
-	__nmdk_timer_init(base, irq, pclk0, clk0);
-}
-
  static void __init nmdk_timer_of_init(struct device_node *node)
  {
  	struct clk *pclk;
@@ -280,7 +267,7 @@ static void __init nmdk_timer_of_init(struct device_node *node)
  	if (irq <= 0)
  		panic("Can't parse IRQ");
 
-	__nmdk_timer_init(base, irq, pclk, clk);
+	nmdk_timer_init(base, irq, pclk, clk);
  }
  CLOCKSOURCE_OF_DECLARE(nomadik_mtu, "st,nomadik-mtu",
  		       nmdk_timer_of_init);
include/linux/platform_data/clocksource-nomadik-mtu.h deleted +0 -9
deleted file mode 100644
index 80088973b734..000000000000
@@ -1,9 +0,0 @@
-#ifndef __PLAT_MTU_H
-#define __PLAT_MTU_H
-
-void nmdk_timer_init(void __iomem *base, int irq);
-void nmdk_clkevt_reset(void);
-void nmdk_clksrc_reset(void);
-
-#endif /* __PLAT_MTU_H */
-
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
#2 lore raw

PATCH 2/2 clksrc: delete nomadik MTU non-DT boot path

Quoted 11 lines · Daniel Lezcano
Quoted 9 lines · Linus Walleij

Both platforms using the MTU (Nomadik and Ux500) have now been converted to use device tree exclusively, thus let us delete this platform data header and make this driver a fully self-contained DT-only driver.

Cc Daniel Lezcano <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Lee Jones <[email protected]>
Quoted 5 lines

A sidenote: there is a comment in arch/arm/mach-ux500/timer.c "/* TODO: Once MTU has been DT:ed place code above into else. */" but I did not see any changes related to this TODO.

You mean similar to this one:
https://lkml.org/lkml/2013/11/6/118

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw

PATCH 2/2 clksrc: delete nomadik MTU non-DT boot path

Quoted 13 lines · Lee Jones
Quoted 11 lines · Daniel Lezcano
Quoted 9 lines · Linus Walleij

Both platforms using the MTU (Nomadik and Ux500) have now been converted to use device tree exclusively, thus let us delete this platform data header and make this driver a fully self-contained DT-only driver.

Cc Daniel Lezcano <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Lee Jones <[email protected]>
Quoted 8 lines
Quoted 5 lines

A sidenote: there is a comment in arch/arm/mach-ux500/timer.c "/* TODO: Once MTU has been DT:ed place code above into else. */" but I did not see any changes related to this TODO.

You mean similar to this one:

   https://lkml.org/lkml/2013/11/6/118

Yes :)

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

PATCH 2/2 clksrc: delete nomadik MTU non-DT boot path

Quoted 10 lines · Daniel Lezcano
Quoted 6 lines · Lee Jones
Quoted 3 lines

A sidenote: there is a comment in arch/arm/mach-ux500/timer.c "/* TODO: Once MTU has been DT:ed place code above into else. */" but I did not see any changes related to this TODO.

You mean similar to this one:

   https://lkml.org/lkml/2013/11/6/118

Yes :)

It's applied in my tree as well, problem solved!

Yours,
Linus Walleij

#5 lore raw

PATCH 2/2 clksrc: delete nomadik MTU non-DT boot path

Quoted 8 lines · Linus Walleij
Quoted 6 lines · Daniel Lezcano
Quoted 4 lines · Lee Jones
Quoted 3 lines

A sidenote: there is a comment in arch/arm/mach-ux500/timer.c "/* TODO: Once MTU has been DT:ed place code above into else. */" but I did not see any changes related to this TODO.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

You mean similar to this one:

    https://lkml.org/lkml/2013/11/6/118

Yes :)

It's applied in my tree as well, problem solved!

Ok, cool.

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
#6 lore raw

PATCH 2/2 clksrc: delete nomadik MTU non-DT boot path

In reply to Linus Walleij
Quoted 9 lines · Linus Walleij

Both platforms using the MTU (Nomadik and Ux500) have now been converted to use device tree exclusively, thus let us delete this platform data header and make this driver a fully self-contained DT-only driver.

Cc Daniel Lezcano <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Lee Jones <[email protected]>
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog