Skip to content
Permalink
Browse files

bcm270x: Drop map_io device mapping

All drivers map their own io now so it's not necessary to do this
mapping anymore. The mapping for the uart debug console is handled by
debug_ll_io_init() if necessary.

Remove local uart debug code and rely on mainline.
Use these kconfig options to enable:
CONFIG_DEBUG_BCM2835
CONFIG_DEBUG_BCM2836

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
  • Loading branch information...
notro committed Oct 10, 2016
1 parent f9f6017 commit b50787dfa2ef7f780bf21d379e757862950f5086
@@ -147,12 +147,12 @@ choice

config DEBUG_BCM2835
bool "Kernel low-level debugging on BCM2835 PL011 UART"
depends on ARCH_BCM2835 && ARCH_MULTI_V6
depends on (ARCH_BCM2835 && ARCH_MULTI_V6) || ARCH_BCM2708
select DEBUG_UART_PL01X

config DEBUG_BCM2836
bool "Kernel low-level debugging on BCM2836 PL011 UART"
depends on ARCH_BCM2835 && ARCH_MULTI_V7
depends on (ARCH_BCM2835 && ARCH_MULTI_V7) || ARCH_BCM2709
select DEBUG_UART_PL01X

config DEBUG_BCM_5301X
@@ -1312,14 +1312,6 @@ choice
options; the platform specific options are deprecated
and will be soon removed.

config DEBUG_BCM2708_UART0
bool "Broadcom BCM270X UART0 (PL011)"
depends on ARCH_BCM2708 || ARCH_BCM2709
help
Say Y here if you want the debug print routines to direct
their output to UART 0. The port must have been initialised
by the boot-loader before use.

endchoice

config DEBUG_AT91_UART
@@ -1703,7 +1695,8 @@ config DEBUG_UART_8250_FLOW_CONTROL

config DEBUG_UNCOMPRESS
bool
depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
ARCH_BCM2708 || ARCH_BCM2709
default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
(!DEBUG_TEGRA_UART || !ZBOOT_ROM)
help
@@ -1720,7 +1713,8 @@ config DEBUG_UNCOMPRESS
config UNCOMPRESS_INCLUDE
string
default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
ARCH_BCM2708 || ARCH_BCM2709
default "mach/uncompress.h"

config EARLY_PRINTK
@@ -19,84 +19,16 @@
*/

#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <asm/system_info.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

#include <mach/system.h>

#include <linux/broadcom/vc_cma.h>

/* Effectively we have an IOMMU (ARM<->VideoCore map) that is set up to
* give us IO access only to 64Mbytes of physical memory (26 bits). We could
* represent this window by setting our dmamasks to 26 bits but, in fact
* we're not going to use addresses outside this range (they're not in real
* memory) so we don't bother.
*
* In the future we might include code to use this IOMMU to remap other
* physical addresses onto VideoCore memory then the use of 32-bits would be
* more legitimate.
*/
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/system_info.h>

/* command line parameters */
static unsigned boardrev, serial;

static struct map_desc bcm2708_io_desc[] __initdata = {
{
.virtual = IO_ADDRESS(ARMCTRL_BASE),
.pfn = __phys_to_pfn(ARMCTRL_BASE),
.length = SZ_4K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(UART0_BASE),
.pfn = __phys_to_pfn(UART0_BASE),
.length = SZ_4K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(UART1_BASE),
.pfn = __phys_to_pfn(UART1_BASE),
.length = SZ_4K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(DMA_BASE),
.pfn = __phys_to_pfn(DMA_BASE),
.length = SZ_4K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(MCORE_BASE),
.pfn = __phys_to_pfn(MCORE_BASE),
.length = SZ_4K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(ST_BASE),
.pfn = __phys_to_pfn(ST_BASE),
.length = SZ_4K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(USB_BASE),
.pfn = __phys_to_pfn(USB_BASE),
.length = SZ_128K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(PM_BASE),
.pfn = __phys_to_pfn(PM_BASE),
.length = SZ_4K,
.type = MT_DEVICE},
{
.virtual = IO_ADDRESS(GPIO_BASE),
.pfn = __phys_to_pfn(GPIO_BASE),
.length = SZ_4K,
.type = MT_DEVICE}
};

void __init bcm2708_map_io(void)
{
iotable_init(bcm2708_io_desc, ARRAY_SIZE(bcm2708_io_desc));
}

static void __init bcm2708_init(void)
{
vc_cma_early_init();
@@ -117,7 +49,6 @@ static const char * const bcm2708_compat[] = {

MACHINE_START(BCM2708, "BCM2708")
/* Maintainer: Broadcom Europe Ltd. */
.map_io = bcm2708_map_io,
.init_machine = bcm2708_init,
.reserve = board_reserve,
.dt_compat = bcm2708_compat,

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b50787d

Please sign in to comment.
You can’t perform that action at this time.