mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 17:54:13 +08:00
pinctrl: imx27: fix wrong offset to ICONFB
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. Cc: stable@vger.kernel.org Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk> Reviewed-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
b0dcfd8732
commit
795779df22
@ -45,7 +45,7 @@ struct imx1_pinctrl {
|
|||||||
#define MX1_DDIR 0x00
|
#define MX1_DDIR 0x00
|
||||||
#define MX1_OCR 0x04
|
#define MX1_OCR 0x04
|
||||||
#define MX1_ICONFA 0x0c
|
#define MX1_ICONFA 0x0c
|
||||||
#define MX1_ICONFB 0x10
|
#define MX1_ICONFB 0x14
|
||||||
#define MX1_GIUS 0x20
|
#define MX1_GIUS 0x20
|
||||||
#define MX1_GPR 0x38
|
#define MX1_GPR 0x38
|
||||||
#define MX1_PUEN 0x40
|
#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 old_val;
|
||||||
u32 new_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 */
|
/* Use the next register if the pin's port pin number is >=16 */
|
||||||
if (pin_id % 32 >= 16)
|
if (pin_id % 32 >= 16)
|
||||||
reg += 0x04;
|
reg += 0x04;
|
||||||
|
|
||||||
|
dev_dbg(ipctl->dev, "write: register 0x%p offset %d value 0x%x\n",
|
||||||
|
reg, offset, value);
|
||||||
|
|
||||||
/* Get current state of pins */
|
/* Get current state of pins */
|
||||||
old_val = readl(reg);
|
old_val = readl(reg);
|
||||||
old_val &= mask;
|
old_val &= mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user