aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2412
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2412')
-rw-r--r--arch/arm/mach-s3c2412/Kconfig1
-rw-r--r--arch/arm/mach-s3c2412/clock.c7
-rw-r--r--arch/arm/mach-s3c2412/dma.c5
-rw-r--r--arch/arm/mach-s3c2412/mach-jive.c22
-rw-r--r--arch/arm/mach-s3c2412/mach-smdk2413.c6
-rw-r--r--arch/arm/mach-s3c2412/mach-vstms.c6
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c27
7 files changed, 45 insertions, 29 deletions
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index c59a9d2ee9a..ca99564ae4b 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -7,6 +7,7 @@
7config CPU_S3C2412 7config CPU_S3C2412
8 bool 8 bool
9 depends on ARCH_S3C2410 9 depends on ARCH_S3C2410
10 select CPU_ARM926T
10 select CPU_LLSERIAL_S3C2440 11 select CPU_LLSERIAL_S3C2440
11 select S3C2412_PM if PM 12 select S3C2412_PM if PM
12 select S3C2412_DMA if S3C2410_DMA 13 select S3C2412_DMA if S3C2410_DMA
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index 96d9eb15424..a037df5e1c2 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -93,12 +93,6 @@ static int s3c2412_upll_enable(struct clk *clk, int enable)
93 93
94/* clock selections */ 94/* clock selections */
95 95
96/* CPU EXTCLK input */
97static struct clk clk_ext = {
98 .name = "extclk",
99 .id = -1,
100};
101
102static struct clk clk_erefclk = { 96static struct clk clk_erefclk = {
103 .name = "erefclk", 97 .name = "erefclk",
104 .id = -1, 98 .id = -1,
@@ -773,5 +767,6 @@ int __init s3c2412_baseclk_add(void)
773 s3c2412_clkcon_enable(clkp, 0); 767 s3c2412_clkcon_enable(clkp, 0);
774 } 768 }
775 769
770 s3c_pwmclk_init();
776 return 0; 771 return 0;
777} 772}
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c
index ba0591e71f3..919856c9433 100644
--- a/arch/arm/mach-s3c2412/dma.c
+++ b/arch/arm/mach-s3c2412/dma.c
@@ -18,7 +18,6 @@
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <asm/dma.h>
22#include <mach/dma.h> 21#include <mach/dma.h>
23 22
24#include <plat/dma.h> 23#include <plat/dma.h>
@@ -26,13 +25,13 @@
26 25
27#include <plat/regs-serial.h> 26#include <plat/regs-serial.h>
28#include <mach/regs-gpio.h> 27#include <mach/regs-gpio.h>
29#include <asm/plat-s3c/regs-ac97.h> 28#include <plat/regs-ac97.h>
30#include <mach/regs-mem.h> 29#include <mach/regs-mem.h>
31#include <mach/regs-lcd.h> 30#include <mach/regs-lcd.h>
32#include <mach/regs-sdi.h> 31#include <mach/regs-sdi.h>
33#include <asm/plat-s3c24xx/regs-s3c2412-iis.h> 32#include <asm/plat-s3c24xx/regs-s3c2412-iis.h>
34#include <asm/plat-s3c24xx/regs-iis.h> 33#include <asm/plat-s3c24xx/regs-iis.h>
35#include <asm/plat-s3c24xx/regs-spi.h> 34#include <plat/regs-spi.h>
36 35
37#define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID } 36#define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID }
38 37
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index b08f18c8c47..ecddbbb3483 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -17,7 +17,6 @@
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20#include <linux/delay.h>
21#include <linux/serial_core.h> 20#include <linux/serial_core.h>
22#include <linux/platform_device.h> 21#include <linux/platform_device.h>
23#include <linux/i2c.h> 22#include <linux/i2c.h>
@@ -31,8 +30,8 @@
31#include <asm/mach/irq.h> 30#include <asm/mach/irq.h>
32 31
33#include <plat/regs-serial.h> 32#include <plat/regs-serial.h>
34#include <asm/plat-s3c/nand.h> 33#include <plat/nand.h>
35#include <asm/plat-s3c/iic.h> 34#include <plat/iic.h>
36 35
37#include <mach/regs-power.h> 36#include <mach/regs-power.h>
38#include <mach/regs-gpio.h> 37#include <mach/regs-gpio.h>
@@ -52,7 +51,8 @@
52#include <plat/devs.h> 51#include <plat/devs.h>
53#include <plat/cpu.h> 52#include <plat/cpu.h>
54#include <plat/pm.h> 53#include <plat/pm.h>
55#include <asm/plat-s3c24xx/udc.h> 54#include <plat/udc.h>
55#include <plat/iic.h>
56 56
57static struct map_desc jive_iodesc[] __initdata = { 57static struct map_desc jive_iodesc[] __initdata = {
58}; 58};
@@ -398,11 +398,12 @@ static struct s3c2410_spigpio_info jive_lcd_spi = {
398 .bus_num = 1, 398 .bus_num = 1,
399 .pin_clk = S3C2410_GPG8, 399 .pin_clk = S3C2410_GPG8,
400 .pin_mosi = S3C2410_GPB8, 400 .pin_mosi = S3C2410_GPB8,
401 .num_chipselect = 1,
401 .chip_select = jive_lcd_spi_chipselect, 402 .chip_select = jive_lcd_spi_chipselect,
402}; 403};
403 404
404static struct platform_device jive_device_lcdspi = { 405static struct platform_device jive_device_lcdspi = {
405 .name = "s3c24xx-spi-gpio", 406 .name = "spi_s3c24xx_gpio",
406 .id = 1, 407 .id = 1,
407 .num_resources = 0, 408 .num_resources = 0,
408 .dev.platform_data = &jive_lcd_spi, 409 .dev.platform_data = &jive_lcd_spi,
@@ -419,11 +420,12 @@ static struct s3c2410_spigpio_info jive_wm8750_spi = {
419 .bus_num = 2, 420 .bus_num = 2,
420 .pin_clk = S3C2410_GPB4, 421 .pin_clk = S3C2410_GPB4,
421 .pin_mosi = S3C2410_GPB9, 422 .pin_mosi = S3C2410_GPB9,
423 .num_chipselect = 1,
422 .chip_select = jive_wm8750_chipselect, 424 .chip_select = jive_wm8750_chipselect,
423}; 425};
424 426
425static struct platform_device jive_device_wm8750 = { 427static struct platform_device jive_device_wm8750 = {
426 .name = "s3c24xx-spi-gpio", 428 .name = "spi_s3c24xx_gpio",
427 .id = 2, 429 .id = 2,
428 .num_resources = 0, 430 .num_resources = 0,
429 .dev.platform_data = &jive_wm8750_spi, 431 .dev.platform_data = &jive_wm8750_spi,
@@ -450,14 +452,14 @@ static struct spi_board_info __initdata jive_spi_devs[] = {
450 452
451/* I2C bus and device configuration. */ 453/* I2C bus and device configuration. */
452 454
453static struct s3c2410_platform_i2c jive_i2c_cfg = { 455static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = {
454 .max_freq = 80 * 1000, 456 .max_freq = 80 * 1000,
455 .bus_freq = 50 * 1000, 457 .bus_freq = 50 * 1000,
456 .flags = S3C_IICFLG_FILTER, 458 .flags = S3C_IICFLG_FILTER,
457 .sda_delay = 2, 459 .sda_delay = 2,
458}; 460};
459 461
460static struct i2c_board_info jive_i2c_devs[] = { 462static struct i2c_board_info jive_i2c_devs[] __initdata = {
461 [0] = { 463 [0] = {
462 I2C_BOARD_INFO("lis302dl", 0x1c), 464 I2C_BOARD_INFO("lis302dl", 0x1c),
463 .irq = IRQ_EINT14, 465 .irq = IRQ_EINT14,
@@ -470,7 +472,7 @@ static struct platform_device *jive_devices[] __initdata = {
470 &s3c_device_usb, 472 &s3c_device_usb,
471 &s3c_device_rtc, 473 &s3c_device_rtc,
472 &s3c_device_wdt, 474 &s3c_device_wdt,
473 &s3c_device_i2c, 475 &s3c_device_i2c0,
474 &s3c_device_lcd, 476 &s3c_device_lcd,
475 &jive_device_lcdspi, 477 &jive_device_lcdspi,
476 &jive_device_wm8750, 478 &jive_device_wm8750,
@@ -663,7 +665,7 @@ static void __init jive_machine_init(void)
663 665
664 spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs)); 666 spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs));
665 667
666 s3c_device_i2c.dev.platform_data = &jive_i2c_cfg; 668 s3c_i2c0_set_platdata(&jive_i2c_cfg);
667 i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs)); 669 i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs));
668 670
669 pm_power_off = jive_power_off; 671 pm_power_off = jive_power_off;
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c
index c719b5a740a..eba66aa6bd2 100644
--- a/arch/arm/mach-s3c2412/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2412/mach-smdk2413.c
@@ -37,7 +37,8 @@
37#include <mach/regs-lcd.h> 37#include <mach/regs-lcd.h>
38 38
39#include <mach/idle.h> 39#include <mach/idle.h>
40#include <asm/plat-s3c24xx/udc.h> 40#include <plat/udc.h>
41#include <plat/iic.h>
41#include <mach/fb.h> 42#include <mach/fb.h>
42 43
43#include <plat/s3c2410.h> 44#include <plat/s3c2410.h>
@@ -105,7 +106,7 @@ static struct platform_device *smdk2413_devices[] __initdata = {
105 &s3c_device_usb, 106 &s3c_device_usb,
106 //&s3c_device_lcd, 107 //&s3c_device_lcd,
107 &s3c_device_wdt, 108 &s3c_device_wdt,
108 &s3c_device_i2c, 109 &s3c_device_i2c0,
109 &s3c_device_iis, 110 &s3c_device_iis,
110 &s3c_device_usbgadget, 111 &s3c_device_usbgadget,
111}; 112};
@@ -142,6 +143,7 @@ static void __init smdk2413_machine_init(void)
142 143
143 144
144 s3c24xx_udc_set_platdata(&smdk2413_udc_cfg); 145 s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
146 s3c_i2c0_set_platdata(NULL);
145 147
146 platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices)); 148 platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices));
147 smdk_machine_init(); 149 smdk_machine_init();
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c
index 4cfa19ad9be..11e8ad49fc7 100644
--- a/arch/arm/mach-s3c2412/mach-vstms.c
+++ b/arch/arm/mach-s3c2412/mach-vstms.c
@@ -39,7 +39,8 @@
39#include <mach/idle.h> 39#include <mach/idle.h>
40#include <mach/fb.h> 40#include <mach/fb.h>
41 41
42#include <asm/plat-s3c/nand.h> 42#include <plat/iic.h>
43#include <plat/nand.h>
43 44
44#include <plat/s3c2410.h> 45#include <plat/s3c2410.h>
45#include <plat/s3c2412.h> 46#include <plat/s3c2412.h>
@@ -122,7 +123,7 @@ static struct s3c2410_platform_nand vstms_nand_info = {
122static struct platform_device *vstms_devices[] __initdata = { 123static struct platform_device *vstms_devices[] __initdata = {
123 &s3c_device_usb, 124 &s3c_device_usb,
124 &s3c_device_wdt, 125 &s3c_device_wdt,
125 &s3c_device_i2c, 126 &s3c_device_i2c0,
126 &s3c_device_iis, 127 &s3c_device_iis,
127 &s3c_device_rtc, 128 &s3c_device_rtc,
128 &s3c_device_nand, 129 &s3c_device_nand,
@@ -151,6 +152,7 @@ static void __init vstms_map_io(void)
151 152
152static void __init vstms_init(void) 153static void __init vstms_init(void)
153{ 154{
155 s3c_i2c0_set_platdata(NULL);
154 platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices)); 156 platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
155} 157}
156 158
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index 313759c3da6..5b5aba69ec3 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -16,6 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/clk.h>
19#include <linux/delay.h> 20#include <linux/delay.h>
20#include <linux/sysdev.h> 21#include <linux/sysdev.h>
21#include <linux/serial_core.h> 22#include <linux/serial_core.h>
@@ -33,13 +34,15 @@
33#include <mach/reset.h> 34#include <mach/reset.h>
34#include <mach/idle.h> 35#include <mach/idle.h>
35 36
37#include <plat/cpu-freq.h>
38
36#include <mach/regs-clock.h> 39#include <mach/regs-clock.h>
37#include <plat/regs-serial.h> 40#include <plat/regs-serial.h>
38#include <mach/regs-power.h> 41#include <mach/regs-power.h>
39#include <mach/regs-gpio.h> 42#include <mach/regs-gpio.h>
40#include <mach/regs-gpioj.h> 43#include <mach/regs-gpioj.h>
41#include <mach/regs-dsc.h> 44#include <mach/regs-dsc.h>
42#include <asm/plat-s3c24xx/regs-spi.h> 45#include <plat/regs-spi.h>
43#include <mach/regs-s3c2412.h> 46#include <mach/regs-s3c2412.h>
44 47
45#include <plat/s3c2412.h> 48#include <plat/s3c2412.h>
@@ -47,6 +50,7 @@
47#include <plat/devs.h> 50#include <plat/devs.h>
48#include <plat/clock.h> 51#include <plat/clock.h>
49#include <plat/pm.h> 52#include <plat/pm.h>
53#include <plat/pll.h>
50 54
51#ifndef CONFIG_CPU_S3C2412_ONLY 55#ifndef CONFIG_CPU_S3C2412_ONLY
52void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; 56void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
@@ -136,7 +140,7 @@ static void s3c2412_hard_reset(void)
136 * machine specific initialisation. 140 * machine specific initialisation.
137*/ 141*/
138 142
139void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) 143void __init s3c2412_map_io(void)
140{ 144{
141 /* move base of IO */ 145 /* move base of IO */
142 146
@@ -153,20 +157,25 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
153 /* register our io-tables */ 157 /* register our io-tables */
154 158
155 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); 159 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));
156 iotable_init(mach_desc, mach_size);
157} 160}
158 161
159void __init s3c2412_init_clocks(int xtal) 162void __init_or_cpufreq s3c2412_setup_clocks(void)
160{ 163{
164 struct clk *xtal_clk;
161 unsigned long tmp; 165 unsigned long tmp;
166 unsigned long xtal;
162 unsigned long fclk; 167 unsigned long fclk;
163 unsigned long hclk; 168 unsigned long hclk;
164 unsigned long pclk; 169 unsigned long pclk;
165 170
171 xtal_clk = clk_get(NULL, "xtal");
172 xtal = clk_get_rate(xtal_clk);
173 clk_put(xtal_clk);
174
166 /* now we've got our machine bits initialised, work out what 175 /* now we've got our machine bits initialised, work out what
167 * clocks we've got */ 176 * clocks we've got */
168 177
169 fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal*2); 178 fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal * 2);
170 179
171 clk_mpll.rate = fclk; 180 clk_mpll.rate = fclk;
172 181
@@ -183,11 +192,17 @@ void __init s3c2412_init_clocks(int xtal)
183 printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", 192 printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
184 print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); 193 print_mhz(fclk), print_mhz(hclk), print_mhz(pclk));
185 194
195 s3c24xx_setup_clocks(fclk, hclk, pclk);
196}
197
198void __init s3c2412_init_clocks(int xtal)
199{
186 /* initialise the clocks here, to allow other things like the 200 /* initialise the clocks here, to allow other things like the
187 * console to use them 201 * console to use them
188 */ 202 */
189 203
190 s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); 204 s3c24xx_register_baseclocks(xtal);
205 s3c2412_setup_clocks();
191 s3c2412_baseclk_add(); 206 s3c2412_baseclk_add();
192} 207}
193 208