rt-thread/bsp/cvitek/drivers/drv_ioremap.h
Chen Wang b774c9b938 bsp: cvitek: use ioremap for arm64 core
For ARM, RT-smart and RT-standard both enable mmc (see
rt_hw_board_init() in bsp/cvitek/cv18xx_aarch64/board/board.c,
rt_hw_mmu_setup is called both for smart or standard).

So ioremap is must to do for ARM.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2024-12-30 11:32:10 +08:00

27 lines
538 B
C

/*
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2024/07/24 heyuanjie87 first version
*/
#ifndef __DRV_IOREMAP_H__
#define __DRV_IOREMAP_H__
#include <rtconfig.h>
#if defined RT_USING_SMART || defined ARCH_ARM
#include <ioremap.h>
#define DRV_IOREMAP(addr, size) rt_ioremap(addr, size)
#define DRV_IOUNMAP(addr) rt_iounmap(addr)
#else
#define DRV_IOREMAP(addr, size) (addr)
#define DRV_IOUNMAP(addr)
#endif
#endif