USB: BEAGLE: Add usb support for omap3beagle
[pandora-kernel.git] / arch / arm / mach-omap2 / board-omap3beagle.c
1 /*
2  * linux/arch/arm/mach-omap2/board-omap3beagle.c
3  *
4  * Copyright (C) 2008 Texas Instruments
5  *
6  * Modified from mach-omap2/board-3430sdp.c
7  *
8  * Initial code: Syed Mohammed Khasim
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  */
14
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
18 #include <linux/delay.h>
19 #include <linux/err.h>
20 #include <linux/clk.h>
21 #include <linux/io.h>
22
23 #include <asm/hardware.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach/map.h>
27
28 #include <asm/arch/gpio.h>
29 #include <asm/arch/board.h>
30 #include <asm/arch/usb-musb.h>
31 #include <asm/arch/usb-ehci.h>
32 #include <asm/arch/common.h>
33
34 static struct omap_uart_config omap3_beagle_uart_config __initdata = {
35         .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
36 };
37
38 static int __init omap3_beagle_i2c_init(void)
39 {
40         omap_register_i2c_bus(1, 2600, NULL, 0);
41         omap_register_i2c_bus(2, 400, NULL, 0);
42         omap_register_i2c_bus(3, 400, NULL, 0);
43         return 0;
44 }
45
46 static void __init omap3_beagle_init_irq(void)
47 {
48         omap2_init_common_hw();
49         omap_init_irq();
50         omap_gpio_init();
51 }
52
53 static struct omap_mmc_config omap3beagle_mmc_config __initdata = {
54         .mmc [0] = {
55                 .enabled        = 1,
56                 .wire4          = 1,
57         },
58 };
59
60 static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
61         { OMAP_TAG_UART,        &omap3_beagle_uart_config },
62         { OMAP_TAG_MMC,         &omap3beagle_mmc_config },
63 };
64
65 static void __init omap3_beagle_init(void)
66 {
67         omap_board_config = omap3_beagle_config;
68         omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
69         omap_serial_init();
70         sdp_mmc_init();
71         usb_musb_init();
72         usb_ehci_init();
73 }
74
75 arch_initcall(omap3_beagle_i2c_init);
76
77 static void __init omap3_beagle_map_io(void)
78 {
79         omap2_set_globals_343x();
80         omap2_map_common_io();
81 }
82
83 MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
84         /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
85         .phys_io        = 0x48000000,
86         .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
87         .boot_params    = 0x80000100,
88         .map_io         = omap3_beagle_map_io,
89         .init_irq       = omap3_beagle_init_irq,
90         .init_machine   = omap3_beagle_init,
91         .timer          = &omap_timer,
92 MACHINE_END