blob: 55d3a6a165acb9afb2f3ec7843ab9f8d7ce859c1 [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
17extern struct addrmap address_map[CONFIG_SYS_NUM_ADDR_MAP];
18
Bin Mengc40131a2021-02-25 17:22:32 +080019phys_addr_t addrmap_virt_to_phys(void *vaddr);
20void *addrmap_phys_to_virt(phys_addr_t paddr);
21void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr,
22 phys_size_t size, int idx);
Kumar Gala63240ba2008-12-13 17:20:28 -060023
24#endif