diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-02-22 11:22:54 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-02-22 17:13:01 -0500 |
commit | c093e1d36e317c5ac2dc788f407119259fc260fe (patch) | |
tree | bf7cf79fc144106a04fcfd3c70c6f74348c2e9f3 | |
parent | f1df8641e27b7edb978bdc7aaf50c235bc9e8be9 (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.c | 46 |
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 | ||
29 | static void ahci_host_stop(struct ata_host *host); | 29 | static void ahci_host_stop(struct ata_host *host); |
30 | 30 | ||
31 | enum ahci_type { | ||
32 | AHCI, /* standard platform ahci */ | ||
33 | IMX53_AHCI, /* ahci on i.mx53 */ | ||
34 | }; | ||
35 | |||
36 | static 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 | }; | ||
47 | MODULE_DEVICE_TABLE(platform, ahci_devtype); | ||
48 | |||
49 | struct ata_port_operations ahci_platform_ops = { | 31 | struct 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 | }; |
53 | EXPORT_SYMBOL_GPL(ahci_platform_ops); | 35 | EXPORT_SYMBOL_GPL(ahci_platform_ops); |
54 | 36 | ||
55 | static struct ata_port_operations ahci_platform_retry_srst_ops = { | 37 | static 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, | |
60 | static 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 | ||
76 | static struct scsi_host_template ahci_platform_sht = { | 44 | static 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 | }; |
643 | module_platform_driver(ahci_driver); | 609 | module_platform_driver(ahci_driver); |
644 | 610 | ||