drivers: mm: Fix cast warnings on build for RAT
Removed the unneccessary casts in the functions to remove warnings during build for SoCs using RAT. Functionality reamins the same, tested on board. Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
This commit is contained in:
parent
5d75940ae3
commit
934c6d7b33
2 changed files with 7 additions and 7 deletions
|
@ -99,7 +99,7 @@ int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys)
|
|||
if (virt == NULL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
uint64_t pa = ((uint64_t) (virt));
|
||||
uintptr_t pa = (uintptr_t) virt;
|
||||
uintptr_t *va = phys;
|
||||
|
||||
uint32_t found, regionId;
|
||||
|
@ -130,10 +130,10 @@ int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys)
|
|||
uint32_t offset =
|
||||
pa - translate_config.region_config[regionId].system_addr;
|
||||
|
||||
*va = (void *)(translate_config.region_config[regionId].local_addr + offset);
|
||||
*va = (translate_config.region_config[regionId].local_addr + offset);
|
||||
} else {
|
||||
/* no mapping found, set output = input with 32b truncation */
|
||||
*va = (void *)pa;
|
||||
*va = pa;
|
||||
}
|
||||
|
||||
if (va == NULL) {
|
||||
|
|
|
@ -15,10 +15,10 @@ extern "C" {
|
|||
#include <stdint.h>
|
||||
|
||||
#define ADDR_TRANSLATE_MAX_REGIONS (16u)
|
||||
#define RAT_CTRL(base_addr, i) (volatile uint32_t *)(base_addr + 0x20 + 0x10 * (i))
|
||||
#define RAT_BASE(base_addr, i) (volatile uint32_t *)(base_addr + 0x24 + 0x10 * (i))
|
||||
#define RAT_TRANS_L(base_addr, i) (volatile uint32_t *)(base_addr + 0x28 + 0x10 * (i))
|
||||
#define RAT_TRANS_H(base_addr, i) (volatile uint32_t *)(base_addr + 0x2C + 0x10 * (i))
|
||||
#define RAT_CTRL(base_addr, i) (base_addr + 0x20 + 0x10 * (i))
|
||||
#define RAT_BASE(base_addr, i) (base_addr + 0x24 + 0x10 * (i))
|
||||
#define RAT_TRANS_L(base_addr, i) (base_addr + 0x28 + 0x10 * (i))
|
||||
#define RAT_TRANS_H(base_addr, i) (base_addr + 0x2C + 0x10 * (i))
|
||||
#define RAT_CTRL_W(enable, size) (((enable & 0x1) << 31u) | (size & 0x3F))
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue