diff options
Diffstat (limited to 'arch/arm/mach-s3c2412')
-rw-r--r-- | arch/arm/mach-s3c2412/clock.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-smdk2413.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-vstms.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/s3c2412.c | 25 |
5 files changed, 36 insertions, 20 deletions
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 96d9eb15424f..a037df5e1c2d 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 */ | ||
97 | static struct clk clk_ext = { | ||
98 | .name = "extclk", | ||
99 | .id = -1, | ||
100 | }; | ||
101 | |||
102 | static struct clk clk_erefclk = { | 96 | static 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/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 25ff1ec9f8ad..ecddbbb34832 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> |
@@ -53,6 +52,7 @@ | |||
53 | #include <plat/cpu.h> | 52 | #include <plat/cpu.h> |
54 | #include <plat/pm.h> | 53 | #include <plat/pm.h> |
55 | #include <plat/udc.h> | 54 | #include <plat/udc.h> |
55 | #include <plat/iic.h> | ||
56 | 56 | ||
57 | static struct map_desc jive_iodesc[] __initdata = { | 57 | static 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 | ||
404 | static struct platform_device jive_device_lcdspi = { | 405 | static 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 | ||
425 | static struct platform_device jive_device_wm8750 = { | 427 | static 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 | ||
453 | static struct s3c2410_platform_i2c jive_i2c_cfg = { | 455 | static 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 | ||
460 | static struct i2c_board_info jive_i2c_devs[] = { | 462 | static 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 8fd17b8d5679..eba66aa6bd20 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include <mach/idle.h> | 39 | #include <mach/idle.h> |
40 | #include <plat/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 da32a6cb17ae..11e8ad49fc7b 100644 --- a/arch/arm/mach-s3c2412/mach-vstms.c +++ b/arch/arm/mach-s3c2412/mach-vstms.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <mach/idle.h> | 39 | #include <mach/idle.h> |
40 | #include <mach/fb.h> | 40 | #include <mach/fb.h> |
41 | 41 | ||
42 | #include <plat/iic.h> | ||
42 | #include <plat/nand.h> | 43 | #include <plat/nand.h> |
43 | 44 | ||
44 | #include <plat/s3c2410.h> | 45 | #include <plat/s3c2410.h> |
@@ -122,7 +123,7 @@ static struct s3c2410_platform_nand vstms_nand_info = { | |||
122 | static struct platform_device *vstms_devices[] __initdata = { | 123 | static 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 | ||
152 | static void __init vstms_init(void) | 153 | static 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 a086818e117e..5b5aba69ec3f 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,6 +34,8 @@ | |||
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> |
@@ -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 |
52 | void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; | 56 | void __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 | ||
139 | void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) | 143 | void __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 | ||
159 | void __init s3c2412_init_clocks(int xtal) | 162 | void __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 | |||
198 | void __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 | ||