vserver 1.9.3
[linux-2.6.git] / include / asm-arm / arch-omap / board.h
1 /*
2  *  linux/include/asm-arm/arch-omap/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
10 #ifndef _OMAP_BOARD_H
11 #define _OMAP_BOARD_H
12
13 #include <linux/config.h>
14 #include <linux/types.h>
15
16 /* Different peripheral ids */
17 #define OMAP_TAG_CLOCK          0x4f01
18 #define OMAP_TAG_MMC            0x4f02
19 #define OMAP_TAG_UART           0x4f03
20 #define OMAP_TAG_USB            0x4f04
21
22 struct omap_clock_config {
23         /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
24         u8 system_clock_type;
25 };
26
27 struct omap_mmc_config {
28         u8 mmc_blocks;
29         s8 mmc1_power_pin, mmc2_power_pin;
30         s8 mmc1_switch_pin, mmc2_switch_pin;
31 };
32
33 struct omap_uart_config {
34         u8 console_uart;
35         u32 console_speed;
36 };
37
38 struct omap_usb_config {
39         /* Configure drivers according to the connectors on your board:
40          *  - "A" connector (rectagular)
41          *      ... for host/OHCI use, set "register_host".
42          *  - "B" connector (squarish) or "Mini-B"
43          *      ... for device/gadget use, set "register_dev".
44          *  - "Mini-AB" connector (very similar to Mini-B)
45          *      ... for OTG use as device OR host, initialize "otg"
46          */
47         unsigned        register_host:1;
48         unsigned        register_dev:1;
49         u8              otg;    /* port number, 1-based:  usb1 == 2 */
50
51         u8              hmc_mode;
52
53         /* implicitly true if otg:  host supports remote wakeup? */
54         u8              rwc;
55
56         /* signaling pins used to talk to transceiver on usbN:
57          *  0 == usbN unused
58          *  2 == usb0-only, using internal transceiver
59          *  3 == 3 wire bidirectional
60          *  4 == 4 wire bidirectional
61          *  6 == 6 wire unidirectional (or TLL)
62          */
63         u8              pins[3];
64 };
65
66 struct omap_board_config_entry {
67         u16 tag;
68         u16 len;
69         u8  data[0];
70 };
71
72 struct omap_board_config_kernel {
73         u16 tag;
74         const void *data;
75 };
76
77 extern const void *__omap_get_config(u16 tag, size_t len);
78
79 #define omap_get_config(tag, type) \
80         ((const type *) __omap_get_config((tag), sizeof(type)))
81
82 extern struct omap_board_config_kernel *omap_board_config;
83 extern int omap_board_config_size;
84
85 #endif