blob: 9858217ae0c3db1b0e28df5be9b41a995b39f52a [file] [log] [blame]
wdenk874ac262003-07-24 23:38:38 +00001#include <common.h>
2#include <exports.h>
3
4static void dummy(void)
5{
6}
7
8unsigned long get_version(void)
9{
10 return XF_VERSION;
11}
12
13void jumptable_init (void)
14{
15 DECLARE_GLOBAL_DATA_PTR;
16 int i;
17
18 gd->jt = (void **) malloc (XF_MAX * sizeof (void *));
19 for (i = 0; i < XF_MAX; i++)
20 gd->jt[i] = (void *) dummy;
21
22 gd->jt[XF_get_version] = (void *) get_version;
23 gd->jt[XF_malloc] = (void *) malloc;
24 gd->jt[XF_free] = (void *) free;
25 gd->jt[XF_get_timer] = (void *)get_timer;
26 gd->jt[XF_udelay] = (void *)udelay;
27#if defined(CONFIG_I386) || defined(CONFIG_PPC)
28 gd->jt[XF_install_hdlr] = (void *) irq_install_handler;
29 gd->jt[XF_free_hdlr] = (void *) irq_free_handler;
wdenk4cc02a82003-09-11 23:06:34 +000030#endif /* I386 || PPC */
31#if (CONFIG_COMMANDS & CFG_CMD_I2C)
32 gd->jt[XF_i2c_write] = (void *) i2c_write;
33 gd->jt[XF_i2c_read] = (void *) i2c_read;
34#endif /* CFG_CMD_I2C */
wdenk874ac262003-07-24 23:38:38 +000035}