Skip to content

Commit e50d95e

Browse files
westerilinusw
authored andcommitted
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: a663ccf ("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>
1 parent b85bfa2 commit e50d95e

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

drivers/pinctrl/intel/pinctrl-cannonlake.c

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515

1616
#include "pinctrl-intel.h"
1717

18-
#define CNL_PAD_OWN 0x020
19-
#define CNL_PADCFGLOCK 0x080
20-
#define CNL_HOSTSW_OWN 0x0b0
21-
#define CNL_GPI_IE 0x120
18+
#define CNL_PAD_OWN 0x020
19+
#define CNL_PADCFGLOCK 0x080
20+
#define CNL_LP_HOSTSW_OWN 0x0b0
21+
#define CNL_H_HOSTSW_OWN 0x0c0
22+
#define CNL_GPI_IE 0x120
2223

2324
#define CNL_GPP(r, s, e, g) \
2425
{ \
@@ -30,19 +31,25 @@
3031

3132
#define CNL_NO_GPIO -1
3233

33-
#define CNL_COMMUNITY(b, s, e, g) \
34+
#define CNL_COMMUNITY(b, s, e, o, g) \
3435
{ \
3536
.barno = (b), \
3637
.padown_offset = CNL_PAD_OWN, \
3738
.padcfglock_offset = CNL_PADCFGLOCK, \
38-
.hostown_offset = CNL_HOSTSW_OWN, \
39+
.hostown_offset = (o), \
3940
.ie_offset = CNL_GPI_IE, \
4041
.pin_base = (s), \
4142
.npins = ((e) - (s) + 1), \
4243
.gpps = (g), \
4344
.ngpps = ARRAY_SIZE(g), \
4445
}
4546

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+
4653
/* Cannon Lake-H */
4754
static const struct pinctrl_pin_desc cnlh_pins[] = {
4855
/* GPP_A */
@@ -442,10 +449,10 @@ static const struct intel_function cnlh_functions[] = {
442449
};
443450

444451
static const struct intel_community cnlh_communities[] = {
445-
CNL_COMMUNITY(0, 0, 50, cnlh_community0_gpps),
446-
CNL_COMMUNITY(1, 51, 154, cnlh_community1_gpps),
447-
CNL_COMMUNITY(2, 155, 248, cnlh_community3_gpps),
448-
CNL_COMMUNITY(3, 249, 298, cnlh_community4_gpps),
452+
CNLH_COMMUNITY(0, 0, 50, cnlh_community0_gpps),
453+
CNLH_COMMUNITY(1, 51, 154, cnlh_community1_gpps),
454+
CNLH_COMMUNITY(2, 155, 248, cnlh_community3_gpps),
455+
CNLH_COMMUNITY(3, 249, 298, cnlh_community4_gpps),
449456
};
450457

451458
static const struct intel_pinctrl_soc_data cnlh_soc_data = {
@@ -803,9 +810,9 @@ static const struct intel_padgroup cnllp_community4_gpps[] = {
803810
};
804811

805812
static const struct intel_community cnllp_communities[] = {
806-
CNL_COMMUNITY(0, 0, 67, cnllp_community0_gpps),
807-
CNL_COMMUNITY(1, 68, 180, cnllp_community1_gpps),
808-
CNL_COMMUNITY(2, 181, 243, cnllp_community4_gpps),
813+
CNLLP_COMMUNITY(0, 0, 67, cnllp_community0_gpps),
814+
CNLLP_COMMUNITY(1, 68, 180, cnllp_community1_gpps),
815+
CNLLP_COMMUNITY(2, 181, 243, cnllp_community4_gpps),
809816
};
810817

811818
static const struct intel_pinctrl_soc_data cnllp_soc_data = {

0 commit comments

Comments
 (0)