[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-341-g5a88f24
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-06-03 23:37:58
|
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 5a88f24ae2075de21746407f41d7064a5e409282 (commit)
from 554078a05867c6badbb8d8df3d6c68677e51cfc9 (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 5a88f24ae2075de21746407f41d7064a5e409282
Author: Eric Jarrige <eri...@ar...>
Date: Mon Jun 4 01:38:35 2012 +0200
[LINUX] APF28: update armadeus patches
-----------------------------------------------------------------------
Summary of changes:
.../452-armadeus-mxs-fixes_USB_freescale_bsp.patch | 99 ++++++++++++++++++++
.../452-armadeus-mxs-fixes_freescale_bsp.patch | 93 ------------------
2 files changed, 99 insertions(+), 93 deletions(-)
create mode 100644 patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
diff --git a/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch b/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
new file mode 100644
index 0000000..752bb41
--- /dev/null
+++ b/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
@@ -0,0 +1,99 @@
+USB (i.MX28) fixes to Freescale's 2.6.35 BSP + USB OTG option to enforce mode
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+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,7 +29,13 @@
+ #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
+
+ #ifdef CONFIG_WORKAROUND_ARCUSB_REG_RW
+ static void fsl_safe_writel(u32 val32, volatile u32 *addr)
+@@ -40,6 +46,7 @@ static void fsl_safe_writel(u32 val32, v
+ 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)
+ {
+@@ -58,14 +65,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)
+@@ -365,6 +378,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,
+ };
+
+ /*
+@@ -459,6 +473,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;
+@@ -474,6 +500,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 {
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 d286f8f..9be0eb6 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,96 +76,3 @@ 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
|