-#ifdef TX4927_SUPPORT_PCI_66
-void tx4927_pci66_setup(void)
-{
- int pciclk, pciclkin = 1;
-
- TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI66,
- "-\n");
-
- if (tx4927_ccfgptr->ccfg & TX4927_CCFG_PCI66)
- return;
-
- tx4927_reset_pci_pcic();
-
- /* Assert M66EN */
- tx4927_ccfgptr->ccfg |= TX4927_CCFG_PCI66;
- /* set PCICLK 66MHz */
- if (tx4927_ccfgptr->pcfg & TX4927_PCFG_PCICLKEN_ALL) {
- unsigned int pcidivmode = 0;
- pcidivmode =
- (unsigned long) tx4927_ccfgptr->
- ccfg & TX4927_CCFG_PCIDIVMODE_MASK;
- if (tx4927_cpu_clock >= 170000000) {
- /* CPU 200MHz */
- pcidivmode = TX4927_CCFG_PCIDIVMODE_3;
- pciclk = tx4927_cpu_clock / 3;
- } else {
- /* CPU 166MHz */
- pcidivmode = TX4927_CCFG_PCIDIVMODE_2_5;
- pciclk = tx4927_cpu_clock * 2 / 5;
- }
- tx4927_ccfgptr->ccfg =
- (tx4927_ccfgptr->ccfg & ~TX4927_CCFG_PCIDIVMODE_MASK)
- | pcidivmode;
- TOSHIBA_RBTX4927_SETUP_DPRINTK
- (TOSHIBA_RBTX4927_SETUP_PCI66,
- ":PCICLK: ccfg:0x%08lx\n",
- (unsigned long) tx4927_ccfgptr->ccfg);
- } else {
- int pciclk_setting = *tx4927_pci_clk_ptr;
- pciclkin = 0;
- pciclk = 66666666;
- pciclk_setting &= ~TX4927_PCI_CLK_MASK;
- pciclk_setting |= TX4927_PCI_CLK_66;
- *tx4927_pci_clk_ptr = pciclk_setting;
- TOSHIBA_RBTX4927_SETUP_DPRINTK
- (TOSHIBA_RBTX4927_SETUP_PCI66,
- "PCICLK: pci_clk:%02x\n", *tx4927_pci_clk_ptr);
- }
-
- udelay(10000);
-
- /* clear PCIC reset */
- tx4927_ccfgptr->clkctr &= ~TX4927_CLKCTR_PCIRST;
- /* clear PCI reset */
- *tx4927_pcireset_ptr = 0;
-
- TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI66,
- "+\n");
- return;
-}
-#endif /* TX4927_SUPPORT_PCI_66 */
-