diff options
| author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2018-09-24 10:32:11 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2018-09-25 06:48:15 -0400 |
| commit | e50d95e2ad1266f8d3fcdf0724f03dbdffd400aa (patch) | |
| tree | df2ba3b4c9b71a6ef48c889510340a118fa46497 | |
| parent | b85bfa246efd24ea3fdb5ee949c28e3110c6d299 (diff) | |
pinctrl: cannonlake: Fix HOSTSW_OWN register offset of H variant
It turns out the HOSTSW_OWN register offset is different between LP and
H variants. The latter should use 0xc0 instead so fix that.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=199911
Fixes: a663ccf0fea1 ("pinctrl: intel: Add Intel Cannon Lake PCH-H pin controller support")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| -rw-r--r-- | drivers/pinctrl/intel/pinctrl-cannonlake.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-cannonlake.c b/drivers/pinctrl/intel/pinctrl-cannonlake.c index 8d48371caaa2..e7f45d96b0cb 100644 --- a/drivers/pinctrl/intel/pinctrl-cannonlake.c +++ b/drivers/pinctrl/intel/pinctrl-cannonlake.c | |||
| @@ -15,10 +15,11 @@ | |||
| 15 | 15 | ||
| 16 | #include "pinctrl-intel.h" | 16 | #include "pinctrl-intel.h" |
| 17 | 17 | ||
| 18 | #define CNL_PAD_OWN 0x020 | 18 | #define CNL_PAD_OWN 0x020 |
| 19 | #define CNL_PADCFGLOCK 0x080 | 19 | #define CNL_PADCFGLOCK 0x080 |
| 20 | #define CNL_HOSTSW_OWN 0x0b0 | 20 | #define CNL_LP_HOSTSW_OWN 0x0b0 |
| 21 | #define CNL_GPI_IE 0x120 | 21 | #define CNL_H_HOSTSW_OWN 0x0c0 |
| 22 | #define CNL_GPI_IE 0x120 | ||
| 22 | 23 | ||
| 23 | #define CNL_GPP(r, s, e, g) \ | 24 | #define CNL_GPP(r, s, e, g) \ |
| 24 | { \ | 25 | { \ |
| @@ -30,12 +31,12 @@ | |||
| 30 | 31 | ||
| 31 | #define CNL_NO_GPIO -1 | 32 | #define CNL_NO_GPIO -1 |
| 32 | 33 | ||
| 33 | #define CNL_COMMUNITY(b, s, e, g) \ | 34 | #define CNL_COMMUNITY(b, s, e, o, g) \ |
| 34 | { \ | 35 | { \ |
| 35 | .barno = (b), \ | 36 | .barno = (b), \ |
| 36 | .padown_offset = CNL_PAD_OWN, \ | 37 | .padown_offset = CNL_PAD_OWN, \ |
| 37 | .padcfglock_offset = CNL_PADCFGLOCK, \ | 38 | .padcfglock_offset = CNL_PADCFGLOCK, \ |
| 38 | .hostown_offset = CNL_HOSTSW_OWN, \ | 39 | .hostown_offset = (o), \ |
| 39 | .ie_offset = CNL_GPI_IE, \ | 40 | .ie_offset = CNL_GPI_IE, \ |
| 40 | .pin_base = (s), \ | 41 | .pin_base = (s), \ |
| 41 | .npins = ((e) - (s) + 1), \ | 42 | .npins = ((e) - (s) + 1), \ |
| @@ -43,6 +44,12 @@ | |||
| 43 | .ngpps = ARRAY_SIZE(g), \ | 44 | .ngpps = ARRAY_SIZE(g), \ |
| 44 | } | 45 | } |
| 45 | 46 | ||
| 47 | #define CNLLP_COMMUNITY(b, s, e, g) \ | ||
| 48 | CNL_COMMUNITY(b, s, e, CNL_LP_HOSTSW_OWN, g) | ||
| 49 | |||
| 50 | #define CNLH_COMMUNITY(b, s, e, g) \ | ||
| 51 | CNL_COMMUNITY(b, s, e, CNL_H_HOSTSW_OWN, g) | ||
| 52 | |||
| 46 | /* Cannon Lake-H */ | 53 | /* Cannon Lake-H */ |
| 47 | static const struct pinctrl_pin_desc cnlh_pins[] = { | 54 | static const struct pinctrl_pin_desc cnlh_pins[] = { |
| 48 | /* GPP_A */ | 55 | /* GPP_A */ |
| @@ -442,10 +449,10 @@ static const struct intel_function cnlh_functions[] = { | |||
| 442 | }; | 449 | }; |
| 443 | 450 | ||
| 444 | static const struct intel_community cnlh_communities[] = { | 451 | static const struct intel_community cnlh_communities[] = { |
| 445 | CNL_COMMUNITY(0, 0, 50, cnlh_community0_gpps), | 452 | CNLH_COMMUNITY(0, 0, 50, cnlh_community0_gpps), |
| 446 | CNL_COMMUNITY(1, 51, 154, cnlh_community1_gpps), | 453 | CNLH_COMMUNITY(1, 51, 154, cnlh_community1_gpps), |
| 447 | CNL_COMMUNITY(2, 155, 248, cnlh_community3_gpps), | 454 | CNLH_COMMUNITY(2, 155, 248, cnlh_community3_gpps), |
| 448 | CNL_COMMUNITY(3, 249, 298, cnlh_community4_gpps), | 455 | CNLH_COMMUNITY(3, 249, 298, cnlh_community4_gpps), |
| 449 | }; | 456 | }; |
| 450 | 457 | ||
| 451 | static const struct intel_pinctrl_soc_data cnlh_soc_data = { | 458 | static const struct intel_pinctrl_soc_data cnlh_soc_data = { |
| @@ -803,9 +810,9 @@ static const struct intel_padgroup cnllp_community4_gpps[] = { | |||
| 803 | }; | 810 | }; |
| 804 | 811 | ||
| 805 | static const struct intel_community cnllp_communities[] = { | 812 | static const struct intel_community cnllp_communities[] = { |
| 806 | CNL_COMMUNITY(0, 0, 67, cnllp_community0_gpps), | 813 | CNLLP_COMMUNITY(0, 0, 67, cnllp_community0_gpps), |
| 807 | CNL_COMMUNITY(1, 68, 180, cnllp_community1_gpps), | 814 | CNLLP_COMMUNITY(1, 68, 180, cnllp_community1_gpps), |
| 808 | CNL_COMMUNITY(2, 181, 243, cnllp_community4_gpps), | 815 | CNLLP_COMMUNITY(2, 181, 243, cnllp_community4_gpps), |
| 809 | }; | 816 | }; |
| 810 | 817 | ||
| 811 | static const struct intel_pinctrl_soc_data cnllp_soc_data = { | 818 | static const struct intel_pinctrl_soc_data cnllp_soc_data = { |
