Merge https://gitlab.denx.de/u-boot/custodians/u-boot-samsung.git
[platform/kernel/u-boot.git] / include / exports.h
1 #ifndef __EXPORTS_H__
2 #define __EXPORTS_H__
3
4 #include <irq_func.h>
5 #include <linux/delay.h>
6
7 #ifndef __ASSEMBLY__
8 #ifdef CONFIG_PHY_AQUANTIA
9 #include <env.h>
10 #include <phy_interface.h>
11 #endif
12
13 #include <irq_func.h>
14
15 struct cmd_tbl;
16 struct spi_slave;
17
18 /**
19  * jumptable_init() - Set up the jump table for use by the API
20  *
21  * It is called during the generic post-relocation init sequence.
22  *
23  * Return: 0 if OK
24  */
25 int jumptable_init(void);
26
27 /* These are declarations of exported functions available in C code */
28 unsigned long get_version(void);
29 int  getc(void);
30 int  tstc(void);
31 void putc(const char);
32 void puts(const char*);
33 int printf(const char* fmt, ...);
34 void install_hdlr(int, interrupt_handler_t, void*);
35 void free_hdlr(int);
36 void *malloc(size_t);
37 #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
38 void free(void*);
39 #endif
40 void __udelay(unsigned long);
41 unsigned long get_timer(unsigned long);
42 int vprintf(const char *, va_list);
43 unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base);
44 int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
45 char *env_get(const char *name);
46 int env_set(const char *varname, const char *value);
47 long simple_strtol(const char *cp, char **endp, unsigned int base);
48 int strcmp(const char *cs, const char *ct);
49 unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
50 unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
51 #if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
52 int i2c_write (uchar, uint, int , uchar* , int);
53 int i2c_read (uchar, uint, int , uchar* , int);
54 #endif
55 #ifdef CONFIG_PHY_AQUANTIA
56 struct mii_dev *mdio_get_current_dev(void);
57 struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
58                 phy_interface_t interface);
59 struct phy_device *mdio_phydev_for_ethname(const char *ethname);
60 int miiphy_set_current_dev(const char *devname);
61 #endif
62
63 void app_startup(char * const *);
64
65 #endif    /* ifndef __ASSEMBLY__ */
66
67 struct jt_funcs {
68 #define EXPORT_FUNC(impl, res, func, ...) res(*func)(__VA_ARGS__);
69 #include <_exports.h>
70 #undef EXPORT_FUNC
71 };
72
73
74 #define XF_VERSION      9
75
76 #if defined(CONFIG_X86)
77 extern gd_t *global_data;
78 #endif
79
80 #endif  /* __EXPORTS_H__ */