From: Kishon Vijay Abraham I <kishon@ti.com>
To: <arnd@arndb.de>, <tony@atomide.com>, <balbi@ti.com>,
<linux-kernel@vger.kernel.org>
Cc: <kishon@ti.com>
Subject: [PATCH] bus: ocp2scp: SYNC2 value should be changed to 0x6
Date: Wed, 14 May 2014 14:19:33 +0530 [thread overview]
Message-ID: <1400057373-2871-1-git-send-email-kishon@ti.com> (raw)
Read path of OCP2SCP is not working properly due to low reset value
of SYNC2 parameter in OCP2SCP. So changed the SYNC2 value to 0x6.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/bus/omap-ocp2scp.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c
index 5511f98..0a974b2 100644
--- a/drivers/bus/omap-ocp2scp.c
+++ b/drivers/bus/omap-ocp2scp.c
@@ -16,6 +16,7 @@
*
*/
+#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/err.h>
@@ -23,6 +24,9 @@
#include <linux/of.h>
#include <linux/of_platform.h>
+#define OCP2SCP_TIMING 0x18
+#define SYNC2_MASK 0xf
+
static int ocp2scp_remove_devices(struct device *dev, void *c)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -35,6 +39,9 @@ static int ocp2scp_remove_devices(struct device *dev, void *c)
static int omap_ocp2scp_probe(struct platform_device *pdev)
{
int ret;
+ u32 reg;
+ void __iomem *regs;
+ struct resource *res;
struct device_node *np = pdev->dev.of_node;
if (np) {
@@ -46,8 +53,24 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
}
}
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ regs = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(regs))
+ return PTR_ERR(regs);
+
pm_runtime_enable(&pdev->dev);
+ /*
+ * Read path of OCP2SCP is not working properly due to low reset value
+ * of SYNC2 parameter in OCP2SCP. Suggested reset value is 0x6.
+ */
+ pm_runtime_get_sync(&pdev->dev);
+ reg = readl(regs + OCP2SCP_TIMING);
+ reg &= ~(SYNC2_MASK);
+ reg |= 0x6;
+ writel(reg, regs + OCP2SCP_TIMING);
+ pm_runtime_put_sync(&pdev->dev);
+
return 0;
err0:
--
1.7.9.5
reply other threads:[~2014-05-14 8:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400057373-2871-1-git-send-email-kishon@ti.com \
--to=kishon@ti.com \
--cc=arnd@arndb.de \
--cc=balbi@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®