[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-161-g8597662
Brought to you by:
sszy
|
From: Nicolas <th...@us...> - 2012-03-19 17:46:14
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 8597662cf9066ee78c13eac3a030560fc8ddab0c (commit)
via 2c7ea42ae527cd97566e63eed87bb974031393d5 (commit)
via 2f8f7600e484c2a3fc241ac09d9113127296147a (commit)
from 66cf2713e93d3a179dd126f306ca79bdc9606de9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8597662cf9066ee78c13eac3a030560fc8ddab0c
Merge: 2c7ea42 66cf271
Author: nicolas <nicolas@nicolas-Studio-1558.(none)>
Date: Mon Mar 19 18:45:27 2012 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 2c7ea42ae527cd97566e63eed87bb974031393d5
Author: nicolas <nicolas@nicolas-Studio-1558.(none)>
Date: Mon Mar 19 18:45:10 2012 +0100
[LINUX] add APF28dev USB_OTG support
commit 2f8f7600e484c2a3fc241ac09d9113127296147a
Author: nicolas <nicolas@nicolas-Studio-1558.(none)>
Date: Mon Mar 19 09:08:35 2012 +0100
[U-BOOT] fix partition sizes of APF28
-----------------------------------------------------------------------
Summary of changes:
...1-armadeus-add_apf28dev_baseboard_support.patch | 10 ++-
.../452-armadeus-mxs-fixes_freescale_bsp.patch | 93 ++++++++++++++++++++
2 files changed, 102 insertions(+), 1 deletions(-)
diff --git a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
index 331017e..3bc0ee7 100644
--- a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
+++ b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
@@ -45,7 +45,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c 2012-02-15 15:51:09.000000000 +0100
-@@ -0,0 +1,313 @@
+@@ -0,0 +1,321 @@
+/*
+ * Copyright (C) 2012 Armadeus systems
+ *
@@ -98,6 +98,14 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ .data = 0,
+ .output = 1,
+ },
++ /* USB OTG ID */
++ {
++ .name = "USB_ID",
++ .id = PINID_PWM2,
++ .fun = PIN_GPIO,
++ .data = 0,
++ .output = 0,
++ },
+#if defined(CONFIG_FB_MXS) || defined(CONFIG_FB_MXS_MODULE)
+ {
+ .name = "LCD_D00",
diff --git a/patches/linux/2.6.35/452-armadeus-mxs-fixes_freescale_bsp.patch b/patches/linux/2.6.35/452-armadeus-mxs-fixes_freescale_bsp.patch
index 9be0eb6..d286f8f 100644
--- a/patches/linux/2.6.35/452-armadeus-mxs-fixes_freescale_bsp.patch
+++ b/patches/linux/2.6.35/452-armadeus-mxs-fixes_freescale_bsp.patch
@@ -76,3 +76,96 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
+MODULE_DESCRIPTION("MXS input touchscreen driver");
+MODULE_AUTHOR("Vitaly Wool <vi...@em...>");
+MODULE_LICENSE("GPL v2");
+Index: linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
+===================================================================
+--- linux-2.6.35.3.orig/arch/arm/mach-mx28/usb_dr.c 2012-02-03 12:57:41.000000000 +0100
++++ linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c 2012-02-03 12:57:55.000000000 +0100
+@@ -29,11 +29,19 @@
+ #include <mach/arc_otg.h>
+ #include "usb.h"
+ #include "mx28_pins.h"
++
++#if defined(CONFIG_MACH_MX28EVK)
+ #define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_AUART2_TX)
++#define USB_OTG_ID MXS_PIN_TO_GPIO(PINID_AUART2_TX)
++#else
++#define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_LCD_D23)
++#define USB_OTG_ID MXS_PIN_TO_GPIO(PINID_PWM2)
++#endif
+
+ extern int clk_get_usecount(struct clk *clk);
+ static struct clk *usb_clk;
+ static struct clk *usb_phy_clk;
++static int otg_mode_host = -1;
+
+ void fsl_phy_usb_utmi_init(struct fsl_xcvr_ops *this)
+ {
+@@ -52,14 +60,20 @@ void fsl_phy_usb_utmi_uninit(struct fsl_
+ void fsl_phy_set_power(struct fsl_xcvr_ops *this,
+ struct fsl_usb2_platform_data *pdata, int on)
+ {
+-#if defined(CONFIG_MACH_MX28EVK)
+- /* USB_POWER_ENABLE_PIN have request at pin init*/
+- if (pdata->phy_regs != USBPHY1_PHYS_ADDR) {
+- pr_debug("%s: on is %d\n", __func__, on);
+- gpio_direction_output(USB_POWER_ENABLE, on);
+- gpio_set_value(USB_POWER_ENABLE, on);
++ if (otg_mode_host == 1){
++ gpio_direction_output(USB_POWER_ENABLE, 1);
++ gpio_set_value(USB_POWER_ENABLE, 1);
++ } else if (otg_mode_host == 0){
++ gpio_direction_output(USB_POWER_ENABLE, 0);
++ gpio_set_value(USB_POWER_ENABLE, 0);
++ } else {
++ /* USB_POWER_ENABLE_PIN have request at pin init*/
++ if (pdata->phy_regs != USBPHY1_PHYS_ADDR) {
++ pr_debug("%s: on is %d\n", __func__, on);
++ gpio_direction_output(USB_POWER_ENABLE, on);
++ gpio_set_value(USB_POWER_ENABLE, on);
++ }
+ }
+-#endif
+ }
+
+ static void usb_host_phy_resume(struct fsl_usb2_platform_data *plat)
+@@ -359,6 +373,7 @@ static struct fsl_usb2_platform_data __m
+ .platform_resume = usb_host_phy_resume,
+ .transceiver = "utmi",
+ .phy_regs = USBPHY0_PHYS_ADDR,
++ .id_gpio = USB_OTG_ID,
+ };
+
+ /*
+@@ -453,6 +468,18 @@ static struct fsl_usb2_wakeup_platform_d
+ .usb_clock_for_pm = usbotg_clock_gate,
+ };
+
++static int __init apf28_otg_mode(char *options)
++{
++ if (!strcmp(options, "host"))
++ otg_mode_host = 1;
++ else if (!strcmp(options, "device"))
++ otg_mode_host = 0;
++
++ return 0;
++}
++__setup("otg_mode=", apf28_otg_mode);
++
++
+ static int __init usb_dr_init(void)
+ {
+ struct platform_device *pdev;
+@@ -468,6 +495,13 @@ static int __init usb_dr_init(void)
+ dr_utmi_config.irq_delay = 0;
+ dr_utmi_config.wakeup_pdata = &usbdr_wakeup_config;
+
++ if (otg_mode_host == 1) { /*mode defined by bootloader options*/
++ printk("OTG mode forced to HOST\n");
++ dr_utmi_config.id_gpio = 0; /* do not manage the ID pin */
++ gpio_direction_output(USB_POWER_ENABLE, 1);
++ gpio_set_value(USB_POWER_ENABLE, 1);
++ }
++
+ if (platform_device_register(&dr_otg_device))
+ printk(KERN_ERR "usb DR: can't register otg device\n");
+ else {
hooks/post-receive
--
armadeus
|