diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2013-04-08 14:08:43 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 06:06:28 -0400 |
| commit | f5f29151588744ea2e283971cb0ad403ee04e3e2 (patch) | |
| tree | afdeceebd1e5413508d35fded1dd3363e931071f | |
| parent | 806a94f20c8d78c96601878393a49fab577dcf2e (diff) | |
| parent | f1ac922dec7ed36659344eadc65b9c06efe14d7f (diff) | |
Merge tag 'bcm2835-for-3.10-multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi into next/multiplatform
From Stephen Warren <swarren@wwwdotorg.org>:
ARM: bcm2835: convert to multi-platform
This branch (patch) converts BCM2835 to support being built into a
multi-platform single zImage. This mostly entails a few small Kconfig
tweaks, move the earlyprintk implementation to the standard multi-
platform location, and deleting some unnecessary files.
* tag 'bcm2835-for-3.10-multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi:
ARM: bcm2835: convert to multi-platform
Conflicts:
arch/arm/Kconfig
arch/arm/Kconfig.debug
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| -rw-r--r-- | arch/arm/Kconfig | 22 | ||||
| -rw-r--r-- | arch/arm/Kconfig.debug | 5 | ||||
| -rw-r--r-- | arch/arm/configs/bcm2835_defconfig | 2 | ||||
| -rw-r--r-- | arch/arm/include/debug/bcm2835.S (renamed from arch/arm/mach-bcm2835/include/mach/debug-macro.S) | 3 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/Kconfig | 15 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/Makefile.boot | 1 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/bcm2835.c | 6 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h | 29 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/gpio.h | 1 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/timex.h | 26 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/uncompress.h | 44 |
11 files changed, 30 insertions, 124 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6423b587fa23..e4bbc8bca03c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -361,26 +361,6 @@ config ARCH_AT91 | |||
| 361 | This enables support for systems based on Atmel | 361 | This enables support for systems based on Atmel |
| 362 | AT91RM9200 and AT91SAM9* processors. | 362 | AT91RM9200 and AT91SAM9* processors. |
| 363 | 363 | ||
| 364 | config ARCH_BCM2835 | ||
| 365 | bool "Broadcom BCM2835 family" | ||
| 366 | select ARCH_REQUIRE_GPIOLIB | ||
| 367 | select ARM_AMBA | ||
| 368 | select ARM_ERRATA_411920 | ||
| 369 | select ARM_TIMER_SP804 | ||
| 370 | select CLKDEV_LOOKUP | ||
| 371 | select CLKSRC_OF | ||
| 372 | select COMMON_CLK | ||
| 373 | select CPU_V6 | ||
| 374 | select GENERIC_CLOCKEVENTS | ||
| 375 | select MULTI_IRQ_HANDLER | ||
| 376 | select PINCTRL | ||
| 377 | select PINCTRL_BCM2835 | ||
| 378 | select SPARSE_IRQ | ||
| 379 | select USE_OF | ||
| 380 | help | ||
| 381 | This enables support for the Broadcom BCM2835 SoC. This SoC is | ||
| 382 | use in the Raspberry Pi, and Roku 2 devices. | ||
| 383 | |||
| 384 | config ARCH_CLPS711X | 364 | config ARCH_CLPS711X |
| 385 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" | 365 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" |
| 386 | select ARCH_REQUIRE_GPIOLIB | 366 | select ARCH_REQUIRE_GPIOLIB |
| @@ -981,6 +961,8 @@ source "arch/arm/mach-at91/Kconfig" | |||
| 981 | 961 | ||
| 982 | source "arch/arm/mach-bcm/Kconfig" | 962 | source "arch/arm/mach-bcm/Kconfig" |
| 983 | 963 | ||
| 964 | source "arch/arm/mach-bcm2835/Kconfig" | ||
| 965 | |||
| 984 | source "arch/arm/mach-clps711x/Kconfig" | 966 | source "arch/arm/mach-clps711x/Kconfig" |
| 985 | 967 | ||
| 986 | source "arch/arm/mach-cns3xxx/Kconfig" | 968 | source "arch/arm/mach-cns3xxx/Kconfig" |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index fd17127b4188..5f6c665b00d2 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
| @@ -89,6 +89,10 @@ choice | |||
| 89 | bool "Kernel low-level debugging on 9263 and 9g45" | 89 | bool "Kernel low-level debugging on 9263 and 9g45" |
| 90 | depends on HAVE_AT91_DBGU1 | 90 | depends on HAVE_AT91_DBGU1 |
| 91 | 91 | ||
| 92 | config DEBUG_BCM2835 | ||
| 93 | bool "Kernel low-level debugging on BCM2835 PL011 UART" | ||
| 94 | depends on ARCH_BCM2835 | ||
| 95 | |||
| 92 | config DEBUG_CLPS711X_UART1 | 96 | config DEBUG_CLPS711X_UART1 |
| 93 | bool "Kernel low-level debugging messages via UART1" | 97 | bool "Kernel low-level debugging messages via UART1" |
| 94 | depends on ARCH_CLPS711X | 98 | depends on ARCH_CLPS711X |
| @@ -593,6 +597,7 @@ endchoice | |||
| 593 | 597 | ||
| 594 | config DEBUG_LL_INCLUDE | 598 | config DEBUG_LL_INCLUDE |
| 595 | string | 599 | string |
| 600 | default "debug/bcm2835.S" if DEBUG_BCM2835 | ||
| 596 | default "debug/cns3xxx.S" if DEBUG_CNS3XXX | 601 | default "debug/cns3xxx.S" if DEBUG_CNS3XXX |
| 597 | default "debug/icedcc.S" if DEBUG_ICEDCC | 602 | default "debug/icedcc.S" if DEBUG_ICEDCC |
| 598 | default "debug/imx.S" if DEBUG_IMX1_UART || \ | 603 | default "debug/imx.S" if DEBUG_IMX1_UART || \ |
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig index af472e4ed451..3a1c939735e0 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig | |||
| @@ -29,6 +29,8 @@ CONFIG_EMBEDDED=y | |||
| 29 | CONFIG_PROFILING=y | 29 | CONFIG_PROFILING=y |
| 30 | CONFIG_OPROFILE=y | 30 | CONFIG_OPROFILE=y |
| 31 | CONFIG_JUMP_LABEL=y | 31 | CONFIG_JUMP_LABEL=y |
| 32 | CONFIG_ARCH_MULTI_V6=y | ||
| 33 | # CONFIG_ARCH_MULTI_V7 is not set | ||
| 32 | CONFIG_ARCH_BCM2835=y | 34 | CONFIG_ARCH_BCM2835=y |
| 33 | CONFIG_PREEMPT_VOLUNTARY=y | 35 | CONFIG_PREEMPT_VOLUNTARY=y |
| 34 | CONFIG_AEABI=y | 36 | CONFIG_AEABI=y |
diff --git a/arch/arm/mach-bcm2835/include/mach/debug-macro.S b/arch/arm/include/debug/bcm2835.S index 8a161e44ae28..aed9199bd847 100644 --- a/arch/arm/mach-bcm2835/include/mach/debug-macro.S +++ b/arch/arm/include/debug/bcm2835.S | |||
| @@ -11,7 +11,8 @@ | |||
| 11 | * | 11 | * |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #include <mach/bcm2835_soc.h> | 14 | #define BCM2835_DEBUG_PHYS 0x20201000 |
| 15 | #define BCM2835_DEBUG_VIRT 0xf0201000 | ||
| 15 | 16 | ||
| 16 | .macro addruart, rp, rv, tmp | 17 | .macro addruart, rp, rv, tmp |
| 17 | ldr \rp, =BCM2835_DEBUG_PHYS | 18 | ldr \rp, =BCM2835_DEBUG_PHYS |
diff --git a/arch/arm/mach-bcm2835/Kconfig b/arch/arm/mach-bcm2835/Kconfig new file mode 100644 index 000000000000..560045cafc34 --- /dev/null +++ b/arch/arm/mach-bcm2835/Kconfig | |||
| @@ -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. | ||
diff --git a/arch/arm/mach-bcm2835/Makefile.boot b/arch/arm/mach-bcm2835/Makefile.boot deleted file mode 100644 index b3271754e9fd..000000000000 --- a/arch/arm/mach-bcm2835/Makefile.boot +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | zreladdr-y := 0x00008000 | ||
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index 6f5785985dd1..740fa9ebe249 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
| 25 | 25 | ||
| 26 | #include <mach/bcm2835_soc.h> | ||
| 27 | |||
| 28 | #define PM_RSTC 0x1c | 26 | #define PM_RSTC 0x1c |
| 29 | #define PM_RSTS 0x20 | 27 | #define PM_RSTS 0x20 |
| 30 | #define PM_WDOG 0x24 | 28 | #define PM_WDOG 0x24 |
| @@ -34,6 +32,10 @@ | |||
| 34 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 | 32 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 |
| 35 | #define PM_RSTS_HADWRH_SET 0x00000040 | 33 | #define PM_RSTS_HADWRH_SET 0x00000040 |
| 36 | 34 | ||
| 35 | #define BCM2835_PERIPH_PHYS 0x20000000 | ||
| 36 | #define BCM2835_PERIPH_VIRT 0xf0000000 | ||
| 37 | #define BCM2835_PERIPH_SIZE SZ_16M | ||
| 38 | |||
| 37 | static void __iomem *wdt_regs; | 39 | static void __iomem *wdt_regs; |
| 38 | 40 | ||
| 39 | /* | 41 | /* |
diff --git a/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h b/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h deleted file mode 100644 index d4dfcf7a9cda..000000000000 --- a/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2012 Stephen Warren | ||
| 3 | * | ||
| 4 | * Derived from code: | ||
| 5 | * Copyright (C) 2010 Broadcom | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef __MACH_BCM2835_BCM2835_SOC_H__ | ||
| 19 | #define __MACH_BCM2835_BCM2835_SOC_H__ | ||
| 20 | |||
| 21 | #include <asm/sizes.h> | ||
| 22 | |||
| 23 | #define BCM2835_PERIPH_PHYS 0x20000000 | ||
| 24 | #define BCM2835_PERIPH_VIRT 0xf0000000 | ||
| 25 | #define BCM2835_PERIPH_SIZE SZ_16M | ||
| 26 | #define BCM2835_DEBUG_PHYS 0x20201000 | ||
| 27 | #define BCM2835_DEBUG_VIRT 0xf0201000 | ||
| 28 | |||
| 29 | #endif | ||
diff --git a/arch/arm/mach-bcm2835/include/mach/gpio.h b/arch/arm/mach-bcm2835/include/mach/gpio.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/arm/mach-bcm2835/include/mach/gpio.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | /* empty */ | ||
diff --git a/arch/arm/mach-bcm2835/include/mach/timex.h b/arch/arm/mach-bcm2835/include/mach/timex.h deleted file mode 100644 index 6d021e136ae3..000000000000 --- a/arch/arm/mach-bcm2835/include/mach/timex.h +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * BCM2835 system clock frequency | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Broadcom | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __ASM_ARCH_TIMEX_H | ||
| 22 | #define __ASM_ARCH_TIMEX_H | ||
| 23 | |||
| 24 | #define CLOCK_TICK_RATE (1000000) | ||
| 25 | |||
| 26 | #endif | ||
diff --git a/arch/arm/mach-bcm2835/include/mach/uncompress.h b/arch/arm/mach-bcm2835/include/mach/uncompress.h deleted file mode 100644 index bf86dca3bf71..000000000000 --- a/arch/arm/mach-bcm2835/include/mach/uncompress.h +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Broadcom | ||
| 3 | * Copyright (C) 2003 ARM Limited | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/io.h> | ||
| 17 | #include <linux/amba/serial.h> | ||
| 18 | #include <mach/bcm2835_soc.h> | ||
| 19 | |||
| 20 | #define UART0_BASE BCM2835_DEBUG_PHYS | ||
| 21 | |||
| 22 | #define BCM2835_UART_DR IOMEM(UART0_BASE + UART01x_DR) | ||
| 23 | #define BCM2835_UART_FR IOMEM(UART0_BASE + UART01x_FR) | ||
| 24 | #define BCM2835_UART_CR IOMEM(UART0_BASE + UART011_CR) | ||
| 25 | |||
| 26 | static inline void putc(int c) | ||
| 27 | { | ||
| 28 | while (__raw_readl(BCM2835_UART_FR) & UART01x_FR_TXFF) | ||
| 29 | barrier(); | ||
| 30 | |||
| 31 | __raw_writel(c, BCM2835_UART_DR); | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline void flush(void) | ||
| 35 | { | ||
| 36 | int fr; | ||
| 37 | |||
| 38 | do { | ||
| 39 | fr = __raw_readl(BCM2835_UART_FR); | ||
| 40 | barrier(); | ||
| 41 | } while ((fr & (UART011_FR_TXFE | UART01x_FR_BUSY)) != UART011_FR_TXFE); | ||
| 42 | } | ||
| 43 | |||
| 44 | #define arch_decomp_setup() | ||
