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

mca.c File Reference

#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/mca.h>
#include <asm/system.h>
#include <asm/io.h>
#include <linux/proc_fs.h>
#include <linux/mman.h>
#include <linux/config.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/ioport.h>
#include <asm/uaccess.h>
#include <linux/init.h>

Include dependency graph for mca.c:

Go to the source code of this file.

Defines

#define MCA_MOTHERBOARD_SETUP_REG   0x94
#define MCA_ADAPTER_SETUP_REG   0x96
#define MCA_POS_REG(n)   (0x100+(n))
#define MCA_ENABLED   0x01

Enumerations

enum  MCA_AdapterStatus { MCA_ADAPTER_NORMAL = 0, MCA_ADAPTER_NONE = 1, MCA_ADAPTER_DISABLED = 2, MCA_ADAPTER_ERROR = 3 }

Functions

static void mca_configure_adapter_status (int slot)
 __initfunc (void mca_init(void))
static void mca_handle_nmi_slot (int slot, int check_flag)
void mca_handle_nmi (void)
int mca_find_adapter (int id, int start)
int mca_find_unused_adapter (int id, int start)
unsigned char mca_read_stored_pos (int slot, int reg)
unsigned char mca_read_pos (int slot, int reg)
void mca_write_pos (int slot, int reg, unsigned char byte)
void mca_set_adapter_name (int slot, char *name)
void mca_set_adapter_procfn (int slot, MCA_ProcFn procfn, void *dev)
int mca_is_adapter_used (int slot)
int mca_mark_as_used (int slot)
void mca_mark_as_unused (int slot)
char * mca_get_adapter_name (int slot)
int mca_isadapter (int slot)
int mca_isenabled (int slot)

Variables

static struct MCA_infomca_info = NULL


Define Documentation

#define MCA_ADAPTER_SETUP_REG   0x96
 

Definition at line 100 of file mca.c.

Referenced by __initfunc(), mca_read_pos(), and mca_write_pos().

#define MCA_ENABLED   0x01
 

Definition at line 103 of file mca.c.

Referenced by mca_configure_adapter_status().

#define MCA_MOTHERBOARD_SETUP_REG   0x94
 

Definition at line 99 of file mca.c.

Referenced by __initfunc(), mca_read_pos(), and mca_write_pos().

#define MCA_POS_REG n   )     (0x100+(n))
 

Definition at line 101 of file mca.c.

Referenced by __initfunc(), mca_read_pos(), and mca_write_pos().


Enumeration Type Documentation

enum MCA_AdapterStatus
 

Enumeration values:
MCA_ADAPTER_NORMAL 
MCA_ADAPTER_NONE 
MCA_ADAPTER_DISABLED 
MCA_ADAPTER_ERROR 

Definition at line 55 of file mca.c.


Function Documentation

__initfunc void   mca_init(void)  ) 
 

Definition at line 213 of file mca.c.

References cli, MCA_adapter::driver_loaded, i, inb_p, j, kmalloc(), MCA_ADAPTER_SETUP_REG, MCA_bus, mca_configure_adapter_status(), MCA_INTEGSCSI, MCA_INTEGVIDEO, MCA_MAX_SLOT_NR, MCA_MOTHERBOARD_SETUP_REG, MCA_POS_REG, memset, MCA_adapter::name, NULL, outb_p, MCA_adapter::pos, printk, request_region, restore_flags, save_flags, MCA_info::slot, MCA_info::which_scsi, x01, x02, x08, x100, x60, x8, xf, and xff.

Here is the call graph for this function:

static void mca_configure_adapter_status int  slot  )  [static]
 

Definition at line 160 of file mca.c.

References MCA_adapter::id, j, MCA_ADAPTER_DISABLED, MCA_ADAPTER_ERROR, MCA_ADAPTER_NONE, MCA_ADAPTER_NORMAL, MCA_ENABLED, MCA_MAX_SLOT_NR, MCA_adapter::pos, MCA_info::slot, and MCA_adapter::status.

Referenced by __initfunc().

int mca_find_adapter int  id,
int  start
 

Definition at line 400 of file mca.c.

References MCA_adapter::id, MCA_ADAPTER_DISABLED, MCA_NOTFOUND, MCA_NUMADAPTERS, NULL, MCA_info::slot, and MCA_adapter::status.

Referenced by __initfunc(), fd_mcs_detect(), ibmmca_detect(), mca_esp_detect(), probe_sb(), and sim710_detect().

int mca_find_unused_adapter int  id,
int  start
 

Definition at line 430 of file mca.c.

References MCA_adapter::driver_loaded, MCA_adapter::id, MCA_ADAPTER_DISABLED, MCA_NOTFOUND, MCA_NUMADAPTERS, NULL, MCA_info::slot, and MCA_adapter::status.

Referenced by __initfunc(), at1700_probe1(), el3_probe(), and ultramca_probe().

char* mca_get_adapter_name int  slot  ) 
 

Definition at line 615 of file mca.c.

References MCA_NUMADAPTERS, MCA_adapter::name, NULL, and MCA_info::slot.

void mca_handle_nmi void   ) 
 

Definition at line 365 of file mca.c.

References i, mca_handle_nmi_slot(), MCA_NUMADAPTERS, mca_read_pos(), pos5, printk, and x40.

Referenced by unknown_nmi_error().

Here is the call graph for this function:

static void mca_handle_nmi_slot int  slot,
int  check_flag
[static]
 

Definition at line 337 of file mca.c.

References MCA_INTEGSCSI, MCA_INTEGVIDEO, MCA_MAX_SLOT_NR, mca_read_pos(), MCA_adapter::name, pos6, printk, and MCA_info::slot.

Referenced by mca_handle_nmi().

Here is the call graph for this function:

int mca_is_adapter_used int  slot  ) 
 

Definition at line 598 of file mca.c.

References MCA_adapter::driver_loaded, and MCA_info::slot.

Referenced by skmca_probe().

int mca_isadapter int  slot  ) 
 

Definition at line 626 of file mca.c.

References MCA_ADAPTER_DISABLED, MCA_ADAPTER_NORMAL, MCA_NUMADAPTERS, NULL, MCA_info::slot, and MCA_adapter::status.

int mca_isenabled int  slot  ) 
 

Definition at line 638 of file mca.c.

References MCA_ADAPTER_NORMAL, MCA_NUMADAPTERS, NULL, MCA_info::slot, and MCA_adapter::status.

void mca_mark_as_unused int  slot  ) 
 

Definition at line 610 of file mca.c.

References MCA_adapter::driver_loaded, and MCA_info::slot.

Referenced by eicon_exit(), and mca_esp_release().

int mca_mark_as_used int  slot  ) 
 

Definition at line 603 of file mca.c.

References MCA_adapter::driver_loaded, and MCA_info::slot.

Referenced by __initfunc(), at1700_probe1(), el3_probe(), ibmmca_detect(), mca_esp_detect(), probe_sb(), skmca_probe(), and ultramca_probe().

unsigned char mca_read_pos int  slot,
int  reg
 

Definition at line 470 of file mca.c.

References byte, cli, inb_p, MCA_ADAPTER_SETUP_REG, MCA_INTEGSCSI, MCA_INTEGVIDEO, MCA_MAX_SLOT_NR, MCA_MOTHERBOARD_SETUP_REG, MCA_NUMADAPTERS, MCA_POS_REG, NULL, outb_p, MCA_adapter::pos, restore_flags, save_flags, MCA_info::slot, MCA_info::which_scsi, x8, xf, and xff.

Referenced by __initfunc(), mca_handle_nmi(), and mca_handle_nmi_slot().

unsigned char mca_read_stored_pos int  slot,
int  reg
 

Definition at line 461 of file mca.c.

References MCA_NUMADAPTERS, NULL, MCA_adapter::pos, and MCA_info::slot.

Referenced by __initfunc(), at1700_probe1(), dofind(), el3_probe(), fd_mcs_detect(), getaddrs(), ibmmca_detect(), mca_esp_detect(), probe_sb(), sim710_detect(), and ultramca_probe().

void mca_set_adapter_name int  slot,
char *  name
 

Definition at line 572 of file mca.c.

References MCA_NUMADAPTERS, MCA_adapter::name, NULL, MCA_info::slot, and strncpy.

Referenced by __initfunc(), at1700_probe1(), el3_probe(), fd_mcs_detect(), ibmmca_detect(), mca_esp_detect(), probe_sb(), sim710_detect(), skmca_probe(), and ultramca_probe().

void mca_set_adapter_procfn int  slot,
MCA_ProcFn  procfn,
void *  dev
 

Definition at line 588 of file mca.c.

References MCA_adapter::dev, MCA_NUMADAPTERS, NULL, MCA_adapter::procfn, and MCA_info::slot.

Referenced by __initfunc(), eicon_exit(), el3_probe(), ibmmca_detect(), and skmca_probe().

void mca_write_pos int  slot,
int  reg,
unsigned char  byte
 

Definition at line 539 of file mca.c.

References cli, MCA_ADAPTER_SETUP_REG, MCA_MAX_SLOT_NR, MCA_MOTHERBOARD_SETUP_REG, MCA_POS_REG, NULL, outb_p, MCA_adapter::pos, restore_flags, save_flags, MCA_info::slot, x8, xf, and xff.

Referenced by __initfunc(), and getaddrs().


Variable Documentation

struct MCA_info* mca_info = NULL [static]
 

Definition at line 95 of file mca.c.