diff options
author | Jonas Bonn <jonas.bonn@gmail.com> | 2008-11-19 17:11:03 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:11:03 +0000 |
commit | 15038fb570748ce2fb9ce31200b1f075774a7f4d (patch) | |
tree | 71a6c721b5457bb93d24089e7d913c7293916d1a /arch | |
parent | 66cd23e33a6d2c3b79c0d5af8896e28a25255ff4 (diff) |
Move asm/arch/pwm.h to mach/pwm.h
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/pwm.h | 40 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/pwm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/fiq_c_isr.c | 2 |
3 files changed, 42 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/pwm.h b/arch/arm/mach-s3c2410/include/mach/pwm.h new file mode 100644 index 00000000000..5689ce973d2 --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/pwm.h @@ -0,0 +1,40 @@ +#ifndef __S3C2410_PWM_H +#define __S3C2410_PWM_H + +#include <linux/err.h> +#include <linux/platform_device.h> +#include <linux/clk.h> + +#include <mach/io.h> +#include <mach/hardware.h> +#include <asm/mach-types.h> +#include <asm/plat-s3c/regs-timer.h> +#include <mach/gta01.h> + +enum pwm_timer { + PWM0, + PWM1, + PWM2, + PWM3, + PWM4 +}; + +struct s3c2410_pwm { + enum pwm_timer timerid; + struct clk *pclk; + unsigned long pclk_rate; + unsigned long prescaler; + unsigned long divider; + unsigned long counter; + unsigned long comparer; +}; + +int s3c2410_pwm_init(struct s3c2410_pwm *s3c2410_pwm); +int s3c2410_pwm_enable(struct s3c2410_pwm *s3c2410_pwm); +int s3c2410_pwm_disable(struct s3c2410_pwm *s3c2410_pwm); +int s3c2410_pwm_start(struct s3c2410_pwm *s3c2410_pwm); +int s3c2410_pwm_stop(struct s3c2410_pwm *s3c2410_pwm); +int s3c2410_pwm_duty_cycle(int reg_value, struct s3c2410_pwm *s3c2410_pwm); +int s3c2410_pwm_dumpregs(void); + +#endif /* __S3C2410_PWM_H */ diff --git a/arch/arm/mach-s3c2410/pwm.c b/arch/arm/mach-s3c2410/pwm.c index 355f956abef..d6780841c69 100644 --- a/arch/arm/mach-s3c2410/pwm.c +++ b/arch/arm/mach-s3c2410/pwm.c @@ -23,7 +23,7 @@ #include <linux/device.h> #include <mach/hardware.h> #include <asm/plat-s3c/regs-timer.h> -#include <asm/arch-s3c2410/pwm.h> +#include <mach/pwm.h> #include <asm/io.h> #ifdef CONFIG_PM diff --git a/arch/arm/mach-s3c2440/fiq_c_isr.c b/arch/arm/mach-s3c2440/fiq_c_isr.c index bb2b69df0c1..3db402748f6 100644 --- a/arch/arm/mach-s3c2440/fiq_c_isr.c +++ b/arch/arm/mach-s3c2440/fiq_c_isr.c @@ -19,7 +19,7 @@ #include <asm/plat-s3c24xx/cpu.h> #include <asm/plat-s3c24xx/irq.h> -#include <asm/arch-s3c2410/pwm.h> +#include <mach/pwm.h> #include <asm/plat-s3c/regs-timer.h> /* |