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>
23 #ifdef CONFIG_LED_STATUS
24 # include <status_led.h>
27 /* Current I/O Device */
28 static int curr_device;
30 int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
33 if (strncmp(argv[1], "res", 3) == 0) {
34 puts("\nReset IDE: ");
40 return blk_common_cmd(argc, argv, IF_TYPE_IDE, &curr_device);
43 int do_diskboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
45 return common_diskboot(cmdtp, "ide", argc, argv);
48 U_BOOT_CMD(ide, 5, 1, do_ide,
50 "reset - reset IDE controller\n"
51 "ide info - show available IDE devices\n"
52 "ide device [dev] - show or set current device\n"
53 "ide part [dev] - print partition table of one or all IDE devices\n"
54 "ide read addr blk# cnt\n"
55 "ide write addr blk# cnt - read/write `cnt'"
56 " blocks starting at block `blk#'\n"
57 " to/from memory address `addr'");
59 U_BOOT_CMD(diskboot, 3, 1, do_diskboot,
60 "boot from IDE device", "loadAddr dev:part");