1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2000-2011
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
17 #include <asm/byteorder.h>
20 #if defined(CONFIG_IDE_PCMCIA)
27 #ifdef CONFIG_LED_STATUS
28 # include <status_led.h>
31 /* Current I/O Device */
32 static int curr_device;
34 int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
37 if (strncmp(argv[1], "res", 3) == 0) {
38 puts("\nReset IDE: ");
44 return blk_common_cmd(argc, argv, IF_TYPE_IDE, &curr_device);
47 int do_diskboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
49 return common_diskboot(cmdtp, "ide", argc, argv);
52 U_BOOT_CMD(ide, 5, 1, do_ide,
54 "reset - reset IDE controller\n"
55 "ide info - show available IDE devices\n"
56 "ide device [dev] - show or set current device\n"
57 "ide part [dev] - print partition table of one or all IDE devices\n"
58 "ide read addr blk# cnt\n"
59 "ide write addr blk# cnt - read/write `cnt'"
60 " blocks starting at block `blk#'\n"
61 " to/from memory address `addr'");
63 U_BOOT_CMD(diskboot, 3, 1, do_diskboot,
64 "boot from IDE device", "loadAddr dev:part");