wdenk | 874ac26 | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 1 | #include <common.h> |
| 2 | #include <exports.h> |
| 3 | |
Wolfgang Denk | 6405a15 | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 4 | DECLARE_GLOBAL_DATA_PTR; |
| 5 | |
Wolfgang Denk | b569361 | 2010-06-20 23:33:02 +0200 | [diff] [blame] | 6 | __attribute__((unused)) static void dummy(void) |
wdenk | 874ac26 | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 7 | { |
| 8 | } |
| 9 | |
| 10 | unsigned long get_version(void) |
| 11 | { |
| 12 | return XF_VERSION; |
| 13 | } |
| 14 | |
Mike Frysinger | 9a14a5a | 2009-11-04 16:34:42 -0500 | [diff] [blame] | 15 | /* Reuse _exports.h with a little trickery to avoid bitrot */ |
| 16 | #define EXPORT_FUNC(sym) gd->jt[XF_##sym] = (void *)sym; |
wdenk | 874ac26 | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 17 | |
Mike Frysinger | 9a14a5a | 2009-11-04 16:34:42 -0500 | [diff] [blame] | 18 | #if !defined(CONFIG_I386) && !defined(CONFIG_PPC) |
| 19 | # define install_hdlr dummy |
| 20 | # define free_hdlr dummy |
| 21 | #else /* kludge for non-standard function naming */ |
| 22 | # define install_hdlr irq_install_handler |
| 23 | # define free_hdlr irq_free_handler |
| 24 | #endif |
| 25 | #ifndef CONFIG_CMD_I2C |
| 26 | # define i2c_write dummy |
| 27 | # define i2c_read dummy |
Jon Loeliger | 052fc84 | 2007-07-08 18:10:08 -0500 | [diff] [blame] | 28 | #endif |
Mike Frysinger | 9a14a5a | 2009-11-04 16:34:42 -0500 | [diff] [blame] | 29 | #ifndef CONFIG_CMD_SPI |
| 30 | # define spi_init dummy |
| 31 | # define spi_setup_slave dummy |
| 32 | # define spi_free_slave dummy |
| 33 | # define spi_claim_bus dummy |
| 34 | # define spi_release_bus dummy |
| 35 | # define spi_xfer dummy |
Mike Frysinger | 53c6574 | 2009-07-23 16:37:48 -0400 | [diff] [blame] | 36 | #endif |
Mike Frysinger | 9a14a5a | 2009-11-04 16:34:42 -0500 | [diff] [blame] | 37 | |
| 38 | void jumptable_init(void) |
| 39 | { |
| 40 | gd->jt = malloc(XF_MAX * sizeof(void *)); |
| 41 | #include <_exports.h> |
wdenk | 874ac26 | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 42 | } |