aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-generic.c')
-rw-r--r--arch/arm/mach-omap1/board-generic.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index 122796ebe8f5..c209c7172a9a 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -48,19 +48,43 @@ static struct omap_usb_config generic1510_usb_config __initdata = {
48 48
49#if defined(CONFIG_ARCH_OMAP16XX) 49#if defined(CONFIG_ARCH_OMAP16XX)
50static struct omap_usb_config generic1610_usb_config __initdata = { 50static struct omap_usb_config generic1610_usb_config __initdata = {
51#ifdef CONFIG_USB_OTG
52 .otg = 1,
53#endif
51 .register_host = 1, 54 .register_host = 1,
52 .register_dev = 1, 55 .register_dev = 1,
53 .hmc_mode = 16, 56 .hmc_mode = 16,
54 .pins[0] = 6, 57 .pins[0] = 6,
55}; 58};
59
60static struct omap_mmc_config generic_mmc_config __initdata = {
61 .mmc [0] = {
62 .enabled = 0,
63 .wire4 = 0,
64 .wp_pin = -1,
65 .power_pin = -1,
66 .switch_pin = -1,
67 },
68 .mmc [1] = {
69 .enabled = 0,
70 .wire4 = 0,
71 .wp_pin = -1,
72 .power_pin = -1,
73 .switch_pin = -1,
74 },
75};
76
56#endif 77#endif
57 78
58static struct omap_board_config_kernel generic_config[] = { 79static struct omap_board_config_kernel generic_config[] = {
59 { OMAP_TAG_USB, NULL }, 80 { OMAP_TAG_USB, NULL },
81 { OMAP_TAG_MMC, &generic_mmc_config },
60}; 82};
61 83
62static void __init omap_generic_init(void) 84static void __init omap_generic_init(void)
63{ 85{
86 const struct omap_uart_config *uart_conf;
87
64 /* 88 /*
65 * Make sure the serial ports are muxed on at this point. 89 * Make sure the serial ports are muxed on at this point.
66 * You have to mux them off in device drivers later on 90 * You have to mux them off in device drivers later on
@@ -76,6 +100,18 @@ static void __init omap_generic_init(void)
76 generic_config[0].data = &generic1610_usb_config; 100 generic_config[0].data = &generic1610_usb_config;
77 } 101 }
78#endif 102#endif
103
104 uart_conf = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
105 if (uart_conf != NULL) {
106 unsigned int enabled_ports, i;
107
108 enabled_ports = uart_conf->enabled_uarts;
109 for (i = 0; i < 3; i++) {
110 if (!(enabled_ports & (1 << i)))
111 generic_serial_ports[i] = 0;
112 }
113 }
114
79 omap_board_config = generic_config; 115 omap_board_config = generic_config;
80 omap_board_config_size = ARRAY_SIZE(generic_config); 116 omap_board_config_size = ARRAY_SIZE(generic_config);
81 omap_serial_init(generic_serial_ports); 117 omap_serial_init(generic_serial_ports);
@@ -83,7 +119,7 @@ static void __init omap_generic_init(void)
83 119
84static void __init omap_generic_map_io(void) 120static void __init omap_generic_map_io(void)
85{ 121{
86 omap_map_common_io() 122 omap_map_common_io();
87} 123}
88 124
89MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") 125MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")