eisa.h File Reference

#include <stdint.h>
#include <gpxe/isa_ids.h>
#include <gpxe/device.h>
#include <gpxe/tables.h>

Go to the source code of this file.

Data Structures

struct  eisa_device_id
 An EISA device ID list entry. More...
struct  eisa_device
 An EISA device. More...
struct  eisa_driver
 An EISA driver. More...

Defines

#define EISA_MIN_SLOT   (0x1)
#define EISA_MAX_SLOT   (0xf)
#define EISA_SLOT_BASE(n)   ( 0x1000 * (n) )
#define EISA_VENDOR_ID   ( 0xc80 )
#define EISA_PROD_ID   ( 0xc82 )
#define EISA_GLOBAL_CONFIG   ( 0xc84 )
#define EISA_CMD_RESET   ( 1 << 2 )
#define EISA_CMD_ENABLE   ( 1 << 0 )
#define EISA_DRIVERS   __table ( struct eisa_driver, "eisa_drivers" )
 EISA driver table.
#define __eisa_driver   __table_entry ( EISA_DRIVERS, 01 )
 Declare an EISA driver.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
void eisa_device_enabled (struct eisa_device *eisa, int enabled)
 Reset and enable/disable an EISA device.
static void enable_eisa_device (struct eisa_device *eisa)
 Enable EISA device.
static void disable_eisa_device (struct eisa_device *eisa)
 Disable EISA device.
static void eisa_set_drvdata (struct eisa_device *eisa, void *priv)
 Set EISA driver-private data.
static void * eisa_get_drvdata (struct eisa_device *eisa)
 Get EISA driver-private data.


Define Documentation

#define EISA_MIN_SLOT   (0x1)

Definition at line 16 of file eisa.h.

Referenced by eisabus_probe().

#define EISA_MAX_SLOT   (0xf)

Definition at line 17 of file eisa.h.

Referenced by eisabus_probe().

#define EISA_SLOT_BASE (  )     ( 0x1000 * (n) )

Definition at line 18 of file eisa.h.

Referenced by eisabus_probe().

#define EISA_VENDOR_ID   ( 0xc80 )

Definition at line 20 of file eisa.h.

Referenced by eisabus_probe().

#define EISA_PROD_ID   ( 0xc82 )

Definition at line 21 of file eisa.h.

Referenced by eisabus_probe().

#define EISA_GLOBAL_CONFIG   ( 0xc84 )

Definition at line 22 of file eisa.h.

Referenced by eisa_device_enabled().

#define EISA_CMD_RESET   ( 1 << 2 )

Definition at line 24 of file eisa.h.

Referenced by eisa_device_enabled().

#define EISA_CMD_ENABLE   ( 1 << 0 )

Definition at line 25 of file eisa.h.

Referenced by eisa_device_enabled().

#define EISA_DRIVERS   __table ( struct eisa_driver, "eisa_drivers" )

EISA driver table.

Definition at line 85 of file eisa.h.

Referenced by eisa_probe().

#define __eisa_driver   __table_entry ( EISA_DRIVERS, 01 )

Declare an EISA driver.

Definition at line 88 of file eisa.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

void eisa_device_enabled ( struct eisa_device eisa,
int  enabled 
)

Reset and enable/disable an EISA device.

Parameters:
eisa EISA device
enabled 1=enable, 0=disable

Definition at line 20 of file eisa.c.

References DBG, EISA_CMD_ENABLE, EISA_CMD_RESET, EISA_GLOBAL_CONFIG, eisa_device::ioaddr, outb, eisa_device::slot, and udelay().

Referenced by disable_eisa_device(), and enable_eisa_device().

00020                                                                    {
00021         /* Set reset line high for 1000 µs.  Spec says 500 µs, but
00022          * this doesn't work for all cards, so we are conservative.
00023          */
00024         outb ( EISA_CMD_RESET, eisa->ioaddr + EISA_GLOBAL_CONFIG );
00025         udelay ( 1000 ); /* Must wait 800 */
00026 
00027         /* Set reset low and write a 1 to ENABLE.  Delay again, in
00028          * case the card takes a while to wake up.
00029          */
00030         outb ( enabled ? EISA_CMD_ENABLE : 0,
00031                eisa->ioaddr + EISA_GLOBAL_CONFIG );
00032         udelay ( 1000 ); /* Must wait 800 */
00033 
00034         DBG ( "EISA %s device %02x\n", ( enabled ? "enabled" : "disabled" ),
00035               eisa->slot );
00036 }

static void enable_eisa_device ( struct eisa_device eisa  )  [inline, static]

Enable EISA device.

Parameters:
eisa EISA device

Definition at line 97 of file eisa.h.

References eisa_device_enabled().

Referenced by el3_eisa_probe().

00097                                                                    {
00098         eisa_device_enabled ( eisa, 1 );
00099 }

static void disable_eisa_device ( struct eisa_device eisa  )  [inline, static]

Disable EISA device.

Parameters:
eisa EISA device

Definition at line 106 of file eisa.h.

References eisa_device_enabled().

Referenced by el3_eisa_disable().

00106                                                                     {
00107         eisa_device_enabled ( eisa, 0 );
00108 }

static void eisa_set_drvdata ( struct eisa_device eisa,
void *  priv 
) [inline, static]

Set EISA driver-private data.

Parameters:
eisa EISA device
priv Private data

Definition at line 116 of file eisa.h.

References eisa_device::priv.

Referenced by legacy_eisa_set_drvdata().

00116                                                                              {
00117         eisa->priv = priv;
00118 }

static void* eisa_get_drvdata ( struct eisa_device eisa  )  [inline, static]

Get EISA driver-private data.

Parameters:
eisa EISA device
Return values:
priv Private data

Definition at line 126 of file eisa.h.

References eisa_device::priv.

Referenced by legacy_eisa_get_drvdata().

00126                                                                    {
00127         return eisa->priv;
00128 }


Generated on Tue Apr 6 20:01:50 2010 for gPXE by  doxygen 1.5.7.1