summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/omap_generic.c
diff options
context:
space:
mode:
authorTeresa Gámez <t.gamez@phytec.de>2013-04-02 14:48:06 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-04-03 09:21:12 +0200
commitc61cc9809129d31295b9069f76368917db3523ba (patch)
tree6674f09a63e6f3a34f6b91df4edc7fc5a80c8761 /arch/arm/mach-omap/omap_generic.c
parent28ce80f53ccdae02d3b64dc6270b92f760ca4b9d (diff)
downloadbarebox-c61cc9809129d31295b9069f76368917db3523ba.tar.gz
barebox-c61cc9809129d31295b9069f76368917db3523ba.tar.xz
OMAP: Move bootsource functions
The bootsource functions are not specific to the first stage bootloader. They may also be used for detecting the bootsource to decide where to load the environment from. Also clean up includes in board files. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap/omap_generic.c')
-rw-r--r--arch/arm/mach-omap/omap_generic.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
new file mode 100644
index 0000000000..f2fd1d33af
--- /dev/null
+++ b/arch/arm/mach-omap/omap_generic.c
@@ -0,0 +1,32 @@
+/*
+ * (C) Copyright 2013 Teresa Gámez, Phytec Messtechnik GmbH
+ *
+ * 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.
+ *
+ */
+#include <common.h>
+#include <envfs.h>
+#include <init.h>
+#include <io.h>
+#include <fs.h>
+#include <linux/stat.h>
+#include <mach/generic.h>
+
+enum omap_boot_src omap_bootsrc(void)
+{
+#if defined(CONFIG_ARCH_OMAP3)
+ return omap3_bootsrc();
+#elif defined(CONFIG_ARCH_OMAP4)
+ return omap4_bootsrc();
+#elif defined(CONFIG_ARCH_AM33XX)
+ return am33xx_bootsrc();
+#endif
+}