Lines Matching full:setup

618 /* setup & interrupt */
714 struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup) in aha152x_probe_one() argument
730 shpnt->io_port = setup->io_port; in aha152x_probe_one()
732 shpnt->irq = setup->irq; in aha152x_probe_one()
734 if (!setup->tc1550) { in aha152x_probe_one()
735 HOSTIOPORT0 = setup->io_port; in aha152x_probe_one()
736 HOSTIOPORT1 = setup->io_port; in aha152x_probe_one()
738 HOSTIOPORT0 = setup->io_port+0x10; in aha152x_probe_one()
739 HOSTIOPORT1 = setup->io_port-0x10; in aha152x_probe_one()
743 RECONNECT = setup->reconnect; in aha152x_probe_one()
744 SYNCHRONOUS = setup->synchronous; in aha152x_probe_one()
745 PARITY = setup->parity; in aha152x_probe_one()
746 DELAY = setup->delay; in aha152x_probe_one()
747 EXT_TRANS = setup->ext_trans; in aha152x_probe_one()
749 SETPORT(SCSIID, setup->scsiid << 4); in aha152x_probe_one()
750 shpnt->this_id = setup->scsiid; in aha152x_probe_one()
752 if (setup->reconnect) in aha152x_probe_one()
775 shpnt->host_no, setup->tc1550 ? " (tc1550 mode)" : "", in aha152x_probe_one()
871 * setup controller to generate interrupts depending
904 * Queue a command and setup interrupts for a free bus.
936 /* setup scratch area in aha152x_internal_queue()
2368 * setup controller to interrupt on in is_complete()
2918 static struct aha152x_setup setup[2]; variable
3015 static int checksetup(struct aha152x_setup *setup) in checksetup() argument
3018 for (i = 0; i < ARRAY_SIZE(ports) && (setup->io_port != ports[i]); i++) in checksetup()
3024 if (!request_region(setup->io_port, IO_RANGE, "aha152x")) { in checksetup()
3025 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup->io_port); in checksetup()
3029 if( aha152x_porttest(setup->io_port) ) { in checksetup()
3030 setup->tc1550=0; in checksetup()
3031 } else if( tc1550_porttest(setup->io_port) ) { in checksetup()
3032 setup->tc1550=1; in checksetup()
3034 release_region(setup->io_port, IO_RANGE); in checksetup()
3038 release_region(setup->io_port, IO_RANGE); in checksetup()
3040 if ((setup->irq < IRQ_MIN) || (setup->irq > IRQ_MAX)) in checksetup()
3043 if ((setup->scsiid < 0) || (setup->scsiid > 7)) in checksetup()
3046 if ((setup->reconnect < 0) || (setup->reconnect > 1)) in checksetup()
3049 if ((setup->parity < 0) || (setup->parity > 1)) in checksetup()
3052 if ((setup->synchronous < 0) || (setup->synchronous > 1)) in checksetup()
3055 if ((setup->ext_trans < 0) || (setup->ext_trans > 1)) in checksetup()
3077 if (!checksetup(&setup[i])) { in aha152x_init()
3078 printk(KERN_ERR "\naha152x: %s\n", setup[i].conf); in aha152x_init()
3086 if (setup_count < ARRAY_SIZE(setup)) { in aha152x_init()
3089 if (setup_count == 0 || (override.io_port != setup[0].io_port)) { in aha152x_init()
3101 setup[setup_count++] = override; in aha152x_init()
3107 if (setup_count < ARRAY_SIZE(setup)) { in aha152x_init()
3110 if (setup_count == 0 || (override.io_port != setup[0].io_port)) { in aha152x_init()
3122 setup[setup_count++] = override; in aha152x_init()
3128 if (setup_count<ARRAY_SIZE(setup) && (aha152x[0]!=0 || io[0]!=0 || irq[0]!=0)) { in aha152x_init()
3130 setup[setup_count].conf = ""; in aha152x_init()
3131 setup[setup_count].io_port = aha152x[0]; in aha152x_init()
3132 setup[setup_count].irq = aha152x[1]; in aha152x_init()
3133 setup[setup_count].scsiid = aha152x[2]; in aha152x_init()
3134 setup[setup_count].reconnect = aha152x[3]; in aha152x_init()
3135 setup[setup_count].parity = aha152x[4]; in aha152x_init()
3136 setup[setup_count].synchronous = aha152x[5]; in aha152x_init()
3137 setup[setup_count].delay = aha152x[6]; in aha152x_init()
3138 setup[setup_count].ext_trans = aha152x[7]; in aha152x_init()
3140 if(io[0]!=0) setup[setup_count].io_port = io[0]; in aha152x_init()
3141 if(irq[0]!=0) setup[setup_count].irq = irq[0]; in aha152x_init()
3143 setup[setup_count].scsiid = scsiid[0]; in aha152x_init()
3144 setup[setup_count].reconnect = reconnect[0]; in aha152x_init()
3145 setup[setup_count].parity = parity[0]; in aha152x_init()
3146 setup[setup_count].synchronous = sync[0]; in aha152x_init()
3147 setup[setup_count].delay = delay[0]; in aha152x_init()
3148 setup[setup_count].ext_trans = exttrans[0]; in aha152x_init()
3151 if (checksetup(&setup[setup_count])) in aha152x_init()
3155 setup[setup_count].io_port, in aha152x_init()
3156 setup[setup_count].irq, in aha152x_init()
3157 setup[setup_count].scsiid, in aha152x_init()
3158 setup[setup_count].reconnect, in aha152x_init()
3159 setup[setup_count].parity, in aha152x_init()
3160 setup[setup_count].synchronous, in aha152x_init()
3161 setup[setup_count].delay, in aha152x_init()
3162 setup[setup_count].ext_trans); in aha152x_init()
3165 if (setup_count<ARRAY_SIZE(setup) && (aha152x1[0]!=0 || io[1]!=0 || irq[1]!=0)) { in aha152x_init()
3167 setup[setup_count].conf = ""; in aha152x_init()
3168 setup[setup_count].io_port = aha152x1[0]; in aha152x_init()
3169 setup[setup_count].irq = aha152x1[1]; in aha152x_init()
3170 setup[setup_count].scsiid = aha152x1[2]; in aha152x_init()
3171 setup[setup_count].reconnect = aha152x1[3]; in aha152x_init()
3172 setup[setup_count].parity = aha152x1[4]; in aha152x_init()
3173 setup[setup_count].synchronous = aha152x1[5]; in aha152x_init()
3174 setup[setup_count].delay = aha152x1[6]; in aha152x_init()
3175 setup[setup_count].ext_trans = aha152x1[7]; in aha152x_init()
3177 if(io[1]!=0) setup[setup_count].io_port = io[1]; in aha152x_init()
3178 if(irq[1]!=0) setup[setup_count].irq = irq[1]; in aha152x_init()
3180 setup[setup_count].scsiid = scsiid[1]; in aha152x_init()
3181 setup[setup_count].reconnect = reconnect[1]; in aha152x_init()
3182 setup[setup_count].parity = parity[1]; in aha152x_init()
3183 setup[setup_count].synchronous = sync[1]; in aha152x_init()
3184 setup[setup_count].delay = delay[1]; in aha152x_init()
3185 setup[setup_count].ext_trans = exttrans[1]; in aha152x_init()
3187 if (checksetup(&setup[setup_count])) in aha152x_init()
3191 setup[setup_count].io_port, in aha152x_init()
3192 setup[setup_count].irq, in aha152x_init()
3193 setup[setup_count].scsiid, in aha152x_init()
3194 setup[setup_count].reconnect, in aha152x_init()
3195 setup[setup_count].parity, in aha152x_init()
3196 setup[setup_count].synchronous, in aha152x_init()
3197 setup[setup_count].delay, in aha152x_init()
3198 setup[setup_count].ext_trans); in aha152x_init()
3203 for(i=0; setup_count<ARRAY_SIZE(setup) && id_table[i].vendor; i++) { in aha152x_init()
3204 while ( setup_count<ARRAY_SIZE(setup) && in aha152x_init()
3219 if (setup_count==1 && pnp_port_start(dev, 0)==setup[0].io_port) { in aha152x_init()
3224 setup[setup_count].io_port = pnp_port_start(dev, 0); in aha152x_init()
3225 setup[setup_count].irq = pnp_irq(dev, 0); in aha152x_init()
3226 setup[setup_count].scsiid = 7; in aha152x_init()
3227 setup[setup_count].reconnect = 1; in aha152x_init()
3228 setup[setup_count].parity = 1; in aha152x_init()
3229 setup[setup_count].synchronous = 1; in aha152x_init()
3230 setup[setup_count].delay = DELAY_DEFAULT; in aha152x_init()
3231 setup[setup_count].ext_trans = 0; in aha152x_init()
3237 setup[setup_count].io_port, setup[setup_count].irq); in aha152x_init()
3244 if (setup_count<ARRAY_SIZE(setup)) { in aha152x_init()
3266 if ((setup_count == 1) && (setup[0].io_port == ports[i])) in aha152x_init()
3275 setup[setup_count].tc1550 = 0; in aha152x_init()
3280 setup[setup_count].tc1550 = 1; in aha152x_init()
3292 setup[setup_count].io_port = ports[i]; in aha152x_init()
3293 setup[setup_count].irq = IRQ_MIN + conf.cf_irq; in aha152x_init()
3294 setup[setup_count].scsiid = conf.cf_id; in aha152x_init()
3295 setup[setup_count].reconnect = conf.cf_tardisc; in aha152x_init()
3296 setup[setup_count].parity = !conf.cf_parity; in aha152x_init()
3297 setup[setup_count].synchronous = conf.cf_syncneg; in aha152x_init()
3298 setup[setup_count].delay = DELAY_DEFAULT; in aha152x_init()
3299 setup[setup_count].ext_trans = 0; in aha152x_init()
3312 if ( request_region(setup[i].io_port, IO_RANGE, "aha152x") ) { in aha152x_init()
3313 struct Scsi_Host *shpnt = aha152x_probe_one(&setup[i]); in aha152x_init()
3316 release_region(setup[i].io_port, IO_RANGE); in aha152x_init()
3324 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup[i].io_port); in aha152x_init()
3357 if(setup_count>=ARRAY_SIZE(setup)) { in aha152x_setup()
3362 setup[setup_count].conf = str; in aha152x_setup()
3363 setup[setup_count].io_port = ints[0] >= 1 ? ints[1] : 0x340; in aha152x_setup()
3364 setup[setup_count].irq = ints[0] >= 2 ? ints[2] : 11; in aha152x_setup()
3365 setup[setup_count].scsiid = ints[0] >= 3 ? ints[3] : 7; in aha152x_setup()
3366 setup[setup_count].reconnect = ints[0] >= 4 ? ints[4] : 1; in aha152x_setup()
3367 setup[setup_count].parity = ints[0] >= 5 ? ints[5] : 1; in aha152x_setup()
3368 setup[setup_count].synchronous = ints[0] >= 6 ? ints[6] : 1; in aha152x_setup()
3369 setup[setup_count].delay = ints[0] >= 7 ? ints[7] : DELAY_DEFAULT; in aha152x_setup()
3370 setup[setup_count].ext_trans = ints[0] >= 8 ? ints[8] : 0; in aha152x_setup()