Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
resource.c File Reference
#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/ioport.h>
#include <linux/init.h>
#include <linux/pnp.h>
#include "base.h"

Go to the source code of this file.

Macros

#define length(start, end)   (*(end) - *(start) + 1)
 
#define ranged_conflict(starta, enda, startb, endb)   !((*(enda) < *(startb)) || (*(endb) < *(starta)))
 
#define cannot_compare(flags)   ((flags) & IORESOURCE_DISABLED)
 

Functions

struct pnp_optionpnp_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)
 
int pnp_check_port (struct pnp_dev *dev, struct resource *res)
 
int pnp_check_mem (struct pnp_dev *dev, struct resource *res)
 
int pnp_check_irq (struct pnp_dev *dev, struct resource *res)
 
unsigned long pnp_resource_type (struct resource *res)
 
struct resourcepnp_get_resource (struct pnp_dev *dev, unsigned long type, unsigned int num)
 
 EXPORT_SYMBOL (pnp_get_resource)
 
struct pnp_resourcepnp_add_irq_resource (struct pnp_dev *dev, int irq, int flags)
 
struct pnp_resourcepnp_add_dma_resource (struct pnp_dev *dev, int dma, int flags)
 
struct pnp_resourcepnp_add_io_resource (struct pnp_dev *dev, resource_size_t start, resource_size_t end, int flags)
 
struct pnp_resourcepnp_add_mem_resource (struct pnp_dev *dev, resource_size_t start, resource_size_t end, int flags)
 
struct pnp_resourcepnp_add_bus_resource (struct pnp_dev *dev, resource_size_t start, resource_size_t end)
 
int pnp_possible_config (struct pnp_dev *dev, int type, resource_size_t start, resource_size_t size)
 
 EXPORT_SYMBOL (pnp_possible_config)
 
int pnp_range_reserved (resource_size_t start, resource_size_t end)
 
 EXPORT_SYMBOL (pnp_range_reserved)
 
 __setup ("pnp_reserve_irq=", pnp_setup_reserve_irq)
 

Macro Definition Documentation

#define cannot_compare (   flags)    ((flags) & IORESOURCE_DISABLED)

Definition at line 162 of file resource.c.

#define length (   start,
  end 
)    (*(end) - *(start) + 1)

Definition at line 156 of file resource.c.

#define ranged_conflict (   starta,
  enda,
  startb,
  endb 
)    !((*(enda) < *(startb)) || (*(endb) < *(starta)))

Definition at line 159 of file resource.c.

Function Documentation

__setup ( )
EXPORT_SYMBOL ( pnp_get_resource  )
EXPORT_SYMBOL ( pnp_possible_config  )
EXPORT_SYMBOL ( pnp_range_reserved  )
struct pnp_resource* pnp_add_bus_resource ( struct pnp_dev dev,
resource_size_t  start,
resource_size_t  end 
)
read

Definition at line 596 of file resource.c.

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

Definition at line 527 of file resource.c.

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

Definition at line 548 of file resource.c.

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

Definition at line 506 of file resource.c.

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

Definition at line 572 of file resource.c.

struct pnp_option* pnp_build_option ( struct pnp_dev dev,
unsigned long  type,
unsigned int  option_flags 
)
read

Definition at line 34 of file resource.c.

int pnp_check_irq ( struct pnp_dev dev,
struct resource res 
)

Definition at line 349 of file resource.c.

int pnp_check_mem ( struct pnp_dev dev,
struct resource res 
)

Definition at line 227 of file resource.c.

int pnp_check_port ( struct pnp_dev dev,
struct resource res 
)

Definition at line 165 of file resource.c.

void pnp_free_options ( struct pnp_dev dev)

Definition at line 142 of file resource.c.

struct resource* pnp_get_resource ( struct pnp_dev dev,
unsigned long  type,
unsigned int  num 
)
read

Definition at line 479 of file resource.c.

int pnp_possible_config ( struct pnp_dev dev,
int  type,
resource_size_t  start,
resource_size_t  size 
)

Definition at line 624 of file resource.c.

int pnp_range_reserved ( resource_size_t  start,
resource_size_t  end 
)

Definition at line 666 of file resource.c.

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

Definition at line 78 of file resource.c.

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

Definition at line 50 of file resource.c.

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 
)

Definition at line 119 of file resource.c.

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 
)

Definition at line 96 of file resource.c.

unsigned long pnp_resource_type ( struct resource res)

Definition at line 472 of file resource.c.