X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=common%2Fcmd_scsi.c;h=cc08743d5dcc7a42a8c5030a04a9bce4d017dfc4;hb=a26eabeec31746f06d309103690892805696e344;hp=68e46b6389749493f5f7cb70edf933e6c5846e8f;hpb=2f916943c9b85d628c67c8ac98e604f2bcbc21e4;p=u-boot diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index 68e46b6389..cc08743d5d 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -43,8 +43,13 @@ #else #define SCSI_DEV_ID CONFIG_SCSI_DEV_ID #endif +#elif defined CONFIG_SATA_ULI5288 + +#define SCSI_VEND_ID 0x10b9 +#define SCSI_DEV_ID 0x5288 + #else -#error CONFIG_SCSI_SYM53C8XX must be defined +#error no scsi device defined #endif @@ -243,12 +248,12 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } part = simple_strtoul(++ep, NULL, 16); } - if (get_partition_info (&scsi_dev_desc[dev], part, &info)) { + if (get_partition_info (scsi_dev_desc, part, &info)) { printf("error reading partinfo\n"); return 1; } - if ((strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) && - (strncmp(info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) { + if ((strncmp((char *)(info.type), BOOT_PART_TYPE, sizeof(info.type)) != 0) && + (strncmp((char *)(info.type), BOOT_PART_COMP, sizeof(info.type)) != 0)) { printf ("\n** Invalid partition type \"%.32s\"" " (expect \"" BOOT_PART_TYPE "\")\n", info.type); @@ -277,7 +282,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) checksum = ntohl(hdr->ih_hcrc); hdr->ih_hcrc = 0; - if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) { + if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) { puts ("\n** Bad Header Checksum **\n"); return 1; } @@ -585,4 +590,23 @@ void scsi_setup_inquiry(ccb * pccb) pccb->msgout[0]=SCSI_IDENTIFY; /* NOT USED */ } + +U_BOOT_CMD( + scsi, 5, 1, do_scsi, + "scsi - SCSI sub-system\n", + "reset - reset SCSI controller\n" + "scsi info - show available SCSI devices\n" + "scsi scan - (re-)scan SCSI bus\n" + "scsi device [dev] - show or set current device\n" + "scsi part [dev] - print partition table of one or all SCSI devices\n" + "scsi read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n" + " to memory address `addr'\n" +); + +U_BOOT_CMD( + scsiboot, 3, 1, do_scsiboot, + "scsiboot- boot from SCSI device\n", + "loadAddr dev:part\n" +); + #endif /* #if (CONFIG_COMMANDS & CFG_CMD_SCSI) */