aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-12-04 15:44:32 -0500
committerOlof Johansson <olof@lixom.net>2008-01-15 11:26:45 -0500
commit9cd55be4d22376893d2818ce3c0e5706a3d74121 (patch)
treea835f728185c09b1dd98b7da44baea3442af7b61 /drivers
parent61f7162117d4767875825abf2f6ed1eeebbcceed (diff)
[POWERPC] pasemi: Move electra-ide to pata_of_platform
Move electra-ide glue over to the new pata_of_platform framework, and add the quirks needed to that driver. Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/pata_of_platform.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index b7bc4e4a0a26..938f48a807eb 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -34,11 +34,20 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev,
34 return -EINVAL; 34 return -EINVAL;
35 } 35 }
36 36
37 ret = of_address_to_resource(dn, 1, &ctl_res); 37 if (of_device_is_compatible(dn, "electra-ide")) {
38 if (ret) { 38 /* Altstatus is really at offset 0x3f6 from the primary window
39 dev_err(&ofdev->dev, "can't get CTL address from " 39 * on electra-ide. Adjust ctl_res and io_res accordingly.
40 "device tree\n"); 40 */
41 return -EINVAL; 41 ctl_res = io_res;
42 ctl_res.start = ctl_res.start+0x3f6;
43 io_res.end = ctl_res.start-1;
44 } else {
45 ret = of_address_to_resource(dn, 1, &ctl_res);
46 if (ret) {
47 dev_err(&ofdev->dev, "can't get CTL address from "
48 "device tree\n");
49 return -EINVAL;
50 }
42 } 51 }
43 52
44 ret = of_irq_to_resource(dn, 0, &irq_res); 53 ret = of_irq_to_resource(dn, 0, &irq_res);
@@ -76,6 +85,7 @@ static int __devexit pata_of_platform_remove(struct of_device *ofdev)
76 85
77static struct of_device_id pata_of_platform_match[] = { 86static struct of_device_id pata_of_platform_match[] = {
78 { .compatible = "ata-generic", }, 87 { .compatible = "ata-generic", },
88 { .compatible = "electra-ide", },
79 {}, 89 {},
80}; 90};
81MODULE_DEVICE_TABLE(of, pata_of_platform_match); 91MODULE_DEVICE_TABLE(of, pata_of_platform_match);