Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Simon Glass | e76187a | 2016-01-19 21:32:25 -0700 | [diff] [blame] | 8 | #include <dm.h> |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 9 | #include <errno.h> |
| 10 | #include <fdtdec.h> |
| 11 | #include <malloc.h> |
| 12 | #include <asm/io.h> |
| 13 | #include <asm/irq.h> |
| 14 | #include <asm/pci.h> |
| 15 | #include <asm/pirq_routing.h> |
Bin Meng | 10d569e | 2016-05-11 07:44:57 -0700 | [diff] [blame] | 16 | #include <asm/tables.h> |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 17 | |
| 18 | DECLARE_GLOBAL_DATA_PTR; |
| 19 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 20 | bool pirq_check_irq_routed(struct udevice *dev, int link, u8 irq) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 21 | { |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 22 | struct irq_router *priv = dev_get_priv(dev); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 23 | u8 pirq; |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 24 | int base = priv->link_base; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 25 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 26 | if (priv->config == PIRQ_VIA_PCI) |
Bin Meng | 248c4fa | 2016-02-01 01:40:52 -0800 | [diff] [blame] | 27 | dm_pci_read_config8(dev->parent, LINK_N2V(link, base), &pirq); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 28 | else |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 29 | pirq = readb(priv->ibase + LINK_N2V(link, base)); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 30 | |
| 31 | pirq &= 0xf; |
| 32 | |
| 33 | /* IRQ# 0/1/2/8/13 are reserved */ |
| 34 | if (pirq < 3 || pirq == 8 || pirq == 13) |
| 35 | return false; |
| 36 | |
| 37 | return pirq == irq ? true : false; |
| 38 | } |
| 39 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 40 | int pirq_translate_link(struct udevice *dev, int link) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 41 | { |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 42 | struct irq_router *priv = dev_get_priv(dev); |
| 43 | |
| 44 | return LINK_V2N(link, priv->link_base); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 45 | } |
| 46 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 47 | void pirq_assign_irq(struct udevice *dev, int link, u8 irq) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 48 | { |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 49 | struct irq_router *priv = dev_get_priv(dev); |
| 50 | int base = priv->link_base; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 51 | |
| 52 | /* IRQ# 0/1/2/8/13 are reserved */ |
| 53 | if (irq < 3 || irq == 8 || irq == 13) |
| 54 | return; |
| 55 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 56 | if (priv->config == PIRQ_VIA_PCI) |
Bin Meng | 248c4fa | 2016-02-01 01:40:52 -0800 | [diff] [blame] | 57 | dm_pci_write_config8(dev->parent, LINK_N2V(link, base), irq); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 58 | else |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 59 | writeb(irq, priv->ibase + LINK_N2V(link, base)); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 60 | } |
| 61 | |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 62 | static struct irq_info *check_dup_entry(struct irq_info *slot_base, |
| 63 | int entry_num, int bus, int device) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 64 | { |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 65 | struct irq_info *slot = slot_base; |
| 66 | int i; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 67 | |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 68 | for (i = 0; i < entry_num; i++) { |
| 69 | if (slot->bus == bus && slot->devfn == (device << 3)) |
| 70 | break; |
| 71 | slot++; |
| 72 | } |
| 73 | |
| 74 | return (i == entry_num) ? NULL : slot; |
| 75 | } |
| 76 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 77 | static inline void fill_irq_info(struct irq_router *priv, struct irq_info *slot, |
| 78 | int bus, int device, int pin, int pirq) |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 79 | { |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 80 | slot->bus = bus; |
Bin Meng | 8c38e4d | 2015-06-23 12:18:46 +0800 | [diff] [blame] | 81 | slot->devfn = (device << 3) | 0; |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 82 | slot->irq[pin - 1].link = LINK_N2V(pirq, priv->link_base); |
| 83 | slot->irq[pin - 1].bitmap = priv->irq_mask; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 84 | } |
| 85 | |
Simon Glass | b565d66 | 2016-01-19 21:32:28 -0700 | [diff] [blame] | 86 | static int create_pirq_routing_table(struct udevice *dev) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 87 | { |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 88 | struct irq_router *priv = dev_get_priv(dev); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 89 | const void *blob = gd->fdt_blob; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 90 | int node; |
| 91 | int len, count; |
| 92 | const u32 *cell; |
| 93 | struct irq_routing_table *rt; |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 94 | struct irq_info *slot, *slot_base; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 95 | int irq_entries = 0; |
| 96 | int i; |
| 97 | int ret; |
| 98 | |
Simon Glass | b565d66 | 2016-01-19 21:32:28 -0700 | [diff] [blame] | 99 | node = dev->of_offset; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 100 | |
| 101 | /* extract the bdf from fdt_pci_addr */ |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 102 | priv->bdf = dm_pci_get_bdf(dev->parent); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 103 | |
Simon Glass | b02e404 | 2016-10-02 17:59:28 -0600 | [diff] [blame] | 104 | ret = fdt_stringlist_search(blob, node, "intel,pirq-config", "pci"); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 105 | if (!ret) { |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 106 | priv->config = PIRQ_VIA_PCI; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 107 | } else { |
Simon Glass | b02e404 | 2016-10-02 17:59:28 -0600 | [diff] [blame] | 108 | ret = fdt_stringlist_search(blob, node, "intel,pirq-config", |
| 109 | "ibase"); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 110 | if (!ret) |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 111 | priv->config = PIRQ_VIA_IBASE; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 112 | else |
| 113 | return -EINVAL; |
| 114 | } |
| 115 | |
Simon Glass | 9e3ff9c | 2015-08-10 07:05:06 -0600 | [diff] [blame] | 116 | ret = fdtdec_get_int(blob, node, "intel,pirq-link", -1); |
| 117 | if (ret == -1) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 118 | return ret; |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 119 | priv->link_base = ret; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 120 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 121 | priv->irq_mask = fdtdec_get_int(blob, node, |
| 122 | "intel,pirq-mask", PIRQ_BITMAP); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 123 | |
Bin Meng | 07ac84e | 2016-05-07 07:46:13 -0700 | [diff] [blame] | 124 | if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) { |
| 125 | /* Reserve IRQ9 for SCI */ |
| 126 | priv->irq_mask &= ~(1 << 9); |
| 127 | } |
| 128 | |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 129 | if (priv->config == PIRQ_VIA_IBASE) { |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 130 | int ibase_off; |
| 131 | |
| 132 | ibase_off = fdtdec_get_int(blob, node, "intel,ibase-offset", 0); |
| 133 | if (!ibase_off) |
| 134 | return -EINVAL; |
| 135 | |
| 136 | /* |
| 137 | * Here we assume that the IBASE register has already been |
| 138 | * properly configured by U-Boot before. |
| 139 | * |
| 140 | * By 'valid' we mean: |
| 141 | * 1) a valid memory space carved within system memory space |
| 142 | * assigned to IBASE register block. |
| 143 | * 2) memory range decoding is enabled. |
| 144 | * Hence we don't do any santify test here. |
| 145 | */ |
Bin Meng | 248c4fa | 2016-02-01 01:40:52 -0800 | [diff] [blame] | 146 | dm_pci_read_config32(dev->parent, ibase_off, &priv->ibase); |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 147 | priv->ibase &= ~0xf; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 148 | } |
| 149 | |
Bin Meng | d4e61f5 | 2016-05-07 07:46:14 -0700 | [diff] [blame] | 150 | priv->actl_8bit = fdtdec_get_bool(blob, node, "intel,actl-8bit"); |
| 151 | priv->actl_addr = fdtdec_get_int(blob, node, "intel,actl-addr", 0); |
| 152 | |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 153 | cell = fdt_getprop(blob, node, "intel,pirq-routing", &len); |
Simon Glass | 9e3ff9c | 2015-08-10 07:05:06 -0600 | [diff] [blame] | 154 | if (!cell || len % sizeof(struct pirq_routing)) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 155 | return -EINVAL; |
Simon Glass | 9e3ff9c | 2015-08-10 07:05:06 -0600 | [diff] [blame] | 156 | count = len / sizeof(struct pirq_routing); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 157 | |
Simon Glass | 9e3ff9c | 2015-08-10 07:05:06 -0600 | [diff] [blame] | 158 | rt = calloc(1, sizeof(struct irq_routing_table)); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 159 | if (!rt) |
| 160 | return -ENOMEM; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 161 | |
| 162 | /* Populate the PIRQ table fields */ |
| 163 | rt->signature = PIRQ_SIGNATURE; |
| 164 | rt->version = PIRQ_VERSION; |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 165 | rt->rtr_bus = PCI_BUS(priv->bdf); |
| 166 | rt->rtr_devfn = (PCI_DEV(priv->bdf) << 3) | PCI_FUNC(priv->bdf); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 167 | rt->rtr_vendor = PCI_VENDOR_ID_INTEL; |
| 168 | rt->rtr_device = PCI_DEVICE_ID_INTEL_ICH7_31; |
| 169 | |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 170 | slot_base = rt->slots; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 171 | |
| 172 | /* Now fill in the irq_info entries in the PIRQ table */ |
Simon Glass | 9e3ff9c | 2015-08-10 07:05:06 -0600 | [diff] [blame] | 173 | for (i = 0; i < count; |
| 174 | i++, cell += sizeof(struct pirq_routing) / sizeof(u32)) { |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 175 | struct pirq_routing pr; |
| 176 | |
| 177 | pr.bdf = fdt_addr_to_cpu(cell[0]); |
| 178 | pr.pin = fdt_addr_to_cpu(cell[1]); |
| 179 | pr.pirq = fdt_addr_to_cpu(cell[2]); |
| 180 | |
| 181 | debug("irq_info %d: b.d.f %x.%x.%x INT%c PIRQ%c\n", |
| 182 | i, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), |
| 183 | PCI_FUNC(pr.bdf), 'A' + pr.pin - 1, |
| 184 | 'A' + pr.pirq); |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 185 | |
| 186 | slot = check_dup_entry(slot_base, irq_entries, |
| 187 | PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); |
| 188 | if (slot) { |
| 189 | debug("found entry for bus %d device %d, ", |
| 190 | PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); |
| 191 | |
| 192 | if (slot->irq[pr.pin - 1].link) { |
| 193 | debug("skipping\n"); |
| 194 | |
| 195 | /* |
| 196 | * Sanity test on the routed PIRQ pin |
| 197 | * |
| 198 | * If they don't match, show a warning to tell |
| 199 | * there might be something wrong with the PIRQ |
| 200 | * routing information in the device tree. |
| 201 | */ |
| 202 | if (slot->irq[pr.pin - 1].link != |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 203 | LINK_N2V(pr.pirq, priv->link_base)) |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 204 | debug("WARNING: Inconsistent PIRQ routing information\n"); |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 205 | continue; |
| 206 | } |
Simon Glass | 9e3ff9c | 2015-08-10 07:05:06 -0600 | [diff] [blame] | 207 | } else { |
| 208 | slot = slot_base + irq_entries++; |
Bin Meng | df81749 | 2015-06-23 12:18:47 +0800 | [diff] [blame] | 209 | } |
Simon Glass | 9e3ff9c | 2015-08-10 07:05:06 -0600 | [diff] [blame] | 210 | debug("writing INT%c\n", 'A' + pr.pin - 1); |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 211 | fill_irq_info(priv, slot, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), |
| 212 | pr.pin, pr.pirq); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 213 | } |
| 214 | |
| 215 | rt->size = irq_entries * sizeof(struct irq_info) + 32; |
| 216 | |
Bin Meng | 10d569e | 2016-05-11 07:44:57 -0700 | [diff] [blame] | 217 | /* Fix up the table checksum */ |
| 218 | rt->checksum = table_compute_checksum(rt, rt->size); |
| 219 | |
Simon Glass | 1bff836 | 2017-01-16 07:04:16 -0700 | [diff] [blame] | 220 | gd->arch.pirq_routing_table = rt; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 221 | |
| 222 | return 0; |
| 223 | } |
| 224 | |
Bin Meng | d4e61f5 | 2016-05-07 07:46:14 -0700 | [diff] [blame] | 225 | static void irq_enable_sci(struct udevice *dev) |
| 226 | { |
| 227 | struct irq_router *priv = dev_get_priv(dev); |
| 228 | |
| 229 | if (priv->actl_8bit) { |
| 230 | /* Bit7 must be turned on to enable ACPI */ |
| 231 | dm_pci_write_config8(dev->parent, priv->actl_addr, 0x80); |
| 232 | } else { |
| 233 | /* Write 0 to enable SCI on IRQ9 */ |
| 234 | if (priv->config == PIRQ_VIA_PCI) |
| 235 | dm_pci_write_config32(dev->parent, priv->actl_addr, 0); |
| 236 | else |
| 237 | writel(0, priv->ibase + priv->actl_addr); |
| 238 | } |
| 239 | } |
| 240 | |
Simon Glass | d3b884b | 2016-01-19 21:32:27 -0700 | [diff] [blame] | 241 | int irq_router_common_init(struct udevice *dev) |
Simon Glass | e76187a | 2016-01-19 21:32:25 -0700 | [diff] [blame] | 242 | { |
Simon Glass | 7e4be12 | 2015-08-10 07:05:08 -0600 | [diff] [blame] | 243 | int ret; |
| 244 | |
Simon Glass | b565d66 | 2016-01-19 21:32:28 -0700 | [diff] [blame] | 245 | ret = create_pirq_routing_table(dev); |
Simon Glass | 7e4be12 | 2015-08-10 07:05:08 -0600 | [diff] [blame] | 246 | if (ret) { |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 247 | debug("Failed to create pirq routing table\n"); |
Simon Glass | 7e4be12 | 2015-08-10 07:05:08 -0600 | [diff] [blame] | 248 | return ret; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 249 | } |
Simon Glass | 7e4be12 | 2015-08-10 07:05:08 -0600 | [diff] [blame] | 250 | /* Route PIRQ */ |
Simon Glass | 1bff836 | 2017-01-16 07:04:16 -0700 | [diff] [blame] | 251 | pirq_route_irqs(dev, gd->arch.pirq_routing_table->slots, |
| 252 | get_irq_slot_count(gd->arch.pirq_routing_table)); |
Simon Glass | 7e4be12 | 2015-08-10 07:05:08 -0600 | [diff] [blame] | 253 | |
Bin Meng | d4e61f5 | 2016-05-07 07:46:14 -0700 | [diff] [blame] | 254 | if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) |
| 255 | irq_enable_sci(dev); |
| 256 | |
Simon Glass | 7e4be12 | 2015-08-10 07:05:08 -0600 | [diff] [blame] | 257 | return 0; |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 258 | } |
| 259 | |
Simon Glass | d3b884b | 2016-01-19 21:32:27 -0700 | [diff] [blame] | 260 | int irq_router_probe(struct udevice *dev) |
| 261 | { |
| 262 | return irq_router_common_init(dev); |
| 263 | } |
| 264 | |
Simon Glass | 42fd8c1 | 2017-01-16 07:03:35 -0700 | [diff] [blame] | 265 | ulong write_pirq_routing_table(ulong addr) |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 266 | { |
Simon Glass | 1bff836 | 2017-01-16 07:04:16 -0700 | [diff] [blame] | 267 | if (!gd->arch.pirq_routing_table) |
Bin Meng | 67b2497 | 2015-05-25 22:35:07 +0800 | [diff] [blame] | 268 | return addr; |
| 269 | |
Simon Glass | 1bff836 | 2017-01-16 07:04:16 -0700 | [diff] [blame] | 270 | return copy_pirq_routing_table(addr, gd->arch.pirq_routing_table); |
Bin Meng | 9c7dea6 | 2015-05-25 22:35:04 +0800 | [diff] [blame] | 271 | } |
Simon Glass | e76187a | 2016-01-19 21:32:25 -0700 | [diff] [blame] | 272 | |
| 273 | static const struct udevice_id irq_router_ids[] = { |
| 274 | { .compatible = "intel,irq-router" }, |
| 275 | { } |
| 276 | }; |
| 277 | |
| 278 | U_BOOT_DRIVER(irq_router_drv) = { |
| 279 | .name = "intel_irq", |
| 280 | .id = UCLASS_IRQ, |
| 281 | .of_match = irq_router_ids, |
| 282 | .probe = irq_router_probe, |
Bin Meng | b46c208 | 2016-02-01 01:40:51 -0800 | [diff] [blame] | 283 | .priv_auto_alloc_size = sizeof(struct irq_router), |
Simon Glass | e76187a | 2016-01-19 21:32:25 -0700 | [diff] [blame] | 284 | }; |
| 285 | |
| 286 | UCLASS_DRIVER(irq) = { |
| 287 | .id = UCLASS_IRQ, |
| 288 | .name = "irq", |
| 289 | }; |