diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0009-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0009-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0009-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0009-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch new file mode 100644 index 00000000..4079bcce --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0009-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From f957bb53ba0c0056efd2c10d446ed9cfd6bd62ca Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 3 May 2010 22:31:34 +0200 | ||
4 | Subject: [PATCH 09/45] ARM: OMAP: beagleboard: initialize ds1307 and eeprom only for zippy and zippy2 | ||
5 | |||
6 | --- | ||
7 | arch/arm/mach-omap2/board-omap3beagle.c | 39 +++++++++++++++++++++++++++--- | ||
8 | 1 files changed, 35 insertions(+), 4 deletions(-) | ||
9 | |||
10 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
11 | index c9af202..b3c8cb7 100644 | ||
12 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
13 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | @@ -496,24 +496,55 @@ static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { | ||
15 | }, | ||
16 | }; | ||
17 | |||
18 | + | ||
19 | +#if defined(CONFIG_EEPROM_AT24) || defined(CONFIG_EEPROM_AT24_MODULE) | ||
20 | +#include <linux/i2c/at24.h> | ||
21 | + | ||
22 | +static struct at24_platform_data m24c01 = { | ||
23 | + .byte_len = SZ_1K / 8, | ||
24 | + .page_size = 16, | ||
25 | +}; | ||
26 | + | ||
27 | #if defined(CONFIG_RTC_DRV_DS1307) || \ | ||
28 | defined(CONFIG_RTC_DRV_DS1307_MODULE) | ||
29 | |||
30 | -static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { | ||
31 | +static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = { | ||
32 | { | ||
33 | I2C_BOARD_INFO("ds1307", 0x68), | ||
34 | }, | ||
35 | + { | ||
36 | + I2C_BOARD_INFO("24c01", 0x50), | ||
37 | + .platform_data = &m24c01, | ||
38 | + }, | ||
39 | }; | ||
40 | #else | ||
41 | -static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; | ||
42 | +static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = { | ||
43 | + { | ||
44 | + I2C_BOARD_INFO("24c01", 0x50), | ||
45 | + .platform_data = &m24c01, | ||
46 | + }, | ||
47 | +}; | ||
48 | +#endif | ||
49 | +#else | ||
50 | +static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {}; | ||
51 | #endif | ||
52 | |||
53 | +static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; | ||
54 | + | ||
55 | static int __init omap3_beagle_i2c_init(void) | ||
56 | { | ||
57 | omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, | ||
58 | ARRAY_SIZE(beagle_i2c1_boardinfo)); | ||
59 | - omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, | ||
60 | - ARRAY_SIZE(beagle_i2c2_boardinfo)); | ||
61 | + if(!strcmp(expansionboard_name, "zippy") || !strcmp(expansionboard_name, "zippy2")) | ||
62 | + { | ||
63 | + printk(KERN_INFO "Beagle expansionboard: registering i2c2 bus for zippy/zippy2\n"); | ||
64 | + omap_register_i2c_bus(2, 400, beagle_zippy_i2c2_boardinfo, | ||
65 | + ARRAY_SIZE(beagle_zippy_i2c2_boardinfo)); | ||
66 | + } else | ||
67 | + { | ||
68 | + omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, | ||
69 | + ARRAY_SIZE(beagle_i2c2_boardinfo)); | ||
70 | + } | ||
71 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | ||
72 | * projector don't work reliably with 400kHz */ | ||
73 | omap_register_i2c_bus(3, 100, NULL, 0); | ||
74 | -- | ||
75 | 1.6.6.1 | ||
76 | |||