kernels/linux-2.4.0/arch/ppc/kernel/feature.c
/* Initialize the Core99 UniNorth host bridge and memory controller
 */
Initialize the Core99 UniNorth host bridge and memory controller
Initialize the Core99 UniNorth host bridge and memory controller
static void
uninorth_init(void)
{
	struct device_node* gmac;
	unsigned long actrl;
	actrl = in_be32(UN_REG(UNI_N_ARB_CTRL)) & ~UNI_N_ARB_CTRL_QACK_DELAY_MASK;
	actrl |= ((uninorth_rev < 3) ? UNI_N_ARB_CTRL_QACK_DELAY105 : UNI_N_ARB_CTRL_QACK_DELAY)
		<< UNI_N_ARB_CTRL_QACK_DELAY_SHIFT;
	UN_OUT(UNI_N_ARB_CTRL, actrl);
	gmac = find_devices("ethernet");
	while(gmac) {
		if (device_is_compatible(gmac, "gmac"))
			break;
		gmac = gmac->next;
	}
	if (gmac)
		feature_set_gmac_power(gmac, 0);
}
static void uninorth_init ( void ) { struct device_node * gmac ; unsigned long actrl ; actrl = in_be32 ( UN_REG ( UNI_N_ARB_CTRL ) ) & ~ UNI_N_ARB_CTRL_QACK_DELAY_MASK ; actrl |= ( ( uninorth_rev < 3 ) ? UNI_N_ARB_CTRL_QACK_DELAY105 : UNI_N_ARB_CTRL_QACK_DELAY ) << UNI_N_ARB_CTRL_QACK_DELAY_SHIFT ; UN_OUT ( UNI_N_ARB_CTRL , actrl ) ; gmac = find_devices ( " " ) ; while ( gmac ) { if ( device_is_compatible ( gmac , " " ) ) break ; gmac = gmac -> next ; } if ( gmac ) feature_set_gmac_power ( gmac , 0 ) ; }
Initialize the Core99 UniNorth host bridge and memory controller
Initialize the Core99 UniNorth host bridge and memory controller
/* Set the arbitrer QAck delay according to what Apple does
	 */ /* 
	 * Turns OFF the gmac clock. The gmac driver will turn
	 * it back ON when the interface is enabled. This save
	 * power on portables.
	 * 
	 * Note: We could also try to turn OFF the PHY. Since this
	 * has to be done by both the gmac driver and this code,
	 * I'll probably end-up moving some of this out of the
	 * modular gmac driver into a non-modular stub containing
	 * some basic PHY management and power management stuffs
	 */