-#include <common.h>
+#include <command.h>
#include <exports.h>
+#include <malloc.h>
+#include <spi.h>
+#include <i2c.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
-static void dummy(void)
+__attribute__((unused)) static void dummy(void)
{
}
return XF_VERSION;
}
-void jumptable_init (void)
-{
- int i;
-
- gd->jt = (void **) malloc (XF_MAX * sizeof (void *));
- for (i = 0; i < XF_MAX; i++)
- gd->jt[i] = (void *) dummy;
+#define EXPORT_FUNC(f, a, x, ...) gd->jt->x = f;
- gd->jt[XF_get_version] = (void *) get_version;
- gd->jt[XF_malloc] = (void *) malloc;
- gd->jt[XF_free] = (void *) free;
- gd->jt[XF_getenv] = (void *) getenv;
- gd->jt[XF_setenv] = (void *) setenv;
- gd->jt[XF_get_timer] = (void *) get_timer;
- gd->jt[XF_simple_strtoul] = (void *) simple_strtoul;
- gd->jt[XF_udelay] = (void *) udelay;
- gd->jt[XF_simple_strtol] = (void *) simple_strtol;
- gd->jt[XF_strcmp] = (void *) strcmp;
-#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 */
-#if defined(CONFIG_CMD_I2C)
- gd->jt[XF_i2c_write] = (void *) i2c_write;
- gd->jt[XF_i2c_read] = (void *) i2c_read;
+#ifndef CONFIG_PHY_AQUANTIA
+# define mdio_get_current_dev dummy
+# define phy_find_by_mask dummy
+# define mdio_phydev_for_ethname dummy
+# define miiphy_set_current_dev dummy
#endif
+
+int jumptable_init(void)
+{
+ gd->jt = malloc(sizeof(struct jt_funcs));
+#include <_exports.h>
+
+ return 0;
}