blob: db3712b5d3022a8b310884fe1c5acacbb034d9d0 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Kumar Gala63240ba2008-12-13 17:20:28 -06002#ifndef __ADDR_MAP_H
3#define __ADDR_MAP_H
4
5/*
6 * Copyright 2008 Freescale Semiconductor, Inc.
Kumar Gala63240ba2008-12-13 17:20:28 -06007 */
8
9#include <asm/types.h>
10
Bin Mengb5615632021-02-25 17:22:33 +080011struct addrmap {
12 phys_addr_t paddr;
13 phys_size_t size;
14 unsigned long vaddr;
15};
16
Simon Glass28199612022-07-13 06:06:58 -060017#ifdef CONFIG_ADDR_MAP
Bin Mengb5615632021-02-25 17:22:33 +080018extern struct addrmap address_map[CONFIG_SYS_NUM_ADDR_MAP];
Simon Glass28199612022-07-13 06:06:58 -060019#endif
Bin Mengb5615632021-02-25 17:22:33 +080020
Bin Mengc40131a2021-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 Gala63240ba2008-12-13 17:20:28 -060025
26#endif