more danube 2 ifxmips transitions
[openwrt.git] / target / linux / danube / files / drivers / char / danube_led.c
index 38ac4c1..86a92d5 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/errno.h>
 #include <asm/danube/danube.h>
 #include <asm/danube/danube_gpio.h>
-#include <asm/delay.h>
+#include <asm/danube/danube_pmu.h>
 
 #define DANUBE_LED_CLK_EDGE                            DANUBE_LED_FALLING
 //#define DANUBE_LED_CLK_EDGE                  DANUBE_LED_RISING
@@ -87,24 +87,6 @@ danube_led_setup_gpio (void)
        }
 }
 
-static void
-danube_led_enable (void)
-{
-       int err = 1000000;
-
-       writel(readl(DANUBE_PMU_PWDCR) & ~DANUBE_PMU_PWDCR_LED, DANUBE_PMU_PWDCR);
-       while (--err && (readl(DANUBE_PMU_PWDSR) & DANUBE_PMU_PWDCR_LED)) {}
-
-       if (!err)
-               panic("Activating LED in PMU failed!");
-}
-
-static inline void
-danube_led_disable (void)
-{
-       writel(readl(DANUBE_PMU_PWDCR) | DANUBE_PMU_PWDCR_LED, DANUBE_PMU_PWDCR);
-}
-
 static int
 led_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
@@ -187,7 +169,7 @@ danube_led_init (void)
        writel(readl(DANUBE_LED_CON0) | DANUBE_LED_ADSL_SRC, DANUBE_LED_CON0);
 
        /* per default, the leds are turned on */
-       danube_led_enable();
+       danube_pmu_enable(DANUBE_PMU_PWDCR_LED);
 
        danube_led_major = register_chrdev(0, "danube_led", &danube_led_fops);
 
This page took 0.025664 seconds and 4 git commands to generate.