2024-01-07 23:57:24 +01:00
|
|
|
#include <common.h>
|
|
|
|
#include <exports.h>
|
|
|
|
|
|
|
|
static void dummy(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned long get_version(void)
|
|
|
|
{
|
|
|
|
return XF_VERSION;
|
|
|
|
}
|
|
|
|
|
|
|
|
void jumptable_init (void)
|
|
|
|
{
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
gd->jt = (void **) malloc (XF_MAX * sizeof (void *));
|
|
|
|
for (i = 0; i < XF_MAX; i++)
|
|
|
|
gd->jt[i] = (void *) dummy;
|
|
|
|
|
|
|
|
gd->jt[XF_get_version] = (void *) get_version;
|
|
|
|
gd->jt[XF_malloc] = (void *) malloc;
|
|
|
|
gd->jt[XF_free] = (void *) free;
|
|
|
|
gd->jt[XF_get_timer] = (void *)get_timer;
|
|
|
|
gd->jt[XF_udelay] = (void *)udelay;
|
|
|
|
#if defined(CONFIG_I386) || defined(CONFIG_PPC)
|
|
|
|
gd->jt[XF_install_hdlr] = (void *) irq_install_handler;
|
|
|
|
gd->jt[XF_free_hdlr] = (void *) irq_free_handler;
|
|
|
|
#endif /* I386 || PPC */
|
2024-01-07 23:58:22 +01:00
|
|
|
#ifdef CONFIG_MARVELL
|
|
|
|
gd->jt[XF_calloc] = (void *) calloc;
|
|
|
|
gd->jt[XF_realloc] = (void *) realloc;
|
|
|
|
gd->jt[XF_memalign] = (void *) memalign;
|
|
|
|
#ifndef MV_TINY_IMAGE
|
|
|
|
gd->jt[XF_mvGetRtcSec] = (void *) mvGetRtcSec;
|
|
|
|
#endif
|
|
|
|
#endif
|
2024-01-07 23:57:24 +01:00
|
|
|
#if (CONFIG_COMMANDS & CFG_CMD_I2C)
|
|
|
|
gd->jt[XF_i2c_write] = (void *) i2c_write;
|
|
|
|
gd->jt[XF_i2c_read] = (void *) i2c_read;
|
|
|
|
#endif /* CFG_CMD_I2C */
|
|
|
|
}
|