diff options
| -rw-r--r-- | Documentation/devicetree/bindings/arm/bcm2835.txt | 8 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/vendor-prefixes.txt | 1 | ||||
| -rw-r--r-- | arch/arm/Kconfig | 17 | ||||
| -rw-r--r-- | arch/arm/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/boot/dts/bcm2835-rpi-b.dts | 12 | ||||
| -rw-r--r-- | arch/arm/boot/dts/bcm2835.dtsi | 17 | ||||
| -rw-r--r-- | arch/arm/configs/bcm2835_defconfig | 95 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/Makefile.boot | 5 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/bcm2835.c | 77 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h | 29 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/debug-macro.S | 21 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/timex.h | 26 | ||||
| -rw-r--r-- | arch/arm/mach-bcm2835/include/mach/uncompress.h | 45 |
14 files changed, 355 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/arm/bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm2835.txt new file mode 100644 index 000000000000..ac683480c486 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm2835.txt | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | Broadcom BCM2835 device tree bindings | ||
| 2 | ------------------------------------------- | ||
| 3 | |||
| 4 | Boards with the BCM2835 SoC shall have the following properties: | ||
| 5 | |||
| 6 | Required root node property: | ||
| 7 | |||
| 8 | compatible = "brcm,bcm2835"; | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index db4d3af3643c..4f293e5571f0 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
| @@ -10,6 +10,7 @@ apm Applied Micro Circuits Corporation (APM) | |||
| 10 | arm ARM Ltd. | 10 | arm ARM Ltd. |
| 11 | atmel Atmel Corporation | 11 | atmel Atmel Corporation |
| 12 | bosch Bosch Sensortec GmbH | 12 | bosch Bosch Sensortec GmbH |
| 13 | brcm Broadcom Corporation | ||
| 13 | cavium Cavium, Inc. | 14 | cavium Cavium, Inc. |
| 14 | chrp Common Hardware Reference Platform | 15 | chrp Common Hardware Reference Platform |
| 15 | cortina Cortina Systems, Inc. | 16 | cortina Cortina Systems, Inc. |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2f88d8d97701..6524497609fa 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -350,6 +350,23 @@ config ARCH_AT91 | |||
| 350 | This enables support for systems based on Atmel | 350 | This enables support for systems based on Atmel |
| 351 | AT91RM9200 and AT91SAM9* processors. | 351 | AT91RM9200 and AT91SAM9* processors. |
| 352 | 352 | ||
| 353 | config ARCH_BCM2835 | ||
| 354 | bool "Broadcom BCM2835 family" | ||
| 355 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
| 356 | select ARM_AMBA | ||
| 357 | select ARM_ERRATA_411920 | ||
| 358 | select ARM_TIMER_SP804 | ||
| 359 | select CLKDEV_LOOKUP | ||
| 360 | select COMMON_CLK | ||
| 361 | select CPU_V6 | ||
| 362 | select GENERIC_CLOCKEVENTS | ||
| 363 | select MULTI_IRQ_HANDLER | ||
| 364 | select SPARSE_IRQ | ||
| 365 | select USE_OF | ||
| 366 | help | ||
| 367 | This enables support for the Broadcom BCM2835 SoC. This SoC is | ||
| 368 | use in the Raspberry Pi, and Roku 2 devices. | ||
| 369 | |||
| 353 | config ARCH_BCMRING | 370 | config ARCH_BCMRING |
| 354 | bool "Broadcom BCMRING" | 371 | bool "Broadcom BCMRING" |
| 355 | depends on MMU | 372 | depends on MMU |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 30eae87ead6d..17b0d5fc0c84 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -136,6 +136,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 | |||
| 136 | # Machine directory name. This list is sorted alphanumerically | 136 | # Machine directory name. This list is sorted alphanumerically |
| 137 | # by CONFIG_* macro name. | 137 | # by CONFIG_* macro name. |
| 138 | machine-$(CONFIG_ARCH_AT91) := at91 | 138 | machine-$(CONFIG_ARCH_AT91) := at91 |
| 139 | machine-$(CONFIG_ARCH_BCM2835) := bcm2835 | ||
| 139 | machine-$(CONFIG_ARCH_BCMRING) := bcmring | 140 | machine-$(CONFIG_ARCH_BCMRING) := bcmring |
| 140 | machine-$(CONFIG_ARCH_CLPS711X) := clps711x | 141 | machine-$(CONFIG_ARCH_CLPS711X) := clps711x |
| 141 | machine-$(CONFIG_ARCH_CNS3XXX) := cns3xxx | 142 | machine-$(CONFIG_ARCH_CNS3XXX) := cns3xxx |
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts new file mode 100644 index 000000000000..7dd860f83f96 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | /memreserve/ 0x0c000000 0x04000000; | ||
| 3 | /include/ "bcm2835.dtsi" | ||
| 4 | |||
| 5 | / { | ||
| 6 | compatible = "raspberrypi,model-b", "brcm,bcm2835"; | ||
| 7 | model = "Raspberry Pi Model B"; | ||
| 8 | |||
| 9 | memory { | ||
| 10 | reg = <0 0x10000000>; | ||
| 11 | }; | ||
| 12 | }; | ||
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi new file mode 100644 index 000000000000..a31cb40ef684 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835.dtsi | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /include/ "skeleton.dtsi" | ||
| 2 | |||
| 3 | / { | ||
| 4 | compatible = "brcm,bcm2835"; | ||
| 5 | model = "BCM2835"; | ||
| 6 | |||
| 7 | chosen { | ||
| 8 | bootargs = "earlyprintk"; | ||
| 9 | }; | ||
| 10 | |||
| 11 | soc { | ||
| 12 | compatible = "simple-bus"; | ||
| 13 | #address-cells = <1>; | ||
| 14 | #size-cells = <1>; | ||
| 15 | ranges = <0x7e000000 0x20000000 0x02000000>; | ||
| 16 | }; | ||
| 17 | }; | ||
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig new file mode 100644 index 000000000000..7aea70253c63 --- /dev/null +++ b/arch/arm/configs/bcm2835_defconfig | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
| 3 | CONFIG_SYSVIPC=y | ||
| 4 | CONFIG_BSD_PROCESS_ACCT=y | ||
| 5 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
| 6 | CONFIG_FHANDLE=y | ||
| 7 | CONFIG_NO_HZ=y | ||
| 8 | CONFIG_HIGH_RES_TIMERS=y | ||
| 9 | CONFIG_LOG_BUF_SHIFT=18 | ||
| 10 | CONFIG_CGROUP_FREEZER=y | ||
| 11 | CONFIG_CGROUP_DEVICE=y | ||
| 12 | CONFIG_CPUSETS=y | ||
| 13 | CONFIG_CGROUP_CPUACCT=y | ||
| 14 | CONFIG_RESOURCE_COUNTERS=y | ||
| 15 | CONFIG_CGROUP_PERF=y | ||
| 16 | CONFIG_CFS_BANDWIDTH=y | ||
| 17 | CONFIG_RT_GROUP_SCHED=y | ||
| 18 | CONFIG_NAMESPACES=y | ||
| 19 | CONFIG_SCHED_AUTOGROUP=y | ||
| 20 | CONFIG_RELAY=y | ||
| 21 | CONFIG_BLK_DEV_INITRD=y | ||
| 22 | CONFIG_RD_BZIP2=y | ||
| 23 | CONFIG_RD_LZMA=y | ||
| 24 | CONFIG_RD_XZ=y | ||
| 25 | CONFIG_RD_LZO=y | ||
| 26 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 27 | CONFIG_KALLSYMS_ALL=y | ||
| 28 | CONFIG_EMBEDDED=y | ||
| 29 | # CONFIG_COMPAT_BRK is not set | ||
| 30 | CONFIG_PROFILING=y | ||
| 31 | CONFIG_OPROFILE=y | ||
| 32 | CONFIG_JUMP_LABEL=y | ||
| 33 | # CONFIG_BLOCK is not set | ||
| 34 | CONFIG_ARCH_BCM2835=y | ||
| 35 | CONFIG_PREEMPT_VOLUNTARY=y | ||
| 36 | CONFIG_AEABI=y | ||
| 37 | CONFIG_COMPACTION=y | ||
| 38 | CONFIG_KSM=y | ||
| 39 | CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 | ||
| 40 | CONFIG_CLEANCACHE=y | ||
| 41 | CONFIG_SECCOMP=y | ||
| 42 | CONFIG_CC_STACKPROTECTOR=y | ||
| 43 | CONFIG_KEXEC=y | ||
| 44 | CONFIG_CRASH_DUMP=y | ||
| 45 | CONFIG_VFP=y | ||
| 46 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
| 47 | # CONFIG_SUSPEND is not set | ||
| 48 | CONFIG_DEVTMPFS=y | ||
| 49 | CONFIG_DEVTMPFS_MOUNT=y | ||
| 50 | # CONFIG_STANDALONE is not set | ||
| 51 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 52 | # CONFIG_INPUT_KEYBOARD is not set | ||
| 53 | # CONFIG_INPUT_MOUSE is not set | ||
| 54 | # CONFIG_SERIO is not set | ||
| 55 | # CONFIG_VT is not set | ||
| 56 | # CONFIG_UNIX98_PTYS is not set | ||
| 57 | # CONFIG_LEGACY_PTYS is not set | ||
| 58 | # CONFIG_DEVKMEM is not set | ||
| 59 | CONFIG_SERIAL_AMBA_PL011=y | ||
| 60 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
| 61 | CONFIG_TTY_PRINTK=y | ||
| 62 | # CONFIG_HW_RANDOM is not set | ||
| 63 | # CONFIG_HWMON is not set | ||
| 64 | # CONFIG_USB_SUPPORT is not set | ||
| 65 | # CONFIG_IOMMU_SUPPORT is not set | ||
| 66 | # CONFIG_FILE_LOCKING is not set | ||
| 67 | # CONFIG_DNOTIFY is not set | ||
| 68 | # CONFIG_INOTIFY_USER is not set | ||
| 69 | # CONFIG_PROC_FS is not set | ||
| 70 | # CONFIG_SYSFS is not set | ||
| 71 | # CONFIG_MISC_FILESYSTEMS is not set | ||
| 72 | CONFIG_PRINTK_TIME=y | ||
| 73 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
| 74 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
| 75 | CONFIG_UNUSED_SYMBOLS=y | ||
| 76 | CONFIG_LOCKUP_DETECTOR=y | ||
| 77 | CONFIG_DEBUG_INFO=y | ||
| 78 | CONFIG_DEBUG_MEMORY_INIT=y | ||
| 79 | CONFIG_BOOT_PRINTK_DELAY=y | ||
| 80 | CONFIG_SCHED_TRACER=y | ||
| 81 | CONFIG_STACK_TRACER=y | ||
| 82 | CONFIG_FUNCTION_PROFILER=y | ||
| 83 | CONFIG_DYNAMIC_DEBUG=y | ||
| 84 | CONFIG_KGDB=y | ||
| 85 | CONFIG_KGDB_KDB=y | ||
| 86 | CONFIG_TEST_KSTRTOX=y | ||
| 87 | CONFIG_STRICT_DEVMEM=y | ||
| 88 | CONFIG_DEBUG_LL=y | ||
| 89 | CONFIG_EARLY_PRINTK=y | ||
| 90 | # CONFIG_XZ_DEC_X86 is not set | ||
| 91 | # CONFIG_XZ_DEC_POWERPC is not set | ||
| 92 | # CONFIG_XZ_DEC_IA64 is not set | ||
| 93 | # CONFIG_XZ_DEC_ARM is not set | ||
| 94 | # CONFIG_XZ_DEC_ARMTHUMB is not set | ||
| 95 | # CONFIG_XZ_DEC_SPARC is not set | ||
diff --git a/arch/arm/mach-bcm2835/Makefile b/arch/arm/mach-bcm2835/Makefile new file mode 100644 index 000000000000..4c3892fe02c3 --- /dev/null +++ b/arch/arm/mach-bcm2835/Makefile | |||
| @@ -0,0 +1 @@ | |||
| obj-y += bcm2835.o | |||
diff --git a/arch/arm/mach-bcm2835/Makefile.boot b/arch/arm/mach-bcm2835/Makefile.boot new file mode 100644 index 000000000000..0831fd1764e7 --- /dev/null +++ b/arch/arm/mach-bcm2835/Makefile.boot | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | zreladdr-y := 0x00008000 | ||
| 2 | params_phys-y := 0x00000100 | ||
| 3 | initrd_phys-y := 0x00800000 | ||
| 4 | |||
| 5 | dtb-y += bcm2835-rpi-b.dtb | ||
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c new file mode 100644 index 000000000000..f6b36b4b5921 --- /dev/null +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Broadcom | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/of_platform.h> | ||
| 17 | |||
| 18 | #include <asm/mach/arch.h> | ||
| 19 | #include <asm/mach/map.h> | ||
| 20 | #include <asm/mach/time.h> | ||
| 21 | #include <asm/exception.h> | ||
| 22 | |||
| 23 | #include <mach/bcm2835_soc.h> | ||
| 24 | |||
| 25 | static struct map_desc io_map __initdata = { | ||
| 26 | .virtual = BCM2835_PERIPH_VIRT, | ||
| 27 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), | ||
| 28 | .length = BCM2835_PERIPH_SIZE, | ||
| 29 | .type = MT_DEVICE | ||
| 30 | }; | ||
| 31 | |||
| 32 | void __init bcm2835_map_io(void) | ||
| 33 | { | ||
| 34 | iotable_init(&io_map, 1); | ||
| 35 | } | ||
| 36 | |||
| 37 | void __init bcm2835_init_irq(void) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | asmlinkage void __exception_irq_entry bcm2835_handle_irq(struct pt_regs *regs) | ||
| 42 | { | ||
| 43 | } | ||
| 44 | |||
| 45 | void __init bcm2835_init(void) | ||
| 46 | { | ||
| 47 | int ret; | ||
| 48 | |||
| 49 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, | ||
| 50 | NULL); | ||
| 51 | if (ret) { | ||
| 52 | pr_err("of_platform_populate failed: %d\n", ret); | ||
| 53 | BUG(); | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | static void __init bcm2835_timer_init(void) | ||
| 58 | { | ||
| 59 | } | ||
| 60 | |||
| 61 | struct sys_timer bcm2835_timer = { | ||
| 62 | .init = bcm2835_timer_init | ||
| 63 | }; | ||
| 64 | |||
| 65 | static const char * const bcm2835_compat[] = { | ||
| 66 | "brcm,bcm2835", | ||
| 67 | NULL | ||
| 68 | }; | ||
| 69 | |||
| 70 | DT_MACHINE_START(BCM2835, "BCM2835") | ||
| 71 | .map_io = bcm2835_map_io, | ||
| 72 | .init_irq = bcm2835_init_irq, | ||
| 73 | .handle_irq = bcm2835_handle_irq, | ||
| 74 | .init_machine = bcm2835_init, | ||
| 75 | .timer = &bcm2835_timer, | ||
| 76 | .dt_compat = bcm2835_compat | ||
| 77 | MACHINE_END | ||
diff --git a/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h b/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h new file mode 100644 index 000000000000..d4dfcf7a9cda --- /dev/null +++ b/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h | |||
| @@ -0,0 +1,29 @@ | |||
| 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/debug-macro.S b/arch/arm/mach-bcm2835/include/mach/debug-macro.S new file mode 100644 index 000000000000..8a161e44ae28 --- /dev/null +++ b/arch/arm/mach-bcm2835/include/mach/debug-macro.S | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Debugging macro include header | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Broadcom | ||
| 5 | * Copyright (C) 1994-1999 Russell King | ||
| 6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <mach/bcm2835_soc.h> | ||
| 15 | |||
| 16 | .macro addruart, rp, rv, tmp | ||
| 17 | ldr \rp, =BCM2835_DEBUG_PHYS | ||
| 18 | ldr \rv, =BCM2835_DEBUG_VIRT | ||
| 19 | .endm | ||
| 20 | |||
| 21 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-bcm2835/include/mach/timex.h b/arch/arm/mach-bcm2835/include/mach/timex.h new file mode 100644 index 000000000000..6d021e136ae3 --- /dev/null +++ b/arch/arm/mach-bcm2835/include/mach/timex.h | |||
| @@ -0,0 +1,26 @@ | |||
| 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 new file mode 100644 index 000000000000..cc46dcc72377 --- /dev/null +++ b/arch/arm/mach-bcm2835/include/mach/uncompress.h | |||
| @@ -0,0 +1,45 @@ | |||
| 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() | ||
| 45 | #define arch_decomp_wdog() | ||
