linux/drivers/pnp/resource.c

// SPDX-License-Identifier: GPL-2.0
/*
 * resource.c - Contains functions for registering and analyzing resource information
 *
 * based on isapnp.c resource management (c) Jaroslav Kysela <[email protected]>
 * Copyright 2003 Adam Belay <[email protected]>
 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
 *	Bjorn Helgaas <[email protected]>
 */

#include <linux/module.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/irq.h>
#include <linux/pci.h>
#include <linux/libata.h>
#include <linux/ioport.h>
#include <linux/init.h>

#include <linux/pnp.h>
#include "base.h"

static int pnp_reserve_irq[16] =;	/* reserve (don't use) some IRQ */
static int pnp_reserve_dma[8] =;	/* reserve (don't use) some DMA */
static int pnp_reserve_io[16] =;	/* reserve (don't use) some I/O region */
static int pnp_reserve_mem[16] =;	/* reserve (don't use) some memory region */

/*
 * option registration
 */

static struct pnp_option *pnp_build_option(struct pnp_dev *dev, unsigned long type,
				    unsigned int option_flags)
{}

int pnp_register_irq_resource(struct pnp_dev *dev, unsigned int option_flags,
			      pnp_irq_mask_t *map, unsigned char flags)
{}

int pnp_register_dma_resource(struct pnp_dev *dev, unsigned int option_flags,
			      unsigned char map, unsigned char flags)
{}

int pnp_register_port_resource(struct pnp_dev *dev, unsigned int option_flags,
			       resource_size_t min, resource_size_t max,
			       resource_size_t align, resource_size_t size,
			       unsigned char flags)
{}

int pnp_register_mem_resource(struct pnp_dev *dev, unsigned int option_flags,
			      resource_size_t min, resource_size_t max,
			      resource_size_t align, resource_size_t size,
			      unsigned char flags)
{}

void pnp_free_options(struct pnp_dev *dev)
{}

/*
 * resource validity checking
 */

#define length(start, end)

/* Two ranges conflict if one doesn't end before the other starts */
#define ranged_conflict(starta, enda, startb, endb)

#define cannot_compare(flags)

int pnp_check_port(struct pnp_dev *dev, struct resource *res)
{}

int pnp_check_mem(struct pnp_dev *dev, struct resource *res)
{}

static irqreturn_t pnp_test_handler(int irq, void *dev_id)
{}

#ifdef CONFIG_PCI
static int pci_dev_uses_irq(struct pnp_dev *pnp, struct pci_dev *pci,
			    unsigned int irq)
{}
#endif

static int pci_uses_irq(struct pnp_dev *pnp, unsigned int irq)
{}

int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
{}

#ifdef CONFIG_ISA_DMA_API
int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
{}
#endif /* CONFIG_ISA_DMA_API */

unsigned long pnp_resource_type(struct resource *res)
{}

struct resource *pnp_get_resource(struct pnp_dev *dev,
				  unsigned long type, unsigned int num)
{}
EXPORT_SYMBOL();

static struct pnp_resource *pnp_new_resource(struct pnp_dev *dev)
{}

struct pnp_resource *pnp_add_resource(struct pnp_dev *dev,
				      struct resource *res)
{}

struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq,
					  int flags)
{}

struct pnp_resource *pnp_add_dma_resource(struct pnp_dev *dev, int dma,
					  int flags)
{}

struct pnp_resource *pnp_add_io_resource(struct pnp_dev *dev,
					 resource_size_t start,
					 resource_size_t end, int flags)
{}

struct pnp_resource *pnp_add_mem_resource(struct pnp_dev *dev,
					  resource_size_t start,
					  resource_size_t end, int flags)
{}

struct pnp_resource *pnp_add_bus_resource(struct pnp_dev *dev,
					  resource_size_t start,
					  resource_size_t end)
{}

/*
 * Determine whether the specified resource is a possible configuration
 * for this device.
 */
int pnp_possible_config(struct pnp_dev *dev, int type, resource_size_t start,
			resource_size_t size)
{}
EXPORT_SYMBOL();

int pnp_range_reserved(resource_size_t start, resource_size_t end)
{}
EXPORT_SYMBOL();

/* format is: pnp_reserve_irq=irq1[,irq2] .... */
static int __init pnp_setup_reserve_irq(char *str)
{}

__setup();

/* format is: pnp_reserve_dma=dma1[,dma2] .... */
static int __init pnp_setup_reserve_dma(char *str)
{}

__setup();

/* format is: pnp_reserve_io=io1,size1[,io2,size2] .... */
static int __init pnp_setup_reserve_io(char *str)
{}

__setup();

/* format is: pnp_reserve_mem=mem1,size1[,mem2,size2] .... */
static int __init pnp_setup_reserve_mem(char *str)
{}

__setup();