diff options
author | Banajit Goswami <banajit.g@samsung.com> | 2011-02-28 11:54:51 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-03-02 20:09:58 -0500 |
commit | 2ce30137094969123a8846ca4f68c2628ea4a658 (patch) | |
tree | d9bd096eedc9cb8b4d977c0342b8aa60d709925b /arch/arm/plat-samsung/pwm.c | |
parent | dd9c1549edef02290edced639f67b54a25abbe0e (diff) |
ARM: SAMSUNG: Move PWM device definition from plat-s3c24xx to plat-samsung
This patch does the following:-
1. It moves file pwm.c from plat-s3c24xx to plat-samsung. This will
enable all machines with Samsung SoCs to make use of the same code.
2. The device definitions have been separated to a new file dev-pwm.c
for better clarity and structure.
3. It will enable all Samsung S3C and S5P series SoC's to use common
PWM Kconfig definition.
Signed-off-by: Banajit Goswami <banajit.g@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/pwm.c')
-rw-r--r-- | arch/arm/plat-samsung/pwm.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/arch/arm/plat-samsung/pwm.c b/arch/arm/plat-samsung/pwm.c index 2eeb49fa056d..f37457c52064 100644 --- a/arch/arm/plat-samsung/pwm.c +++ b/arch/arm/plat-samsung/pwm.c | |||
@@ -20,10 +20,8 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/pwm.h> | 21 | #include <linux/pwm.h> |
22 | 22 | ||
23 | #include <mach/irqs.h> | ||
24 | #include <mach/map.h> | 23 | #include <mach/map.h> |
25 | 24 | ||
26 | #include <plat/devs.h> | ||
27 | #include <plat/regs-timer.h> | 25 | #include <plat/regs-timer.h> |
28 | 26 | ||
29 | struct pwm_device { | 27 | struct pwm_device { |
@@ -47,37 +45,6 @@ struct pwm_device { | |||
47 | 45 | ||
48 | static struct clk *clk_scaler[2]; | 46 | static struct clk *clk_scaler[2]; |
49 | 47 | ||
50 | /* Standard setup for a timer block. */ | ||
51 | |||
52 | #define TIMER_RESOURCE_SIZE (1) | ||
53 | |||
54 | #define TIMER_RESOURCE(_tmr, _irq) \ | ||
55 | (struct resource [TIMER_RESOURCE_SIZE]) { \ | ||
56 | [0] = { \ | ||
57 | .start = _irq, \ | ||
58 | .end = _irq, \ | ||
59 | .flags = IORESOURCE_IRQ \ | ||
60 | } \ | ||
61 | } | ||
62 | |||
63 | #define DEFINE_S3C_TIMER(_tmr_no, _irq) \ | ||
64 | .name = "s3c24xx-pwm", \ | ||
65 | .id = _tmr_no, \ | ||
66 | .num_resources = TIMER_RESOURCE_SIZE, \ | ||
67 | .resource = TIMER_RESOURCE(_tmr_no, _irq), \ | ||
68 | |||
69 | /* since we already have an static mapping for the timer, we do not | ||
70 | * bother setting any IO resource for the base. | ||
71 | */ | ||
72 | |||
73 | struct platform_device s3c_device_timer[] = { | ||
74 | [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) }, | ||
75 | [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) }, | ||
76 | [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) }, | ||
77 | [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) }, | ||
78 | [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) }, | ||
79 | }; | ||
80 | |||
81 | static inline int pwm_is_tdiv(struct pwm_device *pwm) | 48 | static inline int pwm_is_tdiv(struct pwm_device *pwm) |
82 | { | 49 | { |
83 | return clk_get_parent(pwm->clk) == pwm->clk_div; | 50 | return clk_get_parent(pwm->clk) == pwm->clk_div; |