8130-ls1046a-sata-Add-LS1046A-sata-support.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 5cd461cd17c3e27e5501e499d5d865b60ee58257 Mon Sep 17 00:00:00 2001
  2. From: Gong Qianyu <Qianyu.Gong@nxp.com>
  3. Date: Mon, 26 Sep 2016 12:29:24 +0800
  4. Subject: [PATCH 130/141] ls1046a/sata: Add LS1046A sata support
  5. Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
  6. Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
  7. Integated-by: Yutang Jiang <yutang.jiang@nxp.com>
  8. ---
  9. drivers/ata/ahci_qoriq.c | 13 +++++++++++++
  10. 1 file changed, 13 insertions(+)
  11. --- a/drivers/ata/ahci_qoriq.c
  12. +++ b/drivers/ata/ahci_qoriq.c
  13. @@ -40,11 +40,16 @@
  14. #define AHCI_PORT_PHY_5_CFG 0x192c96a4
  15. #define AHCI_PORT_TRANS_CFG 0x08000025
  16. +/* for ls1046a */
  17. +#define LS1046A_PORT_PHY2 0x28184d1f
  18. +#define LS1046A_PORT_PHY3 0x0e081509
  19. +
  20. #define SATA_ECC_DISABLE 0x00020000
  21. enum ahci_qoriq_type {
  22. AHCI_LS1021A,
  23. AHCI_LS1043A,
  24. + AHCI_LS1046A,
  25. AHCI_LS2080A,
  26. };
  27. @@ -57,6 +62,7 @@ struct ahci_qoriq_priv {
  28. static const struct of_device_id ahci_qoriq_of_match[] = {
  29. { .compatible = "fsl,ls1021a-ahci", .data = (void *)AHCI_LS1021A},
  30. { .compatible = "fsl,ls1043a-ahci", .data = (void *)AHCI_LS1043A},
  31. + { .compatible = "fsl,ls1046a-ahci", .data = (void *)AHCI_LS1046A},
  32. { .compatible = "fsl,ls2080a-ahci", .data = (void *)AHCI_LS2080A},
  33. {},
  34. };
  35. @@ -158,6 +164,13 @@ static int ahci_qoriq_phy_init(struct ah
  36. writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
  37. break;
  38. + case AHCI_LS1046A:
  39. + writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
  40. + writel(LS1046A_PORT_PHY2, reg_base + PORT_PHY2);
  41. + writel(LS1046A_PORT_PHY3, reg_base + PORT_PHY3);
  42. + writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
  43. + break;
  44. +
  45. case AHCI_LS1043A:
  46. case AHCI_LS2080A:
  47. writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);