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
Unified · Split
| @@ -119,7 +119,9 @@ static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev, · 118 unmodified lines | ||
| 119 | 119 | struct exynos_pm_domain *pd) |
| 120 | 120 | { |
| 121 | 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 | 125 | pr_info("%s: error in adding %s device to %s power" |
| 124 | 126 | "domain\n", __func__, dev_name(&pdev->dev), |
| 125 | 127 | pd->name); |
| @@ -151,9 +153,12 @@ static __init int exynos4_pm_init_power_domain(void) · 25 unmodified lines | ||
| 151 | 153 | if (of_have_populated_dt()) |
| 152 | 154 | return exynos_pm_dt_parse_domains(); |
| 153 | 155 | |
| 154 | − for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) | |
| 155 | − pm_genpd_init(&exynos4_pm_domains[idx]->pd, NULL, | |
| 156 | − exynos4_pm_domains[idx]->is_off); | |
| 156 | + for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) { | |
| 157 | + struct exynos_pm_domain *pd = exynos4_pm_domains[idx]; | |
| 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 | 163 | #ifdef CONFIG_S5P_DEV_FIMD0 |
| 159 | 164 | exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0); |
| @@ -106,7 +106,7 @@ static struct clk s3c2440_clk_cam_upll = { · 105 unmodified lines | ||
| 106 | 106 | static struct clk s3c2440_clk_ac97 = { |
| 107 | 107 | .name = "ac97", |
| 108 | 108 | .enable = s3c2410_clkcon_enable, |
| 109 | − .ctrlbit = S3C2440_CLKCON_CAMERA, | |
| 109 | + .ctrlbit = S3C2440_CLKCON_AC97, | |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | 112 | static unsigned long s3c2440_fclk_n_getrate(struct clk *clk) |
| @@ -157,11 +157,13 @@ int s3c_adc_start(struct s3c_adc_client *client, · 156 unmodified lines | ||
| 157 | 157 | return -EINVAL; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | − if (client->is_ts && adc->ts_pend) | |
| 161 | − return -EAGAIN; | |
| 162 | − | |
| 163 | 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 | 167 | client->channel = channel; |
| 166 | 168 | client->nr_samples = nr_samples; |
| 167 | 169 | |
| @@ -126,7 +126,8 @@ struct platform_device s3c_device_adc = { · 125 unmodified lines | ||
| 126 | 126 | #ifdef CONFIG_CPU_S3C2440 |
| 127 | 127 | static struct resource s3c_camif_resource[] = { |
| 128 | 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 | 133 | struct platform_device s3c_device_camif = { |
| @@ -37,6 +37,7 @@ struct clk clk_ext_xtal_mux = { · 36 unmodified lines | ||
| 37 | 37 | struct clk clk_xusbxti = { |
| 38 | 38 | .name = "xusbxti", |
| 39 | 39 | .id = -1, |
| 40 | + .rate = 24000000, | |
| 40 | 41 | }; |
| 41 | 42 | |
| 42 | 43 | struct clk s5p_clk_27m = { |