Skip to content
Snippets Groups Projects
cmd_ide.c 49.7 KiB
Newer Older
  • Learn to ignore specific revisions
  • Wolfgang Denk's avatar
    Wolfgang Denk committed
    		ccb[10]=0; /* reserved */
    		ccb[11]=0; /* reserved */
    
    		if (atapi_issue_autoreq(device,ccb,12,
    					(unsigned char *)buffer,
    					cnt*ATAPI_READ_BLOCK_SIZE) == 0xFF) {
    			return (n);
    		}
    		n+=cnt;
    		blkcnt-=cnt;
    		blknr+=cnt;
    		buffer+=cnt*(ATAPI_READ_BLOCK_SIZE/4); /* ulong blocksize in ulong */
    	} while (blkcnt > 0);
    	return (n);
    }
    
    /* ------------------------------------------------------------------------- */
    
    #endif /* CONFIG_ATAPI */
    
    
    U_BOOT_CMD(
    	ide,  5,  1,  do_ide,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"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"
    );
    
    
    U_BOOT_CMD(
    	diskboot,	3,	1,	do_diskboot,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"diskboot- boot from IDE device\n",
    	"loadAddr dev:part\n"
    );
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #endif	/* CONFIG_COMMANDS & CFG_CMD_IDE */