Lines Matching refs:host
189 return ap->host->iomap[PDC_MMIO_BAR] + ap->port_no * 0x100 + offset; in port_mmio()
477 static long pdc_read_counter(struct ata_host *host) in pdc_read_counter() argument
479 void __iomem *mmio_base = host->iomap[PDC_MMIO_BAR]; in pdc_read_counter()
518 static void pdc_adjust_pll(struct ata_host *host, long pll_clock, unsigned int board_idx) in pdc_adjust_pll() argument
520 void __iomem *mmio_base = host->iomap[PDC_MMIO_BAR]; in pdc_adjust_pll()
604 static long pdc_detect_pll_input_clock(struct ata_host *host) in pdc_detect_pll_input_clock() argument
606 void __iomem *mmio_base = host->iomap[PDC_MMIO_BAR]; in pdc_detect_pll_input_clock()
619 start_count = pdc_read_counter(host); in pdc_detect_pll_input_clock()
626 end_count = pdc_read_counter(host); in pdc_detect_pll_input_clock()
652 static int pdc_hardware_init(struct ata_host *host, unsigned int board_idx) in pdc_hardware_init() argument
662 pll_clock = pdc_detect_pll_input_clock(host); in pdc_hardware_init()
664 dev_info(host->dev, "PLL input clock %ld kHz\n", pll_clock/1000); in pdc_hardware_init()
667 pdc_adjust_pll(host, pll_clock, board_idx); in pdc_hardware_init()
712 struct ata_host *host; in pdc2027x_init_one() local
719 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 2); in pdc2027x_init_one()
720 if (!host) in pdc2027x_init_one()
731 host->iomap = pcim_iomap_table(pdev); in pdc2027x_init_one()
741 mmio_base = host->iomap[PDC_MMIO_BAR]; in pdc2027x_init_one()
744 struct ata_port *ap = host->ports[i]; in pdc2027x_init_one()
756 if (pdc_hardware_init(host, board_idx) != 0) in pdc2027x_init_one()
760 return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, in pdc2027x_init_one()
767 struct ata_host *host = pci_get_drvdata(pdev); in pdc2027x_reinit_one() local
781 if (pdc_hardware_init(host, board_idx)) in pdc2027x_reinit_one()
784 ata_host_resume(host); in pdc2027x_reinit_one()