aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2014-01-05 16:45:34 +0000
committerIan Lepore <ian@FreeBSD.org>2014-01-05 16:45:34 +0000
commitcaca500f021bdc486718c70e33da48a34a681dc1 (patch)
tree912595c4505067e1d48c3a8fd894a32820fa1e52 /sys
parent20dcbdb6be8b4c294bdfe75d1d279b29b524be35 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/tegra/tegra2_machdep.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/sys/arm/tegra/tegra2_machdep.c b/sys/arm/tegra/tegra2_machdep.c
index 8904250fb375..bd639aec1e2d 100644
--- a/sys/arm/tegra/tegra2_machdep.c
+++ b/sys/arm/tegra/tegra2_machdep.c
@@ -50,17 +50,12 @@ __FBSDID("$FreeBSD$");
#include <dev/fdt/fdt_common.h>
-/* FIXME move to tegrareg.h */
-#define TEGRA2_BASE 0xE0000000 /* KVM base for peripherials */
-#define TEGRA2_UARTA_VA_BASE 0xE0006000
-#define TEGRA2_UARTA_PA_BASE 0x70006000
-
#define TEGRA2_CLK_RST_PA_BASE 0x60006000
#define TEGRA2_CLK_RST_OSC_FREQ_DET_REG 0x58
#define TEGRA2_CLK_RST_OSC_FREQ_DET_STAT_REG 0x5C
-#define OSC_FREQ_DET_TRIG (1<<31)
-#define OSC_FREQ_DET_BUSY (1<<31)
+#define OSC_FREQ_DET_TRIG (1U<<31)
+#define OSC_FREQ_DET_BUSY (1U<<31)
#if 0
static int
@@ -107,15 +102,12 @@ vm_offset_t
initarm_lastaddr(void)
{
- return (fdt_immr_va);
+ return (arm_devmap_lastaddr());
}
void
initarm_early_init(void)
{
-
- if (fdt_immr_addr(TEGRA2_BASE) != 0) /* FIXME ???? */
- while (1);
}
void
@@ -128,26 +120,16 @@ initarm_late_init(void)
{
}
-#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */
-static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
- { 0, 0, 0, 0, 0, }
-};
-
/*
- * Construct pmap_devmap[] with DT-derived config data.
+ * Add a static mapping for the register range that includes the debug uart.
+ * It's not clear this is needed, but the original code established this mapping
+ * before conversion to the newer arm_devmap_add_entry() routine.
*/
int
initarm_devmap_init(void)
{
- int i = 0;
- fdt_devmap[i].pd_va = 0xe0000000;
- fdt_devmap[i].pd_pa = 0x70000000;
- fdt_devmap[i].pd_size = 0x100000;
- fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
- fdt_devmap[i].pd_cache = PTE_NOCACHE;
- i++;
- arm_devmap_register_table(&fdt_devmap[0]);
+ arm_devmap_add_entry(0x70000000, 0x00100000);
return (0);
}