summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcm283x/include/mach
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-bcm283x/include/mach')
-rw-r--r--arch/arm/mach-bcm283x/include/mach/core.h23
-rw-r--r--arch/arm/mach-bcm283x/include/mach/debug_ll.h26
-rw-r--r--arch/arm/mach-bcm283x/include/mach/mbox.h4
-rw-r--r--arch/arm/mach-bcm283x/include/mach/platform.h5
4 files changed, 44 insertions, 14 deletions
diff --git a/arch/arm/mach-bcm283x/include/mach/core.h b/arch/arm/mach-bcm283x/include/mach/core.h
index a1c47f9154..c8547351a3 100644
--- a/arch/arm/mach-bcm283x/include/mach/core.h
+++ b/arch/arm/mach-bcm283x/include/mach/core.h
@@ -1,28 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2009 Carlo Caione <carlo@carlocaione.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#ifndef __BCM2835_CORE_H__
#define __BCM2835_CORE_H__
+#include <common.h>
+#include <linux/types.h>
+#include <linux/sizes.h>
+#include <asm/memory.h>
#include <mach/platform.h>
-void bcm2835_add_device_sdram(u32 size);
+static void inline bcm2835_add_device_sdram(u32 size)
+{
+ arm_add_mem_device("ram0", BCM2835_SDRAM_BASE, size);
+}
static void inline bcm2835_register_fb(void)
{
add_generic_device("bcm2835_fb", 0, NULL, 0, 0, 0, NULL);
}
+void __iomem *bcm2835_get_mmio_base_by_cpuid(void);
+
#endif
diff --git a/arch/arm/mach-bcm283x/include/mach/debug_ll.h b/arch/arm/mach-bcm283x/include/mach/debug_ll.h
index 4bfa5abc7c..fdb63b4f5a 100644
--- a/arch/arm/mach-bcm283x/include/mach/debug_ll.h
+++ b/arch/arm/mach-bcm283x/include/mach/debug_ll.h
@@ -18,6 +18,7 @@
#define __MACH_BCM2835_DEBUG_LL_H__
#include <mach/platform.h>
+#include <io.h>
#ifdef CONFIG_DEBUG_RPI1_UART
@@ -66,6 +67,31 @@ static inline void debug_ll_init(void)
debug_ll_ns16550_init(divisor);
}
+#elif defined CONFIG_DEBUG_RPI4_MINI_UART
+
+static inline uint8_t debug_ll_read_reg(int reg)
+{
+ return readb(BCM2711_MINIUART_BASE + (reg << 2));
+}
+
+static inline void debug_ll_write_reg(int reg, uint8_t val)
+{
+ writeb(val, BCM2711_MINIUART_BASE + (reg << 2));
+}
+
+#include <debug_ll/ns16550.h>
+
+static inline void debug_ll_init(void)
+{
+ /* Configured by ROM */
+}
+
+#else
+
+static inline void debug_ll_init(void)
+{
+}
+
#endif
#endif /* __MACH_BCM2835_DEBUG_LL_H__ */
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
index a9f06512bc..92cadba62c 100644
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
@@ -171,7 +171,10 @@ struct bcm2835_mbox_tag_hdr {
#define BCM2837B0_BOARD_REV_3B_PLUS 0x0d
#define BCM2837B0_BOARD_REV_3A_PLUS 0x0e
#define BCM2837B0_BOARD_REV_CM3_PLUS 0x10
+#define BCM2711_BOARD_REV_4_B 0x11
#define BCM2837B0_BOARD_REV_ZERO_2 0x12
+#define BCM2711_BOARD_REV_400 0x13
+#define BCM2711_BOARD_REV_CM4 0x14
struct bcm2835_mbox_tag_get_board_rev {
struct bcm2835_mbox_tag_hdr tag_hdr;
@@ -273,6 +276,7 @@ struct bcm2835_mbox_tag_set_power_state {
#define BCM2835_MBOX_CLOCK_ID_SDRAM 8
#define BCM2835_MBOX_CLOCK_ID_PIXEL 9
#define BCM2835_MBOX_CLOCK_ID_PWM 10
+#define BCM2835_MBOX_CLOCK_ID_EMMC2 12
struct bcm2835_mbox_tag_get_clock_rate {
struct bcm2835_mbox_tag_hdr tag_hdr;
diff --git a/arch/arm/mach-bcm283x/include/mach/platform.h b/arch/arm/mach-bcm283x/include/mach/platform.h
index 310f2463f2..b957ac8de3 100644
--- a/arch/arm/mach-bcm283x/include/mach/platform.h
+++ b/arch/arm/mach-bcm283x/include/mach/platform.h
@@ -31,9 +31,10 @@
#define BCM2835_CACHELINE_SIZE 64
#define BCM2835_PL011_BASE 0x20201000
-#define BCM2836_PL011_BASE 0x3f201000
+#define BCM2836_PL011_BASE 0x3f201000UL
#define BCM2835_MINIUART_BASE 0x20215040
-#define BCM2836_MINIUART_BASE 0x3f215040
+#define BCM2836_MINIUART_BASE 0x3f215040UL
+#define BCM2711_MINIUART_BASE 0xfe215040UL
#endif