command: Remove the cmd_tbl_t typedef
[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 #include <irq_func.h>
13
14 struct cmd_tbl;
15 struct spi_slave;
16
17 /* Set up the jump table for use by the API */
18 void jumptable_init(void);
19
20 /* These are declarations of exported functions available in C code */
21 unsigned long get_version(void);
22 int  getc(void);
23 int  tstc(void);
24 void putc(const char);
25 void puts(const char*);
26 int printf(const char* fmt, ...);
27 void install_hdlr(int, interrupt_handler_t, void*);
28 void free_hdlr(int);
29 void *malloc(size_t);
30 #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
31 void free(void*);
32 #endif
33 void __udelay(unsigned long);
34 unsigned long get_timer(unsigned long);
35 int vprintf(const char *, va_list);
36 unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base);
37 int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
38 char *env_get(const char *name);
39 int env_set(const char *varname, const char *value);
40 long simple_strtol(const char *cp, char **endp, unsigned int base);
41 int strcmp(const char *cs, const char *ct);
42 unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
43 unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
44 #if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
45 int i2c_write (uchar, uint, int , uchar* , int);
46 int i2c_read (uchar, uint, int , uchar* , int);
47 #endif
48 #ifdef CONFIG_PHY_AQUANTIA
49 struct mii_dev *mdio_get_current_dev(void);
50 struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
51                 phy_interface_t interface);
52 struct phy_device *mdio_phydev_for_ethname(const char *ethname);
53 int miiphy_set_current_dev(const char *devname);
54 #endif
55
56 void app_startup(char * const *);
57
58 #endif    /* ifndef __ASSEMBLY__ */
59
60 struct jt_funcs {
61 #define EXPORT_FUNC(impl, res, func, ...) res(*func)(__VA_ARGS__);
62 #include <_exports.h>
63 #undef EXPORT_FUNC
64 };
65
66
67 #define XF_VERSION      9
68
69 #if defined(CONFIG_X86)
70 extern gd_t *global_data;
71 #endif
72
73 #endif  /* __EXPORTS_H__ */