* [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB
@ 2014-01-22 3:14 Chris Ruehl
2014-01-22 3:14 ` [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit Chris Ruehl
2014-01-23 8:25 ` [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB Linus Walleij
0 siblings, 2 replies; 6+ messages in thread
From: Chris Ruehl @ 2014-01-22 3:14 UTC (permalink / raw)
To: linus.walleij; +Cc: linux-kernel, linux-arm, mpa, Chris Ruehl
The offset to ICONFB was incorrect, this patch set the correct value 0x14.
dev_dbg in function imx1_write_2bit print the wrong address and had been
moved after address calculation.
Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
---
drivers/pinctrl/pinctrl-imx1-core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c
index f77914a..8dfc3dc 100644
--- a/drivers/pinctrl/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/pinctrl-imx1-core.c
@@ -45,7 +45,7 @@ struct imx1_pinctrl {
#define MX1_DDIR 0x00
#define MX1_OCR 0x04
#define MX1_ICONFA 0x0c
-#define MX1_ICONFB 0x10
+#define MX1_ICONFB 0x14
#define MX1_GIUS 0x20
#define MX1_GPR 0x38
#define MX1_PUEN 0x40
@@ -97,13 +97,13 @@ static void imx1_write_2bit(struct imx1_pinctrl *ipctl, unsigned int pin_id,
u32 old_val;
u32 new_val;
- dev_dbg(ipctl->dev, "write: register 0x%p offset %d value 0x%x\n",
- reg, offset, value);
-
/* Use the next register if the pin's port pin number is >=16 */
if (pin_id % 32 >= 16)
reg += 0x04;
+ dev_dbg(ipctl->dev, "write: register 0x%p offset %d value 0x%x\n",
+ reg, offset, value);
+
/* Get current state of pins */
old_val = readl(reg);
old_val &= mask;
--
1.7.10.4
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
2014-01-22 3:14 [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB Chris Ruehl
@ 2014-01-22 3:14 ` Chris Ruehl
2014-01-23 8:26 ` Linus Walleij
2014-01-31 8:20 ` Linus Walleij
2014-01-23 8:25 ` [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB Linus Walleij
1 sibling, 2 replies; 6+ messages in thread
From: Chris Ruehl @ 2014-01-22 3:14 UTC (permalink / raw)
To: linus.walleij; +Cc: linux-kernel, linux-arm, mpa, Chris Ruehl
The offset for the 2bit register calculate wrong, this patch
fixes the problem. The debugfs printout for oconf, iconfa, iconfb
now shows the real values.
Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
---
drivers/pinctrl/pinctrl-imx1-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c
index 8dfc3dc..59a16b6 100644
--- a/drivers/pinctrl/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/pinctrl-imx1-core.c
@@ -139,7 +139,7 @@ static int imx1_read_2bit(struct imx1_pinctrl *ipctl, unsigned int pin_id,
u32 reg_offset)
{
void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset;
- int offset = pin_id % 16;
+ int offset = (pin_id % 16) * 2;
/* Use the next register if the pin's port pin number is >=16 */
if (pin_id % 32 >= 16)
--
1.7.10.4
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
2014-01-22 3:14 ` [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit Chris Ruehl
@ 2014-01-23 8:26 ` Linus Walleij
2014-01-23 10:57 ` Markus Pargmann
2014-01-31 8:20 ` Linus Walleij
1 sibling, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2014-01-23 8:26 UTC (permalink / raw)
To: Chris Ruehl; +Cc: linux-kernel, linux-arm, Markus Pargmann
On Wed, Jan 22, 2014 at 4:14 AM, Chris Ruehl <chris.ruehl@gtsys.com.hk> wrote:
> The offset for the 2bit register calculate wrong, this patch
> fixes the problem. The debugfs printout for oconf, iconfa, iconfb
> now shows the real values.
>
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Markus: this OK? I want your review tag on it.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
2014-01-23 8:26 ` Linus Walleij
@ 2014-01-23 10:57 ` Markus Pargmann
0 siblings, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-01-23 10:57 UTC (permalink / raw)
To: Linus Walleij; +Cc: Chris Ruehl, linux-kernel, linux-arm
Hi,
On Thu, Jan 23, 2014 at 09:26:06AM +0100, Linus Walleij wrote:
> On Wed, Jan 22, 2014 at 4:14 AM, Chris Ruehl <chris.ruehl@gtsys.com.hk> wrote:
>
> > The offset for the 2bit register calculate wrong, this patch
> > fixes the problem. The debugfs printout for oconf, iconfa, iconfb
> > now shows the real values.
> >
> > Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
>
> Markus: this OK? I want your review tag on it.
Yes this one is also ok.
Reviewed-by: Markus Pargmann <mpa@pengutronix.de>
Regards,
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
2014-01-22 3:14 ` [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit Chris Ruehl
2014-01-23 8:26 ` Linus Walleij
@ 2014-01-31 8:20 ` Linus Walleij
1 sibling, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2014-01-31 8:20 UTC (permalink / raw)
To: Chris Ruehl; +Cc: linux-kernel, linux-arm, Markus Pargmann
On Wed, Jan 22, 2014 at 4:14 AM, Chris Ruehl <chris.ruehl@gtsys.com.hk> wrote:
> The offset for the 2bit register calculate wrong, this patch
> fixes the problem. The debugfs printout for oconf, iconfa, iconfb
> now shows the real values.
>
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Patch applied for fixes with Markus' Review tag. Also
tagged for stable.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB
2014-01-22 3:14 [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB Chris Ruehl
2014-01-22 3:14 ` [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit Chris Ruehl
@ 2014-01-23 8:25 ` Linus Walleij
1 sibling, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2014-01-23 8:25 UTC (permalink / raw)
To: Chris Ruehl; +Cc: linux-kernel, linux-arm, Markus Pargmann
On Wed, Jan 22, 2014 at 4:14 AM, Chris Ruehl <chris.ruehl@gtsys.com.hk> wrote:
> The offset to ICONFB was incorrect, this patch set the correct value 0x14.
> dev_dbg in function imx1_write_2bit print the wrong address and had been
> moved after address calculation.
>
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Patch applied with Markus' Reveiew tag and
tagged for stable.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-31 8:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22 3:14 [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB Chris Ruehl
2014-01-22 3:14 ` [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit Chris Ruehl
2014-01-23 8:26 ` Linus Walleij
2014-01-23 10:57 ` Markus Pargmann
2014-01-31 8:20 ` Linus Walleij
2014-01-23 8:25 ` [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB Linus Walleij
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®