diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-05 21:18:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-05 21:18:05 -0400 |
commit | 7abec10c623d9e0416dab6919a0ea22e6283516b (patch) | |
tree | 83aa79c369e99c4fc60eea91ebd399b7689b312e /arch/arm/mach-s5pv210 | |
parent | 0de9adf284ec20454ecf37ffd98e7e98ba7292d6 (diff) | |
parent | cfaf8fc5b59527281e9ddc2e0e04e1127936e17f (diff) |
Merge branch 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc
* 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc: (79 commits)
ARM: SAMSUNG: Move fimc plat. device from board files to plat-samsung
ARM: SAMSUNG: Cleanup resources by using macro
ARM: SAMSUNG: Cleanup plat-samsung/devs.c and devs.h
ARM: S5P: To merge devs.c files to one devs.c
ARM: S3C64XX: To merge devs.c files to one devs.c
ARM: S3C24XX: To merge s3c24xx devs.c files to one devs.c
ARM: S5P64X0: Add Power Management support
ARM: S5P: Make the sleep code common for S5P series SoCs
ARM: S5P: Make the common S5P PM code conditionally compile
ARM: SAMSUNG: Move S5P header files to plat-samsung
ARM: SAMSUNG: Move S3C24XX header files to plat-samsung
ARM: SAMSUNG: Moving each SoC support header files
ARM: SAMSUNG: Consolidate plat/pll.h
ARM: SAMSUNG: Consolidate plat/pwm-clock.h
ARM: SAMSUNG: Cleanup mach/clkdev.h
ARM: SAMSUNG: remove sdhci default configuration setup platform helper
ARM: EXYNOS4: Add FIMC device on SMDKV310 board
ARM: EXYNOS4: Add header file protection macros
ARM: EXYNOS4: Add usb ehci device to the SMDKV310
ARM: S3C2443: Add hsspi-clock from pclk and rename S3C2443 hsspi sclk
...
Fix up conflicts in
- arch/arm/mach-exynos4/{Kconfig,clock.c}
ARM_CPU_SUSPEND, various random device tables (gah!)
- drivers/gpio/Makefile
sa1100 gpio added, samsung gpio drivers merged
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r-- | arch/arm/mach-s5pv210/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/clock.c | 141 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/cpu.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/dma.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/clkdev.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/irqs.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/map.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/pm-core.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/pwm-clock.h | 70 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/regs-clock.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-goni.c | 57 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/setup-sdhci.c | 41 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/sleep.S | 52 |
14 files changed, 213 insertions, 188 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index e3ebe96923c8..646057ab2e4c 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -14,6 +14,8 @@ config CPU_S5PV210 | |||
14 | select SAMSUNG_DMADEV | 14 | select SAMSUNG_DMADEV |
15 | select S5P_EXT_INT | 15 | select S5P_EXT_INT |
16 | select S5P_HRT | 16 | select S5P_HRT |
17 | select S5P_PM if PM | ||
18 | select S5P_SLEEP if PM | ||
17 | help | 19 | help |
18 | Enable S5PV210 CPU support | 20 | Enable S5PV210 CPU support |
19 | 21 | ||
@@ -93,11 +95,13 @@ config MACH_GONI | |||
93 | select S3C_DEV_USB_HSOTG | 95 | select S3C_DEV_USB_HSOTG |
94 | select S5P_DEV_ONENAND | 96 | select S5P_DEV_ONENAND |
95 | select SAMSUNG_DEV_KEYPAD | 97 | select SAMSUNG_DEV_KEYPAD |
98 | select S5P_DEV_TV | ||
96 | select S5PV210_SETUP_FB_24BPP | 99 | select S5PV210_SETUP_FB_24BPP |
97 | select S5PV210_SETUP_I2C1 | 100 | select S5PV210_SETUP_I2C1 |
98 | select S5PV210_SETUP_I2C2 | 101 | select S5PV210_SETUP_I2C2 |
99 | select S5PV210_SETUP_KEYPAD | 102 | select S5PV210_SETUP_KEYPAD |
100 | select S5PV210_SETUP_SDHCI | 103 | select S5PV210_SETUP_SDHCI |
104 | select S5PV210_SETUP_FIMC | ||
101 | help | 105 | help |
102 | Machine support for Samsung GONI board | 106 | Machine support for Samsung GONI board |
103 | S5PC110(MCP) is one of package option of S5PV210 | 107 | S5PC110(MCP) is one of package option of S5PV210 |
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile index ef7e4668d670..009fbe53df96 100644 --- a/arch/arm/mach-s5pv210/Makefile +++ b/arch/arm/mach-s5pv210/Makefile | |||
@@ -14,7 +14,7 @@ obj- := | |||
14 | 14 | ||
15 | obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o | 15 | obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o |
16 | obj-$(CONFIG_CPU_S5PV210) += setup-i2c0.o | 16 | obj-$(CONFIG_CPU_S5PV210) += setup-i2c0.o |
17 | obj-$(CONFIG_PM) += pm.o sleep.o | 17 | obj-$(CONFIG_PM) += pm.o |
18 | 18 | ||
19 | # machine support | 19 | # machine support |
20 | 20 | ||
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 1ab34000cc7e..4c5ac7a69e9e 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -174,6 +174,16 @@ static int s5pv210_clk_mask1_ctrl(struct clk *clk, int enable) | |||
174 | return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable); | 174 | return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable); |
175 | } | 175 | } |
176 | 176 | ||
177 | static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable) | ||
178 | { | ||
179 | return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); | ||
180 | } | ||
181 | |||
182 | static int exynos4_clk_dac_ctrl(struct clk *clk, int enable) | ||
183 | { | ||
184 | return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable); | ||
185 | } | ||
186 | |||
177 | static struct clk clk_sclk_hdmi27m = { | 187 | static struct clk clk_sclk_hdmi27m = { |
178 | .name = "sclk_hdmi27m", | 188 | .name = "sclk_hdmi27m", |
179 | .rate = 27000000, | 189 | .rate = 27000000, |
@@ -295,13 +305,13 @@ static struct clk_ops clk_fout_apll_ops = { | |||
295 | static struct clk init_clocks_off[] = { | 305 | static struct clk init_clocks_off[] = { |
296 | { | 306 | { |
297 | .name = "dma", | 307 | .name = "dma", |
298 | .devname = "s3c-pl330.0", | 308 | .devname = "dma-pl330.0", |
299 | .parent = &clk_hclk_psys.clk, | 309 | .parent = &clk_hclk_psys.clk, |
300 | .enable = s5pv210_clk_ip0_ctrl, | 310 | .enable = s5pv210_clk_ip0_ctrl, |
301 | .ctrlbit = (1 << 3), | 311 | .ctrlbit = (1 << 3), |
302 | }, { | 312 | }, { |
303 | .name = "dma", | 313 | .name = "dma", |
304 | .devname = "s3c-pl330.1", | 314 | .devname = "dma-pl330.1", |
305 | .parent = &clk_hclk_psys.clk, | 315 | .parent = &clk_hclk_psys.clk, |
306 | .enable = s5pv210_clk_ip0_ctrl, | 316 | .enable = s5pv210_clk_ip0_ctrl, |
307 | .ctrlbit = (1 << 4), | 317 | .ctrlbit = (1 << 4), |
@@ -335,6 +345,40 @@ static struct clk init_clocks_off[] = { | |||
335 | .enable = s5pv210_clk_ip0_ctrl, | 345 | .enable = s5pv210_clk_ip0_ctrl, |
336 | .ctrlbit = (1 << 16), | 346 | .ctrlbit = (1 << 16), |
337 | }, { | 347 | }, { |
348 | .name = "dac", | ||
349 | .devname = "s5p-sdo", | ||
350 | .parent = &clk_hclk_dsys.clk, | ||
351 | .enable = s5pv210_clk_ip1_ctrl, | ||
352 | .ctrlbit = (1 << 10), | ||
353 | }, { | ||
354 | .name = "mixer", | ||
355 | .devname = "s5p-mixer", | ||
356 | .parent = &clk_hclk_dsys.clk, | ||
357 | .enable = s5pv210_clk_ip1_ctrl, | ||
358 | .ctrlbit = (1 << 9), | ||
359 | }, { | ||
360 | .name = "vp", | ||
361 | .devname = "s5p-mixer", | ||
362 | .parent = &clk_hclk_dsys.clk, | ||
363 | .enable = s5pv210_clk_ip1_ctrl, | ||
364 | .ctrlbit = (1 << 8), | ||
365 | }, { | ||
366 | .name = "hdmi", | ||
367 | .devname = "s5pv210-hdmi", | ||
368 | .parent = &clk_hclk_dsys.clk, | ||
369 | .enable = s5pv210_clk_ip1_ctrl, | ||
370 | .ctrlbit = (1 << 11), | ||
371 | }, { | ||
372 | .name = "hdmiphy", | ||
373 | .devname = "s5pv210-hdmi", | ||
374 | .enable = exynos4_clk_hdmiphy_ctrl, | ||
375 | .ctrlbit = (1 << 0), | ||
376 | }, { | ||
377 | .name = "dacphy", | ||
378 | .devname = "s5p-sdo", | ||
379 | .enable = exynos4_clk_dac_ctrl, | ||
380 | .ctrlbit = (1 << 0), | ||
381 | }, { | ||
338 | .name = "otg", | 382 | .name = "otg", |
339 | .parent = &clk_hclk_psys.clk, | 383 | .parent = &clk_hclk_psys.clk, |
340 | .enable = s5pv210_clk_ip1_ctrl, | 384 | .enable = s5pv210_clk_ip1_ctrl, |
@@ -412,6 +456,12 @@ static struct clk init_clocks_off[] = { | |||
412 | .enable = s5pv210_clk_ip3_ctrl, | 456 | .enable = s5pv210_clk_ip3_ctrl, |
413 | .ctrlbit = (1<<9), | 457 | .ctrlbit = (1<<9), |
414 | }, { | 458 | }, { |
459 | .name = "i2c", | ||
460 | .devname = "s3c2440-hdmiphy-i2c", | ||
461 | .parent = &clk_pclk_psys.clk, | ||
462 | .enable = s5pv210_clk_ip3_ctrl, | ||
463 | .ctrlbit = (1 << 11), | ||
464 | }, { | ||
415 | .name = "spi", | 465 | .name = "spi", |
416 | .devname = "s3c64xx-spi.0", | 466 | .devname = "s3c64xx-spi.0", |
417 | .parent = &clk_pclk_psys.clk, | 467 | .parent = &clk_pclk_psys.clk, |
@@ -599,6 +649,23 @@ static struct clksrc_sources clkset_sclk_mixer = { | |||
599 | .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list), | 649 | .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list), |
600 | }; | 650 | }; |
601 | 651 | ||
652 | static struct clksrc_clk clk_sclk_mixer = { | ||
653 | .clk = { | ||
654 | .name = "sclk_mixer", | ||
655 | .enable = s5pv210_clk_mask0_ctrl, | ||
656 | .ctrlbit = (1 << 1), | ||
657 | }, | ||
658 | .sources = &clkset_sclk_mixer, | ||
659 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 }, | ||
660 | }; | ||
661 | |||
662 | static struct clksrc_clk *sclk_tv[] = { | ||
663 | &clk_sclk_dac, | ||
664 | &clk_sclk_pixel, | ||
665 | &clk_sclk_hdmi, | ||
666 | &clk_sclk_mixer, | ||
667 | }; | ||
668 | |||
602 | static struct clk *clkset_sclk_audio0_list[] = { | 669 | static struct clk *clkset_sclk_audio0_list[] = { |
603 | [0] = &clk_ext_xtal_mux, | 670 | [0] = &clk_ext_xtal_mux, |
604 | [1] = &clk_pcmcdclk0, | 671 | [1] = &clk_pcmcdclk0, |
@@ -782,14 +849,6 @@ static struct clksrc_clk clksrcs[] = { | |||
782 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 }, | 849 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 }, |
783 | }, { | 850 | }, { |
784 | .clk = { | 851 | .clk = { |
785 | .name = "sclk_mixer", | ||
786 | .enable = s5pv210_clk_mask0_ctrl, | ||
787 | .ctrlbit = (1 << 1), | ||
788 | }, | ||
789 | .sources = &clkset_sclk_mixer, | ||
790 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 }, | ||
791 | }, { | ||
792 | .clk = { | ||
793 | .name = "sclk_fimc", | 852 | .name = "sclk_fimc", |
794 | .devname = "s5pv210-fimc.0", | 853 | .devname = "s5pv210-fimc.0", |
795 | .enable = s5pv210_clk_mask1_ctrl, | 854 | .enable = s5pv210_clk_mask1_ctrl, |
@@ -978,9 +1037,6 @@ static struct clksrc_clk *sysclks[] = { | |||
978 | &clk_pclk_psys, | 1037 | &clk_pclk_psys, |
979 | &clk_vpllsrc, | 1038 | &clk_vpllsrc, |
980 | &clk_sclk_vpll, | 1039 | &clk_sclk_vpll, |
981 | &clk_sclk_dac, | ||
982 | &clk_sclk_pixel, | ||
983 | &clk_sclk_hdmi, | ||
984 | &clk_mout_dmc0, | 1040 | &clk_mout_dmc0, |
985 | &clk_sclk_dmc0, | 1041 | &clk_sclk_dmc0, |
986 | &clk_sclk_audio0, | 1042 | &clk_sclk_audio0, |
@@ -1065,6 +1121,61 @@ static struct clk_ops s5pv210_epll_ops = { | |||
1065 | .get_rate = s5p_epll_get_rate, | 1121 | .get_rate = s5p_epll_get_rate, |
1066 | }; | 1122 | }; |
1067 | 1123 | ||
1124 | static u32 vpll_div[][5] = { | ||
1125 | { 54000000, 3, 53, 3, 0 }, | ||
1126 | { 108000000, 3, 53, 2, 0 }, | ||
1127 | }; | ||
1128 | |||
1129 | static unsigned long s5pv210_vpll_get_rate(struct clk *clk) | ||
1130 | { | ||
1131 | return clk->rate; | ||
1132 | } | ||
1133 | |||
1134 | static int s5pv210_vpll_set_rate(struct clk *clk, unsigned long rate) | ||
1135 | { | ||
1136 | unsigned int vpll_con; | ||
1137 | unsigned int i; | ||
1138 | |||
1139 | /* Return if nothing changed */ | ||
1140 | if (clk->rate == rate) | ||
1141 | return 0; | ||
1142 | |||
1143 | vpll_con = __raw_readl(S5P_VPLL_CON); | ||
1144 | vpll_con &= ~(0x1 << 27 | \ | ||
1145 | PLL90XX_MDIV_MASK << PLL90XX_MDIV_SHIFT | \ | ||
1146 | PLL90XX_PDIV_MASK << PLL90XX_PDIV_SHIFT | \ | ||
1147 | PLL90XX_SDIV_MASK << PLL90XX_SDIV_SHIFT); | ||
1148 | |||
1149 | for (i = 0; i < ARRAY_SIZE(vpll_div); i++) { | ||
1150 | if (vpll_div[i][0] == rate) { | ||
1151 | vpll_con |= vpll_div[i][1] << PLL90XX_PDIV_SHIFT; | ||
1152 | vpll_con |= vpll_div[i][2] << PLL90XX_MDIV_SHIFT; | ||
1153 | vpll_con |= vpll_div[i][3] << PLL90XX_SDIV_SHIFT; | ||
1154 | vpll_con |= vpll_div[i][4] << 27; | ||
1155 | break; | ||
1156 | } | ||
1157 | } | ||
1158 | |||
1159 | if (i == ARRAY_SIZE(vpll_div)) { | ||
1160 | printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n", | ||
1161 | __func__); | ||
1162 | return -EINVAL; | ||
1163 | } | ||
1164 | |||
1165 | __raw_writel(vpll_con, S5P_VPLL_CON); | ||
1166 | |||
1167 | /* Wait for VPLL lock */ | ||
1168 | while (!(__raw_readl(S5P_VPLL_CON) & (1 << PLL90XX_LOCKED_SHIFT))) | ||
1169 | continue; | ||
1170 | |||
1171 | clk->rate = rate; | ||
1172 | return 0; | ||
1173 | } | ||
1174 | static struct clk_ops s5pv210_vpll_ops = { | ||
1175 | .get_rate = s5pv210_vpll_get_rate, | ||
1176 | .set_rate = s5pv210_vpll_set_rate, | ||
1177 | }; | ||
1178 | |||
1068 | void __init_or_cpufreq s5pv210_setup_clocks(void) | 1179 | void __init_or_cpufreq s5pv210_setup_clocks(void) |
1069 | { | 1180 | { |
1070 | struct clk *xtal_clk; | 1181 | struct clk *xtal_clk; |
@@ -1113,6 +1224,7 @@ void __init_or_cpufreq s5pv210_setup_clocks(void) | |||
1113 | clk_fout_apll.ops = &clk_fout_apll_ops; | 1224 | clk_fout_apll.ops = &clk_fout_apll_ops; |
1114 | clk_fout_mpll.rate = mpll; | 1225 | clk_fout_mpll.rate = mpll; |
1115 | clk_fout_epll.rate = epll; | 1226 | clk_fout_epll.rate = epll; |
1227 | clk_fout_vpll.ops = &s5pv210_vpll_ops; | ||
1116 | clk_fout_vpll.rate = vpll; | 1228 | clk_fout_vpll.rate = vpll; |
1117 | 1229 | ||
1118 | printk(KERN_INFO "S5PV210: PLL settings, A=%ld, M=%ld, E=%ld V=%ld", | 1230 | printk(KERN_INFO "S5PV210: PLL settings, A=%ld, M=%ld, E=%ld V=%ld", |
@@ -1158,6 +1270,9 @@ void __init s5pv210_register_clocks(void) | |||
1158 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | 1270 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) |
1159 | s3c_register_clksrc(sysclks[ptr], 1); | 1271 | s3c_register_clksrc(sysclks[ptr], 1); |
1160 | 1272 | ||
1273 | for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) | ||
1274 | s3c_register_clksrc(sclk_tv[ptr], 1); | ||
1275 | |||
1161 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 1276 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
1162 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 1277 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
1163 | 1278 | ||
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 91145720822c..84ec74633232 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <plat/keypad-core.h> | 42 | #include <plat/keypad-core.h> |
43 | #include <plat/sdhci.h> | 43 | #include <plat/sdhci.h> |
44 | #include <plat/reset.h> | 44 | #include <plat/reset.h> |
45 | #include <plat/tv-core.h> | ||
45 | 46 | ||
46 | /* Initial IO mappings */ | 47 | /* Initial IO mappings */ |
47 | 48 | ||
@@ -145,6 +146,9 @@ void __init s5pv210_map_io(void) | |||
145 | 146 | ||
146 | /* Use s5pv210-keypad instead of samsung-keypad */ | 147 | /* Use s5pv210-keypad instead of samsung-keypad */ |
147 | samsung_keypad_setname("s5pv210-keypad"); | 148 | samsung_keypad_setname("s5pv210-keypad"); |
149 | |||
150 | /* setup TV devices */ | ||
151 | s5p_hdmi_setname("s5pv210-hdmi"); | ||
148 | } | 152 | } |
149 | 153 | ||
150 | void __init s5pv210_init_clocks(int xtal) | 154 | void __init s5pv210_init_clocks(int xtal) |
diff --git a/arch/arm/mach-s5pv210/dma.c b/arch/arm/mach-s5pv210/dma.c index f79d0b06cbf9..86b749c18b77 100644 --- a/arch/arm/mach-s5pv210/dma.c +++ b/arch/arm/mach-s5pv210/dma.c | |||
@@ -254,6 +254,7 @@ struct amba_device s5pv210_device_pdma1 = { | |||
254 | static int __init s5pv210_dma_init(void) | 254 | static int __init s5pv210_dma_init(void) |
255 | { | 255 | { |
256 | amba_device_register(&s5pv210_device_pdma0, &iomem_resource); | 256 | amba_device_register(&s5pv210_device_pdma0, &iomem_resource); |
257 | amba_device_register(&s5pv210_device_pdma1, &iomem_resource); | ||
257 | 258 | ||
258 | return 0; | 259 | return 0; |
259 | } | 260 | } |
diff --git a/arch/arm/mach-s5pv210/include/mach/clkdev.h b/arch/arm/mach-s5pv210/include/mach/clkdev.h deleted file mode 100644 index 7dffa83d23ff..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/clkdev.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h index b9f9ec33384d..5e0de3a31f3d 100644 --- a/arch/arm/mach-s5pv210/include/mach/irqs.h +++ b/arch/arm/mach-s5pv210/include/mach/irqs.h | |||
@@ -56,7 +56,7 @@ | |||
56 | #define IRQ_SPI2 S5P_IRQ_VIC1(17) | 56 | #define IRQ_SPI2 S5P_IRQ_VIC1(17) |
57 | #define IRQ_IRDA S5P_IRQ_VIC1(18) | 57 | #define IRQ_IRDA S5P_IRQ_VIC1(18) |
58 | #define IRQ_IIC2 S5P_IRQ_VIC1(19) | 58 | #define IRQ_IIC2 S5P_IRQ_VIC1(19) |
59 | #define IRQ_IIC3 S5P_IRQ_VIC1(20) | 59 | #define IRQ_IIC_HDMIPHY S5P_IRQ_VIC1(20) |
60 | #define IRQ_HSIRX S5P_IRQ_VIC1(21) | 60 | #define IRQ_HSIRX S5P_IRQ_VIC1(21) |
61 | #define IRQ_HSITX S5P_IRQ_VIC1(22) | 61 | #define IRQ_HSITX S5P_IRQ_VIC1(22) |
62 | #define IRQ_UHOST S5P_IRQ_VIC1(23) | 62 | #define IRQ_UHOST S5P_IRQ_VIC1(23) |
@@ -86,7 +86,7 @@ | |||
86 | #define IRQ_HDMI S5P_IRQ_VIC2(12) | 86 | #define IRQ_HDMI S5P_IRQ_VIC2(12) |
87 | #define IRQ_IIC1 S5P_IRQ_VIC2(13) | 87 | #define IRQ_IIC1 S5P_IRQ_VIC2(13) |
88 | #define IRQ_MFC S5P_IRQ_VIC2(14) | 88 | #define IRQ_MFC S5P_IRQ_VIC2(14) |
89 | #define IRQ_TVENC S5P_IRQ_VIC2(15) | 89 | #define IRQ_SDO S5P_IRQ_VIC2(15) |
90 | #define IRQ_I2S0 S5P_IRQ_VIC2(16) | 90 | #define IRQ_I2S0 S5P_IRQ_VIC2(16) |
91 | #define IRQ_I2S1 S5P_IRQ_VIC2(17) | 91 | #define IRQ_I2S1 S5P_IRQ_VIC2(17) |
92 | #define IRQ_I2S2 S5P_IRQ_VIC2(18) | 92 | #define IRQ_I2S2 S5P_IRQ_VIC2(18) |
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h index aac343c180b2..7ff609f1568b 100644 --- a/arch/arm/mach-s5pv210/include/mach/map.h +++ b/arch/arm/mach-s5pv210/include/mach/map.h | |||
@@ -90,6 +90,12 @@ | |||
90 | #define S5PV210_PA_FIMC1 0xFB300000 | 90 | #define S5PV210_PA_FIMC1 0xFB300000 |
91 | #define S5PV210_PA_FIMC2 0xFB400000 | 91 | #define S5PV210_PA_FIMC2 0xFB400000 |
92 | 92 | ||
93 | #define S5PV210_PA_SDO 0xF9000000 | ||
94 | #define S5PV210_PA_VP 0xF9100000 | ||
95 | #define S5PV210_PA_MIXER 0xF9200000 | ||
96 | #define S5PV210_PA_HDMI 0xFA100000 | ||
97 | #define S5PV210_PA_IIC_HDMIPHY 0xFA900000 | ||
98 | |||
93 | /* Compatibiltiy Defines */ | 99 | /* Compatibiltiy Defines */ |
94 | 100 | ||
95 | #define S3C_PA_FB S5PV210_PA_FB | 101 | #define S3C_PA_FB S5PV210_PA_FB |
@@ -110,6 +116,13 @@ | |||
110 | #define S5P_PA_FIMC2 S5PV210_PA_FIMC2 | 116 | #define S5P_PA_FIMC2 S5PV210_PA_FIMC2 |
111 | #define S5P_PA_MIPI_CSIS0 S5PV210_PA_MIPI_CSIS | 117 | #define S5P_PA_MIPI_CSIS0 S5PV210_PA_MIPI_CSIS |
112 | #define S5P_PA_MFC S5PV210_PA_MFC | 118 | #define S5P_PA_MFC S5PV210_PA_MFC |
119 | #define S5P_PA_IIC_HDMIPHY S5PV210_PA_IIC_HDMIPHY | ||
120 | |||
121 | #define S5P_PA_SDO S5PV210_PA_SDO | ||
122 | #define S5P_PA_VP S5PV210_PA_VP | ||
123 | #define S5P_PA_MIXER S5PV210_PA_MIXER | ||
124 | #define S5P_PA_HDMI S5PV210_PA_HDMI | ||
125 | |||
113 | #define S5P_PA_ONENAND S5PC110_PA_ONENAND | 126 | #define S5P_PA_ONENAND S5PC110_PA_ONENAND |
114 | #define S5P_PA_ONENAND_DMA S5PC110_PA_ONENAND_DMA | 127 | #define S5P_PA_ONENAND_DMA S5PC110_PA_ONENAND_DMA |
115 | #define S5P_PA_SDRAM S5PV210_PA_SDRAM | 128 | #define S5P_PA_SDRAM S5PV210_PA_SDRAM |
diff --git a/arch/arm/mach-s5pv210/include/mach/pm-core.h b/arch/arm/mach-s5pv210/include/mach/pm-core.h index 3e22109e1b7b..eba8aea63ed8 100644 --- a/arch/arm/mach-s5pv210/include/mach/pm-core.h +++ b/arch/arm/mach-s5pv210/include/mach/pm-core.h | |||
@@ -43,4 +43,4 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, | |||
43 | } | 43 | } |
44 | 44 | ||
45 | static inline void s3c_pm_restored_gpios(void) { } | 45 | static inline void s3c_pm_restored_gpios(void) { } |
46 | static inline void s3c_pm_saved_gpios(void) { } | 46 | static inline void samsung_pm_saved_gpios(void) { } |
diff --git a/arch/arm/mach-s5pv210/include/mach/pwm-clock.h b/arch/arm/mach-s5pv210/include/mach/pwm-clock.h deleted file mode 100644 index f8a9f1b330e0..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/pwm-clock.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/pwm-clock.h | ||
2 | * | ||
3 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
7 | * Copyright 2008 Simtec Electronics | ||
8 | * Ben Dooks <ben@simtec.co.uk> | ||
9 | * http://armlinux.simtec.co.uk/ | ||
10 | * | ||
11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h | ||
12 | * | ||
13 | * S5PV210 - pwm clock and timer support | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_PWMCLK_H | ||
21 | #define __ASM_ARCH_PWMCLK_H __FILE__ | ||
22 | |||
23 | /** | ||
24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | ||
25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. | ||
26 | * | ||
27 | * Return true if the given configuration from TCFG1 is a TCLK instead | ||
28 | * any of the TDIV clocks. | ||
29 | */ | ||
30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | ||
31 | { | ||
32 | return tcfg == S3C64XX_TCFG1_MUX_TCLK; | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * tcfg_to_divisor() - convert tcfg1 setting to a divisor | ||
37 | * @tcfg1: The tcfg1 setting, shifted down. | ||
38 | * | ||
39 | * Get the divisor value for the given tcfg1 setting. We assume the | ||
40 | * caller has already checked to see if this is not a TCLK source. | ||
41 | */ | ||
42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | ||
43 | { | ||
44 | return 1 << tcfg1; | ||
45 | } | ||
46 | |||
47 | /** | ||
48 | * pwm_tdiv_has_div1() - does the tdiv setting have a /1 | ||
49 | * | ||
50 | * Return true if we have a /1 in the tdiv setting. | ||
51 | */ | ||
52 | static inline unsigned int pwm_tdiv_has_div1(void) | ||
53 | { | ||
54 | return 1; | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * pwm_tdiv_div_bits() - calculate TCFG1 divisor value. | ||
59 | * @div: The divisor to calculate the bit information for. | ||
60 | * | ||
61 | * Turn a divisor into the necessary bit field for TCFG1. | ||
62 | */ | ||
63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | ||
64 | { | ||
65 | return ilog2(div); | ||
66 | } | ||
67 | |||
68 | #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK | ||
69 | |||
70 | #endif /* __ASM_ARCH_PWMCLK_H */ | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-clock.h b/arch/arm/mach-s5pv210/include/mach/regs-clock.h index 78925c516346..032de66fb8be 100644 --- a/arch/arm/mach-s5pv210/include/mach/regs-clock.h +++ b/arch/arm/mach-s5pv210/include/mach/regs-clock.h | |||
@@ -144,8 +144,9 @@ | |||
144 | 144 | ||
145 | #define S5P_OTHERS S5P_CLKREG(0xE000) | 145 | #define S5P_OTHERS S5P_CLKREG(0xE000) |
146 | #define S5P_OM_STAT S5P_CLKREG(0xE100) | 146 | #define S5P_OM_STAT S5P_CLKREG(0xE100) |
147 | #define S5P_HDMI_PHY_CONTROL S5P_CLKREG(0xE804) | ||
147 | #define S5P_USB_PHY_CONTROL S5P_CLKREG(0xE80C) | 148 | #define S5P_USB_PHY_CONTROL S5P_CLKREG(0xE80C) |
148 | #define S5P_DAC_CONTROL S5P_CLKREG(0xE810) | 149 | #define S5P_DAC_PHY_CONTROL S5P_CLKREG(0xE810) |
149 | #define S5P_MIPI_DPHY_CONTROL(x) S5P_CLKREG(0xE814) | 150 | #define S5P_MIPI_DPHY_CONTROL(x) S5P_CLKREG(0xE814) |
150 | #define S5P_MIPI_DPHY_ENABLE (1 << 0) | 151 | #define S5P_MIPI_DPHY_ENABLE (1 << 0) |
151 | #define S5P_MIPI_DPHY_SRESETN (1 << 1) | 152 | #define S5P_MIPI_DPHY_SRESETN (1 << 1) |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 061cc7e4f48c..15edcae448b9 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -48,6 +48,11 @@ | |||
48 | #include <plat/s5p-time.h> | 48 | #include <plat/s5p-time.h> |
49 | #include <plat/mfc.h> | 49 | #include <plat/mfc.h> |
50 | #include <plat/regs-fb-v4.h> | 50 | #include <plat/regs-fb-v4.h> |
51 | #include <plat/camport.h> | ||
52 | |||
53 | #include <media/v4l2-mediabus.h> | ||
54 | #include <media/s5p_fimc.h> | ||
55 | #include <media/noon010pc30.h> | ||
51 | 56 | ||
52 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 57 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
53 | #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 58 | #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -272,6 +277,14 @@ static void __init goni_tsp_init(void) | |||
272 | i2c2_devs[0].irq = gpio_to_irq(gpio); | 277 | i2c2_devs[0].irq = gpio_to_irq(gpio); |
273 | } | 278 | } |
274 | 279 | ||
280 | static void goni_camera_init(void) | ||
281 | { | ||
282 | s5pv210_fimc_setup_gpio(S5P_CAMPORT_A); | ||
283 | |||
284 | /* Set max driver strength on CAM_A_CLKOUT pin. */ | ||
285 | s5p_gpio_set_drvstr(S5PV210_GPE1(3), S5P_GPIO_DRVSTR_LV4); | ||
286 | } | ||
287 | |||
275 | /* MAX8998 regulators */ | 288 | /* MAX8998 regulators */ |
276 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) | 289 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) |
277 | 290 | ||
@@ -285,6 +298,7 @@ static struct regulator_consumer_supply goni_ldo5_consumers[] = { | |||
285 | 298 | ||
286 | static struct regulator_consumer_supply goni_ldo8_consumers[] = { | 299 | static struct regulator_consumer_supply goni_ldo8_consumers[] = { |
287 | REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), | 300 | REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), |
301 | REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"), | ||
288 | }; | 302 | }; |
289 | 303 | ||
290 | static struct regulator_consumer_supply goni_ldo11_consumers[] = { | 304 | static struct regulator_consumer_supply goni_ldo11_consumers[] = { |
@@ -475,6 +489,10 @@ static struct regulator_consumer_supply buck1_consumer = | |||
475 | static struct regulator_consumer_supply buck2_consumer = | 489 | static struct regulator_consumer_supply buck2_consumer = |
476 | REGULATOR_SUPPLY("vddint", NULL); | 490 | REGULATOR_SUPPLY("vddint", NULL); |
477 | 491 | ||
492 | static struct regulator_consumer_supply buck3_consumer = | ||
493 | REGULATOR_SUPPLY("vdet", "s5p-sdo"); | ||
494 | |||
495 | |||
478 | static struct regulator_init_data goni_buck1_data = { | 496 | static struct regulator_init_data goni_buck1_data = { |
479 | .constraints = { | 497 | .constraints = { |
480 | .name = "VARM_1.2V", | 498 | .name = "VARM_1.2V", |
@@ -511,6 +529,8 @@ static struct regulator_init_data goni_buck3_data = { | |||
511 | .enabled = 1, | 529 | .enabled = 1, |
512 | }, | 530 | }, |
513 | }, | 531 | }, |
532 | .num_consumer_supplies = 1, | ||
533 | .consumer_supplies = &buck3_consumer, | ||
514 | }; | 534 | }; |
515 | 535 | ||
516 | static struct regulator_init_data goni_buck4_data = { | 536 | static struct regulator_init_data goni_buck4_data = { |
@@ -801,6 +821,34 @@ static void goni_setup_sdhci(void) | |||
801 | s3c_sdhci2_set_platdata(&goni_hsmmc2_data); | 821 | s3c_sdhci2_set_platdata(&goni_hsmmc2_data); |
802 | }; | 822 | }; |
803 | 823 | ||
824 | static struct noon010pc30_platform_data noon010pc30_pldata = { | ||
825 | .clk_rate = 16000000UL, | ||
826 | .gpio_nreset = S5PV210_GPB(2), /* CAM_CIF_NRST */ | ||
827 | .gpio_nstby = S5PV210_GPB(0), /* CAM_CIF_NSTBY */ | ||
828 | }; | ||
829 | |||
830 | static struct i2c_board_info noon010pc30_board_info = { | ||
831 | I2C_BOARD_INFO("NOON010PC30", 0x60 >> 1), | ||
832 | .platform_data = &noon010pc30_pldata, | ||
833 | }; | ||
834 | |||
835 | static struct s5p_fimc_isp_info goni_camera_sensors[] = { | ||
836 | { | ||
837 | .mux_id = 0, | ||
838 | .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | | ||
839 | V4L2_MBUS_VSYNC_ACTIVE_LOW, | ||
840 | .bus_type = FIMC_ITU_601, | ||
841 | .board_info = &noon010pc30_board_info, | ||
842 | .i2c_bus_num = 0, | ||
843 | .clk_frequency = 16000000UL, | ||
844 | }, | ||
845 | }; | ||
846 | |||
847 | struct s5p_platform_fimc goni_fimc_md_platdata __initdata = { | ||
848 | .isp_info = goni_camera_sensors, | ||
849 | .num_clients = ARRAY_SIZE(goni_camera_sensors), | ||
850 | }; | ||
851 | |||
804 | static struct platform_device *goni_devices[] __initdata = { | 852 | static struct platform_device *goni_devices[] __initdata = { |
805 | &s3c_device_fb, | 853 | &s3c_device_fb, |
806 | &s5p_device_onenand, | 854 | &s5p_device_onenand, |
@@ -812,10 +860,13 @@ static struct platform_device *goni_devices[] __initdata = { | |||
812 | &s5p_device_mfc, | 860 | &s5p_device_mfc, |
813 | &s5p_device_mfc_l, | 861 | &s5p_device_mfc_l, |
814 | &s5p_device_mfc_r, | 862 | &s5p_device_mfc_r, |
863 | &s5p_device_mixer, | ||
864 | &s5p_device_sdo, | ||
815 | &s3c_device_i2c0, | 865 | &s3c_device_i2c0, |
816 | &s5p_device_fimc0, | 866 | &s5p_device_fimc0, |
817 | &s5p_device_fimc1, | 867 | &s5p_device_fimc1, |
818 | &s5p_device_fimc2, | 868 | &s5p_device_fimc2, |
869 | &s5p_device_fimc_md, | ||
819 | &s3c_device_hsmmc0, | 870 | &s3c_device_hsmmc0, |
820 | &s3c_device_hsmmc1, | 871 | &s3c_device_hsmmc1, |
821 | &s3c_device_hsmmc2, | 872 | &s3c_device_hsmmc2, |
@@ -884,6 +935,12 @@ static void __init goni_machine_init(void) | |||
884 | /* FB */ | 935 | /* FB */ |
885 | s3c_fb_set_platdata(&goni_lcd_pdata); | 936 | s3c_fb_set_platdata(&goni_lcd_pdata); |
886 | 937 | ||
938 | /* FIMC */ | ||
939 | s3c_set_platdata(&goni_fimc_md_platdata, sizeof(goni_fimc_md_platdata), | ||
940 | &s5p_device_fimc_md); | ||
941 | |||
942 | goni_camera_init(); | ||
943 | |||
887 | /* SPI */ | 944 | /* SPI */ |
888 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | 945 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
889 | 946 | ||
diff --git a/arch/arm/mach-s5pv210/setup-sdhci.c b/arch/arm/mach-s5pv210/setup-sdhci.c index a83b6c909f6b..6b8ccc4d35fd 100644 --- a/arch/arm/mach-s5pv210/setup-sdhci.c +++ b/arch/arm/mach-s5pv210/setup-sdhci.c | |||
@@ -10,17 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <linux/mmc/card.h> | ||
20 | #include <linux/mmc/host.h> | ||
21 | |||
22 | #include <plat/regs-sdhci.h> | ||
23 | #include <plat/sdhci.h> | ||
24 | 14 | ||
25 | /* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ | 15 | /* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ |
26 | 16 | ||
@@ -30,34 +20,3 @@ char *s5pv210_hsmmc_clksrcs[4] = { | |||
30 | [2] = "sclk_mmc", /* mmc_bus */ | 20 | [2] = "sclk_mmc", /* mmc_bus */ |
31 | /* [3] = NULL, - reserved */ | 21 | /* [3] = NULL, - reserved */ |
32 | }; | 22 | }; |
33 | |||
34 | void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev, | ||
35 | void __iomem *r, | ||
36 | struct mmc_ios *ios, | ||
37 | struct mmc_card *card) | ||
38 | { | ||
39 | u32 ctrl2, ctrl3; | ||
40 | |||
41 | /* don't need to alter anything according to card-type */ | ||
42 | |||
43 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); | ||
44 | |||
45 | ctrl2 = readl(r + S3C_SDHCI_CONTROL2); | ||
46 | ctrl2 &= S3C_SDHCI_CTRL2_SELBASECLK_MASK; | ||
47 | ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR | | ||
48 | S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK | | ||
49 | S3C_SDHCI_CTRL2_ENFBCLKRX | | ||
50 | S3C_SDHCI_CTRL2_DFCNT_NONE | | ||
51 | S3C_SDHCI_CTRL2_ENCLKOUTHOLD); | ||
52 | |||
53 | if (ios->clock < 25 * 1000000) | ||
54 | ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 | | ||
55 | S3C_SDHCI_CTRL3_FCSEL2 | | ||
56 | S3C_SDHCI_CTRL3_FCSEL1 | | ||
57 | S3C_SDHCI_CTRL3_FCSEL0); | ||
58 | else | ||
59 | ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0); | ||
60 | |||
61 | writel(ctrl2, r + S3C_SDHCI_CONTROL2); | ||
62 | writel(ctrl3, r + S3C_SDHCI_CONTROL3); | ||
63 | } | ||
diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S deleted file mode 100644 index e3452ccd4b08..000000000000 --- a/arch/arm/mach-s5pv210/sleep.S +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s5p/sleep.S | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV210 power Manager (Suspend-To-RAM) support | ||
7 | * Based on S3C2410 sleep code by: | ||
8 | * Ben Dooks, (c) 2004 Simtec Electronics | ||
9 | * | ||
10 | * Based on PXA/SA1100 sleep code by: | ||
11 | * Nicolas Pitre, (c) 2002 Monta Vista Software Inc | ||
12 | * Cliff Brake, (c) 2001 | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | */ | ||
28 | |||
29 | #include <linux/linkage.h> | ||
30 | #include <asm/assembler.h> | ||
31 | #include <asm/memory.h> | ||
32 | |||
33 | .text | ||
34 | |||
35 | /* sleep magic, to allow the bootloader to check for an valid | ||
36 | * image to resume to. Must be the first word before the | ||
37 | * s3c_cpu_resume entry. | ||
38 | */ | ||
39 | |||
40 | .word 0x2bedf00d | ||
41 | |||
42 | /* s3c_cpu_resume | ||
43 | * | ||
44 | * resume code entry for bootloader to call | ||
45 | * | ||
46 | * we must put this code here in the data segment as we have no | ||
47 | * other way of restoring the stack pointer after sleep, and we | ||
48 | * must not write to the code segment (code is read-only) | ||
49 | */ | ||
50 | |||
51 | ENTRY(s3c_cpu_resume) | ||
52 | b cpu_resume | ||