From: Ken T. <ke...@we...> - 2000-06-26 11:56:55
|
On Mon, 26 Jun 2000, F. Heitkamp wrote: > Are there any folks out there that want to help work on > this driver? Last I checked either no one had the same > hardware as I, or did not, have the time, or simply wasn't > interested. I've got the same hardware but no SCSI disks on the PPC SCSI interface so probably can't help much. > The cache seems to be got by using check_region/request_region, > which are standard kernel API calls AFAICT. The check_region > call succeeds, and according to the "Linux Device Drivers" > book the request_region will never fail if the check_region > succeeds. The driver you're looking might be similar to the 53c7xx driver, it gets memory for the script (and for command buffers) by calling get_free_page(), the CPU needs the virtual address of this memory but the SCSI chip needs the physical address (see previous mail Fred). Don't know anything about reigons but do you need to set the cache mode of the memory you get, the 53c7xx driver sets it to IOMAP_NOCACHE_SER. The relevant part of 53c7xx.c is instance->hostdata[0] = __get_free_pages(GFP_ATOMIC, 1); if (instance->hostdata[0] == 0) panic ("53c7xx: Couldn't get hostdata memory"); memset((void *)instance->hostdata[0], 0, 8192); cache_push(virt_to_phys((void *)(instance->hostdata[0])), 8192); cache_clear(virt_to_phys((void *)(instance->hostdata[0])), 8192); kernel_set_cachemode(instance->hostdata[0], 8192, IOMAP_NOCACHE_SER); and later on to get the cache test (Test 1) running start = virt_to_bus (hostdata->script) + hostdata->E_test_1; hostdata->state = STATE_RUNNING; printk ("scsi%d : test 1", host->host_no); NCR53c7x0_write32 (DSP_REG, start); I should get back to the 53c7xx driver... Ken. |