]> Git Repo - u-boot.git/blame - arch/arm/mach-bcm283x/phys2bus.c
ARM: bcm2835: implement phys_to_bus/bus_to_phys
[u-boot.git] / arch / arm / mach-bcm283x / phys2bus.c
CommitLineData
79340db7
SW
1/*
2 * Copyright 2015 Stephen Warren
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <config.h>
8#include <phys2bus.h>
9
10unsigned long phys_to_bus(unsigned long phys)
11{
12#ifdef CONFIG_BCM2836
13 return 0xc0000000 | phys;
14#else
15 return 0x40000000 | phys;
16#endif
17}
18
19unsigned long bus_to_phys(unsigned long bus)
20{
21 return bus & ~0xc0000000;
22}
This page took 0.026403 seconds and 4 git commands to generate.