Lines Matching refs:hpriv

226 	struct ahci_host_priv *hpriv = ap->host->private_data;  in ahci_show_host_caps()  local
228 return sprintf(buf, "%x\n", hpriv->cap); in ahci_show_host_caps()
236 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_show_host_cap2() local
238 return sprintf(buf, "%x\n", hpriv->cap2); in ahci_show_host_cap2()
246 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_show_host_version() local
247 void __iomem *mmio = hpriv->mmio; in ahci_show_host_version()
267 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_read_em_buffer() local
268 void __iomem *mmio = hpriv->mmio; in ahci_read_em_buffer()
269 void __iomem *em_mmio = mmio + hpriv->em_loc; in ahci_read_em_buffer()
279 !(hpriv->em_msg_type & EM_MSG_TYPE_SGPIO)) { in ahci_read_em_buffer()
290 em_mmio += hpriv->em_buf_sz; in ahci_read_em_buffer()
292 count = hpriv->em_buf_sz; in ahci_read_em_buffer()
300 hpriv->em_buf_sz, PAGE_SIZE); in ahci_read_em_buffer()
323 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_store_em_buffer() local
324 void __iomem *mmio = hpriv->mmio; in ahci_store_em_buffer()
325 void __iomem *em_mmio = mmio + hpriv->em_loc; in ahci_store_em_buffer()
333 !(hpriv->em_msg_type & EM_MSG_TYPE_SGPIO) || in ahci_store_em_buffer()
334 size % 4 || size > hpriv->em_buf_sz) in ahci_store_em_buffer()
363 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_show_em_supported() local
364 void __iomem *mmio = hpriv->mmio; in ahci_show_em_supported()
394 struct ahci_host_priv *hpriv, in ahci_save_initial_config() argument
398 void __iomem *mmio = hpriv->mmio; in ahci_save_initial_config()
408 hpriv->saved_cap = cap = readl(mmio + HOST_CAP); in ahci_save_initial_config()
409 hpriv->saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL); in ahci_save_initial_config()
415 hpriv->saved_cap2 = cap2 = readl(mmio + HOST_CAP2); in ahci_save_initial_config()
417 hpriv->saved_cap2 = cap2 = 0; in ahci_save_initial_config()
420 if ((cap & HOST_CAP_64) && (hpriv->flags & AHCI_HFLAG_32BIT_ONLY)) { in ahci_save_initial_config()
425 if ((cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_NO_NCQ)) { in ahci_save_initial_config()
430 if (!(cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_YES_NCQ)) { in ahci_save_initial_config()
435 if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { in ahci_save_initial_config()
440 if ((cap & HOST_CAP_SNTF) && (hpriv->flags & AHCI_HFLAG_NO_SNTF)) { in ahci_save_initial_config()
446 if (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) { in ahci_save_initial_config()
489 hpriv->saved_port_map = port_map; in ahci_save_initial_config()
493 hpriv->cap = cap; in ahci_save_initial_config()
494 hpriv->cap2 = cap2; in ahci_save_initial_config()
495 hpriv->port_map = port_map; in ahci_save_initial_config()
510 struct ahci_host_priv *hpriv = host->private_data; in ahci_restore_initial_config() local
511 void __iomem *mmio = hpriv->mmio; in ahci_restore_initial_config()
513 writel(hpriv->saved_cap, mmio + HOST_CAP); in ahci_restore_initial_config()
514 if (hpriv->saved_cap2) in ahci_restore_initial_config()
515 writel(hpriv->saved_cap2, mmio + HOST_CAP2); in ahci_restore_initial_config()
516 writel(hpriv->saved_port_map, mmio + HOST_PORTS_IMPL); in ahci_restore_initial_config()
529 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_scr_offset() local
532 (sc_reg != SCR_NOTIFICATION || (hpriv->cap & HOST_CAP_SNTF))) in ahci_scr_offset()
602 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_start_fis_rx() local
607 if (hpriv->cap & HOST_CAP_64) in ahci_start_fis_rx()
612 if (hpriv->cap & HOST_CAP_64) in ahci_start_fis_rx()
647 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_power_up() local
654 if (hpriv->cap & HOST_CAP_SSS) { in ahci_power_up()
667 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_set_lpm() local
683 if (hpriv->cap & HOST_CAP_ALPM) { in ahci_set_lpm()
719 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_power_down() local
723 if (!(hpriv->cap & HOST_CAP_SSS)) in ahci_power_down()
740 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_start_port() local
751 if (!(hpriv->flags & AHCI_HFLAG_DELAY_ENGINE)) in ahci_start_port()
801 struct ahci_host_priv *hpriv = host->private_data; in ahci_reset_controller() local
802 void __iomem *mmio = hpriv->mmio; in ahci_reset_controller()
922 struct ahci_host_priv *hpriv = host->private_data; in ahci_reset_em() local
923 void __iomem *mmio = hpriv->mmio; in ahci_reset_em()
938 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_transmit_led_message() local
940 void __iomem *mmio = hpriv->mmio; in ahci_transmit_led_message()
966 if (hpriv->em_msg_type & EM_MSG_TYPE_LED) { in ahci_transmit_led_message()
977 writel(message[0], mmio + hpriv->em_loc); in ahci_transmit_led_message()
978 writel(message[1], mmio + hpriv->em_loc+4); in ahci_transmit_led_message()
1107 struct ahci_host_priv *hpriv = host->private_data; in ahci_init_controller() local
1108 void __iomem *mmio = hpriv->mmio; in ahci_init_controller()
1133 struct ahci_host_priv *hpriv = dev->link->ap->host->private_data; in ahci_dev_config() local
1135 if (hpriv->flags & AHCI_HFLAG_SECT255) { in ahci_dev_config()
1174 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_kick_engine() local
1193 if (!(hpriv->cap & HOST_CAP_CLO)) { in ahci_kick_engine()
1251 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_do_softreset() local
1301 if (rc == -EBUSY && hpriv->flags & AHCI_HFLAG_SRST_TOUT_IS_OFFLINE) { in ahci_do_softreset()
1547 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_error_intr() local
1588 if (hpriv->flags & AHCI_HFLAG_IGN_IRQ_IF_ERR) in ahci_error_intr()
1601 if (hpriv->flags & AHCI_HFLAG_IGN_SERR_INTERNAL) in ahci_error_intr()
1661 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_port_intr() local
1694 if (hpriv->cap & HOST_CAP_SNTF) in ahci_port_intr()
1747 struct ahci_host_priv *hpriv; in ahci_interrupt() local
1754 hpriv = host->private_data; in ahci_interrupt()
1755 mmio = hpriv->mmio; in ahci_interrupt()
1762 irq_masked = irq_stat & hpriv->port_map; in ahci_interrupt()
1869 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_thaw() local
1870 void __iomem *mmio = hpriv->mmio; in ahci_thaw()
2051 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_port_start() local
2063 if ((hpriv->cap & HOST_CAP_FBS) && sata_pmp_supported(ap)) { in ahci_port_start()
2068 else if (hpriv->flags & AHCI_HFLAG_YES_FBS) { in ahci_port_start()
2141 struct ahci_host_priv *hpriv = host->private_data; in ahci_print_info() local
2142 void __iomem *mmio = hpriv->mmio; in ahci_print_info()
2147 cap = hpriv->cap; in ahci_print_info()
2148 cap2 = hpriv->cap2; in ahci_print_info()
2149 impl = hpriv->port_map; in ahci_print_info()
2208 void ahci_set_em_messages(struct ahci_host_priv *hpriv, in ahci_set_em_messages() argument
2212 void __iomem *mmio = hpriv->mmio; in ahci_set_em_messages()
2216 if (!ahci_em_messages || !(hpriv->cap & HOST_CAP_EMS)) in ahci_set_em_messages()
2223 hpriv->em_loc = ((em_loc >> 16) * 4); in ahci_set_em_messages()
2224 hpriv->em_buf_sz = ((em_loc & 0xff) * 4); in ahci_set_em_messages()
2225 hpriv->em_msg_type = messages; in ahci_set_em_messages()