Skip to content

Commit 0c02c80

Browse files
committed
of/irq: Rename of_irq_map_* functions to of_irq_parse_*
The OF irq handling code has been overloading the term 'map' to refer to both parsing the data in the device tree and mapping it to the internal linux irq system. This is probably because the device tree does have the concept of an 'interrupt-map' function for translating interrupt references from one node to another, but 'map' is still confusing when the primary purpose of some of the functions are to parse the DT data. This patch renames all the of_irq_map_* functions to of_irq_parse_* which makes it clear that there is a difference between the parsing phase and the mapping phase. Kernel code can make use of just the parsing or just the mapping support as needed by the subsystem. The patch was generated mechanically with a handful of sed commands. Signed-off-by: Grant Likely <grant.likely@linaro.org> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Tony Lindgren <tony@atomide.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent 4a43d68 commit 0c02c80

20 files changed

Lines changed: 42 additions & 42 deletions

File tree

‎arch/arm/mach-integrator/pci_v3.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,9 @@ static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin)
840840
struct of_irq oirq;
841841
int ret;
842842

843-
ret = of_irq_map_pci(dev, &oirq);
843+
ret = of_irq_parse_pci(dev, &oirq);
844844
if (ret) {
845-
dev_err(&dev->dev, "of_irq_map_pci() %d\n", ret);
845+
dev_err(&dev->dev, "of_irq_parse_pci() %d\n", ret);
846846
/* Proper return code 0 == NO_IRQ */
847847
return 0;
848848
}

‎arch/microblaze/pci/pci-common.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
217217
memset(&oirq, 0xff, sizeof(oirq));
218218
#endif
219219
/* Try to get a mapping from the device-tree */
220-
if (of_irq_map_pci(pci_dev, &oirq)) {
220+
if (of_irq_parse_pci(pci_dev, &oirq)) {
221221
u8 line, pin;
222222

223223
/* If that fails, lets fallback to what is in the config

‎arch/mips/pci/fixup-lantiq.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2828
struct of_irq dev_irq;
2929
int irq;
3030

31-
if (of_irq_map_pci(dev, &dev_irq)) {
31+
if (of_irq_parse_pci(dev, &dev_irq)) {
3232
dev_err(&dev->dev, "trying to map irq for unknown slot:%d pin:%d\n",
3333
slot, pin);
3434
return 0;

‎arch/mips/pci/pci-rt3883.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
587587
int err;
588588
int irq;
589589

590-
err = of_irq_map_pci(dev, &dev_irq);
590+
err = of_irq_parse_pci(dev, &dev_irq);
591591
if (err) {
592592
pr_err("pci %s: unable to get irq map, err=%d\n",
593593
pci_name((struct pci_dev *) dev), err);

‎arch/powerpc/kernel/pci-common.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
237237
memset(&oirq, 0xff, sizeof(oirq));
238238
#endif
239239
/* Try to get a mapping from the device-tree */
240-
if (of_irq_map_pci(pci_dev, &oirq)) {
240+
if (of_irq_parse_pci(pci_dev, &oirq)) {
241241
u8 line, pin;
242242

243243
/* If that fails, lets fallback to what is in the config

‎arch/powerpc/platforms/cell/celleb_scc_pciex.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static __init int celleb_setup_pciex(struct device_node *node,
507507
phb->ops = &scc_pciex_pci_ops;
508508

509509
/* internal interrupt handler */
510-
if (of_irq_map_one(node, 1, &oirq)) {
510+
if (of_irq_parse_one(node, 1, &oirq)) {
511511
pr_err("PCIEXC:Failed to map irq\n");
512512
goto error;
513513
}

‎arch/powerpc/platforms/cell/celleb_scc_sio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static int __init txx9_serial_init(void)
5353
if (!(txx9_serial_bitmap & (1<<i)))
5454
continue;
5555

56-
if (of_irq_map_one(node, i, &irq))
56+
if (of_irq_parse_one(node, i, &irq))
5757
continue;
5858
if (of_address_to_resource(node,
5959
txx9_scc_tab[i].index, &res))

‎arch/powerpc/platforms/cell/spider-pic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
236236
* tree in case the device-tree is ever fixed
237237
*/
238238
struct of_irq oirq;
239-
if (of_irq_map_one(pic->host->of_node, 0, &oirq) == 0) {
239+
if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) {
240240
virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
241241
oirq.size);
242242
return virq;

‎arch/powerpc/platforms/cell/spu_manage.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
182182
int i;
183183

184184
for (i=0; i < 3; i++) {
185-
ret = of_irq_map_one(np, i, &oirq);
185+
ret = of_irq_parse_one(np, i, &oirq);
186186
if (ret) {
187187
pr_debug("spu_new: failed to get irq %d\n", i);
188188
goto err;

‎arch/powerpc/platforms/fsl_uli1575.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static void hpcd_final_uli5288(struct pci_dev *dev)
333333

334334
laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8);
335335
laddr[1] = laddr[2] = 0;
336-
of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
336+
of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq);
337337
virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
338338
oirq.size);
339339
dev->irq = virq;

0 commit comments

Comments
 (0)