#ifdef CONFIG_SCSI_SYM53C8XX
#define SCSI_VEND_ID 0x1000
#ifndef CONFIG_SCSI_DEV_ID
#ifdef CONFIG_SCSI_SYM53C8XX
#define SCSI_VEND_ID 0x1000
#ifndef CONFIG_SCSI_DEV_ID
/********************************************************************************
* forward declerations of some Setup Routines
/********************************************************************************
* forward declerations of some Setup Routines
if((modi&0x80)==0x80) /* drive is removable */
scsi_dev_desc[scsi_max_devs].removable=TRUE;
/* get info for this device */
if((modi&0x80)==0x80) /* drive is removable */
scsi_dev_desc[scsi_max_devs].removable=TRUE;
/* get info for this device */
- scsi_ident_cpy(&scsi_dev_desc[scsi_max_devs].vendor[0],&tempbuff[8],8);
- scsi_ident_cpy(&scsi_dev_desc[scsi_max_devs].product[0],&tempbuff[16],16);
- scsi_ident_cpy(&scsi_dev_desc[scsi_max_devs].revision[0],&tempbuff[32],4);
+ scsi_ident_cpy((unsigned char *)&scsi_dev_desc[scsi_max_devs].vendor[0],
+ &tempbuff[8], 8);
+ scsi_ident_cpy((unsigned char *)&scsi_dev_desc[scsi_max_devs].product[0],
+ &tempbuff[16], 16);
+ scsi_ident_cpy((unsigned char *)&scsi_dev_desc[scsi_max_devs].revision[0],
+ &tempbuff[32], 4);
}
/******************************************************************************
* scsi boot command intepreter. Derived from diskboot
*/
}
/******************************************************************************
* scsi boot command intepreter. Derived from diskboot
*/
-int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- checksum = ntohl(hdr->ih_hcrc);
- hdr->ih_hcrc = 0;
+ image_print_contents (hdr);
+ cnt = image_get_image_size (hdr);
+ break;
+#if defined(CONFIG_FIT)
+ case IMAGE_FORMAT_FIT:
+ fit_hdr = (const void *)addr;
+ puts ("Fit image detected...\n");
- if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) {
- puts ("\n** Bad Header Checksum **\n");
+ cnt = fit_get_size (fit_hdr);
+ break;
+#endif
+ default:
+ puts ("** Unknown image type\n");
+
+#if defined(CONFIG_FIT)
+ /* This cannot be done earlier, we need complete FIT image in RAM first */
+ if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) {
+ if (!fit_check_format (fit_hdr)) {
+ puts ("** Bad FIT image format\n");
+ return 1;
+ }
+ fit_print_contents (fit_hdr);
+ }
+#endif
+
/* Check if we should attempt an auto-start */
if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
char *local_args[2];
/* Check if we should attempt an auto-start */
if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
char *local_args[2];
/*********************************************************************************
* scsi command intepreter
*/
/*********************************************************************************
* scsi command intepreter
*/
-int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 2:
if (strncmp(argv[1],"res",3) == 0) {
printf("\nReset SCSI\n");
case 2:
if (strncmp(argv[1],"res",3) == 0) {
printf("\nReset SCSI\n");
if(scsi_dev_desc[i].type==DEV_TYPE_UNKNOWN)
continue; /* list only known devices */
printf ("SCSI dev. %d: ", i);
if(scsi_dev_desc[i].type==DEV_TYPE_UNKNOWN)
continue; /* list only known devices */
printf ("SCSI dev. %d: ", i);
if (strncmp(argv[1],"dev",3) == 0) {
int dev = (int)simple_strtoul(argv[2], NULL, 10);
printf ("\nSCSI device %d: ", dev);
if (strncmp(argv[1],"dev",3) == 0) {
int dev = (int)simple_strtoul(argv[2], NULL, 10);
printf ("\nSCSI device %d: ", dev);
"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"
"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"
);
U_BOOT_CMD(
scsiboot, 3, 1, do_scsiboot,
);
U_BOOT_CMD(
scsiboot, 3, 1, do_scsiboot,