#ifdef CONFIG_ATAPI
static void atapi_inquiry(block_dev_desc_t *dev_desc);
-ulong atapi_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer);
+static ulong atapi_read(int device, ulong blknr, lbaint_t blkcnt,
+ void *buffer);
#endif
/* ------------------------------------------------------------------------- */
-ulong ide_read(int device, lbaint_t blknr, ulong blkcnt, void *buffer)
+ulong ide_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer)
{
ulong n = 0;
unsigned char c;
lba48 = 1;
}
#endif
- debug("ide_read dev %d start %lX, blocks %lX buffer at %lX\n",
+ debug("ide_read dev %d start %lX, blocks " LBAF " buffer at %lX\n",
device, blknr, blkcnt, (ulong) buffer);
ide_led(DEVICE_LED(device), 1); /* LED on */
if ((c & (ATA_STAT_DRQ | ATA_STAT_BUSY | ATA_STAT_ERR)) !=
ATA_STAT_DRQ) {
-#if defined(CONFIG_SYS_64BIT_LBA)
- printf("Error (no IRQ) dev %d blk %lld: status 0x%02x\n",
+ printf("Error (no IRQ) dev %d blk %ld: status %#02x\n",
device, blknr, c);
-#else
- printf("Error (no IRQ) dev %d blk %ld: status 0x%02x\n",
- device, (ulong) blknr, c);
-#endif
break;
}
/* ------------------------------------------------------------------------- */
-ulong ide_write(int device, lbaint_t blknr, ulong blkcnt, const void *buffer)
+ulong ide_write(int device, ulong blknr, lbaint_t blkcnt, const void *buffer)
{
ulong n = 0;
unsigned char c;
if ((c & (ATA_STAT_DRQ | ATA_STAT_BUSY | ATA_STAT_ERR)) !=
ATA_STAT_DRQ) {
-#if defined(CONFIG_SYS_64BIT_LBA)
- printf("Error (no IRQ) dev %d blk %lld: status 0x%02x\n",
+ printf("Error (no IRQ) dev %d blk %ld: status %#02x\n",
device, blknr, c);
-#else
- printf("Error (no IRQ) dev %d blk %ld: status 0x%02x\n",
- device, (ulong) blknr, c);
-#endif
goto WR_OUT;
}
#define ATAPI_READ_BLOCK_SIZE 2048 /* assuming CD part */
#define ATAPI_READ_MAX_BLOCK (ATAPI_READ_MAX_BYTES/ATAPI_READ_BLOCK_SIZE)
-ulong atapi_read(int device, lbaint_t blknr, ulong blkcnt, void *buffer)
+ulong atapi_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer)
{
ulong n = 0;
unsigned char ccb[12]; /* Command descriptor block */
ulong cnt;
- debug("atapi_read dev %d start %lX, blocks %lX buffer at %lX\n",
+ debug("atapi_read dev %d start %lX, blocks " LBAF " buffer at %lX\n",
device, blknr, blkcnt, (ulong) buffer);
do {