summaryrefslogtreecommitdiff
path: root/cmd/scsi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-03-16 09:45:03 -0400
committerTom Rini <trini@konsulko.com>2016-03-16 15:03:37 -0400
commitba52426975e3fbdcf0f9a942a9883af952abb9e0 (patch)
tree08e90b7d6d70793aa1c94b61af512cf002b6e7dc /cmd/scsi.c
parent80485af24392a6a1816cc8b9692ac3d7193a62fc (diff)
cmd: scsi: Group the command portion together, guard with !CONFIG_SPL_BUILD
When we switch to including all linker lists in SPL it is important to not include commands as that may lead to link errors due to other things we have already discarded. In this case, the SCSI code needs a lot of attention so for now just guard the command portions. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd/scsi.c')
-rw-r--r--cmd/scsi.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/cmd/scsi.c b/cmd/scsi.c
index 951d1e5cfb..8991125c66 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -245,6 +245,7 @@ struct blk_desc *scsi_get_dev(int dev)
}
#endif
+#ifndef CONFIG_SPL_BUILD
/******************************************************************************
* scsi boot command intepreter. Derived from diskboot
*/
@@ -368,6 +369,27 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_USAGE;
}
+U_BOOT_CMD(
+ scsi, 5, 1, do_scsi,
+ "SCSI sub-system",
+ "reset - reset SCSI controller\n"
+ "scsi info - show available SCSI devices\n"
+ "scsi scan - (re-)scan SCSI bus\n"
+ "scsi device [dev] - show or set current device\n"
+ "scsi part [dev] - print partition table of one or all SCSI devices\n"
+ "scsi read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n"
+ " to memory address `addr'\n"
+ "scsi write addr blk# cnt - write `cnt' blocks starting at block\n"
+ " `blk#' from memory address `addr'"
+);
+
+U_BOOT_CMD(
+ scsiboot, 3, 1, do_scsiboot,
+ "boot from SCSI device",
+ "loadAddr dev:part"
+);
+#endif
+
/****************************************************************************************
* scsi_read
*/
@@ -710,24 +732,3 @@ void scsi_setup_inquiry(ccb * pccb)
pccb->cmdlen=6;
pccb->msgout[0]=SCSI_IDENTIFY; /* NOT USED */
}
-
-
-U_BOOT_CMD(
- scsi, 5, 1, do_scsi,
- "SCSI sub-system",
- "reset - reset SCSI controller\n"
- "scsi info - show available SCSI devices\n"
- "scsi scan - (re-)scan SCSI bus\n"
- "scsi device [dev] - show or set current device\n"
- "scsi part [dev] - print partition table of one or all SCSI devices\n"
- "scsi read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n"
- " to memory address `addr'\n"
- "scsi write addr blk# cnt - write `cnt' blocks starting at block\n"
- " `blk#' from memory address `addr'"
-);
-
-U_BOOT_CMD(
- scsiboot, 3, 1, do_scsiboot,
- "boot from SCSI device",
- "loadAddr dev:part"
-);