1313#include <linux/kernel.h>
1414#include <linux/libata.h>
1515#include <linux/log2.h>
16- #include <linux/mfd/syscon.h>
1716#include <linux/module.h>
1817#include <linux/of.h>
1918#include <linux/platform_device.h>
2019#include <linux/pm.h>
21- #include <linux/regmap.h>
2220
2321#include "ahci.h"
2422
9290#define AHCI_DWC_PORT_PHYCR 0x74
9391#define AHCI_DWC_PORT_PHYSR 0x78
9492
95- /* Baikal-T1 AHCI SATA specific registers */
96- #define AHCI_BT1_HOST_PHYCR AHCI_DWC_HOST_GPCR
97- #define AHCI_BT1_HOST_MPLM_MASK GENMASK(29, 23)
98- #define AHCI_BT1_HOST_LOSDT_MASK GENMASK(22, 20)
99- #define AHCI_BT1_HOST_CRR BIT(19)
100- #define AHCI_BT1_HOST_CRW BIT(18)
101- #define AHCI_BT1_HOST_CRCD BIT(17)
102- #define AHCI_BT1_HOST_CRCA BIT(16)
103- #define AHCI_BT1_HOST_CRDI_MASK GENMASK(15, 0)
104-
105- #define AHCI_BT1_HOST_PHYSR AHCI_DWC_HOST_GPSR
106- #define AHCI_BT1_HOST_CRA BIT(16)
107- #define AHCI_BT1_HOST_CRDO_MASK GENMASK(15, 0)
108-
10993struct ahci_dwc_plat_data {
11094 unsigned int pflags ;
11195 unsigned int hflags ;
@@ -122,39 +106,6 @@ struct ahci_dwc_host_priv {
122106 u32 dmacr [AHCI_MAX_PORTS ];
123107};
124108
125- static int ahci_bt1_init (struct ahci_host_priv * hpriv )
126- {
127- struct ahci_dwc_host_priv * dpriv = hpriv -> plat_data ;
128- int ret ;
129-
130- /* APB, application and reference clocks are required */
131- if (!ahci_platform_find_clk (hpriv , "pclk" ) ||
132- !ahci_platform_find_clk (hpriv , "aclk" ) ||
133- !ahci_platform_find_clk (hpriv , "ref" )) {
134- dev_err (& dpriv -> pdev -> dev , "No system clocks specified\n" );
135- return - EINVAL ;
136- }
137-
138- /*
139- * Fully reset the SATA AXI and ref clocks domain to ensure the state
140- * machine is working from scratch especially if the reference clocks
141- * source has been changed.
142- */
143- ret = ahci_platform_assert_rsts (hpriv );
144- if (ret ) {
145- dev_err (& dpriv -> pdev -> dev , "Couldn't assert the resets\n" );
146- return ret ;
147- }
148-
149- ret = ahci_platform_deassert_rsts (hpriv );
150- if (ret ) {
151- dev_err (& dpriv -> pdev -> dev , "Couldn't de-assert the resets\n" );
152- return ret ;
153- }
154-
155- return 0 ;
156- }
157-
158109static struct ahci_host_priv * ahci_dwc_get_resources (struct platform_device * pdev )
159110{
160111 struct ahci_dwc_host_priv * dpriv ;
@@ -457,15 +408,9 @@ static struct ahci_dwc_plat_data ahci_dwc_plat = {
457408 .pflags = AHCI_PLATFORM_GET_RESETS ,
458409};
459410
460- static struct ahci_dwc_plat_data ahci_bt1_plat = {
461- .pflags = AHCI_PLATFORM_GET_RESETS | AHCI_PLATFORM_RST_TRIGGER ,
462- .init = ahci_bt1_init ,
463- };
464-
465411static const struct of_device_id ahci_dwc_of_match [] = {
466412 { .compatible = "snps,dwc-ahci" , & ahci_dwc_plat },
467413 { .compatible = "snps,spear-ahci" , & ahci_dwc_plat },
468- { .compatible = "baikal,bt1-ahci" , & ahci_bt1_plat },
469414 {},
470415};
471416MODULE_DEVICE_TABLE (of , ahci_dwc_of_match );
0 commit comments