for-5.12/libata-2021-02-17
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmAtmCUQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpl/ED/4rqmea107tCqfmqucSGO0r8KddiwjsGWmz gg+TSqpQe5j4PtwAgOK06aDIJhS3Aq1hROqnyBOrVtDkAp6daGlOPSu7j9GsjDA+ UBUrNFd7U9w55gZXpmA4Q3kE4N4xMMc+Sz6kDti3s1WRh+BPU6/cMKBEWAZrA5jd 6HNs2jkBqlbGA8xW9aQU9DrxVgpeBWoMg1SZ3D44bpozefVG5bA17dCKrMmxPIqd Vq4iA4qiItMKtgityedYHPCqIe4iE2L9ZqNImzRtp5O3zQXJ0vEqy/3nFb0HgWm7 qL3W7vQEM4Bp5sy9sayywkNQBDZAHCLZIoLmcarr1+mJmWJRIBjJl3SMF4Tg6Vr8 W7zc1LvRlElyj9OgWkq46NwUgV58mreOPj8AAvl3ntFIx20qx960/om3jBnREiUH P95++WiHc67gSTF9Xxl/jicMgiNPEcUbNiEXPs/1N9kIDfzl9ucrMjE/ECv4uvsS K4AxRb2rmjP0CgLBvTtJfs88C3SBRKu6xRhFrjz5EJF4xrZIEQTCZWoiSVZ/kD7W I81Rd1QQjZNTS4qgu6r4cUMrCcSYsDhdJ7CGeY7IRyncYb9TN0y7MmGTz+CcL59o rmt4DgrD8cY2NgN9exaPzdxX01zPFFRiib9ruX1aeNWr+Uyls2Dd1dwh9WBgHRpN bEpYdjBVYw== =g0xI -----END PGP SIGNATURE----- Merge tag 'for-5.12/libata-2021-02-17' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "Regulartors management addition from Florian, and a trivial change to avoid comma separated statements from Joe" * tag 'for-5.12/libata-2021-02-17' of git://git.kernel.dk/linux-block: ata: Avoid comma separated statements ata: ahci_brcm: Add back regulators management
This commit is contained in:
Коммит
bd018bbaa5
|
@ -377,6 +377,10 @@ static int __maybe_unused brcm_ahci_resume(struct device *dev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = ahci_platform_enable_regulators(hpriv);
|
||||
if (ret)
|
||||
goto out_disable_clks;
|
||||
|
||||
brcm_sata_init(priv);
|
||||
brcm_sata_phys_enable(priv);
|
||||
brcm_sata_alpm_init(hpriv);
|
||||
|
@ -406,6 +410,8 @@ out_disable_platform_phys:
|
|||
ahci_platform_disable_phys(hpriv);
|
||||
out_disable_phys:
|
||||
brcm_sata_phys_disable(priv);
|
||||
ahci_platform_disable_regulators(hpriv);
|
||||
out_disable_clks:
|
||||
ahci_platform_disable_clks(hpriv);
|
||||
return ret;
|
||||
}
|
||||
|
@ -490,6 +496,10 @@ static int brcm_ahci_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto out_reset;
|
||||
|
||||
ret = ahci_platform_enable_regulators(hpriv);
|
||||
if (ret)
|
||||
goto out_disable_clks;
|
||||
|
||||
/* Must be first so as to configure endianness including that
|
||||
* of the standard AHCI register space.
|
||||
*/
|
||||
|
@ -499,7 +509,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
|
|||
priv->port_mask = brcm_ahci_get_portmask(hpriv, priv);
|
||||
if (!priv->port_mask) {
|
||||
ret = -ENODEV;
|
||||
goto out_disable_clks;
|
||||
goto out_disable_regulators;
|
||||
}
|
||||
|
||||
/* Must be done before ahci_platform_enable_phys() */
|
||||
|
@ -524,6 +534,8 @@ out_disable_platform_phys:
|
|||
ahci_platform_disable_phys(hpriv);
|
||||
out_disable_phys:
|
||||
brcm_sata_phys_disable(priv);
|
||||
out_disable_regulators:
|
||||
ahci_platform_disable_regulators(hpriv);
|
||||
out_disable_clks:
|
||||
ahci_platform_disable_clks(hpriv);
|
||||
out_reset:
|
||||
|
|
|
@ -202,14 +202,19 @@ static void pata_icside_set_dmamode(struct ata_port *ap, struct ata_device *adev
|
|||
* Choose the IOMD cycle timing which ensure that the interface
|
||||
* satisfies the measured active, recovery and cycle times.
|
||||
*/
|
||||
if (t.active <= 50 && t.recover <= 375 && t.cycle <= 425)
|
||||
iomd_type = 'D', cycle = 187;
|
||||
else if (t.active <= 125 && t.recover <= 375 && t.cycle <= 500)
|
||||
iomd_type = 'C', cycle = 250;
|
||||
else if (t.active <= 200 && t.recover <= 550 && t.cycle <= 750)
|
||||
iomd_type = 'B', cycle = 437;
|
||||
else
|
||||
iomd_type = 'A', cycle = 562;
|
||||
if (t.active <= 50 && t.recover <= 375 && t.cycle <= 425) {
|
||||
iomd_type = 'D';
|
||||
cycle = 187;
|
||||
} else if (t.active <= 125 && t.recover <= 375 && t.cycle <= 500) {
|
||||
iomd_type = 'C';
|
||||
cycle = 250;
|
||||
} else if (t.active <= 200 && t.recover <= 550 && t.cycle <= 750) {
|
||||
iomd_type = 'B';
|
||||
cycle = 437;
|
||||
} else {
|
||||
iomd_type = 'A';
|
||||
cycle = 562;
|
||||
}
|
||||
|
||||
ata_dev_info(adev, "timings: act %dns rec %dns cyc %dns (%c)\n",
|
||||
t.active, t.recover, t.cycle, iomd_type);
|
||||
|
|
Загрузка…
Ссылка в новой задаче