49 lines
1.3 KiB
C

/*
* Copyright (C) 2012 TomTom International BV
* Written by Domenico Andreoli <domenico.andreoli@tomtom.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include "mfd_feat.h"
#include <common.h>
DECLARE_GLOBAL_DATA_PTR;
#if defined(__VARIANT_STUTTGART_B1)
# define MFD_VARIANT MFD_VARIANT_STUTTGART_B1
#elif defined(__VARIANT_RENNES_B1)
# define MFD_VARIANT MFD_VARIANT_RENNES_B1
#elif defined(__VARIANT_RENNES_A1)
# define MFD_VARIANT MFD_VARIANT_RENNES_A1
#elif defined(__VARIANT_B2)
# define MFD_VARIANT MFD_VARIANT_STRASBOURG_B2
#elif defined(__VARIANT_B1)
# define MFD_VARIANT MFD_VARIANT_STRASBOURG_B1
#else
# define MFD_VARIANT MFD_VARIANT_STRASBOURG
#endif
const struct mfd_feat *mfd_lookup(const struct mfd_feat *feat)
{
for (; feat; feat++) {
if (feat->mach && feat->mach != gd->bd->bi_arch_number)
continue;
if (feat->rev && feat->rev != MFD_VARIANT)
continue;
/* there must be a default (terminator) entry that breaks the loop */
break;
}
return feat;
}
u32 get_board_rev(void)
{
return MFD_VARIANT;
}