aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pc100
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5pc100')
-rw-r--r--arch/arm/mach-s5pc100/Kconfig1
-rw-r--r--arch/arm/mach-s5pc100/clock.c2
-rw-r--r--arch/arm/mach-s5pc100/common.c28
-rw-r--r--arch/arm/mach-s5pc100/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/map.h1
-rw-r--r--arch/arm/mach-s5pc100/mach-smdkc100.c5
6 files changed, 32 insertions, 7 deletions
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
index 2f456a4533ba..15170be97a74 100644
--- a/arch/arm/mach-s5pc100/Kconfig
+++ b/arch/arm/mach-s5pc100/Kconfig
@@ -11,7 +11,6 @@ config CPU_S5PC100
11 bool 11 bool
12 select S5P_EXT_INT 12 select S5P_EXT_INT
13 select SAMSUNG_DMADEV 13 select SAMSUNG_DMADEV
14 select SAMSUNG_HRT
15 help 14 help
16 Enable S5PC100 CPU support 15 Enable S5PC100 CPU support
17 16
diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c
index a206dc35eff1..d0dc10ee7729 100644
--- a/arch/arm/mach-s5pc100/clock.c
+++ b/arch/arm/mach-s5pc100/clock.c
@@ -1358,6 +1358,4 @@ void __init s5pc100_register_clocks(void)
1358 s3c_disable_clocks(clk_cdev[ptr], 1); 1358 s3c_disable_clocks(clk_cdev[ptr], 1);
1359 1359
1360 s3c24xx_register_clock(&dummy_apb_pclk); 1360 s3c24xx_register_clock(&dummy_apb_pclk);
1361
1362 s3c_pwmclk_init();
1363} 1361}
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c
index 4bdfecf6d024..c5a8eeacf81c 100644
--- a/arch/arm/mach-s5pc100/common.c
+++ b/arch/arm/mach-s5pc100/common.c
@@ -22,6 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <clocksource/samsung_pwm.h>
25#include <linux/platform_device.h> 26#include <linux/platform_device.h>
26#include <linux/sched.h> 27#include <linux/sched.h>
27#include <linux/reboot.h> 28#include <linux/reboot.h>
@@ -46,6 +47,7 @@
46#include <plat/fb-core.h> 47#include <plat/fb-core.h>
47#include <plat/iic-core.h> 48#include <plat/iic-core.h>
48#include <plat/onenand-core.h> 49#include <plat/onenand-core.h>
50#include <plat/pwm-core.h>
49#include <plat/spi-core.h> 51#include <plat/spi-core.h>
50#include <plat/regs-serial.h> 52#include <plat/regs-serial.h>
51#include <plat/watchdog-reset.h> 53#include <plat/watchdog-reset.h>
@@ -132,6 +134,30 @@ static struct map_desc s5pc100_iodesc[] __initdata = {
132 } 134 }
133}; 135};
134 136
137static struct samsung_pwm_variant s5pc100_pwm_variant = {
138 .bits = 32,
139 .div_base = 0,
140 .has_tint_cstat = true,
141 .tclk_mask = (1 << 5),
142};
143
144void __init samsung_set_timer_source(unsigned int event, unsigned int source)
145{
146 s5pc100_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
147 s5pc100_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
148}
149
150void __init samsung_timer_init(void)
151{
152 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
153 IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
154 IRQ_TIMER3_VIC, IRQ_TIMER4_VIC,
155 };
156
157 samsung_pwm_clocksource_init(S3C_VA_TIMER,
158 timer_irqs, &s5pc100_pwm_variant);
159}
160
135/* 161/*
136 * s5pc100_map_io 162 * s5pc100_map_io
137 * 163 *
@@ -149,6 +175,8 @@ void __init s5pc100_init_io(struct map_desc *mach_desc, int size)
149 s5p_init_cpu(S5P_VA_CHIPID); 175 s5p_init_cpu(S5P_VA_CHIPID);
150 176
151 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 177 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
178
179 samsung_pwm_set_platdata(&s5pc100_pwm_variant);
152} 180}
153 181
154void __init s5pc100_map_io(void) 182void __init s5pc100_map_io(void)
diff --git a/arch/arm/mach-s5pc100/include/mach/irqs.h b/arch/arm/mach-s5pc100/include/mach/irqs.h
index 2870f12c7926..d2eb4757381f 100644
--- a/arch/arm/mach-s5pc100/include/mach/irqs.h
+++ b/arch/arm/mach-s5pc100/include/mach/irqs.h
@@ -97,8 +97,6 @@
97#define IRQ_SDMFIQ S5P_IRQ_VIC2(31) 97#define IRQ_SDMFIQ S5P_IRQ_VIC2(31)
98#define IRQ_VIC_END S5P_IRQ_VIC2(31) 98#define IRQ_VIC_END S5P_IRQ_VIC2(31)
99 99
100#define IRQ_TIMER_BASE (11)
101
102#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) 100#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0))
103#define S5P_EINT_BASE2 (IRQ_VIC_END + 1) 101#define S5P_EINT_BASE2 (IRQ_VIC_END + 1)
104 102
diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-s5pc100/include/mach/map.h
index 54bc4f82e17a..2550b6112b82 100644
--- a/arch/arm/mach-s5pc100/include/mach/map.h
+++ b/arch/arm/mach-s5pc100/include/mach/map.h
@@ -116,6 +116,7 @@
116#define SAMSUNG_PA_ADC S5PC100_PA_TSADC 116#define SAMSUNG_PA_ADC S5PC100_PA_TSADC
117#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON 117#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON
118#define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD 118#define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD
119#define SAMSUNG_PA_TIMER S5PC100_PA_TIMER
119 120
120#define S5PC100_VA_OTHERS (S3C_VA_SYS + 0x10000) 121#define S5PC100_VA_OTHERS (S3C_VA_SYS + 0x10000)
121 122
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 8c880f76f274..7c57a221785e 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -194,6 +194,7 @@ static struct platform_device *smdkc100_devices[] __initdata = {
194 &s3c_device_hsmmc0, 194 &s3c_device_hsmmc0,
195 &s3c_device_hsmmc1, 195 &s3c_device_hsmmc1,
196 &s3c_device_hsmmc2, 196 &s3c_device_hsmmc2,
197 &samsung_device_pwm,
197 &s3c_device_ts, 198 &s3c_device_ts,
198 &s3c_device_wdt, 199 &s3c_device_wdt,
199 &smdkc100_lcd_powerdev, 200 &smdkc100_lcd_powerdev,
@@ -246,9 +247,9 @@ static void __init smdkc100_machine_init(void)
246 gpio_request(S5PC100_GPH0(6), "GPH0"); 247 gpio_request(S5PC100_GPH0(6), "GPH0");
247 smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); 248 smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
248 249
249 samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
250
251 platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); 250 platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
251
252 samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
252} 253}
253 254
254MACHINE_START(SMDKC100, "SMDKC100") 255MACHINE_START(SMDKC100, "SMDKC100")