pmac_tweak_clock_spreading(&macio_chips[0], 1); 
pmac_tweak_clock_spreading(1); 
set_initial_features(void){	struct device_node* np;	/* That hack appears to be necessary for some StarMax motherboards	 * but I'm not too sure it was audited for side-effects on other	 * ohare based machines...	 * Since I still have difficulties figuring the right way to	 * differenciate them all and since that hack was there for a long	 * time, I'll keep it around	 */	if (macio_chips[0].type == macio_ohare && !find_devices("via-pmu")) {		struct macio_chip* macio = &macio_chips[0];		MACIO_OUT32(OHARE_FCR, STARMAX_FEATURES);	} else if (macio_chips[0].type == macio_ohare) {		struct macio_chip* macio = &macio_chips[0];		MACIO_BIS(OHARE_FCR, OH_IOBUS_ENABLE);	} else if (macio_chips[1].type == macio_ohare) {		struct macio_chip* macio = &macio_chips[1];		MACIO_BIS(OHARE_FCR, OH_IOBUS_ENABLE);	}#ifdef CONFIG_POWER4	if (macio_chips[0].type == macio_keylargo2) {#ifndef CONFIG_SMP		/* On SMP machines running UP, we have the second CPU eating		 * bus cycles. We need to take it off the bus. This is done		 * from pmac_smp for SMP kernels running on one CPU		 */		np = of_find_node_by_type(NULL, "cpu");		if (np != NULL)			np = of_find_node_by_type(np, "cpu");		if (np != NULL) {			g5_phy_disable_cpu1();			of_node_put(np);		}#endif /* CONFIG_SMP */		/* Enable GMAC for now for PCI probing. It will be disabled		 * later on after PCI probe		 */		np = of_find_node_by_name(NULL, "ethernet");		while(np) {			if (device_is_compatible(np, "K2-GMAC"))				g5_gmac_enable(np, 0, 1);			np = of_find_node_by_name(np, "ethernet");		}		/* Enable FW before PCI probe. Will be disabled later on		 * Note: We should have a batter way to check that we are		 * dealing with uninorth internal cell and not a PCI cell		 * on the external PCI. The code below works though.		 */		np = of_find_node_by_name(NULL, "firewire");		while(np) {			if (device_is_compatible(np, "pci106b,5811")) {				macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED;				g5_fw_enable(np, 0, 1);			}			np = of_find_node_by_name(np, "firewire");		}	}#else /* CONFIG_POWER4 */	if (macio_chips[0].type == macio_keylargo ||	    macio_chips[0].type == macio_pangea ||	    macio_chips[0].type == macio_intrepid) {		/* Enable GMAC for now for PCI probing. It will be disabled		 * later on after PCI probe		 */		np = of_find_node_by_name(NULL, "ethernet");		while(np) {			if (np->parent			    && device_is_compatible(np->parent, "uni-north")			    && device_is_compatible(np, "gmac"))				core99_gmac_enable(np, 0, 1);			np = of_find_node_by_name(np, "ethernet");		}		/* Enable FW before PCI probe. Will be disabled later on		 * Note: We should have a batter way to check that we are		 * dealing with uninorth internal cell and not a PCI cell		 * on the external PCI. The code below works though.		 */		np = of_find_node_by_name(NULL, "firewire");		while(np) {			if (np->parent			    && device_is_compatible(np->parent, "uni-north")			    && (device_is_compatible(np, "pci106b,18") ||	     		        device_is_compatible(np, "pci106b,30") ||	     		        device_is_compatible(np, "pci11c1,5811"))) {				macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED;				core99_firewire_enable(np, 0, 1);			}			np = of_find_node_by_name(np, "firewire");		}		/* Enable ATA-100 before PCI probe. */		np = of_find_node_by_name(NULL, "ata-6");		while(np) {			if (np->parent			    && device_is_compatible(np->parent, "uni-north")			    && device_is_compatible(np, "kauai-ata")) {				core99_ata100_enable(np, 1);			}			np = of_find_node_by_name(np, "ata-6");		}		/* Switch airport off */		np = find_devices("radio");		while(np) {			if (np && np->parent == macio_chips[0].of_node) {				macio_chips[0].flags |= MACIO_FLAG_AIRPORT_ON;				core99_airport_enable(np, 0, 0);			}			np = np->next;		}	}	/* On all machines that support sound PM, switch sound off */	if (macio_chips[0].of_node)		pmac_do_feature_call(PMAC_FTR_SOUND_CHIP_ENABLE,			macio_chips[0].of_node, 0, 0);	/* While on some desktop G3s, we turn it back on */	if (macio_chips[0].of_node && macio_chips[0].type == macio_heathrow		&& (pmac_mb.model_id == PMAC_TYPE_GOSSAMER ||		    pmac_mb.model_id == PMAC_TYPE_SILK)) {		struct macio_chip* macio = &macio_chips[0];		MACIO_BIS(HEATHROW_FCR, HRW_SOUND_CLK_ENABLE);		MACIO_BIC(HEATHROW_FCR, HRW_SOUND_POWER_N);	}	/* Some machine models need the clock chip to be properly setup for	 * clock spreading now. This should be a platform function but we	 * don't do these at the moment	 */	pmac_tweak_clock_spreading(&macio_chips[0], 1);#endif /* CONFIG_POWER4 */	/* On all machines, switch modem & serial ports off */	np = find_devices("ch-a");	while(np) {		initial_serial_shutdown(np);		np = np->next;	}	np = find_devices("ch-b");	while(np) {		initial_serial_shutdown(np);		np = np->next;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/e521dca64e0f82d844928c5ee88d82fdced50cbe/pmac_feature.c/buggy/arch/ppc/platforms/pmac_feature.c