• Home
  • Raw
  • Download

Lines Matching refs:hpriv

244 	struct ahci_host_priv *hpriv = ap->host->private_data;  in ahci_show_host_caps()  local
246 return sprintf(buf, "%x\n", hpriv->cap); in ahci_show_host_caps()
254 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_show_host_cap2() local
256 return sprintf(buf, "%x\n", hpriv->cap2); in ahci_show_host_cap2()
264 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_show_host_version() local
266 return sprintf(buf, "%x\n", hpriv->version); in ahci_show_host_version()
289 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_read_em_buffer() local
290 void __iomem *mmio = hpriv->mmio; in ahci_read_em_buffer()
291 void __iomem *em_mmio = mmio + hpriv->em_loc; in ahci_read_em_buffer()
302 !(hpriv->em_msg_type & EM_MSG_TYPE_SGPIO)) { in ahci_read_em_buffer()
315 em_mmio += hpriv->em_buf_sz; in ahci_read_em_buffer()
317 count = hpriv->em_buf_sz; in ahci_read_em_buffer()
325 hpriv->em_buf_sz, PAGE_SIZE); in ahci_read_em_buffer()
349 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_store_em_buffer() local
350 void __iomem *mmio = hpriv->mmio; in ahci_store_em_buffer()
351 void __iomem *em_mmio = mmio + hpriv->em_loc; in ahci_store_em_buffer()
359 !(hpriv->em_msg_type & EM_MSG_TYPE_SGPIO) || in ahci_store_em_buffer()
360 size % 4 || size > hpriv->em_buf_sz) in ahci_store_em_buffer()
392 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_show_em_supported() local
393 void __iomem *mmio = hpriv->mmio; in ahci_show_em_supported()
425 void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv) in ahci_save_initial_config() argument
427 void __iomem *mmio = hpriv->mmio; in ahci_save_initial_config()
437 hpriv->saved_cap = cap = readl(mmio + HOST_CAP); in ahci_save_initial_config()
438 hpriv->saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL); in ahci_save_initial_config()
444 hpriv->saved_cap2 = cap2 = readl(mmio + HOST_CAP2); in ahci_save_initial_config()
446 hpriv->saved_cap2 = cap2 = 0; in ahci_save_initial_config()
449 if ((cap & HOST_CAP_64) && (hpriv->flags & AHCI_HFLAG_32BIT_ONLY)) { in ahci_save_initial_config()
454 if ((cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_NO_NCQ)) { in ahci_save_initial_config()
459 if (!(cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_YES_NCQ)) { in ahci_save_initial_config()
464 if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { in ahci_save_initial_config()
469 if ((cap & HOST_CAP_SNTF) && (hpriv->flags & AHCI_HFLAG_NO_SNTF)) { in ahci_save_initial_config()
475 if ((cap2 & HOST_CAP2_SDS) && (hpriv->flags & AHCI_HFLAG_NO_DEVSLP)) { in ahci_save_initial_config()
482 if (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) { in ahci_save_initial_config()
487 if ((cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_NO_FBS)) { in ahci_save_initial_config()
492 if (!(cap & HOST_CAP_ALPM) && (hpriv->flags & AHCI_HFLAG_YES_ALPM)) { in ahci_save_initial_config()
497 if ((cap & HOST_CAP_SXS) && (hpriv->flags & AHCI_HFLAG_NO_SXS)) { in ahci_save_initial_config()
502 if (hpriv->force_port_map && port_map != hpriv->force_port_map) { in ahci_save_initial_config()
504 port_map, hpriv->force_port_map); in ahci_save_initial_config()
505 port_map = hpriv->force_port_map; in ahci_save_initial_config()
506 hpriv->saved_port_map = port_map; in ahci_save_initial_config()
509 if (hpriv->mask_port_map) { in ahci_save_initial_config()
512 port_map & hpriv->mask_port_map); in ahci_save_initial_config()
513 port_map &= hpriv->mask_port_map; in ahci_save_initial_config()
541 hpriv->saved_port_map = port_map; in ahci_save_initial_config()
545 hpriv->cap = cap; in ahci_save_initial_config()
546 hpriv->cap2 = cap2; in ahci_save_initial_config()
547 hpriv->version = readl(mmio + HOST_VERSION); in ahci_save_initial_config()
548 hpriv->port_map = port_map; in ahci_save_initial_config()
550 if (!hpriv->start_engine) in ahci_save_initial_config()
551 hpriv->start_engine = ahci_start_engine; in ahci_save_initial_config()
553 if (!hpriv->stop_engine) in ahci_save_initial_config()
554 hpriv->stop_engine = ahci_stop_engine; in ahci_save_initial_config()
556 if (!hpriv->irq_handler) in ahci_save_initial_config()
557 hpriv->irq_handler = ahci_single_level_irq_intr; in ahci_save_initial_config()
572 struct ahci_host_priv *hpriv = host->private_data; in ahci_restore_initial_config() local
573 void __iomem *mmio = hpriv->mmio; in ahci_restore_initial_config()
575 writel(hpriv->saved_cap, mmio + HOST_CAP); in ahci_restore_initial_config()
576 if (hpriv->saved_cap2) in ahci_restore_initial_config()
577 writel(hpriv->saved_cap2, mmio + HOST_CAP2); in ahci_restore_initial_config()
578 writel(hpriv->saved_port_map, mmio + HOST_PORTS_IMPL); in ahci_restore_initial_config()
591 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_scr_offset() local
594 (sc_reg != SCR_NOTIFICATION || (hpriv->cap & HOST_CAP_SNTF))) in ahci_scr_offset()
639 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_stop_engine() local
648 if ((hpriv->flags & AHCI_HFLAG_WAKE_BEFORE_STOP) && in ahci_stop_engine()
688 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_start_fis_rx() local
693 if (hpriv->cap & HOST_CAP_64) in ahci_start_fis_rx()
698 if (hpriv->cap & HOST_CAP_64) in ahci_start_fis_rx()
734 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_power_up() local
741 if (hpriv->cap & HOST_CAP_SSS) { in ahci_power_up()
754 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_set_lpm() local
773 if (hpriv->cap & HOST_CAP_ALPM) { in ahci_set_lpm()
802 if ((hpriv->cap2 & HOST_CAP2_SDS) && in ahci_set_lpm()
803 (hpriv->cap2 & HOST_CAP2_SADM) && in ahci_set_lpm()
826 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_power_down() local
830 if (!(hpriv->cap & HOST_CAP_SSS)) in ahci_power_down()
847 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_start_port() local
858 if (!(hpriv->flags & AHCI_HFLAG_DELAY_ENGINE)) in ahci_start_port()
859 hpriv->start_engine(ap); in ahci_start_port()
896 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_deinit_port() local
899 rc = hpriv->stop_engine(ap); in ahci_deinit_port()
917 struct ahci_host_priv *hpriv = host->private_data; in ahci_reset_controller() local
918 void __iomem *mmio = hpriv->mmio; in ahci_reset_controller()
955 if (!(hpriv->flags & AHCI_HFLAG_NO_WRITE_TO_RO)) in ahci_reset_controller()
1040 struct ahci_host_priv *hpriv = host->private_data; in ahci_reset_em() local
1041 void __iomem *mmio = hpriv->mmio; in ahci_reset_em()
1056 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_transmit_led_message() local
1058 void __iomem *mmio = hpriv->mmio; in ahci_transmit_led_message()
1086 if (hpriv->em_msg_type & EM_MSG_TYPE_LED) { in ahci_transmit_led_message()
1097 writel(message[0], mmio + hpriv->em_loc); in ahci_transmit_led_message()
1098 writel(message[1], mmio + hpriv->em_loc+4); in ahci_transmit_led_message()
1205 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_port_clear_pending_irq() local
1220 writel(1 << ap->port_no, hpriv->mmio + HOST_IRQ_STAT); in ahci_port_clear_pending_irq()
1227 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_port_init() local
1241 if ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)) in ahci_port_init()
1247 struct ahci_host_priv *hpriv = host->private_data; in ahci_init_controller() local
1248 void __iomem *mmio = hpriv->mmio; in ahci_init_controller()
1273 struct ahci_host_priv *hpriv = dev->link->ap->host->private_data; in ahci_dev_config() local
1275 if (hpriv->flags & AHCI_HFLAG_SECT255) { in ahci_dev_config()
1315 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_kick_engine() local
1321 rc = hpriv->stop_engine(ap); in ahci_kick_engine()
1334 if (!(hpriv->cap & HOST_CAP_CLO)) { in ahci_kick_engine()
1352 hpriv->start_engine(ap); in ahci_kick_engine()
1401 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_do_softreset() local
1451 if (rc == -EBUSY && hpriv->flags & AHCI_HFLAG_SRST_TOUT_IS_OFFLINE) { in ahci_do_softreset()
1553 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_do_hardreset() local
1560 hpriv->stop_engine(ap); in ahci_do_hardreset()
1572 hpriv->start_engine(ap); in ahci_do_hardreset()
1710 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_error_intr() local
1751 if (hpriv->flags & AHCI_HFLAG_IGN_IRQ_IF_ERR) in ahci_error_intr()
1764 if (hpriv->flags & AHCI_HFLAG_IGN_SERR_INTERNAL) in ahci_error_intr()
1824 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_handle_port_interrupt() local
1853 if (hpriv->cap & HOST_CAP_SNTF) in ahci_handle_port_interrupt()
1959 struct ahci_host_priv *hpriv; in ahci_single_level_irq_intr() local
1964 hpriv = host->private_data; in ahci_single_level_irq_intr()
1965 mmio = hpriv->mmio; in ahci_single_level_irq_intr()
1972 irq_masked = irq_stat & hpriv->port_map; in ahci_single_level_irq_intr()
2059 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_thaw() local
2060 void __iomem *mmio = hpriv->mmio; in ahci_thaw()
2076 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_error_handler() local
2080 hpriv->stop_engine(ap); in ahci_error_handler()
2081 hpriv->start_engine(ap); in ahci_error_handler()
2087 hpriv->stop_engine(ap); in ahci_error_handler()
2102 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_set_aggressive_devslp() local
2141 rc = hpriv->stop_engine(ap); in ahci_set_aggressive_devslp()
2170 hpriv->start_engine(ap); in ahci_set_aggressive_devslp()
2182 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_enable_fbs() local
2198 rc = hpriv->stop_engine(ap); in ahci_enable_fbs()
2211 hpriv->start_engine(ap); in ahci_enable_fbs()
2216 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_disable_fbs() local
2231 rc = hpriv->stop_engine(ap); in ahci_disable_fbs()
2244 hpriv->start_engine(ap); in ahci_disable_fbs()
2344 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_port_start() local
2366 if ((hpriv->cap & HOST_CAP_FBS) && sata_pmp_supported(ap)) { in ahci_port_start()
2371 else if (hpriv->flags & AHCI_HFLAG_YES_FBS) { in ahci_port_start()
2427 if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) { in ahci_port_start()
2441 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_port_stop() local
2442 void __iomem *host_mmio = hpriv->mmio; in ahci_port_stop()
2461 struct ahci_host_priv *hpriv = host->private_data; in ahci_print_info() local
2465 vers = hpriv->version; in ahci_print_info()
2466 cap = hpriv->cap; in ahci_print_info()
2467 cap2 = hpriv->cap2; in ahci_print_info()
2468 impl = hpriv->port_map; in ahci_print_info()
2531 void ahci_set_em_messages(struct ahci_host_priv *hpriv, in ahci_set_em_messages() argument
2535 void __iomem *mmio = hpriv->mmio; in ahci_set_em_messages()
2539 if (!ahci_em_messages || !(hpriv->cap & HOST_CAP_EMS)) in ahci_set_em_messages()
2546 hpriv->em_loc = ((em_loc >> 16) * 4); in ahci_set_em_messages()
2547 hpriv->em_buf_sz = ((em_loc & 0xff) * 4); in ahci_set_em_messages()
2548 hpriv->em_msg_type = messages; in ahci_set_em_messages()
2559 struct ahci_host_priv *hpriv = host->private_data; in ahci_host_activate_multi_irqs() local
2571 int irq = hpriv->get_irq_vector(host, i); in ahci_host_activate_multi_irqs()
2603 struct ahci_host_priv *hpriv = host->private_data; in ahci_host_activate() local
2604 int irq = hpriv->irq; in ahci_host_activate()
2607 if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) { in ahci_host_activate()
2608 if (hpriv->irq_handler && in ahci_host_activate()
2609 hpriv->irq_handler != ahci_single_level_irq_intr) in ahci_host_activate()
2612 if (!hpriv->get_irq_vector) { in ahci_host_activate()
2620 rc = ata_host_activate(host, irq, hpriv->irq_handler, in ahci_host_activate()