diff options
Diffstat (limited to 'include/linux/sh_pfc.h')
-rw-r--r-- | include/linux/sh_pfc.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h index 8446789216e5..5c15aed9c4b2 100644 --- a/include/linux/sh_pfc.h +++ b/include/linux/sh_pfc.h | |||
@@ -45,16 +45,24 @@ struct pinmux_cfg_reg { | |||
45 | unsigned long reg, reg_width, field_width; | 45 | unsigned long reg, reg_width, field_width; |
46 | unsigned long *cnt; | 46 | unsigned long *cnt; |
47 | pinmux_enum_t *enum_ids; | 47 | pinmux_enum_t *enum_ids; |
48 | unsigned long *var_field_width; | ||
48 | }; | 49 | }; |
49 | 50 | ||
50 | #define PINMUX_CFG_REG(name, r, r_width, f_width) \ | 51 | #define PINMUX_CFG_REG(name, r, r_width, f_width) \ |
51 | .reg = r, .reg_width = r_width, .field_width = f_width, \ | 52 | .reg = r, .reg_width = r_width, .field_width = f_width, \ |
52 | .cnt = (unsigned long [r_width / f_width]) {}, \ | 53 | .cnt = (unsigned long [r_width / f_width]) {}, \ |
53 | .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \ | 54 | .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) |
55 | |||
56 | #define PINMUX_CFG_REG_VAR(name, r, r_width, var_fw0, var_fwn...) \ | ||
57 | .reg = r, .reg_width = r_width, \ | ||
58 | .cnt = (unsigned long [r_width]) {}, \ | ||
59 | .var_field_width = (unsigned long [r_width]) { var_fw0, var_fwn, 0 }, \ | ||
60 | .enum_ids = (pinmux_enum_t []) | ||
54 | 61 | ||
55 | struct pinmux_data_reg { | 62 | struct pinmux_data_reg { |
56 | unsigned long reg, reg_width, reg_shadow; | 63 | unsigned long reg, reg_width, reg_shadow; |
57 | pinmux_enum_t *enum_ids; | 64 | pinmux_enum_t *enum_ids; |
65 | void __iomem *mapped_reg; | ||
58 | }; | 66 | }; |
59 | 67 | ||
60 | #define PINMUX_DATA_REG(name, r, r_width) \ | 68 | #define PINMUX_DATA_REG(name, r, r_width) \ |
@@ -75,6 +83,12 @@ struct pinmux_range { | |||
75 | pinmux_enum_t force; | 83 | pinmux_enum_t force; |
76 | }; | 84 | }; |
77 | 85 | ||
86 | struct pfc_window { | ||
87 | phys_addr_t phys; | ||
88 | void __iomem *virt; | ||
89 | unsigned long size; | ||
90 | }; | ||
91 | |||
78 | struct pinmux_info { | 92 | struct pinmux_info { |
79 | char *name; | 93 | char *name; |
80 | pinmux_enum_t reserved_id; | 94 | pinmux_enum_t reserved_id; |
@@ -98,6 +112,12 @@ struct pinmux_info { | |||
98 | struct pinmux_irq *gpio_irq; | 112 | struct pinmux_irq *gpio_irq; |
99 | unsigned int gpio_irq_size; | 113 | unsigned int gpio_irq_size; |
100 | 114 | ||
115 | struct resource *resource; | ||
116 | unsigned int num_resources; | ||
117 | struct pfc_window *window; | ||
118 | |||
119 | unsigned long unlock_reg; | ||
120 | |||
101 | struct gpio_chip chip; | 121 | struct gpio_chip chip; |
102 | }; | 122 | }; |
103 | 123 | ||