blob: a4b862f19178d561db3d1eda7d27ae5da937bc82 [file] [log] [blame]
wdenk87249ba2004-01-06 22:38:14 +00001#ifndef __EXPORTS_H__
2#define __EXPORTS_H__
wdenk874ac262003-07-24 23:38:38 +00003
4#ifndef __ASSEMBLY__
Prabhakar Kushwaha7b3a6bc2015-06-28 11:03:59 +05305#ifdef CONFIG_PHY_AQUANTIA
Joe Hershbergerf5581fb2018-07-17 15:02:30 -05006#include <phy_interface.h>
Prabhakar Kushwaha7b3a6bc2015-06-28 11:03:59 +05307#endif
wdenk874ac262003-07-24 23:38:38 +00008
Martin Dorwigcb2c2862015-01-26 15:22:54 -07009struct spi_slave;
10
wdenk874ac262003-07-24 23:38:38 +000011/* These are declarations of exported functions available in C code */
12unsigned long get_version(void);
13int getc(void);
14int tstc(void);
15void putc(const char);
16void puts(const char*);
Wolfgang Denk318ef5c2010-06-20 17:14:14 +020017int printf(const char* fmt, ...);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070018void install_hdlr(int, interrupt_handler_t, void*);
wdenk874ac262003-07-24 23:38:38 +000019void free_hdlr(int);
20void *malloc(size_t);
Hans de Goede9f9df6f2015-09-13 14:45:15 +020021#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
wdenk874ac262003-07-24 23:38:38 +000022void free(void*);
Simon Glassf5f2b0e2015-03-03 08:03:01 -070023#endif
Ingo van Lilf0f778a2009-11-24 14:09:21 +010024void __udelay(unsigned long);
wdenk874ac262003-07-24 23:38:38 +000025unsigned long get_timer(unsigned long);
Wolfgang Denk318ef5c2010-06-20 17:14:14 +020026int vprintf(const char *, va_list);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070027unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base);
Heiko Schocher8d4f35a2011-05-02 21:33:49 +000028int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
Simon Glass64b723f2017-08-03 12:22:12 -060029char *env_get(const char *name);
Simon Glass6a38e412017-08-03 12:22:09 -060030int env_set(const char *varname, const char *value);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070031long simple_strtol(const char *cp, char **endp, unsigned int base);
32int strcmp(const char *cs, const char *ct);
Lukasz Majewski99180d62012-12-11 11:09:42 +010033unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
Piotr Wilczek219ad3c2013-01-27 22:59:24 +000034unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070035#if defined(CONFIG_CMD_I2C) && \
36 (!defined(CONFIG_DM_I2C) || defined(CONFIG_DM_I2C_COMPAT))
wdenk4cc02a82003-09-11 23:06:34 +000037int i2c_write (uchar, uint, int , uchar* , int);
38int i2c_read (uchar, uint, int , uchar* , int);
Jon Loeliger07efe2a2007-07-10 10:27:39 -050039#endif
Prabhakar Kushwaha7b3a6bc2015-06-28 11:03:59 +053040#ifdef CONFIG_PHY_AQUANTIA
41struct mii_dev *mdio_get_current_dev(void);
42struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
43 phy_interface_t interface);
44struct phy_device *mdio_phydev_for_ethname(const char *ethname);
45int miiphy_set_current_dev(const char *devname);
46#endif
wdenk874ac262003-07-24 23:38:38 +000047
Wolfgang Denk6262d0212010-06-28 22:00:46 +020048void app_startup(char * const *);
wdenk874ac262003-07-24 23:38:38 +000049
50#endif /* ifndef __ASSEMBLY__ */
51
Martin Dorwigcb2c2862015-01-26 15:22:54 -070052struct jt_funcs {
53#define EXPORT_FUNC(impl, res, func, ...) res(*func)(__VA_ARGS__);
wdenk874ac262003-07-24 23:38:38 +000054#include <_exports.h>
55#undef EXPORT_FUNC
wdenk874ac262003-07-24 23:38:38 +000056};
57
Martin Dorwigcb2c2862015-01-26 15:22:54 -070058
Shaohui Xiefd4d7bb2016-09-07 17:56:07 +080059#define XF_VERSION 9
wdenk874ac262003-07-24 23:38:38 +000060
Graeme Russcbfce1d2011-04-13 19:43:28 +100061#if defined(CONFIG_X86)
wdenkb8463562003-07-26 08:08:08 +000062extern gd_t *global_data;
63#endif
64
wdenk87249ba2004-01-06 22:38:14 +000065#endif /* __EXPORTS_H__ */