diff options
author | Antoine Tenart <antoine.tenart@free-electrons.com> | 2015-05-15 19:21:39 -0400 |
---|---|---|
committer | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2015-05-18 12:10:08 -0400 |
commit | f90bec209ca54d799e69fc30c1b04c14baab980a (patch) | |
tree | a9fba89dc1d39867ce31b1cc43177c5d6932377f /drivers/pinctrl/berlin | |
parent | 630c986b102a22740d789e552171ba897e7c143d (diff) |
pinctrl: berlin: drop SoC stub provided regmap
With convertsion to simple-mfd sub-nodes, drop the regmap registration
by SoC stubs.
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'drivers/pinctrl/berlin')
-rw-r--r-- | drivers/pinctrl/berlin/berlin-bg2.c | 30 | ||||
-rw-r--r-- | drivers/pinctrl/berlin/berlin-bg2cd.c | 30 | ||||
-rw-r--r-- | drivers/pinctrl/berlin/berlin-bg2q.c | 30 | ||||
-rw-r--r-- | drivers/pinctrl/berlin/berlin.c | 4 |
4 files changed, 1 insertions, 93 deletions
diff --git a/drivers/pinctrl/berlin/berlin-bg2.c b/drivers/pinctrl/berlin/berlin-bg2.c index 6931ce4b1e12..3769eaedf519 100644 --- a/drivers/pinctrl/berlin/berlin-bg2.c +++ b/drivers/pinctrl/berlin/berlin-bg2.c | |||
@@ -218,14 +218,6 @@ static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = { | |||
218 | 218 | ||
219 | static const struct of_device_id berlin2_pinctrl_match[] = { | 219 | static const struct of_device_id berlin2_pinctrl_match[] = { |
220 | { | 220 | { |
221 | .compatible = "marvell,berlin2-chip-ctrl", | ||
222 | .data = &berlin2_soc_pinctrl_data | ||
223 | }, | ||
224 | { | ||
225 | .compatible = "marvell,berlin2-system-ctrl", | ||
226 | .data = &berlin2_sysmgr_pinctrl_data | ||
227 | }, | ||
228 | { | ||
229 | .compatible = "marvell,berlin2-soc-pinctrl", | 221 | .compatible = "marvell,berlin2-soc-pinctrl", |
230 | .data = &berlin2_soc_pinctrl_data | 222 | .data = &berlin2_soc_pinctrl_data |
231 | }, | 223 | }, |
@@ -241,28 +233,6 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev) | |||
241 | { | 233 | { |
242 | const struct of_device_id *match = | 234 | const struct of_device_id *match = |
243 | of_match_device(berlin2_pinctrl_match, &pdev->dev); | 235 | of_match_device(berlin2_pinctrl_match, &pdev->dev); |
244 | struct regmap_config *rmconfig; | ||
245 | struct regmap *regmap; | ||
246 | struct resource *res; | ||
247 | void __iomem *base; | ||
248 | |||
249 | rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); | ||
250 | if (!rmconfig) | ||
251 | return -ENOMEM; | ||
252 | |||
253 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
254 | base = devm_ioremap_resource(&pdev->dev, res); | ||
255 | if (IS_ERR(base)) | ||
256 | return PTR_ERR(base); | ||
257 | |||
258 | rmconfig->reg_bits = 32, | ||
259 | rmconfig->val_bits = 32, | ||
260 | rmconfig->reg_stride = 4, | ||
261 | rmconfig->max_register = resource_size(res); | ||
262 | |||
263 | regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); | ||
264 | if (IS_ERR(regmap)) | ||
265 | return PTR_ERR(regmap); | ||
266 | 236 | ||
267 | return berlin_pinctrl_probe(pdev, match->data); | 237 | return berlin_pinctrl_probe(pdev, match->data); |
268 | } | 238 | } |
diff --git a/drivers/pinctrl/berlin/berlin-bg2cd.c b/drivers/pinctrl/berlin/berlin-bg2cd.c index 18e1af0e6b8c..9e11f191d643 100644 --- a/drivers/pinctrl/berlin/berlin-bg2cd.c +++ b/drivers/pinctrl/berlin/berlin-bg2cd.c | |||
@@ -161,14 +161,6 @@ static const struct berlin_pinctrl_desc berlin2cd_sysmgr_pinctrl_data = { | |||
161 | 161 | ||
162 | static const struct of_device_id berlin2cd_pinctrl_match[] = { | 162 | static const struct of_device_id berlin2cd_pinctrl_match[] = { |
163 | { | 163 | { |
164 | .compatible = "marvell,berlin2cd-chip-ctrl", | ||
165 | .data = &berlin2cd_soc_pinctrl_data | ||
166 | }, | ||
167 | { | ||
168 | .compatible = "marvell,berlin2cd-system-ctrl", | ||
169 | .data = &berlin2cd_sysmgr_pinctrl_data | ||
170 | }, | ||
171 | { | ||
172 | .compatible = "marvell,berlin2cd-soc-pinctrl", | 164 | .compatible = "marvell,berlin2cd-soc-pinctrl", |
173 | .data = &berlin2cd_soc_pinctrl_data | 165 | .data = &berlin2cd_soc_pinctrl_data |
174 | }, | 166 | }, |
@@ -184,28 +176,6 @@ static int berlin2cd_pinctrl_probe(struct platform_device *pdev) | |||
184 | { | 176 | { |
185 | const struct of_device_id *match = | 177 | const struct of_device_id *match = |
186 | of_match_device(berlin2cd_pinctrl_match, &pdev->dev); | 178 | of_match_device(berlin2cd_pinctrl_match, &pdev->dev); |
187 | struct regmap_config *rmconfig; | ||
188 | struct regmap *regmap; | ||
189 | struct resource *res; | ||
190 | void __iomem *base; | ||
191 | |||
192 | rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); | ||
193 | if (!rmconfig) | ||
194 | return -ENOMEM; | ||
195 | |||
196 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
197 | base = devm_ioremap_resource(&pdev->dev, res); | ||
198 | if (IS_ERR(base)) | ||
199 | return PTR_ERR(base); | ||
200 | |||
201 | rmconfig->reg_bits = 32, | ||
202 | rmconfig->val_bits = 32, | ||
203 | rmconfig->reg_stride = 4, | ||
204 | rmconfig->max_register = resource_size(res); | ||
205 | |||
206 | regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); | ||
207 | if (IS_ERR(regmap)) | ||
208 | return PTR_ERR(regmap); | ||
209 | 179 | ||
210 | return berlin_pinctrl_probe(pdev, match->data); | 180 | return berlin_pinctrl_probe(pdev, match->data); |
211 | } | 181 | } |
diff --git a/drivers/pinctrl/berlin/berlin-bg2q.c b/drivers/pinctrl/berlin/berlin-bg2q.c index 24e4cbb4d044..ba7a8a8ad010 100644 --- a/drivers/pinctrl/berlin/berlin-bg2q.c +++ b/drivers/pinctrl/berlin/berlin-bg2q.c | |||
@@ -380,14 +380,6 @@ static const struct berlin_pinctrl_desc berlin2q_sysmgr_pinctrl_data = { | |||
380 | 380 | ||
381 | static const struct of_device_id berlin2q_pinctrl_match[] = { | 381 | static const struct of_device_id berlin2q_pinctrl_match[] = { |
382 | { | 382 | { |
383 | .compatible = "marvell,berlin2q-chip-ctrl", | ||
384 | .data = &berlin2q_soc_pinctrl_data, | ||
385 | }, | ||
386 | { | ||
387 | .compatible = "marvell,berlin2q-system-ctrl", | ||
388 | .data = &berlin2q_sysmgr_pinctrl_data, | ||
389 | }, | ||
390 | { | ||
391 | .compatible = "marvell,berlin2q-soc-pinctrl", | 383 | .compatible = "marvell,berlin2q-soc-pinctrl", |
392 | .data = &berlin2q_soc_pinctrl_data, | 384 | .data = &berlin2q_soc_pinctrl_data, |
393 | }, | 385 | }, |
@@ -403,28 +395,6 @@ static int berlin2q_pinctrl_probe(struct platform_device *pdev) | |||
403 | { | 395 | { |
404 | const struct of_device_id *match = | 396 | const struct of_device_id *match = |
405 | of_match_device(berlin2q_pinctrl_match, &pdev->dev); | 397 | of_match_device(berlin2q_pinctrl_match, &pdev->dev); |
406 | struct regmap_config *rmconfig; | ||
407 | struct regmap *regmap; | ||
408 | struct resource *res; | ||
409 | void __iomem *base; | ||
410 | |||
411 | rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); | ||
412 | if (!rmconfig) | ||
413 | return -ENOMEM; | ||
414 | |||
415 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
416 | base = devm_ioremap_resource(&pdev->dev, res); | ||
417 | if (IS_ERR(base)) | ||
418 | return PTR_ERR(base); | ||
419 | |||
420 | rmconfig->reg_bits = 32, | ||
421 | rmconfig->val_bits = 32, | ||
422 | rmconfig->reg_stride = 4, | ||
423 | rmconfig->max_register = resource_size(res); | ||
424 | |||
425 | regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); | ||
426 | if (IS_ERR(regmap)) | ||
427 | return PTR_ERR(regmap); | ||
428 | 398 | ||
429 | return berlin_pinctrl_probe(pdev, match->data); | 399 | return berlin_pinctrl_probe(pdev, match->data); |
430 | } | 400 | } |
diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c index 28551123d04f..65b0e211b89e 100644 --- a/drivers/pinctrl/berlin/berlin.c +++ b/drivers/pinctrl/berlin/berlin.c | |||
@@ -301,9 +301,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev, | |||
301 | struct regmap *regmap; | 301 | struct regmap *regmap; |
302 | int ret; | 302 | int ret; |
303 | 303 | ||
304 | regmap = dev_get_regmap(&pdev->dev, NULL); | 304 | regmap = syscon_node_to_regmap(parent_np); |
305 | if (!regmap) | ||
306 | regmap = syscon_node_to_regmap(parent_np); | ||
307 | of_node_put(parent_np); | 305 | of_node_put(parent_np); |
308 | if (IS_ERR(regmap)) | 306 | if (IS_ERR(regmap)) |
309 | return PTR_ERR(regmap); | 307 | return PTR_ERR(regmap); |