- /* check for SPEAr device */
- switch (target->tap->idcode)
- {
- case JTAG_ID_3XX_6XX:
- /* SPEAr3xx/6xx */
- spearsmi_info->io_base = SMI_CFGREG_3XX_6XX;
- switch (bank->base)
- {
- case SMI_BASE_3XX_6XX:
- spearsmi_info->bank_num = SMI_SEL_BANK0;
- break;
- case SMI_BASE_3XX_6XX + SMI_BANK_SIZE:
- spearsmi_info->bank_num = SMI_SEL_BANK1;
- break;
- case SMI_BASE_3XX_6XX + 2*SMI_BANK_SIZE:
- spearsmi_info->bank_num = SMI_SEL_BANK2;
- break;
- case SMI_BASE_3XX_6XX + 3*SMI_BANK_SIZE:
- spearsmi_info->bank_num = SMI_SEL_BANK3;
- break;
- default:
- LOG_ERROR("Invalid base address 0x%" PRIx32, bank->base);
- return ERROR_FAIL;
- }
+ for (target_device=target_devices ; target_device->name ; ++target_device)
+ if (target_device->tap_idcode == target->tap->idcode)