Lines Matching refs:esp

7  * See sys/arch/mac68k/obio/esp.c for some background information.
49 #define esp_read8(REG) mac_esp_read8(esp, REG)
50 #define esp_write8(VAL, REG) mac_esp_write8(esp, VAL, REG)
53 struct esp *esp;
57 static struct esp *esp_chips[2];
60 #define MAC_ESP_GET_PRIV(esp) ((struct mac_esp_priv *) \
61 dev_get_drvdata((esp)->dev))
63 static inline void mac_esp_write8(struct esp *esp, u8 val, unsigned long reg)
65 nubus_writeb(val, esp->regs + reg * 16);
68 static inline u8 mac_esp_read8(struct esp *esp, unsigned long reg)
70 return nubus_readb(esp->regs + reg * 16);
73 static void mac_esp_reset_dma(struct esp *esp)
78 static void mac_esp_dma_drain(struct esp *esp)
83 static void mac_esp_dma_invalidate(struct esp *esp)
88 static int mac_esp_dma_error(struct esp *esp)
90 return esp->send_cmd_error;
93 static inline int mac_esp_wait_for_empty_fifo(struct esp *esp)
109 esp->send_cmd_error = 1;
113 static inline int mac_esp_wait_for_dreq(struct esp *esp)
115 struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
135 esp->send_cmd_error = 1;
197 static void mac_esp_send_pdma_cmd(struct esp *esp, u32 addr, u32 esp_count,
200 struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
202 esp->send_cmd_error = 0;
205 scsi_esp_cmd(esp, ESP_CMD_FLUSH);
210 scsi_esp_cmd(esp, cmd);
218 if (mac_esp_wait_for_dreq(esp))
230 if (mac_esp_wait_for_empty_fifo(esp))
240 static int mac_esp_irq_pending(struct esp *esp)
247 static u32 mac_esp_dma_length_limit(struct esp *esp, u32 dma_addr, u32 dma_len)
294 struct esp *esp;
304 host = scsi_host_alloc(tpnt, sizeof(struct esp));
312 esp = shost_priv(host);
314 esp->host = host;
315 esp->dev = &dev->dev;
317 esp->command_block = kzalloc(16, GFP_KERNEL);
318 if (!esp->command_block)
320 esp->command_block_dma = (dma_addr_t)esp->command_block;
322 esp->scsi_id = 7;
323 host->this_id = esp->scsi_id;
324 esp->scsi_id_mask = 1 << esp->scsi_id;
329 mep->esp = esp;
334 esp->cfreq = 16500000;
335 esp->regs = (void __iomem *)MAC_ESP_REGS_QUADRA;
336 mep->pdma_io = esp->regs + MAC_ESP_PDMA_IO_OFFSET;
340 esp->cfreq = 25000000;
341 esp->regs = (void __iomem *)(MAC_ESP_REGS_QUADRA2 +
343 mep->pdma_io = esp->regs + MAC_ESP_PDMA_IO_OFFSET;
352 esp->cfreq = 25000000;
353 esp->regs = (void __iomem *)MAC_ESP_REGS_QUADRA3;
358 esp->fifo_reg = esp->regs + ESP_FDATA * 16;
360 esp->ops = &mac_esp_ops;
361 esp->flags = ESP_FLAG_NO_DMA_MAP;
366 esp->flags |= ESP_FLAG_DISABLE_SYNC;
383 esp_chips[dev->id] = esp;
386 err = scsi_esp_register(esp);
403 kfree(esp->command_block);
413 struct esp *esp = mep->esp;
414 unsigned int irq = esp->host->irq;
416 scsi_esp_unregister(esp);
428 kfree(esp->command_block);
430 scsi_host_put(esp->host);