ahci_platform: drop support for a bunch of obsolete platform device types
Subsystems (2)
cover ahci_platform: drop support for a bunch of obsolete platform device types
Hi Tejun, Marek,
This series, which is to be applied on top of my ahci_platform restructering series, mostly speaks for itself.
I've some doubts about the 2nd patch, which removes the imx53-ahci platform device support from ahci_platform.c. I'm pretty sure this is obsolete and replaced by Marek's ahci_imx.c work, but not 100%, which is why this series is marked as RFC. Marek can you confirm that the code the 2nd patch removes is inded dead code?
Tejun, if Marek confirms this is indeed dead code feel free to apply this despite the RFC marking.
Thanks & Regards,
Hans
A message that is not in the archive (sent off-list or not yet received): 1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
RFC 1/3 ahci_platform: Drop support for ahci-strict platform device type
I've done a grep over the entire kernel tree and nothing is using this (anymore?).
--- drivers/ata/ahci_platform.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/ata/ahci_platform.c +0 -11
@@ -32,7 +32,6 @@ static void ahci_host_stop(struct ata_host *host);enum ahci_type {AHCI ,/* standard platform ahci */ IMX53_AHCI ,/* ahci on i.mx53 */ -STRICT_AHCI ,/* delayed DMA engine start */ };static struct platform_device_id ahci_devtype[] = {
@@ -43,9 +42,6 @@ static struct platform_device_id ahci_devtype[] = { .name = "imx53-ahci", .driver_data = IMX53_AHCI, }, { - .name = "strict-ahci", - .driver_data = STRICT_AHCI, - }, {/* sentinel */ } };
@@ -76,13 +72,6 @@ static const struct ata_port_info ahci_port_info[] = { .udma_mask = ATA_UDMA6, .port_ops = &ahci_platform_retry_srst_ops, }, - [STRICT_AHCI] = { - AHCI_HFLAGS (AHCI_HFLAG_DELAY_ENGINE), - .flags = AHCI_FLAG_COMMON, - .pio_mask = ATA_PIO4, - .udma_mask = ATA_UDMA6, - .port_ops = &ahci_platform_ops, - }, }; static struct scsi_host_template ahci_platform_sht = {
Signature · 1 line
1.9.0
RFC 2/3 ahci_platform: Drop support for imx53-ahci platform device type
In reply to a message not in the archiveSince 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.
--- drivers/ata/ahci_platform.c | 46 ++++++--------------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-)
drivers/ata/ahci_platform.c +6 -40
@@ -29,49 +29,17 @@static void ahci_host_stop (struct ata_host *host); -enum ahci_type { -AHCI ,/* standard platform ahci */ -IMX53_AHCI ,/* ahci on i.mx53 */ -}; - -static struct platform_device_id ahci_devtype[] = { - { - .name ="ahci" , - .driver_data =AHCI , - }, { - .name ="imx53-ahci" , - .driver_data =IMX53_AHCI , - }, { -/* sentinel */ - } -}; -MODULE_DEVICE_TABLE (platform, ahci_devtype); -struct ata_port_operations ahci_platform_ops = { .inherits = &ahci_ops, .host_stop = ahci_host_stop, };EXPORT_SYMBOL_GPL (ahci_platform_ops); -static struct ata_port_operations ahci_platform_retry_srst_ops = { - .inherits = &ahci_pmp_retry_srst_ops, - .host_stop = ahci_host_stop, -}; - -static const struct ata_port_info ahci_port_info[] = { -/* by features */ - [AHCI ] = { - .flags =AHCI_FLAG_COMMON , - .pio_mask =ATA_PIO4 , - .udma_mask =ATA_UDMA6 , - .port_ops = &ahci_platform_ops, - }, - [IMX53_AHCI ] = { - .flags =AHCI_FLAG_COMMON , - .pio_mask =ATA_PIO4 , - .udma_mask =ATA_UDMA6 , - .port_ops = &ahci_platform_retry_srst_ops, - }, +static const struct ata_port_info ahci_port_info = { + .flags =AHCI_FLAG_COMMON , + .pio_mask =ATA_PIO4 , + .udma_mask =ATA_UDMA6 , + .port_ops = &ahci_platform_ops, };static struct scsi_host_template ahci_platform_sht = {
@@ -436,7 +404,6 @@ static int ahci_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct ahci_platform_data *pdata =dev_get_platdata (dev); -const struct platform_device_id *id =platform_get_device_id (pdev);const struct ata_port_info *pi_template;struct ahci_host_priv *hpriv;int rc;
@@ -464,7 +431,7 @@ static int ahci_probe(struct platform_device *pdev)if (pdata && pdata->ata_port_info) pi_template = pdata->ata_port_info;else - pi_template = &ahci_port_info[id ? id->driver_data :0 ]; + pi_template = &ahci_port_info; rc = ahci_platform_init_host(pdev, hpriv, pi_template, pdata ? pdata->force_port_map : 0,
@@ -670,7 +637,6 @@ static struct platform_driver ahci_driver = { .of_match_table = ahci_of_match, .pm = &ahci_pm_ops, }, - .id_table = ahci_devtype, };module_platform_driver (ahci_driver);
Signature · 1 line
1.9.0
RFC 3/3 ahci_platform: Drop unused ahci_platform_data members
In reply to a message not in the archiveThese members are not used anywhere, and in the future we want ahci_platform_data to go away entirely so there is no reason to keep these around.
--- drivers/ata/ahci_platform.c | 10 +--------- include/linux/ahci_platform.h | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-)
drivers/ata/ahci_platform.c +1 -9
@@ -404,7 +404,6 @@ static int ahci_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct ahci_platform_data *pdata =dev_get_platdata (dev); -const struct ata_port_info *pi_template;struct ahci_host_priv *hpriv;int rc;
@@ -428,14 +427,7 @@ static int ahci_probe(struct platform_device *pdev) goto disable_resources; } -if (pdata && pdata->ata_port_info) - pi_template = pdata->ata_port_info; -else - pi_template = &ahci_port_info; - - rc =ahci_platform_init_host (pdev, hpriv, pi_template, - pdata ? pdata->force_port_map :0 , - pdata ? pdata->mask_port_map :0 ); + rc =ahci_platform_init_host (pdev, hpriv, &ahci_port_info,0 ,0 );if (rc) goto pdata_exit;
include/linux/ahci_platform.h +0 -3
@@ -33,9 +33,6 @@ struct ahci_platform_data {void (*exit)(struct device *dev);int (*suspend)(struct device *dev);int (*resume)(struct device *dev); -const struct ata_port_info *ata_port_info; -unsigned int force_port_map; -unsigned int mask_port_map; };int ahci_platform_enable_clks (struct ahci_host_priv *hpriv);
Signature · 1 line
1.9.0
cover ahci_platform: drop support for a bunch of obsolete platform device types
In reply to Hans de GoedeQuoted 10 lines · Hans de Goede
Hi Tejun, Marek,
This series, which is to be applied on top of my
ahci_platformrestructering series, mostly speaks for itself.I've some doubts about the 2nd patch, which removes the imx53-ahci platform device support from
ahci_platform.c. I'm pretty sure this is obsolete and replaced by Marek'sahci_imx.cwork, but not 100%, which is why this series is marked as RFC. Marek can you confirm that the code the 2nd patch removes is inded dead code?
I can confirm that with your sunxi 15-patch patchset + these three patches , the SATA port still works on i.MX53 DENX M53EVK board. The behavior from the user's point of view is unchanged.
Quoted 6 lines
Tejun, if Marek confirms this is indeed dead code feel free to apply this despite the RFC marking.
Thanks & Regards,
Hans
Best regards,
Marek Vasut
cover ahci_platform: drop support for a bunch of obsolete platform device types
In reply to Hans de GoedeQuoted 5 lines · Hans de Goede
Hi Tejun, Marek,
This series, which is to be applied on top of my
ahci_platformrestructering series, mostly speaks for itself.
Quoted 8 lines
I've some doubts about the 2nd patch, which removes the imx53-ahci platform device support from
ahci_platform.c. I'm pretty sure this is obsolete and replaced by Marek'sahci_imx.cwork, but not 100%, which is why this series is marked as RFC. Marek can you confirm that the code the 2nd patch removes is inded dead code?Tejun, if Marek confirms this is indeed dead code feel free to apply this despite the RFC marking.
Applied 1-3 to libata/for-3.15.
Thanks.
Signature · 1 line
tejun