diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-20 20:10:51 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-20 20:10:51 -0400 |
commit | 3aec092eed5d8d2b19a62b0aeed3acea9471099a (patch) | |
tree | eb63293fc01612d28474464ec98ac082d208027b /arch | |
parent | aa817b2e68af8753bb95777255e22164610342c7 (diff) | |
parent | f680f25c635a1a4327bef34fcbe1e9e3777b546c (diff) |
Merge tag 'rpi-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi into next/soc
ARM: add basic BCM2835 SoC and Raspberry Pi board support
The BCM2835 is an ARM SoC from Broadcom. This patch adds very basic
support for this SoC; enough to boot the system into an initrd with
UART console, interrupt controller, timers, and a stub clock driver.
Also provided is a similarly basic device tree for the Raspberry Pi
Model B board.
This series was written by Simon Arlott, Chris Boot, and Dom Cobley
downstream, with reference to a Broadcom tree, and modified for upstream
and submitted by Stephen Warren.
* tag 'rpi-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi:
MAINTAINERS: add an entry for the BCM2835 ARM sub-architecture
ARM: bcm2835: instantiate console UART
ARM: bcm2835: add stub clock driver
ARM: bcm2835: add system timer
ARM: bcm2835: add interrupt controller driver
ARM: add infra-structure for BCM2835 and Raspberry Pi
Diffstat (limited to 'arch')
-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 | 39 | ||||
-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 | 64 | ||||
-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 |
12 files changed, 355 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e5a4438c333b..171f184b089d 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..0b619398532c --- /dev/null +++ b/arch/arm/boot/dts/bcm2835.dtsi | |||
@@ -0,0 +1,39 @@ | |||
1 | /include/ "skeleton.dtsi" | ||
2 | |||
3 | / { | ||
4 | compatible = "brcm,bcm2835"; | ||
5 | model = "BCM2835"; | ||
6 | interrupt-parent = <&intc>; | ||
7 | |||
8 | chosen { | ||
9 | bootargs = "earlyprintk console=ttyAMA0"; | ||
10 | }; | ||
11 | |||
12 | soc { | ||
13 | compatible = "simple-bus"; | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <1>; | ||
16 | ranges = <0x7e000000 0x20000000 0x02000000>; | ||
17 | |||
18 | timer { | ||
19 | compatible = "brcm,bcm2835-system-timer"; | ||
20 | reg = <0x7e003000 0x1000>; | ||
21 | interrupts = <1 0>, <1 1>, <1 2>, <1 3>; | ||
22 | clock-frequency = <1000000>; | ||
23 | }; | ||
24 | |||
25 | intc: interrupt-controller { | ||
26 | compatible = "brcm,bcm2835-armctrl-ic"; | ||
27 | reg = <0x7e00b200 0x200>; | ||
28 | interrupt-controller; | ||
29 | #interrupt-cells = <2>; | ||
30 | }; | ||
31 | |||
32 | uart@20201000 { | ||
33 | compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; | ||
34 | reg = <0x7e201000 0x1000>; | ||
35 | interrupts = <2 25>; | ||
36 | clock-frequency = <3000000>; | ||
37 | }; | ||
38 | }; | ||
39 | }; | ||
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..f6fea4933571 --- /dev/null +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -0,0 +1,64 @@ | |||
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/irqchip/bcm2835.h> | ||
17 | #include <linux/of_platform.h> | ||
18 | #include <linux/bcm2835_timer.h> | ||
19 | #include <linux/clk/bcm2835.h> | ||
20 | |||
21 | #include <asm/mach/arch.h> | ||
22 | #include <asm/mach/map.h> | ||
23 | |||
24 | #include <mach/bcm2835_soc.h> | ||
25 | |||
26 | static struct map_desc io_map __initdata = { | ||
27 | .virtual = BCM2835_PERIPH_VIRT, | ||
28 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), | ||
29 | .length = BCM2835_PERIPH_SIZE, | ||
30 | .type = MT_DEVICE | ||
31 | }; | ||
32 | |||
33 | void __init bcm2835_map_io(void) | ||
34 | { | ||
35 | iotable_init(&io_map, 1); | ||
36 | } | ||
37 | |||
38 | void __init bcm2835_init(void) | ||
39 | { | ||
40 | int ret; | ||
41 | |||
42 | bcm2835_init_clocks(); | ||
43 | |||
44 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, | ||
45 | NULL); | ||
46 | if (ret) { | ||
47 | pr_err("of_platform_populate failed: %d\n", ret); | ||
48 | BUG(); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | static const char * const bcm2835_compat[] = { | ||
53 | "brcm,bcm2835", | ||
54 | NULL | ||
55 | }; | ||
56 | |||
57 | DT_MACHINE_START(BCM2835, "BCM2835") | ||
58 | .map_io = bcm2835_map_io, | ||
59 | .init_irq = bcm2835_init_irq, | ||
60 | .handle_irq = bcm2835_handle_irq, | ||
61 | .init_machine = bcm2835_init, | ||
62 | .timer = &bcm2835_timer, | ||
63 | .dt_compat = bcm2835_compat | ||
64 | 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() | ||