diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-bcm283x/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/phys2bus.c | 22 |
3 files changed, 26 insertions, 1 deletions
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig index b43f2d9..0c04c30 100644 --- a/arch/arm/mach-bcm283x/Kconfig +++ b/arch/arm/mach-bcm283x/Kconfig @@ -23,6 +23,9 @@ config DM_SERIAL config DM_GPIO default y +config PHYS_TO_BUS + default y + config SYS_BOARD default "rpi" if TARGET_RPI default "rpi_2" if TARGET_RPI_2 diff --git a/arch/arm/mach-bcm283x/Makefile b/arch/arm/mach-bcm283x/Makefile index 2505428..ac27d00 100644 --- a/arch/arm/mach-bcm283x/Makefile +++ b/arch/arm/mach-bcm283x/Makefile @@ -5,4 +5,4 @@ # obj-$(CONFIG_TARGET_RPI) += lowlevel_init.o -obj-y += init.o reset.o timer.o mbox.o +obj-y += init.o reset.o timer.o mbox.o phys2bus.o diff --git a/arch/arm/mach-bcm283x/phys2bus.c b/arch/arm/mach-bcm283x/phys2bus.c new file mode 100644 index 0000000..fc1c299 --- /dev/null +++ b/arch/arm/mach-bcm283x/phys2bus.c @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Stephen Warren + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <config.h> +#include <phys2bus.h> + +unsigned long phys_to_bus(unsigned long phys) +{ +#ifdef CONFIG_BCM2836 + return 0xc0000000 | phys; +#else + return 0x40000000 | phys; +#endif +} + +unsigned long bus_to_phys(unsigned long bus) +{ + return bus & ~0xc0000000; +} |