summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/Makefile1
-rw-r--r--arch/arm/mach-pxa/devices.c5
-rw-r--r--arch/arm/mach-pxa/include/mach/clock.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/devices.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/regs-pwm.h20
-rw-r--r--arch/arm/mach-pxa/speed-pxa27x.c5
6 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index c01a9e0281..6a02a5459c 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -1,6 +1,7 @@
obj-y += clocksource.o
obj-y += common.o
obj-y += gpio.o
+obj-y += devices.o
obj-$(CONFIG_ARCH_PXA2XX) += mfp-pxa2xx.o
obj-$(CONFIG_ARCH_PXA27X) += speed-pxa27x.o
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 1a396f1258..b6ac0ba621 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -47,3 +47,8 @@ struct device_d *pxa_add_mmc(void *base, int id, void *pdata)
{
return pxa_add_device("pxa-mmc", id, base, 0x1000, pdata);
}
+
+struct device_d *pxa_add_pwm(void *base, int id)
+{
+ return pxa_add_device("pxa_pwm", id, base, 0x10, NULL);
+}
diff --git a/arch/arm/mach-pxa/include/mach/clock.h b/arch/arm/mach-pxa/include/mach/clock.h
index c53432f015..f86152f7af 100644
--- a/arch/arm/mach-pxa/include/mach/clock.h
+++ b/arch/arm/mach-pxa/include/mach/clock.h
@@ -14,5 +14,6 @@
unsigned long pxa_get_uartclk(void);
unsigned long pxa_get_mmcclk(void);
unsigned long pxa_get_lcdclk(void);
+unsigned long pxa_get_pwmclk(void);
#endif /* !__MACH_CLOCK_H */
diff --git a/arch/arm/mach-pxa/include/mach/devices.h b/arch/arm/mach-pxa/include/mach/devices.h
index e205b7c7f2..8390153864 100644
--- a/arch/arm/mach-pxa/include/mach/devices.h
+++ b/arch/arm/mach-pxa/include/mach/devices.h
@@ -23,4 +23,4 @@ struct device_d *pxa_add_i2c(void *base, int id,
struct device_d *pxa_add_uart(void *base, int id);
struct device_d *pxa_add_fb(void *base, struct pxafb_platform_data *pdata);
struct device_d *pxa_add_mmc(void *base, int id, void *pdata);
-
+struct device_d *pxa_add_pwm(void *base, int id);
diff --git a/arch/arm/mach-pxa/include/mach/regs-pwm.h b/arch/arm/mach-pxa/include/mach/regs-pwm.h
new file mode 100644
index 0000000000..9fdcbb64ae
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/regs-pwm.h
@@ -0,0 +1,20 @@
+/*
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_MACH_REGS_PWM_H
+#define __ASM_MACH_REGS_PWM_H
+
+#include <mach/hardware.h>
+
+/*
+ * Pulse modulator registers
+ */
+#define PWM0 0x40B00000
+#define PWM1 0x40C00000
+#define PWM0slave 0x40B00010
+#define PWM1slave 0x40C00010
+
+#endif
diff --git a/arch/arm/mach-pxa/speed-pxa27x.c b/arch/arm/mach-pxa/speed-pxa27x.c
index 534eb1dcc7..1de034c677 100644
--- a/arch/arm/mach-pxa/speed-pxa27x.c
+++ b/arch/arm/mach-pxa/speed-pxa27x.c
@@ -47,3 +47,8 @@ unsigned long pxa_get_lcdclk(void)
{
return pxa_get_lcdclk_10khz() * 10000;
}
+
+unsigned long pxa_get_pwmclk(void)
+{
+ return BASE_CLK;
+}