aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-02-22 11:22:54 -0500
committerTejun Heo <tj@kernel.org>2014-02-22 17:13:01 -0500
commitc093e1d36e317c5ac2dc788f407119259fc260fe (patch)
treebf7cf79fc144106a04fcfd3c70c6f74348c2e9f3
parentf1df8641e27b7edb978bdc7aaf50c235bc9e8be9 (diff)
ahci_platform: Drop support for imx53-ahci platform device type
Since the 3.13 release the ahci_imx driver has proper devicetree enabled support for ahci on imx53 and that is used instead of the old board file created imx53-ahci platform device. Note this patch also complete drops the id-table, an id-table is not needed for a single id platform driver, the name field in the driver struct suffices. And the code already has an explicit "MODULE_ALIAS("platform:ahci");" so the id-table is not needed for that either. Cc: Marek Vasut <marex@denx.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--drivers/ata/ahci_platform.c46
1 files changed, 6 insertions, 40 deletions
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index d3d2bad516b4..8fab4bf9042a 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -28,49 +28,17 @@
28 28
29static void ahci_host_stop(struct ata_host *host); 29static void ahci_host_stop(struct ata_host *host);
30 30
31enum ahci_type {
32 AHCI, /* standard platform ahci */
33 IMX53_AHCI, /* ahci on i.mx53 */
34};
35
36static struct platform_device_id ahci_devtype[] = {
37 {
38 .name = "ahci",
39 .driver_data = AHCI,
40 }, {
41 .name = "imx53-ahci",
42 .driver_data = IMX53_AHCI,
43 }, {
44 /* sentinel */
45 }
46};
47MODULE_DEVICE_TABLE(platform, ahci_devtype);
48
49struct ata_port_operations ahci_platform_ops = { 31struct ata_port_operations ahci_platform_ops = {
50 .inherits = &ahci_ops, 32 .inherits = &ahci_ops,
51 .host_stop = ahci_host_stop, 33 .host_stop = ahci_host_stop,
52}; 34};
53EXPORT_SYMBOL_GPL(ahci_platform_ops); 35EXPORT_SYMBOL_GPL(ahci_platform_ops);
54 36
55static struct ata_port_operations ahci_platform_retry_srst_ops = { 37static const struct ata_port_info ahci_port_info = {
56 .inherits = &ahci_pmp_retry_srst_ops, 38 .flags = AHCI_FLAG_COMMON,
57 .host_stop = ahci_host_stop, 39 .pio_mask = ATA_PIO4,
58}; 40 .udma_mask = ATA_UDMA6,
59 41 .port_ops = &ahci_platform_ops,
60static const struct ata_port_info ahci_port_info[] = {
61 /* by features */
62 [AHCI] = {
63 .flags = AHCI_FLAG_COMMON,
64 .pio_mask = ATA_PIO4,
65 .udma_mask = ATA_UDMA6,
66 .port_ops = &ahci_platform_ops,
67 },
68 [IMX53_AHCI] = {
69 .flags = AHCI_FLAG_COMMON,
70 .pio_mask = ATA_PIO4,
71 .udma_mask = ATA_UDMA6,
72 .port_ops = &ahci_platform_retry_srst_ops,
73 },
74}; 42};
75 43
76static struct scsi_host_template ahci_platform_sht = { 44static struct scsi_host_template ahci_platform_sht = {
@@ -416,7 +384,6 @@ static int ahci_probe(struct platform_device *pdev)
416{ 384{
417 struct device *dev = &pdev->dev; 385 struct device *dev = &pdev->dev;
418 struct ahci_platform_data *pdata = dev_get_platdata(dev); 386 struct ahci_platform_data *pdata = dev_get_platdata(dev);
419 const struct platform_device_id *id = platform_get_device_id(pdev);
420 const struct ata_port_info *pi_template; 387 const struct ata_port_info *pi_template;
421 struct ahci_host_priv *hpriv; 388 struct ahci_host_priv *hpriv;
422 int rc; 389 int rc;
@@ -444,7 +411,7 @@ static int ahci_probe(struct platform_device *pdev)
444 if (pdata && pdata->ata_port_info) 411 if (pdata && pdata->ata_port_info)
445 pi_template = pdata->ata_port_info; 412 pi_template = pdata->ata_port_info;
446 else 413 else
447 pi_template = &ahci_port_info[id ? id->driver_data : 0]; 414 pi_template = &ahci_port_info;
448 415
449 rc = ahci_platform_init_host(pdev, hpriv, pi_template, 416 rc = ahci_platform_init_host(pdev, hpriv, pi_template,
450 pdata ? pdata->force_port_map : 0, 417 pdata ? pdata->force_port_map : 0,
@@ -638,7 +605,6 @@ static struct platform_driver ahci_driver = {
638 .of_match_table = ahci_of_match, 605 .of_match_table = ahci_of_match,
639 .pm = &ahci_pm_ops, 606 .pm = &ahci_pm_ops,
640 }, 607 },
641 .id_table = ahci_devtype,
642}; 608};
643module_platform_driver(ahci_driver); 609module_platform_driver(ahci_driver);
644 610