From: Faiz Abbas <faiz_abbas@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 01/11] scsi: Simplify scsi_read()/_write()
Date: Tue, 15 Oct 2019 18:24:32 +0530 [thread overview]
Message-ID: <20191015125442.1786-2-faiz_abbas@ti.com> (raw)
In-Reply-To: <20191015125442.1786-1-faiz_abbas@ti.com>
With no non-DM driver using scsi_read()/_write() APIs, remove
the legacy implementations.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
drivers/scsi/scsi.c | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 48cb2a2818..009d80faa7 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -141,20 +141,11 @@ static void scsi_setup_inquiry(struct scsi_cmd *pccb)
pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
}
-#ifdef CONFIG_BLK
static ulong scsi_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
void *buffer)
-#else
-static ulong scsi_read(struct blk_desc *block_dev, lbaint_t blknr,
- lbaint_t blkcnt, void *buffer)
-#endif
{
-#ifdef CONFIG_BLK
struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
struct udevice *bdev = dev->parent;
-#else
- struct udevice *bdev = NULL;
-#endif
lbaint_t start, blks;
uintptr_t buf_addr;
unsigned short smallblks = 0;
@@ -217,20 +208,11 @@ static ulong scsi_read(struct blk_desc *block_dev, lbaint_t blknr,
/* Almost the maximum amount of the scsi_ext command.. */
#define SCSI_MAX_WRITE_BLK 0xFFFF
-#ifdef CONFIG_BLK
static ulong scsi_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
const void *buffer)
-#else
-static ulong scsi_write(struct blk_desc *block_dev, lbaint_t blknr,
- lbaint_t blkcnt, const void *buffer)
-#endif
{
-#ifdef CONFIG_BLK
struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
struct udevice *bdev = dev->parent;
-#else
- struct udevice *bdev = NULL;
-#endif
lbaint_t start, blks;
uintptr_t buf_addr;
unsigned short smallblks;
@@ -450,10 +432,6 @@ static void scsi_init_dev_desc_priv(struct blk_desc *dev_desc)
dev_desc->product[0] = 0;
dev_desc->revision[0] = 0;
dev_desc->removable = false;
-#if !CONFIG_IS_ENABLED(BLK)
- dev_desc->block_read = scsi_read;
- dev_desc->block_write = scsi_write;
-#endif
}
#if !defined(CONFIG_DM_SCSI)
--
2.19.2
next prev parent reply other threads:[~2019-10-15 12:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 12:54 [U-Boot] [PATCH v2 00/11] Add Support for UFS subsystem for TI's J721e Faiz Abbas
2019-10-15 12:54 ` Faiz Abbas [this message]
2019-10-24 18:52 ` [U-Boot] [PATCH v2 01/11] scsi: Simplify scsi_read()/_write() Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 02/11] scsi: Add max_bytes_per_req to scsi_platdata Faiz Abbas
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 03/11] scsi: Retry inquiry 3 times to overcome Unit Attention condition Faiz Abbas
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 04/11] scsi: Add dma direction member to command structure Faiz Abbas
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 05/11] ufs: Add Initial Support for UFS subsystem Faiz Abbas
2019-10-23 14:20 ` Bin Meng
2019-10-24 14:45 ` Tom Rini
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 06/11] ufs: Add Support for Cadence platform UFS driver Faiz Abbas
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 07/11] ufs: Add glue layer driver for TI J721E devices Faiz Abbas
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 08/11] arm: dts: k3-j721e-main: Add UFS nodes Faiz Abbas
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 09/11] cmd: Add Support for UFS commands Faiz Abbas
2019-10-24 18:52 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 10/11] env: ti: Add environment variables to boot from UFS Faiz Abbas
2019-10-24 18:53 ` Tom Rini
2019-10-15 12:54 ` [U-Boot] [PATCH v2 11/11] configs: j721e_evm_a72: Enable configs for UFS Faiz Abbas
2019-10-24 18:53 ` Tom Rini
2019-10-23 14:17 ` [U-Boot] [PATCH v2 00/11] Add Support for UFS subsystem for TI's J721e Faiz Abbas
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=20191015125442.1786-2-faiz_abbas@ti.com \
--to=faiz_abbas@ti.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