/freebsd/sys/dev/mvs/ |
H A D | mvs_soc.c | 101 struct mvs_controller *ctlr = device_get_softc(dev); in mvs_attach() local 107 ctlr->dev = dev; in mvs_attach() 113 ctlr->channels = mvs_ids[i].ports; in mvs_attach() 114 ctlr->quirks = mvs_ids[i].quirks; in mvs_attach() 115 ctlr->ccc = 0; in mvs_attach() 117 device_get_unit(dev), "ccc", &ctlr->ccc); in mvs_attach() 118 ctlr->cccc = 8; in mvs_attach() 120 device_get_unit(dev), "cccc", &ctlr->cccc); in mvs_attach() 121 if (ctlr->ccc == 0 || ctlr in mvs_attach() 182 struct mvs_controller *ctlr = device_get_softc(dev); mvs_detach() local 205 struct mvs_controller *ctlr = device_get_softc(dev); mvs_ctlr_setup() local 234 struct mvs_controller *ctlr = device_get_softc(dev); mvs_edma() local 253 struct mvs_controller *ctlr = device_get_softc(dev); mvs_suspend() local 272 struct mvs_controller *ctlr = device_get_softc(dev); mvs_setup_interrupt() local 298 struct mvs_controller *ctlr = data; mvs_intr() local 337 struct mvs_controller *ctlr = device_get_softc(dev); mvs_alloc_resource() local 387 struct mvs_controller *ctlr = device_get_softc(dev); mvs_setup_intr() local 403 struct mvs_controller *ctlr = device_get_softc(dev); mvs_teardown_intr() local [all...] |
/freebsd/sys/dev/ahci/ |
H A D | ahci_pci.c | 493 struct ahci_controller *ctlr = device_get_softc(dev); in ahci_pci_attach() local 509 ctlr->quirks = ahci_ids[i].quirks; in ahci_pci_attach() 511 if (ctlr->quirks & AHCI_Q_IOMMU_BUSWIDE) { in ahci_pci_attach() 525 ctlr->quirks |= AHCI_Q_SATA1_UNIT0; in ahci_pci_attach() 527 "quirks", &ctlr->quirks); in ahci_pci_attach() 528 ctlr->vendorid = pci_get_vendor(dev); in ahci_pci_attach() 529 ctlr->deviceid = pci_get_device(dev); in ahci_pci_attach() 530 ctlr->subvendorid = pci_get_subvendor(dev); in ahci_pci_attach() 531 ctlr->subdeviceid = pci_get_subdevice(dev); in ahci_pci_attach() 534 if (ctlr->quirks & AHCI_Q_ABAR0) in ahci_pci_attach() [all …]
|
H A D | ahci.c | 114 struct ahci_controller *ctlr = device_get_softc(dev); in ahci_ctlr_setup() local 116 ATA_OUTL(ctlr->r_mem, AHCI_IS, ATA_INL(ctlr->r_mem, AHCI_IS)); in ahci_ctlr_setup() 118 if (ctlr->ccc) { in ahci_ctlr_setup() 119 ATA_OUTL(ctlr->r_mem, AHCI_CCCP, ATA_INL(ctlr->r_mem, AHCI_PI)); in ahci_ctlr_setup() 120 ATA_OUTL(ctlr->r_mem, AHCI_CCCC, in ahci_ctlr_setup() 121 (ctlr->ccc << AHCI_CCCC_TV_SHIFT) | in ahci_ctlr_setup() 124 ctlr->cccv = (ATA_INL(ctlr in ahci_ctlr_setup() 141 struct ahci_controller *ctlr = device_get_softc(dev); ahci_ctlr_reset() local 196 struct ahci_controller *ctlr = device_get_softc(dev); ahci_attach() local 393 struct ahci_controller *ctlr = device_get_softc(dev); ahci_detach() local 419 struct ahci_controller *ctlr = device_get_softc(dev); ahci_free_mem() local 437 struct ahci_controller *ctlr = device_get_softc(dev); ahci_setup_interrupt() local 499 struct ahci_controller *ctlr = irq->ctlr; ahci_intr() local 548 struct ahci_controller *ctlr = irq->ctlr; ahci_intr_one() local 564 struct ahci_controller *ctlr = irq->ctlr; ahci_intr_one_edge() local 580 struct ahci_controller *ctlr = device_get_softc(dev); ahci_alloc_resource() local 663 struct ahci_controller *ctlr = device_get_softc(dev); ahci_setup_intr() local 679 struct ahci_controller *ctlr = device_get_softc(dev); ahci_teardown_intr() local 715 struct ahci_controller *ctlr = device_get_softc(dev); ahci_get_dma_tag() local 723 struct ahci_controller *ctlr = device_get_softc(dev); ahci_attached() local 733 struct ahci_controller *ctlr = device_get_softc(dev); ahci_detached() local 745 struct ahci_controller *ctlr = device_get_softc(dev); ahci_getch() local 800 struct ahci_controller *ctlr = device_get_softc(device_get_parent(dev)); ahci_ch_attach() local 2455 struct ahci_controller *ctlr = device_get_softc(device_get_parent(ch->dev)); ahci_reset() local [all...] |
H A D | ahci_mv_fdt.c | 62 ahci_mv_regret_config(struct ahci_controller *ctlr) in ahci_mv_regret_config() argument 70 ATA_OUTL(ctlr->r_mem, AHCI_VENDOR_SPECIFIC_0_ADDR, 0x4); in ahci_mv_regret_config() 71 ATA_OUTL(ctlr->r_mem, AHCI_VENDOR_SPECIFIC_0_DATA, 0x80); in ahci_mv_regret_config() 92 struct ahci_controller *ctlr; in ahci_mv_fdt_attach() local 95 ctlr = device_get_softc(dev); in ahci_mv_fdt_attach() 96 ctlr->dev = dev; in ahci_mv_fdt_attach() 97 ctlr->r_rid = 0; in ahci_mv_fdt_attach() 98 ctlr->quirks = AHCI_Q_2CH; in ahci_mv_fdt_attach() 99 ctlr->numirqs = 1; in ahci_mv_fdt_attach() 102 ctlr->quirks |= AHCI_Q_MRVL_SR_DEL; in ahci_mv_fdt_attach() [all …]
|
H A D | ahci_fsl_fdt.c | 170 struct ahci_controller ctlr; /* Must be the first field. */ member 245 ahci = &ctrl->ctlr; in ahci_fsl_fdt_phy_init() 260 if (ctrl->ctlr.dma_coherent) in ahci_fsl_fdt_phy_init() 273 if (ctrl->ctlr.dma_coherent) in ahci_fsl_fdt_phy_init() 295 struct ahci_fsl_fdt_controller *ctlr; in ahci_fsl_fdt_attach() local 302 ctlr = device_get_softc(dev); in ahci_fsl_fdt_attach() 303 ctlr->soc_type = in ahci_fsl_fdt_attach() 305 ahci = &ctlr->ctlr; in ahci_fsl_fdt_attach() 340 &ctlr->r_ecc_rid); in ahci_fsl_fdt_attach() 342 ctlr->r_ecc = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in ahci_fsl_fdt_attach() [all …]
|
/freebsd/sys/dev/ata/chipsets/ |
H A D | ata-siliconimage.c | 75 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_sii_probe() local 94 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_sii_probe() 98 ctlr->chipinit = ata_sii_chipinit; in ata_sii_probe() 105 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_sii_chipinit() local 110 switch (ctlr->chip->cfg1) { in ata_sii_chipinit() 112 ctlr->r_type2 = SYS_RES_MEMORY; in ata_sii_chipinit() 113 ctlr->r_rid2 = PCIR_BAR(5); in ata_sii_chipinit() 114 if (!(ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, in ata_sii_chipinit() 115 &ctlr->r_rid2, RF_ACTIVE))){ in ata_sii_chipinit() 116 if (ctlr->chip->chipid != ATA_SII0680 || in ata_sii_chipinit() [all …]
|
H A D | ata-intel.c | 92 #define ATA_INTEL_SMAP(ctlr, ch) \ argument 93 &((struct ata_intel_data *)((ctlr)->chipset_data))->smap[(ch)->unit * 2] 94 #define ATA_INTEL_LOCK(ctlr) \ argument 95 mtx_lock(&((struct ata_intel_data *)((ctlr)->chipset_data))->lock) 96 #define ATA_INTEL_UNLOCK(ctlr) \ argument 97 mtx_unlock(&((struct ata_intel_data *)((ctlr)->chipset_data))->lock) 105 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_intel_probe() local 198 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_intel_probe() 202 ctlr->chipinit = ata_intel_chipinit; in ata_intel_probe() 203 ctlr->chipdeinit = ata_intel_chipdeinit; in ata_intel_probe() [all …]
|
H A D | ata-acerlabs.c | 75 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_ali_probe() local 92 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_ali_probe() 96 ctlr->chipinit = ata_ali_chipinit; in ata_ali_probe() 97 ctlr->chipdeinit = ata_ali_chipdeinit; in ata_ali_probe() 104 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_ali_chipinit() local 111 switch (ctlr->chip->cfg2) { in ata_ali_chipinit() 113 ctlr->channels = ctlr->chip->cfg1; in ata_ali_chipinit() 114 ctlr->ch_attach = ata_ali_sata_ch_attach; in ata_ali_chipinit() 115 ctlr->ch_detach = ata_pci_ch_detach; in ata_ali_chipinit() 116 ctlr->setmode = ata_sata_setmode; in ata_ali_chipinit() [all …]
|
H A D | ata-nvidia.c | 71 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_nvidia_probe() local 175 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_nvidia_probe() 178 if ((ctlr->chip->cfg1 & NVAHCI) && in ata_nvidia_probe() 183 ctlr->chipinit = ata_nvidia_chipinit; in ata_nvidia_probe() 190 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_nvidia_chipinit() local 195 if (ctlr->chip->cfg1 & NVAHCI) { in ata_nvidia_chipinit() 196 ctlr->ch_attach = ata_nvidia_ch_attach_dumb; in ata_nvidia_chipinit() 197 ctlr->setmode = ata_sata_setmode; in ata_nvidia_chipinit() 198 } else if (ctlr->chip->max_dma >= ATA_SA150) { in ata_nvidia_chipinit() 200 ctlr->r_type2 = SYS_RES_IOPORT; in ata_nvidia_chipinit() [all …]
|
H A D | ata-via.c | 88 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_via_probe() local 131 if (!(ctlr->chip = ata_find_chip(dev, ids, -99))) in ata_via_probe() 135 if (!(ctlr->chip = ata_match_chip(dev, new_ids))) in ata_via_probe() 140 ctlr->chipinit = ata_via_chipinit; in ata_via_probe() 147 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_via_chipinit() local 153 if (ctlr->chip->cfg2 & VIASATA) { in ata_via_chipinit() 154 ctlr->ch_attach = ata_via_sata_ch_attach; in ata_via_chipinit() 155 ctlr->setmode = ata_via_sata_setmode; in ata_via_chipinit() 156 ctlr->getrev = ata_via_sata_getrev; in ata_via_chipinit() 157 ctlr->reset = ata_via_sata_reset; in ata_via_chipinit() [all …]
|
H A D | ata-ati.c | 72 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_ati_probe() local 100 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_ati_probe() 103 switch (ctlr->chip->cfg1) { in ata_ati_probe() 105 ctlr->chipinit = ata_ati_chipinit; in ata_ati_probe() 111 ctlr->chipinit = ata_sii_chipinit; in ata_ati_probe() 116 ctlr->chipinit = ata_ati_chipinit; in ata_ati_probe() 127 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_ati_chipinit() local 134 if (ctlr->chip->cfg1 == ATI_AHCI) { in ata_ati_chipinit() 135 ctlr->ch_attach = ata_ati_dumb_ch_attach; in ata_ati_chipinit() 136 ctlr->setmode = ata_sata_setmode; in ata_ati_chipinit() [all …]
|
H A D | ata-marvell.c | 87 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_marvell_probe() local 102 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_marvell_probe() 107 switch (ctlr->chip->cfg2) { in ata_marvell_probe() 109 ctlr->chipinit = ata_marvell_chipinit; in ata_marvell_probe() 112 ctlr->chipinit = ata_marvell_dummy_chipinit; in ata_marvell_probe() 121 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_marvell_chipinit() local 127 if (ctlr->chip->cfg1) { in ata_marvell_chipinit() 134 ctlr->ch_attach = ata_marvell_ch_attach; in ata_marvell_chipinit() 135 ctlr->ch_detach = ata_pci_ch_detach; in ata_marvell_chipinit() 136 ctlr in ata_marvell_chipinit() 158 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); ata_marvell_setmode() local 175 struct ata_pci_controller *ctlr = device_get_softc(dev); ata_marvell_dummy_chipinit() local [all...] |
H A D | ata-serverworks.c | 74 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_serverworks_probe() local 92 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_serverworks_probe() 96 ctlr->chipinit = ata_serverworks_chipinit; in ata_serverworks_probe() 104 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); in ata_serverworks_status() local 109 if (!(ATA_INL(ctlr->r_res2, 0x1f80) & (1 << ch->unit))) in ata_serverworks_status() 125 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_serverworks_chipinit() local 130 if (ctlr->chip->cfg1 == SWKS_MIO) { in ata_serverworks_chipinit() 131 ctlr->r_type2 = SYS_RES_MEMORY; in ata_serverworks_chipinit() 132 ctlr->r_rid2 = PCIR_BAR(5); in ata_serverworks_chipinit() 133 if (!(ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, in ata_serverworks_chipinit() [all …]
|
H A D | ata-amd.c | 67 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_amd_probe() local 79 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_amd_probe() 83 ctlr->chipinit = ata_amd_chipinit; in ata_amd_probe() 90 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_amd_chipinit() local 96 if (ctlr->chip->cfg1 & AMD_BUG) in ata_amd_chipinit() 101 ctlr->ch_attach = ata_amd_ch_attach; in ata_amd_chipinit() 102 ctlr->setmode = ata_amd_setmode; in ata_amd_chipinit() 110 struct ata_pci_controller *ctlr = device_get_softc(parent); in ata_amd_setmode() local 120 mode = min(mode, ctlr->chip->max_dma); in ata_amd_setmode() 121 if (ctlr->chip->cfg1 & AMD_CABLE) { in ata_amd_setmode() [all …]
|
H A D | ata-acard.c | 68 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_acard_probe() local 80 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_acard_probe() 84 ctlr->chipinit = ata_acard_chipinit; in ata_acard_probe() 91 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_acard_chipinit() local 96 ctlr->ch_attach = ata_acard_ch_attach; in ata_acard_chipinit() 97 ctlr->ch_detach = ata_pci_ch_detach; in ata_acard_chipinit() 98 if (ctlr->chip->cfg1 == ATP_OLD) { in ata_acard_chipinit() 99 ctlr->setmode = ata_acard_850_setmode; in ata_acard_chipinit() 101 ctlr->channels = 1; in ata_acard_chipinit() 105 ctlr->setmode = ata_acard_86X_setmode; in ata_acard_chipinit() [all …]
|
H A D | ata-ite.c | 64 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_ite_probe() local 74 if (!(ctlr->chip = ata_match_chip(dev, ids))) in ata_ite_probe() 78 ctlr->chipinit = ata_ite_chipinit; in ata_ite_probe() 85 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_ite_chipinit() local 90 if (ctlr->chip->chipid == ATA_IT8213F) { in ata_ite_chipinit() 92 ctlr->channels = 1; in ata_ite_chipinit() 94 ctlr->setmode = ata_ite_8213_setmode; in ata_ite_chipinit() 104 ctlr->setmode = ata_ite_821x_setmode; in ata_ite_chipinit() 106 ctlr->chipset_data = NULL; in ata_ite_chipinit() 108 ctlr->ch_attach = ata_ite_ch_attach; in ata_ite_chipinit() [all …]
|
H A D | ata-cyrix.c | 63 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_cyrix_probe() local 67 ctlr->chipinit = ata_cyrix_chipinit; in ata_cyrix_probe() 76 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_cyrix_chipinit() local 80 ctlr->ch_attach = ata_cyrix_ch_attach; in ata_cyrix_chipinit() 81 ctlr->setmode = ata_cyrix_setmode; in ata_cyrix_chipinit() 98 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); in ata_cyrix_setmode() local 111 if (ctlr->r_res1) { in ata_cyrix_setmode()
|
H A D | ata-netcell.c | 63 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_netcell_probe() local 67 ctlr->chipinit = ata_netcell_chipinit; in ata_netcell_probe() 76 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_netcell_chipinit() local 81 ctlr->ch_attach = ata_netcell_ch_attach; in ata_netcell_chipinit() 82 ctlr->setmode = ata_netcell_setmode; in ata_netcell_chipinit()
|
H A D | ata-national.c | 63 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_national_probe() local 68 ctlr->chipinit = ata_national_chipinit; in ata_national_probe() 77 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_national_chipinit() local 82 ctlr->ch_attach = ata_national_ch_attach; in ata_national_chipinit() 83 ctlr->setmode = ata_national_setmode; in ata_national_chipinit()
|
H A D | ata-cypress.c | 62 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_cypress_probe() local 75 ctlr->chipinit = ata_cypress_chipinit; in ata_cypress_probe() 84 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_cypress_chipinit() local 89 ctlr->setmode = ata_cypress_setmode; in ata_cypress_chipinit()
|
H A D | ata-cenatek.c | 58 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_cenatek_probe() local 63 ctlr->chipinit = ata_generic_chipinit; in ata_cenatek_probe()
|
H A D | ata-micron.c | 58 struct ata_pci_controller *ctlr = device_get_softc(dev); in ata_micron_probe() local 64 ctlr->chipinit = ata_generic_chipinit; in ata_micron_probe()
|
/freebsd/sys/arm/allwinner/ |
H A D | a10_ahci.c | 162 struct ahci_controller *ctlr = device_get_softc(dev); in ahci_a10_phy_reset() local 176 ATA_OUTL(ctlr->r_mem, AHCI_RWCR, 0); in ahci_a10_phy_reset() 183 ahci_set(ctlr->r_mem, AHCI_PHYCS1R, PHYCS1R_HIGHZ); in ahci_a10_phy_reset() 188 ahci_mask_set(ctlr->r_mem, AHCI_PHYCS0R, in ahci_a10_phy_reset() 195 ahci_mask_set(ctlr->r_mem, AHCI_PHYCS1R, in ahci_a10_phy_reset() 202 ahci_set(ctlr->r_mem, AHCI_PHYCS1R, PHYCS1R_BIT15 | PHYCS1R_BIT28); in ahci_a10_phy_reset() 209 ahci_clr(ctlr->r_mem, AHCI_PHYCS1R, PHYCS1R_HIGHZ); in ahci_a10_phy_reset() 214 ahci_mask_set(ctlr->r_mem, AHCI_PHYCS0R, in ahci_a10_phy_reset() 220 ahci_mask_set(ctlr->r_mem, AHCI_PHYCS2R, ~PHYCS2R_UF1_MASK, in ahci_a10_phy_reset() 229 ahci_set(ctlr->r_mem, AHCI_PHYCS0R, PHYCS0R_POWER_ENABLE); in ahci_a10_phy_reset() [all …]
|
/freebsd/sys/arm/freescale/imx/ |
H A D | imx6_ahci.c | 231 struct ahci_controller* ctlr; in imx6_ahci_attach() local 236 ctlr = device_get_softc(dev); in imx6_ahci_attach() 245 ctlr->vendorid = 0; in imx6_ahci_attach() 246 ctlr->deviceid = 0; in imx6_ahci_attach() 247 ctlr->subvendorid = 0; in imx6_ahci_attach() 248 ctlr->subdeviceid = 0; in imx6_ahci_attach() 249 ctlr->numirqs = 1; in imx6_ahci_attach() 250 ctlr->r_rid = 0; in imx6_ahci_attach() 251 if ((ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in imx6_ahci_attach() 252 &ctlr->r_rid, RF_ACTIVE)) == NULL) { in imx6_ahci_attach() [all …]
|
/freebsd/sys/dev/siis/ |
H A D | siis.c | 139 struct siis_controller *ctlr = device_get_softc(dev); in siis_attach() local 144 ctlr->dev = dev; in siis_attach() 149 ctlr->quirks = siis_ids[i].quirks; in siis_attach() 151 ctlr->r_grid = PCIR_BAR(0); in siis_attach() 152 if (!(ctlr->r_gmem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in siis_attach() 153 &ctlr->r_grid, RF_ACTIVE))) in siis_attach() 155 ctlr->gctl = ATA_INL(ctlr->r_gmem, SIIS_GCTL); in siis_attach() 157 ctlr->r_rid = PCIR_BAR(2); in siis_attach() 158 if (!(ctlr in siis_attach() 205 struct siis_controller *ctlr = device_get_softc(dev); siis_detach() local 228 struct siis_controller *ctlr = device_get_softc(dev); siis_suspend() local 240 struct siis_controller *ctlr = device_get_softc(dev); siis_resume() local 259 struct siis_controller *ctlr = device_get_softc(dev); siis_setup_interrupt() local 294 struct siis_controller *ctlr = (struct siis_controller *)data; siis_intr() local 317 struct siis_controller *ctlr = device_get_softc(dev); siis_alloc_resource() local 367 struct siis_controller *ctlr = device_get_softc(dev); siis_setup_intr() local 383 struct siis_controller *ctlr = device_get_softc(dev); siis_teardown_intr() local 457 struct siis_controller *ctlr = device_get_softc(device_get_parent(dev)); siis_ch_attach() local [all...] |