wdenk | c83bf6a | 2004-01-06 22:38:14 +0000 | [diff] [blame] | 1 | #ifndef __EXPORTS_H__ |
| 2 | #define __EXPORTS_H__ |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 3 | |
Simon Glass | c30b7ad | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 4 | #include <irq_func.h> |
| 5 | |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 6 | #ifndef __ASSEMBLY__ |
Prabhakar Kushwaha | 9527931 | 2015-06-28 11:03:59 +0530 | [diff] [blame] | 7 | #ifdef CONFIG_PHY_AQUANTIA |
Simon Glass | 9fb625c | 2019-08-01 09:46:51 -0600 | [diff] [blame] | 8 | #include <env.h> |
Joe Hershberger | f070b1a | 2018-07-17 15:02:30 -0500 | [diff] [blame] | 9 | #include <phy_interface.h> |
Prabhakar Kushwaha | 9527931 | 2015-06-28 11:03:59 +0530 | [diff] [blame] | 10 | #endif |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 11 | |
Simon Glass | 36bf446 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 12 | #include <irq_func.h> |
| 13 | |
Martin Dorwig | 49cad54 | 2015-01-26 15:22:54 -0700 | [diff] [blame] | 14 | struct spi_slave; |
| 15 | |
Simon Glass | a6f2aaf | 2019-12-28 10:44:46 -0700 | [diff] [blame] | 16 | /* Set up the jump table for use by the API */ |
| 17 | void jumptable_init(void); |
| 18 | |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 19 | /* These are declarations of exported functions available in C code */ |
| 20 | unsigned long get_version(void); |
| 21 | int getc(void); |
| 22 | int tstc(void); |
| 23 | void putc(const char); |
| 24 | void puts(const char*); |
Wolfgang Denk | d9c2725 | 2010-06-20 17:14:14 +0200 | [diff] [blame] | 25 | int printf(const char* fmt, ...); |
Martin Dorwig | 49cad54 | 2015-01-26 15:22:54 -0700 | [diff] [blame] | 26 | void install_hdlr(int, interrupt_handler_t, void*); |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 27 | void free_hdlr(int); |
| 28 | void *malloc(size_t); |
Hans de Goede | 1eb0c03 | 2015-09-13 14:45:15 +0200 | [diff] [blame] | 29 | #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 30 | void free(void*); |
Simon Glass | 9059491 | 2015-03-03 08:03:01 -0700 | [diff] [blame] | 31 | #endif |
Ingo van Lil | 3eb90ba | 2009-11-24 14:09:21 +0100 | [diff] [blame] | 32 | void __udelay(unsigned long); |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 33 | unsigned long get_timer(unsigned long); |
Wolfgang Denk | d9c2725 | 2010-06-20 17:14:14 +0200 | [diff] [blame] | 34 | int vprintf(const char *, va_list); |
Martin Dorwig | 49cad54 | 2015-01-26 15:22:54 -0700 | [diff] [blame] | 35 | unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base); |
Heiko Schocher | a7fd0d9 | 2011-05-02 21:33:49 +0000 | [diff] [blame] | 36 | int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); |
Simon Glass | 00caae6 | 2017-08-03 12:22:12 -0600 | [diff] [blame] | 37 | char *env_get(const char *name); |
Simon Glass | 382bee5 | 2017-08-03 12:22:09 -0600 | [diff] [blame] | 38 | int env_set(const char *varname, const char *value); |
Martin Dorwig | 49cad54 | 2015-01-26 15:22:54 -0700 | [diff] [blame] | 39 | long simple_strtol(const char *cp, char **endp, unsigned int base); |
| 40 | int strcmp(const char *cs, const char *ct); |
Lukasz Majewski | 3ec4411 | 2012-12-11 11:09:42 +0100 | [diff] [blame] | 41 | unsigned long ustrtoul(const char *cp, char **endp, unsigned int base); |
Piotr Wilczek | 7df54d3 | 2013-01-27 22:59:24 +0000 | [diff] [blame] | 42 | unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base); |
Bartosz Golaszewski | e311482 | 2019-07-29 08:58:00 +0200 | [diff] [blame] | 43 | #if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C) |
wdenk | 4f7cb08 | 2003-09-11 23:06:34 +0000 | [diff] [blame] | 44 | int i2c_write (uchar, uint, int , uchar* , int); |
| 45 | int i2c_read (uchar, uint, int , uchar* , int); |
Jon Loeliger | 068b60a | 2007-07-10 10:27:39 -0500 | [diff] [blame] | 46 | #endif |
Prabhakar Kushwaha | 9527931 | 2015-06-28 11:03:59 +0530 | [diff] [blame] | 47 | #ifdef CONFIG_PHY_AQUANTIA |
| 48 | struct mii_dev *mdio_get_current_dev(void); |
| 49 | struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask, |
| 50 | phy_interface_t interface); |
| 51 | struct phy_device *mdio_phydev_for_ethname(const char *ethname); |
| 52 | int miiphy_set_current_dev(const char *devname); |
| 53 | #endif |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 54 | |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 55 | void app_startup(char * const *); |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 56 | |
| 57 | #endif /* ifndef __ASSEMBLY__ */ |
| 58 | |
Martin Dorwig | 49cad54 | 2015-01-26 15:22:54 -0700 | [diff] [blame] | 59 | struct jt_funcs { |
| 60 | #define EXPORT_FUNC(impl, res, func, ...) res(*func)(__VA_ARGS__); |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 61 | #include <_exports.h> |
| 62 | #undef EXPORT_FUNC |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 63 | }; |
| 64 | |
Martin Dorwig | 49cad54 | 2015-01-26 15:22:54 -0700 | [diff] [blame] | 65 | |
Shaohui Xie | 9578c42 | 2016-09-07 17:56:07 +0800 | [diff] [blame] | 66 | #define XF_VERSION 9 |
wdenk | 27b207f | 2003-07-24 23:38:38 +0000 | [diff] [blame] | 67 | |
Graeme Russ | fea2572 | 2011-04-13 19:43:28 +1000 | [diff] [blame] | 68 | #if defined(CONFIG_X86) |
wdenk | 7784674 | 2003-07-26 08:08:08 +0000 | [diff] [blame] | 69 | extern gd_t *global_data; |
| 70 | #endif |
| 71 | |
wdenk | c83bf6a | 2004-01-06 22:38:14 +0000 | [diff] [blame] | 72 | #endif /* __EXPORTS_H__ */ |