exports.h 1.9 KB

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