common.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * (C) Copyright 2008
  3. * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or (at your option) any later version.
  9. */
  10. #ifndef __KEYMILE_COMMON_H
  11. #define __KEYMILE_COMMON_H
  12. #define WRG_RESET 0x80
  13. #define H_OPORTS_14 0x40
  14. #define WRG_LED 0x02
  15. #define WRL_BOOT 0x01
  16. #define H_OPORTS_SCC4_ENA 0x10
  17. #define H_OPORTS_SCC4_FD_ENA 0x04
  18. #define H_OPORTS_FCC1_PW_DWN 0x01
  19. #define PIGGY_PRESENT 0x80
  20. struct km_bec_fpga {
  21. unsigned char id;
  22. unsigned char rev;
  23. unsigned char oprth;
  24. unsigned char oprtl;
  25. unsigned char res1[3];
  26. unsigned char bprth;
  27. unsigned char bprtl;
  28. unsigned char res2[6];
  29. unsigned char prst;
  30. unsigned char res3[0xfff0];
  31. unsigned char pgy_id;
  32. unsigned char pgy_rev;
  33. unsigned char pgy_outputs;
  34. unsigned char pgy_eth;
  35. };
  36. int ethernet_present(void);
  37. int ivm_read_eeprom(void);
  38. #ifdef CONFIG_KEYMILE_HDLC_ENET
  39. int keymile_hdlc_enet_initialize(bd_t *bis);
  40. #endif
  41. int fdt_set_node_and_value(void *blob,
  42. char *nodename,
  43. char *regname,
  44. void *var,
  45. int size);
  46. int fdt_get_node_and_value(void *blob,
  47. char *nodename,
  48. char *propname,
  49. void **var);
  50. int i2c_soft_read_pin(void);
  51. #endif /* __KEYMILE_COMMON_H */