|
15 | 15 | #define RCU_RST_STAT 0x0024
|
16 | 16 | #define RCU_RST_REQ 0x0048
|
17 | 17 |
|
18 |
| -#define REG_OFFSET GENMASK(31, 16) |
19 |
| -#define BIT_OFFSET GENMASK(15, 8) |
20 |
| -#define STAT_BIT_OFFSET GENMASK(7, 0) |
| 18 | +#define REG_OFFSET_MASK GENMASK(31, 16) |
| 19 | +#define BIT_OFFSET_MASK GENMASK(15, 8) |
| 20 | +#define STAT_BIT_OFFSET_MASK GENMASK(7, 0) |
21 | 21 |
|
22 | 22 | #define to_reset_data(x) container_of(x, struct intel_reset_data, rcdev)
|
23 | 23 |
|
@@ -51,11 +51,11 @@ static u32 id_to_reg_and_bit_offsets(struct intel_reset_data *data,
|
51 | 51 | unsigned long id, u32 *rst_req,
|
52 | 52 | u32 *req_bit, u32 *stat_bit)
|
53 | 53 | {
|
54 |
| - *rst_req = FIELD_GET(REG_OFFSET, id); |
55 |
| - *req_bit = FIELD_GET(BIT_OFFSET, id); |
| 54 | + *rst_req = FIELD_GET(REG_OFFSET_MASK, id); |
| 55 | + *req_bit = FIELD_GET(BIT_OFFSET_MASK, id); |
56 | 56 |
|
57 | 57 | if (data->soc_data->legacy)
|
58 |
| - *stat_bit = FIELD_GET(STAT_BIT_OFFSET, id); |
| 58 | + *stat_bit = FIELD_GET(STAT_BIT_OFFSET_MASK, id); |
59 | 59 | else
|
60 | 60 | *stat_bit = *req_bit;
|
61 | 61 |
|
@@ -141,14 +141,14 @@ static int intel_reset_xlate(struct reset_controller_dev *rcdev,
|
141 | 141 | if (spec->args[1] > 31)
|
142 | 142 | return -EINVAL;
|
143 | 143 |
|
144 |
| - id = FIELD_PREP(REG_OFFSET, spec->args[0]); |
145 |
| - id |= FIELD_PREP(BIT_OFFSET, spec->args[1]); |
| 144 | + id = FIELD_PREP(REG_OFFSET_MASK, spec->args[0]); |
| 145 | + id |= FIELD_PREP(BIT_OFFSET_MASK, spec->args[1]); |
146 | 146 |
|
147 | 147 | if (data->soc_data->legacy) {
|
148 | 148 | if (spec->args[2] > 31)
|
149 | 149 | return -EINVAL;
|
150 | 150 |
|
151 |
| - id |= FIELD_PREP(STAT_BIT_OFFSET, spec->args[2]); |
| 151 | + id |= FIELD_PREP(STAT_BIT_OFFSET_MASK, spec->args[2]); |
152 | 152 | }
|
153 | 153 |
|
154 | 154 | return id;
|
@@ -210,11 +210,11 @@ static int intel_reset_probe(struct platform_device *pdev)
|
210 | 210 | if (ret)
|
211 | 211 | return ret;
|
212 | 212 |
|
213 |
| - data->reboot_id = FIELD_PREP(REG_OFFSET, rb_id[0]); |
214 |
| - data->reboot_id |= FIELD_PREP(BIT_OFFSET, rb_id[1]); |
| 213 | + data->reboot_id = FIELD_PREP(REG_OFFSET_MASK, rb_id[0]); |
| 214 | + data->reboot_id |= FIELD_PREP(BIT_OFFSET_MASK, rb_id[1]); |
215 | 215 |
|
216 | 216 | if (data->soc_data->legacy)
|
217 |
| - data->reboot_id |= FIELD_PREP(STAT_BIT_OFFSET, rb_id[2]); |
| 217 | + data->reboot_id |= FIELD_PREP(STAT_BIT_OFFSET_MASK, rb_id[2]); |
218 | 218 |
|
219 | 219 | data->restart_nb.notifier_call = intel_reset_restart_handler;
|
220 | 220 | data->restart_nb.priority = 128;
|
|
0 commit comments