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

smc37c93x.c File Reference

#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/malloc.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <asm/hwrpb.h>
#include <asm/io.h>
#include <asm/segment.h>

Include dependency graph for smc37c93x.c:

Go to the source code of this file.

Defines

#define SMC_DEBUG   0
#define DBG_DEVS(args)
#define KB   1024
#define MB   (1024*KB)
#define GB   (1024*MB)
#define DEVICE_ON   1
#define DEVICE_OFF   0
#define CONFIG_ON_KEY   0x55
#define CONFIG_OFF_KEY   0xaa
#define FDC   0
#define IDE1   1
#define IDE2   2
#define PARP   3
#define SER1   4
#define SER2   5
#define RTCL   6
#define KYBD   7
#define AUXIO   8
#define CONFIG_CONTROL   0x02
#define INDEX_ADDRESS   0x03
#define LOGICAL_DEVICE_NUMBER   0x07
#define DEVICE_ID   0x20
#define DEVICE_REV   0x21
#define POWER_CONTROL   0x22
#define POWER_MGMT   0x23
#define OSC   0x24
#define ACTIVATE   0x30
#define ADDR_HI   0x60
#define ADDR_LO   0x61
#define INTERRUPT_SEL   0x70
#define INTERRUPT_SEL_2   0x72
#define DMA_CHANNEL_SEL   0x74
#define FDD_MODE_REGISTER   0x90
#define FDD_OPTION_REGISTER   0x91
#define VALID_DEVICE_ID   2
#define KYBD_INTERRUPT   1
#define MOUS_INTERRUPT   12
#define COM2_BASE   0x2f8
#define COM2_INTERRUPT   3
#define COM1_BASE   0x3f8
#define COM1_INTERRUPT   4
#define PARP_BASE   0x3bc
#define PARP_INTERRUPT   7
#define NUM_RETRIES   5

Functions

static unsigned long __init SMCConfigState (unsigned long baseAddr)
static void __init SMCRunState (unsigned long baseAddr)
static unsigned long __init SMCDetectUltraIO (void)
static void __init SMCEnableDevice (unsigned long baseAddr, unsigned long device, unsigned long portaddr, unsigned long interrupt)
static void __init SMCEnableKYBD (unsigned long baseAddr)
static void __init SMCEnableFDC (unsigned long baseAddr)
int __init SMC93x_Init (void)


Define Documentation

#define ACTIVATE   0x30
 

Definition at line 58 of file smc37c93x.c.

Referenced by SMCEnableDevice(), SMCEnableFDC(), and SMCEnableKYBD().

#define ADDR_HI   0x60
 

Definition at line 59 of file smc37c93x.c.

Referenced by SMCEnableDevice().

#define ADDR_LO   0x61
 

Definition at line 60 of file smc37c93x.c.

Referenced by SMCEnableDevice().

#define AUXIO   8
 

Definition at line 46 of file smc37c93x.c.

#define COM1_BASE   0x3f8
 

Definition at line 76 of file smc37c93x.c.

#define COM1_INTERRUPT   4
 

Definition at line 77 of file smc37c93x.c.

Referenced by SMC93x_Init().

#define COM2_BASE   0x2f8
 

Definition at line 74 of file smc37c93x.c.

#define COM2_INTERRUPT   3
 

Definition at line 75 of file smc37c93x.c.

Referenced by SMC93x_Init().

#define CONFIG_CONTROL   0x02
 

Definition at line 49 of file smc37c93x.c.

#define CONFIG_OFF_KEY   0xaa
 

Definition at line 35 of file smc37c93x.c.

Referenced by SMCRunState().

#define CONFIG_ON_KEY   0x55
 

Definition at line 34 of file smc37c93x.c.

Referenced by SMCConfigState().

#define DBG_DEVS args   ) 
 

Definition at line 22 of file smc37c93x.c.

#define DEVICE_ID   0x20
 

Definition at line 52 of file smc37c93x.c.

#define DEVICE_OFF   0
 

Definition at line 31 of file smc37c93x.c.

#define DEVICE_ON   1
 

Definition at line 30 of file smc37c93x.c.

Referenced by SMCEnableDevice(), SMCEnableFDC(), and SMCEnableKYBD().

#define DEVICE_REV   0x21
 

Definition at line 53 of file smc37c93x.c.

Referenced by SMCConfigState().

#define DMA_CHANNEL_SEL   0x74
 

Definition at line 63 of file smc37c93x.c.

Referenced by SMCEnableFDC().

#define FDC   0
 

Definition at line 38 of file smc37c93x.c.

Referenced by disk_change(), floppy_off(), floppy_open(), motor_off_callback(), raw_cmd_ioctl(), reset_fdc_info(), set_fdc(), and SMCEnableFDC().

#define FDD_MODE_REGISTER   0x90
 

Definition at line 65 of file smc37c93x.c.

Referenced by SMCEnableFDC().

#define FDD_OPTION_REGISTER   0x91
 

Definition at line 66 of file smc37c93x.c.

#define GB   (1024*MB)
 

Definition at line 27 of file smc37c93x.c.

#define IDE1   1
 

Definition at line 39 of file smc37c93x.c.

#define IDE2   2
 

Definition at line 40 of file smc37c93x.c.

#define INDEX_ADDRESS   0x03
 

Definition at line 50 of file smc37c93x.c.

#define INTERRUPT_SEL   0x70
 

Definition at line 61 of file smc37c93x.c.

Referenced by SMCEnableDevice(), SMCEnableFDC(), and SMCEnableKYBD().

#define INTERRUPT_SEL_2   0x72
 

Definition at line 62 of file smc37c93x.c.

Referenced by SMCEnableKYBD().

#define KB   1024
 

Definition at line 25 of file smc37c93x.c.

#define KYBD   7
 

Definition at line 45 of file smc37c93x.c.

Referenced by SMCEnableKYBD().

#define KYBD_INTERRUPT   1
 

Definition at line 72 of file smc37c93x.c.

Referenced by SMCEnableKYBD().

#define LOGICAL_DEVICE_NUMBER   0x07
 

Definition at line 51 of file smc37c93x.c.

Referenced by SMCEnableDevice(), SMCEnableFDC(), and SMCEnableKYBD().

#define MB   (1024*KB)
 

Definition at line 26 of file smc37c93x.c.

#define MOUS_INTERRUPT   12
 

Definition at line 73 of file smc37c93x.c.

Referenced by SMCEnableKYBD().

#define NUM_RETRIES   5
 

Referenced by SMCConfigState().

#define OSC   0x24
 

Definition at line 56 of file smc37c93x.c.

#define PARP   3
 

Definition at line 41 of file smc37c93x.c.

Referenced by SMC93x_Init().

#define PARP_BASE   0x3bc
 

Definition at line 78 of file smc37c93x.c.

#define PARP_INTERRUPT   7
 

Definition at line 79 of file smc37c93x.c.

Referenced by SMC93x_Init().

#define POWER_CONTROL   0x22
 

Definition at line 54 of file smc37c93x.c.

#define POWER_MGMT   0x23
 

Definition at line 55 of file smc37c93x.c.

#define RTCL   6
 

Definition at line 44 of file smc37c93x.c.

#define SER1   4
 

Definition at line 42 of file smc37c93x.c.

Referenced by SMC93x_Init().

#define SER2   5
 

Definition at line 43 of file smc37c93x.c.

Referenced by SMC93x_Init().

#define SMC_DEBUG   0
 

Definition at line 17 of file smc37c93x.c.

#define VALID_DEVICE_ID   2
 

Definition at line 69 of file smc37c93x.c.

Referenced by SMCConfigState().


Function Documentation

int __init SMC93x_Init void   ) 
 

Definition at line 241 of file smc37c93x.c.

References __restore_flags, __save_and_cli, COM1_BASE, COM1_INTERRUPT, COM2_BASE, COM2_INTERRUPT, DBG_DEVS, PARP, PARP_BASE, PARP_INTERRUPT, printk, SER1, SER2, SMCDetectUltraIO(), SMCEnableDevice(), SMCEnableFDC(), SMCEnableKYBD(), and SMCRunState().

Referenced by alphapc164_pci_fixup().

Here is the call graph for this function:

static unsigned long __init SMCConfigState unsigned long  baseAddr  )  [static]
 

Definition at line 81 of file smc37c93x.c.

References CONFIG_ON_KEY, dataPort, DEVICE_REV, i, inb, L, NUM_RETRIES, outb, udelay, and VALID_DEVICE_ID.

Referenced by SMCDetectUltraIO().

static unsigned long __init SMCDetectUltraIO void   )  [static]
 

Definition at line 119 of file smc37c93x.c.

References long, and SMCConfigState().

Referenced by SMC93x_Init().

Here is the call graph for this function:

static void __init SMCEnableDevice unsigned long  baseAddr,
unsigned long  device,
unsigned long  portaddr,
unsigned long  interrupt
[static]
 

Definition at line 134 of file smc37c93x.c.

References ACTIVATE, ADDR_HI, ADDR_LO, dataPort, DEVICE_ON, INTERRUPT_SEL, LOGICAL_DEVICE_NUMBER, outb, and xFF.

Referenced by SMC93x_Init().

static void __init SMCEnableFDC unsigned long  baseAddr  )  [static]
 

Definition at line 182 of file smc37c93x.c.

References ACTIVATE, dataPort, DEVICE_ON, DMA_CHANNEL_SEL, FDC, FDD_MODE_REGISTER, inb, INTERRUPT_SEL, LOGICAL_DEVICE_NUMBER, outb, x02, and x06.

Referenced by SMC93x_Init().

static void __init SMCEnableKYBD unsigned long  baseAddr  )  [static]
 

Definition at line 161 of file smc37c93x.c.

References ACTIVATE, dataPort, DEVICE_ON, INTERRUPT_SEL, INTERRUPT_SEL_2, KYBD, KYBD_INTERRUPT, LOGICAL_DEVICE_NUMBER, MOUS_INTERRUPT, and outb.

Referenced by SMC93x_Init().

static void __init SMCRunState unsigned long  baseAddr  )  [static]
 

Definition at line 114 of file smc37c93x.c.

References CONFIG_OFF_KEY, and outb.

Referenced by SMC93x_Init().