summaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch')
-rw-r--r--recipes/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch b/recipes/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch
new file mode 100644
index 0000000000..205cb7e311
--- /dev/null
+++ b/recipes/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagleboard-initialize-ds1307-and-eeprom-on.patch
@@ -0,0 +1,76 @@
+From 5544b0a8c422e75c5d372232b494a4652008f048 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Mon, 3 May 2010 22:31:34 +0200
+Subject: [PATCH 45/45] ARM: OMAP: beagleboard: initialize ds1307 and eeprom only for zippy and zippy2
+
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 39 +++++++++++++++++++++++++++---
+ 1 files changed, 35 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index 4dbb109..dd830b1 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -501,24 +501,55 @@ static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = {
+ },
+ };
+
++
++#if defined(CONFIG_EEPROM_AT24) || defined(CONFIG_EEPROM_AT24_MODULE)
++#include <linux/i2c/at24.h>
++
++static struct at24_platform_data m24c01 = {
++ .byte_len = SZ_1K / 8,
++ .page_size = 16,
++};
++
+ #if defined(CONFIG_RTC_DRV_DS1307) || \
+ defined(CONFIG_RTC_DRV_DS1307_MODULE)
+
+-static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
++static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {
+ {
+ I2C_BOARD_INFO("ds1307", 0x68),
+ },
++ {
++ I2C_BOARD_INFO("24c01", 0x50),
++ .platform_data = &m24c01,
++ },
+ };
+ #else
+-static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {};
++static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {
++ {
++ I2C_BOARD_INFO("24c01", 0x50),
++ .platform_data = &m24c01,
++ },
++};
++#endif
++#else
++static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {};
+ #endif
+
++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {};
++
+ static int __init omap3_beagle_i2c_init(void)
+ {
+ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo,
+ ARRAY_SIZE(beagle_i2c1_boardinfo));
+- omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo,
+- ARRAY_SIZE(beagle_i2c2_boardinfo));
++ if(!strcmp(expansionboard_name, "zippy") || !strcmp(expansionboard_name, "zippy2"))
++ {
++ printk(KERN_INFO "Beagle expansionboard: registering i2c2 bus for zippy/zippy2\n");
++ omap_register_i2c_bus(2, 400, beagle_zippy_i2c2_boardinfo,
++ ARRAY_SIZE(beagle_zippy_i2c2_boardinfo));
++ } else
++ {
++ omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo,
++ ARRAY_SIZE(beagle_i2c2_boardinfo));
++ }
+ /* Bus 3 is attached to the DVI port where devices like the pico DLP
+ * projector don't work reliably with 400kHz */
+ omap_register_i2c_bus(3, 100, NULL, 0);
+--
+1.6.6.1
+