blob: 1d81bc4b289815707a98a0d5b4baf4e1474bfa8e [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
6#include <miiphy.h>
7#include <phy.h>
8#endif
wdenk874ac262003-07-24 23:38:38 +00009
Martin Dorwigcb2c2862015-01-26 15:22:54 -070010struct spi_slave;
11
wdenk874ac262003-07-24 23:38:38 +000012/* These are declarations of exported functions available in C code */
13unsigned long get_version(void);
14int getc(void);
15int tstc(void);
16void putc(const char);
17void puts(const char*);
Wolfgang Denk318ef5c2010-06-20 17:14:14 +020018int printf(const char* fmt, ...);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070019void install_hdlr(int, interrupt_handler_t, void*);
wdenk874ac262003-07-24 23:38:38 +000020void free_hdlr(int);
21void *malloc(size_t);
Hans de Goede9f9df6f2015-09-13 14:45:15 +020022#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
wdenk874ac262003-07-24 23:38:38 +000023void free(void*);
Simon Glassf5f2b0e2015-03-03 08:03:01 -070024#endif
Ingo van Lilf0f778a2009-11-24 14:09:21 +010025void __udelay(unsigned long);
wdenk874ac262003-07-24 23:38:38 +000026unsigned long get_timer(unsigned long);
Wolfgang Denk318ef5c2010-06-20 17:14:14 +020027int vprintf(const char *, va_list);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070028unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base);
Heiko Schocher8d4f35a2011-05-02 21:33:49 +000029int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
Wolfgang Denkd67abff2011-07-29 14:42:18 +020030char *getenv (const char *name);
31int setenv (const char *varname, const char *varvalue);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070032long simple_strtol(const char *cp, char **endp, unsigned int base);
33int strcmp(const char *cs, const char *ct);
Lukasz Majewski99180d62012-12-11 11:09:42 +010034unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
Piotr Wilczek219ad3c2013-01-27 22:59:24 +000035unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
Martin Dorwigcb2c2862015-01-26 15:22:54 -070036#if defined(CONFIG_CMD_I2C) && \
37 (!defined(CONFIG_DM_I2C) || defined(CONFIG_DM_I2C_COMPAT))
wdenk4cc02a82003-09-11 23:06:34 +000038int i2c_write (uchar, uint, int , uchar* , int);
39int i2c_read (uchar, uint, int , uchar* , int);
Jon Loeliger07efe2a2007-07-10 10:27:39 -050040#endif
Prabhakar Kushwaha7b3a6bc2015-06-28 11:03:59 +053041#ifdef CONFIG_PHY_AQUANTIA
42struct mii_dev *mdio_get_current_dev(void);
43struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
44 phy_interface_t interface);
45struct phy_device *mdio_phydev_for_ethname(const char *ethname);
46int miiphy_set_current_dev(const char *devname);
47#endif
wdenk874ac262003-07-24 23:38:38 +000048
Wolfgang Denk6262d0212010-06-28 22:00:46 +020049void app_startup(char * const *);
wdenk874ac262003-07-24 23:38:38 +000050
51#endif /* ifndef __ASSEMBLY__ */
52
Martin Dorwigcb2c2862015-01-26 15:22:54 -070053struct jt_funcs {
54#define EXPORT_FUNC(impl, res, func, ...) res(*func)(__VA_ARGS__);
wdenk874ac262003-07-24 23:38:38 +000055#include <_exports.h>
56#undef EXPORT_FUNC
wdenk874ac262003-07-24 23:38:38 +000057};
58
Martin Dorwigcb2c2862015-01-26 15:22:54 -070059
Shaohui Xiefd4d7bb2016-09-07 17:56:07 +080060#define XF_VERSION 9
wdenk874ac262003-07-24 23:38:38 +000061
Graeme Russcbfce1d2011-04-13 19:43:28 +100062#if defined(CONFIG_X86)
wdenkb8463562003-07-26 08:08:08 +000063extern gd_t *global_data;
64#endif
65
wdenk87249ba2004-01-06 22:38:14 +000066#endif /* __EXPORTS_H__ */