summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/arm/conf/EFIKA_MX1
-rw-r--r--sys/arm/conf/IMX531
-rw-r--r--sys/arm/conf/IMX61
-rw-r--r--sys/arm/freescale/imx/imx51_machdep.c37
-rw-r--r--sys/arm/freescale/imx/imx53_machdep.c37
-rw-r--r--sys/arm/freescale/imx/imx6_machdep.c38
6 files changed, 65 insertions, 50 deletions
diff --git a/sys/arm/conf/EFIKA_MX b/sys/arm/conf/EFIKA_MX
index b6351c8..459cd79 100644
--- a/sys/arm/conf/EFIKA_MX
+++ b/sys/arm/conf/EFIKA_MX
@@ -59,6 +59,7 @@ options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
+options PLATFORM
options INCLUDE_CONFIG_FILE # Include this file in kernel
options VFP # Enable floating point hardware support
diff --git a/sys/arm/conf/IMX53 b/sys/arm/conf/IMX53
index a2db13b..12cd4cf 100644
--- a/sys/arm/conf/IMX53
+++ b/sys/arm/conf/IMX53
@@ -56,6 +56,7 @@ options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
+options PLATFORM
options INCLUDE_CONFIG_FILE # Include this file in kernel
options VFP # Enable floating point hardware support
diff --git a/sys/arm/conf/IMX6 b/sys/arm/conf/IMX6
index 3280784..bdaab26 100644
--- a/sys/arm/conf/IMX6
+++ b/sys/arm/conf/IMX6
@@ -53,6 +53,7 @@ options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options INCLUDE_CONFIG_FILE # Include this file in kernel
+options PLATFORM
options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
options VFP # Enable floating point hardware support
options SMP # Enable multiple cores
diff --git a/sys/arm/freescale/imx/imx51_machdep.c b/sys/arm/freescale/imx/imx51_machdep.c
index 8ab6541..5d8f380 100644
--- a/sys/arm/freescale/imx/imx51_machdep.c
+++ b/sys/arm/freescale/imx/imx51_machdep.c
@@ -39,36 +39,28 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
-#include <machine/platform.h>
+#include <machine/platformvar.h>
#include <arm/freescale/imx/imx_machdep.h>
-vm_offset_t
-platform_lastaddr(void)
+#include "platform_if.h"
+
+static vm_offset_t
+imx51_lastaddr(platform_t plat)
{
return (arm_devmap_lastaddr());
}
-void
-platform_probe_and_attach(void)
+static int
+imx51_attach(platform_t plat)
{
/* XXX - Get rid of this stuff soon. */
boothowto |= RB_VERBOSE|RB_MULTIPLE;
bootverbose = 1;
-}
-
-void
-platform_gpio_init(void)
-{
-
-}
-
-void
-platform_late_init(void)
-{
+ return (0);
}
/*
@@ -78,8 +70,8 @@ platform_late_init(void)
*
* Notably missing are entries for GPU, IPU, in general anything video related.
*/
-int
-platform_devmap_init(void)
+static int
+imx51_devmap_init(platform_t plat)
{
arm_devmap_add_entry(0x70000000, 0x00100000);
@@ -101,3 +93,12 @@ u_int imx_soc_type()
return (IMXSOC_51);
}
+static platform_method_t imx51_methods[] = {
+ PLATFORMMETHOD(platform_attach, imx51_attach),
+ PLATFORMMETHOD(platform_devmap_init, imx51_devmap_init),
+ PLATFORMMETHOD(platform_lastaddr, imx51_lastaddr),
+
+ PLATFORMMETHOD_END,
+};
+
+FDT_PLATFORM_DEF(imx51, "i.MX51", 0, "fsl,imx51");
diff --git a/sys/arm/freescale/imx/imx53_machdep.c b/sys/arm/freescale/imx/imx53_machdep.c
index ebf09d9..92b59e4 100644
--- a/sys/arm/freescale/imx/imx53_machdep.c
+++ b/sys/arm/freescale/imx/imx53_machdep.c
@@ -39,36 +39,28 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
-#include <machine/platform.h>
+#include <machine/platformvar.h>
#include <arm/freescale/imx/imx_machdep.h>
-vm_offset_t
-platform_lastaddr(void)
+#include "platform_if.h"
+
+static vm_offset_t
+imx53_lastaddr(platform_t plat)
{
return (arm_devmap_lastaddr());
}
-void
-platform_probe_and_attach(void)
+static int
+imx53_attach(platform_t plat)
{
/* XXX - Get rid of this stuff soon. */
boothowto |= RB_VERBOSE|RB_MULTIPLE;
bootverbose = 1;
-}
-
-void
-platform_gpio_init(void)
-{
-
-}
-
-void
-platform_late_init(void)
-{
+ return (0);
}
/*
@@ -78,8 +70,8 @@ platform_late_init(void)
*
* Notably missing are entries for GPU, IPU, in general anything video related.
*/
-int
-platform_devmap_init(void)
+static int
+imx53_devmap_init(platform_t plat)
{
arm_devmap_add_entry(0x50000000, 0x00100000);
@@ -101,4 +93,13 @@ u_int imx_soc_type()
return (IMXSOC_53);
}
+static platform_method_t imx53_methods[] = {
+ PLATFORMMETHOD(platform_attach, imx53_attach),
+ PLATFORMMETHOD(platform_devmap_init, imx53_devmap_init),
+ PLATFORMMETHOD(platform_lastaddr, imx53_lastaddr),
+
+ PLATFORMMETHOD_END,
+};
+
+FDT_PLATFORM_DEF(imx53, "i.MX53", 0, "fsl,imx53");
diff --git a/sys/arm/freescale/imx/imx6_machdep.c b/sys/arm/freescale/imx/imx6_machdep.c
index 510a09b..2322cff 100644
--- a/sys/arm/freescale/imx/imx6_machdep.c
+++ b/sys/arm/freescale/imx/imx6_machdep.c
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
#include <machine/devmap.h>
#include <machine/intr.h>
#include <machine/machdep.h>
-#include <machine/platform.h>
+#include <machine/platformvar.h>
#include <arm/arm/mpcore_timervar.h>
#include <arm/freescale/imx/imx6_anatopreg.h>
@@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$");
#include <dev/fdt/fdt_common.h>
#include <dev/ofw/openfirm.h>
+#include "platform_if.h"
+
struct fdt_fixup_entry fdt_fixup_table[] = {
{ NULL, NULL }
};
@@ -90,29 +92,25 @@ fdt_pic_decode_t fdt_pic_table[] = {
NULL
};
-vm_offset_t
-platform_lastaddr(void)
+static vm_offset_t
+imx6_lastaddr(platform_t plat)
{
return (arm_devmap_lastaddr());
}
-void
-platform_probe_and_attach(void)
+static int
+imx6_attach(platform_t plat)
{
/* Inform the MPCore timer driver that its clock is variable. */
arm_tmr_change_frequency(ARM_TMR_FREQUENCY_VARIES);
-}
-
-void
-platform_gpio_init(void)
-{
+ return (0);
}
-void
-platform_late_init(void)
+static void
+imx6_late_init(platform_t plat)
{
/* Cache the gpio1 node handle for imx6_decode_fdt() workaround code. */
@@ -136,8 +134,8 @@ platform_late_init(void)
* static map some of that area. Be careful with other things in that area such
* as OCRAM that probably shouldn't be mapped as PTE_DEVICE memory.
*/
-int
-platform_devmap_init(void)
+static int
+imx6_devmap_init(platform_t plat)
{
const uint32_t IMX6_ARMMP_PHYS = 0x00a00000;
const uint32_t IMX6_ARMMP_SIZE = 0x00100000;
@@ -271,3 +269,15 @@ imx6_early_putc(int c)
early_putc_t *early_putc = imx6_early_putc;
#endif
+static platform_method_t imx6_methods[] = {
+ PLATFORMMETHOD(platform_attach, imx6_attach),
+ PLATFORMMETHOD(platform_lastaddr, imx6_lastaddr),
+ PLATFORMMETHOD(platform_devmap_init, imx6_devmap_init),
+ PLATFORMMETHOD(platform_late_init, imx6_late_init),
+
+ PLATFORMMETHOD_END,
+};
+
+FDT_PLATFORM_DEF2(imx6, imx6s, "i.MX6 Solo", 0, "fsl,imx6s");
+FDT_PLATFORM_DEF2(imx6, imx6d, "i.MX6 Dual", 0, "fsl,imx6d");
+FDT_PLATFORM_DEF2(imx6, imx6q, "i.MX6 Quad", 0, "fsl,imx6q");
OpenPOWER on IntegriCloud