ipq806x: Add support for IPQ806x chip family
[openwrt/staging/lynxis/omap.git] / target / linux / ipq806x / patches / 0120-ahci_platform-Drop-support-for-imx53-ahci-platform-d.patch
1 From 0d153bacb749d9291324ef0282ea9d235baca499 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Sat, 22 Feb 2014 17:22:54 +0100
4 Subject: [PATCH 120/182] ahci_platform: Drop support for imx53-ahci platform
5 device type
6
7 Since the 3.13 release the ahci_imx driver has proper devicetree enabled
8 support for ahci on imx53 and that is used instead of the old board file
9 created imx53-ahci platform device.
10
11 Note this patch also complete drops the id-table, an id-table is not needed
12 for a single id platform driver, the name field in the driver struct suffices.
13
14 And the code already has an explicit "MODULE_ALIAS("platform:ahci");" so the
15 id-table is not needed for that either.
16
17 Cc: Marek Vasut <marex@denx.de>
18 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
19 Signed-off-by: Tejun Heo <tj@kernel.org>
20 ---
21 drivers/ata/ahci_platform.c | 46 ++++++-------------------------------------
22 1 file changed, 6 insertions(+), 40 deletions(-)
23
24 diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
25 index d3d2bad..8fab4bf 100644
26 --- a/drivers/ata/ahci_platform.c
27 +++ b/drivers/ata/ahci_platform.c
28 @@ -28,49 +28,17 @@
29
30 static void ahci_host_stop(struct ata_host *host);
31
32 -enum ahci_type {
33 - AHCI, /* standard platform ahci */
34 - IMX53_AHCI, /* ahci on i.mx53 */
35 -};
36 -
37 -static struct platform_device_id ahci_devtype[] = {
38 - {
39 - .name = "ahci",
40 - .driver_data = AHCI,
41 - }, {
42 - .name = "imx53-ahci",
43 - .driver_data = IMX53_AHCI,
44 - }, {
45 - /* sentinel */
46 - }
47 -};
48 -MODULE_DEVICE_TABLE(platform, ahci_devtype);
49 -
50 struct ata_port_operations ahci_platform_ops = {
51 .inherits = &ahci_ops,
52 .host_stop = ahci_host_stop,
53 };
54 EXPORT_SYMBOL_GPL(ahci_platform_ops);
55
56 -static struct ata_port_operations ahci_platform_retry_srst_ops = {
57 - .inherits = &ahci_pmp_retry_srst_ops,
58 - .host_stop = ahci_host_stop,
59 -};
60 -
61 -static const struct ata_port_info ahci_port_info[] = {
62 - /* by features */
63 - [AHCI] = {
64 - .flags = AHCI_FLAG_COMMON,
65 - .pio_mask = ATA_PIO4,
66 - .udma_mask = ATA_UDMA6,
67 - .port_ops = &ahci_platform_ops,
68 - },
69 - [IMX53_AHCI] = {
70 - .flags = AHCI_FLAG_COMMON,
71 - .pio_mask = ATA_PIO4,
72 - .udma_mask = ATA_UDMA6,
73 - .port_ops = &ahci_platform_retry_srst_ops,
74 - },
75 +static const struct ata_port_info ahci_port_info = {
76 + .flags = AHCI_FLAG_COMMON,
77 + .pio_mask = ATA_PIO4,
78 + .udma_mask = ATA_UDMA6,
79 + .port_ops = &ahci_platform_ops,
80 };
81
82 static struct scsi_host_template ahci_platform_sht = {
83 @@ -416,7 +384,6 @@ static int ahci_probe(struct platform_device *pdev)
84 {
85 struct device *dev = &pdev->dev;
86 struct ahci_platform_data *pdata = dev_get_platdata(dev);
87 - const struct platform_device_id *id = platform_get_device_id(pdev);
88 const struct ata_port_info *pi_template;
89 struct ahci_host_priv *hpriv;
90 int rc;
91 @@ -444,7 +411,7 @@ static int ahci_probe(struct platform_device *pdev)
92 if (pdata && pdata->ata_port_info)
93 pi_template = pdata->ata_port_info;
94 else
95 - pi_template = &ahci_port_info[id ? id->driver_data : 0];
96 + pi_template = &ahci_port_info;
97
98 rc = ahci_platform_init_host(pdev, hpriv, pi_template,
99 pdata ? pdata->force_port_map : 0,
100 @@ -638,7 +605,6 @@ static struct platform_driver ahci_driver = {
101 .of_match_table = ahci_of_match,
102 .pm = &ahci_pm_ops,
103 },
104 - .id_table = ahci_devtype,
105 };
106 module_platform_driver(ahci_driver);
107
108 --
109 1.7.10.4
110