1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _OMAP_BOARD_H 13 #define _OMAP_BOARD_H 14 15 #include <linux/types.h> 16 17 #include <asm/arch/gpio-switch.h> 18 19 #define OMAP_TAG_CLOCK 0x4f01 20 #define OMAP_TAG_MMC 0x4f02 21 #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 22 #define OMAP_TAG_USB 0x4f04 23 #define OMAP_TAG_LCD 0x4f05 24 #define OMAP_TAG_GPIO_SWITCH 0x4f06 25 #define OMAP_TAG_UART 0x4f07 26 #define OMAP_TAG_FBMEM 0x4f08 27 #define OMAP_TAG_STI_CONSOLE 0x4f09 28 #define OMAP_TAG_CAMERA_SENSOR 0x4f0a 29 #define OMAP_TAG_BT 0x4f0b 30 31 #define OMAP_TAG_BOOT_REASON 0x4f80 32 #define OMAP_TAG_FLASH_PART 0x4f81 33 #define OMAP_TAG_VERSION_STR 0x4f82 34 35 struct omap_clock_config { 36 37 u8 system_clock_type; 38 }; 39 40 struct omap_mmc_conf { 41 unsigned enabled:1; 42 43 unsigned nomux:1; 44 45 unsigned cover:1; 46 47 unsigned wire4:1; 48 s16 power_pin; 49 s16 switch_pin; 50 s16 wp_pin; 51 }; 52 53 struct omap_mmc_config { 54 struct omap_mmc_conf mmc[2]; 55 }; 56 57 struct omap_serial_console_config { 58 u8 console_uart; 59 u32 console_speed; 60 }; 61 62 struct omap_sti_console_config { 63 unsigned enable:1; 64 u8 channel; 65 }; 66 67 struct omap_camera_sensor_config { 68 u16 reset_gpio; 69 int (*power_on)(void * data); 70 int (*power_off)(void * data); 71 }; 72 73 struct omap_usb_config { 74 75 unsigned register_host:1; 76 unsigned register_dev:1; 77 u8 otg; 78 79 u8 hmc_mode; 80 81 u8 rwc; 82 83 u8 pins[3]; 84 }; 85 86 struct omap_lcd_config { 87 char panel_name[16]; 88 char ctrl_name[16]; 89 s16 nreset_gpio; 90 u8 data_lines; 91 }; 92 93 struct device; 94 struct fb_info; 95 struct omap_backlight_config { 96 int default_intensity; 97 int (*set_power)(struct device *dev, int state); 98 int (*check_fb)(struct fb_info *fb); 99 }; 100 101 struct omap_fbmem_config { 102 u32 start; 103 u32 size; 104 }; 105 106 struct omap_pwm_led_platform_data { 107 const char *name; 108 int intensity_timer; 109 int blink_timer; 110 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off); 111 }; 112 113 struct omap_gpio_switch_config { 114 char name[12]; 115 u16 gpio; 116 int flags:4; 117 int type:4; 118 int key_code:24; 119 }; 120 121 struct omap_uart_config { 122 123 unsigned int enabled_uarts; 124 }; 125 126 struct omap_flash_part_config { 127 char part_table[0]; 128 }; 129 130 struct omap_boot_reason_config { 131 char reason_str[12]; 132 }; 133 134 struct omap_version_config { 135 char component[12]; 136 char version[12]; 137 }; 138 139 struct omap_board_config_entry { 140 u16 tag; 141 u16 len; 142 u8 data[0]; 143 }; 144 145 struct omap_board_config_kernel { 146 u16 tag; 147 const void *data; 148 }; 149 150 struct omap_bluetooth_config { 151 u8 chip_type; 152 u8 bt_uart; 153 u8 bd_addr[6]; 154 u8 bt_sysclk; 155 int bt_wakeup_gpio; 156 int host_wakeup_gpio; 157 int reset_gpio; 158 }; 159 160 #define omap_get_config(tag, type) ((const type *) __omap_get_config((tag), sizeof(type), 0)) 161 #define omap_get_nr_config(tag, type, nr) ((const type *) __omap_get_config((tag), sizeof(type), (nr))) 162 163 #endif 164