diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bus/omap-ocp2scp.c | 34 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle-exynos.c | 3 |
2 files changed, 36 insertions, 1 deletions
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c index 723ec06ad2c8..9f1856948758 100644 --- a/drivers/bus/omap-ocp2scp.c +++ b/drivers/bus/omap-ocp2scp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/io.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/err.h> | 22 | #include <linux/err.h> |
@@ -23,6 +24,9 @@ | |||
23 | #include <linux/of.h> | 24 | #include <linux/of.h> |
24 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
25 | 26 | ||
27 | #define OCP2SCP_TIMING 0x18 | ||
28 | #define SYNC2_MASK 0xf | ||
29 | |||
26 | static int ocp2scp_remove_devices(struct device *dev, void *c) | 30 | static int ocp2scp_remove_devices(struct device *dev, void *c) |
27 | { | 31 | { |
28 | struct platform_device *pdev = to_platform_device(dev); | 32 | struct platform_device *pdev = to_platform_device(dev); |
@@ -35,6 +39,9 @@ static int ocp2scp_remove_devices(struct device *dev, void *c) | |||
35 | static int omap_ocp2scp_probe(struct platform_device *pdev) | 39 | static int omap_ocp2scp_probe(struct platform_device *pdev) |
36 | { | 40 | { |
37 | int ret; | 41 | int ret; |
42 | u32 reg; | ||
43 | void __iomem *regs; | ||
44 | struct resource *res; | ||
38 | struct device_node *np = pdev->dev.of_node; | 45 | struct device_node *np = pdev->dev.of_node; |
39 | 46 | ||
40 | if (np) { | 47 | if (np) { |
@@ -47,6 +54,32 @@ static int omap_ocp2scp_probe(struct platform_device *pdev) | |||
47 | } | 54 | } |
48 | 55 | ||
49 | pm_runtime_enable(&pdev->dev); | 56 | pm_runtime_enable(&pdev->dev); |
57 | /* | ||
58 | * As per AM572x TRM: http://www.ti.com/lit/ug/spruhz6/spruhz6.pdf | ||
59 | * under section 26.3.2.2, table 26-26 OCP2SCP TIMING Caution; | ||
60 | * As per OMAP4430 TRM: http://www.ti.com/lit/ug/swpu231ap/swpu231ap.pdf | ||
61 | * under section 23.12.6.2.2 , Table 23-1213 OCP2SCP TIMING Caution; | ||
62 | * As per OMAP4460 TRM: http://www.ti.com/lit/ug/swpu235ab/swpu235ab.pdf | ||
63 | * under section 23.12.6.2.2, Table 23-1213 OCP2SCP TIMING Caution; | ||
64 | * As per OMAP543x TRM http://www.ti.com/lit/pdf/swpu249 | ||
65 | * under section 27.3.2.2, Table 27-27 OCP2SCP TIMING Caution; | ||
66 | * | ||
67 | * Read path of OCP2SCP is not working properly due to low reset value | ||
68 | * of SYNC2 parameter in OCP2SCP. Suggested reset value is 0x6 or more. | ||
69 | */ | ||
70 | if (!of_device_is_compatible(np, "ti,am437x-ocp2scp")) { | ||
71 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
72 | regs = devm_ioremap_resource(&pdev->dev, res); | ||
73 | if (IS_ERR(regs)) | ||
74 | goto err0; | ||
75 | |||
76 | pm_runtime_get_sync(&pdev->dev); | ||
77 | reg = readl_relaxed(regs + OCP2SCP_TIMING); | ||
78 | reg &= ~(SYNC2_MASK); | ||
79 | reg |= 0x6; | ||
80 | writel_relaxed(reg, regs + OCP2SCP_TIMING); | ||
81 | pm_runtime_put_sync(&pdev->dev); | ||
82 | } | ||
50 | 83 | ||
51 | return 0; | 84 | return 0; |
52 | 85 | ||
@@ -67,6 +100,7 @@ static int omap_ocp2scp_remove(struct platform_device *pdev) | |||
67 | #ifdef CONFIG_OF | 100 | #ifdef CONFIG_OF |
68 | static const struct of_device_id omap_ocp2scp_id_table[] = { | 101 | static const struct of_device_id omap_ocp2scp_id_table[] = { |
69 | { .compatible = "ti,omap-ocp2scp" }, | 102 | { .compatible = "ti,omap-ocp2scp" }, |
103 | { .compatible = "ti,am437x-ocp2scp" }, | ||
70 | {} | 104 | {} |
71 | }; | 105 | }; |
72 | MODULE_DEVICE_TABLE(of, omap_ocp2scp_id_table); | 106 | MODULE_DEVICE_TABLE(of, omap_ocp2scp_id_table); |
diff --git a/drivers/cpuidle/cpuidle-exynos.c b/drivers/cpuidle/cpuidle-exynos.c index 0c06ea2f50bb..b5f0a9cc8185 100644 --- a/drivers/cpuidle/cpuidle-exynos.c +++ b/drivers/cpuidle/cpuidle-exynos.c | |||
@@ -116,7 +116,8 @@ static int exynos_cpuidle_probe(struct platform_device *pdev) | |||
116 | { | 116 | { |
117 | int ret; | 117 | int ret; |
118 | 118 | ||
119 | if (of_machine_is_compatible("samsung,exynos4210")) { | 119 | if (IS_ENABLED(CONFIG_SMP) && |
120 | of_machine_is_compatible("samsung,exynos4210")) { | ||
120 | exynos_cpuidle_pdata = pdev->dev.platform_data; | 121 | exynos_cpuidle_pdata = pdev->dev.platform_data; |
121 | 122 | ||
122 | ret = cpuidle_register(&exynos_coupled_idle_driver, | 123 | ret = cpuidle_register(&exynos_coupled_idle_driver, |