X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fpinctrl%2Frenesas%2Fpfc.c;h=7183b1180889cd9f90a22758b10e4971014e0a8e;hb=4e05c167a756cbfb0a51ef09e52c8b5c7c4d6514;hp=d1271dad44f41b66a03567a4d9e39052a6dcc3f2;hpb=504bf790da08db9b4a443566cf6ef577f9c7996a;p=platform%2Fkernel%2Fu-boot.git diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c index d1271da..7183b11 100644 --- a/drivers/pinctrl/renesas/pfc.c +++ b/drivers/pinctrl/renesas/pfc.c @@ -14,7 +14,11 @@ #include #include #include +#include +#include #include +#include +#include #include #include @@ -28,8 +32,10 @@ enum sh_pfc_model { SH_PFC_R8A7794, SH_PFC_R8A7795, SH_PFC_R8A7796, + SH_PFC_R8A774A1, SH_PFC_R8A77965, SH_PFC_R8A77970, + SH_PFC_R8A77980, SH_PFC_R8A77990, SH_PFC_R8A77995, }; @@ -469,7 +475,7 @@ static int sh_pfc_gpio_request_enable(struct udevice *dev, const struct sh_pfc_pin *pin = NULL; int i, ret, idx; - for (i = 1; i < pfc->info->nr_pins; i++) { + for (i = 0; i < pfc->info->nr_pins; i++) { if (priv->pfc.info->pins[i].pin != pin_selector) continue; @@ -505,7 +511,7 @@ static int sh_pfc_gpio_disable_free(struct udevice *dev, const struct sh_pfc_pin *pin = NULL; int i, idx; - for (i = 1; i < pfc->info->nr_pins; i++) { + for (i = 0; i < pfc->info->nr_pins; i++) { if (priv->pfc.info->pins[i].pin != pin_selector) continue; @@ -812,7 +818,7 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev) enum sh_pfc_model model = dev_get_driver_data(dev); fdt_addr_t base; - base = devfdt_get_addr(dev); + base = dev_read_addr(dev); if (base == FDT_ADDR_T_NONE) return -EINVAL; @@ -848,6 +854,10 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev) if (model == SH_PFC_R8A7796) priv->pfc.info = &r8a7796_pinmux_info; #endif +#ifdef CONFIG_PINCTRL_PFC_R8A774A1 + if (model == SH_PFC_R8A774A1) + priv->pfc.info = &r8a774a1_pinmux_info; +#endif #ifdef CONFIG_PINCTRL_PFC_R8A77965 if (model == SH_PFC_R8A77965) priv->pfc.info = &r8a77965_pinmux_info; @@ -856,6 +866,10 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev) if (model == SH_PFC_R8A77970) priv->pfc.info = &r8a77970_pinmux_info; #endif +#ifdef CONFIG_PINCTRL_PFC_R8A77980 + if (model == SH_PFC_R8A77980) + priv->pfc.info = &r8a77980_pinmux_info; +#endif #ifdef CONFIG_PINCTRL_PFC_R8A77990 if (model == SH_PFC_R8A77990) priv->pfc.info = &r8a77990_pinmux_info; @@ -915,6 +929,12 @@ static const struct udevice_id sh_pfc_pinctrl_ids[] = { .data = SH_PFC_R8A7796, }, #endif +#ifdef CONFIG_PINCTRL_PFC_R8A774A1 + { + .compatible = "renesas,pfc-r8a774a1", + .data = SH_PFC_R8A774A1, + }, +#endif #ifdef CONFIG_PINCTRL_PFC_R8A77965 { .compatible = "renesas,pfc-r8a77965", @@ -927,6 +947,12 @@ static const struct udevice_id sh_pfc_pinctrl_ids[] = { .data = SH_PFC_R8A77970, }, #endif +#ifdef CONFIG_PINCTRL_PFC_R8A77980 + { + .compatible = "renesas,pfc-r8a77980", + .data = SH_PFC_R8A77980, + }, +#endif #ifdef CONFIG_PINCTRL_PFC_R8A77990 { .compatible = "renesas,pfc-r8a77990",