Пример #1
0
int atari_scsi_release (struct Scsi_Host *sh)
{
	if (IS_A_TT())
		remove_isr (IRQ_TT_MFP_SCSI, scsi_tt_intr, NULL);
	if (atari_dma_buffer)
		scsi_init_free (atari_dma_buffer, STRAM_BUFFER_SIZE);
	return 1;
}
Пример #2
0
/*
 * attach to the grfbus (zbus)
 */
void
grfulattach(device_t parent, device_t self, void *aux)
{
	static struct grf_ul_softc congrf;
	struct device temp;
	struct zbus_args *zap;
	struct grf_softc *gp;
	struct grf_ul_softc *gup;

	zap = aux;

	if (self == NULL) {
		gup = &congrf;
		gp = &gup->gus_sc;
		gp->g_device = &temp;
		temp.dv_private = gp;
	} else {
		gup = device_private(self);
		gp = &gup->gus_sc;
		gp->g_device = self;
	}

	if (self != NULL && congrf.gus_sc.g_regkva != 0) {
		/*
		 * inited earlier, just copy (not device struct)
		 */
		memcpy(&gp->g_display, &congrf.gus_sc.g_display,
		    (char *)&gup->gus_isr - (char *)&gp->g_display);

		/* ...and transfer the isr */
		gup->gus_isr.isr_ipl = 2;
		gup->gus_isr.isr_intr = ulisr;
		gup->gus_isr.isr_arg = (void *)gp;
		/*
		 * To make sure ints are always catched, first add new isr
		 * then remove old:
		 */
		add_isr(&gup->gus_isr);
		remove_isr(&congrf.gus_isr);
	} else {
		gp->g_regkva = (void *)zap->va;
		gp->g_fbkva = NULL;
		gp->g_unit = GRF_ULOWELL_UNIT;
		gp->g_flags = GF_ALIVE;
		gp->g_mode = ul_mode;
#if NITE > 0
		gp->g_conpri = grful_cnprobe();
#endif
		gp->g_data = NULL;

		gup->gus_isr.isr_ipl = 2;
		gup->gus_isr.isr_intr = ulisr;
		gup->gus_isr.isr_arg = (void *)gp;
		add_isr(&gup->gus_isr);

		(void)ul_load_code(gp);
		(void)ul_load_mon(gp, current_mon);
#if NITE > 0
		grful_iteinit(gp);
#endif
	}
	if (self != NULL)
		printf("\n");
	/*
	 * attach grf
	 */
	amiga_config_found(cfdata, gp->g_device, gp, grfulprint);
}