]> git.sur5r.net Git - u-boot/blob - arch/arm/mach-bcm283x/phys2bus.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / arm / mach-bcm283x / phys2bus.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright 2015 Stephen Warren
4  */
5
6 #include <config.h>
7 #include <phys2bus.h>
8
9 unsigned long phys_to_bus(unsigned long phys)
10 {
11 #ifndef CONFIG_BCM2835
12         return 0xc0000000 | phys;
13 #else
14         return 0x40000000 | phys;
15 #endif
16 }
17
18 unsigned long bus_to_phys(unsigned long bus)
19 {
20         return bus & ~0xc0000000;
21 }