From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2, 3/7] drivers: block: disk-uclass: implement scsi_init()
Date: Wed, 24 Feb 2016 11:20:38 -0500 [thread overview]
Message-ID: <20160224162038.GA7705@bill-the-cat> (raw)
In-Reply-To: <1454500780-20751-4-git-send-email-mugunthanvnm@ti.com>
On Wed, Feb 03, 2016 at 05:29:36PM +0530, Mugunthan V N wrote:
> Implement scsi_init() api to probe driver model based sata
> devices.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> drivers/block/disk-uclass.c | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/drivers/block/disk-uclass.c b/drivers/block/disk-uclass.c
> index d665b35..4bd7b56 100644
> --- a/drivers/block/disk-uclass.c
> +++ b/drivers/block/disk-uclass.c
> @@ -7,6 +7,45 @@
>
> #include <common.h>
> #include <dm.h>
> +#include <dm/uclass-internal.h>
> +#include <dm/device-internal.h>
> +#include <scsi.h>
> +
> +int scsi_get_device(int index, struct udevice **devp)
> +{
> + struct udevice *dev;
> + int ret;
> +
> + ret = uclass_find_device(UCLASS_DISK, index, &dev);
> + if (ret || !dev) {
> + printf("%d device not found\n", index);
> + return ret;
> + }
> +
> + ret = device_probe(dev);
> + if (ret) {
> + error("device probe error\n");
> + return ret;
> + }
> +
> + *devp = dev;
> +
> + return ret;
> +}
> +
> +void scsi_init(void)
> +{
> + struct udevice *dev;
> + int ret;
> +
> + ret = scsi_get_device(0, &dev);
> + if (ret || !dev) {
> + error("scsi device not found\n");
> + return;
> + }
> +
> + scsi_scan(1);
> +}
>
> UCLASS_DRIVER(disk) = {
> .id = UCLASS_DISK,
OK, this patch is a problem. Many platforms already define scsi_init()
and aren't moved over so now fail to build. Mele_M5 is one of many
examples here, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160224/dd4a3936/attachment.sig>
next prev parent reply other threads:[~2016-02-24 16:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 11:59 [U-Boot] [PATCH v2 0/7] driver model bring-up of sata device on dra72 and dra74 evm Mugunthan V N
2016-02-03 11:59 ` [U-Boot] [PATCH v2 1/7] arm: omap: sata: move enable sata clocks to enable_basic_clocks() Mugunthan V N
2016-02-16 16:01 ` Simon Glass
2016-02-03 11:59 ` [U-Boot] [PATCH v2 2/7] arm: omap: sata: compile out sata init apis when CONFIG_DISK is defined Mugunthan V N
2016-02-16 16:01 ` Simon Glass
2016-02-03 11:59 ` [U-Boot] [PATCH v2 3/7] drivers: block: disk-uclass: implement scsi_init() Mugunthan V N
2016-02-06 20:29 ` Simon Glass
2016-02-08 11:23 ` Mugunthan V N
2016-02-08 17:45 ` Simon Glass
2016-02-08 18:28 ` Tom Rini
2016-02-15 3:03 ` Bin Meng
2016-02-16 16:01 ` Simon Glass
2016-02-24 16:20 ` Tom Rini [this message]
2016-02-25 9:34 ` [U-Boot] [U-Boot, v2, " Mugunthan V N
2016-02-25 15:30 ` Simon Glass
2016-02-25 17:35 ` Mugunthan V N
2016-02-03 11:59 ` [U-Boot] [PATCH v2 4/7] arm: omap-common: sata: prepare driver for DM conversion Mugunthan V N
2016-02-16 16:01 ` Simon Glass
2016-02-03 11:59 ` [U-Boot] [PATCH v2 5/7] drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device Mugunthan V N
2016-02-03 11:59 ` [U-Boot] [PATCH v2 6/7] defconfig: dra74_evm: enable disk driver model Mugunthan V N
2016-02-16 16:01 ` Simon Glass
2016-02-03 11:59 ` [U-Boot] [PATCH v2 7/7] defconfig: dra72_evm: " Mugunthan V N
2016-02-16 16:01 ` Simon Glass
2016-02-03 14:40 ` [U-Boot] [PATCH v2 0/7] driver model bring-up of sata device on dra72 and dra74 evm Mugunthan V N
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=20160224162038.GA7705@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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