Skip to content

Commit f1ac922

Browse files
committed
ARM: bcm2835: convert to multi-platform
This allows BCM2835 be included in a kernel build that supports multiple SoCs at once, which is useful for distro kernels. This change: * Moves bcm2835's debug-macro.S into ARM's include/debug/, and hooks it into the relevant menu. * Moves bcm2835's Kconfig into its own directory, as seems typical for multi-platform conversions. * Removes bcm2835_soc.h, and moves the content to the files where it was used; just one usage per define. * Deletes some headers and Makefile.boot that aren't needed now that we support multi-platform. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
1 parent f6161aa commit f1ac922

11 files changed

Lines changed: 30 additions & 124 deletions

File tree

‎arch/arm/Kconfig‎

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -362,26 +362,6 @@ config ARCH_AT91
362362
This enables support for systems based on Atmel
363363
AT91RM9200 and AT91SAM9* processors.
364364

365-
config ARCH_BCM2835
366-
bool "Broadcom BCM2835 family"
367-
select ARCH_REQUIRE_GPIOLIB
368-
select ARM_AMBA
369-
select ARM_ERRATA_411920
370-
select ARM_TIMER_SP804
371-
select CLKDEV_LOOKUP
372-
select CLKSRC_OF
373-
select COMMON_CLK
374-
select CPU_V6
375-
select GENERIC_CLOCKEVENTS
376-
select MULTI_IRQ_HANDLER
377-
select PINCTRL
378-
select PINCTRL_BCM2835
379-
select SPARSE_IRQ
380-
select USE_OF
381-
help
382-
This enables support for the Broadcom BCM2835 SoC. This SoC is
383-
use in the Raspberry Pi, and Roku 2 devices.
384-
385365
config ARCH_CNS3XXX
386366
bool "Cavium Networks CNS3XXX family"
387367
select ARM_GIC
@@ -1037,6 +1017,8 @@ source "arch/arm/mach-at91/Kconfig"
10371017

10381018
source "arch/arm/mach-bcm/Kconfig"
10391019

1020+
source "arch/arm/mach-bcm2835/Kconfig"
1021+
10401022
source "arch/arm/mach-clps711x/Kconfig"
10411023

10421024
source "arch/arm/mach-cns3xxx/Kconfig"

‎arch/arm/Kconfig.debug‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ choice
8989
bool "Kernel low-level debugging on 9263 and 9g45"
9090
depends on HAVE_AT91_DBGU1
9191

92+
config DEBUG_BCM2835
93+
bool "Kernel low-level debugging on BCM2835 PL011 UART"
94+
depends on ARCH_BCM2835
95+
9296
config DEBUG_CLPS711X_UART1
9397
bool "Kernel low-level debugging messages via UART1"
9498
depends on ARCH_CLPS711X
@@ -579,6 +583,7 @@ endchoice
579583

580584
config DEBUG_LL_INCLUDE
581585
string
586+
default "debug/bcm2835.S" if DEBUG_BCM2835
582587
default "debug/icedcc.S" if DEBUG_ICEDCC
583588
default "debug/imx.S" if DEBUG_IMX1_UART || \
584589
DEBUG_IMX25_UART || \

‎arch/arm/configs/bcm2835_defconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ CONFIG_EMBEDDED=y
2929
CONFIG_PROFILING=y
3030
CONFIG_OPROFILE=y
3131
CONFIG_JUMP_LABEL=y
32+
CONFIG_ARCH_MULTI_V6=y
33+
# CONFIG_ARCH_MULTI_V7 is not set
3234
CONFIG_ARCH_BCM2835=y
3335
CONFIG_PREEMPT_VOLUNTARY=y
3436
CONFIG_AEABI=y

arch/arm/mach-bcm2835/include/mach/debug-macro.S renamed to arch/arm/include/debug/bcm2835.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
*
1212
*/
1313

14-
#include <mach/bcm2835_soc.h>
14+
#define BCM2835_DEBUG_PHYS 0x20201000
15+
#define BCM2835_DEBUG_VIRT 0xf0201000
1516

1617
.macro addruart, rp, rv, tmp
1718
ldr \rp, =BCM2835_DEBUG_PHYS

‎arch/arm/mach-bcm2835/Kconfig‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
config ARCH_BCM2835
2+
bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
3+
select ARCH_REQUIRE_GPIOLIB
4+
select ARM_AMBA
5+
select ARM_ERRATA_411920
6+
select ARM_TIMER_SP804
7+
select CLKDEV_LOOKUP
8+
select CLKSRC_OF
9+
select CPU_V6
10+
select GENERIC_CLOCKEVENTS
11+
select PINCTRL
12+
select PINCTRL_BCM2835
13+
help
14+
This enables support for the Broadcom BCM2835 SoC. This SoC is
15+
use in the Raspberry Pi, and Roku 2 devices.

‎arch/arm/mach-bcm2835/Makefile.boot‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎arch/arm/mach-bcm2835/bcm2835.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include <asm/mach/arch.h>
2424
#include <asm/mach/map.h>
2525

26-
#include <mach/bcm2835_soc.h>
27-
2826
#define PM_RSTC 0x1c
2927
#define PM_RSTS 0x20
3028
#define PM_WDOG 0x24
@@ -34,6 +32,10 @@
3432
#define PM_RSTC_WRCFG_FULL_RESET 0x00000020
3533
#define PM_RSTS_HADWRH_SET 0x00000040
3634

35+
#define BCM2835_PERIPH_PHYS 0x20000000
36+
#define BCM2835_PERIPH_VIRT 0xf0000000
37+
#define BCM2835_PERIPH_SIZE SZ_16M
38+
3739
static void __iomem *wdt_regs;
3840

3941
/*

‎arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎arch/arm/mach-bcm2835/include/mach/gpio.h‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎arch/arm/mach-bcm2835/include/mach/timex.h‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)