diff --git a/core/linux-odroid/51bffe8798f00dc412767f4284e66c02cb82c786.patch b/core/linux-odroid/51bffe8798f00dc412767f4284e66c02cb82c786.patch new file mode 100644 index 000000000..176c6bd6d --- /dev/null +++ b/core/linux-odroid/51bffe8798f00dc412767f4284e66c02cb82c786.patch @@ -0,0 +1,100 @@ +From 51bffe8798f00dc412767f4284e66c02cb82c786 Mon Sep 17 00:00:00 2001 +From: ckkim <ckkim@hardkernel.com> +Date: Wed, 5 Feb 2014 15:50:07 +0900 +Subject: [PATCH] usb3503 hub mode switch modify + +--- + drivers/usb/misc/usb3503.c | 37 +++++-------------------------------- + 1 file changed, 5 insertions(+), 32 deletions(-) + +diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c +index 2b62a87..3dd06e8 100644 +--- a/drivers/usb/misc/usb3503.c ++++ b/drivers/usb/misc/usb3503.c +@@ -53,7 +53,7 @@ + #define USB3503_MAX_2A (0x80 << 0) + + #define USB3503_SP_ILOCK 0xe7 +-#define USB3503_OCS_PINSEL (1 << 4) ++#define USB3503_OCS_PINSEL (1 << 5) + #define USB3503_PRTPWR_PINSEL (1 << 4) + #define USB3503_SPILOCK_CONNECT (1 << 1) + #define USB3503_SPILOCK_CONFIG (1 << 0) +@@ -173,12 +173,11 @@ static int usb3503_switch_mode(struct usb3503 *hub, enum usb3503_mode mode) + + /* CFG1 : SELF_BUS_PWR -> Self-Powerd operation */ + err = usb3503_set_bits(i2c, USB3503_CFG1, +- ( USB3503_SELF_BUS_PWR)); ++ ( USB3503_SELF_BUS_PWR )); + if (err < 0) { + dev_err(&i2c->dev, "CFG1 failed (%d)\n", err); + goto err_hubmode; + } +- + err = usb3503_clear_bits(i2c, USB3503_CFG1, + ( USB3503_MTT_ENABLE + | USB3503_OCS_INDIVIDUAL +@@ -188,29 +187,6 @@ static int usb3503_switch_mode(struct usb3503 *hub, enum usb3503_mode mode) + goto err_hubmode; + } + +- err = usb3503_set_bits(i2c, USB3503_BSTUP3, +- BOOST_IOOUT3_30); +- if (err < 0) { +- dev_err(&i2c->dev, "USB3503_BSTUP3 failed (%d)\n", err); +- goto err_hubmode; +- } +- +- err = usb3503_set_bits(i2c, USB3503_BSTUP21, +- ( BOOST_IOOUT2_30 +- | BOOST_IOOUT1_30)); +- if (err < 0) { +- dev_err(&i2c->dev, "USB3503_BSTUP21 failed (%d)\n", err); +- goto err_hubmode; +- } +- +- /* SP_LOCK: clear connect_n */ +- err = usb3503_clear_bits(i2c, USB3503_SP_ILOCK, +- USB3503_SPILOCK_CONNECT); +- if (err < 0) { +- dev_err(&i2c->dev, "USB3503_SPILOCK_CONNECT failed (%d)\n", err); +- goto err_hubmode; +- } +- + /* USB3503_SP_ILOCK config_n lock */ + err = usb3503_set_bits(i2c, USB3503_SP_ILOCK, + USB3503_SPILOCK_CONFIG); +@@ -220,9 +196,8 @@ static int usb3503_switch_mode(struct usb3503 *hub, enum usb3503_mode mode) + } + + hub->mode = mode; +- dev_info(&i2c->dev, "switched to HUB mode\n"); +- + usb3503_connect(hub->gpio_connect, 1); ++ dev_info(&i2c->dev, "switched to HUB mode\n"); + + break; + +@@ -300,8 +275,7 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id) + goto err_gpio_reset; + } + +- gpio_direction_output(hub->gpio_reset, 0); +- ++ usb3503_reset(hub->gpio_reset, 0); + if(hub->clk == USB3503_REFCLK_24M) + gpio_direction_output(hub->gpio_intn, 0); + else if(hub->clk == USB3503_REFCLK_26M) +@@ -309,8 +283,7 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id) + else + gpio_direction_output(hub->gpio_intn, 1); + +- gpio_direction_output(hub->gpio_connect, 0); +- msleep(10); ++ usb3503_connect(hub->gpio_connect, 0); + usb3503_reset(hub->gpio_reset, 1); + + /* Hub Wait RefClk stage */ +-- +1.8.5.1 + diff --git a/core/linux-odroid/PKGBUILD b/core/linux-odroid/PKGBUILD index 49ca1cf83..c8c5e7713 100644 --- a/core/linux-odroid/PKGBUILD +++ b/core/linux-odroid/PKGBUILD @@ -8,7 +8,7 @@ pkgname=('linux-odroid-x' 'linux-odroid-x2' 'linux-odroid-u2' 'linux-headers-odr _kernelname=${pkgname#linux} _basekernel=3.8 pkgver=${_basekernel}.13.16 -pkgrel=1 +pkgrel=2 arch=('armv7h') url="http://github.com/hardkernel/linux/" license=('GPL2') @@ -18,15 +18,20 @@ _commit=93c04175f9770b0fefdfcd82b88def144469877e source=("https://github.com/hardkernel/linux/archive/${_commit}.tar.gz" 'config_x' 'config_x2' - 'config_u2') + 'config_u2' + '51bffe8798f00dc412767f4284e66c02cb82c786.patch') md5sums=('58d66b88a523b66c1962ad24b9bbf2d3' 'bc5d01ed7e89cc13682683934fed7c33' 'edc777c6e603f2ea3a453f405918fa2b' - '75f29a3f1b7c80fa0fdb60f950ec325b') + '75f29a3f1b7c80fa0fdb60f950ec325b' + 'b2e06972808314b76fe383d1d8e59bfc') build() { cd "${srcdir}/linux-${_commit}" + # revert commit that breaks USB + patch -p1 -Ri ../51bffe8798f00dc412767f4284e66c02cb82c786.patch + # add pkgrel to extraversion sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile