aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dec_esp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/dec_esp.c')
-rw-r--r--drivers/scsi/dec_esp.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/scsi/dec_esp.c b/drivers/scsi/dec_esp.c
index 4f39890b44a..256d6baf8df 100644
--- a/drivers/scsi/dec_esp.c
+++ b/drivers/scsi/dec_esp.c
@@ -18,7 +18,7 @@
18 * 20001005 - Initialization fixes for 2.4.0-test9 18 * 20001005 - Initialization fixes for 2.4.0-test9
19 * Florian Lohoff <flo@rfc822.org> 19 * Florian Lohoff <flo@rfc822.org>
20 * 20 *
21 * Copyright (C) 2002, 2003 Maciej W. Rozycki 21 * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki
22 */ 22 */
23 23
24#include <linux/kernel.h> 24#include <linux/kernel.h>
@@ -41,6 +41,7 @@
41#include <asm/dec/ioasic_addrs.h> 41#include <asm/dec/ioasic_addrs.h>
42#include <asm/dec/ioasic_ints.h> 42#include <asm/dec/ioasic_ints.h>
43#include <asm/dec/machtype.h> 43#include <asm/dec/machtype.h>
44#include <asm/dec/system.h>
44#include <asm/dec/tc.h> 45#include <asm/dec/tc.h>
45 46
46#define DEC_SCSI_SREG 0 47#define DEC_SCSI_SREG 0
@@ -183,7 +184,8 @@ static int dec_esp_detect(Scsi_Host_Template * tpnt)
183 esp->dregs = 0; 184 esp->dregs = 0;
184 185
185 /* ESP register base */ 186 /* ESP register base */
186 esp->eregs = (struct ESP_regs *) (system_base + IOASIC_SCSI); 187 esp->eregs = (void *)CKSEG1ADDR(dec_kn_slot_base +
188 IOASIC_SCSI);
187 189
188 /* Set the command buffer */ 190 /* Set the command buffer */
189 esp->esp_command = (volatile unsigned char *) cmd_buffer; 191 esp->esp_command = (volatile unsigned char *) cmd_buffer;
@@ -231,7 +233,8 @@ static int dec_esp_detect(Scsi_Host_Template * tpnt)
231 esp->slot = CPHYSADDR(mem_start); 233 esp->slot = CPHYSADDR(mem_start);
232 234
233 esp->dregs = 0; 235 esp->dregs = 0;
234 esp->eregs = (struct ESP_regs *) (mem_start + DEC_SCSI_SREG); 236 esp->eregs = (void *)CKSEG1ADDR(mem_start +
237 DEC_SCSI_SREG);
235 esp->do_pio_cmds = 1; 238 esp->do_pio_cmds = 1;
236 239
237 /* Set the command buffer */ 240 /* Set the command buffer */
@@ -513,14 +516,15 @@ static void dma_advance_sg(struct scsi_cmnd * sp)
513static void pmaz_dma_drain(struct NCR_ESP *esp) 516static void pmaz_dma_drain(struct NCR_ESP *esp)
514{ 517{
515 memcpy(phys_to_virt(esp_virt_buffer), 518 memcpy(phys_to_virt(esp_virt_buffer),
516 (void *)KSEG1ADDR(esp->slot + DEC_SCSI_SRAM + ESP_TGT_DMA_SIZE), 519 (void *)CKSEG1ADDR(esp->slot + DEC_SCSI_SRAM +
517 scsi_current_length); 520 ESP_TGT_DMA_SIZE),
521 scsi_current_length);
518} 522}
519 523
520static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length) 524static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length)
521{ 525{
522 volatile u32 *dmareg = 526 volatile u32 *dmareg =
523 (volatile u32 *)KSEG1ADDR(esp->slot + DEC_SCSI_DMAREG); 527 (volatile u32 *)CKSEG1ADDR(esp->slot + DEC_SCSI_DMAREG);
524 528
525 if (length > ESP_TGT_DMA_SIZE) 529 if (length > ESP_TGT_DMA_SIZE)
526 length = ESP_TGT_DMA_SIZE; 530 length = ESP_TGT_DMA_SIZE;
@@ -536,9 +540,10 @@ static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length)
536static void pmaz_dma_init_write(struct NCR_ESP *esp, u32 vaddress, int length) 540static void pmaz_dma_init_write(struct NCR_ESP *esp, u32 vaddress, int length)
537{ 541{
538 volatile u32 *dmareg = 542 volatile u32 *dmareg =
539 (volatile u32 *)KSEG1ADDR(esp->slot + DEC_SCSI_DMAREG); 543 (volatile u32 *)CKSEG1ADDR(esp->slot + DEC_SCSI_DMAREG);
540 544
541 memcpy((void *)KSEG1ADDR(esp->slot + DEC_SCSI_SRAM + ESP_TGT_DMA_SIZE), 545 memcpy((void *)CKSEG1ADDR(esp->slot + DEC_SCSI_SRAM +
546 ESP_TGT_DMA_SIZE),
542 phys_to_virt(vaddress), length); 547 phys_to_virt(vaddress), length);
543 548
544 wmb(); 549 wmb();