summaryrefslogtreecommitdiff
path: root/common/cmd_ide.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /common/cmd_ide.c
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadu-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2
* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'common/cmd_ide.c')
-rw-r--r--common/cmd_ide.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index f1b24be..c1e610a 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -39,7 +39,6 @@
#endif
#include <ide.h>
#include <ata.h>
-#include <cmd_ide.h>
#include <cmd_disk.h>
#ifdef CONFIG_STATUS_LED
# include <status_led.h>
@@ -798,7 +797,7 @@ output_data_short(int dev, ulong *sect_buf, int words)
{
ushort *dbuf;
volatile ushort *pbuf;
-
+
pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG);
dbuf = (ushort *)sect_buf;
while (words--) {
@@ -828,8 +827,6 @@ input_swap_data(int dev, ulong *sect_buf, int words)
#endif /* __PPC__ */
-
-
#ifdef __PPC__
static void
output_data(int dev, ulong *sect_buf, int words)
@@ -1381,7 +1378,6 @@ static void ide_led (uchar led, uchar status)
*/
-
#undef ATAPI_DEBUG
#ifdef ATAPI_DEBUG
@@ -1681,7 +1677,6 @@ error:
}
-
static void atapi_inquiry(block_dev_desc_t * dev_desc)
{
unsigned char ccb[12]; /* Command descriptor block */
@@ -1816,4 +1811,23 @@ ulong atapi_read (int device, ulong blknr, ulong blkcnt, ulong *buffer)
#endif /* CONFIG_ATAPI */
+cmd_tbl_t U_BOOT_CMD(IDE) = MK_CMD_ENTRY(
+ "ide", 5, 1, do_ide,
+ "ide - IDE sub-system\n",
+ "reset - reset IDE controller\n"
+ "ide info - show available IDE devices\n"
+ "ide device [dev] - show or set current device\n"
+ "ide part [dev] - print partition table of one or all IDE devices\n"
+ "ide read addr blk# cnt\n"
+ "ide write addr blk# cnt - read/write `cnt'"
+ " blocks starting at block `blk#'\n"
+ " to/from memory address `addr'\n"
+);
+
+cmd_tbl_t U_BOOT_CMD(DISK) = MK_CMD_ENTRY(
+ "diskboot", 3, 1, do_diskboot,
+ "diskboot- boot from IDE device\n",
+ "loadAddr dev:part\n"
+);
+
#endif /* CONFIG_COMMANDS & CFG_CMD_IDE */