Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
simone.c
Go to the documentation of this file.
1 /*
2  * arch/arm/mach-ep93xx/simone.c
3  * Simplemachines Sim.One support.
4  *
5  * Copyright (C) 2010 Ryan Mallon
6  *
7  * Based on the 2.6.24.7 support:
8  * Copyright (C) 2009 Simplemachines
9  * MMC support by Peter Ivanov <[email protected]>, 2007
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or (at
14  * your option) any later version.
15  *
16  */
17 
18 #include <linux/kernel.h>
19 #include <linux/init.h>
20 #include <linux/platform_device.h>
21 #include <linux/i2c.h>
22 #include <linux/i2c-gpio.h>
23 
24 #include <mach/hardware.h>
26 #include <mach/gpio-ep93xx.h>
27 
28 #include <asm/hardware/vic.h>
29 #include <asm/mach-types.h>
30 #include <asm/mach/arch.h>
31 
32 #include "soc.h"
33 
34 static struct ep93xx_eth_data __initdata simone_eth_data = {
35  .phy_id = 1,
36 };
37 
38 static struct ep93xxfb_mach_info __initdata simone_fb_info = {
39  .num_modes = EP93XXFB_USE_MODEDB,
40  .bpp = 16,
42 };
43 
44 static struct i2c_gpio_platform_data __initdata simone_i2c_gpio_data = {
45  .sda_pin = EP93XX_GPIO_LINE_EEDAT,
46  .sda_is_open_drain = 0,
47  .scl_pin = EP93XX_GPIO_LINE_EECLK,
48  .scl_is_open_drain = 0,
49  .udelay = 0,
50  .timeout = 0,
51 };
52 
53 static struct i2c_board_info __initdata simone_i2c_board_info[] = {
54  {
55  I2C_BOARD_INFO("ds1337", 0x68),
56  },
57 };
58 
59 static struct platform_device simone_audio_device = {
60  .name = "simone-audio",
61  .id = -1,
62 };
63 
64 static void __init simone_register_audio(void)
65 {
67  platform_device_register(&simone_audio_device);
68 }
69 
70 static void __init simone_init_machine(void)
71 {
74  ep93xx_register_eth(&simone_eth_data, 1);
75  ep93xx_register_fb(&simone_fb_info);
76  ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info,
77  ARRAY_SIZE(simone_i2c_board_info));
78  simone_register_audio();
79 }
80 
81 MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
82  /* Maintainer: Ryan Mallon */
83  .atag_offset = 0x100,
84  .map_io = ep93xx_map_io,
85  .init_irq = ep93xx_init_irq,
86  .handle_irq = vic_handle_irq,
87  .timer = &ep93xx_timer,
88  .init_machine = simone_init_machine,
89  .init_late = ep93xx_init_late,
90  .restart = ep93xx_restart,