diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-22 12:03:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-22 12:03:30 -0400 |
commit | 38eb1dbb0d7d190bdfe2ea824e94dab19e32737f (patch) | |
tree | 750c5f99f23d6b3e2b6446e9d2e17fec2e05ec3c /drivers/bus | |
parent | db4fd9c5d072a20ea6b7e40276a9822e04732610 (diff) | |
parent | cdaa8cf34863028dab238e1498555bf12d693244 (diff) |
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson:
"Here's the usual "low-priority fixes that didn't make it into the last
few -rcs, with a twist: We had a fixes pull request that I didn't send
in time to get into 4.0, so we'll send some of them to Greg for
-stable as well.
Contents here is as usual not all that controversial:
- a handful of randconfig fixes from Arnd, in particular for older
Samsung platforms
- Exynos fixes, !SMP building, DTS updates for MMC and lid switch
- Kbuild fix to create output subdirectory for DTB files
- misc minor fixes for OMAP"
* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
ARM: at91/dt: sama5d3 xplained: add phy address for macb1
kbuild: Create directory for target DTB
ARM: mvebu: Disable CPU Idle on Armada 38x
ARM: DRA7: Enable Cortex A15 errata 798181
ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102
ARM: dts: DRA7: Add bandgap and related thermal nodes
bus: ocp2scp: SYNC2 value should be changed to 0x6
ARM: dts: am4372: Add "ti,am437x-ocp2scp" as compatible string for OCP2SCP
ARM: OMAP2+: remove superfluous NULL pointer check
ARM: EXYNOS: Fix build breakage cpuidle on !SMP
ARM: dts: fix lid and power pin-functions for exynos5250-spring
ARM: dts: fix mmc node updates for exynos5250-spring
ARM: OMAP4: remove dead kconfig option OMAP4_ERRATA_I688
MAINTAINERS: add OMAP defconfigs under OMAP SUPPORT
ARM: OMAP1: PM: fix some build warnings on 1510-only Kconfigs
ARM: cns3xxx: don't export static symbol
ARM: S3C24XX: avoid a Kconfig warning
ARM: S3C24XX: fix header file inclusions
ARM: S3C24XX: fix building without PM_SLEEP
ARM: S3C24XX: use SAMSUNG_WAKEMASK for s3c2416
...
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/omap-ocp2scp.c | 34 |
1 files changed, 34 insertions, 0 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); |