isapnp.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  isapnp_identifier
 An ISAPnP serial identifier. More...
struct  isapnp_logdevid
 An ISAPnP logical device ID structure. More...
struct  isapnp_device_id
 An ISAPnP device ID list entry. More...
struct  isapnp_device
 An ISAPnP device. More...
struct  isapnp_driver
 An ISAPnP driver. More...

Defines

#define ISAPNP_ADDRESS   0x279
#define ISAPNP_WRITE_DATA   0xa79
#define ISAPNP_READ_PORT_MIN   0x203
#define ISAPNP_READ_PORT_START   0x213
#define ISAPNP_READ_PORT_MAX   0x3ff
#define ISAPNP_READ_PORT_STEP   0x10
#define ISAPNP_CSN_MIN   0x01
#define ISAPNP_CSN_MAX   0x0f
#define ISAPNP_READPORT   0x00
#define ISAPNP_SERIALISOLATION   0x01
#define ISAPNP_CONFIGCONTROL   0x02
#define ISAPNP_WAKE   0x03
#define ISAPNP_RESOURCEDATA   0x04
#define ISAPNP_STATUS   0x05
#define ISAPNP_CARDSELECTNUMBER   0x06
#define ISAPNP_LOGICALDEVICENUMBER   0x07
#define ISAPNP_ACTIVATE   0x30
#define ISAPNP_IORANGECHECK   0x31
#define ISAPNP_IOBASE(n)   ( 0x60 + ( (n) * 2 ) )
#define ISAPNP_IRQNO(n)   ( 0x70 + ( (n) * 2 ) )
#define ISAPNP_IRQTYPE(n)   ( 0x71 + ( (n) * 2 ) )
#define ISAPNP_CONFIG_RESET   ( 1 << 0 )
#define ISAPNP_CONFIG_WAIT_FOR_KEY   ( 1 << 1 )
#define ISAPNP_CONFIG_RESET_CSN   ( 1 << 2 )
#define ISAPNP_CONFIG_RESET_DRV
#define ISAPNP_LFSR_SEED   0x6a
#define ISAPNP_IS_SMALL_TAG(tag)   ( ! ( (tag) & 0x80 ) )
#define ISAPNP_SMALL_TAG_NAME(tag)   ( ( (tag) >> 3 ) & 0xf )
#define ISAPNP_SMALL_TAG_LEN(tag)   ( ( (tag) & 0x7 ) )
#define ISAPNP_TAG_PNPVERNO   0x01
#define ISAPNP_TAG_LOGDEVID   0x02
#define ISAPNP_TAG_COMPATDEVID   0x03
#define ISAPNP_TAG_IRQ   0x04
#define ISAPNP_TAG_DMA   0x05
#define ISAPNP_TAG_STARTDEP   0x06
#define ISAPNP_TAG_ENDDEP   0x07
#define ISAPNP_TAG_IOPORT   0x08
#define ISAPNP_TAG_FIXEDIO   0x09
#define ISAPNP_TAG_RSVDSHORTA   0x0A
#define ISAPNP_TAG_RSVDSHORTB   0x0B
#define ISAPNP_TAG_RSVDSHORTC   0x0C
#define ISAPNP_TAG_RSVDSHORTD   0x0D
#define ISAPNP_TAG_VENDORSHORT   0x0E
#define ISAPNP_TAG_END   0x0F
#define ISAPNP_IS_LARGE_TAG(tag)   ( ( (tag) & 0x80 ) )
#define ISAPNP_LARGE_TAG_NAME(tag)   (tag)
#define ISAPNP_TAG_MEMRANGE   0x81
#define ISAPNP_TAG_ANSISTR   0x82
#define ISAPNP_TAG_UNICODESTR   0x83
#define ISAPNP_TAG_VENDORLONG   0x84
#define ISAPNP_TAG_MEM32RANGE   0x85
#define ISAPNP_TAG_FIXEDMEM32RANGE   0x86
#define ISAPNP_TAG_RSVDLONG0   0xF0
#define ISAPNP_TAG_RSVDLONG1   0xF1
#define ISAPNP_TAG_RSVDLONG2   0xF2
#define ISAPNP_TAG_RSVDLONG3   0xF3
#define ISAPNP_TAG_RSVDLONG4   0xF4
#define ISAPNP_TAG_RSVDLONG5   0xF5
#define ISAPNP_TAG_RSVDLONG6   0xF6
#define ISAPNP_TAG_RSVDLONG7   0xF7
#define ISAPNP_TAG_RSVDLONG8   0xF8
#define ISAPNP_TAG_RSVDLONG9   0xF9
#define ISAPNP_TAG_RSVDLONGA   0xFA
#define ISAPNP_TAG_RSVDLONGB   0xFB
#define ISAPNP_TAG_RSVDLONGC   0xFC
#define ISAPNP_TAG_RSVDLONGD   0xFD
#define ISAPNP_TAG_RSVDLONGE   0xFE
#define ISAPNP_TAG_RSVDLONGF   0xFF
#define ISAPNP_TAG_PSEUDO_NEWBOARD   0x100
#define ISAPNP_DRIVERS   __table ( struct isapnp_driver, "isapnp_drivers" )
 ISAPnP driver table.
#define __isapnp_driver   __table_entry ( ISAPNP_DRIVERS, 01 )
 Declare an ISAPnP driver.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
void isapnp_device_activation (struct isapnp_device *isapnp, int activation)
 Activate or deactivate an ISAPnP device.
static void activate_isapnp_device (struct isapnp_device *isapnp)
 Activate ISAPnP device.
static void deactivate_isapnp_device (struct isapnp_device *isapnp)
 Deactivate ISAPnP device.
static void isapnp_set_drvdata (struct isapnp_device *isapnp, void *priv)
 Set ISAPnP driver-private data.
static void * isapnp_get_drvdata (struct isapnp_device *isapnp)
 Get ISAPnP driver-private data.

Variables

uint16_t isapnp_read_port
 ISAPnP Read Port address.


Define Documentation

#define ISAPNP_ADDRESS   0x279

Definition at line 52 of file isapnp.h.

Referenced by isapnp_write_address().

#define ISAPNP_WRITE_DATA   0xa79

Definition at line 53 of file isapnp.h.

Referenced by isapnp_write_data().

#define ISAPNP_READ_PORT_MIN   0x203

Definition at line 54 of file isapnp.h.

Referenced by pxenv_start_undi().

#define ISAPNP_READ_PORT_START   0x213

Definition at line 55 of file isapnp.h.

Referenced by isapnp_isolate().

#define ISAPNP_READ_PORT_MAX   0x3ff

Definition at line 60 of file isapnp.h.

Referenced by isapnp_isolate(), and pxenv_start_undi().

#define ISAPNP_READ_PORT_STEP   0x10

Definition at line 61 of file isapnp.h.

Referenced by isapnp_isolate().

#define ISAPNP_CSN_MIN   0x01

Definition at line 70 of file isapnp.h.

Referenced by pxenv_start_undi().

#define ISAPNP_CSN_MAX   0x0f

Definition at line 71 of file isapnp.h.

Referenced by pxenv_start_undi().

#define ISAPNP_READPORT   0x00

Definition at line 74 of file isapnp.h.

Referenced by isapnp_set_read_port().

#define ISAPNP_SERIALISOLATION   0x01

Definition at line 75 of file isapnp.h.

Referenced by isapnp_serialisolation().

#define ISAPNP_CONFIGCONTROL   0x02

Definition at line 76 of file isapnp.h.

Referenced by isapnp_reset_csn(), and isapnp_wait_for_key().

#define ISAPNP_WAKE   0x03

Definition at line 77 of file isapnp.h.

Referenced by isapnp_wake().

#define ISAPNP_RESOURCEDATA   0x04

Definition at line 78 of file isapnp.h.

Referenced by isapnp_read_resourcedata().

#define ISAPNP_STATUS   0x05

Definition at line 79 of file isapnp.h.

Referenced by isapnp_read_status().

#define ISAPNP_CARDSELECTNUMBER   0x06

Definition at line 80 of file isapnp.h.

Referenced by isapnp_write_csn().

#define ISAPNP_LOGICALDEVICENUMBER   0x07

Definition at line 81 of file isapnp.h.

Referenced by isapnp_logicaldevice().

#define ISAPNP_ACTIVATE   0x30

Definition at line 82 of file isapnp.h.

Referenced by isapnp_activate(), and isapnp_deactivate().

#define ISAPNP_IORANGECHECK   0x31

Definition at line 83 of file isapnp.h.

#define ISAPNP_IOBASE (  )     ( 0x60 + ( (n) * 2 ) )

Definition at line 84 of file isapnp.h.

Referenced by isapnp_read_iobase().

#define ISAPNP_IRQNO (  )     ( 0x70 + ( (n) * 2 ) )

Definition at line 85 of file isapnp.h.

Referenced by isapnp_read_irqno().

#define ISAPNP_IRQTYPE (  )     ( 0x71 + ( (n) * 2 ) )

Definition at line 86 of file isapnp.h.

#define ISAPNP_CONFIG_RESET   ( 1 << 0 )

Definition at line 89 of file isapnp.h.

#define ISAPNP_CONFIG_WAIT_FOR_KEY   ( 1 << 1 )

Definition at line 90 of file isapnp.h.

Referenced by isapnp_wait_for_key().

#define ISAPNP_CONFIG_RESET_CSN   ( 1 << 2 )

Definition at line 91 of file isapnp.h.

Referenced by isapnp_reset_csn().

#define ISAPNP_CONFIG_RESET_DRV

Value:

Definition at line 92 of file isapnp.h.

#define ISAPNP_LFSR_SEED   0x6a

Definition at line 97 of file isapnp.h.

Referenced by isapnp_checksum(), and isapnp_send_key().

#define ISAPNP_IS_SMALL_TAG ( tag   )     ( ! ( (tag) & 0x80 ) )

Definition at line 100 of file isapnp.h.

Referenced by isapnp_find_tag().

#define ISAPNP_SMALL_TAG_NAME ( tag   )     ( ( (tag) >> 3 ) & 0xf )

Definition at line 101 of file isapnp.h.

Referenced by isapnp_find_tag().

#define ISAPNP_SMALL_TAG_LEN ( tag   )     ( ( (tag) & 0x7 ) )

Definition at line 102 of file isapnp.h.

Referenced by isapnp_find_tag().

#define ISAPNP_TAG_PNPVERNO   0x01

Definition at line 103 of file isapnp.h.

#define ISAPNP_TAG_LOGDEVID   0x02

Definition at line 104 of file isapnp.h.

Referenced by isapnp_find_logdevid().

#define ISAPNP_TAG_COMPATDEVID   0x03

Definition at line 105 of file isapnp.h.

#define ISAPNP_TAG_IRQ   0x04

Definition at line 106 of file isapnp.h.

#define ISAPNP_TAG_DMA   0x05

Definition at line 107 of file isapnp.h.

#define ISAPNP_TAG_STARTDEP   0x06

Definition at line 108 of file isapnp.h.

#define ISAPNP_TAG_ENDDEP   0x07

Definition at line 109 of file isapnp.h.

#define ISAPNP_TAG_IOPORT   0x08

Definition at line 110 of file isapnp.h.

#define ISAPNP_TAG_FIXEDIO   0x09

Definition at line 111 of file isapnp.h.

#define ISAPNP_TAG_RSVDSHORTA   0x0A

Definition at line 112 of file isapnp.h.

#define ISAPNP_TAG_RSVDSHORTB   0x0B

Definition at line 113 of file isapnp.h.

#define ISAPNP_TAG_RSVDSHORTC   0x0C

Definition at line 114 of file isapnp.h.

#define ISAPNP_TAG_RSVDSHORTD   0x0D

Definition at line 115 of file isapnp.h.

#define ISAPNP_TAG_VENDORSHORT   0x0E

Definition at line 116 of file isapnp.h.

#define ISAPNP_TAG_END   0x0F

Definition at line 117 of file isapnp.h.

Referenced by isapnp_find_tag().

#define ISAPNP_IS_LARGE_TAG ( tag   )     ( ( (tag) & 0x80 ) )

Definition at line 119 of file isapnp.h.

#define ISAPNP_LARGE_TAG_NAME ( tag   )     (tag)

Definition at line 120 of file isapnp.h.

Referenced by isapnp_find_tag().

#define ISAPNP_TAG_MEMRANGE   0x81

Definition at line 121 of file isapnp.h.

#define ISAPNP_TAG_ANSISTR   0x82

Definition at line 122 of file isapnp.h.

#define ISAPNP_TAG_UNICODESTR   0x83

Definition at line 123 of file isapnp.h.

#define ISAPNP_TAG_VENDORLONG   0x84

Definition at line 124 of file isapnp.h.

#define ISAPNP_TAG_MEM32RANGE   0x85

Definition at line 125 of file isapnp.h.

#define ISAPNP_TAG_FIXEDMEM32RANGE   0x86

Definition at line 126 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG0   0xF0

Definition at line 127 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG1   0xF1

Definition at line 128 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG2   0xF2

Definition at line 129 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG3   0xF3

Definition at line 130 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG4   0xF4

Definition at line 131 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG5   0xF5

Definition at line 132 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG6   0xF6

Definition at line 133 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG7   0xF7

Definition at line 134 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG8   0xF8

Definition at line 135 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONG9   0xF9

Definition at line 136 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONGA   0xFA

Definition at line 137 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONGB   0xFB

Definition at line 138 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONGC   0xFC

Definition at line 139 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONGD   0xFD

Definition at line 140 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONGE   0xFE

Definition at line 141 of file isapnp.h.

#define ISAPNP_TAG_RSVDLONGF   0xFF

Definition at line 142 of file isapnp.h.

#define ISAPNP_TAG_PSEUDO_NEWBOARD   0x100

Definition at line 143 of file isapnp.h.

#define ISAPNP_DRIVERS   __table ( struct isapnp_driver, "isapnp_drivers" )

ISAPnP driver table.

Definition at line 229 of file isapnp.h.

Referenced by isapnp_probe().

#define __isapnp_driver   __table_entry ( ISAPNP_DRIVERS, 01 )

Declare an ISAPnP driver.

Definition at line 232 of file isapnp.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

void isapnp_device_activation ( struct isapnp_device isapnp,
int  activation 
)

Activate or deactivate an ISAPnP device.

Parameters:
isapnp ISAPnP device
activation True to enable, False to disable the device
Return values:
None -
Exceptions:
None -
This routine simply activates the device in its current configuration, or deactivates the device. It does not attempt any kind of resource arbitration.

Definition at line 553 of file isapnp.c.

References isapnp_device::csn, DBG, isapnp_activate(), isapnp_delay(), isapnp_logicaldevice(), isapnp_send_key(), isapnp_wait_for_key(), isapnp_wake(), and isapnp_device::logdev.

Referenced by activate_isapnp_device(), and deactivate_isapnp_device().

00554                                                  {
00555         /* Wake the card and select the logical device */
00556         isapnp_wait_for_key ();
00557         isapnp_send_key ();
00558         isapnp_wake ( isapnp->csn );
00559         isapnp_logicaldevice ( isapnp->logdev );
00560 
00561         /* Activate/deactivate the logical device */
00562         isapnp_activate ( activation );
00563         isapnp_delay();
00564 
00565         /* Return all cards to Wait for Key state */
00566         isapnp_wait_for_key ();
00567 
00568         DBG ( "ISAPnP %s device %02x:%02x\n",
00569               ( activation ? "activated" : "deactivated" ),
00570               isapnp->csn, isapnp->logdev );
00571 }

static void activate_isapnp_device ( struct isapnp_device isapnp  )  [inline, static]

Activate ISAPnP device.

Parameters:
isapnp ISAPnP device

Definition at line 244 of file isapnp.h.

References isapnp_device_activation().

Referenced by t515_probe().

00244                                                                            {
00245         isapnp_device_activation ( isapnp, 1 );
00246 }

static void deactivate_isapnp_device ( struct isapnp_device isapnp  )  [inline, static]

Deactivate ISAPnP device.

Parameters:
isapnp ISAPnP device

Definition at line 253 of file isapnp.h.

References isapnp_device_activation().

Referenced by t515_disable().

00253                                                                              {
00254         isapnp_device_activation ( isapnp, 0 );
00255 }

static void isapnp_set_drvdata ( struct isapnp_device isapnp,
void *  priv 
) [inline, static]

Set ISAPnP driver-private data.

Parameters:
isapnp ISAPnP device
priv Private data

Definition at line 263 of file isapnp.h.

References isapnp_device::priv.

Referenced by legacy_isapnp_set_drvdata().

00264                                                      {
00265         isapnp->priv = priv;
00266 }

static void* isapnp_get_drvdata ( struct isapnp_device isapnp  )  [inline, static]

Get ISAPnP driver-private data.

Parameters:
isapnp ISAPnP device
Return values:
priv Private data

Definition at line 274 of file isapnp.h.

References isapnp_device::priv.

Referenced by legacy_isapnp_get_drvdata().

00274                                                                          {
00275         return isapnp->priv;
00276 }


Variable Documentation

ISAPnP Read Port address.

ROM prefix may be able to set this address, which is why this is non-static.

Definition at line 75 of file isapnp.c.

Referenced by isapnp_isolate(), isapnp_read_data(), isapnp_set_read_port(), isapnp_try_isolate(), isapnpbus_probe(), and pxenv_start_undi().


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