bcm2836.c (cd642c88a1957179fdc6843a6c7bd04ca238d625) bcm2836.c (9346e9130d7ae72b1a6fadb36de85c835074b883)
1/*
2 * Copyright 2015 Andrew Turner.
3 * Copyright 2016 Svatopluk Kraus
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:

--- 584 unchanged lines hidden (view full) ---

593 return (0);
594}
595#endif
596
597static int
598bcm_lintc_pic_attach(struct bcm_lintc_softc *sc)
599{
600 struct bcm_lintc_irqsrc *bisrcs;
1/*
2 * Copyright 2015 Andrew Turner.
3 * Copyright 2016 Svatopluk Kraus
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:

--- 584 unchanged lines hidden (view full) ---

593 return (0);
594}
595#endif
596
597static int
598bcm_lintc_pic_attach(struct bcm_lintc_softc *sc)
599{
600 struct bcm_lintc_irqsrc *bisrcs;
601 struct intr_pic *pic;
601 int error;
602 u_int flags;
603 uint32_t irq;
604 const char *name;
605 intptr_t xref;
606
607 bisrcs = sc->bls_isrcs;
608 name = device_get_nameunit(sc->bls_dev);

--- 39 unchanged lines hidden (view full) ---

648
649 error = intr_isrc_register(&bisrcs[irq].bli_isrc, sc->bls_dev,
650 flags, "%s,%u", name, irq);
651 if (error != 0)
652 return (error);
653 }
654
655 xref = OF_xref_from_node(ofw_bus_get_node(sc->bls_dev));
602 int error;
603 u_int flags;
604 uint32_t irq;
605 const char *name;
606 intptr_t xref;
607
608 bisrcs = sc->bls_isrcs;
609 name = device_get_nameunit(sc->bls_dev);

--- 39 unchanged lines hidden (view full) ---

649
650 error = intr_isrc_register(&bisrcs[irq].bli_isrc, sc->bls_dev,
651 flags, "%s,%u", name, irq);
652 if (error != 0)
653 return (error);
654 }
655
656 xref = OF_xref_from_node(ofw_bus_get_node(sc->bls_dev));
656 error = intr_pic_register(sc->bls_dev, xref);
657 if (error != 0)
658 return (error);
657 pic = intr_pic_register(sc->bls_dev, xref);
658 if (pic == NULL)
659 return (ENXIO);
659
660 return (intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc, 0));
661}
662
663static int
664bcm_lintc_probe(device_t dev)
665{
666

--- 246 unchanged lines hidden ---
660
661 return (intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc, 0));
662}
663
664static int
665bcm_lintc_probe(device_t dev)
666{
667

--- 246 unchanged lines hidden ---