* [RFC 0/3] ahci_platform: drop support for a bunch of obsolete platform device types
@ 2014-02-22 16:22 Hans de Goede
[not found] ` <1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2014-02-22 16:22 UTC (permalink / raw)
To: Tejun Heo, Marek Vasut
Cc: Maxime Ripard, Oliver Schinagl, Richard Zhu, Roger Quadros,
Lee Jones, linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC 1/3] ahci_platform: Drop support for ahci-strict platform device type
[not found] ` <1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2014-02-22 16:22 ` Hans de Goede
2014-02-22 16:22 ` [RFC 2/3] ahci_platform: Drop support for imx53-ahci " Hans de Goede
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2014-02-22 16:22 UTC (permalink / raw)
To: Tejun Heo, Marek Vasut
Cc: Maxime Ripard, Oliver Schinagl, Richard Zhu, Roger Quadros,
Lee Jones, linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
I've done a grep over the entire kernel tree and nothing is using this
(anymore?).
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
drivers/ata/ahci_platform.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 75698a4..9fb99cf 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -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 = {
--
1.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RFC 2/3] ahci_platform: Drop support for imx53-ahci platform device type
[not found] ` <1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-22 16:22 ` [RFC 1/3] ahci_platform: Drop support for ahci-strict platform device type Hans de Goede
@ 2014-02-22 16:22 ` Hans de Goede
2014-02-22 16:22 ` [RFC 3/3] ahci_platform: Drop unused ahci_platform_data members Hans de Goede
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2014-02-22 16:22 UTC (permalink / raw)
To: Tejun Heo, Marek Vasut
Cc: Maxime Ripard, Oliver Schinagl, Richard Zhu, Roger Quadros,
Lee Jones, linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
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-ynQEQJNshbs@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
drivers/ata/ahci_platform.c | 46 ++++++---------------------------------------
1 file changed, 6 insertions(+), 40 deletions(-)
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 9fb99cf..d48ca8a 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -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);
--
1.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RFC 3/3] ahci_platform: Drop unused ahci_platform_data members
[not found] ` <1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-22 16:22 ` [RFC 1/3] ahci_platform: Drop support for ahci-strict platform device type Hans de Goede
2014-02-22 16:22 ` [RFC 2/3] ahci_platform: Drop support for imx53-ahci " Hans de Goede
@ 2014-02-22 16:22 ` Hans de Goede
2014-02-22 22:04 ` [RFC 0/3] ahci_platform: drop support for a bunch of obsolete platform device types Marek Vasut
2014-02-22 22:13 ` Tejun Heo
4 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2014-02-22 16:22 UTC (permalink / raw)
To: Tejun Heo, Marek Vasut
Cc: Maxime Ripard, Oliver Schinagl, Richard Zhu, Roger Quadros,
Lee Jones, linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
These 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.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
drivers/ata/ahci_platform.c | 10 +---------
include/linux/ahci_platform.h | 3 ---
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index d48ca8a..c04e1a9 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -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;
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h
index 542f268..1f16d50 100644
--- a/include/linux/ahci_platform.h
+++ b/include/linux/ahci_platform.h
@@ -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);
--
1.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC 0/3] ahci_platform: drop support for a bunch of obsolete platform device types
[not found] ` <1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (2 preceding siblings ...)
2014-02-22 16:22 ` [RFC 3/3] ahci_platform: Drop unused ahci_platform_data members Hans de Goede
@ 2014-02-22 22:04 ` Marek Vasut
2014-02-22 22:13 ` Tejun Heo
4 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2014-02-22 22:04 UTC (permalink / raw)
To: Hans de Goede
Cc: Tejun Heo, Maxime Ripard, Oliver Schinagl, Richard Zhu,
Roger Quadros, Lee Jones, linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
On Saturday, February 22, 2014 at 05:22:52 PM, Hans de Goede wrote:
> 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?
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.
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC 0/3] ahci_platform: drop support for a bunch of obsolete platform device types
[not found] ` <1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (3 preceding siblings ...)
2014-02-22 22:04 ` [RFC 0/3] ahci_platform: drop support for a bunch of obsolete platform device types Marek Vasut
@ 2014-02-22 22:13 ` Tejun Heo
4 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2014-02-22 22:13 UTC (permalink / raw)
To: Hans de Goede
Cc: Marek Vasut, Maxime Ripard, Oliver Schinagl, Richard Zhu,
Roger Quadros, Lee Jones, linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
On Sat, Feb 22, 2014 at 05:22:52PM +0100, Hans de Goede wrote:
> 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.
Applied 1-3 to libata/for-3.15.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-22 22:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-22 16:22 [RFC 0/3] ahci_platform: drop support for a bunch of obsolete platform device types Hans de Goede
[not found] ` <1393086175-6383-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-22 16:22 ` [RFC 1/3] ahci_platform: Drop support for ahci-strict platform device type Hans de Goede
2014-02-22 16:22 ` [RFC 2/3] ahci_platform: Drop support for imx53-ahci " Hans de Goede
2014-02-22 16:22 ` [RFC 3/3] ahci_platform: Drop unused ahci_platform_data members Hans de Goede
2014-02-22 22:04 ` [RFC 0/3] ahci_platform: drop support for a bunch of obsolete platform device types Marek Vasut
2014-02-22 22:13 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).