blob: db3712b5d3022a8b310884fe1c5acacbb034d9d0 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Kumar Gala0949bd12008-12-13 17:20:28 -06002#ifndef __ADDR_MAP_H
3#define __ADDR_MAP_H
4
5/*
6 * Copyright 2008 Freescale Semiconductor, Inc.
Kumar Gala0949bd12008-12-13 17:20:28 -06007 */
8
9#include <asm/types.h>
10
Bin Menge1514032021-02-25 17:22:33 +080011struct addrmap {
12 phys_addr_t paddr;
13 phys_size_t size;
14 unsigned long vaddr;
15};
16
Simon Glassf2d59c02022-07-13 06:06:58 -060017#ifdef CONFIG_ADDR_MAP
Bin Menge1514032021-02-25 17:22:33 +080018extern struct addrmap address_map[CONFIG_SYS_NUM_ADDR_MAP];
Simon Glassf2d59c02022-07-13 06:06:58 -060019#endif
Bin Menge1514032021-02-25 17:22:33 +080020
Bin Mengf1d10f92021-02-25 17:22:32 +080021phys_addr_t addrmap_virt_to_phys(void *vaddr);
22void *addrmap_phys_to_virt(phys_addr_t paddr);
23void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr,
24 phys_size_t size, int idx);
Kumar Gala0949bd12008-12-13 17:20:28 -060025
26#endif