mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-05-30 07:20:53 +00:00
linux-omap-psp-2.6.32: remove old linux-omap3 PSP kernel
* Many machines are supported by newer 3.x kernel recipes * Few old platforms are still supported by 2.6.37 recipes * Some platforms are not supported in meta-ti, like Crane, Touchbook, Overo * For any platform still requiring this outdated kernel, the recipe can be picked up from Danny or Denzil Signed-off-by: Denys Dmytriyenko <denys@ti.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
-28
@@ -1,28 +0,0 @@
|
||||
From 1c63789190687e20ddbed3084e7ae893176d0dd6 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Kridner <jkridner@beagleboard.org>
|
||||
Date: Sat, 17 Jul 2010 14:28:22 -0500
|
||||
Subject: [PATCH] BeagleBoard: Adjust USER button pin for xM
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 1e8b77b..2677b41 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -854,6 +854,11 @@ static void __init omap3_beagle_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap3_beagle_i2c_init();
|
||||
+
|
||||
+ if (cpu_is_omap3630()) {
|
||||
+ gpio_buttons[0].gpio = 4;
|
||||
+ }
|
||||
+
|
||||
platform_add_devices(omap3_beagle_devices,
|
||||
ARRAY_SIZE(omap3_beagle_devices));
|
||||
omap_serial_init();
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
From e618eb6ab097d2f655ee6094d5e3c0dc603d7242 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 19 Jan 2011 16:30:06 +0100
|
||||
Subject: [PATCH 1/2] OMAP3: craneboard: print expansionboard name detected from uboot
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am3517crane.c | 13 +++++++++++++
|
||||
1 files changed, 13 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
index 0bf4f60..300a79d 100644
|
||||
--- a/arch/arm/mach-omap2/board-am3517crane.c
|
||||
+++ b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
@@ -55,6 +55,8 @@
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
|
||||
+char expansionboard_name[16];
|
||||
+
|
||||
static struct mtd_partition am3517crane_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
{
|
||||
@@ -724,6 +726,15 @@ static struct am3517_hsmmc_info mmc[] = {
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
+static int __init expansionboard_setup(char *str)
|
||||
+{
|
||||
+ if (!str)
|
||||
+ return -EINVAL;
|
||||
+ strncpy(expansionboard_name, str, 16);
|
||||
+ printk(KERN_INFO "Crane expansionboard: %s\n", expansionboard_name);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void __init am3517_crane_init(void)
|
||||
{
|
||||
|
||||
@@ -762,6 +773,8 @@ static void __init am3517_crane_map_io(void)
|
||||
omap2_map_common_io();
|
||||
}
|
||||
|
||||
+early_param("buddy", expansionboard_setup);
|
||||
+
|
||||
MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-88333
File diff suppressed because it is too large
Load Diff
-67
@@ -1,67 +0,0 @@
|
||||
From 09b6266a567b22e07200973312ffb8f43e7f7d43 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Fri, 30 Apr 2010 11:12:24 +0200
|
||||
Subject: [PATCH 01/45] Revert "omap3: beagle: Fix compile-time errors"
|
||||
|
||||
This commit clashes with the other beagle patches we apply on top
|
||||
|
||||
This reverts commit da5b291cba631d303cb137fa6a620c494d828197.
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 34 ++----------------------------
|
||||
1 files changed, 3 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index c5da58e..330fb25 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -56,22 +56,6 @@
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
|
||||
-#ifdef CONFIG_PM
|
||||
-static struct omap_opp * _omap35x_mpu_rate_table = omap35x_mpu_rate_table;
|
||||
-static struct omap_opp * _omap37x_mpu_rate_table = omap37x_mpu_rate_table;
|
||||
-static struct omap_opp * _omap35x_dsp_rate_table = omap35x_dsp_rate_table;
|
||||
-static struct omap_opp * _omap37x_dsp_rate_table = omap37x_dsp_rate_table;
|
||||
-static struct omap_opp * _omap35x_l3_rate_table = omap35x_l3_rate_table;
|
||||
-static struct omap_opp * _omap37x_l3_rate_table = omap37x_l3_rate_table;
|
||||
-#else /* CONFIG_PM */
|
||||
-static struct omap_opp * _omap35x_mpu_rate_table = NULL;
|
||||
-static struct omap_opp * _omap37x_mpu_rate_table = NULL;
|
||||
-static struct omap_opp * _omap35x_dsp_rate_table = NULL;
|
||||
-static struct omap_opp * _omap37x_dsp_rate_table = NULL;
|
||||
-static struct omap_opp * _omap35x_l3_rate_table = NULL;
|
||||
-static struct omap_opp * _omap37x_l3_rate_table = NULL;
|
||||
-#endif /* CONFIG_PM */
|
||||
-
|
||||
static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
{
|
||||
@@ -377,21 +361,9 @@ static void __init omap3_beagle_init_irq(void)
|
||||
{
|
||||
omap_board_config = omap3_beagle_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
|
||||
-
|
||||
- if (cpu_is_omap3630()) {
|
||||
- omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
- mt46h32m32lf6_sdrc_params,
|
||||
- _omap37x_mpu_rate_table,
|
||||
- _omap37x_dsp_rate_table,
|
||||
- _omap37x_l3_rate_table);
|
||||
- } else {
|
||||
- omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
- mt46h32m32lf6_sdrc_params,
|
||||
- _omap35x_mpu_rate_table,
|
||||
- _omap35x_dsp_rate_table,
|
||||
- _omap35x_l3_rate_table);
|
||||
- }
|
||||
-
|
||||
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
+ mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table,
|
||||
+ omap3_dsp_rate_table, omap3_l3_rate_table);
|
||||
omap_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
omap2_gp_clockevent_set_gptimer(12);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
From 787c524fc478068d18eef72f43074b47722e50b0 Mon Sep 17 00:00:00 2001
|
||||
From: Greg KH <gregkh@suse.de>
|
||||
Date: Thu, 5 Aug 2010 13:53:35 -0700
|
||||
Subject: [PATCH] cgroupfs: create /sys/fs/cgroup to mount cgroupfs on
|
||||
|
||||
We really shouldn't be asking userspace to create new root filesystems.
|
||||
So follow along with all of the other in-kernel filesystems, and provide
|
||||
a mount point in sysfs.
|
||||
|
||||
For cgroupfs, this should be in /sys/fs/cgroup/ This change provides
|
||||
that mount point when the cgroup filesystem is registered in the kernel.
|
||||
|
||||
Acked-by: Paul Menage <menage@google.com>
|
||||
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
|
||||
Cc: Li Zefan <lizf@cn.fujitsu.com>
|
||||
Cc: Lennart Poettering <lennart@poettering.net>
|
||||
Cc: Kay Sievers <kay.sievers@vrfy.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
kernel/cgroup.c | 13 ++++++++++++-
|
||||
1 files changed, 12 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
|
||||
index 0249f4b..db21dd8 100644
|
||||
--- a/kernel/cgroup.c
|
||||
+++ b/kernel/cgroup.c
|
||||
@@ -1472,6 +1472,8 @@ static struct file_system_type cgroup_fs_type = {
|
||||
.kill_sb = cgroup_kill_sb,
|
||||
};
|
||||
|
||||
+static struct kobject *cgroup_kobj;
|
||||
+
|
||||
static inline struct cgroup *__d_cgrp(struct dentry *dentry)
|
||||
{
|
||||
return dentry->d_fsdata;
|
||||
@@ -3283,9 +3285,18 @@ int __init cgroup_init(void)
|
||||
hhead = css_set_hash(init_css_set.subsys);
|
||||
hlist_add_head(&init_css_set.hlist, hhead);
|
||||
BUG_ON(!init_root_id(&rootnode));
|
||||
+
|
||||
+ cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj);
|
||||
+ if (!cgroup_kobj) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
err = register_filesystem(&cgroup_fs_type);
|
||||
- if (err < 0)
|
||||
+ if (err < 0) {
|
||||
+ kobject_put(cgroup_kobj);
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
proc_create("cgroups", 0, NULL, &proc_cgroupstats_operations);
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
From ba5fd3ed4031a826309ab26045d27dbef88de418 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 19 Jan 2011 16:36:09 +0100
|
||||
Subject: [PATCH 2/2] OMAP3: craneboard: add support for TinCanTools Trainer expansion board
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am3517crane.c | 31 +++++++++++++++++++++++++++++++
|
||||
1 files changed, 31 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
index 300a79d..cbe2174 100644
|
||||
--- a/arch/arm/mach-omap2/board-am3517crane.c
|
||||
+++ b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
@@ -747,6 +747,37 @@ static void __init am3517_crane_init(void)
|
||||
am3517crane_flash_init();
|
||||
usb_musb_init();
|
||||
|
||||
+ if(!strcmp(expansionboard_name, "trainer"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n");
|
||||
+ gpio_request(130, "sysfs");
|
||||
+ gpio_export(130, 1);
|
||||
+ gpio_request(131, "sysfs");
|
||||
+ gpio_export(131, 1);
|
||||
+ gpio_request(132, "sysfs");
|
||||
+ gpio_export(132, 1);
|
||||
+ gpio_request(133, "sysfs");
|
||||
+ gpio_export(133, 1);
|
||||
+ gpio_request(134, "sysfs");
|
||||
+ gpio_export(134, 1);
|
||||
+ gpio_request(135, "sysfs");
|
||||
+ gpio_export(135, 1);
|
||||
+ gpio_request(136, "sysfs");
|
||||
+ gpio_export(136, 1);
|
||||
+ gpio_request(137, "sysfs");
|
||||
+ gpio_export(137, 1);
|
||||
+ gpio_request(138, "sysfs");
|
||||
+ gpio_export(138, 1);
|
||||
+ gpio_request(139, "sysfs");
|
||||
+ gpio_export(139, 1);
|
||||
+ gpio_request(140, "sysfs");
|
||||
+ gpio_export(140, 1);
|
||||
+ gpio_request(141, "sysfs");
|
||||
+ gpio_export(141, 1);
|
||||
+ gpio_request(162, "sysfs");
|
||||
+ gpio_export(162, 1);
|
||||
+ }
|
||||
+
|
||||
/* Configure GPIO for EHCI port */
|
||||
omap_mux_init_gpio(35, OMAP_PIN_OUTPUT);
|
||||
gpio_request(35, "usb_ehci_enable");
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
From 5e84443afe149d9f503b63b1c87f23b807fe9e46 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <k-kooi@ti.com>
|
||||
Date: Sat, 30 Jan 2010 15:49:15 +0100
|
||||
Subject: [PATCH 02/45] board-omap3touchbook: make it build against TI linux-omap 2.6.32-PSP
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3touchbook.c | 11 +++++++++--
|
||||
1 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
index fe3d22c..fc3e03c 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/irq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
|
||||
@@ -48,12 +49,18 @@
|
||||
#include <plat/nand.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/timer-gp.h>
|
||||
+#include <plat/clock.h>
|
||||
+#include <plat/omap-pm.h>
|
||||
|
||||
#include "mux.h"
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
+#include "pm.h"
|
||||
+#include "omap3-opp.h"
|
||||
+
|
||||
#include <asm/setup.h>
|
||||
|
||||
+
|
||||
#define GPMC_CS0_BASE 0x60
|
||||
#define GPMC_CS_SIZE 0x30
|
||||
|
||||
@@ -78,7 +85,6 @@ static struct mtd_partition omap3touchbook_nand_partitions[] = {
|
||||
.name = "U-Boot",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
|
||||
.size = 15 * NAND_BLOCK_SIZE,
|
||||
- .mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "U-Boot Env",
|
||||
@@ -440,7 +446,8 @@ static void __init omap3_touchbook_init_irq(void)
|
||||
omap_board_config = omap3_touchbook_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
- mt46h32m32lf6_sdrc_params);
|
||||
+ mt46h32m32lf6_sdrc_params, omap35x_mpu_rate_table,
|
||||
+ omap35x_dsp_rate_table, omap35x_l3_rate_table);
|
||||
omap_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
omap2_gp_clockevent_set_gptimer(12);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-135
@@ -1,135 +0,0 @@
|
||||
From aeef52fa662c9a6d85b11474359fb9504fc1cf49 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <sakoman@gmail.com>
|
||||
Date: Tue, 15 Dec 2009 15:34:29 -0800
|
||||
Subject: [PATCH 03/45] ARM: OMAP: add support for TCT Zippy to Beagle board file
|
||||
|
||||
Signed-off-by: Steve Sakoman <sakoman@gmail.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 74 +++++++++++++++++++++++++++++-
|
||||
1 files changed, 71 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 330fb25..ddfb9c0 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/irq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
|
||||
@@ -56,6 +57,49 @@
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
|
||||
+#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config enc28j60_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "enc28j60",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 20000000,
|
||||
+ .controller_data = &enc28j60_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_enc28j60_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0);
|
||||
+ omap3beagle_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ);
|
||||
+ set_irq_type(omap3beagle_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_enc28j60_init(void) { return; }
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
{
|
||||
@@ -118,6 +162,14 @@ static struct twl4030_hsmmc_info mmc[] = {
|
||||
.wires = 8,
|
||||
.gpio_wp = 29,
|
||||
},
|
||||
+ {
|
||||
+ .mmc = 2,
|
||||
+ .wires = 4,
|
||||
+ .gpio_wp = 141,
|
||||
+ .gpio_cd = 162,
|
||||
+ .transceiver = true,
|
||||
+ .ocr_mask = 0x00100000, /* 3.3V */
|
||||
+ },
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
@@ -281,7 +333,7 @@ static struct twl4030_platform_data beagle_twldata = {
|
||||
.vpll2 = &beagle_vpll2,
|
||||
};
|
||||
|
||||
-static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
|
||||
+static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("twl4030", 0x48),
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
@@ -290,10 +342,24 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+#if defined(CONFIG_RTC_DRV_DS1307) || \
|
||||
+ defined(CONFIG_RTC_DRV_DS1307_MODULE)
|
||||
+
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("ds1307", 0x68),
|
||||
+ },
|
||||
+};
|
||||
+#else
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {};
|
||||
+#endif
|
||||
+
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
{
|
||||
- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
|
||||
- ARRAY_SIZE(beagle_i2c_boardinfo));
|
||||
+ 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));
|
||||
/* 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);
|
||||
@@ -448,6 +514,8 @@ static void __init omap3_beagle_init(void)
|
||||
/* REVISIT leave DVI powered down until it's needed ... */
|
||||
gpio_direction_output(170, true);
|
||||
|
||||
+ omap3beagle_enc28j60_init();
|
||||
+
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
omap3beagle_flash_init();
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
From 701bababc8f9e458e01bdb512199ce175110fe19 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 17 Dec 2009 12:40:24 -0800
|
||||
Subject: [PATCH 04/45] ARM: OMAP: Make beagle u-boot partition writable
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 1 -
|
||||
1 files changed, 0 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index ddfb9c0..9f72c7a 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -112,7 +112,6 @@ static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
.name = "U-Boot",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
|
||||
.size = 15 * NAND_BLOCK_SIZE,
|
||||
- .mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "U-Boot Env",
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-200
@@ -1,200 +0,0 @@
|
||||
From 818b8bbfb472de23b10aec58acd55eb31fafe0b9 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 10 Feb 2010 15:07:36 +0100
|
||||
Subject: [PATCH 05/45] board-omap3-beagle: add DSS2 support
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 130 ++++++++++++++++++++++++-------
|
||||
1 files changed, 103 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 9f72c7a..3b7f6ec 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
+#include <plat/display.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/usb.h>
|
||||
@@ -153,6 +154,105 @@ static struct platform_device omap3beagle_nand_device = {
|
||||
.resource = &omap3beagle_nand_resource,
|
||||
};
|
||||
|
||||
+/* DSS */
|
||||
+
|
||||
+static int beagle_enable_dvi(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ if (dssdev->reset_gpio != -1)
|
||||
+ gpio_set_value(dssdev->reset_gpio, 1);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void beagle_disable_dvi(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ if (dssdev->reset_gpio != -1)
|
||||
+ gpio_set_value(dssdev->reset_gpio, 0);
|
||||
+}
|
||||
+
|
||||
+static struct omap_dss_device beagle_dvi_device = {
|
||||
+ .type = OMAP_DISPLAY_TYPE_DPI,
|
||||
+ .name = "dvi",
|
||||
+ .driver_name = "generic_panel",
|
||||
+ .phy.dpi.data_lines = 24,
|
||||
+ .reset_gpio = 170,
|
||||
+ .platform_enable = beagle_enable_dvi,
|
||||
+ .platform_disable = beagle_disable_dvi,
|
||||
+};
|
||||
+
|
||||
+static int beagle_panel_enable_tv(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+#define ENABLE_VDAC_DEDICATED 0x03
|
||||
+#define ENABLE_VDAC_DEV_GRP 0x20
|
||||
+
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
|
||||
+ ENABLE_VDAC_DEDICATED,
|
||||
+ TWL4030_VDAC_DEDICATED);
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
|
||||
+ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void beagle_panel_disable_tv(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
|
||||
+ TWL4030_VDAC_DEDICATED);
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
|
||||
+ TWL4030_VDAC_DEV_GRP);
|
||||
+}
|
||||
+
|
||||
+static struct omap_dss_device beagle_tv_device = {
|
||||
+ .name = "tv",
|
||||
+ .driver_name = "venc",
|
||||
+ .type = OMAP_DISPLAY_TYPE_VENC,
|
||||
+ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
+ .platform_enable = beagle_panel_enable_tv,
|
||||
+ .platform_disable = beagle_panel_disable_tv,
|
||||
+};
|
||||
+
|
||||
+static struct omap_dss_device *beagle_dss_devices[] = {
|
||||
+ &beagle_dvi_device,
|
||||
+ &beagle_tv_device,
|
||||
+};
|
||||
+
|
||||
+static struct omap_dss_board_info beagle_dss_data = {
|
||||
+ .num_devices = ARRAY_SIZE(beagle_dss_devices),
|
||||
+ .devices = beagle_dss_devices,
|
||||
+ .default_device = &beagle_dvi_device,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device beagle_dss_device = {
|
||||
+ .name = "omapdss",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &beagle_dss_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vdac_supply = {
|
||||
+ .supply = "vdda_dac",
|
||||
+ .dev = &beagle_dss_device.dev,
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vdvi_supply = {
|
||||
+ .supply = "vdds_dsi",
|
||||
+ .dev = &beagle_dss_device.dev,
|
||||
+};
|
||||
+
|
||||
+static void __init beagle_display_init(void)
|
||||
+{
|
||||
+ int r;
|
||||
+
|
||||
+ r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
|
||||
+ if (r < 0) {
|
||||
+ printk(KERN_ERR "Unable to get DVI reset GPIO\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ gpio_direction_output(beagle_dvi_device.reset_gpio, 0);
|
||||
+}
|
||||
+
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
|
||||
static struct twl4030_hsmmc_info mmc[] = {
|
||||
@@ -172,15 +272,6 @@ static struct twl4030_hsmmc_info mmc[] = {
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
-static struct platform_device omap3_beagle_lcd_device = {
|
||||
- .name = "omap3beagle_lcd",
|
||||
- .id = -1,
|
||||
-};
|
||||
-
|
||||
-static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
|
||||
- .ctrl_name = "internal",
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply beagle_vmmc1_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
@@ -236,16 +327,6 @@ static struct twl4030_gpio_platform_data beagle_gpio_data = {
|
||||
.setup = beagle_twl_gpio_setup,
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply beagle_vdac_supply = {
|
||||
- .supply = "vdac",
|
||||
- .dev = &omap3_beagle_lcd_device.dev,
|
||||
-};
|
||||
-
|
||||
-static struct regulator_consumer_supply beagle_vdvi_supply = {
|
||||
- .supply = "vdvi",
|
||||
- .dev = &omap3_beagle_lcd_device.dev,
|
||||
-};
|
||||
-
|
||||
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
|
||||
static struct regulator_init_data beagle_vmmc1 = {
|
||||
.constraints = {
|
||||
@@ -418,14 +499,8 @@ static struct platform_device keys_gpio = {
|
||||
},
|
||||
};
|
||||
|
||||
-static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
|
||||
- { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
|
||||
-};
|
||||
-
|
||||
static void __init omap3_beagle_init_irq(void)
|
||||
{
|
||||
- omap_board_config = omap3_beagle_config;
|
||||
- omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table,
|
||||
omap3_dsp_rate_table, omap3_l3_rate_table);
|
||||
@@ -437,9 +512,9 @@ static void __init omap3_beagle_init_irq(void)
|
||||
}
|
||||
|
||||
static struct platform_device *omap3_beagle_devices[] __initdata = {
|
||||
- &omap3_beagle_lcd_device,
|
||||
&leds_gpio,
|
||||
&keys_gpio,
|
||||
+ &beagle_dss_device,
|
||||
};
|
||||
|
||||
static void __init omap3beagle_flash_init(void)
|
||||
@@ -522,8 +597,9 @@ static void __init omap3_beagle_init(void)
|
||||
/* Ensure SDRC pins are mux'd for self-refresh */
|
||||
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
|
||||
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
|
||||
-}
|
||||
|
||||
+ beagle_display_init();
|
||||
+}
|
||||
static void __init omap3_beagle_map_io(void)
|
||||
{
|
||||
omap2_set_globals_343x();
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
From e36c63f1fe13a60bdf6e9b3dd46ad969d6fe418d Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <k-kooi@ti.com>
|
||||
Date: Wed, 27 Jan 2010 21:57:13 +0100
|
||||
Subject: [PATCH 06/45] board-omap3beagle: prepare for DM3730 based BeagleboardXM
|
||||
|
||||
* OPP changes copy/pasted from board-omap3evm.c
|
||||
* EHCI changes copy/pasted from Steve Kipisz' 2.6.33rcX work
|
||||
* turn on power to camera on boot and add some comments
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 62 +++++++++++++++++++++++++++----
|
||||
1 files changed, 54 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 3b7f6ec..429dacb 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -53,6 +53,23 @@
|
||||
#include "pm.h"
|
||||
#include "omap3-opp.h"
|
||||
|
||||
+#ifdef CONFIG_PM
|
||||
+static struct omap_opp * _omap35x_mpu_rate_table = omap35x_mpu_rate_table;
|
||||
+static struct omap_opp * _omap37x_mpu_rate_table = omap37x_mpu_rate_table;
|
||||
+static struct omap_opp * _omap35x_dsp_rate_table = omap35x_dsp_rate_table;
|
||||
+static struct omap_opp * _omap37x_dsp_rate_table = omap37x_dsp_rate_table;
|
||||
+static struct omap_opp * _omap35x_l3_rate_table = omap35x_l3_rate_table;
|
||||
+static struct omap_opp * _omap37x_l3_rate_table = omap37x_l3_rate_table;
|
||||
+#else /* CONFIG_PM */
|
||||
+static struct omap_opp * _omap35x_mpu_rate_table = NULL;
|
||||
+static struct omap_opp * _omap37x_mpu_rate_table = NULL;
|
||||
+static struct omap_opp * _omap35x_dsp_rate_table = NULL;
|
||||
+static struct omap_opp * _omap37x_dsp_rate_table = NULL;
|
||||
+static struct omap_opp * _omap35x_l3_rate_table = NULL;
|
||||
+static struct omap_opp * _omap37x_l3_rate_table = NULL;
|
||||
+#endif /* CONFIG_PM */
|
||||
+
|
||||
+
|
||||
#define GPMC_CS0_BASE 0x60
|
||||
#define GPMC_CS_SIZE 0x30
|
||||
|
||||
@@ -303,12 +320,28 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
* power switch and overcurrent detect
|
||||
*/
|
||||
|
||||
- gpio_request(gpio + 1, "EHCI_nOC");
|
||||
- gpio_direction_input(gpio + 1);
|
||||
+ if (cpu_is_omap3630()) {
|
||||
+ /* Power on DVI, Serial and PWR led */
|
||||
+ gpio_request(gpio + 1, "nDVI_PWR_EN");
|
||||
+ gpio_direction_output(gpio + 1, 0);
|
||||
+
|
||||
+ /* Power on camera interface */
|
||||
+ gpio_request(gpio + 2, "CAM_EN");
|
||||
+ gpio_direction_output(gpio + 2, 1);
|
||||
+
|
||||
+ /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
|
||||
+ gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
|
||||
+ }
|
||||
+ else {
|
||||
+ gpio_request(gpio + 1, "EHCI_nOC");
|
||||
+ gpio_direction_input(gpio + 1);
|
||||
+
|
||||
+ /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
|
||||
+ gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
+ }
|
||||
|
||||
- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
|
||||
- gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
@@ -501,9 +534,22 @@ static struct platform_device keys_gpio = {
|
||||
|
||||
static void __init omap3_beagle_init_irq(void)
|
||||
{
|
||||
- omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
- mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table,
|
||||
- omap3_dsp_rate_table, omap3_l3_rate_table);
|
||||
+ if (cpu_is_omap3630())
|
||||
+ {
|
||||
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
+ NULL,
|
||||
+ _omap37x_mpu_rate_table,
|
||||
+ _omap37x_dsp_rate_table,
|
||||
+ _omap37x_l3_rate_table);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
+ NULL,
|
||||
+ _omap35x_mpu_rate_table,
|
||||
+ _omap35x_dsp_rate_table,
|
||||
+ _omap35x_l3_rate_table);
|
||||
+ }
|
||||
omap_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
omap2_gp_clockevent_set_gptimer(12);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-172
@@ -1,172 +0,0 @@
|
||||
From 25ae9895ed107a6fe9d9c4345f21bbdaee4ccde6 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 3 May 2010 14:41:29 +0200
|
||||
Subject: [PATCH 07/45] ARM: OMAP: beagleboard: Add infrastructure to do fixups based on expansionboard name passed by u-boot
|
||||
|
||||
And add support for zippy2
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 88 +++++++++++++++++++++++++++----
|
||||
1 files changed, 78 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 429dacb..ac96551 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -75,6 +75,8 @@ static struct omap_opp * _omap37x_l3_rate_table = NULL;
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
|
||||
+char expansionboard_name[16];
|
||||
+
|
||||
#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
|
||||
|
||||
#include <plat/mcspi.h>
|
||||
@@ -87,7 +89,7 @@ static struct omap2_mcspi_device_config enc28j60_spi_chip_info = {
|
||||
.single_channel = 1, /* 0: slave, 1: master */
|
||||
};
|
||||
|
||||
-static struct spi_board_info omap3beagle_spi_board_info[] __initdata = {
|
||||
+static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = {
|
||||
{
|
||||
.modalias = "enc28j60",
|
||||
.bus_num = 4,
|
||||
@@ -102,21 +104,62 @@ static void __init omap3beagle_enc28j60_init(void)
|
||||
if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) &&
|
||||
(gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) {
|
||||
gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0);
|
||||
- omap3beagle_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ);
|
||||
- set_irq_type(omap3beagle_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ);
|
||||
+ set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
} else {
|
||||
printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n");
|
||||
return;
|
||||
}
|
||||
|
||||
- spi_register_board_info(omap3beagle_spi_board_info,
|
||||
- ARRAY_SIZE(omap3beagle_spi_board_info));
|
||||
+ spi_register_board_info(omap3beagle_zippy_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy_spi_board_info));
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void __init omap3beagle_enc28j60_init(void) { return; }
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config ks8851_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "ks8851",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 36000000,
|
||||
+ .controller_data = &ks8851_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_ks8851_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0);
|
||||
+ omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ);
|
||||
+ set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_zippy2_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy2_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_ks8851_init(void) { return; }
|
||||
+#endif
|
||||
|
||||
static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
@@ -281,8 +324,6 @@ static struct twl4030_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 2,
|
||||
.wires = 4,
|
||||
- .gpio_wp = 141,
|
||||
- .gpio_cd = 162,
|
||||
.transceiver = true,
|
||||
.ocr_mask = 0x00100000, /* 3.3V */
|
||||
},
|
||||
@@ -601,7 +642,7 @@ static void __init omap3beagle_flash_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
-static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
+static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
|
||||
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
@@ -621,6 +662,15 @@ static struct omap_board_mux board_mux[] __initdata = {
|
||||
#define board_mux NULL
|
||||
#endif
|
||||
|
||||
+static int __init expansionboard_setup(char *str)
|
||||
+{
|
||||
+ if (!str)
|
||||
+ return -EINVAL;
|
||||
+ strncpy(expansionboard_name, str, 16);
|
||||
+ printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void __init omap3_beagle_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
@@ -634,8 +684,24 @@ static void __init omap3_beagle_init(void)
|
||||
/* REVISIT leave DVI powered down until it's needed ... */
|
||||
gpio_direction_output(170, true);
|
||||
|
||||
- omap3beagle_enc28j60_init();
|
||||
-
|
||||
+ if(!strcmp(expansionboard_name, "zippy"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n");
|
||||
+ omap3beagle_enc28j60_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "zippy2"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n");
|
||||
+ omap3beagle_ks8851_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ }
|
||||
+
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
omap3beagle_flash_init();
|
||||
@@ -652,6 +718,8 @@ static void __init omap3_beagle_map_io(void)
|
||||
omap2_map_common_io();
|
||||
}
|
||||
|
||||
+early_param("buddy", expansionboard_setup);
|
||||
+
|
||||
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
|
||||
.phys_io = 0x48000000,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
From bf88487c59994b71cc57687915de0dc207a74b6b Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 3 May 2010 21:38:34 +0200
|
||||
Subject: [PATCH 08/45] ARM: OMAP: beagleboard: pre-export GPIOs to userspace when using a Tincantools trainerboard
|
||||
|
||||
This really needs a for loop, patches welcome
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 33 ++++++++++++++++++++++++++++++-
|
||||
1 files changed, 32 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index ac96551..c9af202 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -701,7 +701,38 @@ static void __init omap3_beagle_init(void)
|
||||
mmc[1].gpio_wp = 141;
|
||||
mmc[1].gpio_cd = 162;
|
||||
}
|
||||
-
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "trainer"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n");
|
||||
+ gpio_request(130, "sysfs");
|
||||
+ gpio_export(130, 1);
|
||||
+ gpio_request(131, "sysfs");
|
||||
+ gpio_export(131, 1);
|
||||
+ gpio_request(132, "sysfs");
|
||||
+ gpio_export(132, 1);
|
||||
+ gpio_request(133, "sysfs");
|
||||
+ gpio_export(133, 1);
|
||||
+ gpio_request(134, "sysfs");
|
||||
+ gpio_export(134, 1);
|
||||
+ gpio_request(135, "sysfs");
|
||||
+ gpio_export(135, 1);
|
||||
+ gpio_request(136, "sysfs");
|
||||
+ gpio_export(136, 1);
|
||||
+ gpio_request(137, "sysfs");
|
||||
+ gpio_export(137, 1);
|
||||
+ gpio_request(138, "sysfs");
|
||||
+ gpio_export(138, 1);
|
||||
+ gpio_request(139, "sysfs");
|
||||
+ gpio_export(139, 1);
|
||||
+ gpio_request(140, "sysfs");
|
||||
+ gpio_export(140, 1);
|
||||
+ gpio_request(141, "sysfs");
|
||||
+ gpio_export(141, 1);
|
||||
+ gpio_request(162, "sysfs");
|
||||
+ gpio_export(162, 1);
|
||||
+ }
|
||||
+
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
omap3beagle_flash_init();
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-76
@@ -1,76 +0,0 @@
|
||||
From f957bb53ba0c0056efd2c10d446ed9cfd6bd62ca 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 09/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 c9af202..b3c8cb7 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -496,24 +496,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
|
||||
|
||||
-3323
File diff suppressed because it is too large
Load Diff
-27
@@ -1,27 +0,0 @@
|
||||
From 3cd85787199204da2faec4b4150302bf2228de48 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 17 Dec 2009 12:45:20 -0800
|
||||
Subject: [PATCH 11/45] ASoC: enable audio capture by default for twl4030
|
||||
|
||||
---
|
||||
sound/soc/codecs/twl4030.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
|
||||
index 74f0d65..53da465 100644
|
||||
--- a/sound/soc/codecs/twl4030.c
|
||||
+++ b/sound/soc/codecs/twl4030.c
|
||||
@@ -46,8 +46,8 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {
|
||||
0xc3, /* REG_OPTION (0x2) */
|
||||
0x00, /* REG_UNKNOWN (0x3) */
|
||||
0x00, /* REG_MICBIAS_CTL (0x4) */
|
||||
- 0x20, /* REG_ANAMICL (0x5) */
|
||||
- 0x00, /* REG_ANAMICR (0x6) */
|
||||
+ 0x34, /* REG_ANAMICL (0x5) */
|
||||
+ 0x14, /* REG_ANAMICR (0x6) */
|
||||
0x00, /* REG_AVADC_CTL (0x7) */
|
||||
0x00, /* REG_ADCMICSEL (0x8) */
|
||||
0x00, /* REG_DIGMIXING (0x9) */
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
From 7d8868d73fdd95eb928f54f881978590643e50cc Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 31 Dec 2009 07:05:02 -0800
|
||||
Subject: [PATCH 12/45] MTD: NAND: omap2: proper fix for subpage read ECC errors
|
||||
|
||||
---
|
||||
drivers/mtd/nand/omap2.c | 11 +++++++----
|
||||
1 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
|
||||
index 08c193c..9b185b0 100644
|
||||
--- a/drivers/mtd/nand/omap2.c
|
||||
+++ b/drivers/mtd/nand/omap2.c
|
||||
@@ -295,11 +295,14 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
|
||||
u32 *p = (u32 *)buf;
|
||||
|
||||
/* take care of subpage reads */
|
||||
- for (; len % 4 != 0; ) {
|
||||
- *buf++ = __raw_readb(info->nand.IO_ADDR_R);
|
||||
- len--;
|
||||
+ if (len % 4) {
|
||||
+ if (info->nand.options & NAND_BUSWIDTH_16)
|
||||
+ omap_read_buf16(mtd, buf, len % 4);
|
||||
+ else
|
||||
+ omap_read_buf8(mtd, buf, len % 4);
|
||||
+ p = (u32 *) (buf + len % 4);
|
||||
+ len -= len % 4;
|
||||
}
|
||||
- p = (u32 *) buf;
|
||||
|
||||
/* configure and start prefetch transfer */
|
||||
ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
From af96930d2412b4af27407a48e262ce1bb2e32427 Mon Sep 17 00:00:00 2001
|
||||
From: Sudeep Basavaraj <sudeep.basavaraj@ti.com>
|
||||
Date: Tue, 5 Jan 2010 18:58:18 +0530
|
||||
Subject: [PATCH 13/45] OMAP3630:DSS2:Enable Pre-Multiplied Alpha Support
|
||||
|
||||
Enables dss to process color formats with pre-mulitplied alpha values.
|
||||
With this we can have alpha values defined for each pixel
|
||||
and hence can have different blending values for each pixel.
|
||||
|
||||
Signed-off-by: Sudeep Basavaraj <sudeep.basavaraj@ti.com>
|
||||
Signed-off-by: Kishore Y <kishore.y@ti.com>
|
||||
---
|
||||
drivers/video/omap2/dss/dispc.c | 8 ++++++++
|
||||
1 files changed, 8 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
|
||||
index f7acf87..c6d5fc5 100644
|
||||
--- a/drivers/video/omap2/dss/dispc.c
|
||||
+++ b/drivers/video/omap2/dss/dispc.c
|
||||
@@ -913,6 +913,11 @@ static void _dispc_set_vid_color_conv(enum omap_plane plane, bool enable)
|
||||
dispc_write_reg(dispc_reg_att[plane], val);
|
||||
}
|
||||
|
||||
+static void _dispc_set_alpha_blend_attrs(enum omap_plane plane, bool enable)
|
||||
+{
|
||||
+ REG_FLD_MOD(dispc_reg_att[plane], enable ? 1 : 0, 28, 28);
|
||||
+}
|
||||
+
|
||||
void dispc_enable_replication(enum omap_plane plane, bool enable)
|
||||
{
|
||||
int bit;
|
||||
@@ -1689,6 +1694,9 @@ static int _dispc_setup_plane(enum omap_plane plane,
|
||||
|
||||
_dispc_set_rotation_attrs(plane, rotation, mirror, color_mode);
|
||||
|
||||
+ if (cpu_is_omap3630() && (plane != OMAP_DSS_VIDEO1))
|
||||
+ _dispc_set_alpha_blend_attrs(plane, 1);
|
||||
+
|
||||
if (plane != OMAP_DSS_VIDEO1)
|
||||
_dispc_setup_global_alpha(plane, global_alpha);
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-75
@@ -1,75 +0,0 @@
|
||||
From ba26db491acb2d0ee6ef6e51756e843dfd56a125 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Tue, 19 Jan 2010 21:19:15 -0800
|
||||
Subject: [PATCH 14/45] DSS2: add bootarg for selecting svideo or composite for tv output
|
||||
|
||||
also add pal-16 and ntsc-16 omapfb.mode settings for 16bpp
|
||||
---
|
||||
drivers/video/omap2/dss/venc.c | 22 ++++++++++++++++++++++
|
||||
drivers/video/omap2/omapfb/omapfb-main.c | 10 +++++++++-
|
||||
2 files changed, 31 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
|
||||
index 8be116f..fbfc24b 100644
|
||||
--- a/drivers/video/omap2/dss/venc.c
|
||||
+++ b/drivers/video/omap2/dss/venc.c
|
||||
@@ -87,6 +87,11 @@
|
||||
#define VENC_OUTPUT_TEST 0xC8
|
||||
#define VENC_DAC_B__DAC_C 0xC8
|
||||
|
||||
+static char *tv_connection;
|
||||
+
|
||||
+module_param_named(tvcable, tv_connection, charp, 0);
|
||||
+MODULE_PARM_DESC(tvcable, "TV connection type (svideo, composite)");
|
||||
+
|
||||
struct venc_config {
|
||||
u32 f_control;
|
||||
u32 vidout_ctrl;
|
||||
@@ -432,6 +437,23 @@ static int venc_panel_probe(struct omap_dss_device *dssdev)
|
||||
{
|
||||
dssdev->panel.timings = omap_dss_pal_timings;
|
||||
|
||||
+ /* Allow the TV output to be overriden */
|
||||
+ if (tv_connection) {
|
||||
+ if (strcmp(tv_connection, "svideo") == 0) {
|
||||
+ printk(KERN_INFO
|
||||
+ "omapdss: tv output is svideo.\n");
|
||||
+ dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO;
|
||||
+ } else if (strcmp(tv_connection, "composite") == 0) {
|
||||
+ printk(KERN_INFO
|
||||
+ "omapdss: tv output is composite.\n");
|
||||
+ dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE;
|
||||
+ } else {
|
||||
+ printk(KERN_INFO
|
||||
+ "omapdss: unsupported output type'%s'.\n",
|
||||
+ tv_connection);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
|
||||
index 7f47a34..0fe87e0 100644
|
||||
--- a/drivers/video/omap2/omapfb/omapfb-main.c
|
||||
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
|
||||
@@ -1988,7 +1988,15 @@ static int omapfb_mode_to_timings(const char *mode_str,
|
||||
int r;
|
||||
|
||||
#ifdef CONFIG_OMAP2_DSS_VENC
|
||||
- if (strcmp(mode_str, "pal") == 0) {
|
||||
+ if (strcmp(mode_str, "pal-16") == 0) {
|
||||
+ *timings = omap_dss_pal_timings;
|
||||
+ *bpp = 16;
|
||||
+ return 0;
|
||||
+ } else if (strcmp(mode_str, "ntsc-16") == 0) {
|
||||
+ *timings = omap_dss_ntsc_timings;
|
||||
+ *bpp = 16;
|
||||
+ return 0;
|
||||
+ } else if (strcmp(mode_str, "pal") == 0) {
|
||||
*timings = omap_dss_pal_timings;
|
||||
*bpp = 0;
|
||||
return 0;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-133
@@ -1,133 +0,0 @@
|
||||
From 739ec82561686ad0c5cc8befef3bcd74339d205e Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <k-kooi@ti.com>
|
||||
Date: Thu, 11 Feb 2010 21:34:00 +0100
|
||||
Subject: [PATCH 15/45] ISP: add some more from Leopard imaging patch
|
||||
|
||||
---
|
||||
drivers/media/video/isp/isppreview.c | 16 ++++++++-
|
||||
include/media/v4l2-int-device.h | 58 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 72 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/isp/isppreview.c b/drivers/media/video/isp/isppreview.c
|
||||
index 5494efc..85ee25d 100644
|
||||
--- a/drivers/media/video/isp/isppreview.c
|
||||
+++ b/drivers/media/video/isp/isppreview.c
|
||||
@@ -79,13 +79,26 @@ static struct ispprev_rgbtorgb flr_rgb2rgb = {
|
||||
{0x0000, 0x0000, 0x0000}
|
||||
};
|
||||
|
||||
+static struct ispprev_rgbtorgb unity_rgb2rgb = {
|
||||
+ { /* RGB-RGB Matrix */
|
||||
+ {0x0100, 0x0000, 0x0000},
|
||||
+ {0x0000, 0x0100, 0x0000},
|
||||
+ {0x0000, 0x0000, 0x0100}
|
||||
+ }, /* RGB Offset */
|
||||
+ {0x0000, 0x0000, 0x0000}
|
||||
+};
|
||||
+
|
||||
/* Default values in Office Flourescent Light for RGB to YUV Conversion*/
|
||||
static struct ispprev_csc flr_prev_csc[] = {
|
||||
{
|
||||
{ /* CSC Coef Matrix */
|
||||
- {66, 129, 25},
|
||||
+/* {66, 129, 25},
|
||||
{-38, -75, 112},
|
||||
{112, -94 , -18}
|
||||
+*/
|
||||
+ {0x04C, 0x098, 0x01C},
|
||||
+ {0x3D4, 0x3AC, 0x080},
|
||||
+ {0x080, 0x39E, 0x3EC}
|
||||
}, /* CSC Offset */
|
||||
{0x0, 0x0, 0x0}
|
||||
},
|
||||
@@ -107,7 +120,6 @@ static struct ispprev_csc flr_prev_csc[] = {
|
||||
}
|
||||
};
|
||||
|
||||
-
|
||||
/* Default values in Office Flourescent Light for CFA Gradient*/
|
||||
#define FLR_CFA_GRADTHRS_HORZ 0x28
|
||||
#define FLR_CFA_GRADTHRS_VERT 0x28
|
||||
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
|
||||
index ed32d3f..ce415ec 100644
|
||||
--- a/include/media/v4l2-int-device.h
|
||||
+++ b/include/media/v4l2-int-device.h
|
||||
@@ -113,6 +113,8 @@ enum v4l2_if_type {
|
||||
* on certain image sensors.
|
||||
*/
|
||||
V4L2_IF_TYPE_BT656,
|
||||
+ V4L2_IF_TYPE_YCbCr,
|
||||
+ V4L2_IF_TYPE_RAW,
|
||||
};
|
||||
|
||||
enum v4l2_if_type_bt656_mode {
|
||||
@@ -159,10 +161,66 @@ struct v4l2_if_type_bt656 {
|
||||
u32 clock_curr;
|
||||
};
|
||||
|
||||
+struct v4l2_if_type_ycbcr {
|
||||
+ /*
|
||||
+ * 0: Frame begins when vsync is high.
|
||||
+ * 1: Frame begins when vsync changes from low to high.
|
||||
+ */
|
||||
+ unsigned frame_start_on_rising_vs:1;
|
||||
+ /* Use Bt synchronisation codes for sync correction. */
|
||||
+ unsigned bt_sync_correct:1;
|
||||
+ /* Swap every two adjacent image data elements. */
|
||||
+ unsigned swap:1;
|
||||
+ /* Inverted latch clock polarity from slave. */
|
||||
+ unsigned latch_clk_inv:1;
|
||||
+ /* Hs polarity. 0 is active high, 1 active low. */
|
||||
+ unsigned nobt_hs_inv:1;
|
||||
+ /* Vs polarity. 0 is active high, 1 active low. */
|
||||
+ unsigned nobt_vs_inv:1;
|
||||
+ /* Minimum accepted bus clock for slave (in Hz). */
|
||||
+ u32 clock_min;
|
||||
+ /* Maximum accepted bus clock for slave. */
|
||||
+ u32 clock_max;
|
||||
+ /*
|
||||
+ * Current wish of the slave. May only change in response to
|
||||
+ * ioctls that affect image capture.
|
||||
+ */
|
||||
+ u32 clock_curr;
|
||||
+};
|
||||
+
|
||||
+struct v4l2_if_type_raw {
|
||||
+ /*
|
||||
+ * 0: Frame begins when vsync is high.
|
||||
+ * 1: Frame begins when vsync changes from low to high.
|
||||
+ */
|
||||
+ unsigned frame_start_on_rising_vs:1;
|
||||
+ /* Use Bt synchronisation codes for sync correction. */
|
||||
+ unsigned bt_sync_correct:1;
|
||||
+ /* Swap every two adjacent image data elements. */
|
||||
+ unsigned swap:1;
|
||||
+ /* Inverted latch clock polarity from slave. */
|
||||
+ unsigned latch_clk_inv:1;
|
||||
+ /* Hs polarity. 0 is active high, 1 active low. */
|
||||
+ unsigned nobt_hs_inv:1;
|
||||
+ /* Vs polarity. 0 is active high, 1 active low. */
|
||||
+ unsigned nobt_vs_inv:1;
|
||||
+ /* Minimum accepted bus clock for slave (in Hz). */
|
||||
+ u32 clock_min;
|
||||
+ /* Maximum accepted bus clock for slave. */
|
||||
+ u32 clock_max;
|
||||
+ /*
|
||||
+ * Current wish of the slave. May only change in response to
|
||||
+ * ioctls that affect image capture.
|
||||
+ */
|
||||
+ u32 clock_curr;
|
||||
+};
|
||||
+
|
||||
struct v4l2_ifparm {
|
||||
enum v4l2_if_type if_type;
|
||||
union {
|
||||
struct v4l2_if_type_bt656 bt656;
|
||||
+ struct v4l2_if_type_ycbcr ycbcr;
|
||||
+ struct v4l2_if_type_raw raw;
|
||||
} u;
|
||||
};
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
From 1fc84dc95abaf51294efa10fe111d65bc0b08483 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <sakoman@gmail.com>
|
||||
Date: Tue, 15 Dec 2009 14:59:42 -0800
|
||||
Subject: [PATCH 16/45] ARM: OMAP: Overo: Add support for second ethernet port
|
||||
|
||||
Signed-off-by: Steve Sakoman <sakoman@gmail.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-overo.c | 56 +++++++++++++++++++++++++++++++++++--
|
||||
1 files changed, 53 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index e0aebc3..6204b8c 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -63,6 +63,8 @@
|
||||
|
||||
#define OVERO_SMSC911X_CS 5
|
||||
#define OVERO_SMSC911X_GPIO 176
|
||||
+#define OVERO_SMSC911X2_CS 4
|
||||
+#define OVERO_SMSC911X2_GPIO 65
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
|
||||
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
@@ -137,6 +139,16 @@ static struct resource overo_smsc911x_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+static struct resource overo_smsc911x2_resources[] = {
|
||||
+ {
|
||||
+ .name = "smsc911x2-memory",
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+ {
|
||||
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct smsc911x_platform_config overo_smsc911x_config = {
|
||||
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
|
||||
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
|
||||
@@ -146,7 +158,7 @@ static struct smsc911x_platform_config overo_smsc911x_config = {
|
||||
|
||||
static struct platform_device overo_smsc911x_device = {
|
||||
.name = "smsc911x",
|
||||
- .id = -1,
|
||||
+ .id = 0,
|
||||
.num_resources = ARRAY_SIZE(overo_smsc911x_resources),
|
||||
.resource = overo_smsc911x_resources,
|
||||
.dev = {
|
||||
@@ -154,9 +166,26 @@ static struct platform_device overo_smsc911x_device = {
|
||||
},
|
||||
};
|
||||
|
||||
+static struct platform_device overo_smsc911x2_device = {
|
||||
+ .name = "smsc911x",
|
||||
+ .id = 1,
|
||||
+ .num_resources = ARRAY_SIZE(overo_smsc911x2_resources),
|
||||
+ .resource = overo_smsc911x2_resources,
|
||||
+ .dev = {
|
||||
+ .platform_data = &overo_smsc911x_config,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct platform_device *smsc911x_devices[] = {
|
||||
+ &overo_smsc911x_device,
|
||||
+ &overo_smsc911x2_device,
|
||||
+};
|
||||
+
|
||||
static inline void __init overo_init_smsc911x(void)
|
||||
{
|
||||
- unsigned long cs_mem_base;
|
||||
+ unsigned long cs_mem_base, cs_mem_base2;
|
||||
+
|
||||
+ /* set up first smsc911x chip */
|
||||
|
||||
if (gpmc_cs_request(OVERO_SMSC911X_CS, SZ_16M, &cs_mem_base) < 0) {
|
||||
printk(KERN_ERR "Failed request for GPMC mem for smsc911x\n");
|
||||
@@ -177,7 +206,28 @@ static inline void __init overo_init_smsc911x(void)
|
||||
overo_smsc911x_resources[1].start = OMAP_GPIO_IRQ(OVERO_SMSC911X_GPIO);
|
||||
overo_smsc911x_resources[1].end = 0;
|
||||
|
||||
- platform_device_register(&overo_smsc911x_device);
|
||||
+ /* set up second smsc911x chip */
|
||||
+
|
||||
+ if (gpmc_cs_request(OVERO_SMSC911X2_CS, SZ_16M, &cs_mem_base2) < 0) {
|
||||
+ printk(KERN_ERR "Failed request for GPMC mem for smsc911x2\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ overo_smsc911x2_resources[0].start = cs_mem_base2 + 0x0;
|
||||
+ overo_smsc911x2_resources[0].end = cs_mem_base2 + 0xff;
|
||||
+
|
||||
+ if ((gpio_request(OVERO_SMSC911X2_GPIO, "SMSC911X2 IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OVERO_SMSC911X2_GPIO) == 0)) {
|
||||
+ gpio_export(OVERO_SMSC911X2_GPIO, 0);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for SMSC911X2 IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ overo_smsc911x2_resources[1].start = OMAP_GPIO_IRQ(OVERO_SMSC911X2_GPIO);
|
||||
+ overo_smsc911x2_resources[1].end = 0;
|
||||
+
|
||||
+ platform_add_devices(smsc911x_devices, ARRAY_SIZE(smsc911x_devices));
|
||||
}
|
||||
|
||||
#else
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
From f6084470f7861f9cc05faec2a8f8825ec55f7022 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <sakoman@gmail.com>
|
||||
Date: Tue, 15 Dec 2009 15:17:44 -0800
|
||||
Subject: [PATCH 17/45] drivers: net: smsc911x: return ENODEV if device is not found
|
||||
|
||||
Signed-off-by: Steve Sakoman <sakoman@gmail.com>
|
||||
---
|
||||
drivers/net/smsc911x.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
|
||||
index 494cd91..2472cb0 100644
|
||||
--- a/drivers/net/smsc911x.c
|
||||
+++ b/drivers/net/smsc911x.c
|
||||
@@ -2021,8 +2021,10 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
retval = smsc911x_init(dev);
|
||||
- if (retval < 0)
|
||||
+ if (retval < 0) {
|
||||
+ retval = -ENODEV;
|
||||
goto out_unmap_io_3;
|
||||
+ }
|
||||
|
||||
/* configure irq polarity and type before connecting isr */
|
||||
if (pdata->config.irq_polarity == SMSC911X_IRQ_POLARITY_ACTIVE_HIGH)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
From 56f59d080226a7a6a033e7f20e8a41d1c327e5a1 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <sakoman@gmail.com>
|
||||
Date: Tue, 15 Dec 2009 15:24:10 -0800
|
||||
Subject: [PATCH 18/45] drivers: input: touchscreen: ads7846: return ENODEV if device is not found
|
||||
|
||||
Signed-off-by: Steve Sakoman <sakoman@gmail.com>
|
||||
---
|
||||
drivers/input/touchscreen/ads7846.c | 13 ++++++++++---
|
||||
1 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
|
||||
index e53ac1f..45287ab 100644
|
||||
--- a/drivers/input/touchscreen/ads7846.c
|
||||
+++ b/drivers/input/touchscreen/ads7846.c
|
||||
@@ -1165,9 +1165,16 @@ static int __devinit ads7846_probe(struct spi_device *spi)
|
||||
/* take a first sample, leaving nPENIRQ active and vREF off; avoid
|
||||
* the touchscreen, in case it's not connected.
|
||||
*/
|
||||
- (void) ads7846_read12_ser(&spi->dev,
|
||||
+ err = ads7846_read12_ser(&spi->dev,
|
||||
READ_12BIT_SER(vaux) | ADS_PD10_ALL_ON);
|
||||
|
||||
+ /* if sample is all 0's or all 1's then there is no device on spi */
|
||||
+ if ( (err == 0x000) || (err == 0xfff)) {
|
||||
+ dev_info(&spi->dev, "no device detected, test read result was 0x%08X\n", err);
|
||||
+ err = -ENODEV;
|
||||
+ goto err_free_irq;
|
||||
+ }
|
||||
+
|
||||
err = sysfs_create_group(&spi->dev.kobj, &ads784x_attr_group);
|
||||
if (err)
|
||||
goto err_remove_hwmon;
|
||||
@@ -1188,7 +1195,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
|
||||
err_free_irq:
|
||||
free_irq(spi->irq, ts);
|
||||
err_free_gpio:
|
||||
- if (ts->gpio_pendown != -1)
|
||||
+ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
|
||||
gpio_free(ts->gpio_pendown);
|
||||
err_cleanup_filter:
|
||||
if (ts->filter_cleanup)
|
||||
@@ -1216,7 +1223,7 @@ static int __devexit ads7846_remove(struct spi_device *spi)
|
||||
/* suspend left the IRQ disabled */
|
||||
enable_irq(ts->spi->irq);
|
||||
|
||||
- if (ts->gpio_pendown != -1)
|
||||
+ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
|
||||
gpio_free(ts->gpio_pendown);
|
||||
|
||||
if (ts->filter_cleanup)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-601
@@ -1,601 +0,0 @@
|
||||
From b9270dc07b1b66cce33580bca6276c20f1bf68d2 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Wed, 19 Jan 2011 16:06:42 +0100
|
||||
Subject: [PATCH 19/45] drivers: mfd: add twl4030 madc driver
|
||||
|
||||
---
|
||||
drivers/mfd/Kconfig | 21 ++
|
||||
drivers/mfd/Makefile | 1 +
|
||||
drivers/mfd/twl4030-madc.c | 536 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 558 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/mfd/twl4030-madc.c
|
||||
|
||||
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
|
||||
index 306b346..6221146 100644
|
||||
--- a/drivers/mfd/Kconfig
|
||||
+++ b/drivers/mfd/Kconfig
|
||||
@@ -148,6 +148,27 @@ config TWL4030_CODEC
|
||||
default n
|
||||
|
||||
|
||||
+config TWL4030_MADC
|
||||
+ tristate "TWL4030 MADC Driver"
|
||||
+ depends on TWL4030_CORE
|
||||
+ help
|
||||
+ The TWL4030 Monitoring ADC driver enables the host
|
||||
+ processor to monitor analog signals using analog-to-digital
|
||||
+ conversions on the input source. TWL4030 MADC provides the
|
||||
+ following features:
|
||||
+ - Single 10-bit ADC with successive approximation register (SAR) conversion;
|
||||
+ - Analog multiplexer for 16 inputs;
|
||||
+ - Seven (of the 16) inputs are freely available;
|
||||
+ - Battery voltage monitoring;
|
||||
+ - Concurrent conversion request management;
|
||||
+ - Interrupt signal to Primary Interrupt Handler;
|
||||
+ - Averaging feature;
|
||||
+ - Selective enable/disable of the averaging feature.
|
||||
+
|
||||
+ Say 'y' here to statically link this module into the kernel or 'm'
|
||||
+ to build it as a dinamically loadable module. The module will be
|
||||
+ called twl4030-madc.ko
|
||||
+
|
||||
config MFD_TMIO
|
||||
bool
|
||||
default n
|
||||
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
|
||||
index 85dc3a7..44350e7 100644
|
||||
--- a/drivers/mfd/Makefile
|
||||
+++ b/drivers/mfd/Makefile
|
||||
@@ -29,6 +29,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o
|
||||
obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o
|
||||
obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o
|
||||
obj-$(CONFIG_TWL4030_CODEC) += twl4030-codec.o
|
||||
+obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o
|
||||
|
||||
obj-$(CONFIG_TPS65910_CORE) += tps65910-core.o
|
||||
|
||||
diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
|
||||
new file mode 100644
|
||||
index 0000000..7d83ab8
|
||||
--- /dev/null
|
||||
+++ b/drivers/mfd/twl4030-madc.c
|
||||
@@ -0,0 +1,536 @@
|
||||
+/*
|
||||
+ * TWL4030 MADC module driver
|
||||
+ *
|
||||
+ * Copyright (C) 2008 Nokia Corporation
|
||||
+ * Mikko Ylinen <mikko.k.ylinen@nokia.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * version 2 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
+ * 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/fs.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/miscdevice.h>
|
||||
+#include <linux/i2c/twl4030.h>
|
||||
+#include <linux/i2c/twl4030-madc.h>
|
||||
+
|
||||
+#include <asm/uaccess.h>
|
||||
+
|
||||
+#define TWL4030_MADC_PFX "twl4030-madc: "
|
||||
+
|
||||
+struct twl4030_madc_data {
|
||||
+ struct device *dev;
|
||||
+ struct mutex lock;
|
||||
+ struct work_struct ws;
|
||||
+ struct twl4030_madc_request requests[TWL4030_MADC_NUM_METHODS];
|
||||
+ int imr;
|
||||
+ int isr;
|
||||
+};
|
||||
+
|
||||
+static struct twl4030_madc_data *the_madc;
|
||||
+
|
||||
+static
|
||||
+const struct twl4030_madc_conversion_method twl4030_conversion_methods[] = {
|
||||
+ [TWL4030_MADC_RT] = {
|
||||
+ .sel = TWL4030_MADC_RTSELECT_LSB,
|
||||
+ .avg = TWL4030_MADC_RTAVERAGE_LSB,
|
||||
+ .rbase = TWL4030_MADC_RTCH0_LSB,
|
||||
+ },
|
||||
+ [TWL4030_MADC_SW1] = {
|
||||
+ .sel = TWL4030_MADC_SW1SELECT_LSB,
|
||||
+ .avg = TWL4030_MADC_SW1AVERAGE_LSB,
|
||||
+ .rbase = TWL4030_MADC_GPCH0_LSB,
|
||||
+ .ctrl = TWL4030_MADC_CTRL_SW1,
|
||||
+ },
|
||||
+ [TWL4030_MADC_SW2] = {
|
||||
+ .sel = TWL4030_MADC_SW2SELECT_LSB,
|
||||
+ .avg = TWL4030_MADC_SW2AVERAGE_LSB,
|
||||
+ .rbase = TWL4030_MADC_GPCH0_LSB,
|
||||
+ .ctrl = TWL4030_MADC_CTRL_SW2,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int twl4030_madc_read(struct twl4030_madc_data *madc, u8 reg)
|
||||
+{
|
||||
+ int ret;
|
||||
+ u8 val;
|
||||
+
|
||||
+ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg);
|
||||
+ if (ret) {
|
||||
+ dev_dbg(madc->dev, "unable to read register 0x%X\n", reg);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+static void twl4030_madc_write(struct twl4030_madc_data *madc, u8 reg, u8 val)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MADC, val, reg);
|
||||
+ if (ret)
|
||||
+ dev_err(madc->dev, "unable to write register 0x%X\n", reg);
|
||||
+}
|
||||
+
|
||||
+static int twl4030_madc_channel_raw_read(struct twl4030_madc_data *madc, u8 reg)
|
||||
+{
|
||||
+ u8 msb, lsb;
|
||||
+
|
||||
+ /* For each ADC channel, we have MSB and LSB register pair. MSB address
|
||||
+ * is always LSB address+1. reg parameter is the addr of LSB register */
|
||||
+ msb = twl4030_madc_read(madc, reg + 1);
|
||||
+ lsb = twl4030_madc_read(madc, reg);
|
||||
+
|
||||
+ return (int)(((msb << 8) | lsb) >> 6);
|
||||
+}
|
||||
+
|
||||
+static int twl4030_madc_read_channels(struct twl4030_madc_data *madc,
|
||||
+ u8 reg_base, u16 channels, int *buf)
|
||||
+{
|
||||
+ int count = 0;
|
||||
+ u8 reg, i;
|
||||
+
|
||||
+ if (unlikely(!buf))
|
||||
+ return 0;
|
||||
+
|
||||
+ for (i = 0; i < TWL4030_MADC_MAX_CHANNELS; i++) {
|
||||
+ if (channels & (1<<i)) {
|
||||
+ reg = reg_base + 2*i;
|
||||
+ buf[i] = twl4030_madc_channel_raw_read(madc, reg);
|
||||
+ count++;
|
||||
+ }
|
||||
+ }
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+static void twl4030_madc_enable_irq(struct twl4030_madc_data *madc, int id)
|
||||
+{
|
||||
+ u8 val;
|
||||
+
|
||||
+ val = twl4030_madc_read(madc, madc->imr);
|
||||
+ val &= ~(1 << id);
|
||||
+ twl4030_madc_write(madc, madc->imr, val);
|
||||
+}
|
||||
+
|
||||
+static void twl4030_madc_disable_irq(struct twl4030_madc_data *madc, int id)
|
||||
+{
|
||||
+ u8 val;
|
||||
+
|
||||
+ val = twl4030_madc_read(madc, madc->imr);
|
||||
+ val |= (1 << id);
|
||||
+ twl4030_madc_write(madc, madc->imr, val);
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t twl4030_madc_irq_handler(int irq, void *_madc)
|
||||
+{
|
||||
+ struct twl4030_madc_data *madc = _madc;
|
||||
+ u8 isr_val, imr_val;
|
||||
+ int i;
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
|
||||
+ * we don't want and can't tolerate. Although it might be
|
||||
+ * friendlier not to borrow this thread context...
|
||||
+ */
|
||||
+ local_irq_enable();
|
||||
+#endif
|
||||
+
|
||||
+ /* Use COR to ack interrupts since we have no shared IRQs in ISRx */
|
||||
+ isr_val = twl4030_madc_read(madc, madc->isr);
|
||||
+ imr_val = twl4030_madc_read(madc, madc->imr);
|
||||
+
|
||||
+ isr_val &= ~imr_val;
|
||||
+
|
||||
+ for (i = 0; i < TWL4030_MADC_NUM_METHODS; i++) {
|
||||
+
|
||||
+ if (!(isr_val & (1<<i)))
|
||||
+ continue;
|
||||
+
|
||||
+ twl4030_madc_disable_irq(madc, i);
|
||||
+ madc->requests[i].result_pending = 1;
|
||||
+ }
|
||||
+
|
||||
+ schedule_work(&madc->ws);
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static void twl4030_madc_work(struct work_struct *ws)
|
||||
+{
|
||||
+ const struct twl4030_madc_conversion_method *method;
|
||||
+ struct twl4030_madc_data *madc;
|
||||
+ struct twl4030_madc_request *r;
|
||||
+ int len, i;
|
||||
+
|
||||
+ madc = container_of(ws, struct twl4030_madc_data, ws);
|
||||
+ mutex_lock(&madc->lock);
|
||||
+
|
||||
+ for (i = 0; i < TWL4030_MADC_NUM_METHODS; i++) {
|
||||
+
|
||||
+ r = &madc->requests[i];
|
||||
+
|
||||
+ /* No pending results for this method, move to next one */
|
||||
+ if (!r->result_pending)
|
||||
+ continue;
|
||||
+
|
||||
+ method = &twl4030_conversion_methods[r->method];
|
||||
+
|
||||
+ /* Read results */
|
||||
+ len = twl4030_madc_read_channels(madc, method->rbase,
|
||||
+ r->channels, r->rbuf);
|
||||
+
|
||||
+ /* Return results to caller */
|
||||
+ if (r->func_cb != NULL) {
|
||||
+ r->func_cb(len, r->channels, r->rbuf);
|
||||
+ r->func_cb = NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Free request */
|
||||
+ r->result_pending = 0;
|
||||
+ r->active = 0;
|
||||
+ }
|
||||
+
|
||||
+ mutex_unlock(&madc->lock);
|
||||
+}
|
||||
+
|
||||
+static int twl4030_madc_set_irq(struct twl4030_madc_data *madc,
|
||||
+ struct twl4030_madc_request *req)
|
||||
+{
|
||||
+ struct twl4030_madc_request *p;
|
||||
+
|
||||
+ p = &madc->requests[req->method];
|
||||
+
|
||||
+ memcpy(p, req, sizeof *req);
|
||||
+
|
||||
+ twl4030_madc_enable_irq(madc, req->method);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline void twl4030_madc_start_conversion(struct twl4030_madc_data *madc,
|
||||
+ int conv_method)
|
||||
+{
|
||||
+ const struct twl4030_madc_conversion_method *method;
|
||||
+
|
||||
+ method = &twl4030_conversion_methods[conv_method];
|
||||
+
|
||||
+ switch (conv_method) {
|
||||
+ case TWL4030_MADC_SW1:
|
||||
+ case TWL4030_MADC_SW2:
|
||||
+ twl4030_madc_write(madc, method->ctrl, TWL4030_MADC_SW_START);
|
||||
+ break;
|
||||
+ case TWL4030_MADC_RT:
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int twl4030_madc_wait_conversion_ready(
|
||||
+ struct twl4030_madc_data *madc,
|
||||
+ unsigned int timeout_ms, u8 status_reg)
|
||||
+{
|
||||
+ unsigned long timeout;
|
||||
+
|
||||
+ timeout = jiffies + msecs_to_jiffies(timeout_ms);
|
||||
+ do {
|
||||
+ u8 reg;
|
||||
+
|
||||
+ reg = twl4030_madc_read(madc, status_reg);
|
||||
+ if (!(reg & TWL4030_MADC_BUSY) && (reg & TWL4030_MADC_EOC_SW))
|
||||
+ return 0;
|
||||
+ } while (!time_after(jiffies, timeout));
|
||||
+
|
||||
+ return -EAGAIN;
|
||||
+}
|
||||
+
|
||||
+int twl4030_madc_conversion(struct twl4030_madc_request *req)
|
||||
+{
|
||||
+ const struct twl4030_madc_conversion_method *method;
|
||||
+ u8 ch_msb, ch_lsb;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (unlikely(!req))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ mutex_lock(&the_madc->lock);
|
||||
+
|
||||
+ /* Do we have a conversion request ongoing */
|
||||
+ if (the_madc->requests[req->method].active) {
|
||||
+ ret = -EBUSY;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ ch_msb = (req->channels >> 8) & 0xff;
|
||||
+ ch_lsb = req->channels & 0xff;
|
||||
+
|
||||
+ method = &twl4030_conversion_methods[req->method];
|
||||
+
|
||||
+ /* Select channels to be converted */
|
||||
+ twl4030_madc_write(the_madc, method->sel + 1, ch_msb);
|
||||
+ twl4030_madc_write(the_madc, method->sel, ch_lsb);
|
||||
+
|
||||
+ /* Select averaging for all channels if do_avg is set */
|
||||
+ if (req->do_avg) {
|
||||
+ twl4030_madc_write(the_madc, method->avg + 1, ch_msb);
|
||||
+ twl4030_madc_write(the_madc, method->avg, ch_lsb);
|
||||
+ }
|
||||
+
|
||||
+ if ((req->type == TWL4030_MADC_IRQ_ONESHOT) && (req->func_cb != NULL)) {
|
||||
+ twl4030_madc_set_irq(the_madc, req);
|
||||
+ twl4030_madc_start_conversion(the_madc, req->method);
|
||||
+ the_madc->requests[req->method].active = 1;
|
||||
+ ret = 0;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* With RT method we should not be here anymore */
|
||||
+ if (req->method == TWL4030_MADC_RT) {
|
||||
+ ret = -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ twl4030_madc_start_conversion(the_madc, req->method);
|
||||
+ the_madc->requests[req->method].active = 1;
|
||||
+
|
||||
+ /* Wait until conversion is ready (ctrl register returns EOC) */
|
||||
+ ret = twl4030_madc_wait_conversion_ready(the_madc, 5, method->ctrl);
|
||||
+ if (ret) {
|
||||
+ dev_dbg(the_madc->dev, "conversion timeout!\n");
|
||||
+ the_madc->requests[req->method].active = 0;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ ret = twl4030_madc_read_channels(the_madc, method->rbase, req->channels,
|
||||
+ req->rbuf);
|
||||
+
|
||||
+ the_madc->requests[req->method].active = 0;
|
||||
+
|
||||
+out:
|
||||
+ mutex_unlock(&the_madc->lock);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(twl4030_madc_conversion);
|
||||
+
|
||||
+static int twl4030_madc_set_current_generator(struct twl4030_madc_data *madc,
|
||||
+ int chan, int on)
|
||||
+{
|
||||
+ int ret;
|
||||
+ u8 regval;
|
||||
+
|
||||
+ /* Current generator is only available for ADCIN0 and ADCIN1. NB:
|
||||
+ * ADCIN1 current generator only works when AC or VBUS is present */
|
||||
+ if (chan > 1)
|
||||
+ return EINVAL;
|
||||
+
|
||||
+ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ ®val, TWL4030_BCI_BCICTL1);
|
||||
+ if (on)
|
||||
+ regval |= (chan) ? TWL4030_BCI_ITHEN : TWL4030_BCI_TYPEN;
|
||||
+ else
|
||||
+ regval &= (chan) ? ~TWL4030_BCI_ITHEN : ~TWL4030_BCI_TYPEN;
|
||||
+ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ regval, TWL4030_BCI_BCICTL1);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int twl4030_madc_set_power(struct twl4030_madc_data *madc, int on)
|
||||
+{
|
||||
+ u8 regval;
|
||||
+
|
||||
+ regval = twl4030_madc_read(madc, TWL4030_MADC_CTRL1);
|
||||
+ if (on)
|
||||
+ regval |= TWL4030_MADC_MADCON;
|
||||
+ else
|
||||
+ regval &= ~TWL4030_MADC_MADCON;
|
||||
+ twl4030_madc_write(madc, TWL4030_MADC_CTRL1, regval);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static long twl4030_madc_ioctl(struct file *filp, unsigned int cmd,
|
||||
+ unsigned long arg)
|
||||
+{
|
||||
+ struct twl4030_madc_user_parms par;
|
||||
+ int val, ret;
|
||||
+
|
||||
+ ret = copy_from_user(&par, (void __user *) arg, sizeof(par));
|
||||
+ if (ret) {
|
||||
+ dev_dbg(the_madc->dev, "copy_from_user: %d\n", ret);
|
||||
+ return -EACCES;
|
||||
+ }
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case TWL4030_MADC_IOCX_ADC_RAW_READ: {
|
||||
+ struct twl4030_madc_request req;
|
||||
+ if (par.channel >= TWL4030_MADC_MAX_CHANNELS)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ req.channels = (1 << par.channel);
|
||||
+ req.do_avg = par.average;
|
||||
+ req.method = TWL4030_MADC_SW1;
|
||||
+ req.func_cb = NULL;
|
||||
+
|
||||
+ val = twl4030_madc_conversion(&req);
|
||||
+ if (val <= 0) {
|
||||
+ par.status = -1;
|
||||
+ } else {
|
||||
+ par.status = 0;
|
||||
+ par.result = (u16)req.rbuf[par.channel];
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ ret = copy_to_user((void __user *) arg, &par, sizeof(par));
|
||||
+ if (ret) {
|
||||
+ dev_dbg(the_madc->dev, "copy_to_user: %d\n", ret);
|
||||
+ return -EACCES;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct file_operations twl4030_madc_fileops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .unlocked_ioctl = twl4030_madc_ioctl
|
||||
+};
|
||||
+
|
||||
+static struct miscdevice twl4030_madc_device = {
|
||||
+ .minor = MISC_DYNAMIC_MINOR,
|
||||
+ .name = "twl4030-madc",
|
||||
+ .fops = &twl4030_madc_fileops
|
||||
+};
|
||||
+
|
||||
+static int __init twl4030_madc_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct twl4030_madc_data *madc;
|
||||
+ struct twl4030_madc_platform_data *pdata = pdev->dev.platform_data;
|
||||
+ int ret;
|
||||
+ u8 regval;
|
||||
+
|
||||
+ madc = kzalloc(sizeof *madc, GFP_KERNEL);
|
||||
+ if (!madc)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ if (!pdata) {
|
||||
+ dev_dbg(&pdev->dev, "platform_data not available\n");
|
||||
+ ret = -EINVAL;
|
||||
+ goto err_pdata;
|
||||
+ }
|
||||
+
|
||||
+ madc->imr = (pdata->irq_line == 1) ? TWL4030_MADC_IMR1 : TWL4030_MADC_IMR2;
|
||||
+ madc->isr = (pdata->irq_line == 1) ? TWL4030_MADC_ISR1 : TWL4030_MADC_ISR2;
|
||||
+
|
||||
+ ret = misc_register(&twl4030_madc_device);
|
||||
+ if (ret) {
|
||||
+ dev_dbg(&pdev->dev, "could not register misc_device\n");
|
||||
+ goto err_misc;
|
||||
+ }
|
||||
+ twl4030_madc_set_power(madc, 1);
|
||||
+ twl4030_madc_set_current_generator(madc, 0, 1);
|
||||
+
|
||||
+ /* Enable ADCIN3 through 6 */
|
||||
+ ret = twl4030_i2c_read_u8(TWL4030_MODULE_USB,
|
||||
+ ®val, TWL4030_USB_CARKIT_ANA_CTRL);
|
||||
+
|
||||
+ regval |= TWL4030_USB_SEL_MADC_MCPC;
|
||||
+
|
||||
+ ret = twl4030_i2c_write_u8(TWL4030_MODULE_USB,
|
||||
+ regval, TWL4030_USB_CARKIT_ANA_CTRL);
|
||||
+
|
||||
+
|
||||
+ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ ®val, TWL4030_BCI_BCICTL1);
|
||||
+
|
||||
+ regval |= TWL4030_BCI_MESBAT;
|
||||
+
|
||||
+ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ regval, TWL4030_BCI_BCICTL1);
|
||||
+
|
||||
+ ret = request_irq(platform_get_irq(pdev, 0), twl4030_madc_irq_handler,
|
||||
+ 0, "twl4030_madc", madc);
|
||||
+ if (ret) {
|
||||
+ dev_dbg(&pdev->dev, "could not request irq\n");
|
||||
+ goto err_irq;
|
||||
+ }
|
||||
+
|
||||
+ platform_set_drvdata(pdev, madc);
|
||||
+ mutex_init(&madc->lock);
|
||||
+ INIT_WORK(&madc->ws, twl4030_madc_work);
|
||||
+
|
||||
+ the_madc = madc;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_irq:
|
||||
+ misc_deregister(&twl4030_madc_device);
|
||||
+
|
||||
+err_misc:
|
||||
+err_pdata:
|
||||
+ kfree(madc);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int __exit twl4030_madc_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct twl4030_madc_data *madc = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ twl4030_madc_set_power(madc, 0);
|
||||
+ twl4030_madc_set_current_generator(madc, 0, 0);
|
||||
+ free_irq(platform_get_irq(pdev, 0), madc);
|
||||
+ cancel_work_sync(&madc->ws);
|
||||
+ misc_deregister(&twl4030_madc_device);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver twl4030_madc_driver = {
|
||||
+ .probe = twl4030_madc_probe,
|
||||
+ .remove = __exit_p(twl4030_madc_remove),
|
||||
+ .driver = {
|
||||
+ .name = "twl4030_madc",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int __init twl4030_madc_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&twl4030_madc_driver);
|
||||
+}
|
||||
+module_init(twl4030_madc_init);
|
||||
+
|
||||
+static void __exit twl4030_madc_exit(void)
|
||||
+{
|
||||
+ platform_driver_unregister(&twl4030_madc_driver);
|
||||
+}
|
||||
+module_exit(twl4030_madc_exit);
|
||||
+
|
||||
+MODULE_ALIAS("platform:twl4030-madc");
|
||||
+MODULE_AUTHOR("Nokia Corporation");
|
||||
+MODULE_DESCRIPTION("twl4030 ADC driver");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-149
@@ -1,149 +0,0 @@
|
||||
From b13ea241d699a10e3f5347a90bc3d31329f3601d Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 17 Dec 2009 15:54:58 -0800
|
||||
Subject: [PATCH 20/45] ARM: OMAP: Add missing twl4030 madc header file
|
||||
|
||||
---
|
||||
include/linux/i2c/twl4030-madc.h | 130 ++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 130 insertions(+), 0 deletions(-)
|
||||
create mode 100644 include/linux/i2c/twl4030-madc.h
|
||||
|
||||
diff --git a/include/linux/i2c/twl4030-madc.h b/include/linux/i2c/twl4030-madc.h
|
||||
new file mode 100644
|
||||
index 0000000..341a665
|
||||
--- /dev/null
|
||||
+++ b/include/linux/i2c/twl4030-madc.h
|
||||
@@ -0,0 +1,130 @@
|
||||
+/*
|
||||
+ * include/linux/i2c/twl4030-madc.h
|
||||
+ *
|
||||
+ * TWL4030 MADC module driver header
|
||||
+ *
|
||||
+ * Copyright (C) 2008 Nokia Corporation
|
||||
+ * Mikko Ylinen <mikko.k.ylinen@nokia.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * version 2 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
+ * 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifndef _TWL4030_MADC_H
|
||||
+#define _TWL4030_MADC_H
|
||||
+
|
||||
+struct twl4030_madc_conversion_method {
|
||||
+ u8 sel;
|
||||
+ u8 avg;
|
||||
+ u8 rbase;
|
||||
+ u8 ctrl;
|
||||
+};
|
||||
+
|
||||
+#define TWL4030_MADC_MAX_CHANNELS 16
|
||||
+
|
||||
+struct twl4030_madc_request {
|
||||
+ u16 channels;
|
||||
+ u16 do_avg;
|
||||
+ u16 method;
|
||||
+ u16 type;
|
||||
+ int active;
|
||||
+ int result_pending;
|
||||
+ int rbuf[TWL4030_MADC_MAX_CHANNELS];
|
||||
+ void (*func_cb)(int len, int channels, int *buf);
|
||||
+};
|
||||
+
|
||||
+enum conversion_methods {
|
||||
+ TWL4030_MADC_RT,
|
||||
+ TWL4030_MADC_SW1,
|
||||
+ TWL4030_MADC_SW2,
|
||||
+ TWL4030_MADC_NUM_METHODS
|
||||
+};
|
||||
+
|
||||
+enum sample_type {
|
||||
+ TWL4030_MADC_WAIT,
|
||||
+ TWL4030_MADC_IRQ_ONESHOT,
|
||||
+ TWL4030_MADC_IRQ_REARM
|
||||
+};
|
||||
+
|
||||
+#define TWL4030_MADC_CTRL1 0x00
|
||||
+#define TWL4030_MADC_CTRL2 0x01
|
||||
+
|
||||
+#define TWL4030_MADC_RTSELECT_LSB 0x02
|
||||
+#define TWL4030_MADC_SW1SELECT_LSB 0x06
|
||||
+#define TWL4030_MADC_SW2SELECT_LSB 0x0A
|
||||
+
|
||||
+#define TWL4030_MADC_RTAVERAGE_LSB 0x04
|
||||
+#define TWL4030_MADC_SW1AVERAGE_LSB 0x08
|
||||
+#define TWL4030_MADC_SW2AVERAGE_LSB 0x0C
|
||||
+
|
||||
+#define TWL4030_MADC_CTRL_SW1 0x12
|
||||
+#define TWL4030_MADC_CTRL_SW2 0x13
|
||||
+
|
||||
+#define TWL4030_MADC_RTCH0_LSB 0x17
|
||||
+#define TWL4030_MADC_GPCH0_LSB 0x37
|
||||
+
|
||||
+#define TWL4030_MADC_MADCON (1<<0) /* MADC power on */
|
||||
+#define TWL4030_MADC_BUSY (1<<0) /* MADC busy */
|
||||
+#define TWL4030_MADC_EOC_SW (1<<1) /* MADC conversion completion */
|
||||
+#define TWL4030_MADC_SW_START (1<<5) /* MADC SWx start conversion */
|
||||
+
|
||||
+#define TWL4030_MADC_ADCIN0 (1<<0)
|
||||
+#define TWL4030_MADC_ADCIN1 (1<<1)
|
||||
+#define TWL4030_MADC_ADCIN2 (1<<2)
|
||||
+#define TWL4030_MADC_ADCIN3 (1<<3)
|
||||
+#define TWL4030_MADC_ADCIN4 (1<<4)
|
||||
+#define TWL4030_MADC_ADCIN5 (1<<5)
|
||||
+#define TWL4030_MADC_ADCIN6 (1<<6)
|
||||
+#define TWL4030_MADC_ADCIN7 (1<<7)
|
||||
+#define TWL4030_MADC_ADCIN8 (1<<8)
|
||||
+#define TWL4030_MADC_ADCIN9 (1<<9)
|
||||
+#define TWL4030_MADC_ADCIN10 (1<<10)
|
||||
+#define TWL4030_MADC_ADCIN11 (1<<11)
|
||||
+#define TWL4030_MADC_ADCIN12 (1<<12)
|
||||
+#define TWL4030_MADC_ADCIN13 (1<<13)
|
||||
+#define TWL4030_MADC_ADCIN14 (1<<14)
|
||||
+#define TWL4030_MADC_ADCIN15 (1<<15)
|
||||
+
|
||||
+/* Fixed channels */
|
||||
+#define TWL4030_MADC_BTEMP TWL4030_MADC_ADCIN1
|
||||
+#define TWL4030_MADC_VBUS TWL4030_MADC_ADCIN8
|
||||
+#define TWL4030_MADC_VBKB TWL4030_MADC_ADCIN9
|
||||
+#define TWL4030_MADC_ICHG TWL4030_MADC_ADCIN10
|
||||
+#define TWL4030_MADC_VCHG TWL4030_MADC_ADCIN11
|
||||
+#define TWL4030_MADC_VBAT TWL4030_MADC_ADCIN12
|
||||
+
|
||||
+/* BCI related - XXX To be moved elsewhere */
|
||||
+#define TWL4030_BCI_BCICTL1 0x23
|
||||
+#define TWL4030_BCI_MESBAT (1<<1)
|
||||
+#define TWL4030_BCI_TYPEN (1<<4)
|
||||
+#define TWL4030_BCI_ITHEN (1<<3)
|
||||
+
|
||||
+/* USB related - XXX To be moved elsewhere */
|
||||
+#define TWL4030_USB_CARKIT_ANA_CTRL 0xBB
|
||||
+#define TWL4030_USB_SEL_MADC_MCPC (1<<3)
|
||||
+
|
||||
+#define TWL4030_MADC_IOC_MAGIC '`'
|
||||
+#define TWL4030_MADC_IOCX_ADC_RAW_READ _IO(TWL4030_MADC_IOC_MAGIC, 0)
|
||||
+
|
||||
+struct twl4030_madc_user_parms {
|
||||
+ int channel;
|
||||
+ int average;
|
||||
+ int status;
|
||||
+ u16 result;
|
||||
+};
|
||||
+
|
||||
+int twl4030_madc_conversion(struct twl4030_madc_request *conv);
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
From 6b34060f2a665d94e953a7a9b3d66a79e1736cd6 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 17 Dec 2009 14:27:15 -0800
|
||||
Subject: [PATCH 21/45] ARM: OMAP: Add twl4030 madc support to Overo
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-overo.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index 6204b8c..9c76588 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -390,10 +390,15 @@ static struct twl4030_codec_data overo_codec_data = {
|
||||
|
||||
/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
|
||||
|
||||
+static struct twl4030_madc_platform_data overo_madc_data = {
|
||||
+ .irq_line = 1,
|
||||
+};
|
||||
+
|
||||
static struct twl4030_platform_data overo_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
.gpio = &overo_gpio_data,
|
||||
+ .madc = &overo_madc_data,
|
||||
.usb = &overo_usb_data,
|
||||
.codec = &overo_codec_data,
|
||||
.vmmc1 = &overo_vmmc1,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
From 04101f4527b88fbd540fc89f2a8af06d26030fd1 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 17 Dec 2009 14:32:36 -0800
|
||||
Subject: [PATCH 22/45] ARM: OMAP: Add twl4030 madc support to Beagle
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index b3c8cb7..dd830b1 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -473,6 +473,10 @@ static struct twl4030_codec_data beagle_codec_data = {
|
||||
.audio = &beagle_audio_data,
|
||||
};
|
||||
|
||||
+static struct twl4030_madc_platform_data beagle_madc_data = {
|
||||
+ .irq_line = 1,
|
||||
+};
|
||||
+
|
||||
static struct twl4030_platform_data beagle_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
@@ -481,6 +485,7 @@ static struct twl4030_platform_data beagle_twldata = {
|
||||
.usb = &beagle_usb_data,
|
||||
.gpio = &beagle_gpio_data,
|
||||
.codec = &beagle_codec_data,
|
||||
+ .madc = &beagle_madc_data,
|
||||
.vmmc1 = &beagle_vmmc1,
|
||||
.vsim = &beagle_vsim,
|
||||
.vdac = &beagle_vdac,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
From 6c58da582504f23256ec656a03706a1df438f291 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Tue, 19 Jan 2010 20:00:46 -0800
|
||||
Subject: [PATCH 23/45] netdev: rt73usb - add vendor/device ID for Ceiva Wireless PartNo 81726-00702
|
||||
|
||||
---
|
||||
drivers/net/wireless/rt2x00/rt73usb.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
|
||||
index ced3b6a..719ac0a 100644
|
||||
--- a/drivers/net/wireless/rt2x00/rt73usb.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
|
||||
@@ -2357,6 +2357,8 @@ static struct usb_device_id rt73usb_device_table[] = {
|
||||
{ USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) },
|
||||
{ USB_DEVICE(0x0411, 0x0116), USB_DEVICE_DATA(&rt73usb_ops) },
|
||||
{ USB_DEVICE(0x0411, 0x0119), USB_DEVICE_DATA(&rt73usb_ops) },
|
||||
+ /* Ceiva Wireless PartNo 81726-00702 */
|
||||
+ { USB_DEVICE(0x178d, 0x02be), USB_DEVICE_DATA(&rt73usb_ops) },
|
||||
/* CNet */
|
||||
{ USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) },
|
||||
{ USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) },
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
From b17b11c0f8d56f868da267641486b62e1a44790b Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Mon, 4 Jan 2010 19:20:25 -0800
|
||||
Subject: [PATCH 24/45] mmc: don't display single block read console messages
|
||||
|
||||
mmc: don't display single block read console messages
|
||||
---
|
||||
drivers/mmc/card/block.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
|
||||
index 85f0e8c..05492e9 100644
|
||||
--- a/drivers/mmc/card/block.c
|
||||
+++ b/drivers/mmc/card/block.c
|
||||
@@ -338,8 +338,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
|
||||
if (brq.cmd.error || brq.data.error || brq.stop.error) {
|
||||
if (brq.data.blocks > 1 && rq_data_dir(req) == READ) {
|
||||
/* Redo read one sector at a time */
|
||||
- printk(KERN_WARNING "%s: retrying using single "
|
||||
- "block read\n", req->rq_disk->disk_name);
|
||||
+ /* printk(KERN_WARNING "%s: retrying using single "
|
||||
+ "block read\n", req->rq_disk->disk_name); */
|
||||
disable_multi = 1;
|
||||
continue;
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
From 297f577635fe0182e596112c33b213fd22b4efa7 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Sun, 24 Jan 2010 09:33:56 -0800
|
||||
Subject: [PATCH 25/45] ARM: OMAP2: mmc-twl4030: move clock input selection prior to vcc test
|
||||
|
||||
otherwise it is not executed on systems that use non-twl regulators
|
||||
---
|
||||
arch/arm/mach-omap2/mmc-twl4030.c | 16 ++++++++--------
|
||||
1 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
|
||||
index 0c3c72d..dbdafb9 100644
|
||||
--- a/arch/arm/mach-omap2/mmc-twl4030.c
|
||||
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
|
||||
@@ -302,6 +302,14 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v
|
||||
if (c == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
+ if (mmc->slots[0].internal_clock) {
|
||||
+ u32 reg;
|
||||
+
|
||||
+ reg = omap_ctrl_readl(control_devconf1_offset);
|
||||
+ reg |= OMAP2_MMCSDIO2ADPCLKISEL;
|
||||
+ omap_ctrl_writel(reg, control_devconf1_offset);
|
||||
+ }
|
||||
+
|
||||
/* If we don't see a Vcc regulator, assume it's a fixed
|
||||
* voltage always-on regulator.
|
||||
*/
|
||||
@@ -322,14 +330,6 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v
|
||||
* chips/cards need an interface voltage rail too.
|
||||
*/
|
||||
if (power_on) {
|
||||
- /* only MMC2 supports a CLKIN */
|
||||
- if (mmc->slots[0].internal_clock) {
|
||||
- u32 reg;
|
||||
-
|
||||
- reg = omap_ctrl_readl(control_devconf1_offset);
|
||||
- reg |= OMAP2_MMCSDIO2ADPCLKISEL;
|
||||
- omap_ctrl_writel(reg, control_devconf1_offset);
|
||||
- }
|
||||
ret = mmc_regulator_set_ocr(c->vcc, vdd);
|
||||
/* enable interface voltage rail, if needed */
|
||||
if (ret == 0 && c->vcc_aux) {
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-373
@@ -1,373 +0,0 @@
|
||||
From 1f91f7f6dea0268e23d5e3e78b6c8dc5ed245313 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sun, 14 Feb 2010 12:52:02 +0100
|
||||
Subject: [PATCH 26/45] board-overo: add PM code and sync with http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=shortlog;h=refs/heads/omap3-2.6.32
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-overo.c | 274 ++++++++++++++++++++++++++++++++-----
|
||||
1 files changed, 242 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index 9c76588..2595f81 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/i2c/twl.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
@@ -40,16 +41,24 @@
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
+#include <plat/display.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <plat/nand.h>
|
||||
+#include <plat/mcspi.h>
|
||||
#include <plat/usb.h>
|
||||
-
|
||||
-#include "mux.h"
|
||||
+#include <plat/clock.h>
|
||||
+#include <plat/omap-pm.h>
|
||||
+
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
+#include "mux.h"
|
||||
+
|
||||
+#include "pm.h"
|
||||
+#include "omap3-opp.h"
|
||||
+
|
||||
#define OVERO_GPIO_BT_XGATE 15
|
||||
#define OVERO_GPIO_W2W_NRESET 16
|
||||
#define OVERO_GPIO_PENDOWN 114
|
||||
@@ -95,18 +104,6 @@ static struct ads7846_platform_data ads7846_config = {
|
||||
.keep_vref_on = 1,
|
||||
};
|
||||
|
||||
-static struct spi_board_info overo_spi_board_info[] __initdata = {
|
||||
- {
|
||||
- .modalias = "ads7846",
|
||||
- .bus_num = 1,
|
||||
- .chip_select = 0,
|
||||
- .max_speed_hz = 1500000,
|
||||
- .controller_data = &ads7846_mcspi_config,
|
||||
- .irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN),
|
||||
- .platform_data = &ads7846_config,
|
||||
- }
|
||||
-};
|
||||
-
|
||||
static void __init overo_ads7846_init(void)
|
||||
{
|
||||
if ((gpio_request(OVERO_GPIO_PENDOWN, "ADS7846_PENDOWN") == 0) &&
|
||||
@@ -116,9 +113,6 @@ static void __init overo_ads7846_init(void)
|
||||
printk(KERN_ERR "could not obtain gpio for ADS7846_PENDOWN\n");
|
||||
return;
|
||||
}
|
||||
-
|
||||
- spi_register_board_info(overo_spi_board_info,
|
||||
- ARRAY_SIZE(overo_spi_board_info));
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -234,6 +228,169 @@ static inline void __init overo_init_smsc911x(void)
|
||||
static inline void __init overo_init_smsc911x(void) { return; }
|
||||
#endif
|
||||
|
||||
+/* DSS */
|
||||
+static int lcd_enabled;
|
||||
+static int dvi_enabled;
|
||||
+
|
||||
+#define OVERO_GPIO_LCD_EN 144
|
||||
+#define OVERO_GPIO_LCD_BL 145
|
||||
+
|
||||
+static void __init overo_display_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OVERO_GPIO_LCD_EN, "OVERO_GPIO_LCD_EN") == 0) &&
|
||||
+ (gpio_direction_output(OVERO_GPIO_LCD_EN, 1) == 0))
|
||||
+ gpio_export(OVERO_GPIO_LCD_EN, 0);
|
||||
+ else
|
||||
+ printk(KERN_ERR "could not obtain gpio for "
|
||||
+ "OVERO_GPIO_LCD_EN\n");
|
||||
+
|
||||
+ if ((gpio_request(OVERO_GPIO_LCD_BL, "OVERO_GPIO_LCD_BL") == 0) &&
|
||||
+ (gpio_direction_output(OVERO_GPIO_LCD_BL, 1) == 0))
|
||||
+ gpio_export(OVERO_GPIO_LCD_BL, 0);
|
||||
+ else
|
||||
+ printk(KERN_ERR "could not obtain gpio for "
|
||||
+ "OVERO_GPIO_LCD_BL\n");
|
||||
+}
|
||||
+
|
||||
+static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ if (lcd_enabled) {
|
||||
+ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ dvi_enabled = 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ dvi_enabled = 0;
|
||||
+}
|
||||
+
|
||||
+static struct omap_dss_device overo_dvi_device = {
|
||||
+ .type = OMAP_DISPLAY_TYPE_DPI,
|
||||
+ .name = "dvi",
|
||||
+ .driver_name = "generic_panel",
|
||||
+ .phy.dpi.data_lines = 24,
|
||||
+ .platform_enable = overo_panel_enable_dvi,
|
||||
+ .platform_disable = overo_panel_disable_dvi,
|
||||
+};
|
||||
+
|
||||
+static int overo_panel_enable_tv(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+#define ENABLE_VDAC_DEDICATED 0x03
|
||||
+#define ENABLE_VDAC_DEV_GRP 0x20
|
||||
+
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
|
||||
+ ENABLE_VDAC_DEDICATED,
|
||||
+ TWL4030_VDAC_DEDICATED);
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
|
||||
+ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void overo_panel_disable_tv(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
|
||||
+ TWL4030_VDAC_DEDICATED);
|
||||
+ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
|
||||
+ TWL4030_VDAC_DEV_GRP);
|
||||
+}
|
||||
+
|
||||
+static struct omap_dss_device overo_tv_device = {
|
||||
+ .name = "tv",
|
||||
+ .driver_name = "venc",
|
||||
+ .type = OMAP_DISPLAY_TYPE_VENC,
|
||||
+ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
+ .platform_enable = overo_panel_enable_tv,
|
||||
+ .platform_disable = overo_panel_disable_tv,
|
||||
+};
|
||||
+
|
||||
+static int overo_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ if (dvi_enabled) {
|
||||
+ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ gpio_set_value(OVERO_GPIO_LCD_EN, 1);
|
||||
+ gpio_set_value(OVERO_GPIO_LCD_BL, 1);
|
||||
+ lcd_enabled = 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ gpio_set_value(OVERO_GPIO_LCD_EN, 0);
|
||||
+ gpio_set_value(OVERO_GPIO_LCD_BL, 0);
|
||||
+ lcd_enabled = 0;
|
||||
+}
|
||||
+
|
||||
+#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
|
||||
+ defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
|
||||
+static struct omap_dss_device overo_lcd35_device = {
|
||||
+ .type = OMAP_DISPLAY_TYPE_DPI,
|
||||
+ .name = "lcd35",
|
||||
+ .driver_name = "lgphilips_lb035q02_panel",
|
||||
+ .phy.dpi.data_lines = 24,
|
||||
+ .panel.recommended_bpp = 16,
|
||||
+ .platform_enable = overo_panel_enable_lcd,
|
||||
+ .platform_disable = overo_panel_disable_lcd,
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) || \
|
||||
+ defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C_MODULE)
|
||||
+static struct omap_dss_device overo_lcd43_device = {
|
||||
+ .type = OMAP_DISPLAY_TYPE_DPI,
|
||||
+ .name = "lcd43",
|
||||
+ .driver_name = "samsung_lte_panel",
|
||||
+ .phy.dpi.data_lines = 24,
|
||||
+ .panel.recommended_bpp = 16,
|
||||
+ .platform_enable = overo_panel_enable_lcd,
|
||||
+ .platform_disable = overo_panel_disable_lcd,
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+static struct omap_dss_device *overo_dss_devices[] = {
|
||||
+ &overo_dvi_device,
|
||||
+ &overo_tv_device,
|
||||
+#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
|
||||
+ defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
|
||||
+ &overo_lcd35_device,
|
||||
+#endif
|
||||
+#if defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) || \
|
||||
+ defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C_MODULE)
|
||||
+ &overo_lcd43_device,
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+static struct omap_dss_board_info overo_dss_data = {
|
||||
+ .num_devices = ARRAY_SIZE(overo_dss_devices),
|
||||
+ .devices = overo_dss_devices,
|
||||
+ .default_device = &overo_dvi_device,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device overo_dss_device = {
|
||||
+ .name = "omapdss",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &overo_dss_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply overo_vdda_dac_supply = {
|
||||
+ .supply = "vdda_dac",
|
||||
+ .dev = &overo_dss_device.dev,
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply overo_vdds_dsi_supply = {
|
||||
+ .supply = "vdds_dsi",
|
||||
+ .dev = &overo_dss_device.dev,
|
||||
+};
|
||||
+
|
||||
static struct mtd_partition overo_nand_partitions[] = {
|
||||
{
|
||||
.name = "xloader",
|
||||
@@ -379,6 +536,37 @@ static struct regulator_init_data overo_vmmc1 = {
|
||||
.consumer_supplies = &overo_vmmc1_supply,
|
||||
};
|
||||
|
||||
+/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
|
||||
+static struct regulator_init_data overo_vdac = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = 1,
|
||||
+ .consumer_supplies = &overo_vdda_dac_supply,
|
||||
+};
|
||||
+
|
||||
+/* VPLL2 for digital video outputs */
|
||||
+static struct regulator_init_data overo_vpll2 = {
|
||||
+ .constraints = {
|
||||
+ .name = "VDVI",
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = 1,
|
||||
+ .consumer_supplies = &overo_vdds_dsi_supply,
|
||||
+};
|
||||
+
|
||||
+/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
|
||||
+
|
||||
static struct twl4030_codec_audio_data overo_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
@@ -402,6 +590,8 @@ static struct twl4030_platform_data overo_twldata = {
|
||||
.usb = &overo_usb_data,
|
||||
.codec = &overo_codec_data,
|
||||
.vmmc1 = &overo_vmmc1,
|
||||
+ .vdac = &overo_vdac,
|
||||
+ .vpll2 = &overo_vpll2,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata overo_i2c_boardinfo[] = {
|
||||
@@ -422,31 +612,50 @@ static int __init overo_i2c_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static struct platform_device overo_lcd_device = {
|
||||
- .name = "overo_lcd",
|
||||
- .id = -1,
|
||||
-};
|
||||
-
|
||||
-static struct omap_lcd_config overo_lcd_config __initdata = {
|
||||
- .ctrl_name = "internal",
|
||||
+static struct spi_board_info overo_spi_board_info[] __initdata = {
|
||||
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
|
||||
+ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
+ {
|
||||
+ .modalias = "ads7846",
|
||||
+ .bus_num = 1,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 1500000,
|
||||
+ .controller_data = &ads7846_mcspi_config,
|
||||
+ .irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN),
|
||||
+ .platform_data = &ads7846_config,
|
||||
+ },
|
||||
+#endif
|
||||
+#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
|
||||
+ defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
|
||||
+ {
|
||||
+ .modalias = "lgphilips_lb035q02_panel-spi",
|
||||
+ .bus_num = 1,
|
||||
+ .chip_select = 1,
|
||||
+ .max_speed_hz = 500000,
|
||||
+ .mode = SPI_MODE_3,
|
||||
+ },
|
||||
+#endif
|
||||
};
|
||||
|
||||
-static struct omap_board_config_kernel overo_config[] __initdata = {
|
||||
- { OMAP_TAG_LCD, &overo_lcd_config },
|
||||
-};
|
||||
+static int __init overo_spi_init(void)
|
||||
+{
|
||||
+ overo_ads7846_init();
|
||||
+ spi_register_board_info(overo_spi_board_info,
|
||||
+ ARRAY_SIZE(overo_spi_board_info));
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
static void __init overo_init_irq(void)
|
||||
{
|
||||
- omap_board_config = overo_config;
|
||||
- omap_board_config_size = ARRAY_SIZE(overo_config);
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
- mt46h32m32lf6_sdrc_params, NULL, NULL, NULL);
|
||||
+ NULL, omap35x_mpu_rate_table,
|
||||
+ omap35x_dsp_rate_table, omap35x_l3_rate_table);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static struct platform_device *overo_devices[] __initdata = {
|
||||
- &overo_lcd_device,
|
||||
+ &overo_dss_device,
|
||||
};
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
@@ -477,8 +686,9 @@ static void __init overo_init(void)
|
||||
overo_flash_init();
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
- overo_ads7846_init();
|
||||
+ overo_spi_init();
|
||||
overo_init_smsc911x();
|
||||
+ overo_display_init();
|
||||
|
||||
/* Ensure SDRC pins are mux'd for self-refresh */
|
||||
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-85
@@ -1,85 +0,0 @@
|
||||
From e102ffa8fcc1586ed7d4c1390b7b2c7d7d359c40 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 15 Feb 2010 14:20:51 +0100
|
||||
Subject: [PATCH 27/45] twl4030-madc: adjust for twl4030 -> twl api changes
|
||||
|
||||
---
|
||||
drivers/mfd/twl4030-madc.c | 18 +++++++++---------
|
||||
1 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
|
||||
index 7d83ab8..de6bdcd 100644
|
||||
--- a/drivers/mfd/twl4030-madc.c
|
||||
+++ b/drivers/mfd/twl4030-madc.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/miscdevice.h>
|
||||
-#include <linux/i2c/twl4030.h>
|
||||
+#include <linux/i2c/twl.h>
|
||||
#include <linux/i2c/twl4030-madc.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
@@ -73,7 +73,7 @@ static int twl4030_madc_read(struct twl4030_madc_data *madc, u8 reg)
|
||||
int ret;
|
||||
u8 val;
|
||||
|
||||
- ret = twl4030_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg);
|
||||
+ ret = twl_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg);
|
||||
if (ret) {
|
||||
dev_dbg(madc->dev, "unable to read register 0x%X\n", reg);
|
||||
return ret;
|
||||
@@ -86,7 +86,7 @@ static void twl4030_madc_write(struct twl4030_madc_data *madc, u8 reg, u8 val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
- ret = twl4030_i2c_write_u8(TWL4030_MODULE_MADC, val, reg);
|
||||
+ ret = twl_i2c_write_u8(TWL4030_MODULE_MADC, val, reg);
|
||||
if (ret)
|
||||
dev_err(madc->dev, "unable to write register 0x%X\n", reg);
|
||||
}
|
||||
@@ -342,13 +342,13 @@ static int twl4030_madc_set_current_generator(struct twl4030_madc_data *madc,
|
||||
if (chan > 1)
|
||||
return EINVAL;
|
||||
|
||||
- ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ ret = twl_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
®val, TWL4030_BCI_BCICTL1);
|
||||
if (on)
|
||||
regval |= (chan) ? TWL4030_BCI_ITHEN : TWL4030_BCI_TYPEN;
|
||||
else
|
||||
regval &= (chan) ? ~TWL4030_BCI_ITHEN : ~TWL4030_BCI_TYPEN;
|
||||
- ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
regval, TWL4030_BCI_BCICTL1);
|
||||
|
||||
return ret;
|
||||
@@ -453,21 +453,21 @@ static int __init twl4030_madc_probe(struct platform_device *pdev)
|
||||
twl4030_madc_set_current_generator(madc, 0, 1);
|
||||
|
||||
/* Enable ADCIN3 through 6 */
|
||||
- ret = twl4030_i2c_read_u8(TWL4030_MODULE_USB,
|
||||
+ ret = twl_i2c_read_u8(TWL4030_MODULE_USB,
|
||||
®val, TWL4030_USB_CARKIT_ANA_CTRL);
|
||||
|
||||
regval |= TWL4030_USB_SEL_MADC_MCPC;
|
||||
|
||||
- ret = twl4030_i2c_write_u8(TWL4030_MODULE_USB,
|
||||
+ ret = twl_i2c_write_u8(TWL4030_MODULE_USB,
|
||||
regval, TWL4030_USB_CARKIT_ANA_CTRL);
|
||||
|
||||
|
||||
- ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ ret = twl_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
®val, TWL4030_BCI_BCICTL1);
|
||||
|
||||
regval |= TWL4030_BCI_MESBAT;
|
||||
|
||||
- ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
+ ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
|
||||
regval, TWL4030_BCI_BCICTL1);
|
||||
|
||||
ret = request_irq(platform_get_irq(pdev, 0), twl4030_madc_irq_handler,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-161
@@ -1,161 +0,0 @@
|
||||
From 5e227dbb55a40c616cca8a2345a159310c729897 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 15 Feb 2010 14:38:00 +0100
|
||||
Subject: [PATCH 28/45] OMAP: DSS2: (Re)add support for Samsung lte430wq-f0c panel
|
||||
|
||||
---
|
||||
drivers/video/omap2/displays/Kconfig | 6 +
|
||||
drivers/video/omap2/displays/Makefile | 1 +
|
||||
.../omap2/displays/panel-samsung-lte430wq-f0c.c | 113 ++++++++++++++++++++
|
||||
3 files changed, 120 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
|
||||
|
||||
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
|
||||
index 4ce47dd..4229a28 100644
|
||||
--- a/drivers/video/omap2/displays/Kconfig
|
||||
+++ b/drivers/video/omap2/displays/Kconfig
|
||||
@@ -7,6 +7,12 @@ config PANEL_GENERIC
|
||||
Generic panel driver.
|
||||
Used for DVI output for Beagle and OMAP3 SDP.
|
||||
|
||||
+config PANEL_SAMSUNG_LTE430WQ_F0C
|
||||
+ tristate "Samsung LTE430WQ-F0C LCD Panel"
|
||||
+ depends on OMAP2_DSS
|
||||
+ help
|
||||
+ LCD Panel used on Overo Palo43
|
||||
+
|
||||
config PANEL_SHARP_LS037V7DW01
|
||||
tristate "Sharp LS037V7DW01 LCD Panel"
|
||||
depends on OMAP2_DSS
|
||||
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
|
||||
index 8f3d0ad..9317445 100644
|
||||
--- a/drivers/video/omap2/displays/Makefile
|
||||
+++ b/drivers/video/omap2/displays/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
|
||||
+obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o
|
||||
obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
|
||||
obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o
|
||||
|
||||
diff --git a/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
|
||||
new file mode 100644
|
||||
index 0000000..3f0477e
|
||||
--- /dev/null
|
||||
+++ b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
|
||||
@@ -0,0 +1,113 @@
|
||||
+/*
|
||||
+ * LCD panel driver for Samsung LTE430WQ-F0C
|
||||
+ *
|
||||
+ * Author: Steve Sakoman <steve@sakoman.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 as published by
|
||||
+ * the Free Software Foundation.
|
||||
+ *
|
||||
+ * 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, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/delay.h>
|
||||
+
|
||||
+#include <plat/display.h>
|
||||
+
|
||||
+static struct omap_video_timings samsung_lte_timings = {
|
||||
+ .x_res = 480,
|
||||
+ .y_res = 272,
|
||||
+
|
||||
+ .pixel_clock = 9200,
|
||||
+
|
||||
+ .hsw = 41,
|
||||
+ .hfp = 8,
|
||||
+ .hbp = 45-41,
|
||||
+
|
||||
+ .vsw = 10,
|
||||
+ .vfp = 4,
|
||||
+ .vbp = 12-10,
|
||||
+};
|
||||
+
|
||||
+static int samsung_lte_panel_probe(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
+ OMAP_DSS_LCD_IHS;
|
||||
+ dssdev->panel.timings = samsung_lte_timings;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void samsung_lte_panel_remove(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static int samsung_lte_panel_enable(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ int r = 0;
|
||||
+
|
||||
+ /* wait couple of vsyncs until enabling the LCD */
|
||||
+ msleep(50);
|
||||
+
|
||||
+ if (dssdev->platform_enable)
|
||||
+ r = dssdev->platform_enable(dssdev);
|
||||
+
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static void samsung_lte_panel_disable(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ if (dssdev->platform_disable)
|
||||
+ dssdev->platform_disable(dssdev);
|
||||
+
|
||||
+ /* wait at least 5 vsyncs after disabling the LCD */
|
||||
+
|
||||
+ msleep(100);
|
||||
+}
|
||||
+
|
||||
+static int samsung_lte_panel_suspend(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ samsung_lte_panel_disable(dssdev);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int samsung_lte_panel_resume(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ return samsung_lte_panel_enable(dssdev);
|
||||
+}
|
||||
+
|
||||
+static struct omap_dss_driver samsung_lte_driver = {
|
||||
+ .probe = samsung_lte_panel_probe,
|
||||
+ .remove = samsung_lte_panel_remove,
|
||||
+
|
||||
+ .enable = samsung_lte_panel_enable,
|
||||
+ .disable = samsung_lte_panel_disable,
|
||||
+ .suspend = samsung_lte_panel_suspend,
|
||||
+ .resume = samsung_lte_panel_resume,
|
||||
+
|
||||
+ .driver = {
|
||||
+ .name = "samsung_lte_panel",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int __init samsung_lte_panel_drv_init(void)
|
||||
+{
|
||||
+ return omap_dss_register_driver(&samsung_lte_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit samsung_lte_panel_drv_exit(void)
|
||||
+{
|
||||
+ omap_dss_unregister_driver(&samsung_lte_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(samsung_lte_panel_drv_init);
|
||||
+module_exit(samsung_lte_panel_drv_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-254
@@ -1,254 +0,0 @@
|
||||
From e960b2c16c24198a669a7c49e6282333faa74a3e Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 17 Dec 2009 15:05:30 -0800
|
||||
Subject: [PATCH 29/45] OMAP: DSS2: Add support for LG Philips LB035Q02 panel
|
||||
|
||||
---
|
||||
drivers/video/omap2/displays/Kconfig | 6 +
|
||||
drivers/video/omap2/displays/Makefile | 1 +
|
||||
.../omap2/displays/panel-lgphilips-lb035q02.c | 206 ++++++++++++++++++++
|
||||
3 files changed, 213 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
|
||||
|
||||
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
|
||||
index 4229a28..875250a 100644
|
||||
--- a/drivers/video/omap2/displays/Kconfig
|
||||
+++ b/drivers/video/omap2/displays/Kconfig
|
||||
@@ -7,6 +7,12 @@ config PANEL_GENERIC
|
||||
Generic panel driver.
|
||||
Used for DVI output for Beagle and OMAP3 SDP.
|
||||
|
||||
+config PANEL_LGPHILIPS_LB035Q02
|
||||
+ tristate "LG.Philips LB035Q02 LCD Panel"
|
||||
+ depends on OMAP2_DSS
|
||||
+ help
|
||||
+ LCD Panel used on Overo Palo35
|
||||
+
|
||||
config PANEL_SAMSUNG_LTE430WQ_F0C
|
||||
tristate "Samsung LTE430WQ-F0C LCD Panel"
|
||||
depends on OMAP2_DSS
|
||||
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
|
||||
index 9317445..f8e6c52 100644
|
||||
--- a/drivers/video/omap2/displays/Makefile
|
||||
+++ b/drivers/video/omap2/displays/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
|
||||
+obj-$(CONFIG_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o
|
||||
obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o
|
||||
obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
|
||||
obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o
|
||||
diff --git a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
|
||||
new file mode 100644
|
||||
index 0000000..22dc865
|
||||
--- /dev/null
|
||||
+++ b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
|
||||
@@ -0,0 +1,206 @@
|
||||
+/*
|
||||
+ * LCD panel driver for LG.Philips LB035Q02
|
||||
+ *
|
||||
+ * Author: Steve Sakoman <steve@sakoman.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 as published by
|
||||
+ * the Free Software Foundation.
|
||||
+ *
|
||||
+ * 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, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#include <plat/display.h>
|
||||
+
|
||||
+static struct spi_device *spidev;
|
||||
+
|
||||
+static struct omap_video_timings lb035q02_timings = {
|
||||
+ .x_res = 320,
|
||||
+ .y_res = 240,
|
||||
+
|
||||
+ .pixel_clock = 6500,
|
||||
+
|
||||
+ .hsw = 2,
|
||||
+ .hfp = 20,
|
||||
+ .hbp = 68,
|
||||
+
|
||||
+ .vsw = 2,
|
||||
+ .vfp = 4,
|
||||
+ .vbp = 18,
|
||||
+};
|
||||
+
|
||||
+static int lb035q02_panel_probe(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
+ OMAP_DSS_LCD_IHS;
|
||||
+ dssdev->panel.timings = lb035q02_timings;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void lb035q02_panel_remove(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static int lb035q02_write_reg(u8 reg, u16 val)
|
||||
+{
|
||||
+ struct spi_message msg;
|
||||
+ struct spi_transfer index_xfer = {
|
||||
+ .len = 3,
|
||||
+ .cs_change = 1,
|
||||
+ };
|
||||
+ struct spi_transfer value_xfer = {
|
||||
+ .len = 3,
|
||||
+ };
|
||||
+ u8 buffer[16];
|
||||
+
|
||||
+ spi_message_init(&msg);
|
||||
+
|
||||
+ /* register index */
|
||||
+ buffer[0] = 0x70;
|
||||
+ buffer[1] = 0x00;
|
||||
+ buffer[2] = reg & 0x7f;
|
||||
+ index_xfer.tx_buf = buffer;
|
||||
+ spi_message_add_tail(&index_xfer, &msg);
|
||||
+
|
||||
+ /* register value */
|
||||
+ buffer[4] = 0x72;
|
||||
+ buffer[5] = val >> 8;
|
||||
+ buffer[6] = val;
|
||||
+ value_xfer.tx_buf = buffer + 4;
|
||||
+ spi_message_add_tail(&value_xfer, &msg);
|
||||
+
|
||||
+ return spi_sync(spidev, &msg);
|
||||
+}
|
||||
+
|
||||
+static int lb035q02_panel_enable(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ int r = 0;
|
||||
+
|
||||
+ pr_info("lgphilips_lb035q02: panel_enable: 0x%08x\n", spidev);
|
||||
+ /* wait couple of vsyncs until enabling the LCD */
|
||||
+ msleep(50);
|
||||
+
|
||||
+ if (dssdev->platform_enable)
|
||||
+ r = dssdev->platform_enable(dssdev);
|
||||
+
|
||||
+ /* Panel init sequence from page 28 of the spec */
|
||||
+ lb035q02_write_reg(0x01, 0x6300);
|
||||
+ lb035q02_write_reg(0x02, 0x0200);
|
||||
+ lb035q02_write_reg(0x03, 0x0177);
|
||||
+ lb035q02_write_reg(0x04, 0x04c7);
|
||||
+ lb035q02_write_reg(0x05, 0xffc0);
|
||||
+ lb035q02_write_reg(0x06, 0xe806);
|
||||
+ lb035q02_write_reg(0x0a, 0x4008);
|
||||
+ lb035q02_write_reg(0x0b, 0x0000);
|
||||
+ lb035q02_write_reg(0x0d, 0x0030);
|
||||
+ lb035q02_write_reg(0x0e, 0x2800);
|
||||
+ lb035q02_write_reg(0x0f, 0x0000);
|
||||
+ lb035q02_write_reg(0x16, 0x9f80);
|
||||
+ lb035q02_write_reg(0x17, 0x0a0f);
|
||||
+ lb035q02_write_reg(0x1e, 0x00c1);
|
||||
+ lb035q02_write_reg(0x30, 0x0300);
|
||||
+ lb035q02_write_reg(0x31, 0x0007);
|
||||
+ lb035q02_write_reg(0x32, 0x0000);
|
||||
+ lb035q02_write_reg(0x33, 0x0000);
|
||||
+ lb035q02_write_reg(0x34, 0x0707);
|
||||
+ lb035q02_write_reg(0x35, 0x0004);
|
||||
+ lb035q02_write_reg(0x36, 0x0302);
|
||||
+ lb035q02_write_reg(0x37, 0x0202);
|
||||
+ lb035q02_write_reg(0x3a, 0x0a0d);
|
||||
+ lb035q02_write_reg(0x3b, 0x0806);
|
||||
+
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static void lb035q02_panel_disable(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ if (dssdev->platform_disable)
|
||||
+ dssdev->platform_disable(dssdev);
|
||||
+
|
||||
+ /* wait at least 5 vsyncs after disabling the LCD */
|
||||
+
|
||||
+ msleep(100);
|
||||
+}
|
||||
+
|
||||
+static int lb035q02_panel_suspend(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ pr_info("lgphilips_lb035q02: panel_suspend\n");
|
||||
+ lb035q02_panel_disable(dssdev);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int lb035q02_panel_resume(struct omap_dss_device *dssdev)
|
||||
+{
|
||||
+ pr_info("lgphilips_lb035q02: panel_resume\n");
|
||||
+ return lb035q02_panel_enable(dssdev);
|
||||
+}
|
||||
+
|
||||
+static struct omap_dss_driver lb035q02_driver = {
|
||||
+ .probe = lb035q02_panel_probe,
|
||||
+ .remove = lb035q02_panel_remove,
|
||||
+
|
||||
+ .enable = lb035q02_panel_enable,
|
||||
+ .disable = lb035q02_panel_disable,
|
||||
+ .suspend = lb035q02_panel_suspend,
|
||||
+ .resume = lb035q02_panel_resume,
|
||||
+
|
||||
+ .driver = {
|
||||
+ .name = "lgphilips_lb035q02_panel",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int __devinit lb035q02_panel_spi_probe(struct spi_device *spi)
|
||||
+{
|
||||
+ spidev = spi;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int __devexit lb035q02_panel_spi_remove(struct spi_device *spi)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct spi_driver lb035q02_spi_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "lgphilips_lb035q02_panel-spi",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+ .probe = lb035q02_panel_spi_probe,
|
||||
+ .remove = __devexit_p (lb035q02_panel_spi_remove),
|
||||
+};
|
||||
+
|
||||
+static int __init lb035q02_panel_drv_init(void)
|
||||
+{
|
||||
+ int ret;
|
||||
+ ret = spi_register_driver(&lb035q02_spi_driver);
|
||||
+ if (ret != 0)
|
||||
+ pr_err("lgphilips_lb035q02: Unable to register SPI driver: %d\n", ret);
|
||||
+
|
||||
+ ret = omap_dss_register_driver(&lb035q02_driver);
|
||||
+ if (ret != 0)
|
||||
+ pr_err("lgphilips_lb035q02: Unable to register panel driver: %d\n", ret);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void __exit lb035q02_panel_drv_exit(void)
|
||||
+{
|
||||
+ spi_unregister_driver(&lb035q02_spi_driver);
|
||||
+ omap_dss_unregister_driver(&lb035q02_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(lb035q02_panel_drv_init);
|
||||
+module_exit(lb035q02_panel_drv_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
From ed355dc59a30638b914152d52752d5e0ca06ecbd Mon Sep 17 00:00:00 2001
|
||||
From: Kishore Kadiyala <kishore.kadiyala@ti.com>
|
||||
Date: Wed, 17 Feb 2010 19:34:47 +0530
|
||||
Subject: [PATCH 30/45] Fix for bus width which improves SD card's peformance.
|
||||
|
||||
This patch fixes bus width which improves peformance for SD cards.
|
||||
OMAP-MMC controller's can support maximum bus width of '8'.
|
||||
when bus width is mentioned as "8" in controller data,the SD
|
||||
stack will check whether bus width is "4" and if not it will
|
||||
set bus width to "1" and there by degrading peformance.
|
||||
|
||||
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index fa94580..9646a75 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -1776,7 +1776,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
|
||||
MMC_CAP_WAIT_WHILE_BUSY;
|
||||
|
||||
if (mmc_slot(host).wires >= 8)
|
||||
- mmc->caps |= MMC_CAP_8_BIT_DATA;
|
||||
+ mmc->caps |= (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA);
|
||||
else if (mmc_slot(host).wires >= 4)
|
||||
mmc->caps |= MMC_CAP_4_BIT_DATA;
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-109
@@ -1,109 +0,0 @@
|
||||
From b366c2810c736d8d544cf261f3354eebaf5e5655 Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@nokia.com>
|
||||
Date: Thu, 4 Feb 2010 21:38:02 +0200
|
||||
Subject: [PATCH 31/45] ARM: VFP: add support to sync the VFP state of the current thread
|
||||
|
||||
ARM: VFP: add support to sync the VFP state of the current thread
|
||||
|
||||
So far vfp_sync_state worked only for threads other than the current
|
||||
one. This worked for tracing other threads, but not for PTRACE_TRACEME.
|
||||
Syncing for the current thread will also be needed by an upcoming patch
|
||||
adding support for VFP context save / restore around signal handlers.
|
||||
|
||||
For SMP we need get_cpu now, since we have to protect the FPEXC
|
||||
register, other than this things remained the same for threads other
|
||||
than the current.
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@nokia.com>
|
||||
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
|
||||
---
|
||||
arch/arm/vfp/vfpmodule.c | 46 +++++++++++++++++++++++++++++++---------------
|
||||
1 files changed, 31 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
|
||||
index aed05bc..f28f45b 100644
|
||||
--- a/arch/arm/vfp/vfpmodule.c
|
||||
+++ b/arch/arm/vfp/vfpmodule.c
|
||||
@@ -423,12 +423,19 @@ static inline void vfp_pm_init(void) { }
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
/*
|
||||
- * Synchronise the hardware VFP state of a thread other than current with the
|
||||
- * saved one. This function is used by the ptrace mechanism.
|
||||
+ * Synchronise the hardware VFP state of a thread with the saved one.
|
||||
+ * This function is used by the ptrace mechanism and the signal handler path.
|
||||
*/
|
||||
-#ifdef CONFIG_SMP
|
||||
void vfp_sync_state(struct thread_info *thread)
|
||||
{
|
||||
+ unsigned int cpu = get_cpu();
|
||||
+ u32 fpexc = fmrx(FPEXC);
|
||||
+ int vfp_enabled;
|
||||
+ int self;
|
||||
+
|
||||
+ vfp_enabled = fpexc & FPEXC_EN;
|
||||
+ self = thread == current_thread_info();
|
||||
+#ifdef CONFIG_SMP
|
||||
/*
|
||||
* On SMP systems, the VFP state is automatically saved at every
|
||||
* context switch. We mark the thread VFP state as belonging to a
|
||||
@@ -436,18 +443,22 @@ void vfp_sync_state(struct thread_info *thread)
|
||||
* needed.
|
||||
*/
|
||||
thread->vfpstate.hard.cpu = NR_CPUS;
|
||||
-}
|
||||
-#else
|
||||
-void vfp_sync_state(struct thread_info *thread)
|
||||
-{
|
||||
- unsigned int cpu = get_cpu();
|
||||
- u32 fpexc = fmrx(FPEXC);
|
||||
-
|
||||
/*
|
||||
- * If VFP is enabled, the previous state was already saved and
|
||||
- * last_VFP_context updated.
|
||||
+ * Only the current thread's saved VFP context can be out-of-date.
|
||||
+ * For others there is nothing else to do, since we already ensured
|
||||
+ * force loading above.
|
||||
*/
|
||||
- if (fpexc & FPEXC_EN)
|
||||
+ if (!self)
|
||||
+ goto out;
|
||||
+#endif
|
||||
+ /*
|
||||
+ * If the VFP is enabled only the current thread's saved VFP
|
||||
+ * context can get out-of-date. For other threads the context
|
||||
+ * was updated when the current thread started to use the VFP.
|
||||
+ * This also means that the context will be reloaded next time
|
||||
+ * the thread uses the VFP, so no need to enforce it.
|
||||
+ */
|
||||
+ if (vfp_enabled && !self)
|
||||
goto out;
|
||||
|
||||
if (!last_VFP_context[cpu])
|
||||
@@ -456,8 +467,14 @@ void vfp_sync_state(struct thread_info *thread)
|
||||
/*
|
||||
* Save the last VFP state on this CPU.
|
||||
*/
|
||||
- fmxr(FPEXC, fpexc | FPEXC_EN);
|
||||
+ if (!vfp_enabled)
|
||||
+ fmxr(FPEXC, fpexc | FPEXC_EN);
|
||||
vfp_save_state(last_VFP_context[cpu], fpexc);
|
||||
+ /*
|
||||
+ * Disable VFP in case it was enabled so that the force reload
|
||||
+ * can happen.
|
||||
+ */
|
||||
+ fpexc &= ~FPEXC_EN;
|
||||
fmxr(FPEXC, fpexc);
|
||||
|
||||
/*
|
||||
@@ -469,7 +486,6 @@ void vfp_sync_state(struct thread_info *thread)
|
||||
out:
|
||||
put_cpu();
|
||||
}
|
||||
-#endif
|
||||
|
||||
#include <linux/smp.h>
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-211
@@ -1,211 +0,0 @@
|
||||
From 1be18045f852e78bf78d2042a5210c53d830f81b Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@nokia.com>
|
||||
Date: Thu, 4 Feb 2010 21:38:30 +0200
|
||||
Subject: [PATCH 32/45] ARM: VFP: preserve the HW context when calling signal handlers
|
||||
|
||||
ARM: VFP: preserve the HW context when calling signal handlers
|
||||
|
||||
Signal handlers can use floating point, so prevent them to corrupt
|
||||
the main thread's VFP context. So far there were two signal stack
|
||||
frame formats defined based on the VFP implementation, but the user
|
||||
struct used for ptrace covers all posibilities, so use it for the
|
||||
signal stack too. This patch extends the user struct and leaves
|
||||
its magic number the same, in the hope that user space code does
|
||||
not depend on its size and can parse the original regs w/o
|
||||
problems.
|
||||
|
||||
Support to save / restore the exception registers was added by
|
||||
Will Deacon.
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@nokia.com>
|
||||
Signed-off-by: Will Deacon <will.deacon@arm.com>
|
||||
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
|
||||
---
|
||||
arch/arm/include/asm/ucontext.h | 19 +++-----
|
||||
arch/arm/include/asm/user.h | 3 +
|
||||
arch/arm/kernel/signal.c | 91 +++++++++++++++++++++++++++++++++++++--
|
||||
3 files changed, 97 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/ucontext.h b/arch/arm/include/asm/ucontext.h
|
||||
index bf65e9f..1c3236b 100644
|
||||
--- a/arch/arm/include/asm/ucontext.h
|
||||
+++ b/arch/arm/include/asm/ucontext.h
|
||||
@@ -59,23 +59,18 @@ struct iwmmxt_sigframe {
|
||||
#endif /* CONFIG_IWMMXT */
|
||||
|
||||
#ifdef CONFIG_VFP
|
||||
-#if __LINUX_ARM_ARCH__ < 6
|
||||
-/* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra
|
||||
- * word after the registers, and a word of padding at the end for
|
||||
- * alignment. */
|
||||
#define VFP_MAGIC 0x56465001
|
||||
-#define VFP_STORAGE_SIZE 152
|
||||
-#else
|
||||
-#define VFP_MAGIC 0x56465002
|
||||
-#define VFP_STORAGE_SIZE 144
|
||||
-#endif
|
||||
|
||||
struct vfp_sigframe
|
||||
{
|
||||
unsigned long magic;
|
||||
unsigned long size;
|
||||
- union vfp_state storage;
|
||||
-};
|
||||
+ struct user_vfp ufp;
|
||||
+} __attribute__((__aligned__(8)));
|
||||
+
|
||||
+/* 8 byte for magic and size, 272 byte for ufp */
|
||||
+#define VFP_STORAGE_SIZE sizeof(struct vfp_sigframe)
|
||||
+
|
||||
#endif /* CONFIG_VFP */
|
||||
|
||||
/*
|
||||
@@ -91,7 +86,7 @@ struct aux_sigframe {
|
||||
#ifdef CONFIG_IWMMXT
|
||||
struct iwmmxt_sigframe iwmmxt;
|
||||
#endif
|
||||
-#if 0 && defined CONFIG_VFP /* Not yet saved. */
|
||||
+#ifdef CONFIG_VFP
|
||||
struct vfp_sigframe vfp;
|
||||
#endif
|
||||
/* Something that isn't a valid magic number for any coprocessor. */
|
||||
diff --git a/arch/arm/include/asm/user.h b/arch/arm/include/asm/user.h
|
||||
index df95e05..ea7e44d 100644
|
||||
--- a/arch/arm/include/asm/user.h
|
||||
+++ b/arch/arm/include/asm/user.h
|
||||
@@ -88,6 +88,9 @@ struct user{
|
||||
struct user_vfp {
|
||||
unsigned long long fpregs[32];
|
||||
unsigned long fpscr;
|
||||
+ unsigned long fpexc;
|
||||
+ unsigned long fpinst;
|
||||
+ unsigned long fpinst2;
|
||||
};
|
||||
|
||||
#endif /* _ARM_USER_H */
|
||||
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
|
||||
index e7714f3..6a36851 100644
|
||||
--- a/arch/arm/kernel/signal.c
|
||||
+++ b/arch/arm/kernel/signal.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/ucontext.h>
|
||||
#include <asm/unistd.h>
|
||||
+#include <asm/vfp.h>
|
||||
|
||||
#include "ptrace.h"
|
||||
#include "signal.h"
|
||||
@@ -175,6 +176,88 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame)
|
||||
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_VFP
|
||||
+
|
||||
+static int preserve_vfp_context(struct vfp_sigframe __user *frame)
|
||||
+{
|
||||
+ struct thread_info *thread = current_thread_info();
|
||||
+ struct vfp_hard_struct *h = &thread->vfpstate.hard;
|
||||
+ const unsigned long magic = VFP_MAGIC;
|
||||
+ const unsigned long size = VFP_STORAGE_SIZE;
|
||||
+ int err = 0;
|
||||
+
|
||||
+ vfp_sync_state(thread);
|
||||
+ __put_user_error(magic, &frame->magic, err);
|
||||
+ __put_user_error(size, &frame->size, err);
|
||||
+
|
||||
+ /*
|
||||
+ * Copy the floating point registers. There can be unused
|
||||
+ * registers see asm/hwcap.h for details.
|
||||
+ */
|
||||
+ err |= __copy_to_user(&frame->ufp.fpregs, &h->fpregs,
|
||||
+ sizeof(h->fpregs));
|
||||
+ /*
|
||||
+ * Copy the status and control register.
|
||||
+ */
|
||||
+ __put_user_error(h->fpscr, &frame->ufp.fpscr, err);
|
||||
+
|
||||
+ /*
|
||||
+ * Copy the exception registers.
|
||||
+ */
|
||||
+ __put_user_error(h->fpexc, &frame->ufp.fpexc, err);
|
||||
+ __put_user_error(h->fpinst, &frame->ufp.fpinst, err);
|
||||
+ __put_user_error(h->fpinst2, &frame->ufp.fpinst2, err);
|
||||
+
|
||||
+ return err ? -EFAULT : 0;
|
||||
+}
|
||||
+
|
||||
+static int restore_vfp_context(struct vfp_sigframe __user *frame)
|
||||
+{
|
||||
+ struct thread_info *thread = current_thread_info();
|
||||
+ struct vfp_hard_struct *h = &thread->vfpstate.hard;
|
||||
+ unsigned long magic;
|
||||
+ unsigned long size;
|
||||
+ unsigned long fpexc;
|
||||
+ int err = 0;
|
||||
+
|
||||
+ vfp_sync_state(thread);
|
||||
+ __get_user_error(magic, &frame->magic, err);
|
||||
+ __get_user_error(size, &frame->size, err);
|
||||
+
|
||||
+ if (err)
|
||||
+ return -EFAULT;
|
||||
+ if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ /*
|
||||
+ * Copy the floating point registers. There can be unused
|
||||
+ * registers see asm/hwcap.h for details.
|
||||
+ */
|
||||
+ err |= __copy_from_user(&h->fpregs, &frame->ufp.fpregs,
|
||||
+ sizeof(h->fpregs));
|
||||
+ /*
|
||||
+ * Copy the status and control register.
|
||||
+ */
|
||||
+ __get_user_error(h->fpscr, &frame->ufp.fpscr, err);
|
||||
+
|
||||
+ /*
|
||||
+ * Sanitise and restore the exception registers.
|
||||
+ */
|
||||
+ __get_user_error(fpexc, &frame->ufp.fpexc, err);
|
||||
+ /* Ensure the VFP is enabled. */
|
||||
+ fpexc |= FPEXC_EN;
|
||||
+ /* Ensure FPINST2 is invalid and the exception flag is cleared. */
|
||||
+ fpexc &= ~(FPEXC_EX | FPEXC_FP2V);
|
||||
+ h->fpexc = fpexc;
|
||||
+
|
||||
+ __get_user_error(h->fpinst, &frame->ufp.fpinst, err);
|
||||
+ __get_user_error(h->fpinst2, &frame->ufp.fpinst2, err);
|
||||
+
|
||||
+ return err ? -EFAULT : 0;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Do a signal return; undo the signal stack. These are aligned to 64-bit.
|
||||
*/
|
||||
@@ -233,8 +316,8 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
|
||||
err |= restore_iwmmxt_context(&aux->iwmmxt);
|
||||
#endif
|
||||
#ifdef CONFIG_VFP
|
||||
-// if (err == 0)
|
||||
-// err |= vfp_restore_state(&sf->aux.vfp);
|
||||
+ if (err == 0)
|
||||
+ err |= restore_vfp_context(&aux->vfp);
|
||||
#endif
|
||||
|
||||
return err;
|
||||
@@ -348,8 +431,8 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set)
|
||||
err |= preserve_iwmmxt_context(&aux->iwmmxt);
|
||||
#endif
|
||||
#ifdef CONFIG_VFP
|
||||
-// if (err == 0)
|
||||
-// err |= vfp_save_state(&sf->aux.vfp);
|
||||
+ if (err == 0)
|
||||
+ err |= preserve_vfp_context(&aux->vfp);
|
||||
#endif
|
||||
__put_user_error(0, &aux->end_magic, err);
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
From 754249937d4ea60207bd85d172240840caa8fa2c Mon Sep 17 00:00:00 2001
|
||||
From: Prabindh Sundareson <prabu@ti.com>
|
||||
Date: Wed, 3 Mar 2010 15:45:35 +0100
|
||||
Subject: [PATCH 33/45] Switch SGX clocks to 200MHz on DM37xx/OMAP36xx
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/clock34xx_data.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c
|
||||
index e3c752f..89e2f61 100644
|
||||
--- a/arch/arm/mach-omap2/clock34xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/clock34xx_data.c
|
||||
@@ -3325,8 +3325,8 @@ static struct omap_clk omap3xxx_clks[] = {
|
||||
CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1),
|
||||
CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1),
|
||||
CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1),
|
||||
- CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2 | CK_3517),
|
||||
- CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2 | CK_3517),
|
||||
+ CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2 | CK_3517 | CK_36XX),
|
||||
+ CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2 | CK_3517 | CK_36XX),
|
||||
CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1),
|
||||
CLK(NULL, "modem_fck", &modem_fck, CK_343X),
|
||||
CLK(NULL, "sad2d_ick", &sad2d_ick, CK_343X),
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 48fe0d059d9bd5a8486309db26c7780fe3044626 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 8 Mar 2010 14:38:31 +0100
|
||||
Subject: [PATCH 34/45] modedb.c: add proper 720p60 mode
|
||||
|
||||
---
|
||||
drivers/video/modedb.c | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
|
||||
index b32fa2a..f017d57 100644
|
||||
--- a/drivers/video/modedb.c
|
||||
+++ b/drivers/video/modedb.c
|
||||
@@ -44,6 +44,10 @@ static const struct fb_videomode modedb[] = {
|
||||
NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
|
||||
0, FB_VMODE_NONINTERLACED
|
||||
}, {
|
||||
+ /* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */
|
||||
+ "hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5,
|
||||
+ 0, FB_VMODE_NONINTERLACED
|
||||
+ }, {
|
||||
/* 800x600 @ 56 Hz, 35.15 kHz hsync */
|
||||
NULL, 56, 800, 600, 27777, 128, 24, 22, 1, 72, 2,
|
||||
0, FB_VMODE_NONINTERLACED
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
From eade32775fc8fc3c25c9bdace1828fe649a31e0a Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Thu, 4 Feb 2010 12:26:22 -0800
|
||||
Subject: [PATCH 35/45] RTC: add support for backup battery recharge
|
||||
|
||||
---
|
||||
drivers/rtc/rtc-twl.c | 25 +++++++++++++++++++++++++
|
||||
1 files changed, 25 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
|
||||
index c6a83a2..2329b5b 100644
|
||||
--- a/drivers/rtc/rtc-twl.c
|
||||
+++ b/drivers/rtc/rtc-twl.c
|
||||
@@ -30,6 +30,23 @@
|
||||
|
||||
#include <linux/i2c/twl.h>
|
||||
|
||||
+/*
|
||||
+ * PM_RECEIVER block register offsets (use TWL4030_MODULE_PM_RECEIVER)
|
||||
+ */
|
||||
+#define REG_BB_CFG 0x12
|
||||
+
|
||||
+/* PM_RECEIVER BB_CFG bitfields */
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBCHEN 0x10
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBSEL 0x0C
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_2V5 0x00
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V0 0x04
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 0x08
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3v2 0x0c
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBISEL 0x03
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA 0x00
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_150UA 0x01
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_500UA 0x02
|
||||
+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_1MA 0x03
|
||||
|
||||
/*
|
||||
* RTC block register offsets (use TWL_MODULE_RTC)
|
||||
@@ -508,6 +525,14 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
|
||||
if (ret < 0)
|
||||
goto out2;
|
||||
|
||||
+ /* enable backup battery charging */
|
||||
+ /* use a conservative 25uA @ 3.1V */
|
||||
+ ret = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
|
||||
+ BIT_PM_RECEIVER_BB_CFG_BBCHEN |
|
||||
+ BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 |
|
||||
+ BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA,
|
||||
+ REG_BB_CFG);
|
||||
+
|
||||
return ret;
|
||||
|
||||
out2:
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
From f4902a8ee1bbc739a60dcd970705c5665e98691f Mon Sep 17 00:00:00 2001
|
||||
From: Mans Rullgard <mans@mansr.com>
|
||||
Date: Mon, 13 Oct 2008 20:32:16 +0100
|
||||
Subject: [PATCH 36/45] ARM: Add prompt for CONFIG_ALIGNMENT_TRAP
|
||||
|
||||
This adds a prompt text for CONFIG_ALIGNMENT_TRAP, thus making it
|
||||
visible in make *config.
|
||||
|
||||
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
||||
---
|
||||
arch/arm/Kconfig | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||
index 88f628b..f5ded3c 100644
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1224,7 +1224,7 @@ config LEDS_CPU
|
||||
will overrule the CPU usage LED.
|
||||
|
||||
config ALIGNMENT_TRAP
|
||||
- bool
|
||||
+ bool "Enable alignment trap"
|
||||
depends on CPU_CP15_MMU
|
||||
default y if !ARCH_EBSA110
|
||||
help
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
From 310ec494b3c860e657290648821dbc98da9fff90 Mon Sep 17 00:00:00 2001
|
||||
From: Mans Rullgard <mans@mansr.com>
|
||||
Date: Sat, 28 Mar 2009 13:21:55 +0000
|
||||
Subject: [PATCH 37/45] ARM: Print warning on alignment trap in kernel mode
|
||||
|
||||
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
||||
---
|
||||
arch/arm/mm/alignment.c | 7 +++++++
|
||||
1 files changed, 7 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
|
||||
index b270d62..5e9014b 100644
|
||||
--- a/arch/arm/mm/alignment.c
|
||||
+++ b/arch/arm/mm/alignment.c
|
||||
@@ -756,6 +756,13 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||
|
||||
ai_sys += 1;
|
||||
|
||||
+ printk("Alignment trap in kernel: %s (%d) PC=0x%08lx Instr=0x%0*lx "
|
||||
+ "Address=0x%08lx FSR 0x%03x\n", current->comm,
|
||||
+ task_pid_nr(current), instrptr,
|
||||
+ thumb_mode(regs) ? 4 : 8,
|
||||
+ thumb_mode(regs) ? tinstr : instr,
|
||||
+ addr, fsr);
|
||||
+
|
||||
fixup:
|
||||
|
||||
regs->ARM_pc += isize;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-202
@@ -1,202 +0,0 @@
|
||||
From 9eeb533964f73b661d23f7b145b96aa5d247e950 Mon Sep 17 00:00:00 2001
|
||||
From: Mans Rullgard <mans@mansr.com>
|
||||
Date: Tue, 10 Nov 2009 00:39:21 +0000
|
||||
Subject: [PATCH 38/45] ARM: Expose some CPU control registers via sysfs
|
||||
|
||||
This creates sysfs files under /sys/devices/system/cpu/cpuN
|
||||
exposing the values of the control register, auxiliary control
|
||||
register, and L2 cache auxiliary control register. Writing to
|
||||
the files allows setting the value of bits which are safe to
|
||||
change at any time.
|
||||
|
||||
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
||||
---
|
||||
arch/arm/Kconfig | 5 ++
|
||||
arch/arm/kernel/Makefile | 1 +
|
||||
arch/arm/kernel/sysfs_v7.c | 146 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 152 insertions(+), 0 deletions(-)
|
||||
create mode 100644 arch/arm/kernel/sysfs_v7.c
|
||||
|
||||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||
index f5ded3c..2d370da 100644
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1252,6 +1252,11 @@ config UACCESS_WITH_MEMCPY
|
||||
However, if the CPU data cache is using a write-allocate mode,
|
||||
this option is unlikely to provide any performance gain.
|
||||
|
||||
+config CPU_V7_SYSFS
|
||||
+ bool
|
||||
+ depends on CPU_V7 && SYSFS
|
||||
+ default y
|
||||
+
|
||||
endmenu
|
||||
|
||||
menu "Boot options"
|
||||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
|
||||
index dd00f74..ee20134 100644
|
||||
--- a/arch/arm/kernel/Makefile
|
||||
+++ b/arch/arm/kernel/Makefile
|
||||
@@ -38,6 +38,7 @@ obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
|
||||
obj-$(CONFIG_KGDB) += kgdb.o
|
||||
obj-$(CONFIG_ARM_UNWIND) += unwind.o
|
||||
obj-$(CONFIG_HAVE_TCM) += tcm.o
|
||||
+obj-$(CONFIG_CPU_V7_SYSFS) += sysfs_v7.o
|
||||
|
||||
obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
|
||||
AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
|
||||
diff --git a/arch/arm/kernel/sysfs_v7.c b/arch/arm/kernel/sysfs_v7.c
|
||||
new file mode 100644
|
||||
index 0000000..c05bf5f
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/kernel/sysfs_v7.c
|
||||
@@ -0,0 +1,146 @@
|
||||
+/*
|
||||
+ * linux/arch/arm/kernel/sysfs.c
|
||||
+ *
|
||||
+ * Copyright (C) 2008 Mans Rullgard
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/cpu.h>
|
||||
+#include <linux/sysdev.h>
|
||||
+#include <linux/fs.h>
|
||||
+
|
||||
+#define SETBITS(val, bits, new) \
|
||||
+ do { \
|
||||
+ val &= ~bits; \
|
||||
+ val |= new & bits; \
|
||||
+ } while (0)
|
||||
+
|
||||
+#define SHOW_REG(name, opc1, crn, crm, opc2) \
|
||||
+static ssize_t name##_show(struct sys_device *dev, \
|
||||
+ struct sysdev_attribute *attr, \
|
||||
+ char *buf) \
|
||||
+{ \
|
||||
+ unsigned val; \
|
||||
+ asm ("mrc p15,"#opc1", %0,"#crn","#crm","#opc2 : "=r"(val)); \
|
||||
+ return snprintf(buf, PAGE_SIZE, "%08x\n", val); \
|
||||
+}
|
||||
+
|
||||
+#define STORE_REG(name, opc1, crn, crm, opc2, bits) \
|
||||
+static ssize_t name##_store(struct sys_device *dev, \
|
||||
+ struct sysdev_attribute *attr, \
|
||||
+ const char *buf, size_t size) \
|
||||
+{ \
|
||||
+ char *end; \
|
||||
+ unsigned new = simple_strtoul(buf, &end, 0); \
|
||||
+ unsigned val; \
|
||||
+ \
|
||||
+ if (end == buf) \
|
||||
+ return -EINVAL; \
|
||||
+ \
|
||||
+ asm ("mrc p15,"#opc1", %0,"#crn","#crm","#opc2 : "=r"(val)); \
|
||||
+ SETBITS(val, bits, new); \
|
||||
+ asm ("mcr p15,"#opc1", %0,"#crn","#crm","#opc2 :: "r"(val)); \
|
||||
+ \
|
||||
+ return end - buf; \
|
||||
+}
|
||||
+
|
||||
+#define RD_REG(name, opc1, crn, crm, opc2) \
|
||||
+ SHOW_REG(name, opc1, crn, crm, opc2) \
|
||||
+ static SYSDEV_ATTR(name, S_IRUGO|S_IWUSR, name##_show, NULL)
|
||||
+
|
||||
+#define RDWR_REG(name, opc1, crn, crm, opc2, bits) \
|
||||
+ SHOW_REG(name, opc1, crn, crm, opc2) \
|
||||
+ STORE_REG(name, opc1, crn, crm, opc2, bits) \
|
||||
+ static SYSDEV_ATTR(name, S_IRUGO|S_IWUSR, name##_show, name##_store)
|
||||
+
|
||||
+RDWR_REG(control, 0, c1, c0, 0, 0x802);
|
||||
+
|
||||
+SHOW_REG(aux_ctl, 0, c1, c0, 1)
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP34XX
|
||||
+static ssize_t aux_ctl_store(struct sys_device *dev,
|
||||
+ struct sysdev_attribute *attr,
|
||||
+ const char *buf, size_t size)
|
||||
+{
|
||||
+ char *end;
|
||||
+ unsigned new = simple_strtoul(buf, &end, 0);
|
||||
+ unsigned val;
|
||||
+
|
||||
+ if (end == buf)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ asm ("mrc p15, 0, %0, c1, c0, 1" : "=r"(val));
|
||||
+ SETBITS(val, 0xff8, new);
|
||||
+ val &= ~2;
|
||||
+ asm ("mov r0, %0 \n\t"
|
||||
+ "mov r12, #3 \n\t"
|
||||
+ "smc #0 \n\t"
|
||||
+ :: "r"(val) : "r0", "r12");
|
||||
+
|
||||
+ return end - buf;
|
||||
+}
|
||||
+#define AUX_WR S_IWUSR
|
||||
+#else
|
||||
+#define aux_ctl_store NULL
|
||||
+#define AUX_WR 0
|
||||
+#endif
|
||||
+
|
||||
+static SYSDEV_ATTR(aux_control, S_IRUGO|AUX_WR, aux_ctl_show, aux_ctl_store);
|
||||
+
|
||||
+SHOW_REG(l2_aux_ctl, 1, c9, c0, 2)
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP34XX
|
||||
+static ssize_t l2_aux_ctl_store(struct sys_device *dev,
|
||||
+ struct sysdev_attribute *attr,
|
||||
+ const char *buf, size_t size)
|
||||
+{
|
||||
+ char *end;
|
||||
+ unsigned new = simple_strtoul(buf, &end, 0);
|
||||
+ unsigned val;
|
||||
+
|
||||
+ if (end == buf)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ asm ("mrc p15, 1, %0, c9, c0, 2" : "=r"(val));
|
||||
+ SETBITS(val, 0xbc00000, new);
|
||||
+ asm ("mov r0, %0 \n\t"
|
||||
+ "mov r12, #2 \n\t"
|
||||
+ "smc #0 \n\t"
|
||||
+ :: "r"(val) : "r0", "r12");
|
||||
+
|
||||
+ return end - buf;
|
||||
+}
|
||||
+#define L2AUX_WR S_IWUSR
|
||||
+#else
|
||||
+#define l2_aux_ctl_store NULL
|
||||
+#define L2AUX_WR 0
|
||||
+#endif
|
||||
+
|
||||
+static SYSDEV_ATTR(l2_aux_control, S_IRUGO|L2AUX_WR,
|
||||
+ l2_aux_ctl_show, l2_aux_ctl_store);
|
||||
+
|
||||
+#define REG_ATTR(sysdev, name) \
|
||||
+ do { \
|
||||
+ int err = sysfs_create_file(&sysdev->kobj, &name.attr); \
|
||||
+ WARN_ON(err != 0); \
|
||||
+ } while (0)
|
||||
+
|
||||
+static int __init cpu_sysfs_init(void)
|
||||
+{
|
||||
+ struct sys_device *sysdev;
|
||||
+ int cpu;
|
||||
+
|
||||
+ for_each_possible_cpu(cpu) {
|
||||
+ sysdev = get_cpu_sysdev(cpu);
|
||||
+ REG_ATTR(sysdev, attr_control);
|
||||
+ REG_ATTR(sysdev, attr_aux_control);
|
||||
+ REG_ATTR(sysdev, attr_l2_aux_control);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+device_initcall(cpu_sysfs_init);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
From 2f716593e3f11859bf98c997183c47587c2dba76 Mon Sep 17 00:00:00 2001
|
||||
From: Mans Rullgard <mans@mansr.com>
|
||||
Date: Tue, 10 Nov 2009 00:41:54 +0000
|
||||
Subject: [PATCH 39/45] ARM: Add option to allow userspace PLE access
|
||||
|
||||
This adds a Kconfig option to allow userspace to access the L2 preload
|
||||
engine (PLE) found in Cortex-A8.
|
||||
|
||||
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
||||
---
|
||||
arch/arm/kernel/head.S | 4 ++++
|
||||
arch/arm/mm/Kconfig | 8 ++++++++
|
||||
2 files changed, 12 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
|
||||
index eb62bf9..659ec9e 100644
|
||||
--- a/arch/arm/kernel/head.S
|
||||
+++ b/arch/arm/kernel/head.S
|
||||
@@ -172,6 +172,10 @@ __enable_mmu:
|
||||
#ifdef CONFIG_CPU_ICACHE_DISABLE
|
||||
bic r0, r0, #CR_I
|
||||
#endif
|
||||
+#ifdef CONFIG_USER_L2_PLE
|
||||
+ mov r5, #3
|
||||
+ mcr p15, 0, r5, c11, c1, 0
|
||||
+#endif
|
||||
mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
|
||||
domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
|
||||
domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \
|
||||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
|
||||
index dd4698c..564ff7d 100644
|
||||
--- a/arch/arm/mm/Kconfig
|
||||
+++ b/arch/arm/mm/Kconfig
|
||||
@@ -785,3 +785,11 @@ config ARM_L1_CACHE_SHIFT
|
||||
int
|
||||
default 6 if ARCH_OMAP3 || ARCH_S5PC1XX
|
||||
default 5
|
||||
+
|
||||
+config USER_L2_PLE
|
||||
+ bool "Enable userspace access to the L2 PLE"
|
||||
+ depends on CPU_V7
|
||||
+ default n
|
||||
+ help
|
||||
+ Enable userspace access to the L2 preload engine (PLE) available
|
||||
+ in Cortex-A series ARM processors.
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
From dd1e35157bfd32303aaf87b1ec3f85d8dd1c0014 Mon Sep 17 00:00:00 2001
|
||||
From: Mans Rullgard <mans@mansr.com>
|
||||
Date: Tue, 10 Nov 2009 00:52:56 +0000
|
||||
Subject: [PATCH 40/45] ARM: Add option to allow userspace access to performance counters
|
||||
|
||||
This adds an option to allow userspace access to the performance monitor
|
||||
registers of the Cortex-A8.
|
||||
|
||||
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
||||
---
|
||||
arch/arm/mm/Kconfig | 7 +++++++
|
||||
arch/arm/mm/proc-v7.S | 6 ++++++
|
||||
2 files changed, 13 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
|
||||
index 564ff7d..fda2e68 100644
|
||||
--- a/arch/arm/mm/Kconfig
|
||||
+++ b/arch/arm/mm/Kconfig
|
||||
@@ -793,3 +793,10 @@ config USER_L2_PLE
|
||||
help
|
||||
Enable userspace access to the L2 preload engine (PLE) available
|
||||
in Cortex-A series ARM processors.
|
||||
+
|
||||
+config USER_PMON
|
||||
+ bool "Enable userspace access to performance counters"
|
||||
+ depends on CPU_V7
|
||||
+ default n
|
||||
+ help
|
||||
+ Enable userpsace access to the performance monitor registers.
|
||||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
|
||||
index 3a28521..fec926a 100644
|
||||
--- a/arch/arm/mm/proc-v7.S
|
||||
+++ b/arch/arm/mm/proc-v7.S
|
||||
@@ -270,6 +270,12 @@ __v7_setup:
|
||||
mcr p15, 0, r5, c10, c2, 0 @ write PRRR
|
||||
mcr p15, 0, r6, c10, c2, 1 @ write NMRR
|
||||
#endif
|
||||
+
|
||||
+#ifdef CONFIG_USER_PMON
|
||||
+ mov r0, #1
|
||||
+ mcr p15, 0, r0, c9, c14, 0
|
||||
+#endif
|
||||
+
|
||||
adr r5, v7_crval
|
||||
ldmia r5, {r5, r6}
|
||||
#ifdef CONFIG_CPU_ENDIAN_BE8
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
From 13fdb12b3744ca0eaf00d5339919b17ce933c6d5 Mon Sep 17 00:00:00 2001
|
||||
From: Mans Rullgard <mans@mansr.com>
|
||||
Date: Sat, 28 Mar 2009 13:05:02 +0000
|
||||
Subject: [PATCH 41/45] ARM: Expose some PMON registers through sysfs
|
||||
|
||||
---
|
||||
arch/arm/kernel/sysfs_v7.c | 11 +++++++++++
|
||||
1 files changed, 11 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/kernel/sysfs_v7.c b/arch/arm/kernel/sysfs_v7.c
|
||||
index c05bf5f..5ed32fb 100644
|
||||
--- a/arch/arm/kernel/sysfs_v7.c
|
||||
+++ b/arch/arm/kernel/sysfs_v7.c
|
||||
@@ -123,6 +123,12 @@ static ssize_t l2_aux_ctl_store(struct sys_device *dev,
|
||||
static SYSDEV_ATTR(l2_aux_control, S_IRUGO|L2AUX_WR,
|
||||
l2_aux_ctl_show, l2_aux_ctl_store);
|
||||
|
||||
+RDWR_REG(pmon_pmnc, 0, c9, c12, 0, 0x3f)
|
||||
+RDWR_REG(pmon_cntens, 0, c9, c12, 1, 0x8000000f)
|
||||
+RDWR_REG(pmon_cntenc, 0, c9, c12, 2, 0x8000000f)
|
||||
+RDWR_REG(pmon_ccnt, 0, c9, c13, 0, 0xffffffff)
|
||||
+RDWR_REG(pmon_useren, 0, c9, c14, 0, 1)
|
||||
+
|
||||
#define REG_ATTR(sysdev, name) \
|
||||
do { \
|
||||
int err = sysfs_create_file(&sysdev->kobj, &name.attr); \
|
||||
@@ -139,6 +145,11 @@ static int __init cpu_sysfs_init(void)
|
||||
REG_ATTR(sysdev, attr_control);
|
||||
REG_ATTR(sysdev, attr_aux_control);
|
||||
REG_ATTR(sysdev, attr_l2_aux_control);
|
||||
+ REG_ATTR(sysdev, attr_pmon_pmnc);
|
||||
+ REG_ATTR(sysdev, attr_pmon_cntens);
|
||||
+ REG_ATTR(sysdev, attr_pmon_cntenc);
|
||||
+ REG_ATTR(sysdev, attr_pmon_ccnt);
|
||||
+ REG_ATTR(sysdev, attr_pmon_useren);
|
||||
}
|
||||
|
||||
return 0;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
From 97283f52ea7fbb9b611a65d031c997e4ae44d465 Mon Sep 17 00:00:00 2001
|
||||
From: Ajay Kumar Gupta <ajay.gupta@ti.com>
|
||||
Date: Wed, 14 Apr 2010 16:08:37 +0530
|
||||
Subject: [PATCH 42/45] musb: allow host io without gadget module
|
||||
|
||||
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
|
||||
---
|
||||
drivers/usb/musb/musb_core.c | 14 +++++++++-----
|
||||
drivers/usb/musb/musb_gadget.c | 26 --------------------------
|
||||
2 files changed, 9 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
|
||||
index 71ec7e8..9988553 100644
|
||||
--- a/drivers/usb/musb/musb_core.c
|
||||
+++ b/drivers/usb/musb/musb_core.c
|
||||
@@ -2101,10 +2101,12 @@ bad_config:
|
||||
* (We expect the ID pin to be forcibly grounded!!)
|
||||
* Otherwise, wait till the gadget driver hooks up.
|
||||
*/
|
||||
- if (!is_otg_enabled(musb) && is_host_enabled(musb)) {
|
||||
- MUSB_HST_MODE(musb);
|
||||
- musb->xceiv->default_a = 1;
|
||||
- musb->xceiv->state = OTG_STATE_A_IDLE;
|
||||
+ if (is_host_enabled(musb)) {
|
||||
+ if (!is_otg_enabled(musb)) {
|
||||
+ MUSB_HST_MODE(musb);
|
||||
+ musb->xceiv->default_a = 1;
|
||||
+ musb->xceiv->state = OTG_STATE_A_IDLE;
|
||||
+ }
|
||||
|
||||
status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
|
||||
|
||||
@@ -2115,7 +2117,9 @@ bad_config:
|
||||
& MUSB_DEVCTL_BDEVICE
|
||||
? 'B' : 'A'));
|
||||
|
||||
- } else /* peripheral is enabled */ {
|
||||
+ }
|
||||
+ /* peripheral is enabled */
|
||||
+ if (is_peripheral_enabled(musb)) {
|
||||
MUSB_DEV_MODE(musb);
|
||||
musb->xceiv->default_a = 0;
|
||||
musb->xceiv->state = OTG_STATE_B_IDLE;
|
||||
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
|
||||
index 454f6db..d0d1cee 100644
|
||||
--- a/drivers/usb/musb/musb_gadget.c
|
||||
+++ b/drivers/usb/musb/musb_gadget.c
|
||||
@@ -1768,24 +1768,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
|
||||
otg_set_peripheral(musb->xceiv, &musb->g);
|
||||
|
||||
spin_unlock_irqrestore(&musb->lock, flags);
|
||||
-
|
||||
- if (is_otg_enabled(musb)) {
|
||||
- DBG(3, "OTG startup...\n");
|
||||
-
|
||||
- /* REVISIT: funcall to other code, which also
|
||||
- * handles power budgeting ... this way also
|
||||
- * ensures HdrcStart is indirectly called.
|
||||
- */
|
||||
- retval = usb_add_hcd(musb_to_hcd(musb), -1, 0);
|
||||
- if (retval < 0) {
|
||||
- DBG(1, "add_hcd failed, %d\n", retval);
|
||||
- spin_lock_irqsave(&musb->lock, flags);
|
||||
- otg_set_peripheral(musb->xceiv, NULL);
|
||||
- musb->gadget_driver = NULL;
|
||||
- musb->g.dev.driver = NULL;
|
||||
- spin_unlock_irqrestore(&musb->lock, flags);
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
return retval;
|
||||
@@ -1881,14 +1863,6 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
|
||||
retval = -EINVAL;
|
||||
spin_unlock_irqrestore(&musb->lock, flags);
|
||||
|
||||
- if (is_otg_enabled(musb) && retval == 0) {
|
||||
- usb_remove_hcd(musb_to_hcd(musb));
|
||||
- /* FIXME we need to be able to register another
|
||||
- * gadget driver here and have everything work;
|
||||
- * that currently misbehaves.
|
||||
- */
|
||||
- }
|
||||
-
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL(usb_gadget_unregister_driver);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-59
@@ -1,59 +0,0 @@
|
||||
From 2379628bcd6c08e472020c78019ce8ea3fce3027 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Mon, 26 Apr 2010 11:17:26 -0700
|
||||
Subject: [PATCH 43/45] MTD: silence ecc errors on mtdblock0
|
||||
|
||||
mtdblock0 is the x-load partition, which uses hw ecc
|
||||
this confuses linux, which uses sw ecc
|
||||
this patch silences ecc error messages when linux peeks into mtdblock0
|
||||
* not for upstream submission *
|
||||
---
|
||||
block/blk-core.c | 3 ++-
|
||||
drivers/mtd/nand/nand_ecc.c | 2 +-
|
||||
fs/buffer.c | 3 ++-
|
||||
3 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/block/blk-core.c b/block/blk-core.c
|
||||
index 718897e..c526fde 100644
|
||||
--- a/block/blk-core.c
|
||||
+++ b/block/blk-core.c
|
||||
@@ -1970,7 +1970,8 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
|
||||
req->errors = 0;
|
||||
|
||||
if (error && (blk_fs_request(req) && !(req->cmd_flags & REQ_QUIET))) {
|
||||
- printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n",
|
||||
+ if (req->rq_disk && (strcmp(req->rq_disk->disk_name, "mtdblock0") != 0))
|
||||
+ printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n",
|
||||
req->rq_disk ? req->rq_disk->disk_name : "?",
|
||||
(unsigned long long)blk_rq_pos(req));
|
||||
}
|
||||
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c
|
||||
index 92320a6..2b86b6d 100644
|
||||
--- a/drivers/mtd/nand/nand_ecc.c
|
||||
+++ b/drivers/mtd/nand/nand_ecc.c
|
||||
@@ -492,7 +492,7 @@ int __nand_correct_data(unsigned char *buf,
|
||||
if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
|
||||
return 1; /* error in ecc data; no action needed */
|
||||
|
||||
- printk(KERN_ERR "uncorrectable error : ");
|
||||
+// printk(KERN_ERR "uncorrectable error : ");
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(__nand_correct_data);
|
||||
diff --git a/fs/buffer.c b/fs/buffer.c
|
||||
index 6fa5302..27b3103 100644
|
||||
--- a/fs/buffer.c
|
||||
+++ b/fs/buffer.c
|
||||
@@ -114,7 +114,8 @@ static int quiet_error(struct buffer_head *bh)
|
||||
static void buffer_io_error(struct buffer_head *bh)
|
||||
{
|
||||
char b[BDEVNAME_SIZE];
|
||||
- printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n",
|
||||
+ if (strcmp(bdevname(bh->b_bdev, b), "mtdblock0") != 0)
|
||||
+ printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n",
|
||||
bdevname(bh->b_bdev, b),
|
||||
(unsigned long long)bh->b_blocknr);
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From 71886bfebaf13c74a55f11264096286a554e5a3d Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Thu, 13 May 2010 21:43:08 +0200
|
||||
Subject: [PATCH 44/45] ARM: OMAP: beagle: every known beagle (except revB) uses 2 chipselects so don't use NULL for the second chipselect timings
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index dd830b1..078e026 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -614,7 +614,7 @@ static void __init omap3_beagle_init_irq(void)
|
||||
if (cpu_is_omap3630())
|
||||
{
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
- NULL,
|
||||
+ mt46h32m32lf6_sdrc_params,
|
||||
_omap37x_mpu_rate_table,
|
||||
_omap37x_dsp_rate_table,
|
||||
_omap37x_l3_rate_table);
|
||||
@@ -622,7 +622,7 @@ static void __init omap3_beagle_init_irq(void)
|
||||
else
|
||||
{
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
- NULL,
|
||||
+ mt46h32m32lf6_sdrc_params,
|
||||
_omap35x_mpu_rate_table,
|
||||
_omap35x_dsp_rate_table,
|
||||
_omap35x_l3_rate_table);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-70
@@ -1,70 +0,0 @@
|
||||
From 1ebb6f864a831fc8efebe4a7a9f65d07fa31466a Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sat, 15 May 2010 21:47:32 +0200
|
||||
Subject: [PATCH 45/45] ARM: OMAP: beagle: add support for beagleFPGA expansionboard: http://members.cox.net/ebrombaugh1/embedded/beagle/beagle_fpga.html
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 26 ++++++++++++++++++++++++++
|
||||
1 files changed, 26 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 078e026..b313350 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
@@ -47,6 +48,7 @@
|
||||
#include <plat/timer-gp.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/omap-pm.h>
|
||||
+#include <plat/mcspi.h>
|
||||
|
||||
#include "mux.h"
|
||||
#include "mmc-twl4030.h"
|
||||
@@ -609,6 +611,24 @@ static struct platform_device keys_gpio = {
|
||||
},
|
||||
};
|
||||
|
||||
+static struct spi_board_info beaglefpga_mcspi_board_info[] = {
|
||||
+ // spi 4.0
|
||||
+ {
|
||||
+ .modalias = "spidev",
|
||||
+ .max_speed_hz = 48000000, //48 Mbps
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .mode = SPI_MODE_1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init beaglefpga_init_spi(void)
|
||||
+{
|
||||
+ /* hook the spi ports to the spidev driver */
|
||||
+ spi_register_board_info(beaglefpga_mcspi_board_info,
|
||||
+ ARRAY_SIZE(beaglefpga_mcspi_board_info));
|
||||
+}
|
||||
+
|
||||
static void __init omap3_beagle_init_irq(void)
|
||||
{
|
||||
if (cpu_is_omap3630())
|
||||
@@ -769,6 +789,12 @@ static void __init omap3_beagle_init(void)
|
||||
gpio_export(162, 1);
|
||||
}
|
||||
|
||||
+ if(!strcmp(expansionboard_name, "beaglefpga"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: Using McSPI for SPI\n");
|
||||
+ beaglefpga_init_spi();
|
||||
+ }
|
||||
+
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
omap3beagle_flash_init();
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
From b0c673e40d40428a9bd05101d15d773cd4f4720c Mon Sep 17 00:00:00 2001
|
||||
From: Ranjith Lohithakshan <unknown@ti.com>
|
||||
Date: Sat, 22 May 2010 18:32:24 +0200
|
||||
Subject: [PATCH 46/48] attemp to fix serial console corruption during cpuidle
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/cpuidle34xx.c | 6 +++++-
|
||||
1 files changed, 5 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
|
||||
index f8aea56..35d1c3e 100644
|
||||
--- a/arch/arm/mach-omap2/cpuidle34xx.c
|
||||
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
|
||||
@@ -60,7 +60,7 @@ struct omap3_processor_cx {
|
||||
|
||||
struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES];
|
||||
struct omap3_processor_cx current_cx_state;
|
||||
-struct powerdomain *mpu_pd, *core_pd;
|
||||
+struct powerdomain *mpu_pd, *per_pd, *core_pd;
|
||||
|
||||
/*
|
||||
* The latencies/thresholds for various C states have
|
||||
@@ -131,6 +131,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
|
||||
local_fiq_disable();
|
||||
|
||||
pwrdm_set_next_pwrst(mpu_pd, mpu_state);
|
||||
+ pwrdm_set_next_pwrst(per_pd, mpu_state);
|
||||
pwrdm_set_next_pwrst(core_pd, core_state);
|
||||
|
||||
if (omap_irq_pending() || need_resched())
|
||||
@@ -138,6 +139,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
|
||||
|
||||
if (cx->type == OMAP3_STATE_C1) {
|
||||
pwrdm_for_each_clkdm(mpu_pd, _cpuidle_deny_idle);
|
||||
+ pwrdm_for_each_clkdm(per_pd, _cpuidle_deny_idle);
|
||||
pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle);
|
||||
}
|
||||
|
||||
@@ -146,6 +148,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
|
||||
|
||||
if (cx->type == OMAP3_STATE_C1) {
|
||||
pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle);
|
||||
+ pwrdm_for_each_clkdm(per_pd, _cpuidle_allow_idle);
|
||||
pwrdm_for_each_clkdm(core_pd, _cpuidle_allow_idle);
|
||||
}
|
||||
|
||||
@@ -425,6 +428,7 @@ int __init omap3_idle_init(void)
|
||||
struct cpuidle_device *dev;
|
||||
|
||||
mpu_pd = pwrdm_lookup("mpu_pwrdm");
|
||||
+ per_pd = pwrdm_lookup("per_pwrdm");
|
||||
core_pd = pwrdm_lookup("core_pwrdm");
|
||||
|
||||
omap_init_power_states();
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
From 4d5f88fca430ca38a35e60683dc301e80046b05d Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sun, 23 May 2010 14:47:32 +0200
|
||||
Subject: [PATCH 47/48] clock34xx: only try to idle IVA subsys when CONFIG_PM is set
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/clock34xx.c | 5 ++++-
|
||||
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
|
||||
index 2bb7182..a323f9f 100644
|
||||
--- a/arch/arm/mach-omap2/clock34xx.c
|
||||
+++ b/arch/arm/mach-omap2/clock34xx.c
|
||||
@@ -407,7 +407,9 @@ void omap3_clk_lock_dpll5(void)
|
||||
return;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_PM
|
||||
extern void __init omap3_iva_idle(void);
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Initialize IVA to a idle state. This is typically done by the
|
||||
@@ -425,8 +427,9 @@ static void __init omap2_clk_iva_init_to_idle(void)
|
||||
prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
|
||||
prm_write_mod_reg(0, OMAP3430_PER_MOD, OMAP3430_PM_IVAGRPSEL);
|
||||
|
||||
+#ifdef CONFIG_PM
|
||||
omap3_iva_idle();
|
||||
-
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* REVISIT: Move this init stuff out into clock.c */
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
From 258a962bea2da43df6f70fd264a0e23b65669176 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Tue, 4 May 2010 17:04:27 +0200
|
||||
Subject: [PATCH 48/48] HACK: try to poweron stuff on xM rev A
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 14 +++++++-------
|
||||
1 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index b313350..7f0e241 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -237,7 +237,6 @@ static struct omap_dss_device beagle_dvi_device = {
|
||||
.name = "dvi",
|
||||
.driver_name = "generic_panel",
|
||||
.phy.dpi.data_lines = 24,
|
||||
- .reset_gpio = 170,
|
||||
.platform_enable = beagle_enable_dvi,
|
||||
.platform_disable = beagle_disable_dvi,
|
||||
};
|
||||
@@ -364,6 +363,9 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
*/
|
||||
|
||||
if (cpu_is_omap3630()) {
|
||||
+ /* DVI reset GPIO is different between revisions */
|
||||
+ beagle_dvi_device.reset_gpio = 129;
|
||||
+
|
||||
/* Power on DVI, Serial and PWR led */
|
||||
gpio_request(gpio + 1, "nDVI_PWR_EN");
|
||||
gpio_direction_output(gpio + 1, 0);
|
||||
@@ -374,9 +376,12 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
|
||||
/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
|
||||
gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
|
||||
+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
}
|
||||
else {
|
||||
+ /* DVI reset GPIO is different between revisions */
|
||||
+ beagle_dvi_device.reset_gpio = 170;
|
||||
+
|
||||
gpio_request(gpio + 1, "EHCI_nOC");
|
||||
gpio_direction_input(gpio + 1);
|
||||
|
||||
@@ -735,11 +740,6 @@ static void __init omap3_beagle_init(void)
|
||||
ARRAY_SIZE(omap3_beagle_devices));
|
||||
omap_serial_init();
|
||||
|
||||
- omap_mux_init_gpio(170, OMAP_PIN_INPUT);
|
||||
- gpio_request(170, "DVI_nPD");
|
||||
- /* REVISIT leave DVI powered down until it's needed ... */
|
||||
- gpio_direction_output(170, true);
|
||||
-
|
||||
if(!strcmp(expansionboard_name, "zippy"))
|
||||
{
|
||||
printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n");
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-135
@@ -1,135 +0,0 @@
|
||||
From 325afc09116e11e28265b648ef33d8c0306c61f1 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Nelson <robertcnelson@gmail.com>
|
||||
Date: Thu, 23 Sep 2010 18:22:47 -0700
|
||||
Subject: [PATCH 01/10] omap: Beagle: revision detection
|
||||
|
||||
Due to the omap3530 ES3.0 Silicon being used on both the
|
||||
B5/B6 and C1/2/3 Beagle we can't use the cpu_is_omap34xx()
|
||||
routines to differentiate the Beagle Boards.
|
||||
|
||||
However gpio pins 171,172,173 where setup for this prupose, so
|
||||
lets use them.
|
||||
|
||||
Changes:
|
||||
for older U-Boot's, use omap_mux_init_gpio()
|
||||
keep Beagle Rev in board-omap3beagle.c
|
||||
gpio_free on gpio request failure
|
||||
|
||||
Tested on Beagle Revisions: B5, C2, C4, and xMA
|
||||
|
||||
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
|
||||
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 88 +++++++++++++++++++++++++++++++
|
||||
1 files changed, 88 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 2677b41..7ca2b3b 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -175,6 +175,93 @@ static void __init omap3beagle_ks8851_init(void)
|
||||
static inline void __init omap3beagle_ks8851_init(void) { return; }
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * OMAP3 Beagle revision
|
||||
+ * Run time detection of Beagle revision is done by reading GPIO.
|
||||
+ * GPIO ID -
|
||||
+ * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1
|
||||
+ * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0
|
||||
+ * C4 = GPIO173, GPIO172, GPIO171: 1 0 1
|
||||
+ * XM = GPIO173, GPIO172, GPIO171: 0 0 0
|
||||
+ */
|
||||
+enum {
|
||||
+ OMAP3BEAGLE_BOARD_UNKN = 0,
|
||||
+ OMAP3BEAGLE_BOARD_AXBX,
|
||||
+ OMAP3BEAGLE_BOARD_C1_3,
|
||||
+ OMAP3BEAGLE_BOARD_C4,
|
||||
+ OMAP3BEAGLE_BOARD_XM,
|
||||
+};
|
||||
+
|
||||
+static u8 omap3_beagle_version;
|
||||
+
|
||||
+static u8 omap3_beagle_get_rev(void)
|
||||
+{
|
||||
+ return omap3_beagle_version;
|
||||
+}
|
||||
+
|
||||
+static void __init omap3_beagle_init_rev(void)
|
||||
+{
|
||||
+ int ret;
|
||||
+ u16 beagle_rev = 0;
|
||||
+
|
||||
+ omap_mux_init_gpio(171, OMAP_PIN_INPUT_PULLUP);
|
||||
+ omap_mux_init_gpio(172, OMAP_PIN_INPUT_PULLUP);
|
||||
+ omap_mux_init_gpio(173, OMAP_PIN_INPUT_PULLUP);
|
||||
+
|
||||
+ ret = gpio_request(171, "rev_id_0");
|
||||
+ if (ret < 0)
|
||||
+ goto fail0;
|
||||
+
|
||||
+ ret = gpio_request(172, "rev_id_1");
|
||||
+ if (ret < 0)
|
||||
+ goto fail1;
|
||||
+
|
||||
+ ret = gpio_request(173, "rev_id_2");
|
||||
+ if (ret < 0)
|
||||
+ goto fail2;
|
||||
+
|
||||
+ gpio_direction_input(171);
|
||||
+ gpio_direction_input(172);
|
||||
+ gpio_direction_input(173);
|
||||
+
|
||||
+ beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1)
|
||||
+ | (gpio_get_value(173) << 2);
|
||||
+
|
||||
+ switch (beagle_rev) {
|
||||
+ case 7:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
|
||||
+ break;
|
||||
+ case 6:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
|
||||
+ break;
|
||||
+ case 5:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
|
||||
+ break;
|
||||
+ case 0:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
+ break;
|
||||
+ default:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
+
|
||||
+fail2:
|
||||
+ gpio_free(172);
|
||||
+fail1:
|
||||
+ gpio_free(171);
|
||||
+fail0:
|
||||
+ printk(KERN_ERR "Unable to get revision detection GPIO pins\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
{
|
||||
@@ -853,6 +940,7 @@ static int __init cameraboard_setup(char *str)
|
||||
static void __init omap3_beagle_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
+ omap3_beagle_init_rev();
|
||||
omap3_beagle_i2c_init();
|
||||
|
||||
if (cpu_is_omap3630()) {
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
From 34d88746a9aa4aedb67e32579e559cbeb91de20f Mon Sep 17 00:00:00 2001
|
||||
From: Robert Nelson <robertcnelson@gmail.com>
|
||||
Date: Thu, 23 Sep 2010 18:22:48 -0700
|
||||
Subject: [PATCH 02/10] omap: Beagle: only Cx boards use pin 23 for write protect
|
||||
|
||||
system_rev comes from u-boot and is a constant 0x20, so
|
||||
Bx boards also fall in this 'if' and will get setup with the
|
||||
wrong gpio_wp pin. Switch to using the Beagle revision routine
|
||||
to correcly set pin 23 only for C1/2/3 and C4 Boards. Bx boards
|
||||
will then use the correct default pin setting.
|
||||
|
||||
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
|
||||
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 7ca2b3b..beb877c 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -444,7 +444,8 @@ static struct gpio_led gpio_leds[];
|
||||
static int beagle_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
- if (system_rev >= 0x20 && system_rev <= 0x34301000) {
|
||||
+ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
|
||||
+ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
|
||||
omap_mux_init_gpio(23, OMAP_PIN_INPUT);
|
||||
mmc[0].gpio_wp = 23;
|
||||
} else {
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
From 037ef3add42d61dcd86438dc4b9378f154caa426 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Nelson <robertcnelson@gmail.com>
|
||||
Date: Thu, 23 Sep 2010 18:22:48 -0700
|
||||
Subject: [PATCH 03/10] omap: Beagle: no gpio_wp pin connection on xM
|
||||
|
||||
The omap3630 based BeagleBoard xM uses a MicroSD card slot with
|
||||
no write protection.
|
||||
|
||||
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
|
||||
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index beb877c..247a426 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -444,7 +444,9 @@ static struct gpio_led gpio_leds[];
|
||||
static int beagle_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
- if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
|
||||
+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ mmc[0].gpio_wp = -EINVAL;
|
||||
+ } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
|
||||
(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
|
||||
omap_mux_init_gpio(23, OMAP_PIN_INPUT);
|
||||
mmc[0].gpio_wp = 23;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
From 62db06de896c221cfa2231a53a933d6b3e81d66d Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@beagleboard.org>
|
||||
Date: Tue, 11 Jan 2011 17:13:35 +0000
|
||||
Subject: [PATCH 04/10] omap3: beaglexm: fix EHCI power up GPIO dir
|
||||
|
||||
EHCI enable power pin is inverted (active high) in comparison
|
||||
to vanilla beagle which is active low. Handle this case conditionally.
|
||||
|
||||
Without this fix, Beagle XM 4 port EHCI will not function and no
|
||||
networking will be available
|
||||
|
||||
[nm@ti.com: split up, added descriptive changelogs]
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@beagleboard.org>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 9 +++++++++
|
||||
1 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 247a426..7cfa2c8 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -487,6 +487,15 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
|
||||
+ * high / others active low)
|
||||
+ */
|
||||
+ gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
|
||||
+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
|
||||
+ else
|
||||
+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
From 3d93d0b8974c867db70cb4a8681615113ac6113d Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@beagleboard.org>
|
||||
Date: Tue, 11 Jan 2011 17:13:36 +0000
|
||||
Subject: [PATCH 05/10] omap3: beaglexm: fix DVI reset GPIO
|
||||
|
||||
GPIO reset line for Beagle XM is different from vanilla beagle
|
||||
so we populate it as part of gpio update routine.
|
||||
|
||||
This in part fixes the issue of display not functioning on beagle XM
|
||||
platform.
|
||||
|
||||
[nm@ti.com: split up, added descriptive changelogs]
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@beagleboard.org>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 8 +++++++-
|
||||
1 files changed, 7 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 7cfa2c8..939de5a 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -336,7 +336,7 @@ static struct omap_dss_device beagle_dvi_device = {
|
||||
.name = "dvi",
|
||||
.driver_name = "generic_panel",
|
||||
.phy.dpi.data_lines = 24,
|
||||
- .reset_gpio = 170,
|
||||
+ .reset_gpio = -EINVAL,
|
||||
.platform_enable = beagle_enable_dvi,
|
||||
.platform_disable = beagle_disable_dvi,
|
||||
};
|
||||
@@ -497,6 +497,12 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
else
|
||||
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
|
||||
+ /* DVI reset GPIO is different between beagle revisions */
|
||||
+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
|
||||
+ beagle_dvi_device.reset_gpio = 129;
|
||||
+ else
|
||||
+ beagle_dvi_device.reset_gpio = 170;
|
||||
+
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-92
@@ -1,92 +0,0 @@
|
||||
From 7ad849e3d54d897614a74ad225392bd243e07d2e Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@beagleboard.org>
|
||||
Date: Wed, 12 Jan 2011 00:23:29 +0000
|
||||
Subject: [PATCH 06/10] omap3: beaglexm: fix power on of DVI
|
||||
|
||||
TFP410 DVI chip is used to provide display out.
|
||||
This chip is controlled by 2 lines:
|
||||
LDO which supplies the power is controlled over gpio + 2
|
||||
and the enable of the chip itself is done over gpio + 1
|
||||
NOTE: the LDO is necessary for LED, serial blocks as well.
|
||||
|
||||
gpio + 1 was used to sense USB overcurrent in vanilla beagle.
|
||||
|
||||
Without this fix, the display would not function as the LDO
|
||||
remains shut down.
|
||||
|
||||
[nm@ti.com: split up, added descriptive changelogs]
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@beagleboard.org>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 40 +++++++++++++++++++++++++++++++
|
||||
1 files changed, 40 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 939de5a..9880c5c 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -444,6 +444,8 @@ static struct gpio_led gpio_leds[];
|
||||
static int beagle_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
+ int r;
|
||||
+
|
||||
if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
mmc[0].gpio_wp = -EINVAL;
|
||||
} else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
|
||||
@@ -465,6 +467,17 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
* power switch and overcurrent detect
|
||||
*/
|
||||
|
||||
+ if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
|
||||
+ r = gpio_request(gpio + 1, "EHCI_nOC");
|
||||
+ if (!r) {
|
||||
+ r = gpio_direction_input(gpio + 1);
|
||||
+ if (r)
|
||||
+ gpio_free(gpio + 1);
|
||||
+ }
|
||||
+ if (r)
|
||||
+ pr_err("%s: unable to configure EHCI_nOC\n", __func__);
|
||||
+ }
|
||||
+
|
||||
if (cpu_is_omap3630()) {
|
||||
/* Power on DVI, Serial and PWR led */
|
||||
gpio_request(gpio + 1, "nDVI_PWR_EN");
|
||||
@@ -506,6 +519,33 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
|
||||
+ /*
|
||||
+ * gpio + 1 on Xm controls the TFP410's enable line (active low)
|
||||
+ * gpio + 2 control varies depending on the board rev as follows:
|
||||
+ * P7/P8 revisions(prototype): Camera EN
|
||||
+ * A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
|
||||
+ */
|
||||
+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ r = gpio_request(gpio + 1, "nDVI_PWR_EN");
|
||||
+ if (!r) {
|
||||
+ r = gpio_direction_output(gpio + 1, 0);
|
||||
+ if (r)
|
||||
+ gpio_free(gpio + 1);
|
||||
+ }
|
||||
+ if (r)
|
||||
+ pr_err("%s: unable to configure nDVI_PWR_EN\n",
|
||||
+ __func__);
|
||||
+ r = gpio_request(gpio + 2, "DVI_LDO_EN");
|
||||
+ if (!r) {
|
||||
+ r = gpio_direction_output(gpio + 2, 1);
|
||||
+ if (r)
|
||||
+ gpio_free(gpio + 2);
|
||||
+ }
|
||||
+ if (r)
|
||||
+ pr_err("%s: unable to configure DVI_LDO_EN\n",
|
||||
+ __func__);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
From b241e679f550f38062923eb7800a5c57a41fe95d Mon Sep 17 00:00:00 2001
|
||||
From: Jason Kridner <jkridner@beagleboard.org>
|
||||
Date: Thu, 10 Mar 2011 13:15:38 +0100
|
||||
Subject: [PATCH 07/10] beagleboard: hack in support from xM rev C
|
||||
|
||||
Based on patch by Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 20 ++++++++++++++++----
|
||||
1 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 9880c5c..4bde54b 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -182,7 +182,9 @@ static inline void __init omap3beagle_ks8851_init(void) { return; }
|
||||
* AXBX = GPIO173, GPIO172, GPIO171: 1 1 1
|
||||
* C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0
|
||||
* C4 = GPIO173, GPIO172, GPIO171: 1 0 1
|
||||
- * XM = GPIO173, GPIO172, GPIO171: 0 0 0
|
||||
+ * XMA = GPIO173, GPIO172, GPIO171: 0 0 0
|
||||
+ * XMB = GPIO173, GPIO172, GPIO171: 0 0 1
|
||||
+ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0
|
||||
*/
|
||||
enum {
|
||||
OMAP3BEAGLE_BOARD_UNKN = 0,
|
||||
@@ -190,6 +192,7 @@ enum {
|
||||
OMAP3BEAGLE_BOARD_C1_3,
|
||||
OMAP3BEAGLE_BOARD_C4,
|
||||
OMAP3BEAGLE_BOARD_XM,
|
||||
+ OMAP3BEAGLE_BOARD_XMC,
|
||||
};
|
||||
|
||||
static u8 omap3_beagle_version;
|
||||
@@ -241,12 +244,21 @@ static void __init omap3_beagle_init_rev(void)
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
|
||||
break;
|
||||
case 0:
|
||||
- printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM A\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
break;
|
||||
+ case 1:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
|
||||
+ break;
|
||||
default:
|
||||
- printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
|
||||
- omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd, "
|
||||
+ "assuming xM C or newer\n", beagle_rev);
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
|
||||
}
|
||||
|
||||
return;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-153
@@ -1,153 +0,0 @@
|
||||
From 8bd3ffb5755c49aaffecb20b9bd43f955ac26251 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Kridner <jkridner@beagleboard.org>
|
||||
Date: Wed, 16 Mar 2011 09:21:06 -0500
|
||||
Subject: [PATCH 08/10] omap3: beagle: cleaned up board revision conditions
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 70 ++++++++++++++-----------------
|
||||
1 files changed, 32 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 4bde54b..664a9c6 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -191,7 +191,7 @@ enum {
|
||||
OMAP3BEAGLE_BOARD_AXBX,
|
||||
OMAP3BEAGLE_BOARD_C1_3,
|
||||
OMAP3BEAGLE_BOARD_C4,
|
||||
- OMAP3BEAGLE_BOARD_XM,
|
||||
+ OMAP3BEAGLE_BOARD_XMAB,
|
||||
OMAP3BEAGLE_BOARD_XMC,
|
||||
};
|
||||
|
||||
@@ -245,11 +245,11 @@ static void __init omap3_beagle_init_rev(void)
|
||||
break;
|
||||
case 0:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: xM A\n");
|
||||
- omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMAB;
|
||||
break;
|
||||
case 1:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n");
|
||||
- omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMAB;
|
||||
break;
|
||||
case 2:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
|
||||
@@ -458,13 +458,18 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
{
|
||||
int r;
|
||||
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ switch(omap3_beagle_get_rev())
|
||||
+ {
|
||||
+ case OMAP3BEAGLE_BOARD_XMAB:
|
||||
+ case OMAP3BEAGLE_BOARD_XMC:
|
||||
mmc[0].gpio_wp = -EINVAL;
|
||||
- } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
|
||||
- (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
|
||||
+ break;
|
||||
+ case OMAP3BEAGLE_BOARD_C1_3:
|
||||
+ case OMAP3BEAGLE_BOARD_C4:
|
||||
omap_mux_init_gpio(23, OMAP_PIN_INPUT);
|
||||
mmc[0].gpio_wp = 23;
|
||||
- } else {
|
||||
+ break;
|
||||
+ default:
|
||||
omap_mux_init_gpio(29, OMAP_PIN_INPUT);
|
||||
}
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
@@ -479,7 +484,8 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
* power switch and overcurrent detect
|
||||
*/
|
||||
|
||||
- if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
|
||||
+ if ((omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMAB) &&
|
||||
+ (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC)) {
|
||||
r = gpio_request(gpio + 1, "EHCI_nOC");
|
||||
if (!r) {
|
||||
r = gpio_direction_input(gpio + 1);
|
||||
@@ -490,54 +496,41 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
pr_err("%s: unable to configure EHCI_nOC\n", __func__);
|
||||
}
|
||||
|
||||
- if (cpu_is_omap3630()) {
|
||||
- /* Power on DVI, Serial and PWR led */
|
||||
- gpio_request(gpio + 1, "nDVI_PWR_EN");
|
||||
- gpio_direction_output(gpio + 1, 0);
|
||||
-
|
||||
- /* Power on camera interface */
|
||||
- gpio_request(gpio + 2, "CAM_EN");
|
||||
- gpio_direction_output(gpio + 2, 1);
|
||||
-
|
||||
- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
|
||||
- gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
|
||||
- }
|
||||
- else {
|
||||
- gpio_request(gpio + 1, "EHCI_nOC");
|
||||
- gpio_direction_input(gpio + 1);
|
||||
-
|
||||
- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
|
||||
- gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
- }
|
||||
-
|
||||
/*
|
||||
- * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
|
||||
+ * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, xM Ax/Bx active
|
||||
* high / others active low)
|
||||
*/
|
||||
gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
|
||||
+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMAB)
|
||||
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
|
||||
else
|
||||
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
|
||||
/* DVI reset GPIO is different between beagle revisions */
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
|
||||
- beagle_dvi_device.reset_gpio = 129;
|
||||
- else
|
||||
+ switch(omap3_beagle_get_rev())
|
||||
+ {
|
||||
+ case OMAP3BEAGLE_BOARD_AXBX:
|
||||
+ case OMAP3BEAGLE_BOARD_C1_3:
|
||||
+ case OMAP3BEAGLE_BOARD_C4:
|
||||
beagle_dvi_device.reset_gpio = 170;
|
||||
+ break;
|
||||
+ case OMAP3BEAGLE_BOARD_XMAB:
|
||||
+ case OMAP3BEAGLE_BOARD_XMC:
|
||||
+ default:
|
||||
+ beagle_dvi_device.reset_gpio = 129;
|
||||
+ }
|
||||
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
|
||||
/*
|
||||
- * gpio + 1 on Xm controls the TFP410's enable line (active low)
|
||||
+ * gpio + 1 on xM controls the TFP410's enable line (active low)
|
||||
* gpio + 2 control varies depending on the board rev as follows:
|
||||
* P7/P8 revisions(prototype): Camera EN
|
||||
* A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
|
||||
*/
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMAB) ||
|
||||
+ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
|
||||
r = gpio_request(gpio + 1, "nDVI_PWR_EN");
|
||||
if (!r) {
|
||||
r = gpio_direction_output(gpio + 1, 0);
|
||||
@@ -1013,7 +1006,8 @@ static void __init omap3_beagle_init(void)
|
||||
omap3_beagle_init_rev();
|
||||
omap3_beagle_i2c_init();
|
||||
|
||||
- if (cpu_is_omap3630()) {
|
||||
+ if ((omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMAB) &&
|
||||
+ (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC)) {
|
||||
gpio_buttons[0].gpio = 4;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-2394
File diff suppressed because it is too large
Load Diff
-398
@@ -1,398 +0,0 @@
|
||||
From 5609c8fe642a0517bd151ad477fcd05d0abc7dc4 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 11 Jun 2010 13:51:49 -0500
|
||||
Subject: [PATCH 02/75] mt9t111: Fix all checkpatch errors
|
||||
|
||||
The code was plagued with checkpatch errors. Fix them!
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
drivers/media/video/mt9t111.c | 153 ++++++++++++++++++++-----------------
|
||||
drivers/media/video/mt9t111_reg.h | 6 +-
|
||||
include/media/mt9t111.h | 2 +-
|
||||
3 files changed, 87 insertions(+), 74 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c
|
||||
index ecc5115..95e1508 100644
|
||||
--- a/drivers/media/video/mt9t111.c
|
||||
+++ b/drivers/media/video/mt9t111.c
|
||||
@@ -17,20 +17,21 @@
|
||||
#include <media/mt9t111.h>
|
||||
#include "mt9t111_reg.h"
|
||||
|
||||
-#define USE_RAW // YCbCr mode does not work yet
|
||||
-//#define COLOR_BAR // Create a Color bar test pattern, Blue, Green, Red, Grey
|
||||
+/* YCbCr mode does not work yet */
|
||||
+#define USE_RAW
|
||||
+/* Create a Color bar test pattern, Blue, Green, Red, Grey */
|
||||
+/* #define COLOR_BAR */
|
||||
|
||||
#define SENSOR_DETECTED 1
|
||||
#define SENSOR_NOT_DETECTED 0
|
||||
|
||||
static void mt9t111_loaddefault(struct i2c_client *client);
|
||||
|
||||
-/*
|
||||
-* as a place holder for further development
|
||||
-*/
|
||||
+/*
|
||||
+ * as a place holder for further development
|
||||
+ */
|
||||
static void debug_dummy(char *in_msg)
|
||||
{
|
||||
-
|
||||
}
|
||||
|
||||
/* list of image formats supported by mt9t111 sensor */
|
||||
@@ -55,8 +56,8 @@ const static struct v4l2_fmtdesc mt9t111_formats[] = {
|
||||
* smallest image size to largest.
|
||||
*/
|
||||
const static struct capture_size mt9t111_sizes[] = {
|
||||
- { 640, 480 },
|
||||
-// { 2048, 1536}
|
||||
+ { 640, 480 },
|
||||
+ /* { 2048, 1536} */
|
||||
};
|
||||
|
||||
#define NUM_CAPTURE_SIZE ARRAY_SIZE(mt9t111_sizes)
|
||||
@@ -120,17 +121,17 @@ mt9t111_read_reg(struct i2c_client *client, u16 reg, u16 *val)
|
||||
msg->addr = client->addr;
|
||||
msg->flags = 0;
|
||||
msg->len = 2;
|
||||
- msg->buf = data;
|
||||
+ msg->buf = data;
|
||||
data[0] = (reg & 0xff00) >> 8;
|
||||
data[1] = (reg & 0x00ff);
|
||||
err = i2c_transfer(client->adapter, msg, 1);
|
||||
- if (err >= 0) {
|
||||
- msg->flags = I2C_M_RD;
|
||||
- msg->len = 2; /* 2 byte read */
|
||||
- err = i2c_transfer(client->adapter, msg, 1);
|
||||
- if (err >= 0) {
|
||||
- *val = ((data[0] & 0x00ff) << 8)
|
||||
- | (data[1] & 0x00ff);
|
||||
+ if (err >= 0) {
|
||||
+ msg->flags = I2C_M_RD;
|
||||
+ msg->len = 2; /* 2 byte read */
|
||||
+ err = i2c_transfer(client->adapter, msg, 1);
|
||||
+ if (err >= 0) {
|
||||
+ *val = ((data[0] & 0x00ff) << 8)
|
||||
+ | (data[1] & 0x00ff);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -159,7 +160,7 @@ mt9t111_write_reg(struct i2c_client *client, u16 reg, u16 val)
|
||||
msg->len = 4;
|
||||
msg->buf = data;
|
||||
data[0] = (u8)((reg & 0xff00) >> 8);
|
||||
- data[1] = (u8)(reg & 0x00ff);
|
||||
+ data[1] = (u8)(reg & 0x00ff);
|
||||
data[2] = (u8)((val & 0xff00) >> 8);
|
||||
data[3] = (u8)(val & 0x00ff);
|
||||
err = i2c_transfer(client->adapter, msg, 1);
|
||||
@@ -171,7 +172,7 @@ mt9t111_write_reg(struct i2c_client *client, u16 reg, u16 val)
|
||||
* mt9t111_write_regs - Write registers to an mt9t111 sensor device
|
||||
* @client: i2c driver client structure
|
||||
* @reg_in: pointer to registers to write
|
||||
- * @cnt: the number of registers
|
||||
+ * @cnt: the number of registers
|
||||
*
|
||||
* Write registers .
|
||||
* Returns zero if successful, or non-zero otherwise.
|
||||
@@ -182,19 +183,21 @@ mt9t111_write_regs(struct i2c_client *client, mt9t111_regs *reg_in, int cnt)
|
||||
int err = 0;
|
||||
int i;
|
||||
mt9t111_regs *reg = reg_in;
|
||||
-
|
||||
- for (i=0;i<cnt;i++) {
|
||||
+
|
||||
+ for (i = 0; i < cnt; i++) {
|
||||
if (reg->delay_time == 0) {
|
||||
err |= mt9t111_write_reg(client, reg->addr, reg->data);
|
||||
} else if (reg->addr != 0 || reg->data != 0) {
|
||||
err |= mt9t111_write_reg(client, reg->addr, reg->data);
|
||||
mdelay(reg->delay_time);
|
||||
- } else
|
||||
+ } else {
|
||||
mdelay(reg->delay_time);
|
||||
-
|
||||
+ }
|
||||
+
|
||||
if (err < 0) {
|
||||
- dev_warn(&client->dev, "write reg error, addr = 0x%x, data = 0x%x \n", \
|
||||
- reg->addr, reg->data);
|
||||
+ dev_warn(&client->dev, "write reg error, addr = 0x%x,"
|
||||
+ " data = 0x%x \n",
|
||||
+ reg->addr, reg->data);
|
||||
return err;
|
||||
}
|
||||
reg++;
|
||||
@@ -219,10 +222,11 @@ mt9t111_detect(struct i2c_client *client)
|
||||
if (mt9t111_read_reg(client, MT9T111_CHIP_ID, &val) < 0)
|
||||
return -ENODEV;
|
||||
dev_info(&client->dev, "model id detected 0x%x\n", val);
|
||||
-
|
||||
+
|
||||
if (val != MT9T111_CHIP_ID_VALUE) {
|
||||
- dev_warn(&client->dev, "model id mismatch received 0x%x expecting 0x%x\n",
|
||||
- val, MT9T111_CHIP_ID_VALUE);
|
||||
+ dev_warn(&client->dev, "model id mismatch received 0x%x"
|
||||
+ " expecting 0x%x\n",
|
||||
+ val, MT9T111_CHIP_ID_VALUE);
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -285,14 +289,17 @@ static int ioctl_enum_frameintervals(struct v4l2_int_device *s,
|
||||
{
|
||||
int ifmt;
|
||||
|
||||
-printk(KERN_INFO "entering ioctl_enum_frameintervals\n");
|
||||
-printk(KERN_INFO "index = %d, pixel_format = 0x%x, width = %d, height = %d\n",
|
||||
- frmi->index, frmi->pixel_format, frmi->width, frmi->height);
|
||||
-printk(KERN_INFO "mt9t111 format = 0x%x\n", mt9t111_formats[0].pixelformat);
|
||||
+ printk(KERN_INFO "entering ioctl_enum_frameintervals\n");
|
||||
+ printk(KERN_INFO "index = %d, pixel_format = 0x%x,"
|
||||
+ " width = %d, height = %d\n",
|
||||
+ frmi->index, frmi->pixel_format,
|
||||
+ frmi->width, frmi->height);
|
||||
+ printk(KERN_INFO "mt9t111 format = 0x%x\n",
|
||||
+ mt9t111_formats[0].pixelformat);
|
||||
|
||||
if (frmi->index >= NUM_CAPTURE_FRAMEINTERVALS)
|
||||
return -EINVAL;
|
||||
-
|
||||
+
|
||||
for (ifmt = 0; ifmt < NUM_CAPTURE_FORMATS; ifmt++) {
|
||||
if (frmi->pixel_format == mt9t111_formats[ifmt].pixelformat)
|
||||
break;
|
||||
@@ -368,7 +375,7 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
|
||||
if (rval < 0) {
|
||||
dev_err(&c->dev, "Unable to set the power state: " "mt9t111"
|
||||
" sensor\n");
|
||||
- //sensor->pdata->set_xclk(0);
|
||||
+ /* sensor->pdata->set_xclk(0); */
|
||||
return rval;
|
||||
}
|
||||
|
||||
@@ -418,7 +425,7 @@ static int ioctl_g_priv(struct v4l2_int_device *s, void *p)
|
||||
static int ioctl_s_parm(struct v4l2_int_device *s,
|
||||
struct v4l2_streamparm *a)
|
||||
{
|
||||
- //TODO: set paramters
|
||||
+ /* TODO: set paramters */
|
||||
debug_dummy("debug_dummy -- VIDIOC_S_PARM ");
|
||||
return 0;
|
||||
}
|
||||
@@ -483,13 +490,13 @@ static int ioctl_try_fmt_cap(struct v4l2_int_device *s,
|
||||
|
||||
pix->width = 640;
|
||||
pix->height = 480;
|
||||
-#ifdef USE_RAW
|
||||
+#ifdef USE_RAW
|
||||
pix->pixelformat = V4L2_PIX_FMT_SGRBG10;
|
||||
- pix->bytesperline = pix->width;
|
||||
+ pix->bytesperline = pix->width;
|
||||
pix->colorspace = V4L2_COLORSPACE_SRGB;
|
||||
#else
|
||||
pix->pixelformat = V4L2_PIX_FMT_YUYV;
|
||||
- pix->bytesperline = pix->width * 2;
|
||||
+ pix->bytesperline = pix->width * 2;
|
||||
pix->colorspace = V4L2_COLORSPACE_JPEG;
|
||||
#endif
|
||||
pix->field = V4L2_FIELD_NONE;
|
||||
@@ -585,7 +592,7 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s,
|
||||
static int ioctl_g_ctrl(struct v4l2_int_device *s,
|
||||
struct v4l2_control *vc)
|
||||
{
|
||||
- debug_dummy("debug_dummy -- g ctrl\n");
|
||||
+ debug_dummy("debug_dummy -- g ctrl\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -601,8 +608,8 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s,
|
||||
static int ioctl_queryctrl(struct v4l2_int_device *s,
|
||||
struct v4l2_queryctrl *qc)
|
||||
{
|
||||
- debug_dummy("debug_dummy -- query ctrl\n");
|
||||
- return-EINVAL;
|
||||
+ debug_dummy("debug_dummy -- query ctrl\n");
|
||||
+ return -EINVAL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -647,12 +654,11 @@ static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p)
|
||||
return rval;
|
||||
}
|
||||
|
||||
- p->u.ycbcr.clock_curr = 40*1000000; // temporal value
|
||||
+ p->u.ycbcr.clock_curr = 40 * 1000000; /* temporal value */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-
|
||||
static struct v4l2_int_ioctl_desc mt9t111_ioctl_desc[] = {
|
||||
{ .num = vidioc_int_enum_framesizes_num,
|
||||
.func = (v4l2_int_ioctl_func *)ioctl_enum_framesizes },
|
||||
@@ -666,8 +672,8 @@ static struct v4l2_int_ioctl_desc mt9t111_ioctl_desc[] = {
|
||||
.func = (v4l2_int_ioctl_func *)ioctl_s_power },
|
||||
{ .num = vidioc_int_g_priv_num,
|
||||
.func = (v4l2_int_ioctl_func *)ioctl_g_priv },
|
||||
- {vidioc_int_g_ifparm_num,
|
||||
- .func = (v4l2_int_ioctl_func*) ioctl_g_ifparm},
|
||||
+ { .num = vidioc_int_g_ifparm_num,
|
||||
+ .func = (v4l2_int_ioctl_func *)ioctl_g_ifparm },
|
||||
{ .num = vidioc_int_init_num,
|
||||
.func = (v4l2_int_ioctl_func *)ioctl_init },
|
||||
{ .num = vidioc_int_enum_fmt_cap_num,
|
||||
@@ -688,29 +694,30 @@ static struct v4l2_int_ioctl_desc mt9t111_ioctl_desc[] = {
|
||||
.func = (v4l2_int_ioctl_func *)ioctl_g_ctrl },
|
||||
{ .num = vidioc_int_s_ctrl_num,
|
||||
.func = (v4l2_int_ioctl_func *)ioctl_s_ctrl },
|
||||
- {.num = vidioc_int_s_video_routing_num,
|
||||
- .func = (v4l2_int_ioctl_func *) ioctl_s_routing},
|
||||
+ { .num = vidioc_int_s_video_routing_num,
|
||||
+ .func = (v4l2_int_ioctl_func *)ioctl_s_routing },
|
||||
};
|
||||
|
||||
-static void mt9t111_refresh(struct i2c_client *client){
|
||||
- int i;
|
||||
- unsigned short value;
|
||||
- // MCU_ADDRESS [SEQ_CMD] -- refresh
|
||||
- mt9t111_write_reg(client, 0x098E, 0x8400);
|
||||
- mt9t111_write_reg(client, 0x0990, 0x0006);
|
||||
- for (i=0;i<100;i++){
|
||||
- mt9t111_write_reg(client, 0x098E, 0x8400);
|
||||
- mt9t111_read_reg(client,0x0990,&value);
|
||||
- if ( value == 0)
|
||||
- break;
|
||||
- mdelay(5);
|
||||
+static void mt9t111_refresh(struct i2c_client *client)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned short value;
|
||||
+ /* MCU_ADDRESS [SEQ_CMD] -- refresh */
|
||||
+ mt9t111_write_reg(client, 0x098E, 0x8400);
|
||||
+ mt9t111_write_reg(client, 0x0990, 0x0006);
|
||||
+ for (i = 0; i < 100; i++) {
|
||||
+ mt9t111_write_reg(client, 0x098E, 0x8400);
|
||||
+ mt9t111_read_reg(client, 0x0990, &value);
|
||||
+ if (value == 0)
|
||||
+ break;
|
||||
+ mdelay(5);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COLOR_BAR
|
||||
static void mt9t111_color_bar(struct i2c_client *client)
|
||||
{
|
||||
- mt9t111_write_reg(client, 0x3210, 0x01B0); // disable lens correction
|
||||
+ mt9t111_write_reg(client, 0x3210, 0x01B0); /* disable lens correction */
|
||||
|
||||
mt9t111_write_reg(client, 0x098E, 0x6003);
|
||||
mt9t111_write_reg(client, 0x0990, 0x0100);
|
||||
@@ -721,22 +728,25 @@ static void mt9t111_color_bar(struct i2c_client *client)
|
||||
|
||||
static void mt9t111_bayer_format(struct i2c_client *client)
|
||||
{
|
||||
- mt9t111_write_regs(client, bayer_pattern_regs, sizeof(bayer_pattern_regs)/sizeof(mt9t111_regs));
|
||||
+ mt9t111_write_regs(client, bayer_pattern_regs,
|
||||
+ sizeof(bayer_pattern_regs) / sizeof(mt9t111_regs));
|
||||
}
|
||||
|
||||
static void mt9t111_enable_pll(struct i2c_client *client)
|
||||
{
|
||||
int i;
|
||||
- unsigned short value;
|
||||
+ unsigned short value;
|
||||
|
||||
- mt9t111_write_regs(client, pll_regs1, sizeof(pll_regs1)/sizeof(mt9t111_regs));
|
||||
- for (i=0;i<100;i++){
|
||||
- mt9t111_read_reg(client,0x0014,&value);
|
||||
- if (( value & 0x8000) != 0)
|
||||
+ mt9t111_write_regs(client, pll_regs1,
|
||||
+ sizeof(pll_regs1) / sizeof(mt9t111_regs));
|
||||
+ for (i = 0; i < 100; i++) {
|
||||
+ mt9t111_read_reg(client, 0x0014, &value);
|
||||
+ if ((value & 0x8000) != 0)
|
||||
break;
|
||||
mdelay(2);
|
||||
}
|
||||
- mt9t111_write_regs(client, pll_regs2, sizeof(pll_regs2)/sizeof(mt9t111_regs));
|
||||
+ mt9t111_write_regs(client, pll_regs2,
|
||||
+ sizeof(pll_regs2) / sizeof(mt9t111_regs));
|
||||
}
|
||||
|
||||
|
||||
@@ -746,9 +756,12 @@ static void mt9t111_loaddefault(struct i2c_client *client)
|
||||
mt9t111_write_reg(client, 0x001A, 0x0218);
|
||||
|
||||
mt9t111_enable_pll(client);
|
||||
- mt9t111_write_regs(client, def_regs1, sizeof(def_regs1)/sizeof(mt9t111_regs));
|
||||
- mt9t111_write_regs(client, patch_rev6, sizeof(patch_rev6)/sizeof(mt9t111_regs));
|
||||
- mt9t111_write_regs(client, def_regs2, sizeof(def_regs2)/sizeof(mt9t111_regs));
|
||||
+ mt9t111_write_regs(client, def_regs1,
|
||||
+ sizeof(def_regs1) / sizeof(mt9t111_regs));
|
||||
+ mt9t111_write_regs(client, patch_rev6,
|
||||
+ sizeof(patch_rev6) / sizeof(mt9t111_regs));
|
||||
+ mt9t111_write_regs(client, def_regs2,
|
||||
+ sizeof(def_regs2) / sizeof(mt9t111_regs));
|
||||
|
||||
#ifdef USE_RAW
|
||||
mt9t111_bayer_format(client);
|
||||
@@ -806,7 +819,7 @@ mt9t111_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
|
||||
sensor->pix.width = 640;
|
||||
sensor->pix.height = 480;
|
||||
-#ifdef USE_RAW
|
||||
+#ifdef USE_RAW
|
||||
sensor->pix.pixelformat = V4L2_PIX_FMT_SGRBG10;
|
||||
#else
|
||||
sensor->pix.pixelformat = V4L2_PIX_FMT_YUYV;
|
||||
diff --git a/drivers/media/video/mt9t111_reg.h b/drivers/media/video/mt9t111_reg.h
|
||||
index e012eeb..e226c37 100644
|
||||
--- a/drivers/media/video/mt9t111_reg.h
|
||||
+++ b/drivers/media/video/mt9t111_reg.h
|
||||
@@ -25,7 +25,7 @@ typedef struct {
|
||||
u16 data;
|
||||
} mt9t111_regs;
|
||||
|
||||
-mt9t111_regs patch_rev6[] ={
|
||||
+mt9t111_regs patch_rev6[] = {
|
||||
{0, 0x0982, 0x0},
|
||||
{0, 0x098A, 0xCE7},
|
||||
{0, 0x0990, 0x3C3C},
|
||||
@@ -658,7 +658,7 @@ mt9t111_regs patch_rev6[] ={
|
||||
{100, 0x0990, 0x0004}
|
||||
};
|
||||
|
||||
-mt9t111_regs def_regs1[] ={
|
||||
+mt9t111_regs def_regs1[] = {
|
||||
{0, 0x001A, 0x0218},
|
||||
{0, 0x001E, 0x0777},
|
||||
{0, 0x3084, 0x2409},
|
||||
@@ -1343,7 +1343,7 @@ mt9t111_regs pll_regs2[] = {
|
||||
{0, 0x0014, 0x3046},
|
||||
{0, 0x0022, 0x01E0},
|
||||
{0, 0x001E, 0x0707},
|
||||
- {0, 0x3B84, 0x011D}
|
||||
+ {0, 0x3B84, 0x011D}
|
||||
};
|
||||
|
||||
mt9t111_regs bayer_pattern_regs[] = {
|
||||
diff --git a/include/media/mt9t111.h b/include/media/mt9t111.h
|
||||
index 7acbeed..0a5161a 100644
|
||||
--- a/include/media/mt9t111.h
|
||||
+++ b/include/media/mt9t111.h
|
||||
@@ -40,7 +40,7 @@
|
||||
#define MT9T111_I2C_UNREGISTERED (0)
|
||||
|
||||
/*i2c adress for MT9T111*/
|
||||
-#define MT9T111_I2C_ADDR (0x78 >>1)
|
||||
+#define MT9T111_I2C_ADDR (0x78 >> 1)
|
||||
|
||||
#define MT9T111_CLK_MAX (75000000) /* 75MHz */
|
||||
#define MT9T111_CLK_MIN (6000000) /* 6Mhz */
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
From bb40914cf9e313d70385e647f956a55df15e717f Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 11 Jun 2010 16:17:56 -0500
|
||||
Subject: [PATCH 03/75] mt9t111: Pass v4l2_int_device data
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
drivers/media/video/mt9t111.c | 2 +-
|
||||
include/media/mt9t111.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c
|
||||
index 95e1508..6a7b2c0 100644
|
||||
--- a/drivers/media/video/mt9t111.c
|
||||
+++ b/drivers/media/video/mt9t111.c
|
||||
@@ -371,7 +371,7 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
|
||||
else
|
||||
debug_dummy("debug_dummy -- enable clock\n");;
|
||||
|
||||
- rval = sensor->pdata->power_set(on);
|
||||
+ rval = sensor->pdata->power_set(s, on);
|
||||
if (rval < 0) {
|
||||
dev_err(&c->dev, "Unable to set the power state: " "mt9t111"
|
||||
" sensor\n");
|
||||
diff --git a/include/media/mt9t111.h b/include/media/mt9t111.h
|
||||
index 0a5161a..aae3f99 100644
|
||||
--- a/include/media/mt9t111.h
|
||||
+++ b/include/media/mt9t111.h
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
struct mt9t111_platform_data {
|
||||
char *master;
|
||||
- int (*power_set) (enum v4l2_power on);
|
||||
+ int (*power_set) (struct v4l2_int_device *s, enum v4l2_power on);
|
||||
int (*ifparm) (struct v4l2_ifparm *p);
|
||||
int (*priv_data_set) (void *);
|
||||
/* Interface control params */
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-352
@@ -1,352 +0,0 @@
|
||||
From 8b7b00860ac8c558c7156ff676655942027f7f53 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 11 Jun 2010 16:15:58 -0500
|
||||
Subject: [PATCH 04/75] omap3beagle: Add camera support
|
||||
|
||||
This is tested with the xM + Leopard imaging module camera, which
|
||||
has a MT9T111.
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/Makefile | 3 +-
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 228 ++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.h | 41 +++++
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 25 +++
|
||||
4 files changed, 296 insertions(+), 1 deletions(-)
|
||||
create mode 100644 arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
create mode 100644 arch/arm/mach-omap2/board-omap3beagle-camera.h
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
|
||||
index 9042317..a49d436 100644
|
||||
--- a/arch/arm/mach-omap2/Makefile
|
||||
+++ b/arch/arm/mach-omap2/Makefile
|
||||
@@ -87,7 +87,8 @@ obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \
|
||||
mmc-twl4030.o
|
||||
obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
|
||||
obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \
|
||||
- mmc-twl4030.o
|
||||
+ mmc-twl4030.o \
|
||||
+ board-omap3beagle-camera.o
|
||||
obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \
|
||||
mmc-twl4030.o \
|
||||
board-ldp-camera.o
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
new file mode 100644
|
||||
index 0000000..e93437f
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -0,0 +1,228 @@
|
||||
+/*
|
||||
+ * Driver for Leopard Module Board used in Beagleboard (xM)
|
||||
+ *
|
||||
+ * Copyright (C) 2010 Texas Instruments Inc
|
||||
+ * Author: Sergio Aguirre <saaguirre@ti.com>
|
||||
+ *
|
||||
+ * Based on work done by:
|
||||
+ * Vaibhav Hiremath <hvaibhav@ti.com>
|
||||
+ * Anuj Aggarwal <anuj.aggarwal@ti.com>
|
||||
+ * Sivaraj R <sivaraj@ti.com>
|
||||
+ *
|
||||
+ * This package is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/videodev2.h>
|
||||
+#include <linux/i2c/twl.h>
|
||||
+#include <linux/delay.h>
|
||||
+
|
||||
+#include <plat/mux.h>
|
||||
+#include <plat/board.h>
|
||||
+
|
||||
+#include <media/v4l2-int-device.h>
|
||||
+#include <media/mt9t111.h>
|
||||
+
|
||||
+/* Include V4L2 ISP-Camera driver related header file */
|
||||
+#include <../drivers/media/video/omap34xxcam.h>
|
||||
+#include <../drivers/media/video/isp/ispreg.h>
|
||||
+
|
||||
+#include "mux.h"
|
||||
+#include "board-omap3beagle-camera.h"
|
||||
+
|
||||
+#define MODULE_NAME "omap3beaglelmb"
|
||||
+
|
||||
+#define MT9T111_I2C_BUSNUM (2)
|
||||
+
|
||||
+#define CAM_USE_XCLKA 1
|
||||
+
|
||||
+#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
+static struct isp_interface_config mt9t111_if_config = {
|
||||
+ .ccdc_par_ser = ISP_PARLL,
|
||||
+ .dataline_shift = 0x0,
|
||||
+ .hsvs_syncdetect = ISPCTRL_SYNC_DETECT_VSRISE,
|
||||
+ .strobe = 0x0,
|
||||
+ .prestrobe = 0x0,
|
||||
+ .shutter = 0x0,
|
||||
+ .u.par.par_bridge = 0x1,
|
||||
+ .u.par.par_clk_pol = 0x0,
|
||||
+};
|
||||
+
|
||||
+static struct v4l2_ifparm mt9t111_ifparm_s = {
|
||||
+#if 1
|
||||
+ .if_type = V4L2_IF_TYPE_RAW,
|
||||
+ .u = {
|
||||
+ .raw = {
|
||||
+ .frame_start_on_rising_vs = 1,
|
||||
+ .bt_sync_correct = 0,
|
||||
+ .swap = 0,
|
||||
+ .latch_clk_inv = 0,
|
||||
+ .nobt_hs_inv = 0, /* active high */
|
||||
+ .nobt_vs_inv = 0, /* active high */
|
||||
+ .clock_min = MT9T111_CLK_MIN,
|
||||
+ .clock_max = MT9T111_CLK_MAX,
|
||||
+ },
|
||||
+ },
|
||||
+#else
|
||||
+ .if_type = V4L2_IF_TYPE_YCbCr,
|
||||
+ .u = {
|
||||
+ .ycbcr = {
|
||||
+ .frame_start_on_rising_vs = 1,
|
||||
+ .bt_sync_correct = 0,
|
||||
+ .swap = 0,
|
||||
+ .latch_clk_inv = 0,
|
||||
+ .nobt_hs_inv = 0, /* active high */
|
||||
+ .nobt_vs_inv = 0, /* active high */
|
||||
+ .clock_min = MT9T111_CLK_MIN,
|
||||
+ .clock_max = MT9T111_CLK_MAX,
|
||||
+ },
|
||||
+ },
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * @brief mt9t111_ifparm - Returns the mt9t111 interface parameters
|
||||
+ *
|
||||
+ * @param p - pointer to v4l2_ifparm structure
|
||||
+ *
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+static int mt9t111_ifparm(struct v4l2_ifparm *p)
|
||||
+{
|
||||
+ if (p == NULL)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ *p = mt9t111_ifparm_s;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
||||
+static struct omap34xxcam_hw_config mt9t111_hwc = {
|
||||
+ .dev_index = 0,
|
||||
+ .dev_minor = 0,
|
||||
+ .dev_type = OMAP34XXCAM_SLAVE_SENSOR,
|
||||
+ .u.sensor.sensor_isp = 1,
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+/**
|
||||
+ * @brief mt9t111_set_prv_data - Returns mt9t111 omap34xx driver private data
|
||||
+ *
|
||||
+ * @param priv - pointer to omap34xxcam_hw_config structure
|
||||
+ *
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+static int mt9t111_set_prv_data(void *priv)
|
||||
+{
|
||||
+#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
||||
+ struct omap34xxcam_hw_config *hwc = priv;
|
||||
+
|
||||
+ if (priv == NULL)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ hwc->u.sensor = mt9t111_hwc.u.sensor;
|
||||
+ hwc->dev_index = mt9t111_hwc.dev_index;
|
||||
+ hwc->dev_minor = mt9t111_hwc.dev_minor;
|
||||
+ hwc->dev_type = mt9t111_hwc.dev_type;
|
||||
+ return 0;
|
||||
+#else
|
||||
+ return -EINVAL;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * @brief mt9t111_power_set - Power-on or power-off TVP5146 device
|
||||
+ *
|
||||
+ * @param power - enum, Power on/off, resume/standby
|
||||
+ *
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
+{
|
||||
+ struct omap34xxcam_videodev *vdev = s->u.slave->master->priv;
|
||||
+
|
||||
+ switch (power) {
|
||||
+ case V4L2_POWER_OFF:
|
||||
+ isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA);
|
||||
+ break;
|
||||
+
|
||||
+ case V4L2_POWER_STANDBY:
|
||||
+ break;
|
||||
+
|
||||
+ case V4L2_POWER_ON:
|
||||
+ isp_set_xclk(vdev->cam->isp, MT9T111_CLK_MIN, CAM_USE_XCLKA);
|
||||
+
|
||||
+#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
||||
+ isp_configure_interface(vdev->cam->isp, &mt9t111_if_config);
|
||||
+#endif
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ return -ENODEV;
|
||||
+ break;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct mt9t111_platform_data mt9t111_pdata = {
|
||||
+ .master = "omap34xxcam",
|
||||
+ .power_set = mt9t111_power_set,
|
||||
+ .priv_data_set = mt9t111_set_prv_data,
|
||||
+ .ifparm = mt9t111_ifparm,
|
||||
+ /* Some interface dependent params */
|
||||
+ .clk_polarity = 0, /* data clocked out on falling edge */
|
||||
+ .hs_polarity = 1, /* 0 - Active low, 1- Active high */
|
||||
+ .vs_polarity = 1, /* 0 - Active low, 1- Active high */
|
||||
+};
|
||||
+
|
||||
+static struct i2c_board_info __initdata mt9t111_i2c_board_info = {
|
||||
+ I2C_BOARD_INFO("mt9t111", MT9T111_I2C_ADDR),
|
||||
+ .platform_data = &mt9t111_pdata,
|
||||
+};
|
||||
+
|
||||
+#endif /* #ifdef CONFIG_VIDEO_MT9T111 */
|
||||
+
|
||||
+/**
|
||||
+ * @brief omap3beaglelmb_init - module init function. Should be called before any
|
||||
+ * client driver init call
|
||||
+ *
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+int __init omap3beaglelmb_init(void)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ /*
|
||||
+ * Register the I2C devices present in the board to the I2C
|
||||
+ * framework.
|
||||
+ * If more I2C devices are added, then each device information should
|
||||
+ * be registered with I2C using i2c_register_board_info().
|
||||
+ */
|
||||
+#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
+ err = i2c_register_board_info(MT9T111_I2C_BUSNUM,
|
||||
+ &mt9t111_i2c_board_info, 1);
|
||||
+ if (err) {
|
||||
+ printk(KERN_ERR MODULE_NAME \
|
||||
+ ": MT9T111 I2C Board Registration failed \n");
|
||||
+ return err;
|
||||
+ }
|
||||
+#endif
|
||||
+ printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+arch_initcall(omap3beaglelmb_init);
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.h b/arch/arm/mach-omap2/board-omap3beagle-camera.h
|
||||
new file mode 100644
|
||||
index 0000000..1026aeb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.h
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010 Texas Instruments Inc
|
||||
+ * Author: Sergio Aguirre <saaguirre@ti.com>
|
||||
+ *
|
||||
+ * Based on work done by:
|
||||
+ * Vaibhav Hiremath <hvaibhav@ti.com>
|
||||
+ * Anuj Aggarwal <anuj.aggarwal@ti.com>
|
||||
+ * Sivaraj R <sivaraj@ti.com>
|
||||
+ *
|
||||
+ * This package is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+ */
|
||||
+
|
||||
+#ifndef __BOARD_OMAP3BEAGLE_LMB_H_
|
||||
+#define __BOARD_OMAP3BEAGLE_LMB_H_
|
||||
+
|
||||
+/* mux id to enable/disable signal routing to different peripherals */
|
||||
+enum omap3beaglelmb_mux {
|
||||
+ MUX_TVP5146 = 0,
|
||||
+ MUX_CAMERA_SENSOR,
|
||||
+ MUX_EXP_CAMERA_SENSOR,
|
||||
+ NUM_MUX
|
||||
+};
|
||||
+
|
||||
+/* enum to enable or disable mux */
|
||||
+enum config_mux {
|
||||
+ DISABLE_MUX,
|
||||
+ ENABLE_MUX
|
||||
+};
|
||||
+
|
||||
+#endif /* __BOARD_OMAP3BEAGLE_LMB_H_ */
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index b313350..d6b69a6 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -712,6 +712,31 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
|
||||
|
||||
#ifdef CONFIG_OMAP_MUX
|
||||
static struct omap_board_mux board_mux[] __initdata = {
|
||||
+ /* Camera - Parallel Data */
|
||||
+ OMAP3_MUX(CAM_D0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D8, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D9, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D10, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_D11, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+
|
||||
+ /* Camera - HS/VS signals */
|
||||
+ OMAP3_MUX(CAM_HS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+ OMAP3_MUX(CAM_VS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
|
||||
+
|
||||
+ /* Camera - Reset GPIO 98 */
|
||||
+ OMAP3_MUX(CAM_FLD, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
||||
+
|
||||
+ /* Camera - XCLK */
|
||||
+ OMAP3_MUX(CAM_XCLKA, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
|
||||
+
|
||||
{ .reg_offset = OMAP_MUX_TERMINATOR },
|
||||
};
|
||||
#else
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-3070
File diff suppressed because it is too large
Load Diff
-238
@@ -1,238 +0,0 @@
|
||||
From a8bad5bfa652d2e35575f864da6192d41c85c818 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 11 Jun 2010 16:50:39 -0500
|
||||
Subject: [PATCH 06/75] omap3beagle: camera: Add support for regulators
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 92 +++++++++++++++++++++---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 53 ++++++++++++++
|
||||
2 files changed, 135 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index e93437f..af8581a 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -28,8 +28,9 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/videodev2.h>
|
||||
-#include <linux/i2c/twl.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
#include <linux/delay.h>
|
||||
+#include <linux/platform_device.h>
|
||||
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
@@ -50,6 +51,11 @@
|
||||
|
||||
#define CAM_USE_XCLKA 1
|
||||
|
||||
+static struct regulator *beagle_mt9t111_reg1;
|
||||
+static struct regulator *beagle_mt9t111_reg2;
|
||||
+
|
||||
+static struct device *beaglecam_dev;
|
||||
+
|
||||
#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
static struct isp_interface_config mt9t111_if_config = {
|
||||
.ccdc_par_ser = ISP_PARLL,
|
||||
@@ -157,10 +163,13 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
|
||||
switch (power) {
|
||||
case V4L2_POWER_OFF:
|
||||
+ case V4L2_POWER_STANDBY:
|
||||
isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA);
|
||||
- break;
|
||||
|
||||
- case V4L2_POWER_STANDBY:
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_reg1))
|
||||
+ regulator_disable(beagle_mt9t111_reg1);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_reg2))
|
||||
+ regulator_disable(beagle_mt9t111_reg2);
|
||||
break;
|
||||
|
||||
case V4L2_POWER_ON:
|
||||
@@ -169,6 +178,12 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
||||
isp_configure_interface(vdev->cam->isp, &mt9t111_if_config);
|
||||
#endif
|
||||
+
|
||||
+ /* turn on analog power */
|
||||
+ regulator_enable(beagle_mt9t111_reg1);
|
||||
+ regulator_enable(beagle_mt9t111_reg2);
|
||||
+ udelay(100);
|
||||
+
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -196,16 +211,22 @@ static struct i2c_board_info __initdata mt9t111_i2c_board_info = {
|
||||
|
||||
#endif /* #ifdef CONFIG_VIDEO_MT9T111 */
|
||||
|
||||
-/**
|
||||
- * @brief omap3beaglelmb_init - module init function. Should be called before any
|
||||
- * client driver init call
|
||||
- *
|
||||
- * @return result of operation - 0 is success
|
||||
- */
|
||||
-int __init omap3beaglelmb_init(void)
|
||||
+
|
||||
+static int beagle_cam_probe(struct platform_device *pdev)
|
||||
{
|
||||
int err;
|
||||
|
||||
+ beagle_mt9t111_reg1 = regulator_get(beaglecam_dev, "vaux3_1");
|
||||
+ if (IS_ERR(beagle_mt9t111_reg1)) {
|
||||
+ dev_err(beaglecam_dev, "vaux3_1 regulator missing\n");
|
||||
+ return PTR_ERR(beagle_mt9t111_reg1);
|
||||
+ }
|
||||
+ beagle_mt9t111_reg2 = regulator_get(beaglecam_dev, "vaux4_1");
|
||||
+ if (IS_ERR(beagle_mt9t111_reg2)) {
|
||||
+ dev_err(beaglecam_dev, "vaux4_1 regulator missing\n");
|
||||
+ regulator_put(beagle_mt9t111_reg1);
|
||||
+ return PTR_ERR(beagle_mt9t111_reg2);
|
||||
+ }
|
||||
/*
|
||||
* Register the I2C devices present in the board to the I2C
|
||||
* framework.
|
||||
@@ -221,8 +242,59 @@ int __init omap3beaglelmb_init(void)
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+ beaglecam_dev = &pdev->dev;
|
||||
+
|
||||
printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+static int beagle_cam_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_reg1))
|
||||
+ regulator_disable(beagle_mt9t111_reg1);
|
||||
+ regulator_put(beagle_mt9t111_reg1);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_reg2))
|
||||
+ regulator_disable(beagle_mt9t111_reg2);
|
||||
+ regulator_put(beagle_mt9t111_reg2);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int beagle_cam_suspend(struct device *dev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int beagle_cam_resume(struct device *dev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct dev_pm_ops beagle_cam_pm_ops = {
|
||||
+ .suspend = beagle_cam_suspend,
|
||||
+ .resume = beagle_cam_resume,
|
||||
+};
|
||||
+
|
||||
+static struct platform_driver beagle_cam_driver = {
|
||||
+ .probe = beagle_cam_probe,
|
||||
+ .remove = beagle_cam_remove,
|
||||
+ .driver = {
|
||||
+ .name = "beagle_cam",
|
||||
+ .pm = &beagle_cam_pm_ops,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * @brief omap3beaglelmb_init - module init function. Should be called before any
|
||||
+ * client driver init call
|
||||
+ *
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+int __init omap3beaglelmb_init(void)
|
||||
+{
|
||||
+ platform_driver_register(&beagle_cam_driver);
|
||||
+ return 0;
|
||||
+}
|
||||
arch_initcall(omap3beaglelmb_init);
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index d6b69a6..aa16acd 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -403,6 +403,56 @@ static struct twl4030_gpio_platform_data beagle_gpio_data = {
|
||||
.setup = beagle_twl_gpio_setup,
|
||||
};
|
||||
|
||||
+
|
||||
+static struct platform_device beagle_cam_device = {
|
||||
+ .name = "beagle_cam",
|
||||
+ .id = -1,
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vaux3_supplies[] = {
|
||||
+ {
|
||||
+ .supply = "vaux3_1",
|
||||
+ .dev = &beagle_cam_device.dev,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vaux4_supplies[] = {
|
||||
+ {
|
||||
+ .supply = "vaux4_1",
|
||||
+ .dev = &beagle_cam_device.dev,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+/* VAUX3 for CAM_1V8 */
|
||||
+static struct regulator_init_data beagle_vaux3 = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = ARRAY_SIZE(beagle_vaux3_supplies),
|
||||
+ .consumer_supplies = beagle_vaux3_supplies,
|
||||
+};
|
||||
+
|
||||
+/* VAUX4 for CAM_2V8 */
|
||||
+static struct regulator_init_data beagle_vaux4 = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 2800000,
|
||||
+ .max_uV = 2800000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = ARRAY_SIZE(beagle_vaux4_supplies),
|
||||
+ .consumer_supplies = beagle_vaux4_supplies,
|
||||
+};
|
||||
+
|
||||
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
|
||||
static struct regulator_init_data beagle_vmmc1 = {
|
||||
.constraints = {
|
||||
@@ -492,6 +542,8 @@ static struct twl4030_platform_data beagle_twldata = {
|
||||
.vsim = &beagle_vsim,
|
||||
.vdac = &beagle_vdac,
|
||||
.vpll2 = &beagle_vpll2,
|
||||
+ .vaux3 = &beagle_vaux3,
|
||||
+ .vaux4 = &beagle_vaux4,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = {
|
||||
@@ -658,6 +710,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = {
|
||||
&leds_gpio,
|
||||
&keys_gpio,
|
||||
&beagle_dss_device,
|
||||
+ &beagle_cam_device,
|
||||
};
|
||||
|
||||
static void __init omap3beagle_flash_init(void)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
From 297b25089d0a06c89101e4f6a3189419be19369f Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 11 Jun 2010 16:52:25 -0500
|
||||
Subject: [PATCH 07/75] TEMP: omap3beagle: cam: Enable OMAP_MUX
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/configs/omap3_beagle_cam_defconfig | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/configs/omap3_beagle_cam_defconfig b/arch/arm/configs/omap3_beagle_cam_defconfig
|
||||
index 0ea8300..bcd9418 100644
|
||||
--- a/arch/arm/configs/omap3_beagle_cam_defconfig
|
||||
+++ b/arch/arm/configs/omap3_beagle_cam_defconfig
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.32
|
||||
-# Fri Jun 11 14:25:23 2010
|
||||
+# Fri Jun 11 16:51:42 2010
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
@@ -240,7 +240,9 @@ CONFIG_ARCH_OMAP3=y
|
||||
CONFIG_OMAP_SMARTREFLEX=y
|
||||
# CONFIG_OMAP_SMARTREFLEX_TESTING is not set
|
||||
CONFIG_OMAP_RESET_CLOCKS=y
|
||||
-# CONFIG_OMAP_MUX is not set
|
||||
+CONFIG_OMAP_MUX=y
|
||||
+# CONFIG_OMAP_MUX_DEBUG is not set
|
||||
+CONFIG_OMAP_MUX_WARNINGS=y
|
||||
CONFIG_OMAP_MCBSP=y
|
||||
CONFIG_OMAP_MBOX_FWK=m
|
||||
CONFIG_OMAP_IOMMU=y
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
From c46eeb468f9bb69ca4c82abd1ff07e0f35aaa50f Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 11 Jun 2010 17:53:50 -0500
|
||||
Subject: [PATCH 08/75] omap3beagle: camera: Fix null pointer dereference
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 12 ++++--------
|
||||
1 files changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index af8581a..20174a7 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -54,8 +54,6 @@
|
||||
static struct regulator *beagle_mt9t111_reg1;
|
||||
static struct regulator *beagle_mt9t111_reg2;
|
||||
|
||||
-static struct device *beaglecam_dev;
|
||||
-
|
||||
#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
static struct isp_interface_config mt9t111_if_config = {
|
||||
.ccdc_par_ser = ISP_PARLL,
|
||||
@@ -216,14 +214,14 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
{
|
||||
int err;
|
||||
|
||||
- beagle_mt9t111_reg1 = regulator_get(beaglecam_dev, "vaux3_1");
|
||||
+ beagle_mt9t111_reg1 = regulator_get(&pdev->dev, "vaux3_1");
|
||||
if (IS_ERR(beagle_mt9t111_reg1)) {
|
||||
- dev_err(beaglecam_dev, "vaux3_1 regulator missing\n");
|
||||
+ dev_err(&pdev->dev, "vaux3_1 regulator missing\n");
|
||||
return PTR_ERR(beagle_mt9t111_reg1);
|
||||
}
|
||||
- beagle_mt9t111_reg2 = regulator_get(beaglecam_dev, "vaux4_1");
|
||||
+ beagle_mt9t111_reg2 = regulator_get(&pdev->dev, "vaux4_1");
|
||||
if (IS_ERR(beagle_mt9t111_reg2)) {
|
||||
- dev_err(beaglecam_dev, "vaux4_1 regulator missing\n");
|
||||
+ dev_err(&pdev->dev, "vaux4_1 regulator missing\n");
|
||||
regulator_put(beagle_mt9t111_reg1);
|
||||
return PTR_ERR(beagle_mt9t111_reg2);
|
||||
}
|
||||
@@ -243,8 +241,6 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
}
|
||||
#endif
|
||||
|
||||
- beaglecam_dev = &pdev->dev;
|
||||
-
|
||||
printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");
|
||||
|
||||
return 0;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
From 4dc4c88bdb1f4be3de42f1cf5e8d5d62b6a2a04e Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Wed, 16 Jun 2010 03:23:57 +0300
|
||||
Subject: [PATCH 09/75] Revert "TEMP: omap3beagle: cam: Enable OMAP_MUX"
|
||||
|
||||
This reverts commit 7d5f49845f06feadb9bc97d458d1ce03814ff5f4.
|
||||
|
||||
Reason?
|
||||
|
||||
Kernel panic on MMC partition mount, so probably muxing is broken
|
||||
somewhere.
|
||||
---
|
||||
arch/arm/configs/omap3_beagle_cam_defconfig | 6 ++----
|
||||
1 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/configs/omap3_beagle_cam_defconfig b/arch/arm/configs/omap3_beagle_cam_defconfig
|
||||
index bcd9418..0ea8300 100644
|
||||
--- a/arch/arm/configs/omap3_beagle_cam_defconfig
|
||||
+++ b/arch/arm/configs/omap3_beagle_cam_defconfig
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.32
|
||||
-# Fri Jun 11 16:51:42 2010
|
||||
+# Fri Jun 11 14:25:23 2010
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
@@ -240,9 +240,7 @@ CONFIG_ARCH_OMAP3=y
|
||||
CONFIG_OMAP_SMARTREFLEX=y
|
||||
# CONFIG_OMAP_SMARTREFLEX_TESTING is not set
|
||||
CONFIG_OMAP_RESET_CLOCKS=y
|
||||
-CONFIG_OMAP_MUX=y
|
||||
-# CONFIG_OMAP_MUX_DEBUG is not set
|
||||
-CONFIG_OMAP_MUX_WARNINGS=y
|
||||
+# CONFIG_OMAP_MUX is not set
|
||||
CONFIG_OMAP_MCBSP=y
|
||||
CONFIG_OMAP_MBOX_FWK=m
|
||||
CONFIG_OMAP_IOMMU=y
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
From e998edf3c99b4f8a16519a2dc968b1841a274b7f Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Wed, 16 Jun 2010 04:28:06 +0300
|
||||
Subject: [PATCH 10/75] omap3beagle: camera: Change arch -> late_initcall
|
||||
|
||||
This is for ensuring that the regulators are initialized already.
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 20174a7..55a113c 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -293,4 +293,4 @@ int __init omap3beaglelmb_init(void)
|
||||
platform_driver_register(&beagle_cam_driver);
|
||||
return 0;
|
||||
}
|
||||
-arch_initcall(omap3beaglelmb_init);
|
||||
+late_initcall(omap3beaglelmb_init);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-107
@@ -1,107 +0,0 @@
|
||||
From 17c85e1bf42b03f4e764280b8a626853506517e6 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Wed, 16 Jun 2010 04:58:46 +0300
|
||||
Subject: [PATCH 11/75] omap3beagle: camera: Move i2c registration to the main board
|
||||
|
||||
This is because the board-omap3beagle-camera.c file now is
|
||||
late_initcall, and the i2c bus registration needed to be before
|
||||
i2c host init.
|
||||
|
||||
So, in order to have the i2c init, meanwhile having late_initcall,
|
||||
this is so far the best solution.
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 24 +-----------------------
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 12 +++++++++++-
|
||||
2 files changed, 12 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 55a113c..1652f15 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -47,8 +47,6 @@
|
||||
|
||||
#define MODULE_NAME "omap3beaglelmb"
|
||||
|
||||
-#define MT9T111_I2C_BUSNUM (2)
|
||||
-
|
||||
#define CAM_USE_XCLKA 1
|
||||
|
||||
static struct regulator *beagle_mt9t111_reg1;
|
||||
@@ -191,7 +189,7 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static struct mt9t111_platform_data mt9t111_pdata = {
|
||||
+struct mt9t111_platform_data mt9t111_pdata = {
|
||||
.master = "omap34xxcam",
|
||||
.power_set = mt9t111_power_set,
|
||||
.priv_data_set = mt9t111_set_prv_data,
|
||||
@@ -202,11 +200,6 @@ static struct mt9t111_platform_data mt9t111_pdata = {
|
||||
.vs_polarity = 1, /* 0 - Active low, 1- Active high */
|
||||
};
|
||||
|
||||
-static struct i2c_board_info __initdata mt9t111_i2c_board_info = {
|
||||
- I2C_BOARD_INFO("mt9t111", MT9T111_I2C_ADDR),
|
||||
- .platform_data = &mt9t111_pdata,
|
||||
-};
|
||||
-
|
||||
#endif /* #ifdef CONFIG_VIDEO_MT9T111 */
|
||||
|
||||
|
||||
@@ -225,21 +218,6 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
regulator_put(beagle_mt9t111_reg1);
|
||||
return PTR_ERR(beagle_mt9t111_reg2);
|
||||
}
|
||||
- /*
|
||||
- * Register the I2C devices present in the board to the I2C
|
||||
- * framework.
|
||||
- * If more I2C devices are added, then each device information should
|
||||
- * be registered with I2C using i2c_register_board_info().
|
||||
- */
|
||||
-#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
- err = i2c_register_board_info(MT9T111_I2C_BUSNUM,
|
||||
- &mt9t111_i2c_board_info, 1);
|
||||
- if (err) {
|
||||
- printk(KERN_ERR MODULE_NAME \
|
||||
- ": MT9T111 I2C Board Registration failed \n");
|
||||
- return err;
|
||||
- }
|
||||
-#endif
|
||||
|
||||
printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index aa16acd..757d430 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -71,6 +71,11 @@ static struct omap_opp * _omap35x_l3_rate_table = NULL;
|
||||
static struct omap_opp * _omap37x_l3_rate_table = NULL;
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
+#ifdef CONFIG_VIDEO_MT9T111
|
||||
+#include <media/v4l2-int-device.h>
|
||||
+#include <media/mt9t111.h>
|
||||
+extern struct mt9t111_platform_data mt9t111_pdata;
|
||||
+#endif
|
||||
|
||||
#define GPMC_CS0_BASE 0x60
|
||||
#define GPMC_CS_SIZE 0x30
|
||||
@@ -588,7 +593,12 @@ static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {
|
||||
static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {};
|
||||
#endif
|
||||
|
||||
-static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {};
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("mt9t111", MT9T111_I2C_ADDR),
|
||||
+ .platform_data = &mt9t111_pdata,
|
||||
+ },
|
||||
+};
|
||||
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
{
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
From a36ff286ba2355488bd093f001a722d888cf9a8b Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 16 Jun 2010 09:45:46 +0200
|
||||
Subject: [PATCH 12/75] ARM: OMAP3: make camera code build if MT9T111 is built as module or disabled
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 757d430..1e9a868 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -71,7 +71,7 @@ static struct omap_opp * _omap35x_l3_rate_table = NULL;
|
||||
static struct omap_opp * _omap37x_l3_rate_table = NULL;
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
-#ifdef CONFIG_VIDEO_MT9T111
|
||||
+#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
#include <media/v4l2-int-device.h>
|
||||
#include <media/mt9t111.h>
|
||||
extern struct mt9t111_platform_data mt9t111_pdata;
|
||||
@@ -594,10 +594,12 @@ static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {};
|
||||
#endif
|
||||
|
||||
static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
|
||||
+#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
{
|
||||
I2C_BOARD_INFO("mt9t111", MT9T111_I2C_ADDR),
|
||||
.platform_data = &mt9t111_pdata,
|
||||
},
|
||||
+#endif
|
||||
};
|
||||
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
From 7c09434499a8daa650b934a62d3f651f868e0e70 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Wed, 23 Jun 2010 15:03:24 -0500
|
||||
Subject: [PATCH 13/75] DEBUG: omap3beagle: camera: Force mode0 in cam_xclka
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 1652f15..77f9469 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
+#include <plat/control.h>
|
||||
|
||||
#include <media/v4l2-int-device.h>
|
||||
#include <media/mt9t111.h>
|
||||
@@ -160,6 +161,7 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
switch (power) {
|
||||
case V4L2_POWER_OFF:
|
||||
case V4L2_POWER_STANDBY:
|
||||
+ omap_ctrl_writew(0x0, 0x110); /* Control XCLKA output mux */
|
||||
isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA);
|
||||
|
||||
if (regulator_is_enabled(beagle_mt9t111_reg1))
|
||||
@@ -169,6 +171,7 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
break;
|
||||
|
||||
case V4L2_POWER_ON:
|
||||
+ omap_ctrl_writew(0x0, 0x110); /* Control XCLKA output mux */
|
||||
isp_set_xclk(vdev->cam->isp, MT9T111_CLK_MIN, CAM_USE_XCLKA);
|
||||
|
||||
#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
From 2841aa647058815680fe3ef969e7fda5e821016f Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Thu, 4 Feb 2010 18:12:37 -0600
|
||||
Subject: [PATCH 14/75] OMAP3: CLOCK: Add capability to change rate of dpll4_m5_ck_3630
|
||||
|
||||
Add necessary clk_sel definitions to clock framework to allow changing
|
||||
dpll4_m5_ck_3630 rate.
|
||||
|
||||
Based on patch by Tuukka Toivonen <tuukka.o.toivonen@nokia.com> with subject:
|
||||
|
||||
OMAP3: CLOCK: Add capability to change rate of dpll4_m5_ck
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/clock34xx_data.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c
|
||||
index 89e2f61..8d101ef 100644
|
||||
--- a/arch/arm/mach-omap2/clock34xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/clock34xx_data.c
|
||||
@@ -934,6 +934,8 @@ static struct clk dpll4_m5_ck_3630 __initdata = {
|
||||
.clksel = div32_dpll4_clksel,
|
||||
.clkdm_name = "dpll4_clkdm",
|
||||
.recalc = &omap2_clksel_recalc,
|
||||
+ .set_rate = &omap2_clksel_set_rate,
|
||||
+ .round_rate = &omap2_clksel_round_rate,
|
||||
};
|
||||
|
||||
/* The PWRDN bit is apparently only available on 3430ES2 and above */
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
From 1ae58f6d2ec41a1b7d0cdeca4de4b9d9760195bf Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Thu, 24 Jun 2010 14:27:39 -0500
|
||||
Subject: [PATCH 15/75] Revert "DEBUG: omap3beagle: camera: Force mode0 in cam_xclka"
|
||||
|
||||
This reverts commit 158e14b3d449dde2c6aa9f8cddb86fbbee2d2cd7.
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 3 ---
|
||||
1 files changed, 0 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 77f9469..1652f15 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
-#include <plat/control.h>
|
||||
|
||||
#include <media/v4l2-int-device.h>
|
||||
#include <media/mt9t111.h>
|
||||
@@ -161,7 +160,6 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
switch (power) {
|
||||
case V4L2_POWER_OFF:
|
||||
case V4L2_POWER_STANDBY:
|
||||
- omap_ctrl_writew(0x0, 0x110); /* Control XCLKA output mux */
|
||||
isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA);
|
||||
|
||||
if (regulator_is_enabled(beagle_mt9t111_reg1))
|
||||
@@ -171,7 +169,6 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
break;
|
||||
|
||||
case V4L2_POWER_ON:
|
||||
- omap_ctrl_writew(0x0, 0x110); /* Control XCLKA output mux */
|
||||
isp_set_xclk(vdev->cam->isp, MT9T111_CLK_MIN, CAM_USE_XCLKA);
|
||||
|
||||
#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
From 00bfc925651aa2c35a1726f15c028ef106f350ab Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Thu, 24 Jun 2010 17:31:49 -0500
|
||||
Subject: [PATCH 16/75] omap3beagle: camera: Fix wrong XCLKA selection
|
||||
|
||||
The CAM_USE_XCLKA should have been 0 instead of 1.
|
||||
|
||||
Otherwise it was activating XCLKB instead!
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 1652f15..75c8345 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#define MODULE_NAME "omap3beaglelmb"
|
||||
|
||||
-#define CAM_USE_XCLKA 1
|
||||
+#define CAM_USE_XCLKA 0
|
||||
|
||||
static struct regulator *beagle_mt9t111_reg1;
|
||||
static struct regulator *beagle_mt9t111_reg2;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
From fc6044176be3518fee98430ebe36cc144d6feed2 Mon Sep 17 00:00:00 2001
|
||||
From: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
|
||||
Date: Thu, 2 Jul 2009 16:17:55 +0200
|
||||
Subject: [PATCH 17/75] omap3isp: set CAM_MCLK to 172.8 MHz, allows exact 9.6 MHz for camera xclka/b
|
||||
|
||||
Camera cam_xclka and cam_xclkb clocks are generated by dividing
|
||||
CAM_MCLK with an integer. We want to use 9.6 MHz for cameras,
|
||||
so CAM_MCLK should be multiple of it. Otherwise the generated
|
||||
frequency is slightly off due to rounding.
|
||||
|
||||
Signed-off-by: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
|
||||
---
|
||||
drivers/media/video/isp/isp.c | 14 ++++++++++++++
|
||||
drivers/media/video/isp/isp.h | 1 +
|
||||
drivers/media/video/isp/ispreg.h | 2 +-
|
||||
3 files changed, 16 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c
|
||||
index ceed870..9d46c01 100644
|
||||
--- a/drivers/media/video/isp/isp.c
|
||||
+++ b/drivers/media/video/isp/isp.c
|
||||
@@ -2333,6 +2333,11 @@ static int isp_enable_clocks(struct device *dev)
|
||||
dev_err(dev, "clk_enable cam_ick failed\n");
|
||||
goto out_clk_enable_ick;
|
||||
}
|
||||
+ r = clk_set_rate(isp->dpll4_m5_ck, CM_CAM_MCLK_HZ/2);
|
||||
+ if (r) {
|
||||
+ dev_err(dev, "clk_set_rate for dpll4_m5_ck failed\n");
|
||||
+ goto out_clk_enable_mclk;
|
||||
+ }
|
||||
r = clk_enable(isp->cam_mclk);
|
||||
if (r) {
|
||||
dev_err(dev, "clk_enable cam_mclk failed\n");
|
||||
@@ -2499,6 +2504,7 @@ static int isp_remove(struct platform_device *pdev)
|
||||
|
||||
clk_put(isp->cam_ick);
|
||||
clk_put(isp->cam_mclk);
|
||||
+ clk_put(isp->dpll4_m5_ck);
|
||||
clk_put(isp->csi2_fck);
|
||||
clk_put(isp->l3_ick);
|
||||
|
||||
@@ -2674,6 +2680,12 @@ static int isp_probe(struct platform_device *pdev)
|
||||
ret_err = PTR_ERR(isp->cam_mclk);
|
||||
goto out_clk_get_mclk;
|
||||
}
|
||||
+ isp->dpll4_m5_ck = clk_get(&camera_dev, "dpll4_m5_ck");
|
||||
+ if (IS_ERR(isp->dpll4_m5_ck)) {
|
||||
+ dev_err(isp->dev, "clk_get dpll4_m5_ck failed\n");
|
||||
+ ret_err = PTR_ERR(isp->dpll4_m5_ck);
|
||||
+ goto out_clk_get_dpll4_m5_ck;
|
||||
+ }
|
||||
isp->csi2_fck = clk_get(&camera_dev, "csi2_96m_fck");
|
||||
if (IS_ERR(isp->csi2_fck)) {
|
||||
dev_err(isp->dev, "clk_get csi2_96m_fck failed\n");
|
||||
@@ -2734,6 +2746,8 @@ out_request_irq:
|
||||
out_clk_get_l3_ick:
|
||||
clk_put(isp->csi2_fck);
|
||||
out_clk_get_csi2_fclk:
|
||||
+ clk_put(isp->dpll4_m5_ck);
|
||||
+out_clk_get_dpll4_m5_ck:
|
||||
clk_put(isp->cam_mclk);
|
||||
out_clk_get_mclk:
|
||||
clk_put(isp->cam_ick);
|
||||
diff --git a/drivers/media/video/isp/isp.h b/drivers/media/video/isp/isp.h
|
||||
index dc85d61..6b100b6 100644
|
||||
--- a/drivers/media/video/isp/isp.h
|
||||
+++ b/drivers/media/video/isp/isp.h
|
||||
@@ -414,6 +414,7 @@ struct isp_device {
|
||||
int ref_count;
|
||||
struct clk *cam_ick;
|
||||
struct clk *cam_mclk;
|
||||
+ struct clk *dpll4_m5_ck;
|
||||
struct clk *csi2_fck;
|
||||
struct clk *l3_ick;
|
||||
struct isp_interface_config *config;
|
||||
diff --git a/drivers/media/video/isp/ispreg.h b/drivers/media/video/isp/ispreg.h
|
||||
index 676a33d..1240e0e 100644
|
||||
--- a/drivers/media/video/isp/ispreg.h
|
||||
+++ b/drivers/media/video/isp/ispreg.h
|
||||
@@ -116,7 +116,7 @@
|
||||
#define ISP_32B_BOUNDARY_BUF 0xFFFFFFE0
|
||||
#define ISP_32B_BOUNDARY_OFFSET 0x0000FFE0
|
||||
|
||||
-#define CM_CAM_MCLK_HZ 216000000
|
||||
+#define CM_CAM_MCLK_HZ 172800000 /* Hz */
|
||||
|
||||
/* ISP Submodules offset */
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-209
@@ -1,209 +0,0 @@
|
||||
From 6e9a8ed420020b5692b511b3e8a7c2c1325e1ca2 Mon Sep 17 00:00:00 2001
|
||||
From: Penda, Naveen <pnaveen@ti.com>
|
||||
Date: Thu, 22 Oct 2009 06:07:01 +0530
|
||||
Subject: [PATCH 18/75] Fix: Moved MCLK setting to the board file
|
||||
|
||||
This patch provides the flexibility to set the MCLK frequency
|
||||
from the board file
|
||||
|
||||
Signed-off-by: Naveen Penda <pnaveen@ti.com>
|
||||
Signed-off-by: Curran, Dominic <dcurran@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-zoom2-camera.c | 10 ++++++
|
||||
drivers/media/video/isp/isp.c | 51 +++++++++++++++++++----------
|
||||
drivers/media/video/isp/isp.h | 6 +++
|
||||
3 files changed, 49 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-zoom2-camera.c b/arch/arm/mach-omap2/board-zoom2-camera.c
|
||||
index 1ba2982..8c035c4 100644
|
||||
--- a/arch/arm/mach-omap2/board-zoom2-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-zoom2-camera.c
|
||||
@@ -41,6 +41,8 @@ static struct device *zoom2cam_dev;
|
||||
|
||||
#define CAMZOOM2_USE_XCLKB 1
|
||||
|
||||
+#define ISP_IMX046_MCLK 216000000
|
||||
+
|
||||
/* Sensor specific GPIO signals */
|
||||
#define IMX046_RESET_GPIO 98
|
||||
#define IMX046_STANDBY_GPIO 58
|
||||
@@ -148,6 +150,7 @@ static struct isp_interface_config imx046_if_config = {
|
||||
.shutter = 0x0,
|
||||
.wenlog = ISPCCDC_CFG_WENLOG_AND,
|
||||
.wait_hs_vs = 2,
|
||||
+ .cam_mclk = ISP_IMX046_MCLK,
|
||||
.u.csi.crc = 0x0,
|
||||
.u.csi.mode = 0x0,
|
||||
.u.csi.edge = 0x0,
|
||||
@@ -264,6 +267,8 @@ static int imx046_sensor_power_set(struct v4l2_int_device *s, enum v4l2_power po
|
||||
#ifdef CONFIG_OMAP_PM_SRF
|
||||
omap_pm_set_min_bus_tput(vdev->cam->isp, OCP_INITIATOR_AGENT, 0);
|
||||
#endif
|
||||
+ if (previous_power != V4L2_POWER_OFF)
|
||||
+ isp_disable_mclk(isp);
|
||||
break;
|
||||
case V4L2_POWER_STANDBY:
|
||||
printk(KERN_DEBUG "imx046_sensor_power_set(STANDBY)\n");
|
||||
@@ -272,9 +277,14 @@ static int imx046_sensor_power_set(struct v4l2_int_device *s, enum v4l2_power po
|
||||
#ifdef CONFIG_OMAP_PM_SRF
|
||||
omap_pm_set_min_bus_tput(vdev->cam->isp, OCP_INITIATOR_AGENT, 0);
|
||||
#endif
|
||||
+
|
||||
+
|
||||
+ isp_disable_mclk(isp);
|
||||
+
|
||||
break;
|
||||
}
|
||||
|
||||
+
|
||||
/* Save powerstate to know what was before calling POWER_ON. */
|
||||
previous_power = power;
|
||||
return err;
|
||||
diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c
|
||||
index 9d46c01..cf68720 100644
|
||||
--- a/drivers/media/video/isp/isp.c
|
||||
+++ b/drivers/media/video/isp/isp.c
|
||||
@@ -552,7 +552,7 @@ EXPORT_SYMBOL(isp_unset_callback);
|
||||
* Configures the specified MCLK divisor in the ISP timing control register
|
||||
* (TCTRL_CTRL) to generate the desired xclk clock value.
|
||||
*
|
||||
- * Divisor = CM_CAM_MCLK_HZ / xclk
|
||||
+ * Divisor = mclk / xclk
|
||||
*
|
||||
* Returns the final frequency that is actually being generated
|
||||
**/
|
||||
@@ -560,15 +560,16 @@ u32 isp_set_xclk(struct device *dev, u32 xclk, u8 xclksel)
|
||||
{
|
||||
u32 divisor;
|
||||
u32 currentxclk;
|
||||
+ struct isp_device *isp = dev_get_drvdata(dev);
|
||||
|
||||
- if (xclk >= CM_CAM_MCLK_HZ) {
|
||||
+ if (xclk >= isp->mclk) {
|
||||
divisor = ISPTCTRL_CTRL_DIV_BYPASS;
|
||||
- currentxclk = CM_CAM_MCLK_HZ;
|
||||
+ currentxclk = isp->mclk;
|
||||
} else if (xclk >= 2) {
|
||||
- divisor = CM_CAM_MCLK_HZ / xclk;
|
||||
+ divisor = isp->mclk / xclk;
|
||||
if (divisor >= ISPTCTRL_CTRL_DIV_BYPASS)
|
||||
divisor = ISPTCTRL_CTRL_DIV_BYPASS - 1;
|
||||
- currentxclk = CM_CAM_MCLK_HZ / divisor;
|
||||
+ currentxclk = isp->mclk / divisor;
|
||||
} else {
|
||||
divisor = xclk;
|
||||
currentxclk = 0;
|
||||
@@ -874,6 +875,8 @@ int isp_configure_interface(struct device *dev,
|
||||
/* Set sensor specific fields in CCDC and Previewer module. */
|
||||
ispccdc_set_wenlog(&isp->isp_ccdc, config->wenlog);
|
||||
|
||||
+ isp->mclk = config->cam_mclk;
|
||||
+ isp_enable_mclk(dev);
|
||||
/* FIXME: this should be set in ispccdc_config_vp() */
|
||||
fmtcfg = isp_reg_readl(dev, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG);
|
||||
fmtcfg &= ISPCCDC_FMTCFG_VPIF_FRQ_MASK;
|
||||
@@ -2333,16 +2336,6 @@ static int isp_enable_clocks(struct device *dev)
|
||||
dev_err(dev, "clk_enable cam_ick failed\n");
|
||||
goto out_clk_enable_ick;
|
||||
}
|
||||
- r = clk_set_rate(isp->dpll4_m5_ck, CM_CAM_MCLK_HZ/2);
|
||||
- if (r) {
|
||||
- dev_err(dev, "clk_set_rate for dpll4_m5_ck failed\n");
|
||||
- goto out_clk_enable_mclk;
|
||||
- }
|
||||
- r = clk_enable(isp->cam_mclk);
|
||||
- if (r) {
|
||||
- dev_err(dev, "clk_enable cam_mclk failed\n");
|
||||
- goto out_clk_enable_mclk;
|
||||
- }
|
||||
r = clk_enable(isp->csi2_fck);
|
||||
if (r) {
|
||||
dev_err(dev, "clk_enable csi2_fck failed\n");
|
||||
@@ -2351,13 +2344,34 @@ static int isp_enable_clocks(struct device *dev)
|
||||
return 0;
|
||||
|
||||
out_clk_enable_csi2_fclk:
|
||||
- clk_disable(isp->cam_mclk);
|
||||
-out_clk_enable_mclk:
|
||||
clk_disable(isp->cam_ick);
|
||||
out_clk_enable_ick:
|
||||
return r;
|
||||
}
|
||||
|
||||
+int isp_enable_mclk(struct device *dev)
|
||||
+{
|
||||
+ struct isp_device *isp = dev_get_drvdata(dev);
|
||||
+ int r;
|
||||
+
|
||||
+ r = clk_set_rate(isp->dpll4_m5_ck, isp->mclk);
|
||||
+ if (r) {
|
||||
+ dev_err(dev, "clk_set_rate for dpll4_m5_ck failed\n");
|
||||
+ return r;
|
||||
+ }
|
||||
+ r = clk_enable(isp->cam_mclk);
|
||||
+ if (r) {
|
||||
+ dev_err(dev, "clk_enable cam_mclk failed\n");
|
||||
+ return r;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void isp_disable_mclk(struct isp_device *isp)
|
||||
+{
|
||||
+ clk_disable(isp->cam_mclk);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* isp_disable_clocks - Disable ISP clocks
|
||||
* @dev: Device pointer specific to the OMAP3 ISP.
|
||||
@@ -2367,7 +2381,6 @@ static void isp_disable_clocks(struct device *dev)
|
||||
struct isp_device *isp = dev_get_drvdata(dev);
|
||||
|
||||
clk_disable(isp->cam_ick);
|
||||
- clk_disable(isp->cam_mclk);
|
||||
clk_disable(isp->csi2_fck);
|
||||
}
|
||||
|
||||
@@ -2668,6 +2681,8 @@ static int isp_probe(struct platform_device *pdev)
|
||||
goto out_free_mmio;
|
||||
}
|
||||
|
||||
+ isp->mclk = CM_CAM_MCLK_HZ / 2;
|
||||
+
|
||||
isp->cam_ick = clk_get(&camera_dev, "cam_ick");
|
||||
if (IS_ERR(isp->cam_ick)) {
|
||||
dev_err(isp->dev, "clk_get cam_ick failed\n");
|
||||
diff --git a/drivers/media/video/isp/isp.h b/drivers/media/video/isp/isp.h
|
||||
index 6b100b6..85c3fa9 100644
|
||||
--- a/drivers/media/video/isp/isp.h
|
||||
+++ b/drivers/media/video/isp/isp.h
|
||||
@@ -199,6 +199,7 @@ struct isp_interface_config {
|
||||
u32 prev_slv;
|
||||
u32 wenlog;
|
||||
int wait_hs_vs;
|
||||
+ u32 cam_mclk;
|
||||
unsigned int pixelclk;
|
||||
union {
|
||||
struct par {
|
||||
@@ -425,6 +426,7 @@ struct isp_device {
|
||||
struct isp_irq irq;
|
||||
struct isp_pipeline pipeline;
|
||||
u32 interrupts;
|
||||
+ u32 mclk;
|
||||
enum isp_running running;
|
||||
int current_field;
|
||||
int bt656ifen;
|
||||
@@ -489,6 +491,10 @@ struct device *isp_get(void);
|
||||
|
||||
int isp_put(void);
|
||||
|
||||
+int isp_enable_mclk(struct device *dev);
|
||||
+
|
||||
+void isp_disable_mclk(struct isp_device *dev);
|
||||
+
|
||||
int isp_queryctrl(struct v4l2_queryctrl *a);
|
||||
|
||||
int isp_querymenu(struct v4l2_querymenu *a);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
From 97761e2bdf286662e3c96f5a24fe568cac98fc9b Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Wed, 25 Nov 2009 12:30:46 -0600
|
||||
Subject: [PATCH 19/75] omap3isp: core: Do smarter MCLK setting
|
||||
|
||||
Since the ratio between MCLK and DPLL4_M5 could not be 1:1
|
||||
(i.e. on 3430 its 2:1), it's necessary to check ratio
|
||||
between those 2 first.
|
||||
|
||||
This should make MCLK setting more adequate to different
|
||||
chipsets.
|
||||
|
||||
Tested on Zoom2 (3430 ES3.1)
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
drivers/media/video/isp/isp.c | 13 ++++++++++++-
|
||||
1 files changed, 12 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c
|
||||
index cf68720..29dd005 100644
|
||||
--- a/drivers/media/video/isp/isp.c
|
||||
+++ b/drivers/media/video/isp/isp.c
|
||||
@@ -2353,8 +2353,19 @@ int isp_enable_mclk(struct device *dev)
|
||||
{
|
||||
struct isp_device *isp = dev_get_drvdata(dev);
|
||||
int r;
|
||||
+ unsigned long curr_mclk, curr_dpll4_m5, ratio;
|
||||
|
||||
- r = clk_set_rate(isp->dpll4_m5_ck, isp->mclk);
|
||||
+ /* Check ratio between DPLL4_M5 and CAM_MCLK */
|
||||
+ curr_mclk = clk_get_rate(isp->cam_mclk);
|
||||
+ curr_dpll4_m5 = clk_get_rate(isp->dpll4_m5_ck);
|
||||
+
|
||||
+ /* Protection for potential Zero division, or zero-ratio result */
|
||||
+ if (!curr_mclk || !curr_dpll4_m5)
|
||||
+ BUG();
|
||||
+
|
||||
+ ratio = curr_mclk / curr_dpll4_m5;
|
||||
+
|
||||
+ r = clk_set_rate(isp->dpll4_m5_ck, isp->mclk / ratio);
|
||||
if (r) {
|
||||
dev_err(dev, "clk_set_rate for dpll4_m5_ck failed\n");
|
||||
return r;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
From b744cbb89e3dd00a3f12d349ec0be604dffb5776 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Thu, 24 Jun 2010 16:34:13 -0500
|
||||
Subject: [PATCH 20/75] omap3beagle: camera: set mclk for mt9t111
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 75c8345..529a6be 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -49,6 +49,8 @@
|
||||
|
||||
#define CAM_USE_XCLKA 0
|
||||
|
||||
+#define ISP_MT9T111_MCLK 216000000
|
||||
+
|
||||
static struct regulator *beagle_mt9t111_reg1;
|
||||
static struct regulator *beagle_mt9t111_reg2;
|
||||
|
||||
@@ -60,6 +62,9 @@ static struct isp_interface_config mt9t111_if_config = {
|
||||
.strobe = 0x0,
|
||||
.prestrobe = 0x0,
|
||||
.shutter = 0x0,
|
||||
+ .cam_mclk = ISP_MT9T111_MCLK,
|
||||
+ .wenlog = ISPCCDC_CFG_WENLOG_AND,
|
||||
+ .wait_hs_vs = 2,
|
||||
.u.par.par_bridge = 0x1,
|
||||
.u.par.par_clk_pol = 0x0,
|
||||
};
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
From 3bca76ae1008ba2b2788214a59fd7813c69f9254 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Thu, 24 Jun 2010 17:43:23 -0500
|
||||
Subject: [PATCH 21/75] mt9t111: Fix max supported xclk
|
||||
|
||||
According to Aptina documentation, the max should be 54 MHz, not 75 MHz.
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
include/media/mt9t111.h | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/include/media/mt9t111.h b/include/media/mt9t111.h
|
||||
index aae3f99..cd34885 100644
|
||||
--- a/include/media/mt9t111.h
|
||||
+++ b/include/media/mt9t111.h
|
||||
@@ -42,7 +42,7 @@
|
||||
/*i2c adress for MT9T111*/
|
||||
#define MT9T111_I2C_ADDR (0x78 >> 1)
|
||||
|
||||
-#define MT9T111_CLK_MAX (75000000) /* 75MHz */
|
||||
+#define MT9T111_CLK_MAX (54000000) /* 54MHz */
|
||||
#define MT9T111_CLK_MIN (6000000) /* 6Mhz */
|
||||
|
||||
#define MT9T111_I2C_CONFIG (1)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
From db7e3a7af04196e80fe15e2a651440575f9313af Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Thu, 24 Jun 2010 17:53:55 -0500
|
||||
Subject: [PATCH 22/75] omap3beagle: camera: Clarify regulators names
|
||||
|
||||
Changed:
|
||||
- beagle_mt9t111_reg1 -> beagle_mt9t111_1_8v
|
||||
- beagle_mt9t111_reg2 -> beagle_mt9t111_2_8v
|
||||
|
||||
To help clarify sequence.
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 42 ++++++++++++------------
|
||||
1 files changed, 21 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 529a6be..6babaf3 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
#define ISP_MT9T111_MCLK 216000000
|
||||
|
||||
-static struct regulator *beagle_mt9t111_reg1;
|
||||
-static struct regulator *beagle_mt9t111_reg2;
|
||||
+static struct regulator *beagle_mt9t111_1_8v;
|
||||
+static struct regulator *beagle_mt9t111_2_8v;
|
||||
|
||||
#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
static struct isp_interface_config mt9t111_if_config = {
|
||||
@@ -167,10 +167,10 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
case V4L2_POWER_STANDBY:
|
||||
isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA);
|
||||
|
||||
- if (regulator_is_enabled(beagle_mt9t111_reg1))
|
||||
- regulator_disable(beagle_mt9t111_reg1);
|
||||
- if (regulator_is_enabled(beagle_mt9t111_reg2))
|
||||
- regulator_disable(beagle_mt9t111_reg2);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_1_8v))
|
||||
+ regulator_disable(beagle_mt9t111_1_8v);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_2_8v))
|
||||
+ regulator_disable(beagle_mt9t111_2_8v);
|
||||
break;
|
||||
|
||||
case V4L2_POWER_ON:
|
||||
@@ -181,8 +181,8 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
#endif
|
||||
|
||||
/* turn on analog power */
|
||||
- regulator_enable(beagle_mt9t111_reg1);
|
||||
- regulator_enable(beagle_mt9t111_reg2);
|
||||
+ regulator_enable(beagle_mt9t111_1_8v);
|
||||
+ regulator_enable(beagle_mt9t111_2_8v);
|
||||
udelay(100);
|
||||
|
||||
break;
|
||||
@@ -212,16 +212,16 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
{
|
||||
int err;
|
||||
|
||||
- beagle_mt9t111_reg1 = regulator_get(&pdev->dev, "vaux3_1");
|
||||
- if (IS_ERR(beagle_mt9t111_reg1)) {
|
||||
+ beagle_mt9t111_1_8v = regulator_get(&pdev->dev, "vaux3_1");
|
||||
+ if (IS_ERR(beagle_mt9t111_1_8v)) {
|
||||
dev_err(&pdev->dev, "vaux3_1 regulator missing\n");
|
||||
- return PTR_ERR(beagle_mt9t111_reg1);
|
||||
+ return PTR_ERR(beagle_mt9t111_1_8v);
|
||||
}
|
||||
- beagle_mt9t111_reg2 = regulator_get(&pdev->dev, "vaux4_1");
|
||||
- if (IS_ERR(beagle_mt9t111_reg2)) {
|
||||
+ beagle_mt9t111_2_8v = regulator_get(&pdev->dev, "vaux4_1");
|
||||
+ if (IS_ERR(beagle_mt9t111_2_8v)) {
|
||||
dev_err(&pdev->dev, "vaux4_1 regulator missing\n");
|
||||
- regulator_put(beagle_mt9t111_reg1);
|
||||
- return PTR_ERR(beagle_mt9t111_reg2);
|
||||
+ regulator_put(beagle_mt9t111_1_8v);
|
||||
+ return PTR_ERR(beagle_mt9t111_2_8v);
|
||||
}
|
||||
|
||||
printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");
|
||||
@@ -231,12 +231,12 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
|
||||
static int beagle_cam_remove(struct platform_device *pdev)
|
||||
{
|
||||
- if (regulator_is_enabled(beagle_mt9t111_reg1))
|
||||
- regulator_disable(beagle_mt9t111_reg1);
|
||||
- regulator_put(beagle_mt9t111_reg1);
|
||||
- if (regulator_is_enabled(beagle_mt9t111_reg2))
|
||||
- regulator_disable(beagle_mt9t111_reg2);
|
||||
- regulator_put(beagle_mt9t111_reg2);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_1_8v))
|
||||
+ regulator_disable(beagle_mt9t111_1_8v);
|
||||
+ regulator_put(beagle_mt9t111_1_8v);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_2_8v))
|
||||
+ regulator_disable(beagle_mt9t111_2_8v);
|
||||
+ regulator_put(beagle_mt9t111_2_8v);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
From e4f2c3641ccae2cb1614c8fda5ce307170b20921 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Thu, 24 Jun 2010 18:21:52 -0500
|
||||
Subject: [PATCH 23/75] omap3beagle: camera: Fix powerup sequence
|
||||
|
||||
The powerup sequence was very incomplete. After revisiting the
|
||||
Aptina developer's guide, the resulting powerup sequence is followed.
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 49 ++++++++++++++++++++++--
|
||||
1 files changed, 45 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 6babaf3..792c48d 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -51,6 +51,8 @@
|
||||
|
||||
#define ISP_MT9T111_MCLK 216000000
|
||||
|
||||
+#define LEOPARD_RESET_GPIO 98
|
||||
+
|
||||
static struct regulator *beagle_mt9t111_1_8v;
|
||||
static struct regulator *beagle_mt9t111_2_8v;
|
||||
|
||||
@@ -174,16 +176,42 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
break;
|
||||
|
||||
case V4L2_POWER_ON:
|
||||
- isp_set_xclk(vdev->cam->isp, MT9T111_CLK_MIN, CAM_USE_XCLKA);
|
||||
-
|
||||
#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
||||
isp_configure_interface(vdev->cam->isp, &mt9t111_if_config);
|
||||
#endif
|
||||
|
||||
- /* turn on analog power */
|
||||
+ /* Set RESET_BAR to 0 */
|
||||
+ gpio_set_value(LEOPARD_RESET_GPIO, 0);
|
||||
+
|
||||
+ /* turn on VDD */
|
||||
regulator_enable(beagle_mt9t111_1_8v);
|
||||
+
|
||||
+ mdelay(1);
|
||||
+
|
||||
+ /* turn on VDD_IO */
|
||||
regulator_enable(beagle_mt9t111_2_8v);
|
||||
- udelay(100);
|
||||
+
|
||||
+ mdelay(50);
|
||||
+
|
||||
+ /* Enable EXTCLK */
|
||||
+ isp_set_xclk(vdev->cam->isp, MT9T111_CLK_MIN, CAM_USE_XCLKA);
|
||||
+
|
||||
+ /*
|
||||
+ * Wait at least 70 CLK cycles (w/EXTCLK = 6MHz, or CLK_MIN):
|
||||
+ * ((1000000 * 70) / 6000000) = aprox 12 us.
|
||||
+ */
|
||||
+
|
||||
+ udelay(12);
|
||||
+
|
||||
+ /* Set RESET_BAR to 1 */
|
||||
+ gpio_set_value(LEOPARD_RESET_GPIO, 1);
|
||||
+
|
||||
+ /*
|
||||
+ * Wait at least 100 CLK cycles (w/EXTCLK = 6MHz, or CLK_MIN):
|
||||
+ * ((1000000 * 100) / 6000000) = aprox 17 us.
|
||||
+ */
|
||||
+
|
||||
+ udelay(17);
|
||||
|
||||
break;
|
||||
|
||||
@@ -224,6 +252,17 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(beagle_mt9t111_2_8v);
|
||||
}
|
||||
|
||||
+ if (gpio_request(LEOPARD_RESET_GPIO, "cam_rst") != 0) {
|
||||
+ dev_err(&pdev->dev, "Could not request GPIO %d",
|
||||
+ LEOPARD_RESET_GPIO);
|
||||
+ regulator_put(beagle_mt9t111_2_8v);
|
||||
+ regulator_put(beagle_mt9t111_1_8v);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ /* set to output mode, default value 0 */
|
||||
+ gpio_direction_output(LEOPARD_RESET_GPIO, 0);
|
||||
+
|
||||
printk(KERN_INFO MODULE_NAME ": Driver registration complete \n");
|
||||
|
||||
return 0;
|
||||
@@ -238,6 +277,8 @@ static int beagle_cam_remove(struct platform_device *pdev)
|
||||
regulator_disable(beagle_mt9t111_2_8v);
|
||||
regulator_put(beagle_mt9t111_2_8v);
|
||||
|
||||
+ gpio_free(LEOPARD_RESET_GPIO);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
From 9f31f599f847c7eab995d22a683c8b32aaa5be7f Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 25 Jun 2010 11:24:07 -0500
|
||||
Subject: [PATCH 24/75] omap3beagle: camera: Change vaux4 to 1.8v
|
||||
|
||||
Both voltage sources seem to need 1.8v.
|
||||
|
||||
After this, sensor is detected :)
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 1e9a868..af9b818 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -446,8 +446,8 @@ static struct regulator_init_data beagle_vaux3 = {
|
||||
/* VAUX4 for CAM_2V8 */
|
||||
static struct regulator_init_data beagle_vaux4 = {
|
||||
.constraints = {
|
||||
- .min_uV = 2800000,
|
||||
- .max_uV = 2800000,
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
.apply_uV = true,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
From 784407ada9241d907cf08145885410351a7eafc4 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 25 Jun 2010 12:03:59 -0500
|
||||
Subject: [PATCH 25/75] omap3beagle: camera: Rename regulators to match actual voltage levels
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 46 ++++++++++++------------
|
||||
1 files changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 792c48d..8a4b7bc 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
#define LEOPARD_RESET_GPIO 98
|
||||
|
||||
-static struct regulator *beagle_mt9t111_1_8v;
|
||||
-static struct regulator *beagle_mt9t111_2_8v;
|
||||
+static struct regulator *beagle_mt9t111_1_8v1;
|
||||
+static struct regulator *beagle_mt9t111_1_8v2;
|
||||
|
||||
#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
static struct isp_interface_config mt9t111_if_config = {
|
||||
@@ -169,10 +169,10 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
case V4L2_POWER_STANDBY:
|
||||
isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA);
|
||||
|
||||
- if (regulator_is_enabled(beagle_mt9t111_1_8v))
|
||||
- regulator_disable(beagle_mt9t111_1_8v);
|
||||
- if (regulator_is_enabled(beagle_mt9t111_2_8v))
|
||||
- regulator_disable(beagle_mt9t111_2_8v);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_1_8v1))
|
||||
+ regulator_disable(beagle_mt9t111_1_8v1);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_1_8v2))
|
||||
+ regulator_disable(beagle_mt9t111_1_8v2);
|
||||
break;
|
||||
|
||||
case V4L2_POWER_ON:
|
||||
@@ -184,12 +184,12 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
|
||||
gpio_set_value(LEOPARD_RESET_GPIO, 0);
|
||||
|
||||
/* turn on VDD */
|
||||
- regulator_enable(beagle_mt9t111_1_8v);
|
||||
+ regulator_enable(beagle_mt9t111_1_8v1);
|
||||
|
||||
mdelay(1);
|
||||
|
||||
/* turn on VDD_IO */
|
||||
- regulator_enable(beagle_mt9t111_2_8v);
|
||||
+ regulator_enable(beagle_mt9t111_1_8v2);
|
||||
|
||||
mdelay(50);
|
||||
|
||||
@@ -240,23 +240,23 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
{
|
||||
int err;
|
||||
|
||||
- beagle_mt9t111_1_8v = regulator_get(&pdev->dev, "vaux3_1");
|
||||
- if (IS_ERR(beagle_mt9t111_1_8v)) {
|
||||
+ beagle_mt9t111_1_8v1 = regulator_get(&pdev->dev, "vaux3_1");
|
||||
+ if (IS_ERR(beagle_mt9t111_1_8v1)) {
|
||||
dev_err(&pdev->dev, "vaux3_1 regulator missing\n");
|
||||
- return PTR_ERR(beagle_mt9t111_1_8v);
|
||||
+ return PTR_ERR(beagle_mt9t111_1_8v1);
|
||||
}
|
||||
- beagle_mt9t111_2_8v = regulator_get(&pdev->dev, "vaux4_1");
|
||||
- if (IS_ERR(beagle_mt9t111_2_8v)) {
|
||||
+ beagle_mt9t111_1_8v2 = regulator_get(&pdev->dev, "vaux4_1");
|
||||
+ if (IS_ERR(beagle_mt9t111_1_8v2)) {
|
||||
dev_err(&pdev->dev, "vaux4_1 regulator missing\n");
|
||||
- regulator_put(beagle_mt9t111_1_8v);
|
||||
- return PTR_ERR(beagle_mt9t111_2_8v);
|
||||
+ regulator_put(beagle_mt9t111_1_8v1);
|
||||
+ return PTR_ERR(beagle_mt9t111_1_8v2);
|
||||
}
|
||||
|
||||
if (gpio_request(LEOPARD_RESET_GPIO, "cam_rst") != 0) {
|
||||
dev_err(&pdev->dev, "Could not request GPIO %d",
|
||||
LEOPARD_RESET_GPIO);
|
||||
- regulator_put(beagle_mt9t111_2_8v);
|
||||
- regulator_put(beagle_mt9t111_1_8v);
|
||||
+ regulator_put(beagle_mt9t111_1_8v2);
|
||||
+ regulator_put(beagle_mt9t111_1_8v1);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -270,12 +270,12 @@ static int beagle_cam_probe(struct platform_device *pdev)
|
||||
|
||||
static int beagle_cam_remove(struct platform_device *pdev)
|
||||
{
|
||||
- if (regulator_is_enabled(beagle_mt9t111_1_8v))
|
||||
- regulator_disable(beagle_mt9t111_1_8v);
|
||||
- regulator_put(beagle_mt9t111_1_8v);
|
||||
- if (regulator_is_enabled(beagle_mt9t111_2_8v))
|
||||
- regulator_disable(beagle_mt9t111_2_8v);
|
||||
- regulator_put(beagle_mt9t111_2_8v);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_1_8v1))
|
||||
+ regulator_disable(beagle_mt9t111_1_8v1);
|
||||
+ regulator_put(beagle_mt9t111_1_8v1);
|
||||
+ if (regulator_is_enabled(beagle_mt9t111_1_8v2))
|
||||
+ regulator_disable(beagle_mt9t111_1_8v2);
|
||||
+ regulator_put(beagle_mt9t111_1_8v2);
|
||||
|
||||
gpio_free(LEOPARD_RESET_GPIO);
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
From e14b36353ea3f3d55192cf986310c275ed8cfcc9 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 25 Jun 2010 12:04:48 -0500
|
||||
Subject: [PATCH 26/75] omap3beagle: camera: Complement remainig sensor hw config settings
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 6 ++++++
|
||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 8a4b7bc..b0148d6 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -57,6 +57,10 @@ static struct regulator *beagle_mt9t111_1_8v1;
|
||||
static struct regulator *beagle_mt9t111_1_8v2;
|
||||
|
||||
#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
|
||||
+
|
||||
+/* Arbitrary memory handling limit */
|
||||
+#define MT9T111_BIGGEST_FRAME_BYTE_SIZE PAGE_ALIGN(2048 * 1536 * 4)
|
||||
+
|
||||
static struct isp_interface_config mt9t111_if_config = {
|
||||
.ccdc_par_ser = ISP_PARLL,
|
||||
.dataline_shift = 0x0,
|
||||
@@ -125,6 +129,8 @@ static struct omap34xxcam_hw_config mt9t111_hwc = {
|
||||
.dev_minor = 0,
|
||||
.dev_type = OMAP34XXCAM_SLAVE_SENSOR,
|
||||
.u.sensor.sensor_isp = 1,
|
||||
+ .u.sensor.capture_mem = MT9T111_BIGGEST_FRAME_BYTE_SIZE * 2,
|
||||
+ .u.sensor.ival_default = { 1, 10 },
|
||||
};
|
||||
#endif
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
From db54f40408b0907a6cf314232bbf2b9f12ac0d9d Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 25 Jun 2010 13:43:54 -0500
|
||||
Subject: [PATCH 27/75] mt9t111: Fix detect function retval and cleanup prints
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
drivers/media/video/mt9t111.c | 8 +++-----
|
||||
1 files changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c
|
||||
index 6a7b2c0..08122ff 100644
|
||||
--- a/drivers/media/video/mt9t111.c
|
||||
+++ b/drivers/media/video/mt9t111.c
|
||||
@@ -221,7 +221,6 @@ mt9t111_detect(struct i2c_client *client)
|
||||
/* chip ID is at address 0 */
|
||||
if (mt9t111_read_reg(client, MT9T111_CHIP_ID, &val) < 0)
|
||||
return -ENODEV;
|
||||
- dev_info(&client->dev, "model id detected 0x%x\n", val);
|
||||
|
||||
if (val != MT9T111_CHIP_ID_VALUE) {
|
||||
dev_warn(&client->dev, "model id mismatch received 0x%x"
|
||||
@@ -231,7 +230,7 @@ mt9t111_detect(struct i2c_client *client)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- return 0;
|
||||
+ return (int)val;
|
||||
|
||||
}
|
||||
|
||||
@@ -390,11 +389,10 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
|
||||
sensor->state = SENSOR_NOT_DETECTED;
|
||||
return rval;
|
||||
}
|
||||
- mt9t111_loaddefault(c);
|
||||
+ dev_info(&c->dev, "chip version 0x%02x detected\n", rval);
|
||||
sensor->state = SENSOR_DETECTED;
|
||||
sensor->ver = rval;
|
||||
- pr_info("mt9t111" " chip version 0x%02x detected\n",
|
||||
- sensor->ver);
|
||||
+ mt9t111_loaddefault(c);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
From 9d152df885cb6f6874259d93df558e649f62774f Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 25 Jun 2010 16:01:00 -0500
|
||||
Subject: [PATCH 28/75] omap3beagle: camera: Set padconf settings in cam init
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 35 ++++++++++++++++++++++++
|
||||
1 files changed, 35 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index b0148d6..75471f2 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
+#include <plat/control.h>
|
||||
|
||||
#include <media/v4l2-int-device.h>
|
||||
#include <media/mt9t111.h>
|
||||
@@ -285,6 +286,40 @@ static int beagle_cam_remove(struct platform_device *pdev)
|
||||
|
||||
gpio_free(LEOPARD_RESET_GPIO);
|
||||
|
||||
+ /* MUX init */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
+ 0x10C); /* CAM_HS */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
+ 0x10E); /* CAM_VS */
|
||||
+ omap_ctrl_writew(OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
+ 0x110); /* CAM_XCLKA */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
+ 0x112); /* CAM_PCLK */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x116); /* CAM_D0 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x118); /* CAM_D1 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x11A); /* CAM_D2 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x11C); /* CAM_D3 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x11E); /* CAM_D4 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x120); /* CAM_D5 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x122); /* CAM_D6 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x124); /* CAM_D7 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x126); /* CAM_D8 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x128); /* CAM_D9 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x12A); /* CAM_D10 */
|
||||
+ omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
+ 0x12C); /* CAM_D11 */
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
From 7a8fe70470bd026b249f47c0aa37578a97fb2bb3 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sun, 27 Jun 2010 16:11:39 +0200
|
||||
Subject: [PATCH 29/75] omap3beagle: camera: only register camera driver for 36xx based SoCs
|
||||
|
||||
This is a workaround for the bootcrash when used on 35xx based beagleboards.
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
index 75471f2..8faa437 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -355,7 +355,9 @@ static struct platform_driver beagle_cam_driver = {
|
||||
*/
|
||||
int __init omap3beaglelmb_init(void)
|
||||
{
|
||||
- platform_driver_register(&beagle_cam_driver);
|
||||
- return 0;
|
||||
+ if (cpu_is_omap3630()) {
|
||||
+ platform_driver_register(&beagle_cam_driver);
|
||||
+ }
|
||||
+ return 0;
|
||||
}
|
||||
late_initcall(omap3beaglelmb_init);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
From b310c5ad504443f0d125ca92106f497e14acd8bd Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Aguirre <saaguirre@ti.com>
|
||||
Date: Fri, 25 Jun 2010 16:01:47 -0500
|
||||
Subject: [PATCH 30/75] WIP: mt9t111: Work in progress for camera enablement
|
||||
|
||||
This is changing so far:
|
||||
- Remove useless printk's in enum_frameinterval calls.
|
||||
- Call mt9t111_loaddefault instead of mt9t111_configure dummy function.
|
||||
|
||||
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
|
||||
---
|
||||
drivers/media/video/mt9t111.c | 11 +----------
|
||||
1 files changed, 1 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c
|
||||
index 08122ff..10080af 100644
|
||||
--- a/drivers/media/video/mt9t111.c
|
||||
+++ b/drivers/media/video/mt9t111.c
|
||||
@@ -288,14 +288,6 @@ static int ioctl_enum_frameintervals(struct v4l2_int_device *s,
|
||||
{
|
||||
int ifmt;
|
||||
|
||||
- printk(KERN_INFO "entering ioctl_enum_frameintervals\n");
|
||||
- printk(KERN_INFO "index = %d, pixel_format = 0x%x,"
|
||||
- " width = %d, height = %d\n",
|
||||
- frmi->index, frmi->pixel_format,
|
||||
- frmi->width, frmi->height);
|
||||
- printk(KERN_INFO "mt9t111 format = 0x%x\n",
|
||||
- mt9t111_formats[0].pixelformat);
|
||||
-
|
||||
if (frmi->index >= NUM_CAPTURE_FRAMEINTERVALS)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -379,7 +371,7 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
|
||||
}
|
||||
|
||||
if ((on == V4L2_POWER_ON) && (sensor->state == SENSOR_DETECTED))
|
||||
- mt9t111_configure(s);
|
||||
+ mt9t111_loaddefault(c);
|
||||
|
||||
if ((on == V4L2_POWER_ON) && (sensor->state == SENSOR_NOT_DETECTED)) {
|
||||
rval = mt9t111_detect(c);
|
||||
@@ -392,7 +384,6 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
|
||||
dev_info(&c->dev, "chip version 0x%02x detected\n", rval);
|
||||
sensor->state = SENSOR_DETECTED;
|
||||
sensor->ver = rval;
|
||||
- mt9t111_loaddefault(c);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user