From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] ata: pata-imx: implement detect callback for hardware device
Date: Thu, 20 Jun 2013 16:00:53 +0200 [thread overview]
Message-ID: <1371736854-7543-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1371736854-7543-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/ata/pata-imx.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/ata/pata-imx.c b/drivers/ata/pata-imx.c
index aed6df1..93809c2 100644
--- a/drivers/ata/pata-imx.c
+++ b/drivers/ata/pata-imx.c
@@ -146,6 +146,13 @@ static void imx_pata_setup_port(void *reg_base, void *alt_base,
}
}
+static int pata_imx_detect(struct device_d *dev)
+{
+ struct ide_port *ide = dev->priv;
+
+ return ata_port_detect(&ide->port);
+}
+
static int imx_pata_probe(struct device_d *dev)
{
struct ide_port *ide;
@@ -182,6 +189,9 @@ static int imx_pata_probe(struct device_d *dev)
ide->port.dev = dev;
ide->port.devname = devname;
+ dev->priv = ide;
+ dev->detect = pata_imx_detect;
+
ret = ide_port_register(ide);
if (ret) {
dev_err(dev, "Cannot register IDE interface: %s\n",
--
1.8.3.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-06-20 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 14:00 [PATCH] more ata patches Sascha Hauer
2013-06-20 14:00 ` [PATCH 1/3] ata: ide: embed ata_ioports into struct ide_port and export it Sascha Hauer
2013-06-20 14:00 ` Sascha Hauer [this message]
2013-06-20 14:00 ` [PATCH 3/3] ata: Make 'already initialized' a debug message Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371736854-7543-3-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox