From patchwork Thu Apr 4 09:25:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 233692 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 469DF2C00AE for ; Thu, 4 Apr 2013 20:25:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758294Ab3DDJZv (ORCPT ); Thu, 4 Apr 2013 05:25:51 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:38459 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758291Ab3DDJZv (ORCPT ); Thu, 4 Apr 2013 05:25:51 -0400 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UNgQ9-0001Xg-Tm; Thu, 04 Apr 2013 11:25:25 +0200 Received: from sha by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1UNgQ8-00087c-4a; Thu, 04 Apr 2013 11:25:24 +0200 From: Sascha Hauer To: Cc: linux-ide@vger.kernel.org, Jeff Garzik , Shawn Guo , Sascha Hauer Subject: [PATCH 4/6] ata: i.MX PATA: add devicetree support Date: Thu, 4 Apr 2013 11:25:07 +0200 Message-Id: <1365067509-10186-5-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 1.8.2.rc2 In-Reply-To: <1365067509-10186-1-git-send-email-s.hauer@pengutronix.de> References: <1365067509-10186-1-git-send-email-s.hauer@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-ide@vger.kernel.org Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Not much to do here, only the compatible entries have to be added. Signed-off-by: Sascha Hauer --- Documentation/devicetree/bindings/ata/imx-pata.txt | 17 +++++++++++++++++ drivers/ata/pata_imx.c | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt diff --git a/Documentation/devicetree/bindings/ata/imx-pata.txt b/Documentation/devicetree/bindings/ata/imx-pata.txt new file mode 100644 index 0000000..e38d734 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/imx-pata.txt @@ -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"; + }; diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c index adbb01d..aa3d166 100644 --- a/drivers/ata/pata_imx.c +++ b/drivers/ata/pata_imx.c @@ -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,