board.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * arch/arm/plat-omap/include/mach/board.h
  3. *
  4. * Information structures for board-specific data
  5. *
  6. * Copyright (C) 2004 Nokia Corporation
  7. * Written by Juha Yrjölä <juha.yrjola@nokia.com>
  8. */
  9. #ifndef _OMAP_BOARD_H
  10. #define _OMAP_BOARD_H
  11. #include <linux/types.h>
  12. #include <plat/gpio-switch.h>
  13. /* Different peripheral ids */
  14. #define OMAP_TAG_CLOCK 0x4f01
  15. #define OMAP_TAG_GPIO_SWITCH 0x4f06
  16. #define OMAP_TAG_STI_CONSOLE 0x4f09
  17. #define OMAP_TAG_CAMERA_SENSOR 0x4f0a
  18. #define OMAP_TAG_BOOT_REASON 0x4f80
  19. #define OMAP_TAG_FLASH_PART 0x4f81
  20. #define OMAP_TAG_VERSION_STR 0x4f82
  21. struct omap_clock_config {
  22. /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
  23. u8 system_clock_type;
  24. };
  25. struct omap_serial_console_config {
  26. u8 console_uart;
  27. u32 console_speed;
  28. };
  29. struct omap_sti_console_config {
  30. unsigned enable:1;
  31. u8 channel;
  32. };
  33. struct omap_camera_sensor_config {
  34. u16 reset_gpio;
  35. int (*power_on)(void * data);
  36. int (*power_off)(void * data);
  37. };
  38. struct omap_lcd_config {
  39. char panel_name[16];
  40. char ctrl_name[16];
  41. s16 nreset_gpio;
  42. u8 data_lines;
  43. };
  44. struct device;
  45. struct fb_info;
  46. struct omap_backlight_config {
  47. int default_intensity;
  48. int (*set_power)(struct device *dev, int state);
  49. };
  50. struct omap_fbmem_config {
  51. u32 start;
  52. u32 size;
  53. };
  54. struct omap_pwm_led_platform_data {
  55. const char *name;
  56. int intensity_timer;
  57. int blink_timer;
  58. void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
  59. };
  60. struct omap_uart_config {
  61. /* Bit field of UARTs present; bit 0 --> UART1 */
  62. unsigned int enabled_uarts;
  63. };
  64. struct omap_flash_part_config {
  65. char part_table[0];
  66. };
  67. struct omap_boot_reason_config {
  68. char reason_str[12];
  69. };
  70. struct omap_version_config {
  71. char component[12];
  72. char version[12];
  73. };
  74. struct omap_board_config_entry {
  75. u16 tag;
  76. u16 len;
  77. u8 data[0];
  78. };
  79. struct omap_board_config_kernel {
  80. u16 tag;
  81. const void *data;
  82. };
  83. extern const void *__init __omap_get_config(u16 tag, size_t len, int nr);
  84. #define omap_get_config(tag, type) \
  85. ((const type *) __omap_get_config((tag), sizeof(type), 0))
  86. extern struct omap_board_config_kernel *omap_board_config;
  87. extern int omap_board_config_size;
  88. /* for TI reference platforms sharing the same debug card */
  89. extern int debug_card_init(u32 addr, unsigned gpio);
  90. #endif