diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-07-14 03:14:35 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-07-14 03:14:35 -0400 |
commit | df4732abf91fa394bea95d912aff718ef5e2be5d (patch) | |
tree | dc7b0d7c22c97c4c0b7c50e1240072daded43f0c | |
parent | bd0a521e88aa7a06ae7aabaed7ae196ed4ad867a (diff) | |
parent | 705c75e3a1785d9d3acdf1b0b3a3afb10e943b15 (diff) |
Merge branch 'v3.5-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
From Kukjin Kim <kgene.kim@samsung.com>:
* 'v3.5-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: S3C24XX: Correct CAMIF interrupt definitions
ARM: S3C24XX: Correct AC97 clock control bit for S3C2440
ARM: SAMSUNG: fix race in s3c_adc_start for ADC
ARM: SAMSUNG: Update default rate for xusbxti clock
ARM: EXYNOS: register devices in 'need_restore' state for pm_domains
ARM: EXYNOS: read initial state of power domain from hw registers
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/arm/mach-exynos/pm_domains.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/clock-s3c2440.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/adc.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-samsung/devs.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/s5p-clock.c | 1 |
5 files changed, 18 insertions, 9 deletions
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index e9fafcf163de..373c3c00d24c 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
@@ -119,7 +119,9 @@ static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev, | |||
119 | struct exynos_pm_domain *pd) | 119 | struct exynos_pm_domain *pd) |
120 | { | 120 | { |
121 | if (pdev->dev.bus) { | 121 | if (pdev->dev.bus) { |
122 | if (pm_genpd_add_device(&pd->pd, &pdev->dev)) | 122 | if (!pm_genpd_add_device(&pd->pd, &pdev->dev)) |
123 | pm_genpd_dev_need_restore(&pdev->dev, true); | ||
124 | else | ||
123 | pr_info("%s: error in adding %s device to %s power" | 125 | pr_info("%s: error in adding %s device to %s power" |
124 | "domain\n", __func__, dev_name(&pdev->dev), | 126 | "domain\n", __func__, dev_name(&pdev->dev), |
125 | pd->name); | 127 | pd->name); |
@@ -151,9 +153,12 @@ static __init int exynos4_pm_init_power_domain(void) | |||
151 | if (of_have_populated_dt()) | 153 | if (of_have_populated_dt()) |
152 | return exynos_pm_dt_parse_domains(); | 154 | return exynos_pm_dt_parse_domains(); |
153 | 155 | ||
154 | for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) | 156 | for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) { |
155 | pm_genpd_init(&exynos4_pm_domains[idx]->pd, NULL, | 157 | struct exynos_pm_domain *pd = exynos4_pm_domains[idx]; |
156 | exynos4_pm_domains[idx]->is_off); | 158 | int on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN; |
159 | |||
160 | pm_genpd_init(&pd->pd, NULL, !on); | ||
161 | } | ||
157 | 162 | ||
158 | #ifdef CONFIG_S5P_DEV_FIMD0 | 163 | #ifdef CONFIG_S5P_DEV_FIMD0 |
159 | exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0); | 164 | exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0); |
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c index 414364eb426c..cb2883d553b5 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2440.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c | |||
@@ -106,7 +106,7 @@ static struct clk s3c2440_clk_cam_upll = { | |||
106 | static struct clk s3c2440_clk_ac97 = { | 106 | static struct clk s3c2440_clk_ac97 = { |
107 | .name = "ac97", | 107 | .name = "ac97", |
108 | .enable = s3c2410_clkcon_enable, | 108 | .enable = s3c2410_clkcon_enable, |
109 | .ctrlbit = S3C2440_CLKCON_CAMERA, | 109 | .ctrlbit = S3C2440_CLKCON_AC97, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static unsigned long s3c2440_fclk_n_getrate(struct clk *clk) | 112 | static unsigned long s3c2440_fclk_n_getrate(struct clk *clk) |
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 33ecd0c9f0c3..b1e05ccff3ac 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c | |||
@@ -157,11 +157,13 @@ int s3c_adc_start(struct s3c_adc_client *client, | |||
157 | return -EINVAL; | 157 | return -EINVAL; |
158 | } | 158 | } |
159 | 159 | ||
160 | if (client->is_ts && adc->ts_pend) | ||
161 | return -EAGAIN; | ||
162 | |||
163 | spin_lock_irqsave(&adc->lock, flags); | 160 | spin_lock_irqsave(&adc->lock, flags); |
164 | 161 | ||
162 | if (client->is_ts && adc->ts_pend) { | ||
163 | spin_unlock_irqrestore(&adc->lock, flags); | ||
164 | return -EAGAIN; | ||
165 | } | ||
166 | |||
165 | client->channel = channel; | 167 | client->channel = channel; |
166 | client->nr_samples = nr_samples; | 168 | client->nr_samples = nr_samples; |
167 | 169 | ||
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 1d214cb9d770..6303974c2ee0 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -126,7 +126,8 @@ struct platform_device s3c_device_adc = { | |||
126 | #ifdef CONFIG_CPU_S3C2440 | 126 | #ifdef CONFIG_CPU_S3C2440 |
127 | static struct resource s3c_camif_resource[] = { | 127 | static struct resource s3c_camif_resource[] = { |
128 | [0] = DEFINE_RES_MEM(S3C2440_PA_CAMIF, S3C2440_SZ_CAMIF), | 128 | [0] = DEFINE_RES_MEM(S3C2440_PA_CAMIF, S3C2440_SZ_CAMIF), |
129 | [1] = DEFINE_RES_IRQ(IRQ_CAM), | 129 | [1] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_C), |
130 | [2] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_P), | ||
130 | }; | 131 | }; |
131 | 132 | ||
132 | struct platform_device s3c_device_camif = { | 133 | struct platform_device s3c_device_camif = { |
diff --git a/arch/arm/plat-samsung/s5p-clock.c b/arch/arm/plat-samsung/s5p-clock.c index 031a61899bef..48a159911037 100644 --- a/arch/arm/plat-samsung/s5p-clock.c +++ b/arch/arm/plat-samsung/s5p-clock.c | |||
@@ -37,6 +37,7 @@ struct clk clk_ext_xtal_mux = { | |||
37 | struct clk clk_xusbxti = { | 37 | struct clk clk_xusbxti = { |
38 | .name = "xusbxti", | 38 | .name = "xusbxti", |
39 | .id = -1, | 39 | .id = -1, |
40 | .rate = 24000000, | ||
40 | }; | 41 | }; |
41 | 42 | ||
42 | struct clk s5p_clk_27m = { | 43 | struct clk s5p_clk_27m = { |