aintc.c (0edd2576c0e07f525c80e4aa5ff24350b55f18b7) | aintc.c (cd642c88a1957179fdc6843a6c7bd04ca238d625) |
---|---|
1/*- 2 * Copyright (c) 2012 Damjan Marion <dmarion@Freebsd.org> 3 * All rights reserved. 4 * 5 * Based on OMAP3 INTC code by Ben Gray 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 164 unchanged lines hidden (view full) --- 173 174 ti_aintc_irq_mask(sc, irq); 175} 176 177static int 178ti_aintc_map_intr(device_t dev, struct intr_map_data *data, 179 struct intr_irqsrc **isrcp) 180{ | 1/*- 2 * Copyright (c) 2012 Damjan Marion <dmarion@Freebsd.org> 3 * All rights reserved. 4 * 5 * Based on OMAP3 INTC code by Ben Gray 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 164 unchanged lines hidden (view full) --- 173 174 ti_aintc_irq_mask(sc, irq); 175} 176 177static int 178ti_aintc_map_intr(device_t dev, struct intr_map_data *data, 179 struct intr_irqsrc **isrcp) 180{ |
181 struct intr_map_data_fdt *daf; |
|
181 struct ti_aintc_softc *sc; 182 | 182 struct ti_aintc_softc *sc; 183 |
183 if (data->type != INTR_MAP_DATA_FDT || data->fdt.ncells != 1 || 184 data->fdt.cells[0] >= INTC_NIRQS) | 184 if (data->type != INTR_MAP_DATA_FDT) 185 return (ENOTSUP); 186 187 daf = (struct intr_map_data_fdt *)data; 188 if (daf->ncells != 1 || daf->cells[0] >= INTC_NIRQS) |
185 return (EINVAL); 186 187 sc = device_get_softc(dev); | 189 return (EINVAL); 190 191 sc = device_get_softc(dev); |
188 *isrcp = &sc->aintc_isrcs[data->fdt.cells[0]].tai_isrc; | 192 *isrcp = &sc->aintc_isrcs[daf->cells[0]].tai_isrc; |
189 return (0); 190} 191 192static void 193ti_aintc_pre_ithread(device_t dev, struct intr_irqsrc *isrc) 194{ 195 u_int irq = ((struct ti_aintc_irqsrc *)isrc)->tai_irq; 196 struct ti_aintc_softc *sc = device_get_softc(dev); --- 182 unchanged lines hidden --- | 193 return (0); 194} 195 196static void 197ti_aintc_pre_ithread(device_t dev, struct intr_irqsrc *isrc) 198{ 199 u_int irq = ((struct ti_aintc_irqsrc *)isrc)->tai_irq; 200 struct ti_aintc_softc *sc = device_get_softc(dev); --- 182 unchanged lines hidden --- |