mbgtools-lx  4.2.8
rsrc_lx.c File Reference
#include <rsrc_lx.h>
#include <mbgerror.h>
#include <mbgddmsg.h>
#include <linux/ioport.h>
#include <linux/version.h>

Go to the source code of this file.

Macros

#define _RSRC_LX
 

Functions

int rsrc_alloc_ports (ulong port, ulong n)
 Try to allocate an I/O port resource range. More...
 
void rsrc_dealloc_ports (ulong port, ulong n)
 Release an I/O port resource range which has been allocated before. More...
 
int rsrc_alloc_mem (ulong start, ulong len)
 Try to allocate a memory resource range. More...
 
void rsrc_dealloc_mem (ulong start, ulong len)
 Release a memory resource range which has been allocated before. More...
 

Variables

const char driver_name []
 

Macro Definition Documentation

◆ _RSRC_LX

#define _RSRC_LX

Definition at line 37 of file rsrc_lx.c.

Function Documentation

◆ rsrc_alloc_mem()

int rsrc_alloc_mem ( ulong  start,
ulong  len 
)

Try to allocate a memory resource range.

Parameters
[in]startFirst port address to allocate
[in]lenNumber of port addresses to allocate
Returns
MBG_SUCCESS if the port range could be allocated, else MBG_ERR_CLAIM_RSRC

Definition at line 104 of file rsrc_lx.c.

Referenced by pcps_add_rsrc_mem().

◆ rsrc_alloc_ports()

int rsrc_alloc_ports ( ulong  port,
ulong  n 
)

Try to allocate an I/O port resource range.

Parameters
[in]portFirst port address to allocate
[in]nNumber of port addresses to allocate
Returns
MBG_SUCCESS if the port range could be allocated, else MBG_ERR_CLAIM_RSRC

Definition at line 60 of file rsrc_lx.c.

Referenced by pcps_add_rsrc_io().

◆ rsrc_dealloc_mem()

void rsrc_dealloc_mem ( ulong  start,
ulong  len 
)

Release a memory resource range which has been allocated before.

Parameters
[in]startFirst port address to release
[in]lenNumber of port addresses to release

Definition at line 131 of file rsrc_lx.c.

Referenced by pcps_release_rsrcs().

◆ rsrc_dealloc_ports()

void rsrc_dealloc_ports ( ulong  port,
ulong  n 
)

Release an I/O port resource range which has been allocated before.

Parameters
[in]portFirst port address to release
[in]nNumber of port addresses to release

Definition at line 85 of file rsrc_lx.c.

Referenced by pcps_release_rsrcs().

Variable Documentation

◆ driver_name