]>
Commit | Line | Data |
---|---|---|
27b207fd WD |
1 | #include <common.h> |
2 | #include <exports.h> | |
80729a54 | 3 | #include <spi.h> |
27b207fd | 4 | |
d87080b7 WD |
5 | DECLARE_GLOBAL_DATA_PTR; |
6 | ||
c0c15379 | 7 | __attribute__((unused)) static void dummy(void) |
27b207fd WD |
8 | { |
9 | } | |
10 | ||
11 | unsigned long get_version(void) | |
12 | { | |
13 | return XF_VERSION; | |
14 | } | |
15 | ||
bf44f3f3 MF |
16 | /* Reuse _exports.h with a little trickery to avoid bitrot */ |
17 | #define EXPORT_FUNC(sym) gd->jt[XF_##sym] = (void *)sym; | |
27b207fd | 18 | |
fea25720 | 19 | #if !defined(CONFIG_X86) && !defined(CONFIG_PPC) |
bf44f3f3 MF |
20 | # 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 | |
c3517f91 | 29 | #endif |
bf44f3f3 MF |
30 | #ifndef CONFIG_CMD_SPI |
31 | # define spi_init dummy | |
32 | # define spi_setup_slave dummy | |
33 | # define spi_free_slave dummy | |
34 | # define spi_claim_bus dummy | |
35 | # define spi_release_bus dummy | |
36 | # define spi_xfer dummy | |
bedd8403 | 37 | #endif |
bf44f3f3 MF |
38 | |
39 | void jumptable_init(void) | |
40 | { | |
41 | gd->jt = malloc(XF_MAX * sizeof(void *)); | |
42 | #include <_exports.h> | |
27b207fd | 43 | } |