blob: 88fcfc8cb6fc652e8fb5242869ebdb4c0813f5dd [file] [log] [blame]
wdenk874ac262003-07-24 23:38:38 +00001#include <common.h>
2#include <exports.h>
Simon Glass0bc17242011-12-06 19:31:32 +00003#include <spi.h>
wdenk874ac262003-07-24 23:38:38 +00004
Wolfgang Denk6405a152006-03-31 18:32:53 +02005DECLARE_GLOBAL_DATA_PTR;
6
Wolfgang Denkb5693612010-06-20 23:33:02 +02007__attribute__((unused)) static void dummy(void)
wdenk874ac262003-07-24 23:38:38 +00008{
9}
10
11unsigned long get_version(void)
12{
13 return XF_VERSION;
14}
15
Mike Frysinger9a14a5a2009-11-04 16:34:42 -050016/* Reuse _exports.h with a little trickery to avoid bitrot */
17#define EXPORT_FUNC(sym) gd->jt[XF_##sym] = (void *)sym;
wdenk874ac262003-07-24 23:38:38 +000018
Graeme Russcbfce1d2011-04-13 19:43:28 +100019#if !defined(CONFIG_X86) && !defined(CONFIG_PPC)
Mike Frysinger9a14a5a2009-11-04 16:34:42 -050020# define install_hdlr dummy
21# define free_hdlr dummy
22#else /* kludge for non-standard function naming */
23# define install_hdlr irq_install_handler
24# define free_hdlr irq_free_handler
25#endif
26#ifndef CONFIG_CMD_I2C
27# define i2c_write dummy
28# define i2c_read dummy
Jon Loeliger052fc842007-07-08 18:10:08 -050029#endif
Simon Glassdd82d442014-10-13 23:41:52 -060030#if !defined(CONFIG_CMD_SPI) || defined(CONFIG_DM_SPI)
Mike Frysinger9a14a5a2009-11-04 16:34:42 -050031# define spi_init dummy
32# define spi_setup_slave dummy
33# define spi_free_slave dummy
Simon Glassdd82d442014-10-13 23:41:52 -060034#endif
35#ifndef CONFIG_CMD_SPI
Mike Frysinger9a14a5a2009-11-04 16:34:42 -050036# define spi_claim_bus dummy
37# define spi_release_bus dummy
38# define spi_xfer dummy
Mike Frysinger53c65742009-07-23 16:37:48 -040039#endif
Mike Frysinger9a14a5a2009-11-04 16:34:42 -050040
41void jumptable_init(void)
42{
43 gd->jt = malloc(XF_MAX * sizeof(void *));
44#include <_exports.h>
wdenk874ac262003-07-24 23:38:38 +000045}