diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-10 12:51:26 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-03-10 12:51:26 -0500 |
commit | f7c8faedf98aa5ec372e0191078ac7fe1e7fb067 (patch) | |
tree | 14e69d0e6022e23850611abdc1b48770b921c193 /arch/arm/plat-samsung | |
parent | acf346084bca289a00020a5c29c23673b801b380 (diff) | |
parent | 4d2e4d7f2c2b1a4382286821a59fa2f4012cb748 (diff) |
Merge branch 'next/devel-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc
* 'next/devel-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: EXYNOS: fix cycle count for periodic mode of clock event timers
ARM: EXYNOS: add support JPEG
ARM: EXYNOS: Add DMC1, allow PPMU access for DMC
ARM: SAMSUNG: Correct MIPI-CSIS io memory resource definition
ARM: SAMSUNG: fix __init attribute on regarding s3c_set_platdata()
ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
ARM: S5PV210: Add usb otg phy control
ARM: S3C64XX: Add usb otg phy control
ARM: EXYNOS: Enable l2 configuration through device tree
ARM: EXYNOS: remove useless code to save/restore L2
ARM: EXYNOS: save L2 settings during bootup
ARM: S5P: add L2 early resume code
ARM: EXYNOS: Add support AFTR mode on EXYNOS4210
ARM: SAMSUNG: use spin_lock_irqsave() in clk_{enable,disable}
ARM: S3C64XX: Define some additional always off clocks
ARM: S3C64XX: Reduce residency requirement for cpuidle WFI mode
ARM: SAMSUNG: Add a callback 'notify_after' for PWM backlight control
ARM: SAMSUNG: add G2D to plat-s5p and mach-exynos
ARM: S3C64XX: Gate some more clocks by default
ARM: S3C64XX: Add basic cpuidle driver
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/clock.c | 12 | ||||
-rw-r--r-- | arch/arm/plat-samsung/dev-backlight.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-samsung/devs.c | 68 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/devs.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h | 7 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/udc-hs.h | 5 |
6 files changed, 86 insertions, 12 deletions
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 10f71179071..65c5eca475e 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -84,31 +84,35 @@ static int clk_null_enable(struct clk *clk, int enable) | |||
84 | 84 | ||
85 | int clk_enable(struct clk *clk) | 85 | int clk_enable(struct clk *clk) |
86 | { | 86 | { |
87 | unsigned long flags; | ||
88 | |||
87 | if (IS_ERR(clk) || clk == NULL) | 89 | if (IS_ERR(clk) || clk == NULL) |
88 | return -EINVAL; | 90 | return -EINVAL; |
89 | 91 | ||
90 | clk_enable(clk->parent); | 92 | clk_enable(clk->parent); |
91 | 93 | ||
92 | spin_lock(&clocks_lock); | 94 | spin_lock_irqsave(&clocks_lock, flags); |
93 | 95 | ||
94 | if ((clk->usage++) == 0) | 96 | if ((clk->usage++) == 0) |
95 | (clk->enable)(clk, 1); | 97 | (clk->enable)(clk, 1); |
96 | 98 | ||
97 | spin_unlock(&clocks_lock); | 99 | spin_unlock_irqrestore(&clocks_lock, flags); |
98 | return 0; | 100 | return 0; |
99 | } | 101 | } |
100 | 102 | ||
101 | void clk_disable(struct clk *clk) | 103 | void clk_disable(struct clk *clk) |
102 | { | 104 | { |
105 | unsigned long flags; | ||
106 | |||
103 | if (IS_ERR(clk) || clk == NULL) | 107 | if (IS_ERR(clk) || clk == NULL) |
104 | return; | 108 | return; |
105 | 109 | ||
106 | spin_lock(&clocks_lock); | 110 | spin_lock_irqsave(&clocks_lock, flags); |
107 | 111 | ||
108 | if ((--clk->usage) == 0) | 112 | if ((--clk->usage) == 0) |
109 | (clk->enable)(clk, 0); | 113 | (clk->enable)(clk, 0); |
110 | 114 | ||
111 | spin_unlock(&clocks_lock); | 115 | spin_unlock_irqrestore(&clocks_lock, flags); |
112 | clk_disable(clk->parent); | 116 | clk_disable(clk->parent); |
113 | } | 117 | } |
114 | 118 | ||
diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c index a976c023b28..5f197dcaf10 100644 --- a/arch/arm/plat-samsung/dev-backlight.c +++ b/arch/arm/plat-samsung/dev-backlight.c | |||
@@ -77,7 +77,7 @@ static struct platform_device samsung_dfl_bl_device __initdata = { | |||
77 | * @gpio_info: structure containing GPIO info for PWM timer | 77 | * @gpio_info: structure containing GPIO info for PWM timer |
78 | * @bl_data: structure containing Backlight control data | 78 | * @bl_data: structure containing Backlight control data |
79 | */ | 79 | */ |
80 | void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | 80 | void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, |
81 | struct platform_pwm_backlight_data *bl_data) | 81 | struct platform_pwm_backlight_data *bl_data) |
82 | { | 82 | { |
83 | int ret = 0; | 83 | int ret = 0; |
@@ -115,6 +115,8 @@ void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | |||
115 | samsung_bl_data->init = bl_data->init; | 115 | samsung_bl_data->init = bl_data->init; |
116 | if (bl_data->notify) | 116 | if (bl_data->notify) |
117 | samsung_bl_data->notify = bl_data->notify; | 117 | samsung_bl_data->notify = bl_data->notify; |
118 | if (bl_data->notify_after) | ||
119 | samsung_bl_data->notify_after = bl_data->notify_after; | ||
118 | if (bl_data->exit) | 120 | if (bl_data->exit) |
119 | samsung_bl_data->exit = bl_data->exit; | 121 | samsung_bl_data->exit = bl_data->exit; |
120 | if (bl_data->check_fb) | 122 | if (bl_data->check_fb) |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index f10768e988d..eb3ba1385b0 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <plat/sdhci.h> | 57 | #include <plat/sdhci.h> |
58 | #include <plat/ts.h> | 58 | #include <plat/ts.h> |
59 | #include <plat/udc.h> | 59 | #include <plat/udc.h> |
60 | #include <plat/udc-hs.h> | ||
60 | #include <plat/usb-control.h> | 61 | #include <plat/usb-control.h> |
61 | #include <plat/usb-phy.h> | 62 | #include <plat/usb-phy.h> |
62 | #include <plat/regs-iic.h> | 63 | #include <plat/regs-iic.h> |
@@ -267,6 +268,52 @@ struct platform_device s5p_device_fimc3 = { | |||
267 | }; | 268 | }; |
268 | #endif /* CONFIG_S5P_DEV_FIMC3 */ | 269 | #endif /* CONFIG_S5P_DEV_FIMC3 */ |
269 | 270 | ||
271 | /* G2D */ | ||
272 | |||
273 | #ifdef CONFIG_S5P_DEV_G2D | ||
274 | static struct resource s5p_g2d_resource[] = { | ||
275 | [0] = { | ||
276 | .start = S5P_PA_G2D, | ||
277 | .end = S5P_PA_G2D + SZ_4K - 1, | ||
278 | .flags = IORESOURCE_MEM, | ||
279 | }, | ||
280 | [1] = { | ||
281 | .start = IRQ_2D, | ||
282 | .end = IRQ_2D, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | }, | ||
285 | }; | ||
286 | |||
287 | struct platform_device s5p_device_g2d = { | ||
288 | .name = "s5p-g2d", | ||
289 | .id = 0, | ||
290 | .num_resources = ARRAY_SIZE(s5p_g2d_resource), | ||
291 | .resource = s5p_g2d_resource, | ||
292 | .dev = { | ||
293 | .dma_mask = &samsung_device_dma_mask, | ||
294 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
295 | }, | ||
296 | }; | ||
297 | #endif /* CONFIG_S5P_DEV_G2D */ | ||
298 | |||
299 | #ifdef CONFIG_S5P_DEV_JPEG | ||
300 | static struct resource s5p_jpeg_resource[] = { | ||
301 | [0] = DEFINE_RES_MEM(S5P_PA_JPEG, SZ_4K), | ||
302 | [1] = DEFINE_RES_IRQ(IRQ_JPEG), | ||
303 | }; | ||
304 | |||
305 | struct platform_device s5p_device_jpeg = { | ||
306 | .name = "s5p-jpeg", | ||
307 | .id = 0, | ||
308 | .num_resources = ARRAY_SIZE(s5p_jpeg_resource), | ||
309 | .resource = s5p_jpeg_resource, | ||
310 | .dev = { | ||
311 | .dma_mask = &samsung_device_dma_mask, | ||
312 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
313 | }, | ||
314 | }; | ||
315 | #endif /* CONFIG_S5P_DEV_JPEG */ | ||
316 | |||
270 | /* FIMD0 */ | 317 | /* FIMD0 */ |
271 | 318 | ||
272 | #ifdef CONFIG_S5P_DEV_FIMD0 | 319 | #ifdef CONFIG_S5P_DEV_FIMD0 |
@@ -769,7 +816,7 @@ struct platform_device s3c_device_cfcon = { | |||
769 | .resource = s3c_cfcon_resource, | 816 | .resource = s3c_cfcon_resource, |
770 | }; | 817 | }; |
771 | 818 | ||
772 | void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata) | 819 | void __init s3c_ide_set_platdata(struct s3c_ide_platdata *pdata) |
773 | { | 820 | { |
774 | s3c_set_platdata(pdata, sizeof(struct s3c_ide_platdata), | 821 | s3c_set_platdata(pdata, sizeof(struct s3c_ide_platdata), |
775 | &s3c_device_cfcon); | 822 | &s3c_device_cfcon); |
@@ -887,7 +934,7 @@ struct platform_device s5p_device_mfc_r = { | |||
887 | 934 | ||
888 | #ifdef CONFIG_S5P_DEV_CSIS0 | 935 | #ifdef CONFIG_S5P_DEV_CSIS0 |
889 | static struct resource s5p_mipi_csis0_resource[] = { | 936 | static struct resource s5p_mipi_csis0_resource[] = { |
890 | [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS0, SZ_4K), | 937 | [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS0, SZ_16K), |
891 | [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS0), | 938 | [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS0), |
892 | }; | 939 | }; |
893 | 940 | ||
@@ -901,7 +948,7 @@ struct platform_device s5p_device_mipi_csis0 = { | |||
901 | 948 | ||
902 | #ifdef CONFIG_S5P_DEV_CSIS1 | 949 | #ifdef CONFIG_S5P_DEV_CSIS1 |
903 | static struct resource s5p_mipi_csis1_resource[] = { | 950 | static struct resource s5p_mipi_csis1_resource[] = { |
904 | [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS1, SZ_4K), | 951 | [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS1, SZ_16K), |
905 | [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS1), | 952 | [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS1), |
906 | }; | 953 | }; |
907 | 954 | ||
@@ -1049,7 +1096,7 @@ struct platform_device s3c64xx_device_onenand1 = { | |||
1049 | .resource = s3c64xx_onenand1_resources, | 1096 | .resource = s3c64xx_onenand1_resources, |
1050 | }; | 1097 | }; |
1051 | 1098 | ||
1052 | void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata) | 1099 | void __init s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata) |
1053 | { | 1100 | { |
1054 | s3c_set_platdata(pdata, sizeof(struct onenand_platform_data), | 1101 | s3c_set_platdata(pdata, sizeof(struct onenand_platform_data), |
1055 | &s3c64xx_device_onenand1); | 1102 | &s3c64xx_device_onenand1); |
@@ -1423,6 +1470,19 @@ struct platform_device s3c_device_usb_hsotg = { | |||
1423 | .coherent_dma_mask = DMA_BIT_MASK(32), | 1470 | .coherent_dma_mask = DMA_BIT_MASK(32), |
1424 | }, | 1471 | }, |
1425 | }; | 1472 | }; |
1473 | |||
1474 | void __init s3c_hsotg_set_platdata(struct s3c_hsotg_plat *pd) | ||
1475 | { | ||
1476 | struct s3c_hsotg_plat *npd; | ||
1477 | |||
1478 | npd = s3c_set_platdata(pd, sizeof(struct s3c_hsotg_plat), | ||
1479 | &s3c_device_usb_hsotg); | ||
1480 | |||
1481 | if (!npd->phy_init) | ||
1482 | npd->phy_init = s5p_usb_phy_init; | ||
1483 | if (!npd->phy_exit) | ||
1484 | npd->phy_exit = s5p_usb_phy_exit; | ||
1485 | } | ||
1426 | #endif /* CONFIG_S3C_DEV_USB_HSOTG */ | 1486 | #endif /* CONFIG_S3C_DEV_USB_HSOTG */ |
1427 | 1487 | ||
1428 | /* USB High Spped 2.0 Device (Gadget) */ | 1488 | /* USB High Spped 2.0 Device (Gadget) */ |
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 4214ea0ff8f..5e7972de3ed 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -79,6 +79,8 @@ extern struct platform_device s5p_device_fimc1; | |||
79 | extern struct platform_device s5p_device_fimc2; | 79 | extern struct platform_device s5p_device_fimc2; |
80 | extern struct platform_device s5p_device_fimc3; | 80 | extern struct platform_device s5p_device_fimc3; |
81 | extern struct platform_device s5p_device_fimc_md; | 81 | extern struct platform_device s5p_device_fimc_md; |
82 | extern struct platform_device s5p_device_jpeg; | ||
83 | extern struct platform_device s5p_device_g2d; | ||
82 | extern struct platform_device s5p_device_fimd0; | 84 | extern struct platform_device s5p_device_fimd0; |
83 | extern struct platform_device s5p_device_hdmi; | 85 | extern struct platform_device s5p_device_hdmi; |
84 | extern struct platform_device s5p_device_i2c_hdmiphy; | 86 | extern struct platform_device s5p_device_i2c_hdmiphy; |
diff --git a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h b/arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h index a111ad87183..fcf27966206 100644 --- a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h +++ b/arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h | |||
@@ -25,8 +25,9 @@ | |||
25 | #define S3C_HSOTG_PHYREG(x) ((x) + S3C_VA_USB_HSPHY) | 25 | #define S3C_HSOTG_PHYREG(x) ((x) + S3C_VA_USB_HSPHY) |
26 | 26 | ||
27 | #define S3C_PHYPWR S3C_HSOTG_PHYREG(0x00) | 27 | #define S3C_PHYPWR S3C_HSOTG_PHYREG(0x00) |
28 | #define SRC_PHYPWR_OTG_DISABLE (1 << 4) | 28 | #define S3C_PHYPWR_NORMAL_MASK (0x19 << 0) |
29 | #define SRC_PHYPWR_ANALOG_POWERDOWN (1 << 3) | 29 | #define S3C_PHYPWR_OTG_DISABLE (1 << 4) |
30 | #define S3C_PHYPWR_ANALOG_POWERDOWN (1 << 3) | ||
30 | #define SRC_PHYPWR_FORCE_SUSPEND (1 << 1) | 31 | #define SRC_PHYPWR_FORCE_SUSPEND (1 << 1) |
31 | 32 | ||
32 | #define S3C_PHYCLK S3C_HSOTG_PHYREG(0x04) | 33 | #define S3C_PHYCLK S3C_HSOTG_PHYREG(0x04) |
@@ -42,7 +43,7 @@ | |||
42 | 43 | ||
43 | #define S3C_RSTCON S3C_HSOTG_PHYREG(0x08) | 44 | #define S3C_RSTCON S3C_HSOTG_PHYREG(0x08) |
44 | #define S3C_RSTCON_PHYCLK (1 << 2) | 45 | #define S3C_RSTCON_PHYCLK (1 << 2) |
45 | #define S3C_RSTCON_HCLK (1 << 2) | 46 | #define S3C_RSTCON_HCLK (1 << 1) |
46 | #define S3C_RSTCON_PHY (1 << 0) | 47 | #define S3C_RSTCON_PHY (1 << 0) |
47 | 48 | ||
48 | #define S3C_PHYTUNE S3C_HSOTG_PHYREG(0x20) | 49 | #define S3C_PHYTUNE S3C_HSOTG_PHYREG(0x20) |
diff --git a/arch/arm/plat-samsung/include/plat/udc-hs.h b/arch/arm/plat-samsung/include/plat/udc-hs.h index a22a4f2eea9..c9e3667cb2b 100644 --- a/arch/arm/plat-samsung/include/plat/udc-hs.h +++ b/arch/arm/plat-samsung/include/plat/udc-hs.h | |||
@@ -26,4 +26,9 @@ enum s3c_hsotg_dmamode { | |||
26 | struct s3c_hsotg_plat { | 26 | struct s3c_hsotg_plat { |
27 | enum s3c_hsotg_dmamode dma; | 27 | enum s3c_hsotg_dmamode dma; |
28 | unsigned int is_osc : 1; | 28 | unsigned int is_osc : 1; |
29 | |||
30 | int (*phy_init)(struct platform_device *pdev, int type); | ||
31 | int (*phy_exit)(struct platform_device *pdev, int type); | ||
29 | }; | 32 | }; |
33 | |||
34 | extern void s3c_hsotg_set_platdata(struct s3c_hsotg_plat *pd); | ||