Newer
Older
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
cnt=blkcnt;
}
ccb[0]=ATAPI_CMD_READ_12;
ccb[1]=0; /* reserved */
ccb[2]=(unsigned char) (blknr>>24) & 0xFF; /* MSB Block */
ccb[3]=(unsigned char) (blknr>>16) & 0xFF; /* */
ccb[4]=(unsigned char) (blknr>> 8) & 0xFF;
ccb[5]=(unsigned char) blknr & 0xFF; /* LSB Block */
ccb[6]=(unsigned char) (cnt >>24) & 0xFF; /* MSB Block count */
ccb[7]=(unsigned char) (cnt >>16) & 0xFF;
ccb[8]=(unsigned char) (cnt >> 8) & 0xFF;
ccb[9]=(unsigned char) cnt & 0xFF; /* LSB Block */
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,
"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,
"diskboot- boot from IDE device\n",
"loadAddr dev:part\n"
);