luckfox-pico-sdk/sysdrv/source/mcu/rt-thread/components/vmm/vmm_iomap.c
luckfox-eng29 8f34c2760d project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between
the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door
for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more
usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp:
Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for
compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem.
sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device
tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately.
sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick
boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades.
sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for
fastboot.

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
2024-10-14 09:47:04 +08:00

50 lines
1.0 KiB
C

/*
* VMM IO map table
*
* COPYRIGHT (C) 2013-2014, Real-Thread Information Technology Ltd
* All rights reserved
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2013-06-15 Bernard the first verion
*/
#include <rtthread.h>
#include "vmm.h"
static struct vmm_iomap _vmm_iomap[RT_VMM_IOMAP_MAXNR];
void vmm_iomap_init(struct vmm_iomap *iomap)
{
rt_memcpy(_vmm_iomap, iomap, sizeof(_vmm_iomap));
}
/* find virtual address according to name */
unsigned long vmm_find_iomap(const char *name)
{
int i;
for (i = 0; i < ARRAY_SIZE(_vmm_iomap); i++)
{
if (rt_strcmp(_vmm_iomap[i].name, name) == 0)
return (unsigned long)_vmm_iomap[i].va;
}
return 0;
}
/* find virtual address according to physcal address */
unsigned long vmm_find_iomap_by_pa(unsigned long pa)
{
int i;
for (i = 0; i < ARRAY_SIZE(_vmm_iomap); i++)
{
if (_vmm_iomap[i].pa == pa)
return (unsigned long)_vmm_iomap[i].va;
}
return 0;
}