1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Copyright 2015 Stephen Warren 4 */ 5 6#include <config.h> 7#include <phys2bus.h> 8 9unsigned 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 18unsigned long bus_to_phys(unsigned long bus) 19{ 20 return bus & ~0xc0000000; 21} 22