From c61cc9809129d31295b9069f76368917db3523ba Mon Sep 17 00:00:00 2001 From: Teresa Gámez Date: Tue, 2 Apr 2013 14:48:06 +0200 Subject: OMAP: Move bootsource functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Sascha Hauer --- arch/arm/mach-omap/omap_generic.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 arch/arm/mach-omap/omap_generic.c (limited to 'arch/arm/mach-omap/omap_generic.c') 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 +#include +#include +#include +#include +#include +#include + +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 +} -- cgit v1.2.3