exports.h 2.0 KB

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