platform.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * arch/arm/mach-ep93xx/include/mach/platform.h
  3. */
  4. #ifndef __ASSEMBLY__
  5. struct i2c_gpio_platform_data;
  6. struct i2c_board_info;
  7. struct spi_board_info;
  8. struct platform_device;
  9. struct ep93xxfb_mach_info;
  10. struct ep93xx_keypad_platform_data;
  11. struct ep93xx_spi_info;
  12. struct ep93xx_eth_data
  13. {
  14. unsigned char dev_addr[6];
  15. unsigned char phy_id;
  16. };
  17. void ep93xx_map_io(void);
  18. void ep93xx_init_irq(void);
  19. /* EP93xx System Controller software locked register write */
  20. void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg);
  21. void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits);
  22. static inline void ep93xx_devcfg_set_bits(unsigned int bits)
  23. {
  24. ep93xx_devcfg_set_clear(bits, 0x00);
  25. }
  26. static inline void ep93xx_devcfg_clear_bits(unsigned int bits)
  27. {
  28. ep93xx_devcfg_set_clear(0x00, bits);
  29. }
  30. #define EP93XX_CHIP_REV_D0 3
  31. #define EP93XX_CHIP_REV_D1 4
  32. #define EP93XX_CHIP_REV_E0 5
  33. #define EP93XX_CHIP_REV_E1 6
  34. #define EP93XX_CHIP_REV_E2 7
  35. unsigned int ep93xx_chip_revision(void);
  36. void ep93xx_register_flash(unsigned int width,
  37. resource_size_t start, resource_size_t size);
  38. void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr);
  39. void ep93xx_register_i2c(struct i2c_gpio_platform_data *data,
  40. struct i2c_board_info *devices, int num);
  41. void ep93xx_register_spi(struct ep93xx_spi_info *info,
  42. struct spi_board_info *devices, int num);
  43. void ep93xx_register_fb(struct ep93xxfb_mach_info *data);
  44. void ep93xx_register_pwm(int pwm0, int pwm1);
  45. int ep93xx_pwm_acquire_gpio(struct platform_device *pdev);
  46. void ep93xx_pwm_release_gpio(struct platform_device *pdev);
  47. void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data);
  48. int ep93xx_keypad_acquire_gpio(struct platform_device *pdev);
  49. void ep93xx_keypad_release_gpio(struct platform_device *pdev);
  50. void ep93xx_register_i2s(void);
  51. int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config);
  52. void ep93xx_i2s_release(void);
  53. void ep93xx_register_ac97(void);
  54. void ep93xx_init_devices(void);
  55. extern struct sys_timer ep93xx_timer;
  56. #endif