exports.h 1.9 KB

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