Can anyone explain why the comment preceding mpic_assign_isu() on line 145 says that the I2C registers are at 0x11020 yet the code on line 146 shows 0x11000?
The MPC8245 user manual shows the external interrupt 0 registers at 0x10200 (paddr=40000) and the I2C registers at 0x11020. <from storcenter.c> <2.6.25.6> /* 112 * Interrupt setup and service. Interrrupts on the turbostation come 113 * from the four PCI slots plus onboard 8241 devices: I2C, DUART. 114 */ 115static void __init storcenter_init_IRQ(void) 116{ 117 struct mpic *mpic; 118 struct device_node *dnp; 119 const void *prop; 120 int size; 121 phys_addr_t paddr; 122 123 dnp = of_find_node_by_type(NULL, "open-pic"); 124 if (dnp == NULL) 125 return; 126 127 prop = of_get_property(dnp, "reg", &size); 128 if (prop == NULL) { 129 of_node_put(dnp); 130 return; 131 } 132 133 paddr = (phys_addr_t)of_translate_address(dnp, prop); 134 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET, 135 16, 32, " OpenPIC "); 136 137 of_node_put(dnp); 138 139 BUG_ON(mpic == NULL); 140 141 /* 142 * 16 Serial Interrupts followed by 16 Internal Interrupts. 143 * I2C is the second internal, so it is at 17, 0x11020. 144 */ 145 mpic_assign_isu(mpic, 0, paddr + 0x10200); 146 mpic_assign_isu(mpic, 1, paddr + 0x11000); 147 148 mpic_init(mpic); 149} _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev