Merge tag 'efi-2020-01-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
[oweals/u-boot.git] / include / exports.h
1 #ifndef __EXPORTS_H__
2 #define __EXPORTS_H__
3
4 #ifndef __ASSEMBLY__
5 #ifdef CONFIG_PHY_AQUANTIA
6 #include <env.h>
7 #include <phy_interface.h>
8 #endif
9
10 struct spi_slave;
11
12 /* These are declarations of exported functions available in C code */
13 unsigned long get_version(void);
14 int  getc(void);
15 int  tstc(void);
16 void putc(const char);
17 void puts(const char*);
18 int printf(const char* fmt, ...);
19 void install_hdlr(int, interrupt_handler_t, void*);
20 void free_hdlr(int);
21 void *malloc(size_t);
22 #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
23 void free(void*);
24 #endif
25 void __udelay(unsigned long);
26 unsigned long get_timer(unsigned long);
27 int vprintf(const char *, va_list);
28 unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base);
29 int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
30 char *env_get(const char *name);
31 int env_set(const char *varname, const char *value);
32 long simple_strtol(const char *cp, char **endp, unsigned int base);
33 int strcmp(const char *cs, const char *ct);
34 unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
35 unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
36 #if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
37 int i2c_write (uchar, uint, int , uchar* , int);
38 int i2c_read (uchar, uint, int , uchar* , int);
39 #endif
40 #ifdef CONFIG_PHY_AQUANTIA
41 struct mii_dev *mdio_get_current_dev(void);
42 struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
43                 phy_interface_t interface);
44 struct phy_device *mdio_phydev_for_ethname(const char *ethname);
45 int miiphy_set_current_dev(const char *devname);
46 #endif
47
48 void app_startup(char * const *);
49
50 #endif    /* ifndef __ASSEMBLY__ */
51
52 struct jt_funcs {
53 #define EXPORT_FUNC(impl, res, func, ...) res(*func)(__VA_ARGS__);
54 #include <_exports.h>
55 #undef EXPORT_FUNC
56 };
57
58
59 #define XF_VERSION      9
60
61 #if defined(CONFIG_X86)
62 extern gd_t *global_data;
63 #endif
64
65 #endif  /* __EXPORTS_H__ */