Imported sources from subversion.

This commit is contained in:
Ricardo Martins
2013-07-13 17:19:22 +01:00
commit 12d63d1569
455 changed files with 69857 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
--- linux-omap-2.6.35.9-0.ori/drivers/usb/serial/option.c 2010-11-23 07:41:25.000000000 +0000
+++ linux-omap-2.6.35.9-0/drivers/usb/serial/option.c 2010-12-10 04:07:00.352473367 +0000
@@ -1050,6 +1050,13 @@
serial->interface->cur_altsetting->desc.bInterfaceNumber == 1)
return -ENODEV;
+ /* Don't bind useless interfaces on Huawei E1550 */
+ if ((serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID &&
+ serial->dev->descriptor.idProduct == 0x140C) &&
+ (serial->interface->cur_altsetting->desc.bInterfaceNumber == 1 ||
+ serial->interface->cur_altsetting->desc.bInterfaceNumber == 2))
+ return -ENODEV;
+
data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL);
if (!data)

View File

@@ -0,0 +1,11 @@
--- linux-3.3.1/arch/arm/mach-omap2/Makefile 2012-04-02 18:32:52.000000000 +0100
+++ linux-3.3.1.rasm/arch/arm/mach-omap2/Makefile 2012-05-07 18:24:37.490190256 +0100
@@ -224,7 +224,7 @@
board-zoom-display.o
obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o
obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o
-obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o
+obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o manta-axxx.o
obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o
obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o

View File

@@ -0,0 +1,22 @@
--- linux-3.3.1/arch/arm/mach-omap2/board-igep0020.c 2012-04-02 18:32:52.000000000 +0100
+++ linux-3.3.1.rasm/arch/arm/mach-omap2/board-igep0020.c 2012-05-07 18:24:05.423120776 +0100
@@ -633,6 +633,9 @@
static inline void __init igep_wlan_bt_init(void) { }
#endif
+/* Customization for Manta Axxx */
+extern void __init manta_axxx_init(void);
+
static void __init igep_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -650,6 +653,9 @@
igep_flash_init();
igep_leds_init();
+ /* Customization for Manta A2xx */
+ manta_axxx_init();
+
/*
* WLAN-BT combo module from MuRata which has a Marvell WLAN
* (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.

View File

@@ -0,0 +1,143 @@
--- /dev/null 2012-10-06 13:48:21.217530758 +0100
+++ linux-3.5.4/arch/arm/mach-omap2/manta-axxx.c 2012-10-08 16:02:17.605353112 +0100
@@ -0,0 +1,140 @@
+//***************************************************************************
+// Copyright (C) 2010 Laboratório de Sistemas e Tecnologia Subaquática *
+// Departamento de Engenharia Electrotécnica e de Computadores *
+// Rua Dr. Roberto Frias, 4200-465 Porto, Portugal *
+//***************************************************************************
+// Author: Ricardo Martins *
+//***************************************************************************
+
+// Linux headers.
+#include <linux/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/time.h>
+#include <linux/timer.h>
+#include <plat/i2c.h>
+#include <linux/pps-gpio.h>
+
+// Machine headers.
+#include "mux.h"
+
+// Buttons
+#define MANTA_AXXX_GPIO_BTN0 139
+#define MANTA_AXXX_GPIO_BTN1 138
+#define MANTA_AXXX_GPIO_BTN2 137
+
+// PPS
+#define MANTA_AXXX_GPIO_PPS0 136
+
+// Transducer connected
+#define MANTA_AXXX_GPIO_TXDC 157
+
+// Outputs
+#define MANTA_AXXX_GPIO_LED0 135
+#define MANTA_AXXX_GPIO_LCDL 133
+
+static struct gpio_keys_button manta_axxx_gpio_buttons[] =
+{
+ {
+ .code = BTN_0,
+ .gpio = MANTA_AXXX_GPIO_BTN0,
+ .desc = "btn0",
+ .wakeup = 1,
+ .debounce_interval = 2,
+ },
+ {
+ .code = BTN_1,
+ .gpio = MANTA_AXXX_GPIO_BTN1,
+ .desc = "btn1",
+ .wakeup = 1,
+ .debounce_interval = 2,
+ },
+ {
+ .code = BTN_2,
+ .gpio = MANTA_AXXX_GPIO_BTN2,
+ .desc = "btn2",
+ .wakeup = 1,
+ .debounce_interval = 2,
+ },
+};
+
+static struct gpio_keys_platform_data manta_axxx_gpio_key_info =
+{
+ .buttons = manta_axxx_gpio_buttons,
+ .nbuttons = ARRAY_SIZE(manta_axxx_gpio_buttons),
+};
+
+static struct platform_device manta_axxx_keys_gpio =
+{
+ .name = "gpio-keys",
+ .id = -1,
+ .dev = {
+ .platform_data = &manta_axxx_gpio_key_info,
+ },
+};
+
+static struct platform_device* manta_axxx_devices[] __initdata =
+{
+ &manta_axxx_keys_gpio
+};
+
+static struct i2c_board_info __initdata i2c_devices[] =
+{
+ {
+ I2C_BOARD_INFO("ds1307", 0x68),
+ },
+};
+
+/* PPS-GPIO platform data */
+static struct pps_gpio_platform_data pps_gpio_info = {
+ .assert_falling_edge = false,
+ .capture_clear = false,
+ .gpio_pin = MANTA_AXXX_GPIO_PPS0,
+ .gpio_label = "PPS",
+};
+
+static struct platform_device pps_gpio_device = {
+ .name = "pps-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &pps_gpio_info
+ },
+};
+
+void __init
+manta_axxx_init(void)
+{
+ // Initialize GPIOs.
+ omap_mux_init_gpio(MANTA_AXXX_GPIO_PPS0, OMAP_PIN_INPUT);
+ omap_mux_init_gpio(MANTA_AXXX_GPIO_BTN0, OMAP_PIN_INPUT_PULLDOWN);
+ omap_mux_init_gpio(MANTA_AXXX_GPIO_BTN1, OMAP_PIN_INPUT_PULLDOWN);
+ omap_mux_init_gpio(MANTA_AXXX_GPIO_BTN2, OMAP_PIN_INPUT_PULLDOWN);
+ omap_mux_init_gpio(MANTA_AXXX_GPIO_TXDC, OMAP_PIN_INPUT_PULLUP);
+ omap_mux_init_gpio(MANTA_AXXX_GPIO_LED0, OMAP_PIN_OUTPUT);
+ omap_mux_init_gpio(MANTA_AXXX_GPIO_LCDL, OMAP_PIN_OUTPUT);
+
+ // Initialize PPS.
+ if (platform_device_register(&pps_gpio_device))
+ pr_warning("failed to register PPS GPIO");
+
+ omap_register_i2c_bus(2, 100, i2c_devices, ARRAY_SIZE(i2c_devices));
+
+ if (gpio_request(MANTA_AXXX_GPIO_LED0, "Status LED") == 0)
+ {
+ gpio_direction_output(MANTA_AXXX_GPIO_LED0, 1);
+ gpio_export(MANTA_AXXX_GPIO_LED0, 1);
+ }
+
+ if (gpio_request(MANTA_AXXX_GPIO_LCDL, "LCD Backlight") == 0)
+ {
+ gpio_direction_output(MANTA_AXXX_GPIO_LCDL, 1);
+ gpio_export(MANTA_AXXX_GPIO_LCDL, 1);
+ }
+
+ platform_add_devices(manta_axxx_devices, ARRAY_SIZE(manta_axxx_devices));
+}

View File

@@ -0,0 +1,249 @@
From 603684c9a5f62460cd63147d25dd13c7a7395e1d Mon Sep 17 00:00:00 2001
From: Paolo Pisati <paolo.pisati@canonical.com>
Date: Sun, 24 Jun 2012 16:31:18 +0000
Subject: [PATCH 1/3] UBUNTU: SAUCE: Revert "Fix OMAP EHCI suspend/resume
failure (i693)"
This reverts commit 354ab8567ae3107a8cbe7228c3181990ba598aac.
BugLink: http://bugs/launchpad.net/bugs/1017718
Here is the thread where they discuss the issue:
http://comments.gmane.org/gmane.linux.usb.general/66239
"OMAP: USB : Fix the EHCI enumeration and core retention issue"
Revert will come down in one of the following 3.5rcX, in the mean time
we do it on our own.
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
drivers/usb/host/ehci-omap.c | 168 +-----------------------------------------
1 file changed, 1 insertion(+), 167 deletions(-)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 17cfb8a..a44294d 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -43,7 +43,6 @@
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/gpio.h>
-#include <linux/clk.h>
/* EHCI Register Set */
#define EHCI_INSNREG04 (0xA0)
@@ -56,15 +55,6 @@
#define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8
#define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0
-/* Errata i693 */
-static struct clk *utmi_p1_fck;
-static struct clk *utmi_p2_fck;
-static struct clk *xclk60mhsp1_ck;
-static struct clk *xclk60mhsp2_ck;
-static struct clk *usbhost_p1_fck;
-static struct clk *usbhost_p2_fck;
-static struct clk *init_60m_fclk;
-
/*-------------------------------------------------------------------------*/
static const struct hc_driver ehci_omap_hc_driver;
@@ -80,41 +70,6 @@ static inline u32 ehci_read(void __iomem *base, u32 reg)
return __raw_readl(base + reg);
}
-/* Erratum i693 workaround sequence */
-static void omap_ehci_erratum_i693(struct ehci_hcd *ehci)
-{
- int ret = 0;
-
- /* Switch to the internal 60 MHz clock */
- ret = clk_set_parent(utmi_p1_fck, init_60m_fclk);
- if (ret != 0)
- ehci_err(ehci, "init_60m_fclk set parent"
- "failed error:%d\n", ret);
-
- ret = clk_set_parent(utmi_p2_fck, init_60m_fclk);
- if (ret != 0)
- ehci_err(ehci, "init_60m_fclk set parent"
- "failed error:%d\n", ret);
-
- clk_enable(usbhost_p1_fck);
- clk_enable(usbhost_p2_fck);
-
- /* Wait 1ms and switch back to the external clock */
- mdelay(1);
- ret = clk_set_parent(utmi_p1_fck, xclk60mhsp1_ck);
- if (ret != 0)
- ehci_err(ehci, "xclk60mhsp1_ck set parent"
- "failed error:%d\n", ret);
-
- ret = clk_set_parent(utmi_p2_fck, xclk60mhsp2_ck);
- if (ret != 0)
- ehci_err(ehci, "xclk60mhsp2_ck set parent"
- "failed error:%d\n", ret);
-
- clk_disable(usbhost_p1_fck);
- clk_disable(usbhost_p2_fck);
-}
-
static void omap_ehci_soft_phy_reset(struct platform_device *pdev, u8 port)
{
struct usb_hcd *hcd = dev_get_drvdata(&pdev->dev);
@@ -145,50 +100,6 @@ static void omap_ehci_soft_phy_reset(struct platform_device *pdev, u8 port)
}
}
-static int omap_ehci_hub_control(
- struct usb_hcd *hcd,
- u16 typeReq,
- u16 wValue,
- u16 wIndex,
- char *buf,
- u16 wLength
-)
-{
- struct ehci_hcd *ehci = hcd_to_ehci(hcd);
- u32 __iomem *status_reg = &ehci->regs->port_status[
- (wIndex & 0xff) - 1];
- u32 temp;
- unsigned long flags;
- int retval = 0;
-
- spin_lock_irqsave(&ehci->lock, flags);
-
- if (typeReq == SetPortFeature && wValue == USB_PORT_FEAT_SUSPEND) {
- temp = ehci_readl(ehci, status_reg);
- if ((temp & PORT_PE) == 0 || (temp & PORT_RESET) != 0) {
- retval = -EPIPE;
- goto done;
- }
-
- temp &= ~PORT_WKCONN_E;
- temp |= PORT_WKDISC_E | PORT_WKOC_E;
- ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
-
- omap_ehci_erratum_i693(ehci);
-
- set_bit((wIndex & 0xff) - 1, &ehci->suspended_ports);
- goto done;
- }
-
- spin_unlock_irqrestore(&ehci->lock, flags);
-
- /* Handle the hub control events here */
- return ehci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength);
-done:
- spin_unlock_irqrestore(&ehci->lock, flags);
- return retval;
-}
-
static void disable_put_regulator(
struct ehci_hcd_omap_platform_data *pdata)
{
@@ -353,76 +264,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
/* root ports should always stay powered */
ehci_port_power(omap_ehci, 1);
- /* get clocks */
- utmi_p1_fck = clk_get(dev, "utmi_p1_gfclk");
- if (IS_ERR(utmi_p1_fck)) {
- ret = PTR_ERR(utmi_p1_fck);
- dev_err(dev, "utmi_p1_gfclk failed error:%d\n", ret);
- goto err_add_hcd;
- }
-
- xclk60mhsp1_ck = clk_get(dev, "xclk60mhsp1_ck");
- if (IS_ERR(xclk60mhsp1_ck)) {
- ret = PTR_ERR(xclk60mhsp1_ck);
- dev_err(dev, "xclk60mhsp1_ck failed error:%d\n", ret);
- goto err_utmi_p1_fck;
- }
-
- utmi_p2_fck = clk_get(dev, "utmi_p2_gfclk");
- if (IS_ERR(utmi_p2_fck)) {
- ret = PTR_ERR(utmi_p2_fck);
- dev_err(dev, "utmi_p2_gfclk failed error:%d\n", ret);
- goto err_xclk60mhsp1_ck;
- }
-
- xclk60mhsp2_ck = clk_get(dev, "xclk60mhsp2_ck");
- if (IS_ERR(xclk60mhsp2_ck)) {
- ret = PTR_ERR(xclk60mhsp2_ck);
- dev_err(dev, "xclk60mhsp2_ck failed error:%d\n", ret);
- goto err_utmi_p2_fck;
- }
-
- usbhost_p1_fck = clk_get(dev, "usb_host_hs_utmi_p1_clk");
- if (IS_ERR(usbhost_p1_fck)) {
- ret = PTR_ERR(usbhost_p1_fck);
- dev_err(dev, "usbhost_p1_fck failed error:%d\n", ret);
- goto err_xclk60mhsp2_ck;
- }
-
- usbhost_p2_fck = clk_get(dev, "usb_host_hs_utmi_p2_clk");
- if (IS_ERR(usbhost_p2_fck)) {
- ret = PTR_ERR(usbhost_p2_fck);
- dev_err(dev, "usbhost_p2_fck failed error:%d\n", ret);
- goto err_usbhost_p1_fck;
- }
-
- init_60m_fclk = clk_get(dev, "init_60m_fclk");
- if (IS_ERR(init_60m_fclk)) {
- ret = PTR_ERR(init_60m_fclk);
- dev_err(dev, "init_60m_fclk failed error:%d\n", ret);
- goto err_usbhost_p2_fck;
- }
-
return 0;
-err_usbhost_p2_fck:
- clk_put(usbhost_p2_fck);
-
-err_usbhost_p1_fck:
- clk_put(usbhost_p1_fck);
-
-err_xclk60mhsp2_ck:
- clk_put(xclk60mhsp2_ck);
-
-err_utmi_p2_fck:
- clk_put(utmi_p2_fck);
-
-err_xclk60mhsp1_ck:
- clk_put(xclk60mhsp1_ck);
-
-err_utmi_p1_fck:
- clk_put(utmi_p1_fck);
-
err_add_hcd:
disable_put_regulator(pdata);
pm_runtime_put_sync(dev);
@@ -451,15 +294,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
disable_put_regulator(dev->platform_data);
iounmap(hcd->regs);
usb_put_hcd(hcd);
-
- clk_put(utmi_p1_fck);
- clk_put(utmi_p2_fck);
- clk_put(xclk60mhsp1_ck);
- clk_put(xclk60mhsp2_ck);
- clk_put(usbhost_p1_fck);
- clk_put(usbhost_p2_fck);
- clk_put(init_60m_fclk);
-
pm_runtime_put_sync(dev);
pm_runtime_disable(dev);
@@ -530,7 +364,7 @@ static const struct hc_driver ehci_omap_hc_driver = {
* root hub support
*/
.hub_status_data = ehci_hub_status_data,
- .hub_control = omap_ehci_hub_control,
+ .hub_control = ehci_hub_control,
.bus_suspend = ehci_bus_suspend,
.bus_resume = ehci_bus_resume,
--
1.7.9.5

View File

@@ -0,0 +1,30 @@
diff -Nru linux-3.5.4/arch/arm/mach-omap2/board-igep0020.c linux-3.5.4.rasm/arch/arm/mach-omap2/board-igep0020.c
--- linux-3.5.4/arch/arm/mach-omap2/board-igep0020.c 2012-09-15 00:28:08.000000000 +0200
+++ linux-3.5.4.rasm/arch/arm/mach-omap2/board-igep0020.c 2012-10-10 19:57:57.928347091 +0200
@@ -611,6 +611,26 @@
regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+ /* Change ttyO0 from RS485 to RS232. */
+ omap_mux_init_signal("uart1_rts.safe_mode", 0);
+ omap_mux_init_signal("uart1_cts.safe_mode", 0);
+
+ omap_mux_init_gpio(150, OMAP_PIN_INPUT);
+ if (gpio_request(150, "UART1_RTS") == 0)
+ {
+ gpio_direction_input(150);
+ gpio_set_value(150, 0);
+ gpio_export(150, 1);
+ }
+
+ omap_mux_init_gpio(149, OMAP_PIN_INPUT);
+ if (gpio_request(149, "UART1_CTS") == 0)
+ {
+ gpio_direction_input(149);
+ gpio_set_value(149, 0);
+ gpio_export(149, 1);
+ }
+
/* Get IGEP2 hardware revision */
igep2_get_revision();

View File

@@ -0,0 +1,11 @@
--- linux-3.5.4/arch/arm/mach-omap2/board-igep0020.c 2013-04-12 14:14:07.706131422 +0100
+++ linux-3.5.4.rasm/arch/arm/mach-omap2/board-igep0020.c 2013-04-12 14:12:18.810582649 +0100
@@ -554,6 +554,8 @@
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
+ /* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */
+ OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#endif