2003-07-25 07:38:38 +08:00
|
|
|
#include <common.h>
|
|
|
|
#include <exports.h>
|
2011-12-07 03:31:32 +08:00
|
|
|
#include <spi.h>
|
2003-07-25 07:38:38 +08:00
|
|
|
|
2006-04-01 00:32:53 +08:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2010-06-21 05:33:02 +08:00
|
|
|
__attribute__((unused)) static void dummy(void)
|
2003-07-25 07:38:38 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned long get_version(void)
|
|
|
|
{
|
|
|
|
return XF_VERSION;
|
|
|
|
}
|
|
|
|
|
2009-11-05 05:34:42 +08:00
|
|
|
/* Reuse _exports.h with a little trickery to avoid bitrot */
|
|
|
|
#define EXPORT_FUNC(sym) gd->jt[XF_##sym] = (void *)sym;
|
2003-07-25 07:38:38 +08:00
|
|
|
|
2011-04-13 17:43:28 +08:00
|
|
|
#if !defined(CONFIG_X86) && !defined(CONFIG_PPC)
|
2009-11-05 05:34:42 +08:00
|
|
|
# define install_hdlr dummy
|
|
|
|
# define free_hdlr dummy
|
|
|
|
#else /* kludge for non-standard function naming */
|
|
|
|
# define install_hdlr irq_install_handler
|
|
|
|
# define free_hdlr irq_free_handler
|
|
|
|
#endif
|
|
|
|
#ifndef CONFIG_CMD_I2C
|
|
|
|
# define i2c_write dummy
|
|
|
|
# define i2c_read dummy
|
2007-07-09 07:10:08 +08:00
|
|
|
#endif
|
2009-11-05 05:34:42 +08:00
|
|
|
#ifndef CONFIG_CMD_SPI
|
|
|
|
# define spi_init dummy
|
|
|
|
# define spi_setup_slave dummy
|
|
|
|
# define spi_free_slave dummy
|
|
|
|
# define spi_claim_bus dummy
|
|
|
|
# define spi_release_bus dummy
|
|
|
|
# define spi_xfer dummy
|
2009-07-24 04:37:48 +08:00
|
|
|
#endif
|
2009-11-05 05:34:42 +08:00
|
|
|
|
|
|
|
void jumptable_init(void)
|
|
|
|
{
|
|
|
|
gd->jt = malloc(XF_MAX * sizeof(void *));
|
|
|
|
#include <_exports.h>
|
2003-07-25 07:38:38 +08:00
|
|
|
}
|