printk("Total: %d A2232 boards initialized.\n.", nr_a2232); /* Some status report if no card was found */ 
printk("Total: %d A2232 boards initialized.\n", nr_a2232); /* Some status report if no card was found */ 
static int __init a2232board_init(void){	struct zorro_dev *z;	unsigned int boardaddr;	int bcount;	short start;	u_char *from;	volatile u_char *to;	volatile struct a2232memory *mem;#ifdef CONFIG_SMP	return -ENODEV;	/* This driver is not SMP aware. Is there an SMP ZorroII-bus-machine? */#endif	if (!MACH_IS_AMIGA){		return -ENODEV;	}	printk("Commodore A2232 driver initializing.\n"); /* Say that we're alive. */	z = NULL;	nr_a2232 = 0;	while ( (z = zorro_find_device(ZORRO_WILDCARD, z)) ){		if (	(z->id != ZORRO_PROD_CBM_A2232_PROTOTYPE) && 			(z->id != ZORRO_PROD_CBM_A2232)	){			continue;	// The board found was no A2232		}		if (!zorro_request_device(z,"A2232 driver"))			continue;		printk("Commodore A2232 found (#%d).\n",nr_a2232);		zd_a2232[nr_a2232] = z;		boardaddr = ZTWO_VADDR( z->resource.start );		printk("Board is located at address 0x%x, size is 0x%x.\n", boardaddr, (unsigned int) ((z->resource.end+1) - (z->resource.start)));		mem = (volatile struct a2232memory *) boardaddr;		(void) mem->Enable6502Reset;   /* copy the code across to the board */		to = (u_char *)mem;  from = a2232_65EC02code; bcount = sizeof(a2232_65EC02code) - 2;		start = *(short *)from;		from += sizeof(start);		to += start;		while(bcount--) *to++ = *from++;		printk("65EC02 software uploaded to the A2232 memory.\n");  		mem->Common.Crystal = A2232_UNKNOWN;  /* use automatic speed check */  		/* start 6502 running */		(void) mem->ResetBoard;		printk("A2232's 65EC02 CPU up and running.\n");  		/* wait until speed detector has finished */		for (bcount = 0; bcount < 2000; bcount++) {			udelay(1000);			if (mem->Common.Crystal)				break;		}		printk((mem->Common.Crystal?"A2232 oscillator crystal detected by 65EC02 software: ":"65EC02 software could not determine A2232 oscillator crystal: "));		switch (mem->Common.Crystal){		case A2232_UNKNOWN:			printk("Unknown crystal.\n");			break; 		case A2232_NORMAL:			printk ("Normal crystal.\n");			break;		case A2232_TURBO:			printk ("Turbo crystal.\n");			break;		default:			printk ("0x%x. Huh?\n",mem->Common.Crystal);		}		nr_a2232++;	}		printk("Total: %d A2232 boards initialized.\n.", nr_a2232); /* Some status report if no card was found */	a2232_init_portstructs();	/*		a2232_init_drivers also registers the drivers. Must be here because all boards		have to be detected first.	*/	if (a2232_init_drivers()) return -ENODEV; // maybe we should use a different -Exxx?	request_irq(IRQ_AMIGA_VERTB, a2232_vbl_inter, 0, "A2232 serial VBL", a2232_driver_ID);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/3fa63c7d82ab9a12a5d0a299069f8df9f35aa011/ser_a2232.c/buggy/drivers/char/ser_a2232.c