Commit 6d13eaaf authored by Nishanth Menon's avatar Nishanth Menon Committed by Tarun Kanti DebBarma

gpio/omap: restore OE only after setting the output level

Setup the dataout register before restoring OE. This is to make
sure that we have valid data in dataout register which would be
made available in output pins as soon as OE is enabled. Else,
there is risk of unknown data getting out into gpio pins.
Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarTarun Kanti DebBarma <tarun.kanti@ti.com>
Reviewed-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
parent ba805be5
...@@ -1355,7 +1355,6 @@ static void omap_gpio_restore_context(struct gpio_bank *bank) ...@@ -1355,7 +1355,6 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
__raw_writel(bank->context.wake_en, __raw_writel(bank->context.wake_en,
bank->base + bank->regs->wkup_en); bank->base + bank->regs->wkup_en);
__raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl); __raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl);
__raw_writel(bank->context.oe, bank->base + bank->regs->direction);
__raw_writel(bank->context.leveldetect0, __raw_writel(bank->context.leveldetect0,
bank->base + bank->regs->leveldetect0); bank->base + bank->regs->leveldetect0);
__raw_writel(bank->context.leveldetect1, __raw_writel(bank->context.leveldetect1,
...@@ -1365,6 +1364,8 @@ static void omap_gpio_restore_context(struct gpio_bank *bank) ...@@ -1365,6 +1364,8 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
__raw_writel(bank->context.fallingdetect, __raw_writel(bank->context.fallingdetect,
bank->base + bank->regs->fallingdetect); bank->base + bank->regs->fallingdetect);
__raw_writel(bank->context.dataout, bank->base + bank->regs->dataout); __raw_writel(bank->context.dataout, bank->base + bank->regs->dataout);
__raw_writel(bank->context.oe, bank->base + bank->regs->direction);
if (bank->dbck_enable_mask) { if (bank->dbck_enable_mask) {
__raw_writel(bank->context.debounce, bank->base + __raw_writel(bank->context.debounce, bank->base +
bank->regs->debounce); bank->regs->debounce);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment