linux/drivers/pnp/isapnp/core.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  ISA Plug & Play support
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 *
 *  Changelog:
 *  2000-01-01	Added quirks handling for buggy hardware
 *		Peter Denison <[email protected]>
 *  2000-06-14	Added isapnp_probe_devs() and isapnp_activate_dev()
 *		Christoph Hellwig <[email protected]>
 *  2001-06-03  Added release_region calls to correspond with
 *		request_region calls when a failure occurs.  Also
 *		added KERN_* constants to printk() calls.
 *  2001-11-07  Added isapnp_{,un}register_driver calls along the lines
 *              of the pci driver interface
 *              Kai Germaschewski <[email protected]>
 *  2002-06-06  Made the use of dma channel 0 configurable
 *              Gerald Teschl <[email protected]>
 *  2002-10-06  Ported to PnP Layer - Adam Belay <[email protected]>
 *  2003-08-11	Resource Management Updates - Adam Belay <[email protected]>
 */

#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/isapnp.h>
#include <linux/mutex.h>
#include <asm/io.h>

#include "../base.h"

#if 0
#define ISAPNP_REGION_OK
#endif

int isapnp_disable;		/* Disable ISA PnP */
static int isapnp_rdp;		/* Read Data Port */
static int isapnp_reset =;	/* reset all PnP cards (deactivate) */
static int isapnp_verbose =;	/* verbose mode */

module_param(isapnp_disable, int, 0);
MODULE_PARM_DESC();
module_param(isapnp_rdp, int, 0);
MODULE_PARM_DESC();
module_param(isapnp_reset, int, 0);
MODULE_PARM_DESC();
module_param(isapnp_verbose, int, 0);
MODULE_PARM_DESC();

#define _PIDXR
#define _PNPWRP

/* short tags */
#define _STAG_PNPVERNO
#define _STAG_LOGDEVID
#define _STAG_COMPATDEVID
#define _STAG_IRQ
#define _STAG_DMA
#define _STAG_STARTDEP
#define _STAG_ENDDEP
#define _STAG_IOPORT
#define _STAG_FIXEDIO
#define _STAG_VENDOR
#define _STAG_END
/* long tags */
#define _LTAG_MEMRANGE
#define _LTAG_ANSISTR
#define _LTAG_UNICODESTR
#define _LTAG_VENDOR
#define _LTAG_MEM32RANGE
#define _LTAG_FIXEDMEM32RANGE

/* Logical device control and configuration registers */

#define ISAPNP_CFG_ACTIVATE
#define ISAPNP_CFG_MEM
#define ISAPNP_CFG_PORT
#define ISAPNP_CFG_IRQ
#define ISAPNP_CFG_DMA

/*
 * Sizes of ISAPNP logical device configuration register sets.
 * See PNP-ISA-v1.0a.pdf, Appendix A.
 */
#define ISAPNP_MAX_MEM
#define ISAPNP_MAX_PORT
#define ISAPNP_MAX_IRQ
#define ISAPNP_MAX_DMA

static unsigned char isapnp_checksum_value;
static DEFINE_MUTEX(isapnp_cfg_mutex);
static int isapnp_csn_count;

/* some prototypes */

static inline void write_data(unsigned char x)
{}

static inline void write_address(unsigned char x)
{}

static inline unsigned char read_data(void)
{}

unsigned char isapnp_read_byte(unsigned char idx)
{}

static unsigned short isapnp_read_word(unsigned char idx)
{}

void isapnp_write_byte(unsigned char idx, unsigned char val)
{}

static void isapnp_write_word(unsigned char idx, unsigned short val)
{}

static void isapnp_key(void)
{}

/* place all pnp cards in wait-for-key state */
static void isapnp_wait(void)
{}

static void isapnp_wake(unsigned char csn)
{}

static void isapnp_device(unsigned char logdev)
{}

static void isapnp_activate(unsigned char logdev)
{}

static void isapnp_deactivate(unsigned char logdev)
{}

static void __init isapnp_peek(unsigned char *data, int bytes)
{}

#define RDP_STEP

static int isapnp_next_rdp(void)
{}

/* Set read port address */
static inline void isapnp_set_rdp(void)
{}

/*
 *	Perform an isolation. The port selection code now tries to avoid
 *	"dangerous to read" ports.
 */
static int __init isapnp_isolate_rdp_select(void)
{}

/*
 *  Isolate (assign uniqued CSN) to all ISA PnP devices.
 */
static int __init isapnp_isolate(void)
{}

/*
 *  Read one tag from stream.
 */
static int __init isapnp_read_tag(unsigned char *type, unsigned short *size)
{}

/*
 *  Skip specified number of bytes from stream.
 */
static void __init isapnp_skip_bytes(int count)
{}

/*
 *  Parse logical device tag.
 */
static struct pnp_dev *__init isapnp_parse_device(struct pnp_card *card,
						  int size, int number)
{}

/*
 *  Add IRQ resource to resources list.
 */
static void __init isapnp_parse_irq_resource(struct pnp_dev *dev,
					     unsigned int option_flags,
					     int size)
{}

/*
 *  Add DMA resource to resources list.
 */
static void __init isapnp_parse_dma_resource(struct pnp_dev *dev,
					     unsigned int option_flags,
					     int size)
{}

/*
 *  Add port resource to resources list.
 */
static void __init isapnp_parse_port_resource(struct pnp_dev *dev,
					      unsigned int option_flags,
					      int size)
{}

/*
 *  Add fixed port resource to resources list.
 */
static void __init isapnp_parse_fixed_port_resource(struct pnp_dev *dev,
						    unsigned int option_flags,
						    int size)
{}

/*
 *  Add memory resource to resources list.
 */
static void __init isapnp_parse_mem_resource(struct pnp_dev *dev,
					     unsigned int option_flags,
					     int size)
{}

/*
 *  Add 32-bit memory resource to resources list.
 */
static void __init isapnp_parse_mem32_resource(struct pnp_dev *dev,
					       unsigned int option_flags,
					       int size)
{}

/*
 *  Add 32-bit fixed memory resource to resources list.
 */
static void __init isapnp_parse_fixed_mem32_resource(struct pnp_dev *dev,
						     unsigned int option_flags,
						     int size)
{}

/*
 *  Parse card name for ISA PnP device.
 */
static void __init
isapnp_parse_name(char *name, unsigned int name_max, unsigned short *size)
{}

/*
 *  Parse resource map for logical device.
 */
static int __init isapnp_create_device(struct pnp_card *card,
				       unsigned short size)
{}

/*
 *  Parse resource map for ISA PnP card.
 */
static void __init isapnp_parse_resource_map(struct pnp_card *card)
{}

/*
 *  Build device list for all present ISA PnP devices.
 */
static int __init isapnp_build_device_list(void)
{}

/*
 *  Basic configuration routines.
 */

int isapnp_present(void)
{}

int isapnp_cfg_begin(int csn, int logdev)
{}

int isapnp_cfg_end(void)
{}

/*
 *  Initialization.
 */

EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();

static int isapnp_get_resources(struct pnp_dev *dev)
{}

static int isapnp_set_resources(struct pnp_dev *dev)
{}

static int isapnp_disable_resources(struct pnp_dev *dev)
{}

struct pnp_protocol isapnp_protocol =;

static int __init isapnp_init(void)
{}

device_initcall(isapnp_init);

/* format is: noisapnp */

static int __init isapnp_setup_disable(char *str)
{}

__setup();

/* format is: isapnp=rdp,reset,skip_pci_scan,verbose */

static int __init isapnp_setup_isapnp(char *str)
{}

__setup();