Skip to content

Commit

Permalink
[ARM] S3C24XX: PWM API support.
Browse files Browse the repository at this point in the history
Add support for PWM in the S3C24XX series of SoC via the
PWM API.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Ben Dooks committed Jul 3, 2008
1 parent d5c5292 commit 6fc601e
Show file tree
Hide file tree
Showing 5 changed files with 412 additions and 105 deletions.
7 changes: 7 additions & 0 deletions arch/arm/plat-s3c24xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ config CPU_S3C244X
help
Support for S3C2440 and S3C2442 Samsung Mobile CPU based systems.

config S3C24XX_PWM
bool "PWM device support"
select HAVE_PWM
help
Support for exporting the PWM timer blocks via the pwm device
system.

config PM_SIMTEC
bool
help
Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-s3c24xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ obj-$(CONFIG_CPU_S3C244X) += s3c244x-clock.o
obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_PM) += sleep.o
obj-$(CONFIG_HAVE_PWM) += pwm.o
obj-$(CONFIG_S3C2410_DMA) += dma.o
obj-$(CONFIG_MACH_SMDK) += common-smdk.o
100 changes: 0 additions & 100 deletions arch/arm/plat-s3c24xx/devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,106 +495,6 @@ struct platform_device s3c_device_spi1 = {

EXPORT_SYMBOL(s3c_device_spi1);

/* pwm timer blocks */

static struct resource s3c_timer0_resource[] = {
[0] = {
.start = S3C24XX_PA_TIMER + 0x0C,
.end = S3C24XX_PA_TIMER + 0x0C + 0xB,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_TIMER0,
.end = IRQ_TIMER0,
.flags = IORESOURCE_IRQ,
}

};

struct platform_device s3c_device_timer0 = {
.name = "s3c2410-timer",
.id = 0,
.num_resources = ARRAY_SIZE(s3c_timer0_resource),
.resource = s3c_timer0_resource,
};

EXPORT_SYMBOL(s3c_device_timer0);

/* timer 1 */

static struct resource s3c_timer1_resource[] = {
[0] = {
.start = S3C24XX_PA_TIMER + 0x18,
.end = S3C24XX_PA_TIMER + 0x23,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_TIMER1,
.end = IRQ_TIMER1,
.flags = IORESOURCE_IRQ,
}

};

struct platform_device s3c_device_timer1 = {
.name = "s3c2410-timer",
.id = 1,
.num_resources = ARRAY_SIZE(s3c_timer1_resource),
.resource = s3c_timer1_resource,
};

EXPORT_SYMBOL(s3c_device_timer1);

/* timer 2 */

static struct resource s3c_timer2_resource[] = {
[0] = {
.start = S3C24XX_PA_TIMER + 0x24,
.end = S3C24XX_PA_TIMER + 0x2F,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_TIMER2,
.end = IRQ_TIMER2,
.flags = IORESOURCE_IRQ,
}

};

struct platform_device s3c_device_timer2 = {
.name = "s3c2410-timer",
.id = 2,
.num_resources = ARRAY_SIZE(s3c_timer2_resource),
.resource = s3c_timer2_resource,
};

EXPORT_SYMBOL(s3c_device_timer2);

/* timer 3 */

static struct resource s3c_timer3_resource[] = {
[0] = {
.start = S3C24XX_PA_TIMER + 0x30,
.end = S3C24XX_PA_TIMER + 0x3B,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_TIMER3,
.end = IRQ_TIMER3,
.flags = IORESOURCE_IRQ,
}

};

struct platform_device s3c_device_timer3 = {
.name = "s3c2410-timer",
.id = 3,
.num_resources = ARRAY_SIZE(s3c_timer3_resource),
.resource = s3c_timer3_resource,
};

EXPORT_SYMBOL(s3c_device_timer3);

#ifdef CONFIG_CPU_S3C2440

/* Camif Controller */
Expand Down
Loading

0 comments on commit 6fc601e

Please sign in to comment.