pata_of_platform: Remove "electra-ide" quirk
"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> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
4f37b50476
commit
ca99140a63
1 changed files with 6 additions and 16 deletions
|
@ -35,20 +35,11 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (of_device_is_compatible(dn, "electra-ide")) {
|
ret = of_address_to_resource(dn, 1, &ctl_res);
|
||||||
/* Altstatus is really at offset 0x3f6 from the primary window
|
if (ret) {
|
||||||
* on electra-ide. Adjust ctl_res and io_res accordingly.
|
dev_err(&ofdev->dev, "can't get CTL address from "
|
||||||
*/
|
"device tree\n");
|
||||||
ctl_res = io_res;
|
return -EINVAL;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0);
|
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[] = {
|
static struct of_device_id pata_of_platform_match[] = {
|
||||||
{ .compatible = "ata-generic", },
|
{ .compatible = "ata-generic", },
|
||||||
{ .compatible = "electra-ide", },
|
{ },
|
||||||
{},
|
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, pata_of_platform_match);
|
MODULE_DEVICE_TABLE(of, pata_of_platform_match);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue