]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: aspeed: Fix spurious mux failures on the AST2500
authorAndrew Jeffery <andrew@aj.id.au>
Thu, 29 Aug 2019 07:17:38 +0000 (16:47 +0930)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Sep 2019 23:08:27 +0000 (00:08 +0100)
commita63170430533345bb41a2b0d06bc7dd0de498335
tree46e5df037787a6e8ea72bf84a41687d3375e8e4e
parenta2e8c383b17a2d6e840c741e443bf5c89e5e0a84
pinctrl: aspeed: Fix spurious mux failures on the AST2500

Commit ec6d54ad13d2 ("pinctrl: aspeed-g5: Delay acquisition of regmaps")
was determined to be a partial fix to the problem of acquiring the LPC
Host Controller and GFX regmaps: The AST2500 pin controller may need to
fetch syscon regmaps during expression evaluation as well as when
setting mux state. For example, this case is hit by attempting to export
pins exposing the LPC Host Controller as GPIOs.

An optional eval() hook is added to the Aspeed pinmux operation struct
and called from aspeed_sig_expr_eval() if the pointer is set by the
SoC-specific driver. This enables the AST2500 to perform the custom
action of acquiring its regmap dependencies as required.

John Wang tested the fix on an Inspur FP5280G2 machine (AST2500-based)
where the issue was found, and I've booted the fix on Witherspoon
(AST2500) and Palmetto (AST2400) machines, and poked at relevant pins
under QEMU by forcing mux configurations via devmem before exporting
GPIOs to exercise the driver.

Fixes: 03696da7afb5 ("pinctrl: aspeed: Read and write bits in LPC and GFX controllers")
Fixes: ec6d54ad13d2 ("pinctrl: aspeed-g5: Delay acquisition of regmaps")
Reported-by: John Wang <wangzqbj@inspur.com>
Tested-by: John Wang <wangzqbj@inspur.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20190829071738.2523-1-andrew@aj.id.au
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
drivers/pinctrl/aspeed/pinmux-aspeed.c
drivers/pinctrl/aspeed/pinmux-aspeed.h