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