Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
rat.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Texas Instruments Incorporated
3 * Copyright (c) 2023 L Lakshmanan
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef ZEPHYR_INCLUDE_RAT_H_
9#define ZEPHYR_INCLUDE_RAT_H_
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include <stdint.h>
16
17#define ADDR_TRANSLATE_MAX_REGIONS (16u)
18#define RAT_CTRL(base_addr, i) (base_addr + 0x20 + 0x10 * (i))
19#define RAT_BASE(base_addr, i) (base_addr + 0x24 + 0x10 * (i))
20#define RAT_TRANS_L(base_addr, i) (base_addr + 0x28 + 0x10 * (i))
21#define RAT_TRANS_H(base_addr, i) (base_addr + 0x2C + 0x10 * (i))
22#define RAT_CTRL_W(enable, size) (((enable & 0x1) << 31u) | (size & 0x3F))
23
61};
62
70};
71
79};
80
81void sys_mm_drv_ti_rat_init(void *region_config, uint64_t rat_base_addr, uint8_t translate_regions);
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* ZEPHYR_INCLUDE_RAT_H_ */
void sys_mm_drv_ti_rat_init(void *region_config, uint64_t rat_base_addr, uint8_t translate_regions)
address_trans_region_size
Enum's to represent different possible region size for the address translate module.
Definition: rat.h:27
@ address_trans_region_size_1K
Definition: rat.h:38
@ address_trans_region_size_2
Definition: rat.h:29
@ address_trans_region_size_1M
Definition: rat.h:48
@ address_trans_region_size_16K
Definition: rat.h:42
@ address_trans_region_size_256M
Definition: rat.h:56
@ address_trans_region_size_32
Definition: rat.h:33
@ address_trans_region_size_8K
Definition: rat.h:41
@ address_trans_region_size_4G
Definition: rat.h:60
@ address_trans_region_size_512M
Definition: rat.h:57
@ address_trans_region_size_512
Definition: rat.h:37
@ address_trans_region_size_128
Definition: rat.h:35
@ address_trans_region_size_256K
Definition: rat.h:46
@ address_trans_region_size_16
Definition: rat.h:32
@ address_trans_region_size_2M
Definition: rat.h:49
@ address_trans_region_size_4M
Definition: rat.h:50
@ address_trans_region_size_32M
Definition: rat.h:53
@ address_trans_region_size_8M
Definition: rat.h:51
@ address_trans_region_size_4K
Definition: rat.h:40
@ address_trans_region_size_128K
Definition: rat.h:45
@ address_trans_region_size_1
Definition: rat.h:28
@ address_trans_region_size_64
Definition: rat.h:34
@ address_trans_region_size_128M
Definition: rat.h:55
@ address_trans_region_size_1G
Definition: rat.h:58
@ address_trans_region_size_64M
Definition: rat.h:54
@ address_trans_region_size_512K
Definition: rat.h:47
@ address_trans_region_size_64K
Definition: rat.h:44
@ address_trans_region_size_4
Definition: rat.h:30
@ address_trans_region_size_8
Definition: rat.h:31
@ address_trans_region_size_2G
Definition: rat.h:59
@ address_trans_region_size_16M
Definition: rat.h:52
@ address_trans_region_size_32K
Definition: rat.h:43
@ address_trans_region_size_2K
Definition: rat.h:39
@ address_trans_region_size_256
Definition: rat.h:36
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
Parameters for address_trans_init.
Definition: rat.h:75
uint32_t num_regions
Definition: rat.h:76
struct address_trans_region_config * region_config
Definition: rat.h:78
uint32_t rat_base_addr
Definition: rat.h:77
Region config structure.
Definition: rat.h:66
uint32_t size
Definition: rat.h:69
uint64_t system_addr
Definition: rat.h:67
uint32_t local_addr
Definition: rat.h:68