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