omap24xx: Fix n810 boot
SVN-Revision: 28683
This commit is contained in:
parent
ef6d7a7e33
commit
f37c24d35f
@ -1,39 +0,0 @@
|
||||
Index: linux-3.1/drivers/cbus/cbus.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/cbus.c 2011-10-30 00:48:42.989047642 +0200
|
||||
+++ linux-3.1/drivers/cbus/cbus.c 2011-10-30 00:48:46.413045272 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
-#include <linux/platform_data/cbus.h>
|
||||
+#include <plat/cbus.h>
|
||||
|
||||
#include "cbus.h"
|
||||
|
||||
Index: linux-3.1/drivers/cbus/retu.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/retu.c 2011-10-30 00:48:42.989047642 +0200
|
||||
+++ linux-3.1/drivers/cbus/retu.c 2011-10-30 00:48:46.413045272 +0200
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_device.h>
|
||||
-#include <linux/platform_data/cbus.h>
|
||||
+#include <plat/cbus.h>
|
||||
|
||||
#include <asm/bitops.h>
|
||||
|
||||
Index: linux-3.1/drivers/cbus/tahvo.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/tahvo.c 2011-10-30 00:48:42.989047642 +0200
|
||||
+++ linux-3.1/drivers/cbus/tahvo.c 2011-10-30 00:48:46.413045272 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_device.h>
|
||||
-#include <linux/platform_data/cbus.h>
|
||||
+#include <plat/cbus.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include "cbus.h"
|
@ -1,8 +1,8 @@
|
||||
Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:29.505056863 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:47.357044479 +0200
|
||||
@@ -15,8 +15,10 @@
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:31:54.096705150 +0100
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:34:46.537525210 +0100
|
||||
@@ -15,8 +15,11 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/init.h>
|
||||
@ -10,18 +10,11 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
#include <linux/io.h>
|
||||
#include <linux/stddef.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/platform_data/cbus.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/usb/musb.h>
|
||||
@@ -33,6 +35,7 @@
|
||||
#include <plat/onenand.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/serial.h>
|
||||
+#include <plat/cbus.h>
|
||||
|
||||
#include "mux.h"
|
||||
|
||||
@@ -193,6 +196,114 @@ static struct omap_onenand_platform_data
|
||||
@@ -193,6 +196,110 @@ static struct omap_onenand_platform_data
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -49,8 +42,6 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
+};
|
||||
+
|
||||
+static struct cbus_retu_platform_data n8x0_retu_data = {
|
||||
+ .irq_base = CBUS_RETU_IRQ_BASE,
|
||||
+ .irq_end = CBUS_RETU_IRQ_END,
|
||||
+ .devid = CBUS_RETU_DEVICE_ID,
|
||||
+};
|
||||
+
|
||||
@ -61,6 +52,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
+ .num_resources = ARRAY_SIZE(retu_resource),
|
||||
+ .dev = {
|
||||
+ .platform_data = &n8x0_retu_data,
|
||||
+ .parent = &n8x0_cbus_device.dev,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
@ -76,11 +68,9 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
+ .id = -1,
|
||||
+ .resource = tahvo_resource,
|
||||
+ .num_resources = ARRAY_SIZE(tahvo_resource),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device tahvo_usb_device = {
|
||||
+ .name = "tahvo-usb",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .parent = &n8x0_cbus_device.dev,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init n8x0_cbus_init(void)
|
||||
@ -124,7 +114,6 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
+
|
||||
+ tahvo_resource[0].start = gpio_to_irq(111);
|
||||
+ platform_device_register(&tahvo_device);
|
||||
+ platform_device_register(&tahvo_usb_device);
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
@ -136,7 +125,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
#if defined(CONFIG_MENELAUS) && \
|
||||
(defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE))
|
||||
|
||||
@@ -679,6 +790,8 @@ static inline void board_serial_init(voi
|
||||
@@ -679,6 +786,8 @@ static inline void board_serial_init(voi
|
||||
static void __init n8x0_init_machine(void)
|
||||
{
|
||||
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
|
||||
@ -145,25 +134,46 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
/* FIXME: add n810 spi devices */
|
||||
spi_register_board_info(n800_spi_board_info,
|
||||
ARRAY_SIZE(n800_spi_board_info));
|
||||
Index: linux-3.1/arch/arm/plat-omap/include/plat/irqs.h
|
||||
Index: linux-3.1/include/linux/platform_data/cbus.h
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/plat-omap/include/plat/irqs.h 2011-10-30 00:48:29.517056855 +0200
|
||||
+++ linux-3.1/arch/arm/plat-omap/include/plat/irqs.h 2011-10-30 00:48:47.357044479 +0200
|
||||
@@ -428,8 +428,16 @@
|
||||
#define OMAP_GPMC_NR_IRQS 8
|
||||
#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
|
||||
|
||||
+/* CBUS */
|
||||
+#define CBUS_RETU_IRQ_BASE OMAP_GPMC_IRQ_END
|
||||
+#ifdef CONFIG_CBUS_RETU
|
||||
+#define CBUS_RETU_NR_IRQS 16
|
||||
+#else
|
||||
+#define CBUS_RETU_NR_IRQS 0
|
||||
+#endif
|
||||
+#define CBUS_RETU_IRQ_END (CBUS_RETU_IRQ_BASE + CBUS_RETU_NR_IRQS)
|
||||
|
||||
-#define NR_IRQS OMAP_GPMC_IRQ_END
|
||||
+#define NR_IRQS CBUS_RETU_IRQ_END
|
||||
|
||||
#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
|
||||
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-3.1/include/linux/platform_data/cbus.h 2011-10-30 19:31:55.452679772 +0100
|
||||
@@ -0,0 +1,38 @@
|
||||
+/*
|
||||
+ * cbus.h - CBUS platform_data definition
|
||||
+ *
|
||||
+ * Copyright (C) 2004 - 2009 Nokia Corporation
|
||||
+ *
|
||||
+ * Written by Felipe Balbi <felipe.balbi@nokia.com>
|
||||
+ *
|
||||
+ * This file is subject to the terms and conditions of the GNU General
|
||||
+ * Public License. See the file "COPYING" in the main directory of this
|
||||
+ * archive for more details.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef __INCLUDE_LINUX_CBUS_H
|
||||
+#define __INCLUDE_LINUX_CBUS_H
|
||||
+
|
||||
+#define CBUS_RETU_DEVICE_ID 0x01
|
||||
+#define CBUS_TAHVO_DEVICE_ID 0x02
|
||||
+
|
||||
+struct cbus_host_platform_data {
|
||||
+ int dat_gpio;
|
||||
+ int clk_gpio;
|
||||
+ int sel_gpio;
|
||||
+};
|
||||
+
|
||||
+struct cbus_retu_platform_data {
|
||||
+ int devid;
|
||||
+};
|
||||
+
|
||||
+#endif /* __INCLUDE_LINUX_CBUS_H */
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:47.357044479 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:48.205044041 +0200
|
||||
@@ -23,6 +23,7 @@
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:31:22.825292085 +0100
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:31:25.817235793 +0100
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/usb/musb.h>
|
||||
#include <sound/tlv320aic3x.h>
|
||||
@ -107,7 +107,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
};
|
||||
|
||||
#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
|
||||
@@ -793,6 +871,7 @@ static void __init n8x0_init_machine(voi
|
||||
@@ -789,6 +867,7 @@ static void __init n8x0_init_machine(voi
|
||||
n8x0_cbus_init();
|
||||
|
||||
/* FIXME: add n810 spi devices */
|
||||
@ -115,7 +115,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
spi_register_board_info(n800_spi_board_info,
|
||||
ARRAY_SIZE(n800_spi_board_info));
|
||||
omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
|
||||
@@ -802,6 +881,8 @@ static void __init n8x0_init_machine(voi
|
||||
@@ -798,6 +877,8 @@ static void __init n8x0_init_machine(voi
|
||||
i2c_register_board_info(2, n810_i2c_board_info_2,
|
||||
ARRAY_SIZE(n810_i2c_board_info_2));
|
||||
board_serial_init();
|
||||
@ -127,8 +127,8 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
Index: linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c 2011-10-30 00:48:48.205044041 +0200
|
||||
@@ -0,0 +1,140 @@
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c 2011-10-30 19:31:25.817235793 +0100
|
||||
@@ -0,0 +1,229 @@
|
||||
+/*
|
||||
+ * linux/arch/arm/mach-omap2/board-n8x0.c
|
||||
+ *
|
||||
@ -150,6 +150,92 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c
|
||||
+#include <plat/lcd_mipid.h>
|
||||
+#include <plat/blizzard.h>
|
||||
+
|
||||
+#include "../../../drivers/cbus/tahvo.h"
|
||||
+
|
||||
+
|
||||
+struct tahvo_pwm_device {
|
||||
+ struct device *dev;
|
||||
+ int tahvo_7bit_backlight;
|
||||
+};
|
||||
+
|
||||
+static struct tahvo_pwm_device *tahvo_pwm;
|
||||
+
|
||||
+static unsigned int tahvo_pwm_get_backlight_level(struct tahvo_pwm_device *pd)
|
||||
+{
|
||||
+ unsigned int mask;
|
||||
+
|
||||
+ if (pd->tahvo_7bit_backlight)
|
||||
+ mask = 0x7f;
|
||||
+ else
|
||||
+ mask = 0x0f;
|
||||
+ return tahvo_read_reg(pd->dev, TAHVO_REG_LEDPWMR) & mask;
|
||||
+}
|
||||
+
|
||||
+static unsigned int tahvo_pwm_get_max_backlight_level(struct tahvo_pwm_device *pd)
|
||||
+{
|
||||
+ if (pd->tahvo_7bit_backlight)
|
||||
+ return 0x7f;
|
||||
+ return 0x0f;
|
||||
+}
|
||||
+
|
||||
+static void tahvo_pwm_set_backlight_level(struct tahvo_pwm_device *pd, unsigned int level)
|
||||
+{
|
||||
+ unsigned int max_level;
|
||||
+
|
||||
+ max_level = tahvo_pwm_get_max_backlight_level(pd);
|
||||
+ if (level > max_level)
|
||||
+ level = max_level;
|
||||
+ tahvo_write_reg(pd->dev, TAHVO_REG_LEDPWMR, level);
|
||||
+}
|
||||
+
|
||||
+static int __init n8x0_tahvo_pwm_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct tahvo_pwm_device *pd;
|
||||
+ unsigned int rev, id;
|
||||
+
|
||||
+ pd = kzalloc(sizeof(*pd), GFP_KERNEL);
|
||||
+ if (WARN_ON(!pd))
|
||||
+ return -ENOMEM;
|
||||
+ pd->dev = &pdev->dev;
|
||||
+
|
||||
+ rev = tahvo_read_reg(pd->dev, TAHVO_REG_ASICR);
|
||||
+ id = (rev >> 8) & 0xff;
|
||||
+ if (id == 0x03) {
|
||||
+ if ((rev & 0xff) >= 0x50)
|
||||
+ pd->tahvo_7bit_backlight = 1;
|
||||
+ } else if (id == 0x0b)
|
||||
+ pd->tahvo_7bit_backlight = 1;
|
||||
+
|
||||
+ dev_set_drvdata(pd->dev, pd);
|
||||
+ tahvo_pwm = pd;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver n8x0_tahvo_pwm_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "tahvo-pwm",
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int __init n8x0_tahvo_pwm_init(void)
|
||||
+{
|
||||
+ return platform_driver_probe(&n8x0_tahvo_pwm_driver, n8x0_tahvo_pwm_probe);
|
||||
+}
|
||||
+fs_initcall(n8x0_tahvo_pwm_init);
|
||||
+
|
||||
+static int n8x0_get_backlight_level(struct mipid_platform_data *pdata)
|
||||
+{
|
||||
+ return tahvo_pwm_get_backlight_level(tahvo_pwm);
|
||||
+}
|
||||
+
|
||||
+static int n8x0_get_max_backlight_level(struct mipid_platform_data *pdata)
|
||||
+{
|
||||
+ return tahvo_pwm_get_max_backlight_level(tahvo_pwm);
|
||||
+}
|
||||
+
|
||||
+static void n8x0_set_backlight_level(struct mipid_platform_data *pdata, int level)
|
||||
+{
|
||||
+ tahvo_pwm_set_backlight_level(tahvo_pwm, level);
|
||||
+}
|
||||
+
|
||||
+#define N8X0_BLIZZARD_POWERDOWN_GPIO 15
|
||||
+
|
||||
@ -166,6 +252,9 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c
|
||||
+
|
||||
+struct mipid_platform_data n8x0_mipid_platform_data = {
|
||||
+ .shutdown = mipid_shutdown,
|
||||
+ .get_bklight_level = n8x0_get_backlight_level,
|
||||
+ .set_bklight_level = n8x0_set_backlight_level,
|
||||
+ .get_bklight_max = n8x0_get_max_backlight_level,
|
||||
+};
|
||||
+
|
||||
+void __init n8x0_mipid_init(void)
|
||||
@ -229,7 +318,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c
|
||||
+static void blizzard_power_up(struct device *dev)
|
||||
+{
|
||||
+ /* Vcore to 1.475V */
|
||||
+//FIXME tahvo_set_clear_reg_bits(0x07, 0, 0xf);
|
||||
+ tahvo_set_clear_reg_bits(tahvo_pwm->dev, 0x07, 0, 0xf);
|
||||
+ msleep(10);
|
||||
+
|
||||
+ blizzard_enable_clocks(1);
|
||||
@ -242,7 +331,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c
|
||||
+ blizzard_enable_clocks(0);
|
||||
+
|
||||
+ /* Vcore to 1.005V */
|
||||
+//FIXME tahvo_set_clear_reg_bits(0x07, 0xf, 0);
|
||||
+ tahvo_set_clear_reg_bits(tahvo_pwm->dev, 0x07, 0xf, 0);
|
||||
+}
|
||||
+
|
||||
+static struct blizzard_platform_data n8x0_blizzard_data = {
|
||||
@ -271,8 +360,8 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c
|
||||
+}
|
||||
Index: linux-3.1/arch/arm/mach-omap2/Makefile
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/Makefile 2011-10-30 00:48:29.461056893 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/Makefile 2011-10-30 00:48:48.205044041 +0200
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/Makefile 2011-10-30 19:14:57.705562343 +0100
|
||||
+++ linux-3.1/arch/arm/mach-omap2/Makefile 2011-10-30 19:31:25.817235793 +0100
|
||||
@@ -209,6 +209,7 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += boar
|
||||
hsmmc.o \
|
||||
board-flash.o
|
||||
@ -283,8 +372,8 @@ Index: linux-3.1/arch/arm/mach-omap2/Makefile
|
||||
hsmmc.o
|
||||
Index: linux-3.1/arch/arm/mach-omap2/omap_hwmod_2420_data.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/omap_hwmod_2420_data.c 2011-10-30 00:48:29.441056907 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/omap_hwmod_2420_data.c 2011-10-30 00:48:48.205044041 +0200
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/omap_hwmod_2420_data.c 2011-10-30 19:14:57.689562700 +0100
|
||||
+++ linux-3.1/arch/arm/mach-omap2/omap_hwmod_2420_data.c 2011-10-30 19:31:25.817235793 +0100
|
||||
@@ -1181,6 +1181,7 @@ static struct omap_hwmod_ocp_if *omap242
|
||||
|
||||
static struct omap_hwmod omap2420_gpio1_hwmod = {
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:48.205044041 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:49.837042881 +0200
|
||||
@@ -24,6 +24,8 @@
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:31:56.000000000 +0100
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:32:22.288178756 +0100
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <linux/usb/musb.h>
|
||||
#include <sound/tlv320aic3x.h>
|
||||
#include <linux/spi/tsc2005.h>
|
||||
@ -12,9 +12,9 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach-types.h>
|
||||
@@ -37,6 +39,7 @@
|
||||
#include <plat/onenand.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/serial.h>
|
||||
#include <plat/cbus.h>
|
||||
+#include <plat/gpio-switch.h>
|
||||
|
||||
#include "mux.h"
|
||||
@ -172,7 +172,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
#define TUSB6010_ASYNC_CS 1
|
||||
#define TUSB6010_SYNC_CS 4
|
||||
#define TUSB6010_GPIO_INT 58
|
||||
@@ -799,6 +948,11 @@ static struct aic3x_pdata n810_aic33_dat
|
||||
@@ -795,6 +944,11 @@ static struct aic3x_pdata n810_aic33_dat
|
||||
};
|
||||
|
||||
static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
|
||||
@ -184,7 +184,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
{
|
||||
I2C_BOARD_INFO("tlv320aic3x", 0x18),
|
||||
.platform_data = &n810_aic33_data,
|
||||
@@ -868,7 +1022,9 @@ static inline void board_serial_init(voi
|
||||
@@ -864,7 +1018,9 @@ static inline void board_serial_init(voi
|
||||
static void __init n8x0_init_machine(void)
|
||||
{
|
||||
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
|
||||
@ -194,48 +194,3 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
|
||||
/* FIXME: add n810 spi devices */
|
||||
tsc2005_set_config();
|
||||
Index: linux-3.1/arch/arm/plat-omap/include/plat/cbus.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-3.1/arch/arm/plat-omap/include/plat/cbus.h 2011-10-30 00:48:49.837042881 +0200
|
||||
@@ -0,0 +1,40 @@
|
||||
+/*
|
||||
+ * cbus.h - CBUS platform_data definition
|
||||
+ *
|
||||
+ * Copyright (C) 2004 - 2009 Nokia Corporation
|
||||
+ *
|
||||
+ * Written by Felipe Balbi <felipe.balbi@nokia.com>
|
||||
+ *
|
||||
+ * This file is subject to the terms and conditions of the GNU General
|
||||
+ * Public License. See the file "COPYING" in the main directory of this
|
||||
+ * archive for more details.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef __PLAT_CBUS_H
|
||||
+#define __PLAT_CBUS_H
|
||||
+
|
||||
+#define CBUS_RETU_DEVICE_ID 0x01
|
||||
+#define CBUS_TAHVO_DEVICE_ID 0x02
|
||||
+
|
||||
+struct cbus_host_platform_data {
|
||||
+ int dat_gpio;
|
||||
+ int clk_gpio;
|
||||
+ int sel_gpio;
|
||||
+};
|
||||
+
|
||||
+struct cbus_retu_platform_data {
|
||||
+ int irq_base;
|
||||
+ int irq_end;
|
||||
+ int devid;
|
||||
+};
|
||||
+
|
||||
+#endif /* __PLAT_CBUS_H */
|
||||
|
@ -10,9 +10,9 @@ This patch adds TSC2301 init logic to N800 board file
|
||||
|
||||
Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:49.837042881 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:50.813042079 +0200
|
||||
@@ -26,6 +26,7 @@
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:32:22.288178756 +0100
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:32:26.840094004 +0100
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/spi/tsc2005.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/i2c/lm8323.h>
|
||||
@ -182,7 +182,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
};
|
||||
|
||||
#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
|
||||
@@ -1027,9 +1144,17 @@ static void __init n8x0_init_machine(voi
|
||||
@@ -1023,9 +1140,17 @@ static void __init n8x0_init_machine(voi
|
||||
n8x0_bt_init();
|
||||
|
||||
/* FIXME: add n810 spi devices */
|
||||
@ -203,7 +203,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
|
||||
ARRAY_SIZE(n8x0_i2c_board_info_1));
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
@@ -1039,6 +1164,8 @@ static void __init n8x0_init_machine(voi
|
||||
@@ -1035,6 +1160,8 @@ static void __init n8x0_init_machine(voi
|
||||
board_serial_init();
|
||||
n8x0_mipid_init();
|
||||
n8x0_blizzard_init();
|
||||
|
@ -1,10 +1,10 @@
|
||||
Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:51.565042059 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:54.637039450 +0200
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:32:29.896037143 +0100
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:32:32.839982394 +0100
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/serial.h>
|
||||
#include <plat/cbus.h>
|
||||
#include <plat/gpio-switch.h>
|
||||
+#include <plat/usb.h>
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
---
|
||||
arch/arm/mach-omap2/board-n8x0-lcd.c | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
Index: linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0-lcd.c 2011-10-30 00:48:48.205044041 +0200
|
||||
+++ linux-3.1/arch/arm/mach-omap2/board-n8x0-lcd.c 2011-10-30 00:48:56.685038042 +0200
|
||||
@@ -33,8 +33,28 @@ static void mipid_shutdown(struct mipid_
|
||||
}
|
||||
}
|
||||
|
||||
+static int n8x0_get_backlight_level(struct mipid_platform_data *pdata)
|
||||
+{
|
||||
+//FIXME return tahvo_get_backlight_level();
|
||||
+return 0;
|
||||
+}
|
||||
+
|
||||
+static int n8x0_get_max_backlight_level(struct mipid_platform_data *pdata)
|
||||
+{
|
||||
+//FIXME return tahvo_get_max_backlight_level();
|
||||
+return 0;
|
||||
+}
|
||||
+
|
||||
+static void n8x0_set_backlight_level(struct mipid_platform_data *pdata, int level)
|
||||
+{
|
||||
+//FIXME tahvo_set_backlight_level(level);
|
||||
+}
|
||||
+
|
||||
struct mipid_platform_data n8x0_mipid_platform_data = {
|
||||
.shutdown = mipid_shutdown,
|
||||
+ .get_bklight_level = n8x0_get_backlight_level,
|
||||
+ .set_bklight_level = n8x0_set_backlight_level,
|
||||
+ .get_bklight_max = n8x0_get_max_backlight_level,
|
||||
};
|
||||
|
||||
void __init n8x0_mipid_init(void)
|
@ -1,7 +1,7 @@
|
||||
Index: linux-3.1/drivers/cbus/Kconfig
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/Kconfig 2011-10-30 00:48:42.989047642 +0200
|
||||
+++ linux-3.1/drivers/cbus/Kconfig 2011-10-30 00:48:58.765036552 +0200
|
||||
--- linux-3.1.orig/drivers/cbus/Kconfig 2011-10-30 19:14:57.000000000 +0100
|
||||
+++ linux-3.1/drivers/cbus/Kconfig 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -83,4 +83,12 @@ config CBUS_RETU_HEADSET
|
||||
|
||||
endif # CBUS_RETU
|
||||
@ -17,8 +17,8 @@ Index: linux-3.1/drivers/cbus/Kconfig
|
||||
endmenu
|
||||
Index: linux-3.1/drivers/cbus/Makefile
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/Makefile 2011-10-30 00:48:42.989047642 +0200
|
||||
+++ linux-3.1/drivers/cbus/Makefile 2011-10-30 00:48:58.765036552 +0200
|
||||
--- linux-3.1.orig/drivers/cbus/Makefile 2011-10-30 19:14:57.000000000 +0100
|
||||
+++ linux-3.1/drivers/cbus/Makefile 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -11,3 +11,6 @@ obj-$(CONFIG_CBUS_RETU_POWERBUTTON) += r
|
||||
obj-$(CONFIG_CBUS_RETU_RTC) += retu-rtc.o
|
||||
obj-$(CONFIG_CBUS_RETU_WDT) += retu-wdt.o
|
||||
@ -29,7 +29,7 @@ Index: linux-3.1/drivers/cbus/Makefile
|
||||
Index: linux-3.1/drivers/cbus/n810bm_main.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-3.1/drivers/cbus/n810bm_main.c 2011-10-30 00:48:58.765036552 +0200
|
||||
+++ linux-3.1/drivers/cbus/n810bm_main.c 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -0,0 +1,1586 @@
|
||||
+/*
|
||||
+ * Nokia n810 battery management
|
||||
@ -1620,7 +1620,7 @@ Index: linux-3.1/drivers/cbus/n810bm_main.c
|
||||
Index: linux-3.1/drivers/cbus/lipocharge.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-3.1/drivers/cbus/lipocharge.c 2011-10-30 00:48:58.765036552 +0200
|
||||
+++ linux-3.1/drivers/cbus/lipocharge.c 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -0,0 +1,183 @@
|
||||
+/*
|
||||
+ * Generic LIPO battery charger
|
||||
@ -1808,7 +1808,7 @@ Index: linux-3.1/drivers/cbus/lipocharge.c
|
||||
Index: linux-3.1/drivers/cbus/lipocharge.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-3.1/drivers/cbus/lipocharge.h 2011-10-30 00:48:58.765036552 +0200
|
||||
+++ linux-3.1/drivers/cbus/lipocharge.h 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+#ifndef LIPOCHARGE_H_
|
||||
+#define LIPOCHARGE_H_
|
||||
@ -1872,12 +1872,12 @@ Index: linux-3.1/drivers/cbus/lipocharge.h
|
||||
+#endif /* LIPOCHARGE_H_ */
|
||||
Index: linux-3.1/drivers/cbus/cbus.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/cbus.c 2011-10-30 00:48:46.413045272 +0200
|
||||
+++ linux-3.1/drivers/cbus/cbus.c 2011-10-30 00:48:58.765036552 +0200
|
||||
--- linux-3.1.orig/drivers/cbus/cbus.c 2011-10-30 19:31:35.000000000 +0100
|
||||
+++ linux-3.1/drivers/cbus/cbus.c 2011-10-30 19:33:12.107254808 +0100
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <plat/cbus.h>
|
||||
#include <linux/platform_data/cbus.h>
|
||||
+#include <linux/reboot.h>
|
||||
|
||||
#include "cbus.h"
|
||||
@ -1898,8 +1898,8 @@ Index: linux-3.1/drivers/cbus/cbus.c
|
||||
MODULE_AUTHOR("Juha Yrjölä");
|
||||
Index: linux-3.1/drivers/cbus/cbus.h
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/cbus.h 2011-10-30 00:48:42.989047642 +0200
|
||||
+++ linux-3.1/drivers/cbus/cbus.h 2011-10-30 00:48:58.765036552 +0200
|
||||
--- linux-3.1.orig/drivers/cbus/cbus.h 2011-10-30 19:14:57.000000000 +0100
|
||||
+++ linux-3.1/drivers/cbus/cbus.h 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -27,4 +27,6 @@ extern int cbus_read_reg(struct device *
|
||||
extern int cbus_write_reg(struct device *, unsigned dev, unsigned reg,
|
||||
unsigned val);
|
||||
@ -1909,8 +1909,8 @@ Index: linux-3.1/drivers/cbus/cbus.h
|
||||
#endif /* __DRIVERS_CBUS_CBUS_H */
|
||||
Index: linux-3.1/drivers/cbus/retu.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/retu.c 2011-10-30 00:48:46.413045272 +0200
|
||||
+++ linux-3.1/drivers/cbus/retu.c 2011-10-30 00:48:58.765036552 +0200
|
||||
--- linux-3.1.orig/drivers/cbus/retu.c 2011-10-30 19:31:35.000000000 +0100
|
||||
+++ linux-3.1/drivers/cbus/retu.c 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -417,6 +417,11 @@ static int retu_allocate_children(struct
|
||||
if (!child)
|
||||
return -ENOMEM;
|
||||
@ -1925,8 +1925,8 @@ Index: linux-3.1/drivers/cbus/retu.c
|
||||
|
||||
Index: linux-3.1/drivers/cbus/tahvo.c
|
||||
===================================================================
|
||||
--- linux-3.1.orig/drivers/cbus/tahvo.c 2011-10-30 00:48:46.413045272 +0200
|
||||
+++ linux-3.1/drivers/cbus/tahvo.c 2011-10-30 00:48:58.765036552 +0200
|
||||
--- linux-3.1.orig/drivers/cbus/tahvo.c 2011-10-30 19:31:35.000000000 +0100
|
||||
+++ linux-3.1/drivers/cbus/tahvo.c 2011-10-30 19:32:58.263510754 +0100
|
||||
@@ -129,6 +129,7 @@ void tahvo_set_clear_reg_bits(struct dev
|
||||
__tahvo_write_reg(tahvo, reg, w);
|
||||
mutex_unlock(&tahvo->mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user