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