Skip to contentSkip to conversation

powerpc/5200: add general purpose timer API for the MPC5200

PATCH New Grant Likely 1 participant 1 message Jun 18, 2009

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

PATCH v3 1/1 powerpc/5200: add general purpose timer API for the MPC5200

From: Grant Likely <[email protected]>

This patch adds an interface for controlling the timer function of the MPC5200 GPT devices.

---

 arch/powerpc/include/asm/mpc52xx.h        |    7 ++
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c |  133 +++++++++++++++++++++++++++--
 2 files changed, 130 insertions(+), 10 deletions(-)
arch/powerpc/include/asm/mpc52xx.h +7 -0
index 1b4f697..6716850 100644
@@ -276,6 +276,13 @@ extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv);
 extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node);
 extern void mpc52xx_restart(char *cmd);
 
+/* mpc52xx_gpt.c */
+struct mpc52xx_gpt_priv;
+extern struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq);
+extern int mpc52xx_gpt_start_timer(struct mpc52xx_gpt_priv *gpt, int period,
+                            int continuous);
+extern void mpc52xx_gpt_stop_timer(struct mpc52xx_gpt_priv *gpt);
+
 /* mpc52xx_pic.c */
 extern void mpc52xx_init_irq(void);
 extern unsigned int mpc52xx_get_irq(void);
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +123 -10

210 lines not on this page · raw message