linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] pata_of_platform: Remove "electra-ide" quirk
@ 2014-08-23 10:46 Alexander Shiyan
  2014-08-23 10:46 ` [PATCH 3/4] pata_platform: Use devm_ioremap_resource() Alexander Shiyan
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alexander Shiyan @ 2014-08-23 10:46 UTC (permalink / raw)
  To: linux-ide; +Cc: Tejun Heo, Alexander Shiyan

"electra-ide" is not used anywhere in the kernel and could be
represented in devicetree in a normal way.
This patch removes specific quirk for "electra-ide".

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/ata/pata_of_platform.c | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index a7e95a5..6af1c9b 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -35,20 +35,11 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
 		return -EINVAL;
 	}
 
-	if (of_device_is_compatible(dn, "electra-ide")) {
-		/* Altstatus is really at offset 0x3f6 from the primary window
-		 * on electra-ide. Adjust ctl_res and io_res accordingly.
-		 */
-		ctl_res = io_res;
-		ctl_res.start = ctl_res.start+0x3f6;
-		io_res.end = ctl_res.start-1;
-	} else {
-		ret = of_address_to_resource(dn, 1, &ctl_res);
-		if (ret) {
-			dev_err(&ofdev->dev, "can't get CTL address from "
-				"device tree\n");
-			return -EINVAL;
-		}
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
 	}
 
 	irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0);
@@ -79,8 +70,7 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
 
 static struct of_device_id pata_of_platform_match[] = {
 	{ .compatible = "ata-generic", },
-	{ .compatible = "electra-ide", },
-	{},
+	{ },
 };
 MODULE_DEVICE_TABLE(of, pata_of_platform_match);
 
-- 
1.8.5.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-09-18 17:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-23 10:46 [PATCH 1/4] pata_of_platform: Remove "electra-ide" quirk Alexander Shiyan
2014-08-23 10:46 ` [PATCH 3/4] pata_platform: Use devm_ioremap_resource() Alexander Shiyan
2014-08-23 16:58   ` Tejun Heo
2014-08-23 10:46 ` [PATCH 4/4] pata_platform: Use 16-bit wide data transfer Alexander Shiyan
2014-08-23 16:53   ` Tejun Heo
2014-08-23 17:29     ` Alexander Shiyan
2014-08-25 19:34       ` Tejun Heo
2014-08-25 19:48         ` One Thousand Gnomes
2014-08-26  8:55           ` Alexander Shiyan
2014-09-18 16:40           ` Alexander Shiyan
2014-09-18 17:29             ` Tejun Heo
2014-08-23 17:06 ` [PATCH 1/4] pata_of_platform: Remove "electra-ide" quirk 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).