exports.h 2.2 KB

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