pinctrl: st: Enhance the controller to manage unavailable registers
authorGiuseppe Cavallaro <peppe.cavallaro@st.com>
Wed, 12 Mar 2014 08:50:06 +0000 (09:50 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Mar 2014 14:15:34 +0000 (15:15 +0100)
commit4e6a609fb791ba8f01e624000086217a558a2a10
treea81f23670cddcd49e587ed53c9c749a838a0bcb1
parent051a58b4622f0e1b732acb750097c64bc00ddb93
pinctrl: st: Enhance the controller to manage unavailable registers

This patch adds a new logic inside the st pinctrl to manage
an unsupported scenario: some sysconfig are not available!

This is the case of STiH407 where, although documented, the
following registers from SYSCFG_FLASH have been removed from the SoC.

SYSTEM_CONFIG3040
   Output Enable pad control for all PIO Alternate Functions
and
SYSTEM_ CONFIG3050
   Pull Up pad control for all PIO Alternate Functions

Without managing this condition an imprecise external abort
will be detect.

To do this the patch also reviews the st_parse_syscfgs
and other routines to manipulate the registers only if
actually available.
In any case, for example the st_parse_syscfgs detected
an error condition but no action was made in the
st_pctl_probe_dt.

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-st.c