summaryrefslogtreecommitdiffstats
path: root/sys/arm/broadcom
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-05-17 11:27:36 +0000
committerandrew <andrew@FreeBSD.org>2014-05-17 11:27:36 +0000
commitad9a51105addd4d4db64b48a123381cccb0ec1de (patch)
tree83fcd263f59bac75687fdb3eb6d581241b714140 /sys/arm/broadcom
parent3bde90fb7a8ed0d081beae48f4a718d45527ac71 (diff)
downloadFreeBSD-src-ad9a51105addd4d4db64b48a123381cccb0ec1de.zip
FreeBSD-src-ad9a51105addd4d4db64b48a123381cccb0ec1de.tar.gz
Add the start of the ARM platform code. This is based on the PowerPC
platform code, it is expected these will be merged in the future when the ARM code is more complete. Until more boards can be tested only use this with the Raspberry Pi and rrename the functions on the other SoCs. Reviewed by: ian@
Diffstat (limited to 'sys/arm/broadcom')
-rw-r--r--sys/arm/broadcom/bcm2835/bcm2835_machdep.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
index 0f13a79..0571c55 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
@@ -54,31 +54,24 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
+#include <machine/platform.h>
+#include <machine/platformvar.h>
#include <dev/fdt/fdt_common.h>
#include <arm/broadcom/bcm2835/bcm2835_wdog.h>
-vm_offset_t
-initarm_lastaddr(void)
-{
-
- return (arm_devmap_lastaddr());
-}
+#include "platform_if.h"
-void
-initarm_early_init(void)
+static vm_offset_t
+bcm2835_lastaddr(platform_t plat)
{
+ return (arm_devmap_lastaddr());
}
-void
-initarm_gpio_init(void)
-{
-}
-
-void
-initarm_late_init(void)
+static void
+bcm2835_late_init(platform_t plat)
{
phandle_t system;
pcell_t cells[2];
@@ -101,8 +94,8 @@ initarm_late_init(void)
* All on-chip peripherals exist in a 16MB range starting at 0x20000000.
* Map the entire range using 1MB section mappings.
*/
-int
-initarm_devmap_init(void)
+static int
+bcm2835_devmap_init(platform_t plat)
{
arm_devmap_add_entry(0x20000000, 0x01000000);
@@ -129,4 +122,13 @@ cpu_reset()
bcmwd_watchdog_reset();
while (1);
}
+static platform_method_t bcm2835_methods[] = {
+ PLATFORMMETHOD(platform_devmap_init, bcm2835_devmap_init),
+ PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr),
+ PLATFORMMETHOD(platform_late_init, bcm2835_late_init),
+
+ PLATFORMMETHOD_END,
+};
+
+FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b");
OpenPOWER on IntegriCloud