Skip to content

Commit

Permalink
pata_imx: add devicetree support
Browse files Browse the repository at this point in the history
Not much to do here, only the compatible entries have to be added.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Sascha Hauer authored and Jeff Garzik committed Apr 11, 2013
1 parent 51b5539 commit b9d15db
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/ata/imx-pata.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
* Freescale i.MX PATA Controller

Required properties:
- compatible: "fsl,imx27-pata"
- reg: Address range of the PATA Controller
- interrupts: The interrupt of the PATA Controller
- clocks: the clocks for the PATA Controller

Example:

pata: pata@83fe0000 {
compatible = "fsl,imx51-pata", "fsl,imx27-pata";
reg = <0x83fe0000 0x4000>;
interrupts = <70>;
clocks = <&clks 161>;
status = "disabled";
};
9 changes: 9 additions & 0 deletions drivers/ata/pata_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,20 @@ static const struct dev_pm_ops pata_imx_pm_ops = {
};
#endif

static const struct of_device_id imx_pata_dt_ids[] = {
{
.compatible = "fsl,imx27-pata",
}, {
/* sentinel */
}
};

static struct platform_driver pata_imx_driver = {
.probe = pata_imx_probe,
.remove = pata_imx_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = imx_pata_dt_ids,
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &pata_imx_pm_ops,
Expand Down

0 comments on commit b9d15db

Please sign in to comment.