Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcm270x: Convert to ARCH_MULTIPLATFORM #1699

Merged
merged 10 commits into from
Oct 28, 2016
24 changes: 0 additions & 24 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -326,36 +326,13 @@ choice
default ARM_SINGLE_ARMV7M if !MMU
default ARCH_MULTIPLATFORM if MMU

config ARCH_BCM2708
bool "Broadcom BCM2708 family"
select CPU_V6
select ARM_AMBA
select CLKSRC_MMIO
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
select ARM_ERRATA_411920
select MACH_BCM2708
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select VC4
select FIQ
help
This enables support for Broadcom BCM2708 boards.

config ARCH_BCM2709
bool "Broadcom BCM2709 family"
select CPU_V7
select HAVE_SMP
select ARM_AMBA
select MIGHT_HAVE_CACHE_L2X0
select HAVE_SCHED_CLOCK
select NEED_MACH_MEMORY_H
select NEED_MACH_IO_H
select COMMON_CLK
select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS
Expand Down Expand Up @@ -757,7 +734,6 @@ config ARCH_VIRT
# Kconfigs may be included either alphabetically (according to the
# plat- suffix) or along side the corresponding mach-* source.
#
source "arch/arm/mach-bcm2708/Kconfig"
source "arch/arm/mach-bcm2709/Kconfig"

source "arch/arm/mach-mvebu/Kconfig"
Expand Down
1 change: 0 additions & 1 deletion arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000

# Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
machine-$(CONFIG_ARCH_BCM2708) += bcm2708
machine-$(CONFIG_ARCH_BCM2709) += bcm2709
machine-$(CONFIG_ARCH_ALPINE) += alpine
machine-$(CONFIG_ARCH_ARTPEC) += artpec
Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ifeq ($(CONFIG_OF),y)
dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b.dtb
dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b-plus.dtb
dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-cm.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-cm.dtb
dtb-$(CONFIG_ARCH_BCM2709) += bcm2709-rpi-2-b.dtb
dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb
dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-cm3.dtb
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/boot/dts/bcm2708.dtsi
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
93 changes: 0 additions & 93 deletions arch/arm/boot/dts/bcm2835-rpi-cm.dts

This file was deleted.

30 changes: 0 additions & 30 deletions arch/arm/boot/dts/bcm2835-rpi-cm.dtsi

This file was deleted.

6 changes: 4 additions & 2 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# CONFIG_ARM_PATCH_PHYS_VIRT is not set
CONFIG_PHYS_OFFSET=0
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
Expand Down Expand Up @@ -38,7 +36,11 @@ CONFIG_BLK_DEV_THROTTLING=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_MAC_PARTITION=y
CONFIG_CFQ_GROUP_IOSCHED=y
CONFIG_ARCH_MULTI_V6=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_BCM=y
CONFIG_ARCH_BCM2708=y
# CONFIG_CACHE_L2X0 is not set
CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y
Expand Down
10 changes: 0 additions & 10 deletions arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,6 @@ void arch_cpu_idle_exit(void)
ledtrig_cpu(CPU_LED_IDLE_END);
}

char bcm2708_reboot_mode = 'h';

int __init reboot_setup(char *str)
{
bcm2708_reboot_mode = str[0];
return 1;
}

__setup("reboot=", reboot_setup);

void __show_regs(struct pt_regs *regs)
{
unsigned long flags;
Expand Down
14 changes: 14 additions & 0 deletions arch/arm/mach-bcm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ config ARCH_BCM2835
This enables support for the Broadcom BCM2835 and BCM2836 SoCs.
This SoC is used in the Raspberry Pi and Roku 2 devices.

config MACH_BCM2708
bool "Enable optimized __copy_to_user and __copy_from_user"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text doesn't seem to match the config name. A c/p error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was tired and didn't know what to call it, so I just kept the name.
The only place CONFIG_MACH_BCM2708 is used is in the optimization code: 5fb515e

depends on ARCH_BCM2708
default y
help
Optimized versions of __copy_to_user and __copy_from_user for Pi1.

config ARCH_BCM2708
bool "Broadcom BCM2708 family"
depends on ARCH_MULTI_V6
select ARCH_BCM2835
help
This enables support for Broadcom BCM2708 boards.

config ARCH_BCM_63XX
bool "Broadcom BCM63xx DSL SoC"
depends on ARCH_MULTI_V7
Expand Down
21 changes: 21 additions & 0 deletions arch/arm/mach-bcm/board_bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/irqchip.h>
#include <linux/of_address.h>
#include <linux/clk/bcm2835.h>
#include <linux/broadcom/vc_cma.h>
#include <asm/system_info.h>

#include <asm/mach/arch.h>
Expand All @@ -27,6 +28,7 @@ static void __init bcm2835_init(void)
u32 val;
u64 val64;

vc_cma_early_init();
bcm2835_init_clocks();

if (!of_property_read_u32(np, "linux,revision", &val))
Expand All @@ -35,6 +37,11 @@ static void __init bcm2835_init(void)
system_serial_low = val64;
}

static void __init bcm2835_board_reserve(void)
{
vc_cma_reserve();
}

static const char * const bcm2835_compat[] = {
#ifdef CONFIG_ARCH_MULTI_V6
"brcm,bcm2835",
Expand All @@ -47,5 +54,19 @@ static const char * const bcm2835_compat[] = {

DT_MACHINE_START(BCM2835, "BCM2835")
.init_machine = bcm2835_init,
.reserve = bcm2835_board_reserve,
.dt_compat = bcm2835_compat
MACHINE_END

#ifdef CONFIG_ARCH_BCM2708
static const char * const bcm2708_compat[] = {
"brcm,bcm2708",
NULL
};

DT_MACHINE_START(BCM2708, "BCM2708")
.init_machine = bcm2835_init,
.reserve = bcm2835_board_reserve,
.dt_compat = bcm2708_compat,
MACHINE_END
#endif
23 changes: 0 additions & 23 deletions arch/arm/mach-bcm2708/Kconfig

This file was deleted.

5 changes: 0 additions & 5 deletions arch/arm/mach-bcm2708/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions arch/arm/mach-bcm2708/Makefile.boot

This file was deleted.

57 changes: 0 additions & 57 deletions arch/arm/mach-bcm2708/bcm2708.c

This file was deleted.

Loading