Early routing of the CPU timer interrupt is required */
| 86 | |
| 87 | /* Early routing of the CPU timer interrupt is required */ |
| 88 | static void |
| 89 | bcm_mips74k_timer_init(void *unused) |
| 90 | { |
| 91 | struct bcm_platform *bp; |
| 92 | u_int irq; |
| 93 | uint32_t mask; |
| 94 | |
| 95 | bp = bcm_get_platform(); |
| 96 | |
| 97 | /* Must be a MIPS74K core attached to a BCMA interconnect */ |
| 98 | if (!bhnd_core_matches(&bp->cpu_id, &(struct bhnd_core_match) { |
| 99 | BHND_MATCH_CORE(BHND_MFGID_MIPS, BHND_COREID_MIPS74K) |
| 100 | })) { |
| 101 | if (bootverbose) { |
| 102 | BCM_ERR("not a MIPS74K core: %s %s\n", |
| 103 | bhnd_vendor_name(bp->cpu_id.vendor), |
| 104 | bhnd_core_name(&bp->cpu_id)); |
| 105 | } |
| 106 | |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | if (!BHND_CHIPTYPE_IS_BCMA_COMPATIBLE(bp->cid.chip_type)) { |
| 111 | if (bootverbose) |
| 112 | BCM_ERR("not a BCMA device\n"); |
| 113 | return; |
| 114 | } |
| 115 | |
| 116 | /* Route the timer bus ivec to the CPU's timer IRQ, and disable any |
| 117 | * other vectors assigned to the IRQ. */ |
| 118 | irq = BCM_MIPS74K_GET_TIMER_IRQ(); |
| 119 | mask = BCM_MIPS74K_INTR_SEL_FLAG(BCM_MIPS74K_TIMER_IVEC); |
| 120 | |
| 121 | BCM_CPU_WRITE_4(bp, BCM_MIPS74K_INTR_SEL(irq), mask); |
| 122 | } |
| 123 | |
| 124 | static int |
| 125 | bcm_mips74k_probe(device_t dev) |
nothing calls this directly
no test coverage detected