Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

oktagon_esp.c File Reference

#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/blk.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/reboot.h>
#include <asm/system.h>
#include <asm/ptrace.h>
#include <asm/pgtable.h>
#include <asm/io.h>
#include "scsi.h"
#include "hosts.h"
#include "NCR53C9x.h"
#include "oktagon_esp.h"
#include <linux/zorro.h>
#include <asm/irq.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
#include <linux/unistd.h>

Include dependency graph for oktagon_esp.c:

Go to the source code of this file.

Defines

#define __KERNEL_SYSCALLS__
#define DMA_MAXTRANSFER   0x1000

Functions

static int dma_bytes_sent (struct NCR_ESP *esp, int fifo_count)
static int dma_can_transfer (struct NCR_ESP *esp, Scsi_Cmnd *sp)
static void dma_dump_state (struct NCR_ESP *esp)
static void dma_init_read (struct NCR_ESP *esp, __u32 vaddress, int length)
static void dma_init_write (struct NCR_ESP *esp, __u32 vaddress, int length)
static void dma_ints_off (struct NCR_ESP *esp)
static void dma_ints_on (struct NCR_ESP *esp)
static int dma_irq_p (struct NCR_ESP *esp)
static void dma_led_off (struct NCR_ESP *esp)
static void dma_led_on (struct NCR_ESP *esp)
static int dma_ports_p (struct NCR_ESP *esp)
static void dma_setup (struct NCR_ESP *esp, __u32 addr, int count, int write)
static void dma_irq_exit (struct NCR_ESP *esp)
static void dma_invalidate (struct NCR_ESP *esp)
static void dma_mmu_get_scsi_one (struct NCR_ESP *, Scsi_Cmnd *)
static void dma_mmu_get_scsi_sgl (struct NCR_ESP *, Scsi_Cmnd *)
static void dma_mmu_release_scsi_one (struct NCR_ESP *, Scsi_Cmnd *)
static void dma_mmu_release_scsi_sgl (struct NCR_ESP *, Scsi_Cmnd *)
static void dma_advance_sg (Scsi_Cmnd *)
static int oktagon_notify_reboot (struct notifier_block *this, unsigned long code, void *x)
void esp_bootup_reset (struct NCR_ESP *esp, struct ESP_regs *eregs)
int oktagon_esp_detect (Scsi_Host_Template *tpnt)
static void oktag_check_dma (void)
int oktagon_esp_release (struct Scsi_Host *instance)

Variables

static struct notifier_block oktagon_notifier
static longpaddress
static longaddress
static long len
static long dma_on
static int direction
static struct NCR_ESPcurrent_esp
volatile unsigned char cmd_buffer [16]
static long oktag_eva_buffer [16]


Define Documentation

#define __KERNEL_SYSCALLS__
 

Definition at line 15 of file oktagon_esp.c.

#define DMA_MAXTRANSFER   0x1000
 

Definition at line 93 of file oktagon_esp.c.

Referenced by dma_can_transfer().


Function Documentation

void dma_advance_sg Scsi_Cmnd  )  [static]
 

Definition at line 569 of file oktagon_esp.c.

References scatterlist::address, scsi_pointer::buffer, scsi_pointer::ptr, and scsi_cmnd::SCp.

static int dma_bytes_sent struct NCR_ESP esp,
int  fifo_count
[static]
 

Definition at line 390 of file oktagon_esp.c.

static int dma_can_transfer struct NCR_ESP esp,
Scsi_Cmnd sp
[static]
 

Definition at line 400 of file oktagon_esp.c.

References DMA_MAXTRANSFER, scsi_cmnd::SCp, and scsi_pointer::this_residual.

static void dma_dump_state struct NCR_ESP esp  )  [static]
 

Definition at line 408 of file oktagon_esp.c.

static void dma_init_read struct NCR_ESP esp,
__u32  vaddress,
int  length
[static]
 

Definition at line 439 of file oktagon_esp.c.

References direction, dma_on, len, oktag_check_dma(), and panic().

Here is the call graph for this function:

static void dma_init_write struct NCR_ESP esp,
__u32  vaddress,
int  length
[static]
 

Definition at line 454 of file oktagon_esp.c.

References direction, dma_on, len, oktag_check_dma(), and panic().

Here is the call graph for this function:

static void dma_ints_off struct NCR_ESP esp  )  [static]
 

Definition at line 468 of file oktagon_esp.c.

References disable_irq, and NCR_ESP::irq.

static void dma_ints_on struct NCR_ESP esp  )  [static]
 

Definition at line 473 of file oktagon_esp.c.

References enable_irq, and NCR_ESP::irq.

static void dma_invalidate struct NCR_ESP esp  )  [static]
 

Definition at line 540 of file oktagon_esp.c.

static void dma_irq_exit struct NCR_ESP esp  )  [static]
 

Definition at line 513 of file oktagon_esp.c.

References direction, dma_irq_p(), dma_on, IMMEDIATE_BH, len, long, mark_bh, paddress, queue_task, tq_struct::sync, and tq_immediate.

Here is the call graph for this function:

static int dma_irq_p struct NCR_ESP esp  )  [static]
 

Definition at line 478 of file oktagon_esp.c.

References NCR_ESP::eregs, ESP_STAT_INTR, and ESP_regs::esp_status.

static void dma_led_off struct NCR_ESP esp  )  [static]
 

Definition at line 484 of file oktagon_esp.c.

static void dma_led_on struct NCR_ESP esp  )  [static]
 

Definition at line 488 of file oktagon_esp.c.

void dma_mmu_get_scsi_one struct NCR_ESP ,
Scsi_Cmnd
[static]
 

Definition at line 549 of file oktagon_esp.c.

References scsi_pointer::have_data_in, scsi_pointer::ptr, scsi_cmnd::request_buffer, and scsi_cmnd::SCp.

void dma_mmu_get_scsi_sgl struct NCR_ESP ,
Scsi_Cmnd
[static]
 

Definition at line 555 of file oktagon_esp.c.

References scatterlist::address, scsi_pointer::buffer, scsi_pointer::ptr, and scsi_cmnd::SCp.

void dma_mmu_release_scsi_one struct NCR_ESP ,
Scsi_Cmnd
[static]
 

Definition at line 561 of file oktagon_esp.c.

void dma_mmu_release_scsi_sgl struct NCR_ESP ,
Scsi_Cmnd
[static]
 

Definition at line 565 of file oktagon_esp.c.

static int dma_ports_p struct NCR_ESP esp  )  [static]
 

Definition at line 492 of file oktagon_esp.c.

References custom, and IF_PORTS.

static void dma_setup struct NCR_ESP esp,
__u32  addr,
int  count,
int  write
[static]
 

Definition at line 497 of file oktagon_esp.c.

References dma_init_read(), and dma_init_write().

Here is the call graph for this function:

void esp_bootup_reset struct NCR_ESP esp,
struct ESP_regs eregs
[inline]
 

Definition at line 502 of file NCR53C9x.c.

References NCR_ESP::dma_reset, ESP_regs::esp_cfg1, esp_cmd, ESP_CMD_RS, ESP_CONFIG1_SRRDISAB, ESP_regs::esp_intrpt, esp_reset_esp(), GETREG, SETREG, and udelay.

Here is the call graph for this function:

static void oktag_check_dma void   )  [static]
 

Definition at line 424 of file oktagon_esp.c.

References NCR_ESP::eregs, ESP_regs::esp_tclow, ESP_regs::esp_tcmed, and len.

Referenced by dma_init_read(), and dma_init_write().

int oktagon_esp_detect Scsi_Host_Template tpnt  ) 
 

Definition at line 118 of file oktagon_esp.c.

References ConfigDev::cd_BoardAddr, NCR_ESP::cfreq, cmd_buffer, NCR_ESP::diff, dma_advance_sg(), NCR_ESP::dma_advance_sg, NCR_ESP::dma_barrier, dma_bytes_sent(), NCR_ESP::dma_bytes_sent, dma_can_transfer(), NCR_ESP::dma_can_transfer, NCR_ESP::dma_drain, dma_dump_state(), NCR_ESP::dma_dump_state, dma_init_read(), NCR_ESP::dma_init_read, dma_init_write(), NCR_ESP::dma_init_write, dma_ints_off(), NCR_ESP::dma_ints_off, dma_ints_on(), NCR_ESP::dma_ints_on, dma_invalidate(), NCR_ESP::dma_invalidate, NCR_ESP::dma_irq_entry, dma_irq_exit(), NCR_ESP::dma_irq_exit, dma_irq_p(), NCR_ESP::dma_irq_p, dma_led_off(), NCR_ESP::dma_led_off, dma_led_on(), NCR_ESP::dma_led_on, dma_mmu_get_scsi_one(), NCR_ESP::dma_mmu_get_scsi_one, dma_mmu_get_scsi_sgl(), NCR_ESP::dma_mmu_get_scsi_sgl, dma_mmu_release_scsi_one(), NCR_ESP::dma_mmu_release_scsi_one, dma_mmu_release_scsi_sgl(), NCR_ESP::dma_mmu_release_scsi_sgl, NCR_ESP::dma_poll, dma_ports_p(), NCR_ESP::dma_ports_p, NCR_ESP::dma_reset, dma_setup(), NCR_ESP::dma_setup, NCR_ESP::do_pio_cmds, NCR_ESP::dregs, NCR_ESP::eregs, eregs, esp, esp_allocate(), ESP_regs::esp_cfg1, NCR_ESP::esp_command, NCR_ESP::esp_command_dvma, ESP_CONFIG1_PENABLE, esp_initialize(), esp_intr(), esps_in_use, esps_running, NCR_ESP::irq, IRQ_AMIGA_PORTS, long, nesps, OKTAGON_DMA_ADDR, OKTAGON_ESP_ADDR, paddress, printk, register_reboot_notifier(), request_irq(), NCR_ESP::scsi_id, udelay, zorro_config_board(), zorro_find(), zorro_get_board(), ZORRO_PROD_BSC_OKTAGON_2008, and ZTWO_VADDR.

Here is the call graph for this function:

int oktagon_esp_release struct Scsi_Host instance  ) 
 

Definition at line 586 of file oktagon_esp.c.

References esp_intr(), free_irq(), IRQ_AMIGA_PORTS, unregister_reboot_notifier(), and zorro_unconfig_board().

Here is the call graph for this function:

static int oktagon_notify_reboot struct notifier_block this,
unsigned long  code,
void *  x
[static]
 

Definition at line 237 of file oktagon_esp.c.

References NCR_ESP::eregs, esp, esp_bootup_reset(), and udelay.

Here is the call graph for this function:


Variable Documentation

long* address [static]
 

Definition at line 104 of file oktagon_esp.c.

volatile unsigned char cmd_buffer[16]
 

Definition at line 111 of file oktagon_esp.c.

struct NCR_ESP* current_esp [static]
 

Definition at line 108 of file oktagon_esp.c.

int direction [static]
 

Definition at line 107 of file oktagon_esp.c.

long dma_on [static]
 

Definition at line 106 of file oktagon_esp.c.

Referenced by dma_init_read(), dma_init_write(), and dma_irq_exit().

long len [static]
 

Definition at line 105 of file oktagon_esp.c.

long oktag_eva_buffer[16] [static]
 

Definition at line 422 of file oktagon_esp.c.

struct notifier_block oktagon_notifier [static]
 

Initial value:

Definition at line 97 of file oktagon_esp.c.

long* paddress [static]
 

Definition at line 103 of file oktagon_esp.c.

Referenced by dma_irq_exit(), and oktagon_esp_detect().