Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
irqdomain.c
Go to the documentation of this file.
1 #define pr_fmt(fmt) "irq: " fmt
2 
3 #include <linux/debugfs.h>
4 #include <linux/hardirq.h>
5 #include <linux/interrupt.h>
6 #include <linux/irq.h>
7 #include <linux/irqdesc.h>
8 #include <linux/irqdomain.h>
9 #include <linux/module.h>
10 #include <linux/mutex.h>
11 #include <linux/of.h>
12 #include <linux/of_address.h>
13 #include <linux/topology.h>
14 #include <linux/seq_file.h>
15 #include <linux/slab.h>
16 #include <linux/smp.h>
17 #include <linux/fs.h>
18 
19 #define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
20  * ie. legacy 8259, gets irqs 1..15 */
21 #define IRQ_DOMAIN_MAP_NOMAP 1 /* no fast reverse mapping */
22 #define IRQ_DOMAIN_MAP_LINEAR 2 /* linear map of interrupts */
23 #define IRQ_DOMAIN_MAP_TREE 3 /* radix tree */
24 
25 static LIST_HEAD(irq_domain_list);
26 static DEFINE_MUTEX(irq_domain_mutex);
27 
28 static DEFINE_MUTEX(revmap_trees_mutex);
29 static struct irq_domain *irq_default_domain;
30 
42 static struct irq_domain *irq_domain_alloc(struct device_node *of_node,
43  unsigned int revmap_type,
44  const struct irq_domain_ops *ops,
45  void *host_data)
46 {
47  struct irq_domain *domain;
48 
49  domain = kzalloc_node(sizeof(*domain), GFP_KERNEL,
50  of_node_to_nid(of_node));
51  if (WARN_ON(!domain))
52  return NULL;
53 
54  /* Fill structure */
55  domain->revmap_type = revmap_type;
56  domain->ops = ops;
57  domain->host_data = host_data;
58  domain->of_node = of_node_get(of_node);
59 
60  return domain;
61 }
62 
63 static void irq_domain_free(struct irq_domain *domain)
64 {
65  of_node_put(domain->of_node);
66  kfree(domain);
67 }
68 
69 static void irq_domain_add(struct irq_domain *domain)
70 {
71  mutex_lock(&irq_domain_mutex);
72  list_add(&domain->link, &irq_domain_list);
73  mutex_unlock(&irq_domain_mutex);
74  pr_debug("Allocated domain of type %d @0x%p\n",
75  domain->revmap_type, domain);
76 }
77 
86 void irq_domain_remove(struct irq_domain *domain)
87 {
88  mutex_lock(&irq_domain_mutex);
89 
90  switch (domain->revmap_type) {
92  /*
93  * Legacy domains don't manage their own irq_desc
94  * allocations, we expect the caller to handle irq_desc
95  * freeing on their own.
96  */
97  break;
99  /*
100  * radix_tree_delete() takes care of destroying the root
101  * node when all entries are removed. Shout if there are
102  * any mappings left.
103  */
104  WARN_ON(domain->revmap_data.tree.height);
105  break;
107  kfree(domain->revmap_data.linear.revmap);
108  domain->revmap_data.linear.size = 0;
109  break;
111  break;
112  }
113 
114  list_del(&domain->link);
115 
116  /*
117  * If the going away domain is the default one, reset it.
118  */
119  if (unlikely(irq_default_domain == domain))
121 
122  mutex_unlock(&irq_domain_mutex);
123 
124  pr_debug("Removed domain of type %d @0x%p\n",
125  domain->revmap_type, domain);
126 
127  irq_domain_free(domain);
128 }
130 
131 static unsigned int irq_domain_legacy_revmap(struct irq_domain *domain,
132  irq_hw_number_t hwirq)
133 {
134  irq_hw_number_t first_hwirq = domain->revmap_data.legacy.first_hwirq;
135  int size = domain->revmap_data.legacy.size;
136 
137  if (WARN_ON(hwirq < first_hwirq || hwirq >= first_hwirq + size))
138  return 0;
139  return hwirq - first_hwirq + domain->revmap_data.legacy.first_irq;
140 }
141 
160 struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
161  unsigned int size,
162  unsigned int first_irq,
163  const struct irq_domain_ops *ops,
164  void *host_data)
165 {
166  if (first_irq > 0) {
167  int irq_base;
168 
169  if (IS_ENABLED(CONFIG_SPARSE_IRQ)) {
170  /*
171  * Set the descriptor allocator to search for a
172  * 1-to-1 mapping, such as irq_alloc_desc_at().
173  * Use of_node_to_nid() which is defined to
174  * numa_node_id() on platforms that have no custom
175  * implementation.
176  */
177  irq_base = irq_alloc_descs(first_irq, first_irq, size,
178  of_node_to_nid(of_node));
179  if (irq_base < 0) {
180  WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
181  first_irq);
182  irq_base = first_irq;
183  }
184  } else
185  irq_base = first_irq;
186 
187  return irq_domain_add_legacy(of_node, size, irq_base, 0,
188  ops, host_data);
189  }
190 
191  /* A linear domain is the default */
192  return irq_domain_add_linear(of_node, size, ops, host_data);
193 }
194 
210 struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
211  unsigned int size,
212  unsigned int first_irq,
213  irq_hw_number_t first_hwirq,
214  const struct irq_domain_ops *ops,
215  void *host_data)
216 {
217  struct irq_domain *domain;
218  unsigned int i;
219 
220  domain = irq_domain_alloc(of_node, IRQ_DOMAIN_MAP_LEGACY, ops, host_data);
221  if (!domain)
222  return NULL;
223 
224  domain->revmap_data.legacy.first_irq = first_irq;
225  domain->revmap_data.legacy.first_hwirq = first_hwirq;
226  domain->revmap_data.legacy.size = size;
227 
228  mutex_lock(&irq_domain_mutex);
229  /* Verify that all the irqs are available */
230  for (i = 0; i < size; i++) {
231  int irq = first_irq + i;
232  struct irq_data *irq_data = irq_get_irq_data(irq);
233 
234  if (WARN_ON(!irq_data || irq_data->domain)) {
235  mutex_unlock(&irq_domain_mutex);
236  irq_domain_free(domain);
237  return NULL;
238  }
239  }
240 
241  /* Claim all of the irqs before registering a legacy domain */
242  for (i = 0; i < size; i++) {
243  struct irq_data *irq_data = irq_get_irq_data(first_irq + i);
244  irq_data->hwirq = first_hwirq + i;
245  irq_data->domain = domain;
246  }
247  mutex_unlock(&irq_domain_mutex);
248 
249  for (i = 0; i < size; i++) {
250  int irq = first_irq + i;
251  int hwirq = first_hwirq + i;
252 
253  /* IRQ0 gets ignored */
254  if (!irq)
255  continue;
256 
257  /* Legacy flags are left to default at this point,
258  * one can then use irq_create_mapping() to
259  * explicitly change them
260  */
261  if (ops->map)
262  ops->map(domain, irq, hwirq);
263 
264  /* Clear norequest flags */
265  irq_clear_status_flags(irq, IRQ_NOREQUEST);
266  }
267 
268  irq_domain_add(domain);
269  return domain;
270 }
272 
280 struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
281  unsigned int size,
282  const struct irq_domain_ops *ops,
283  void *host_data)
284 {
285  struct irq_domain *domain;
286  unsigned int *revmap;
287 
288  revmap = kzalloc_node(sizeof(*revmap) * size, GFP_KERNEL,
289  of_node_to_nid(of_node));
290  if (WARN_ON(!revmap))
291  return NULL;
292 
293  domain = irq_domain_alloc(of_node, IRQ_DOMAIN_MAP_LINEAR, ops, host_data);
294  if (!domain) {
295  kfree(revmap);
296  return NULL;
297  }
298  domain->revmap_data.linear.size = size;
299  domain->revmap_data.linear.revmap = revmap;
300  irq_domain_add(domain);
301  return domain;
302 }
305 struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
306  unsigned int max_irq,
307  const struct irq_domain_ops *ops,
308  void *host_data)
309 {
310  struct irq_domain *domain = irq_domain_alloc(of_node,
311  IRQ_DOMAIN_MAP_NOMAP, ops, host_data);
312  if (domain) {
313  domain->revmap_data.nomap.max_irq = max_irq ? max_irq : ~0;
314  irq_domain_add(domain);
315  }
316  return domain;
317 }
319 
328 struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
329  const struct irq_domain_ops *ops,
330  void *host_data)
331 {
332  struct irq_domain *domain = irq_domain_alloc(of_node,
333  IRQ_DOMAIN_MAP_TREE, ops, host_data);
334  if (domain) {
336  irq_domain_add(domain);
337  }
338  return domain;
339 }
341 
346 struct irq_domain *irq_find_host(struct device_node *node)
347 {
348  struct irq_domain *h, *found = NULL;
349  int rc;
350 
351  /* We might want to match the legacy controller last since
352  * it might potentially be set to match all interrupts in
353  * the absence of a device node. This isn't a problem so far
354  * yet though...
355  */
356  mutex_lock(&irq_domain_mutex);
357  list_for_each_entry(h, &irq_domain_list, link) {
358  if (h->ops->match)
359  rc = h->ops->match(h, node);
360  else
361  rc = (h->of_node != NULL) && (h->of_node == node);
362 
363  if (rc) {
364  found = h;
365  break;
366  }
367  }
368  mutex_unlock(&irq_domain_mutex);
369  return found;
370 }
372 
382 void irq_set_default_host(struct irq_domain *domain)
383 {
384  pr_debug("Default domain set to @0x%p\n", domain);
385 
386  irq_default_domain = domain;
387 }
389 
390 static void irq_domain_disassociate_many(struct irq_domain *domain,
391  unsigned int irq_base, int count)
392 {
393  /*
394  * disassociate in reverse order;
395  * not strictly necessary, but nice for unwinding
396  */
397  while (count--) {
398  int irq = irq_base + count;
399  struct irq_data *irq_data = irq_get_irq_data(irq);
400  irq_hw_number_t hwirq = irq_data->hwirq;
401 
402  if (WARN_ON(!irq_data || irq_data->domain != domain))
403  continue;
404 
405  irq_set_status_flags(irq, IRQ_NOREQUEST);
406 
407  /* remove chip and handler */
408  irq_set_chip_and_handler(irq, NULL, NULL);
409 
410  /* Make sure it's completed */
411  synchronize_irq(irq);
412 
413  /* Tell the PIC about it */
414  if (domain->ops->unmap)
415  domain->ops->unmap(domain, irq);
416  smp_mb();
417 
418  irq_data->domain = NULL;
419  irq_data->hwirq = 0;
420 
421  /* Clear reverse map */
422  switch(domain->revmap_type) {
424  if (hwirq < domain->revmap_data.linear.size)
425  domain->revmap_data.linear.revmap[hwirq] = 0;
426  break;
427  case IRQ_DOMAIN_MAP_TREE:
428  mutex_lock(&revmap_trees_mutex);
429  radix_tree_delete(&domain->revmap_data.tree, hwirq);
430  mutex_unlock(&revmap_trees_mutex);
431  break;
432  }
433  }
434 }
436 int irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base,
437  irq_hw_number_t hwirq_base, int count)
438 {
439  unsigned int virq = irq_base;
440  irq_hw_number_t hwirq = hwirq_base;
441  int i, ret;
442 
443  pr_debug("%s(%s, irqbase=%i, hwbase=%i, count=%i)\n", __func__,
444  of_node_full_name(domain->of_node), irq_base, (int)hwirq_base, count);
445 
446  for (i = 0; i < count; i++) {
447  struct irq_data *irq_data = irq_get_irq_data(virq + i);
448 
449  if (WARN(!irq_data, "error: irq_desc not allocated; "
450  "irq=%i hwirq=0x%x\n", virq + i, (int)hwirq + i))
451  return -EINVAL;
452  if (WARN(irq_data->domain, "error: irq_desc already associated; "
453  "irq=%i hwirq=0x%x\n", virq + i, (int)hwirq + i))
454  return -EINVAL;
455  };
456 
457  for (i = 0; i < count; i++, virq++, hwirq++) {
458  struct irq_data *irq_data = irq_get_irq_data(virq);
459 
460  irq_data->hwirq = hwirq;
461  irq_data->domain = domain;
462  if (domain->ops->map) {
463  ret = domain->ops->map(domain, virq, hwirq);
464  if (ret != 0) {
465  pr_err("irq-%i==>hwirq-0x%lx mapping failed: %d\n",
466  virq, hwirq, ret);
467  WARN_ON(1);
468  irq_data->domain = NULL;
469  irq_data->hwirq = 0;
470  goto err_unmap;
471  }
472  }
473 
474  switch (domain->revmap_type) {
476  if (hwirq < domain->revmap_data.linear.size)
477  domain->revmap_data.linear.revmap[hwirq] = virq;
478  break;
479  case IRQ_DOMAIN_MAP_TREE:
480  mutex_lock(&revmap_trees_mutex);
481  radix_tree_insert(&domain->revmap_data.tree, hwirq, irq_data);
482  mutex_unlock(&revmap_trees_mutex);
483  break;
484  }
485 
486  irq_clear_status_flags(virq, IRQ_NOREQUEST);
487  }
488 
489  return 0;
490 
491  err_unmap:
492  irq_domain_disassociate_many(domain, irq_base, i);
493  return -EINVAL;
494 }
496 
505 unsigned int irq_create_direct_mapping(struct irq_domain *domain)
506 {
507  unsigned int virq;
508 
509  if (domain == NULL)
510  domain = irq_default_domain;
511 
512  if (WARN_ON(!domain || domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP))
513  return 0;
514 
515  virq = irq_alloc_desc_from(1, of_node_to_nid(domain->of_node));
516  if (!virq) {
517  pr_debug("create_direct virq allocation failed\n");
518  return 0;
519  }
520  if (virq >= domain->revmap_data.nomap.max_irq) {
521  pr_err("ERROR: no free irqs available below %i maximum\n",
522  domain->revmap_data.nomap.max_irq);
523  irq_free_desc(virq);
524  return 0;
525  }
526  pr_debug("create_direct obtained virq %d\n", virq);
527 
528  if (irq_domain_associate(domain, virq, virq)) {
529  irq_free_desc(virq);
530  return 0;
531  }
532 
533  return virq;
534 }
536 
547 unsigned int irq_create_mapping(struct irq_domain *domain,
548  irq_hw_number_t hwirq)
549 {
550  unsigned int hint;
551  int virq;
552 
553  pr_debug("irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq);
554 
555  /* Look for default domain if nececssary */
556  if (domain == NULL)
557  domain = irq_default_domain;
558  if (domain == NULL) {
559  pr_warning("irq_create_mapping called for"
560  " NULL domain, hwirq=%lx\n", hwirq);
561  WARN_ON(1);
562  return 0;
563  }
564  pr_debug("-> using domain @%p\n", domain);
565 
566  /* Check if mapping already exists */
567  virq = irq_find_mapping(domain, hwirq);
568  if (virq) {
569  pr_debug("-> existing mapping on virq %d\n", virq);
570  return virq;
571  }
572 
573  /* Get a virtual interrupt number */
574  if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
575  return irq_domain_legacy_revmap(domain, hwirq);
576 
577  /* Allocate a virtual interrupt number */
578  hint = hwirq % nr_irqs;
579  if (hint == 0)
580  hint++;
581  virq = irq_alloc_desc_from(hint, of_node_to_nid(domain->of_node));
582  if (virq <= 0)
583  virq = irq_alloc_desc_from(1, of_node_to_nid(domain->of_node));
584  if (virq <= 0) {
585  pr_debug("-> virq allocation failed\n");
586  return 0;
587  }
588 
589  if (irq_domain_associate(domain, virq, hwirq)) {
590  irq_free_desc(virq);
591  return 0;
592  }
593 
594  pr_debug("irq %lu on domain %s mapped to virtual irq %u\n",
595  hwirq, of_node_full_name(domain->of_node), virq);
596 
597  return virq;
598 }
600 
619 int irq_create_strict_mappings(struct irq_domain *domain, unsigned int irq_base,
620  irq_hw_number_t hwirq_base, int count)
621 {
622  int ret;
623 
624  ret = irq_alloc_descs(irq_base, irq_base, count,
625  of_node_to_nid(domain->of_node));
626  if (unlikely(ret < 0))
627  return ret;
628 
629  ret = irq_domain_associate_many(domain, irq_base, hwirq_base, count);
630  if (unlikely(ret < 0)) {
631  irq_free_descs(irq_base, count);
632  return ret;
633  }
634 
635  return 0;
636 }
639 unsigned int irq_create_of_mapping(struct device_node *controller,
640  const u32 *intspec, unsigned int intsize)
641 {
642  struct irq_domain *domain;
643  irq_hw_number_t hwirq;
644  unsigned int type = IRQ_TYPE_NONE;
645  unsigned int virq;
646 
647  domain = controller ? irq_find_host(controller) : irq_default_domain;
648  if (!domain) {
649 #ifdef CONFIG_MIPS
650  /*
651  * Workaround to avoid breaking interrupt controller drivers
652  * that don't yet register an irq_domain. This is temporary
653  * code. ~~~gcl, Feb 24, 2012
654  *
655  * Scheduled for removal in Linux v3.6. That should be enough
656  * time.
657  */
658  if (intsize > 0)
659  return intspec[0];
660 #endif
661  pr_warning("no irq domain found for %s !\n",
662  of_node_full_name(controller));
663  return 0;
664  }
665 
666  /* If domain has no translation, then we assume interrupt line */
667  if (domain->ops->xlate == NULL)
668  hwirq = intspec[0];
669  else {
670  if (domain->ops->xlate(domain, controller, intspec, intsize,
671  &hwirq, &type))
672  return 0;
673  }
674 
675  /* Create mapping */
676  virq = irq_create_mapping(domain, hwirq);
677  if (!virq)
678  return virq;
679 
680  /* Set type if specified and different than the current one */
681  if (type != IRQ_TYPE_NONE &&
682  type != (irqd_get_trigger_type(irq_get_irq_data(virq))))
683  irq_set_irq_type(virq, type);
684  return virq;
685 }
687 
692 void irq_dispose_mapping(unsigned int virq)
693 {
694  struct irq_data *irq_data = irq_get_irq_data(virq);
695  struct irq_domain *domain;
696 
697  if (!virq || !irq_data)
698  return;
699 
700  domain = irq_data->domain;
701  if (WARN_ON(domain == NULL))
702  return;
703 
704  /* Never unmap legacy interrupts */
705  if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
706  return;
707 
708  irq_domain_disassociate_many(domain, virq, 1);
709  irq_free_desc(virq);
710 }
712 
718 unsigned int irq_find_mapping(struct irq_domain *domain,
719  irq_hw_number_t hwirq)
720 {
721  struct irq_data *data;
722 
723  /* Look for default domain if nececssary */
724  if (domain == NULL)
725  domain = irq_default_domain;
726  if (domain == NULL)
727  return 0;
728 
729  switch (domain->revmap_type) {
731  return irq_domain_legacy_revmap(domain, hwirq);
733  return irq_linear_revmap(domain, hwirq);
734  case IRQ_DOMAIN_MAP_TREE:
735  rcu_read_lock();
736  data = radix_tree_lookup(&domain->revmap_data.tree, hwirq);
737  rcu_read_unlock();
738  if (data)
739  return data->irq;
740  break;
742  data = irq_get_irq_data(hwirq);
743  if (data && (data->domain == domain) && (data->hwirq == hwirq))
744  return hwirq;
745  break;
746  }
747 
748  return 0;
749 }
751 
760 unsigned int irq_linear_revmap(struct irq_domain *domain,
761  irq_hw_number_t hwirq)
762 {
764 
765  /* Check revmap bounds; complain if exceeded */
766  if (WARN_ON(hwirq >= domain->revmap_data.linear.size))
767  return 0;
768 
769  return domain->revmap_data.linear.revmap[hwirq];
770 }
772 
773 #ifdef CONFIG_IRQ_DOMAIN_DEBUG
774 static int virq_debug_show(struct seq_file *m, void *private)
775 {
776  unsigned long flags;
777  struct irq_desc *desc;
778  const char *p;
779  static const char none[] = "none";
780  void *data;
781  int i;
782 
783  seq_printf(m, "%-5s %-7s %-15s %-*s %s\n", "irq", "hwirq",
784  "chip name", (int)(2 * sizeof(void *) + 2), "chip data",
785  "domain name");
786 
787  for (i = 1; i < nr_irqs; i++) {
788  desc = irq_to_desc(i);
789  if (!desc)
790  continue;
791 
792  raw_spin_lock_irqsave(&desc->lock, flags);
793 
794  if (desc->action && desc->action->handler) {
795  struct irq_chip *chip;
796 
797  seq_printf(m, "%5d ", i);
798  seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
799 
800  chip = irq_desc_get_chip(desc);
801  if (chip && chip->name)
802  p = chip->name;
803  else
804  p = none;
805  seq_printf(m, "%-15s ", p);
806 
807  data = irq_desc_get_chip_data(desc);
808  seq_printf(m, data ? "0x%p " : " %p ", data);
809 
810  if (desc->irq_data.domain)
811  p = of_node_full_name(desc->irq_data.domain->of_node);
812  else
813  p = none;
814  seq_printf(m, "%s\n", p);
815  }
816 
817  raw_spin_unlock_irqrestore(&desc->lock, flags);
818  }
819 
820  return 0;
821 }
822 
823 static int virq_debug_open(struct inode *inode, struct file *file)
824 {
825  return single_open(file, virq_debug_show, inode->i_private);
826 }
827 
828 static const struct file_operations virq_debug_fops = {
829  .open = virq_debug_open,
830  .read = seq_read,
831  .llseek = seq_lseek,
832  .release = single_release,
833 };
834 
835 static int __init irq_debugfs_init(void)
836 {
837  if (debugfs_create_file("irq_domain_mapping", S_IRUGO, NULL,
838  NULL, &virq_debug_fops) == NULL)
839  return -ENOMEM;
840 
841  return 0;
842 }
843 __initcall(irq_debugfs_init);
844 #endif /* CONFIG_IRQ_DOMAIN_DEBUG */
845 
852 int irq_domain_xlate_onecell(struct irq_domain *d, struct device_node *ctrlr,
853  const u32 *intspec, unsigned int intsize,
854  unsigned long *out_hwirq, unsigned int *out_type)
855 {
856  if (WARN_ON(intsize < 1))
857  return -EINVAL;
858  *out_hwirq = intspec[0];
859  *out_type = IRQ_TYPE_NONE;
860  return 0;
861 }
863 
871 int irq_domain_xlate_twocell(struct irq_domain *d, struct device_node *ctrlr,
872  const u32 *intspec, unsigned int intsize,
873  irq_hw_number_t *out_hwirq, unsigned int *out_type)
874 {
875  if (WARN_ON(intsize < 2))
876  return -EINVAL;
877  *out_hwirq = intspec[0];
878  *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
879  return 0;
880 }
882 
895  struct device_node *ctrlr,
896  const u32 *intspec, unsigned int intsize,
897  unsigned long *out_hwirq, unsigned int *out_type)
898 {
899  if (WARN_ON(intsize < 1))
900  return -EINVAL;
901  *out_hwirq = intspec[0];
902  *out_type = (intsize > 1) ? intspec[1] : IRQ_TYPE_NONE;
903  return 0;
904 }
907 const struct irq_domain_ops irq_domain_simple_ops = {
909 };
910 EXPORT_SYMBOL_GPL(irq_domain_simple_ops);
911 
912 #ifdef CONFIG_OF_IRQ
913 void irq_domain_generate_simple(const struct of_device_id *match,
914  u64 phys_base, unsigned int irq_start)
915 {
916  struct device_node *node;
917  pr_debug("looking for phys_base=%llx, irq_start=%i\n",
918  (unsigned long long) phys_base, (int) irq_start);
919  node = of_find_matching_node_by_address(NULL, match, phys_base);
920  if (node)
921  irq_domain_add_legacy(node, 32, irq_start, 0,
922  &irq_domain_simple_ops, NULL);
923 }
924 EXPORT_SYMBOL_GPL(irq_domain_generate_simple);
925 #endif