diff options
author | G S Niteesh Babu <niteesh.gs@gmail.com> | 2021-03-13 16:32:02 +0530 |
---|---|---|
committer | Christian Mauderer <oss@c-mauderer.de> | 2021-03-21 12:30:48 +0100 |
commit | 7589f1e01aed164abc89c5ff6b23c88127c5676b (patch) | |
tree | 52f7c0f79b78b29c74ca748d7fe9a46042373977 /bsps/arm/beagle/start/bspstart.c | |
parent | bsp/beagle: Import Beagle pinmux from FreeBSD (diff) | |
download | rtems-7589f1e01aed164abc89c5ff6b23c88127c5676b.tar.bz2 |
bsps/beagle: Added SOC detection using FDT
Detects the SOC type using FDT and also replaces the ti_cpuid.h
header in FreeBSD with custom one.
Diffstat (limited to 'bsps/arm/beagle/start/bspstart.c')
-rw-r--r-- | bsps/arm/beagle/start/bspstart.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/bsps/arm/beagle/start/bspstart.c b/bsps/arm/beagle/start/bspstart.c index 3c05f2a9cd..0a6f1b4a64 100644 --- a/bsps/arm/beagle/start/bspstart.c +++ b/bsps/arm/beagle/start/bspstart.c @@ -19,17 +19,28 @@ #include <bsp/linker-symbols.h> #include <bsp/i2c.h> #include <rtems/sysinit.h> +#include "bsp-soc-detect.h" #include "bspdebug.h" void bsp_start(void) { -#if IS_DM3730 - const char* type = "dm3730-based"; -#endif -#if IS_AM335X - const char* type = "am335x-based"; -#endif + const char *type; + + bsp_soc_detect(); + + switch (ti_chip()) { + case CHIP_AM335X: + type = "am335x-based"; + break; + case CHIP_OMAP_3: + type = "dm3730-based"; + break; + default: + type = "Unknown SOC"; + break; + } + bsp_interrupt_initialize(); printk("\nRTEMS Beagleboard: %s\n", type); printk(" ARM Debug: 0x%08x\n", (intptr_t) bbb_arm_debug_registers()); |