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