ARM: BCM2835: Skip doing our own iotable_init() initialization.
Subsystems (4)
PATCH 1/1 ARM: BCM2835: Skip doing our own iotable_init() initialization.
The only thing we were using this 16MB mapping of IO peripherals for was the uart's early debug mapping. If we just drop the map_io hook, the kernel will call debug_ll_io_init() for us, which maps the single page needed for the device.
--- arch/arm/mach-bcm/board_bcm2835.c | 17 ----------------- 1 file changed, 17 deletions(-)
arch/arm/mach-bcm/board_bcm2835.c +0 -17
@@ -31,10 +31,6 @@#define PM_RSTC_WRCFG_FULL_RESET 0x00000020#define PM_RSTS_HADWRH_SET 0x00000040 -#define BCM2835_PERIPH_PHYS 0x20000000 -#define BCM2835_PERIPH_VIRT 0xf0000000 -#define BCM2835_PERIPH_SIZE SZ_16M -static void __iomem *wdt_regs;/*
@@ -93,18 +89,6 @@ static void bcm2835_power_off(void)bcm2835_restart (REBOOT_HARD ,"" ); } -static struct map_desc io_map__initdata = { - .virtual =BCM2835_PERIPH_VIRT , - .pfn =__phys_to_pfn (BCM2835_PERIPH_PHYS ), - .length =BCM2835_PERIPH_SIZE , - .type =MT_DEVICE -}; - -static void __init bcm2835_map_io (void ) -{ -iotable_init (&io_map,1 ); -} -static void __init bcm2835_init (void ) {int ret;
@@ -129,7 +113,6 @@ static const char * const bcm2835_compat[] = { };DT_MACHINE_START (BCM2835 ,"BCM2835" ) - .map_io = bcm2835_map_io, .init_irq = irqchip_init, .init_machine = bcm2835_init, .restart = bcm2835_restart,
Signature · 1 line
2.1.4
PATCH 1/1 ARM: BCM2835: Skip doing our own iotable_init() initialization.
Quoted 4 lines · Eric Anholt
The only thing we were using this 16MB mapping of IO peripherals for was the uart's early debug mapping. If we just drop the
map_iohook, the kernel will calldebug_ll_io_init()for us, which maps the single page needed for the device.
I /think/ debug_ll_io_init() didn't exist (or didn't map memory) when I first upstreamed RPi support. Anyway,
PATCH 1/1 ARM: BCM2835: Skip doing our own iotable_init() initialization.
In reply to Eric AnholtQuoted 9 lines · Eric Anholt
The only thing we were using this 16MB mapping of IO peripherals for was the uart's early debug mapping. If we just drop the
map_iohook, the kernel will calldebug_ll_io_init()for us, which maps the single page needed for the device.Signed-off-by Eric Anholt <[email protected]>--- arch/arm/mach-bcm/board_bcm2835.c | 17 ----------------- 1 file changed, 17 deletions(-)
Applied with Stephen's Ack.
Quoted 42 lines
arch/arm/mach-bcm/board_bcm2835.c +0
-17@@ -31,10 +31,6 @@#define PM_RSTC_WRCFG_FULL_RESET 0x00000020#define PM_RSTS_HADWRH_SET 0x00000040 -#define BCM2835_PERIPH_PHYS 0x20000000 -#define BCM2835_PERIPH_VIRT 0xf0000000 -#define BCM2835_PERIPH_SIZE SZ_16M -static void __iomem *wdt_regs;/* @@ -93,18 +89,6 @@ static void bcm2835_power_off(void)bcm2835_restart (REBOOT_HARD ,"" ); } -static struct map_desc io_map__initdata = { - .virtual =BCM2835_PERIPH_VIRT , - .pfn =__phys_to_pfn (BCM2835_PERIPH_PHYS ), - .length =BCM2835_PERIPH_SIZE , - .type =MT_DEVICE -}; - -static void __init bcm2835_map_io (void ) -{ -iotable_init (&io_map,1 ); -} -static void __init bcm2835_init (void ) {int ret;@@ -129,7 +113,6 @@ static const char * const bcm2835_compat[] = { };DT_MACHINE_START (BCM2835 ,"BCM2835" ) - .map_io = bcm2835_map_io, .init_irq = irqchip_init, .init_machine = bcm2835_init, .restart = bcm2835_restart,