Skip to content

Commit

Permalink
bcm270x: Drop NEED_MACH_MEMORY_H and use DT dma-ranges
Browse files Browse the repository at this point in the history
Drop NEED_MACH_MEMORY_H and use dma-ranges from the Device Tree to
get the bus address, like ARCH_BCM2835 does.

This means that we go from this:

arch/arm/mach-bcm270x/include/mach/memory.h:

define __virt_to_bus(x)    ((x) + (BUS_OFFSET - PAGE_OFFSET))
define __bus_to_virt(x)    ((x) - (BUS_OFFSET - PAGE_OFFSET))
define __pfn_to_bus(x)     (__pfn_to_phys(x) + BUS_OFFSET)
define __bus_to_pfn(x)     __phys_to_pfn((x) - BUS_OFFSET

To this:

arch/arm/include/asm/memory.h:

define __virt_to_bus   __virt_to_phys
define __bus_to_virt   __phys_to_virt
define __pfn_to_bus(x) __pfn_to_phys(x)
define __bus_to_pfn(x) __phys_to_pfn(x)

Drivers now have to use the DMA API to get to the bus address.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
  • Loading branch information
notro committed Oct 25, 2016
1 parent 210b709 commit 6282051
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 135 deletions.
2 changes: 0 additions & 2 deletions arch/arm/Kconfig
Expand Up @@ -334,7 +334,6 @@ config ARCH_BCM2708
select CLKSRC_OF if OF
select HAVE_SCHED_CLOCK
select NEED_MACH_GPIO_H
select NEED_MACH_MEMORY_H
select COMMON_CLK
select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS
Expand All @@ -354,7 +353,6 @@ config ARCH_BCM2709
select ARM_AMBA
select MIGHT_HAVE_CACHE_L2X0
select HAVE_SCHED_CLOCK
select NEED_MACH_MEMORY_H
select COMMON_CLK
select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/boot/dts/bcm2708.dtsi
Expand Up @@ -7,9 +7,6 @@
model = "BCM2708";

soc {
ranges = <0x7e000000 0x20000000 0x01000000>;
/delete-property/ dma-ranges;

timer@7e003000 {
compatible = "brcm,bcm2835-system-timer";
reg = <0x7e003000 0x1000>;
Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/bcm2709.dtsi
Expand Up @@ -9,7 +9,6 @@
soc {
ranges = <0x7e000000 0x3f000000 0x01000000>,
<0x40000000 0x40000000 0x00040000>;
/delete-property/ dma-ranges;

syscon@40000000 {
compatible = "brcm,bcm2836-arm-local", "syscon";
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-bcm2708/Kconfig
Expand Up @@ -3,7 +3,6 @@ menu "Broadcom BCM2708 Implementations"

config MACH_BCM2708
bool "Broadcom BCM2708 Development Platform"
select NEED_MACH_MEMORY_H
select CPU_V6
select USE_OF
select ARCH_REQUIRE_GPIOLIB
Expand All @@ -12,11 +11,4 @@ config MACH_BCM2708
help
Include support for the Broadcom(R) BCM2708 platform.

config BCM2708_NOL2CACHE
bool "Videocore L2 cache disable"
depends on MACH_BCM2708
default n
help
Do not allow ARM to use GPU's L2 cache. Requires disable_l2cache in config.txt.

endmenu
57 changes: 0 additions & 57 deletions arch/arm/mach-bcm2708/include/mach/memory.h

This file was deleted.

7 changes: 0 additions & 7 deletions arch/arm/mach-bcm2709/Kconfig
Expand Up @@ -6,11 +6,4 @@ config MACH_BCM2709
help
Include support for the Broadcom(R) BCM2709 platform.

config BCM2708_NOL2CACHE
bool "Videocore L2 cache disable"
depends on MACH_BCM2709
default y
help
Do not allow ARM to use GPU's L2 cache. Requires disable_l2cache in config.txt.

endmenu
57 changes: 0 additions & 57 deletions arch/arm/mach-bcm2709/include/mach/memory.h

This file was deleted.

0 comments on commit 6282051

Please sign in to comment.