bcm2836.c (103d39efe0c68cb2a808c306b14c3f473a02535d) bcm2836.c (85918beb387f179abc93a6c613801fb9761ff1e2)
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:

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

533 if (intr_isrc_init_on_cpu(isrc, cpu)) {
534 /* Write-set register. */
535 bcm_lintc_write_4(sc, BCM_LINTC_PMU_ROUTING_SET_REG,
536 BCM_LINTC_PIRR_IRQ_EN_CORE(cpu));
537 }
538}
539
540static void
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:

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

533 if (intr_isrc_init_on_cpu(isrc, cpu)) {
534 /* Write-set register. */
535 bcm_lintc_write_4(sc, BCM_LINTC_PMU_ROUTING_SET_REG,
536 BCM_LINTC_PIRR_IRQ_EN_CORE(cpu));
537 }
538}
539
540static void
541bcm_lintc_init_secondary(device_t dev)
541bcm_lintc_init_secondary(device_t dev, uint32_t rootnum)
542{
543 u_int cpu;
544 struct bcm_lintc_softc *sc;
545
546 cpu = PCPU_GET(cpuid);
547 sc = device_get_softc(dev);
548
549 BCM_LINTC_LOCK(sc);

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

641 return (error);
642 }
643
644 xref = OF_xref_from_node(ofw_bus_get_node(sc->bls_dev));
645 pic = intr_pic_register(sc->bls_dev, xref);
646 if (pic == NULL)
647 return (ENXIO);
648
542{
543 u_int cpu;
544 struct bcm_lintc_softc *sc;
545
546 cpu = PCPU_GET(cpuid);
547 sc = device_get_softc(dev);
548
549 BCM_LINTC_LOCK(sc);

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

641 return (error);
642 }
643
644 xref = OF_xref_from_node(ofw_bus_get_node(sc->bls_dev));
645 pic = intr_pic_register(sc->bls_dev, xref);
646 if (pic == NULL)
647 return (ENXIO);
648
649 error = intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc);
649 error = intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc,
650 INTR_ROOT_IRQ);
650 if (error != 0)
651 return (error);
652
653#ifdef SMP
654 error = intr_ipi_pic_register(sc->bls_dev, 0);
655 if (error != 0)
656 return (error);
657#endif

--- 94 unchanged lines hidden ---
651 if (error != 0)
652 return (error);
653
654#ifdef SMP
655 error = intr_ipi_pic_register(sc->bls_dev, 0);
656 if (error != 0)
657 return (error);
658#endif

--- 94 unchanged lines hidden ---