RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
ofw_io.h 文件参考
#include <ioremap.h>
#include <drivers/ofw.h>
+ ofw_io.h 的引用(Include)关系图:

浏览该文件的源代码.

函数

int rt_ofw_bus_addr_cells (struct rt_ofw_node *np)
 
int rt_ofw_bus_size_cells (struct rt_ofw_node *np)
 
int rt_ofw_io_addr_cells (struct rt_ofw_node *np)
 
int rt_ofw_io_size_cells (struct rt_ofw_node *np)
 
int rt_ofw_get_address_count (struct rt_ofw_node *np)
 
rt_err_t rt_ofw_get_address (struct rt_ofw_node *np, int index, rt_uint64_t *out_address, rt_uint64_t *out_size)
 
rt_err_t rt_ofw_get_address_by_name (struct rt_ofw_node *np, const char *name, rt_uint64_t *out_address, rt_uint64_t *out_size)
 
int rt_ofw_get_address_array (struct rt_ofw_node *np, int nr, rt_uint64_t *out_regs)
 
rt_uint64_t rt_ofw_translate_address (struct rt_ofw_node *np, const char *range_type, rt_uint64_t address)
 
rt_uint64_t rt_ofw_reverse_address (struct rt_ofw_node *np, const char *range_type, rt_uint64_t address)
 
rt_inline rt_uint64_t rt_ofw_translate_dma2cpu (struct rt_ofw_node *np, rt_uint64_t address)
 
rt_inline rt_uint64_t rt_ofw_translate_cpu2dma (struct rt_ofw_node *np, rt_uint64_t address)
 
void * rt_ofw_iomap (struct rt_ofw_node *np, int index)
 
void * rt_ofw_iomap_by_name (struct rt_ofw_node *np, const char *name)
 

函数说明

◆ rt_ofw_bus_addr_cells()

int rt_ofw_bus_addr_cells ( struct rt_ofw_node * np)

◆ rt_ofw_bus_size_cells()

int rt_ofw_bus_size_cells ( struct rt_ofw_node * np)

◆ rt_ofw_io_addr_cells()

int rt_ofw_io_addr_cells ( struct rt_ofw_node * np)

◆ rt_ofw_io_size_cells()

int rt_ofw_io_size_cells ( struct rt_ofw_node * np)

◆ rt_ofw_get_address_count()

int rt_ofw_get_address_count ( struct rt_ofw_node * np)

◆ rt_ofw_get_address()

rt_err_t rt_ofw_get_address ( struct rt_ofw_node * np,
int index,
rt_uint64_t * out_address,
rt_uint64_t * out_size )

◆ rt_ofw_get_address_by_name()

rt_err_t rt_ofw_get_address_by_name ( struct rt_ofw_node * np,
const char * name,
rt_uint64_t * out_address,
rt_uint64_t * out_size )

◆ rt_ofw_get_address_array()

int rt_ofw_get_address_array ( struct rt_ofw_node * np,
int nr,
rt_uint64_t * out_regs )

◆ rt_ofw_translate_address()

rt_uint64_t rt_ofw_translate_address ( struct rt_ofw_node * np,
const char * range_type,
rt_uint64_t address )
+ 这是这个函数的调用关系图:

◆ rt_ofw_reverse_address()

rt_uint64_t rt_ofw_reverse_address ( struct rt_ofw_node * np,
const char * range_type,
rt_uint64_t address )
+ 这是这个函数的调用关系图:

◆ rt_ofw_translate_dma2cpu()

rt_inline rt_uint64_t rt_ofw_translate_dma2cpu ( struct rt_ofw_node * np,
rt_uint64_t address )

在文件 ofw_io.h31 行定义.

32{
33 rt_uint64_t bus_addr, cpu_addr;
34
35 bus_addr = rt_ofw_reverse_address(np, "dma-ranges", address);
36 cpu_addr = rt_ofw_translate_address(np, "ranges", bus_addr);
37
38 return cpu_addr != ~0ULL ? cpu_addr : address;
39}
rt_uint64_t rt_ofw_reverse_address(struct rt_ofw_node *np, const char *range_type, rt_uint64_t address)
rt_uint64_t rt_ofw_translate_address(struct rt_ofw_node *np, const char *range_type, rt_uint64_t address)
unsigned long long rt_uint64_t

引用了 rt_ofw_reverse_address() , 以及 rt_ofw_translate_address().

+ 函数调用图:

◆ rt_ofw_translate_cpu2dma()

rt_inline rt_uint64_t rt_ofw_translate_cpu2dma ( struct rt_ofw_node * np,
rt_uint64_t address )

在文件 ofw_io.h41 行定义.

42{
43 rt_uint64_t bus_addr, dma_addr;
44
45 bus_addr = rt_ofw_reverse_address(np, "ranges", address);
46 dma_addr = rt_ofw_translate_address(np, "dma-ranges", bus_addr);
47
48 return dma_addr != ~0ULL ? dma_addr : address;
49}

引用了 rt_ofw_reverse_address() , 以及 rt_ofw_translate_address().

+ 函数调用图:

◆ rt_ofw_iomap()

void * rt_ofw_iomap ( struct rt_ofw_node * np,
int index )

◆ rt_ofw_iomap_by_name()

void * rt_ofw_iomap_by_name ( struct rt_ofw_node * np,
const char * name )