mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
33629d3509
Synopsys AHCI SATA controller can work pretty under with the generic AHCI-platform driver control. But there are vendor-specific peculiarities which can tune the device performance up and which may need to be fixed up for proper device functioning. In addition some DWC AHCI-based controllers may require small platform-specific fixups, so adding them in the generic AHCI driver would have ruined the code simplicity. Shortly speaking in order to keep the generic AHCI-platform code clean and have DWC AHCI SATA-specific features supported we suggest to add a dedicated DWC AHCI SATA device driver. Aside with the standard AHCI-platform resources getting, enabling/disabling and the controller registration the new driver performs the next actions. First of all there is a way to verify whether the HBA/ports capabilities activated in OF are correct. Almost all features availability is reflected in the vendor-specific parameters registers. So the DWC AHCI driver does the capabilities sanity check based on the corresponding fields state. Secondly if either the Command Completion Coalescing or the Device Sleep feature is enabled the DWC AHCI-specific internal 1ms timer must be fixed in accordance with the application clock signal frequency. In particular the timer value must be set to be Fapp * 1000. Normally the SoC designers pre-configure the TIMER1MS register to contain a correct value by default. But the platforms can support the application clock rate change. If that happens the 1ms timer value must be accordingly updated otherwise the dependent features won't work as expected. In the DWC AHCI driver we suggest to rely on the "aclk" reference clock rate to set the timer interval up. That clock source is supposed to be the AHCI SATA application clock in accordance with the DT bindings. Finally DWC AHCI SATA controller AXI/AHB bus DMA-engine can be tuned up to transfer up to 1024 * FIFO words at a time by setting the Tx/Rx transaction size in the DMA control register. The maximum value depends on the DMA data bus and AXI/AHB bus maximum burst length. In most of the cases it's better to set the maximum possible value to reach the best AHCI SATA controller performance. But sometimes in order to improve the system interconnect responsiveness, transferring in smaller data chunks may be more preferable. For such cases and for the case when the default value doesn't provide the best DMA bus performance we suggest to use the new HBA-port specific DT-properties "snps,{tx,rx}-ts-max" to tune the DMA transactions size up. After all the settings denoted above are handled the DWC AHCI SATA driver proceeds further with the standard AHCI-platform host initializations. Note since DWC AHCI controller is now have a dedicated driver we can discard the corresponding compatible string from the ahci-platform.c module. The same concerns "snps,spear-ahci" compatible string, which is also based on the DWC AHCI IP-core. Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
133 lines
5.4 KiB
Makefile
133 lines
5.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
obj-$(CONFIG_ATA) += libata.o
|
|
|
|
# non-SFF interface
|
|
obj-$(CONFIG_SATA_AHCI) += ahci.o libahci.o
|
|
obj-$(CONFIG_SATA_ACARD_AHCI) += acard-ahci.o libahci.o
|
|
obj-$(CONFIG_SATA_AHCI_SEATTLE) += ahci_seattle.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_SATA_AHCI_PLATFORM) += ahci_platform.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_SATA_FSL) += sata_fsl.o
|
|
obj-$(CONFIG_SATA_GEMINI) += sata_gemini.o
|
|
obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o
|
|
obj-$(CONFIG_SATA_SIL24) += sata_sil24.o
|
|
obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o
|
|
obj-$(CONFIG_SATA_HIGHBANK) += sata_highbank.o libahci.o
|
|
obj-$(CONFIG_AHCI_BRCM) += ahci_brcm.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_CEVA) += ahci_ceva.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_DA850) += ahci_da850.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_DM816) += ahci_dm816.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_DWC) += ahci_dwc.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_IMX) += ahci_imx.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_MTK) += ahci_mtk.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_MVEBU) += ahci_mvebu.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_OCTEON) += ahci_octeon.o
|
|
obj-$(CONFIG_AHCI_SUNXI) += ahci_sunxi.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_ST) += ahci_st.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_TEGRA) += ahci_tegra.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_XGENE) += ahci_xgene.o libahci.o libahci_platform.o
|
|
obj-$(CONFIG_AHCI_QORIQ) += ahci_qoriq.o libahci.o libahci_platform.o
|
|
|
|
# SFF w/ custom DMA
|
|
obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
|
|
obj-$(CONFIG_PATA_ARASAN_CF) += pata_arasan_cf.o
|
|
obj-$(CONFIG_PATA_OCTEON_CF) += pata_octeon_cf.o
|
|
obj-$(CONFIG_SATA_QSTOR) += sata_qstor.o
|
|
obj-$(CONFIG_SATA_SX4) += sata_sx4.o
|
|
|
|
# SFF SATA w/ BMDMA
|
|
obj-$(CONFIG_ATA_PIIX) += ata_piix.o
|
|
obj-$(CONFIG_SATA_MV) += sata_mv.o
|
|
obj-$(CONFIG_SATA_NV) += sata_nv.o
|
|
obj-$(CONFIG_SATA_PROMISE) += sata_promise.o
|
|
obj-$(CONFIG_SATA_RCAR) += sata_rcar.o
|
|
obj-$(CONFIG_SATA_SIL) += sata_sil.o
|
|
obj-$(CONFIG_SATA_SIS) += sata_sis.o
|
|
obj-$(CONFIG_SATA_SVW) += sata_svw.o
|
|
obj-$(CONFIG_SATA_ULI) += sata_uli.o
|
|
obj-$(CONFIG_SATA_VIA) += sata_via.o
|
|
obj-$(CONFIG_SATA_VITESSE) += sata_vsc.o
|
|
|
|
# SFF PATA w/ BMDMA
|
|
obj-$(CONFIG_PATA_ALI) += pata_ali.o
|
|
obj-$(CONFIG_PATA_AMD) += pata_amd.o
|
|
obj-$(CONFIG_PATA_ARTOP) += pata_artop.o
|
|
obj-$(CONFIG_PATA_ATIIXP) += pata_atiixp.o
|
|
obj-$(CONFIG_PATA_ATP867X) += pata_atp867x.o
|
|
obj-$(CONFIG_PATA_BK3710) += pata_bk3710.o
|
|
obj-$(CONFIG_PATA_CMD64X) += pata_cmd64x.o
|
|
obj-$(CONFIG_PATA_CS5520) += pata_cs5520.o
|
|
obj-$(CONFIG_PATA_CS5530) += pata_cs5530.o
|
|
obj-$(CONFIG_PATA_CS5535) += pata_cs5535.o
|
|
obj-$(CONFIG_PATA_CS5536) += pata_cs5536.o
|
|
obj-$(CONFIG_PATA_CYPRESS) += pata_cypress.o
|
|
obj-$(CONFIG_PATA_EFAR) += pata_efar.o
|
|
obj-$(CONFIG_PATA_EP93XX) += pata_ep93xx.o
|
|
obj-$(CONFIG_PATA_FTIDE010) += pata_ftide010.o
|
|
obj-$(CONFIG_PATA_HPT366) += pata_hpt366.o
|
|
obj-$(CONFIG_PATA_HPT37X) += pata_hpt37x.o
|
|
obj-$(CONFIG_PATA_HPT3X2N) += pata_hpt3x2n.o
|
|
obj-$(CONFIG_PATA_HPT3X3) += pata_hpt3x3.o
|
|
obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o
|
|
obj-$(CONFIG_PATA_IMX) += pata_imx.o
|
|
obj-$(CONFIG_PATA_IT8213) += pata_it8213.o
|
|
obj-$(CONFIG_PATA_IT821X) += pata_it821x.o
|
|
obj-$(CONFIG_PATA_JMICRON) += pata_jmicron.o
|
|
obj-$(CONFIG_PATA_MACIO) += pata_macio.o
|
|
obj-$(CONFIG_PATA_MARVELL) += pata_marvell.o
|
|
obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o
|
|
obj-$(CONFIG_PATA_NETCELL) += pata_netcell.o
|
|
obj-$(CONFIG_PATA_NINJA32) += pata_ninja32.o
|
|
obj-$(CONFIG_PATA_NS87415) += pata_ns87415.o
|
|
obj-$(CONFIG_PATA_OLDPIIX) += pata_oldpiix.o
|
|
obj-$(CONFIG_PATA_OPTIDMA) += pata_optidma.o
|
|
obj-$(CONFIG_PATA_PDC2027X) += pata_pdc2027x.o
|
|
obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o
|
|
obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o
|
|
obj-$(CONFIG_PATA_RDC) += pata_rdc.o
|
|
obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o
|
|
obj-$(CONFIG_PATA_SCH) += pata_sch.o
|
|
obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o
|
|
obj-$(CONFIG_PATA_SIL680) += pata_sil680.o
|
|
obj-$(CONFIG_PATA_SIS) += pata_sis.o
|
|
obj-$(CONFIG_PATA_TOSHIBA) += pata_piccolo.o
|
|
obj-$(CONFIG_PATA_TRIFLEX) += pata_triflex.o
|
|
obj-$(CONFIG_PATA_VIA) += pata_via.o
|
|
obj-$(CONFIG_PATA_WINBOND) += pata_sl82c105.o
|
|
|
|
# SFF PIO only
|
|
obj-$(CONFIG_PATA_CMD640_PCI) += pata_cmd640.o
|
|
obj-$(CONFIG_PATA_FALCON) += pata_falcon.o
|
|
obj-$(CONFIG_PATA_GAYLE) += pata_gayle.o
|
|
obj-$(CONFIG_PATA_BUDDHA) += pata_buddha.o
|
|
obj-$(CONFIG_PATA_ISAPNP) += pata_isapnp.o
|
|
obj-$(CONFIG_PATA_IXP4XX_CF) += pata_ixp4xx_cf.o
|
|
obj-$(CONFIG_PATA_MPIIX) += pata_mpiix.o
|
|
obj-$(CONFIG_PATA_NS87410) += pata_ns87410.o
|
|
obj-$(CONFIG_PATA_OPTI) += pata_opti.o
|
|
obj-$(CONFIG_PATA_PCMCIA) += pata_pcmcia.o
|
|
obj-$(CONFIG_PATA_PALMLD) += pata_palmld.o
|
|
obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o
|
|
obj-$(CONFIG_PATA_OF_PLATFORM) += pata_of_platform.o
|
|
obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o
|
|
obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o
|
|
obj-$(CONFIG_PATA_SAMSUNG_CF) += pata_samsung_cf.o
|
|
|
|
obj-$(CONFIG_PATA_PXA) += pata_pxa.o
|
|
|
|
# Should be last but two libata driver
|
|
obj-$(CONFIG_PATA_ACPI) += pata_acpi.o
|
|
# Should be last but one libata driver
|
|
obj-$(CONFIG_ATA_GENERIC) += ata_generic.o
|
|
# Should be last libata driver
|
|
obj-$(CONFIG_PATA_LEGACY) += pata_legacy.o
|
|
|
|
libata-y := libata-core.o libata-scsi.o libata-eh.o \
|
|
libata-transport.o libata-trace.o
|
|
libata-$(CONFIG_SATA_HOST) += libata-sata.o
|
|
libata-$(CONFIG_ATA_SFF) += libata-sff.o
|
|
libata-$(CONFIG_SATA_PMP) += libata-pmp.o
|
|
libata-$(CONFIG_ATA_ACPI) += libata-acpi.o
|
|
libata-$(CONFIG_SATA_ZPODD) += libata-zpodd.o
|
|
libata-$(CONFIG_PATA_TIMINGS) += libata-pata-timings.o
|