diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-nomadik.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-nomadik.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index fec9c30133d4..01aea1c3b5fa 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c | |||
@@ -30,7 +30,20 @@ | |||
30 | #include <linux/pinctrl/pinconf.h> | 30 | #include <linux/pinctrl/pinconf.h> |
31 | /* Since we request GPIOs from ourself */ | 31 | /* Since we request GPIOs from ourself */ |
32 | #include <linux/pinctrl/consumer.h> | 32 | #include <linux/pinctrl/consumer.h> |
33 | /* | ||
34 | * For the U8500 archs, use the PRCMU register interface, for the older | ||
35 | * Nomadik, provide some stubs. The functions using these will only be | ||
36 | * called on the U8500 series. | ||
37 | */ | ||
38 | #ifdef CONFIG_ARCH_U8500 | ||
33 | #include <linux/mfd/dbx500-prcmu.h> | 39 | #include <linux/mfd/dbx500-prcmu.h> |
40 | #else | ||
41 | static inline u32 prcmu_read(unsigned int reg) { | ||
42 | return 0; | ||
43 | } | ||
44 | static inline void prcmu_write(unsigned int reg, u32 value) {} | ||
45 | static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {} | ||
46 | #endif | ||
34 | 47 | ||
35 | #include <asm/mach/irq.h> | 48 | #include <asm/mach/irq.h> |
36 | 49 | ||
@@ -1268,6 +1281,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) | |||
1268 | struct clk *clk; | 1281 | struct clk *clk; |
1269 | int secondary_irq; | 1282 | int secondary_irq; |
1270 | void __iomem *base; | 1283 | void __iomem *base; |
1284 | int irq_start = -1; | ||
1271 | int irq; | 1285 | int irq; |
1272 | int ret; | 1286 | int ret; |
1273 | 1287 | ||
@@ -1371,19 +1385,11 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) | |||
1371 | 1385 | ||
1372 | platform_set_drvdata(dev, nmk_chip); | 1386 | platform_set_drvdata(dev, nmk_chip); |
1373 | 1387 | ||
1374 | if (np) { | 1388 | if (!np) |
1375 | /* The DT case will just grab a set of IRQ numbers */ | ||
1376 | nmk_chip->domain = irq_domain_add_linear(np, NMK_GPIO_PER_CHIP, | ||
1377 | &nmk_gpio_irq_simple_ops, nmk_chip); | ||
1378 | } else { | ||
1379 | /* Non-DT legacy mode, use hardwired IRQ numbers */ | ||
1380 | int irq_start; | ||
1381 | |||
1382 | irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); | 1389 | irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); |
1383 | nmk_chip->domain = irq_domain_add_simple(NULL, | 1390 | nmk_chip->domain = irq_domain_add_simple(NULL, |
1384 | NMK_GPIO_PER_CHIP, irq_start, | 1391 | NMK_GPIO_PER_CHIP, irq_start, |
1385 | &nmk_gpio_irq_simple_ops, nmk_chip); | 1392 | &nmk_gpio_irq_simple_ops, nmk_chip); |
1386 | } | ||
1387 | if (!nmk_chip->domain) { | 1393 | if (!nmk_chip->domain) { |
1388 | dev_err(&dev->dev, "failed to create irqdomain\n"); | 1394 | dev_err(&dev->dev, "failed to create irqdomain\n"); |
1389 | ret = -ENOSYS; | 1395 | ret = -ENOSYS; |