• Home
  • Raw
  • Download

Lines Matching refs:esp

32 static void jazz_esp_write8(struct esp *esp, u8 val, unsigned long reg)  in jazz_esp_write8()  argument
34 *(volatile u8 *)(esp->regs + reg) = val; in jazz_esp_write8()
37 static u8 jazz_esp_read8(struct esp *esp, unsigned long reg) in jazz_esp_read8() argument
39 return *(volatile u8 *)(esp->regs + reg); in jazz_esp_read8()
42 static int jazz_esp_irq_pending(struct esp *esp) in jazz_esp_irq_pending() argument
44 if (jazz_esp_read8(esp, ESP_STATUS) & ESP_STAT_INTR) in jazz_esp_irq_pending()
49 static void jazz_esp_reset_dma(struct esp *esp) in jazz_esp_reset_dma() argument
51 vdma_disable ((int)esp->dma_regs); in jazz_esp_reset_dma()
54 static void jazz_esp_dma_drain(struct esp *esp) in jazz_esp_dma_drain() argument
59 static void jazz_esp_dma_invalidate(struct esp *esp) in jazz_esp_dma_invalidate() argument
61 vdma_disable ((int)esp->dma_regs); in jazz_esp_dma_invalidate()
64 static void jazz_esp_send_dma_cmd(struct esp *esp, u32 addr, u32 esp_count, in jazz_esp_send_dma_cmd() argument
69 jazz_esp_write8(esp, (esp_count >> 0) & 0xff, ESP_TCLOW); in jazz_esp_send_dma_cmd()
70 jazz_esp_write8(esp, (esp_count >> 8) & 0xff, ESP_TCMED); in jazz_esp_send_dma_cmd()
71 vdma_disable ((int)esp->dma_regs); in jazz_esp_send_dma_cmd()
73 vdma_set_mode ((int)esp->dma_regs, DMA_MODE_READ); in jazz_esp_send_dma_cmd()
75 vdma_set_mode ((int)esp->dma_regs, DMA_MODE_WRITE); in jazz_esp_send_dma_cmd()
77 vdma_set_addr ((int)esp->dma_regs, addr); in jazz_esp_send_dma_cmd()
78 vdma_set_count ((int)esp->dma_regs, dma_count); in jazz_esp_send_dma_cmd()
79 vdma_enable ((int)esp->dma_regs); in jazz_esp_send_dma_cmd()
81 scsi_esp_cmd(esp, cmd); in jazz_esp_send_dma_cmd()
84 static int jazz_esp_dma_error(struct esp *esp) in jazz_esp_dma_error() argument
86 u32 enable = vdma_get_enable((int)esp->dma_regs); in jazz_esp_dma_error()
109 struct esp *esp; in esp_jazz_probe() local
113 host = scsi_host_alloc(tpnt, sizeof(struct esp)); in esp_jazz_probe()
120 esp = shost_priv(host); in esp_jazz_probe()
122 esp->host = host; in esp_jazz_probe()
123 esp->dev = &dev->dev; in esp_jazz_probe()
124 esp->ops = &jazz_esp_ops; in esp_jazz_probe()
130 esp->regs = (void __iomem *)res->start; in esp_jazz_probe()
131 if (!esp->regs) in esp_jazz_probe()
138 esp->dma_regs = (void __iomem *)res->start; in esp_jazz_probe()
140 esp->command_block = dma_alloc_coherent(esp->dev, 16, in esp_jazz_probe()
141 &esp->command_block_dma, in esp_jazz_probe()
143 if (!esp->command_block) in esp_jazz_probe()
149 err = request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); in esp_jazz_probe()
153 esp->scsi_id = 7; in esp_jazz_probe()
154 esp->host->this_id = esp->scsi_id; in esp_jazz_probe()
155 esp->scsi_id_mask = (1 << esp->scsi_id); in esp_jazz_probe()
156 esp->cfreq = 40000000; in esp_jazz_probe()
158 dev_set_drvdata(&dev->dev, esp); in esp_jazz_probe()
160 err = scsi_esp_register(esp); in esp_jazz_probe()
167 free_irq(host->irq, esp); in esp_jazz_probe()
169 dma_free_coherent(esp->dev, 16, in esp_jazz_probe()
170 esp->command_block, in esp_jazz_probe()
171 esp->command_block_dma); in esp_jazz_probe()
181 struct esp *esp = dev_get_drvdata(&dev->dev); in esp_jazz_remove() local
182 unsigned int irq = esp->host->irq; in esp_jazz_remove()
184 scsi_esp_unregister(esp); in esp_jazz_remove()
186 free_irq(irq, esp); in esp_jazz_remove()
187 dma_free_coherent(esp->dev, 16, in esp_jazz_remove()
188 esp->command_block, in esp_jazz_remove()
189 esp->command_block_dma); in esp_jazz_remove()
191 scsi_host_put(esp->host); in esp_jazz_remove()