aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-31 13:51:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-31 13:51:39 -0700
commit39c527bdf0c59497f493e102e8aaa65eb2511ce8 (patch)
treec53ccc67b74c26a38f024c03973ca434ea3814cc
parentab2140963c43fc2f4feba9b109e02a8a45bd3df0 (diff)
downloadltsi-kernel-39c527bdf0c59497f493e102e8aaa65eb2511ce8.tar.gz
3 patches to fix sh7757lcr board added
-rw-r--r--patches.r8a66597-udc/001-usb-gadget-add-platform-module-alias-where-it-is-missing.patch15
-rw-r--r--patches.r8a66597-udc/002-usb-update-email-address-in-r8a66597-udc-and-m66592-udc.patch11
-rw-r--r--patches.r8a66597-udc/003-usb-gadget-r8a66597-udc-make-buswait-configurable-through-platform-data.patch23
-rw-r--r--patches.r8a66597-udc/004-usb-gadget-r8a66597-udc-add-support-for-test_mode.patch25
-rw-r--r--patches.r8a66597-udc/005-usb-gadget-clean-up-fsf-boilerplate-text.patch17
-rw-r--r--patches.r8a66597-udc/006-usb-irq-remove-irqf_disabled.patch18
-rw-r--r--patches.r8a66597-udc/007-usb-gadget-r8a66597-udc-change-prototype-of-r8a66597_write_fifo.patch23
-rw-r--r--patches.r8a66597-udc/008-usb-r8a66597-hcd-add-function-for-external-controller.patch15
-rw-r--r--patches.r8a66597-udc/009-usb-gadget-r8a66597-udc-add-function-for-external-controller.patch27
-rw-r--r--patches.r8a66597-udc/010-usb-gadget-r8a66597-udc-use-dev_-instead-of-printk.patch105
-rw-r--r--patches.r8a66597-udc/011-usb-gadget-r8a66597-udc-add-support-for-sudmac.patch111
-rw-r--r--patches.sh7757lcr/drivers-sh-generalize-runtime-pm-platform-stub.patch198
-rw-r--r--patches.sh7757lcr/sh-also-without-pm_runtime-pm_runtime.o-must-be-built.patch41
-rw-r--r--patches.sh7757lcr/sh-fix-clock-sh7757-for-the-latest-sh_mobile_sdhi-driver.patch41
-rw-r--r--series3
15 files changed, 421 insertions, 252 deletions
diff --git a/patches.r8a66597-udc/001-usb-gadget-add-platform-module-alias-where-it-is-missing.patch b/patches.r8a66597-udc/001-usb-gadget-add-platform-module-alias-where-it-is-missing.patch
index 390208c0854498..47b46d786bbf8c 100644
--- a/patches.r8a66597-udc/001-usb-gadget-add-platform-module-alias-where-it-is-missing.patch
+++ b/patches.r8a66597-udc/001-usb-gadget-add-platform-module-alias-where-it-is-missing.patch
@@ -29,24 +29,15 @@ Conflicts:
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/usb/gadget/r8a66597-udc.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
+ 1 file changed, 1 insertion(+)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index 6dcc1f6..600a2e7 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
-@@ -1679,6 +1679,7 @@ static struct platform_driver r8a66597_driver = {
+@@ -1679,6 +1679,7 @@ static struct platform_driver r8a66597_d
.name = (char *) udc_name,
},
};
+MODULE_ALIAS("platform:r8a66597_udc");
-
+
static int __init r8a66597_udc_init(void)
{
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/002-usb-update-email-address-in-r8a66597-udc-and-m66592-udc.patch b/patches.r8a66597-udc/002-usb-update-email-address-in-r8a66597-udc-and-m66592-udc.patch
index a6fea327f2f4e0..f269dfd3cdd867 100644
--- a/patches.r8a66597-udc/002-usb-update-email-address-in-r8a66597-udc-and-m66592-udc.patch
+++ b/patches.r8a66597-udc/002-usb-update-email-address-in-r8a66597-udc-and-m66592-udc.patch
@@ -26,8 +26,6 @@ Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
drivers/usb/gadget/r8a66597-udc.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index 600a2e7..9fc3979 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
@@ -3,7 +3,7 @@
@@ -39,8 +37,6 @@ index 600a2e7..9fc3979 100644
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h
-index 5fc22e0..503f766 100644
--- a/drivers/usb/gadget/r8a66597-udc.h
+++ b/drivers/usb/gadget/r8a66597-udc.h
@@ -3,7 +3,7 @@
@@ -52,10 +48,3 @@ index 5fc22e0..503f766 100644
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/003-usb-gadget-r8a66597-udc-make-buswait-configurable-through-platform-data.patch b/patches.r8a66597-udc/003-usb-gadget-r8a66597-udc-make-buswait-configurable-through-platform-data.patch
index d5b936dece469b..a2bc8474783f59 100644
--- a/patches.r8a66597-udc/003-usb-gadget-r8a66597-udc-make-buswait-configurable-through-platform-data.patch
+++ b/patches.r8a66597-udc/003-usb-gadget-r8a66597-udc-make-buswait-configurable-through-platform-data.patch
@@ -32,15 +32,13 @@ Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/usb/gadget/r8a66597-udc.c | 6 +++++-
include/linux/usb/r8a66597.h | 3 +++
- 2 files changed, 8 insertions(+), 1 deletions(-)
+ 2 files changed, 8 insertions(+), 1 deletion(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index 9fc3979..8a3a32a 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
-@@ -576,7 +576,11 @@ static void init_controller(struct r8a66597 *r8a66597)
+@@ -576,7 +576,11 @@ static void init_controller(struct r8a66
u16 endian = r8a66597->pdata->endian ? BIGEND : 0;
-
+
if (r8a66597->pdata->on_chip) {
- r8a66597_bset(r8a66597, 0x04, SYSCFG1);
+ if (r8a66597->pdata->buswait)
@@ -49,26 +47,17 @@ index 9fc3979..8a3a32a 100644
+ else
+ r8a66597_write(r8a66597, 0x0f, SYSCFG1);
r8a66597_bset(r8a66597, HSE, SYSCFG0);
-
+
r8a66597_bclr(r8a66597, USBE, SYSCFG0);
-diff --git a/include/linux/usb/r8a66597.h b/include/linux/usb/r8a66597.h
-index 26d2167..6e1bfae 100644
--- a/include/linux/usb/r8a66597.h
+++ b/include/linux/usb/r8a66597.h
@@ -31,6 +31,9 @@ struct r8a66597_platdata {
/* This callback can control port power instead of DVSTCTR register. */
void (*port_power)(int port, int power);
-
+
+ /* This parameter is for BUSWAIT */
+ u16 buswait;
+
/* set one = on chip controller, set zero = external controller */
unsigned on_chip:1;
-
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
+
diff --git a/patches.r8a66597-udc/004-usb-gadget-r8a66597-udc-add-support-for-test_mode.patch b/patches.r8a66597-udc/004-usb-gadget-r8a66597-udc-add-support-for-test_mode.patch
index 841a2cf6a729d9..e187abf2946dc4 100644
--- a/patches.r8a66597-udc/004-usb-gadget-r8a66597-udc-add-support-for-test_mode.patch
+++ b/patches.r8a66597-udc/004-usb-gadget-r8a66597-udc-add-support-for-test_mode.patch
@@ -23,35 +23,33 @@ Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/usb/gadget/r8a66597-udc.c | 23 ++++++++++++++++++++++-
- 1 files changed, 22 insertions(+), 1 deletions(-)
+ 1 file changed, 22 insertions(+), 1 deletion(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index 8a3a32a..eb1ad72 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
-@@ -622,6 +622,7 @@ static void disable_controller(struct r8a66597 *r8a66597)
+@@ -622,6 +622,7 @@ static void disable_controller(struct r8
{
if (r8a66597->pdata->on_chip) {
r8a66597_bset(r8a66597, SCKE, SYSCFG0);
+ r8a66597_bclr(r8a66597, UTST, TESTMODE);
-
+
/* disable interrupts */
r8a66597_write(r8a66597, 0, INTENB0);
-@@ -639,6 +640,7 @@ static void disable_controller(struct r8a66597 *r8a66597)
+@@ -639,6 +640,7 @@ static void disable_controller(struct r8
r8a66597_bclr(r8a66597, SCKE, SYSCFG0);
-
+
} else {
+ r8a66597_bclr(r8a66597, UTST, TESTMODE);
r8a66597_bclr(r8a66597, SCKE, SYSCFG0);
udelay(1);
r8a66597_bclr(r8a66597, PLLC, SYSCFG0);
-@@ -1003,10 +1005,29 @@ static void clear_feature(struct r8a66597 *r8a66597,
-
+@@ -1003,10 +1005,29 @@ static void clear_feature(struct r8a6659
+
static void set_feature(struct r8a66597 *r8a66597, struct usb_ctrlrequest *ctrl)
{
+ u16 tmp;
+ int timeout = 3000;
-
+
switch (ctrl->bRequestType & USB_RECIP_MASK) {
case USB_RECIP_DEVICE:
- control_end(r8a66597, 1);
@@ -76,10 +74,3 @@ index 8a3a32a..eb1ad72 100644
break;
case USB_RECIP_INTERFACE:
control_end(r8a66597, 1);
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/005-usb-gadget-clean-up-fsf-boilerplate-text.patch b/patches.r8a66597-udc/005-usb-gadget-clean-up-fsf-boilerplate-text.patch
index 91309889b3f079..f4c3082086838f 100644
--- a/patches.r8a66597-udc/005-usb-gadget-clean-up-fsf-boilerplate-text.patch
+++ b/patches.r8a66597-udc/005-usb-gadget-clean-up-fsf-boilerplate-text.patch
@@ -92,10 +92,8 @@ Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/usb/gadget/r8a66597-udc.c | 10 ----------
drivers/usb/gadget/r8a66597-udc.h | 10 ----------
- 2 files changed, 0 insertions(+), 20 deletions(-)
+ 2 files changed, 20 deletions(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index eb1ad72..fe3313a 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
@@ -8,16 +8,6 @@
@@ -113,10 +111,8 @@ index eb1ad72..fe3313a 100644
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
*/
-
+
#include <linux/module.h>
-diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h
-index 503f766..a373c4e 100644
--- a/drivers/usb/gadget/r8a66597-udc.h
+++ b/drivers/usb/gadget/r8a66597-udc.h
@@ -8,16 +8,6 @@
@@ -134,12 +130,5 @@ index 503f766..a373c4e 100644
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
*/
-
+
#ifndef __R8A66597_H__
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/006-usb-irq-remove-irqf_disabled.patch b/patches.r8a66597-udc/006-usb-irq-remove-irqf_disabled.patch
index 9fbc2940c64832..bcd8c99863547c 100644
--- a/patches.r8a66597-udc/006-usb-irq-remove-irqf_disabled.patch
+++ b/patches.r8a66597-udc/006-usb-irq-remove-irqf_disabled.patch
@@ -77,26 +77,16 @@ Conflicts:
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/usb/gadget/r8a66597-udc.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index fe3313a..460b3bf 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
-@@ -1618,7 +1618,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
-
+@@ -1618,7 +1618,7 @@ static int __init r8a66597_probe(struct
+
disable_controller(r8a66597); /* make sure controller is disabled */
-
+
- ret = request_irq(irq, r8a66597_irq, IRQF_DISABLED | IRQF_SHARED,
+ ret = request_irq(irq, r8a66597_irq, IRQF_SHARED,
udc_name, r8a66597);
if (ret < 0) {
printk(KERN_ERR "request_irq error (%d)\n", ret);
---
-1.7.1
-
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/007-usb-gadget-r8a66597-udc-change-prototype-of-r8a66597_write_fifo.patch b/patches.r8a66597-udc/007-usb-gadget-r8a66597-udc-change-prototype-of-r8a66597_write_fifo.patch
index 2bd54abcceb715..cdcc57b087b05e 100644
--- a/patches.r8a66597-udc/007-usb-gadget-r8a66597-udc-change-prototype-of-r8a66597_write_fifo.patch
+++ b/patches.r8a66597-udc/007-usb-gadget-r8a66597-udc-change-prototype-of-r8a66597_write_fifo.patch
@@ -21,11 +21,9 @@ Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
drivers/usb/gadget/r8a66597-udc.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index 460b3bf..3450038 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
-@@ -723,7 +723,7 @@ static void irq_ep0_write(struct r8a66597_ep *ep, struct r8a66597_request *req)
+@@ -723,7 +723,7 @@ static void irq_ep0_write(struct r8a6659
/* write fifo */
if (req->req.buf) {
if (size > 0)
@@ -34,8 +32,8 @@ index 460b3bf..3450038 100644
if ((size == 0) || ((size % ep->ep.maxpacket) != 0))
r8a66597_bset(r8a66597, BVAL, ep->fifoctr);
}
-@@ -770,7 +770,7 @@ static void irq_packet_write(struct r8a66597_ep *ep,
-
+@@ -770,7 +770,7 @@ static void irq_packet_write(struct r8a6
+
/* write fifo */
if (req->req.buf) {
- r8a66597_write_fifo(r8a66597, ep->fifoaddr, buf, size);
@@ -43,13 +41,11 @@ index 460b3bf..3450038 100644
if ((size == 0)
|| ((size % ep->ep.maxpacket) != 0)
|| ((bufsize != ep->ep.maxpacket)
-diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h
-index a373c4e..31047f8 100644
--- a/drivers/usb/gadget/r8a66597-udc.h
+++ b/drivers/usb/gadget/r8a66597-udc.h
-@@ -173,11 +173,11 @@ static inline void r8a66597_write(struct r8a66597 *r8a66597, u16 val,
+@@ -173,11 +173,11 @@ static inline void r8a66597_write(struct
}
-
+
static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597,
- unsigned long offset,
+ struct r8a66597_ep *ep,
@@ -60,11 +56,4 @@ index a373c4e..31047f8 100644
+ void __iomem *fifoaddr = r8a66597->reg + ep->fifoaddr;
int adj = 0;
int i;
-
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
+
diff --git a/patches.r8a66597-udc/008-usb-r8a66597-hcd-add-function-for-external-controller.patch b/patches.r8a66597-udc/008-usb-r8a66597-hcd-add-function-for-external-controller.patch
index e5efd83f843824..0ed2690e2f4af5 100644
--- a/patches.r8a66597-udc/008-usb-r8a66597-hcd-add-function-for-external-controller.patch
+++ b/patches.r8a66597-udc/008-usb-r8a66597-hcd-add-function-for-external-controller.patch
@@ -28,26 +28,17 @@ Conflicts:
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
include/linux/usb/r8a66597.h | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
+ 1 file changed, 3 insertions(+)
-diff --git a/include/linux/usb/r8a66597.h b/include/linux/usb/r8a66597.h
-index 6e1bfae..7cd89e7 100644
--- a/include/linux/usb/r8a66597.h
+++ b/include/linux/usb/r8a66597.h
@@ -45,6 +45,9 @@ struct r8a66597_platdata {
-
+
/* set one = big endian, set zero = little endian */
unsigned endian:1;
+
+ /* (external controller only) set one = WR0_N shorted to WR1_N */
+ unsigned wr0_shorted_to_wr1:1;
};
-
+
/* Register definitions */
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/009-usb-gadget-r8a66597-udc-add-function-for-external-controller.patch b/patches.r8a66597-udc/009-usb-gadget-r8a66597-udc-add-function-for-external-controller.patch
index 8683cb5ff5755a..e3017c7bb7810d 100644
--- a/patches.r8a66597-udc/009-usb-gadget-r8a66597-udc-add-function-for-external-controller.patch
+++ b/patches.r8a66597-udc/009-usb-gadget-r8a66597-udc-add-function-for-external-controller.patch
@@ -23,16 +23,14 @@ Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/usb/gadget/r8a66597-udc.h | 34 +++++++++++++++++++---------------
- 1 files changed, 19 insertions(+), 15 deletions(-)
+ 1 file changed, 19 insertions(+), 15 deletions(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h
-index 31047f8..f9ac2d7 100644
--- a/drivers/usb/gadget/r8a66597-udc.h
+++ b/drivers/usb/gadget/r8a66597-udc.h
-@@ -172,6 +172,21 @@ static inline void r8a66597_write(struct r8a66597 *r8a66597, u16 val,
+@@ -172,6 +172,21 @@ static inline void r8a66597_write(struct
iowrite16(val, r8a66597->reg + offset);
}
-
+
+static inline void r8a66597_mdfy(struct r8a66597 *r8a66597,
+ u16 val, u16 pat, unsigned long offset)
+{
@@ -51,10 +49,10 @@ index 31047f8..f9ac2d7 100644
static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597,
struct r8a66597_ep *ep,
unsigned char *buf,
-@@ -205,18 +220,12 @@ static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597,
+@@ -205,18 +220,12 @@ static inline void r8a66597_write_fifo(s
adj = 0x01; /* 16-bit wide */
}
-
+
+ if (r8a66597->pdata->wr0_shorted_to_wr1)
+ r8a66597_bclr(r8a66597, MBW_16, ep->fifosel);
for (i = 0; i < len; i++)
@@ -72,24 +70,17 @@ index 31047f8..f9ac2d7 100644
+ if (r8a66597->pdata->wr0_shorted_to_wr1)
+ r8a66597_bclr(r8a66597, MBW_16, ep->fifosel);
}
-
+
static inline u16 get_xtal_from_pdata(struct r8a66597_platdata *pdata)
-@@ -241,11 +250,6 @@ static inline u16 get_xtal_from_pdata(struct r8a66597_platdata *pdata)
+@@ -241,11 +250,6 @@ static inline u16 get_xtal_from_pdata(st
return clock;
}
-
+
-#define r8a66597_bclr(r8a66597, val, offset) \
- r8a66597_mdfy(r8a66597, 0, val, offset)
-#define r8a66597_bset(r8a66597, val, offset) \
- r8a66597_mdfy(r8a66597, val, 0, offset)
-
#define get_pipectr_addr(pipenum) (PIPE1CTR + (pipenum - 1) * 2)
-
+
#define enable_irq_ready(r8a66597, pipenum) \
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/010-usb-gadget-r8a66597-udc-use-dev_-instead-of-printk.patch b/patches.r8a66597-udc/010-usb-gadget-r8a66597-udc-use-dev_-instead-of-printk.patch
index 131ff5e91d05b9..5eed4afb8bb172 100644
--- a/patches.r8a66597-udc/010-usb-gadget-r8a66597-udc-use-dev_-instead-of-printk.patch
+++ b/patches.r8a66597-udc/010-usb-gadget-r8a66597-udc-use-dev_-instead-of-printk.patch
@@ -19,18 +19,16 @@ Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
- drivers/usb/gadget/r8a66597-udc.c | 99 ++++++++++++++++++++++---------------
- drivers/usb/gadget/r8a66597-udc.h | 1 +
+ drivers/usb/gadget/r8a66597-udc.c | 99 ++++++++++++++++++++++----------------
+ drivers/usb/gadget/r8a66597-udc.h | 1
2 files changed, 60 insertions(+), 40 deletions(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index 3450038..fd9ce15 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
-@@ -105,13 +105,15 @@ static inline u16 control_reg_get_pid(struct r8a66597 *r8a66597, u16 pipenum)
+@@ -105,13 +105,15 @@ static inline u16 control_reg_get_pid(st
u16 pid = 0;
unsigned long offset;
-
+
- if (pipenum == 0)
+ if (pipenum == 0) {
pid = r8a66597_read(r8a66597, DCPCTR) & PID;
@@ -44,13 +42,13 @@ index 3450038..fd9ce15 100644
+ dev_err(r8a66597_to_dev(r8a66597), "unexpect pipe num (%d)\n",
+ pipenum);
+ }
-
+
return pid;
}
-@@ -121,13 +123,15 @@ static inline void control_reg_set_pid(struct r8a66597 *r8a66597, u16 pipenum,
+@@ -121,13 +123,15 @@ static inline void control_reg_set_pid(s
{
unsigned long offset;
-
+
- if (pipenum == 0)
+ if (pipenum == 0) {
r8a66597_mdfy(r8a66597, pid, PID, DCPCTR);
@@ -65,12 +63,12 @@ index 3450038..fd9ce15 100644
+ pipenum);
+ }
}
-
+
static inline void pipe_start(struct r8a66597 *r8a66597, u16 pipenum)
-@@ -150,13 +154,15 @@ static inline u16 control_reg_get(struct r8a66597 *r8a66597, u16 pipenum)
+@@ -150,13 +154,15 @@ static inline u16 control_reg_get(struct
u16 ret = 0;
unsigned long offset;
-
+
- if (pipenum == 0)
+ if (pipenum == 0) {
ret = r8a66597_read(r8a66597, DCPCTR);
@@ -84,13 +82,13 @@ index 3450038..fd9ce15 100644
+ dev_err(r8a66597_to_dev(r8a66597), "unexpect pipe num (%d)\n",
+ pipenum);
+ }
-
+
return ret;
}
-@@ -167,13 +173,15 @@ static inline void control_reg_sqclr(struct r8a66597 *r8a66597, u16 pipenum)
-
+@@ -167,13 +173,15 @@ static inline void control_reg_sqclr(str
+
pipe_stop(r8a66597, pipenum);
-
+
- if (pipenum == 0)
+ if (pipenum == 0) {
r8a66597_bset(r8a66597, SQCLR, DCPCTR);
@@ -105,12 +103,12 @@ index 3450038..fd9ce15 100644
+ pipenum);
+ }
}
-
+
static inline int get_buffer_size(struct r8a66597 *r8a66597, u16 pipenum)
-@@ -287,17 +295,18 @@ static void pipe_buffer_release(struct r8a66597 *r8a66597,
+@@ -287,17 +295,18 @@ static void pipe_buffer_release(struct r
if (info->pipe == 0)
return;
-
+
- if (is_bulk_pipe(info->pipe))
+ if (is_bulk_pipe(info->pipe)) {
r8a66597->bulk--;
@@ -130,9 +128,9 @@ index 3450038..fd9ce15 100644
+ "ep_release: unexpect pipenum (%d)\n", info->pipe);
+ }
}
-
+
static void pipe_initialize(struct r8a66597_ep *ep)
-@@ -371,7 +380,8 @@ static int alloc_pipe_config(struct r8a66597_ep *ep,
+@@ -371,7 +380,8 @@ static int alloc_pipe_config(struct r8a6
case USB_ENDPOINT_XFER_BULK:
if (r8a66597->bulk >= R8A66597_MAX_NUM_BULK) {
if (r8a66597->isochronous >= R8A66597_MAX_NUM_ISOC) {
@@ -142,7 +140,7 @@ index 3450038..fd9ce15 100644
return -ENODEV;
} else {
info.pipe = R8A66597_BASE_PIPENUM_ISOC
-@@ -387,7 +397,8 @@ static int alloc_pipe_config(struct r8a66597_ep *ep,
+@@ -387,7 +397,8 @@ static int alloc_pipe_config(struct r8a6
break;
case USB_ENDPOINT_XFER_INT:
if (r8a66597->interrupt >= R8A66597_MAX_NUM_INT) {
@@ -152,7 +150,7 @@ index 3450038..fd9ce15 100644
return -ENODEV;
}
info.pipe = R8A66597_BASE_PIPENUM_INT + r8a66597->interrupt;
-@@ -396,7 +407,8 @@ static int alloc_pipe_config(struct r8a66597_ep *ep,
+@@ -396,7 +407,8 @@ static int alloc_pipe_config(struct r8a6
break;
case USB_ENDPOINT_XFER_ISOC:
if (r8a66597->isochronous >= R8A66597_MAX_NUM_ISOC) {
@@ -162,7 +160,7 @@ index 3450038..fd9ce15 100644
return -ENODEV;
}
info.pipe = R8A66597_BASE_PIPENUM_ISOC + r8a66597->isochronous;
-@@ -404,7 +416,7 @@ static int alloc_pipe_config(struct r8a66597_ep *ep,
+@@ -404,7 +416,7 @@ static int alloc_pipe_config(struct r8a6
counter = &r8a66597->isochronous;
break;
default:
@@ -171,8 +169,8 @@ index 3450038..fd9ce15 100644
return -EINVAL;
}
ep->type = info.type;
-@@ -419,7 +431,8 @@ static int alloc_pipe_config(struct r8a66597_ep *ep,
-
+@@ -419,7 +431,8 @@ static int alloc_pipe_config(struct r8a6
+
ret = pipe_buffer_setting(r8a66597, &info);
if (ret < 0) {
- printk(KERN_ERR "pipe_buffer_setting fail\n");
@@ -180,8 +178,8 @@ index 3450038..fd9ce15 100644
+ "pipe_buffer_setting fail\n");
return ret;
}
-
-@@ -554,7 +567,8 @@ static void start_ep0(struct r8a66597_ep *ep, struct r8a66597_request *req)
+
+@@ -554,7 +567,8 @@ static void start_ep0(struct r8a66597_ep
control_end(ep->r8a66597, 0);
break;
default:
@@ -191,7 +189,7 @@ index 3450038..fd9ce15 100644
break;
}
}
-@@ -708,7 +722,8 @@ static void irq_ep0_write(struct r8a66597_ep *ep, struct r8a66597_request *req)
+@@ -708,7 +722,8 @@ static void irq_ep0_write(struct r8a6659
do {
tmp = r8a66597_read(r8a66597, ep->fifoctr);
if (i++ > 100000) {
@@ -201,7 +199,7 @@ index 3450038..fd9ce15 100644
"conflict. please power off this controller.");
return;
}
-@@ -759,7 +774,8 @@ static void irq_packet_write(struct r8a66597_ep *ep,
+@@ -759,7 +774,8 @@ static void irq_packet_write(struct r8a6
if (unlikely((tmp & FRDY) == 0)) {
pipe_stop(r8a66597, pipenum);
pipe_irq_disable(r8a66597, pipenum);
@@ -210,8 +208,8 @@ index 3450038..fd9ce15 100644
+ "write fifo not ready. pipnum=%d\n", pipenum);
return;
}
-
-@@ -809,7 +825,7 @@ static void irq_packet_read(struct r8a66597_ep *ep,
+
+@@ -809,7 +825,7 @@ static void irq_packet_read(struct r8a66
req->req.status = -EPIPE;
pipe_stop(r8a66597, pipenum);
pipe_irq_disable(r8a66597, pipenum);
@@ -219,8 +217,8 @@ index 3450038..fd9ce15 100644
+ dev_err(r8a66597_to_dev(r8a66597), "read fifo not ready");
return;
}
-
-@@ -1085,7 +1101,7 @@ static void r8a66597_update_usb_speed(struct r8a66597 *r8a66597)
+
+@@ -1085,7 +1101,7 @@ static void r8a66597_update_usb_speed(st
break;
default:
r8a66597->gadget.speed = USB_SPEED_UNKNOWN;
@@ -228,7 +226,7 @@ index 3450038..fd9ce15 100644
+ dev_err(r8a66597_to_dev(r8a66597), "USB speed unknown\n");
}
}
-
+
@@ -1148,7 +1164,8 @@ __acquires(r8a66597->lock)
control_end(r8a66597, 0);
break;
@@ -239,8 +237,8 @@ index 3450038..fd9ce15 100644
break;
}
}
-@@ -1448,13 +1465,15 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
-
+@@ -1448,13 +1465,15 @@ int usb_gadget_probe_driver(struct usb_g
+
retval = device_add(&r8a66597->gadget.dev);
if (retval) {
- printk(KERN_ERR "device_add error (%d)\n", retval);
@@ -248,7 +246,7 @@ index 3450038..fd9ce15 100644
+ retval);
goto error;
}
-
+
retval = bind(&r8a66597->gadget);
if (retval) {
- printk(KERN_ERR "bind to driver error (%d)\n", retval);
@@ -257,7 +255,7 @@ index 3450038..fd9ce15 100644
device_del(&r8a66597->gadget.dev);
goto error;
}
-@@ -1554,7 +1573,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
+@@ -1554,7 +1573,7 @@ static int __init r8a66597_probe(struct
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
ret = -ENODEV;
@@ -265,16 +263,16 @@ index 3450038..fd9ce15 100644
+ dev_err(&pdev->dev, "platform_get_resource error.\n");
goto clean_up;
}
-
-@@ -1564,14 +1583,14 @@ static int __init r8a66597_probe(struct platform_device *pdev)
-
+
+@@ -1564,14 +1583,14 @@ static int __init r8a66597_probe(struct
+
if (irq < 0) {
ret = -ENODEV;
- printk(KERN_ERR "platform_get_irq error.\n");
+ dev_err(&pdev->dev, "platform_get_irq error.\n");
goto clean_up;
}
-
+
reg = ioremap(res->start, resource_size(res));
if (reg == NULL) {
ret = -ENOMEM;
@@ -282,8 +280,8 @@ index 3450038..fd9ce15 100644
+ dev_err(&pdev->dev, "ioremap error.\n");
goto clean_up;
}
-
-@@ -1579,7 +1598,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
+
+@@ -1579,7 +1598,7 @@ static int __init r8a66597_probe(struct
r8a66597 = kzalloc(sizeof(struct r8a66597), GFP_KERNEL);
if (r8a66597 == NULL) {
ret = -ENOMEM;
@@ -291,8 +289,8 @@ index 3450038..fd9ce15 100644
+ dev_err(&pdev->dev, "kzalloc error\n");
goto clean_up;
}
-
-@@ -1621,7 +1640,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
+
+@@ -1621,7 +1640,7 @@ static int __init r8a66597_probe(struct
ret = request_irq(irq, r8a66597_irq, IRQF_SHARED,
udc_name, r8a66597);
if (ret < 0) {
@@ -300,9 +298,7 @@ index 3450038..fd9ce15 100644
+ dev_err(&pdev->dev, "request_irq error (%d)\n", ret);
goto clean_up2;
}
-
-diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h
-index f9ac2d7..832ee59 100644
+
--- a/drivers/usb/gadget/r8a66597-udc.h
+++ b/drivers/usb/gadget/r8a66597-udc.h
@@ -114,6 +114,7 @@ struct r8a66597 {
@@ -310,13 +306,6 @@ index f9ac2d7..832ee59 100644
container_of(_gadget, struct r8a66597, gadget)
#define r8a66597_to_gadget(r8a66597) (&r8a66597->gadget)
+#define r8a66597_to_dev(r8a66597) (r8a66597->gadget.dev.parent)
-
+
static inline u16 r8a66597_read(struct r8a66597 *r8a66597, unsigned long offset)
{
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
diff --git a/patches.r8a66597-udc/011-usb-gadget-r8a66597-udc-add-support-for-sudmac.patch b/patches.r8a66597-udc/011-usb-gadget-r8a66597-udc-add-support-for-sudmac.patch
index fa0335d7b72893..8a7a41d91eaea3 100644
--- a/patches.r8a66597-udc/011-usb-gadget-r8a66597-udc-add-support-for-sudmac.patch
+++ b/patches.r8a66597-udc/011-usb-gadget-r8a66597-udc-add-support-for-sudmac.patch
@@ -21,13 +21,11 @@ Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
- drivers/usb/gadget/r8a66597-udc.c | 364 +++++++++++++++++++++++++++++++++++--
- drivers/usb/gadget/r8a66597-udc.h | 26 +++-
+ drivers/usb/gadget/r8a66597-udc.c | 364 ++++++++++++++++++++++++++++++++++++--
+ drivers/usb/gadget/r8a66597-udc.h | 26 ++
include/linux/usb/r8a66597.h | 60 ++++++
3 files changed, 430 insertions(+), 20 deletions(-)
-diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
-index fd9ce15..7f37a2a 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
@@ -18,13 +18,14 @@
@@ -35,21 +33,21 @@ index fd9ce15..7f37a2a 100644
#include <linux/err.h>
#include <linux/slab.h>
+#include <linux/dma-mapping.h>
-
+
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
-
+
#include "r8a66597-udc.h"
-
+
-#define DRIVER_VERSION "2009-08-18"
+#define DRIVER_VERSION "2011-09-26"
-
+
static const char udc_name[] = "r8a66597_udc";
static const char *r8a66597_ep_name[] = {
-@@ -184,6 +185,54 @@ static inline void control_reg_sqclr(struct r8a66597 *r8a66597, u16 pipenum)
+@@ -184,6 +185,54 @@ static inline void control_reg_sqclr(str
}
}
-
+
+static void control_reg_sqset(struct r8a66597 *r8a66597, u16 pipenum)
+{
+ unsigned long offset;
@@ -101,10 +99,10 @@ index fd9ce15..7f37a2a 100644
static inline int get_buffer_size(struct r8a66597 *r8a66597, u16 pipenum)
{
u16 tmp;
-@@ -220,18 +269,51 @@ static inline unsigned short mbw_value(struct r8a66597 *r8a66597)
+@@ -220,18 +269,51 @@ static inline unsigned short mbw_value(s
return MBW_16;
}
-
+
+static void r8a66597_change_curpipe(struct r8a66597 *r8a66597, u16 pipenum,
+ u16 isel, u16 fifosel)
+{
@@ -135,15 +133,15 @@ index fd9ce15..7f37a2a 100644
static inline void pipe_change(struct r8a66597 *r8a66597, u16 pipenum)
{
struct r8a66597_ep *ep = r8a66597->pipenum2ep[pipenum];
-
+
if (ep->use_dma)
- return;
+ r8a66597_bclr(r8a66597, DREQE, ep->fifosel);
-
+
r8a66597_mdfy(r8a66597, pipenum, CURPIPE, ep->fifosel);
-
+
ndelay(450);
-
+
- r8a66597_bset(r8a66597, mbw_value(r8a66597), ep->fifosel);
+ if (r8a66597_is_sudmac(r8a66597) && ep->use_dma)
+ r8a66597_bclr(r8a66597, mbw_value(r8a66597), ep->fifosel);
@@ -153,14 +151,14 @@ index fd9ce15..7f37a2a 100644
+ if (ep->use_dma)
+ r8a66597_bset(r8a66597, DREQE, ep->fifosel);
}
-
+
static int pipe_buffer_setting(struct r8a66597 *r8a66597,
-@@ -336,9 +418,15 @@ static void r8a66597_ep_setting(struct r8a66597 *r8a66597,
+@@ -336,9 +418,15 @@ static void r8a66597_ep_setting(struct r
ep->fifoaddr = CFIFO;
ep->fifosel = CFIFOSEL;
ep->fifoctr = CFIFOCTR;
- ep->fifotrn = 0;
-
+
ep->pipectr = get_pipectr_addr(pipenum);
+ if (is_bulk_pipe(pipenum) || is_isoc_pipe(pipenum)) {
+ ep->pipetre = get_pipetre_addr(pipenum);
@@ -172,10 +170,10 @@ index fd9ce15..7f37a2a 100644
ep->pipenum = pipenum;
ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize);
r8a66597->pipenum2ep[pipenum] = ep;
-@@ -498,6 +586,124 @@ static void start_ep0_write(struct r8a66597_ep *ep,
+@@ -498,6 +586,124 @@ static void start_ep0_write(struct r8a66
}
}
-
+
+static void disable_fifosel(struct r8a66597 *r8a66597, u16 pipenum,
+ u16 fifosel)
+{
@@ -297,10 +295,10 @@ index fd9ce15..7f37a2a 100644
static void start_packet_write(struct r8a66597_ep *ep,
struct r8a66597_request *req)
{
-@@ -508,11 +714,29 @@ static void start_packet_write(struct r8a66597_ep *ep,
+@@ -508,11 +714,29 @@ static void start_packet_write(struct r8
disable_irq_empty(r8a66597, ep->pipenum);
pipe_start(r8a66597, ep->pipenum);
-
+
- tmp = r8a66597_read(r8a66597, ep->fifoctr);
- if (unlikely((tmp & FRDY) == 0))
- pipe_irq_enable(r8a66597, ep->pipenum);
@@ -330,9 +328,9 @@ index fd9ce15..7f37a2a 100644
+ }
+ }
}
-
+
static void start_packet_read(struct r8a66597_ep *ep,
-@@ -527,17 +751,26 @@ static void start_packet_read(struct r8a66597_ep *ep,
+@@ -527,17 +751,26 @@ static void start_packet_read(struct r8a
pipe_start(r8a66597, pipenum);
pipe_irq_enable(r8a66597, pipenum);
} else {
@@ -367,11 +365,11 @@ index fd9ce15..7f37a2a 100644
- pipe_irq_enable(r8a66597, pipenum);
}
}
-
+
@@ -694,6 +927,9 @@ __acquires(r8a66597->lock)
if (!list_empty(&ep->queue))
restart = 1;
-
+
+ if (ep->use_dma)
+ sudmac_free_channel(ep->r8a66597, ep, req);
+
@@ -381,7 +379,7 @@ index fd9ce15..7f37a2a 100644
@@ -1170,6 +1406,65 @@ __acquires(r8a66597->lock)
}
}
-
+
+static void sudmac_finish(struct r8a66597 *r8a66597, struct r8a66597_ep *ep)
+{
+ u16 pipenum;
@@ -444,18 +442,18 @@ index fd9ce15..7f37a2a 100644
static irqreturn_t r8a66597_irq(int irq, void *_r8a66597)
{
struct r8a66597 *r8a66597 = _r8a66597;
-@@ -1180,6 +1475,9 @@ static irqreturn_t r8a66597_irq(int irq, void *_r8a66597)
+@@ -1180,6 +1475,9 @@ static irqreturn_t r8a66597_irq(int irq,
u16 savepipe;
u16 mask0;
-
+
+ if (r8a66597_is_sudmac(r8a66597))
+ r8a66597_sudmac_irq(r8a66597);
+
spin_lock(&r8a66597->lock);
-
+
intsts0 = r8a66597_read(r8a66597, INTSTS0);
-@@ -1541,6 +1839,8 @@ static int __exit r8a66597_remove(struct platform_device *pdev)
-
+@@ -1541,6 +1839,8 @@ static int __exit r8a66597_remove(struct
+
del_timer_sync(&r8a66597->timer);
iounmap(r8a66597->reg);
+ if (r8a66597->pdata->sudmac)
@@ -463,10 +461,10 @@ index fd9ce15..7f37a2a 100644
free_irq(platform_get_irq(pdev, 0), r8a66597);
r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req);
#ifdef CONFIG_HAVE_CLK
-@@ -1557,6 +1857,26 @@ static void nop_completion(struct usb_ep *ep, struct usb_request *r)
+@@ -1557,6 +1857,26 @@ static void nop_completion(struct usb_ep
{
}
-
+
+static int __init r8a66597_sudmac_ioremap(struct r8a66597 *r8a66597,
+ struct platform_device *pdev)
+{
@@ -490,7 +488,7 @@ index fd9ce15..7f37a2a 100644
static int __init r8a66597_probe(struct platform_device *pdev)
{
#ifdef CONFIG_HAVE_CLK
-@@ -1634,6 +1954,11 @@ static int __init r8a66597_probe(struct platform_device *pdev)
+@@ -1634,6 +1954,11 @@ static int __init r8a66597_probe(struct
clk_enable(r8a66597->clk);
}
#endif
@@ -499,10 +497,10 @@ index fd9ce15..7f37a2a 100644
+ if (ret < 0)
+ goto clean_up2;
+ }
-
+
disable_controller(r8a66597); /* make sure controller is disabled */
-
-@@ -1666,7 +1991,6 @@ static int __init r8a66597_probe(struct platform_device *pdev)
+
+@@ -1666,7 +1991,6 @@ static int __init r8a66597_probe(struct
r8a66597->ep[0].fifoaddr = CFIFO;
r8a66597->ep[0].fifosel = CFIFOSEL;
r8a66597->ep[0].fifoctr = CFIFOCTR;
@@ -519,14 +517,12 @@ index fd9ce15..7f37a2a 100644
if (r8a66597->ep0_req)
r8a66597_free_request(&r8a66597->ep[0].ep,
r8a66597->ep0_req);
-diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h
-index 832ee59..8e3de61 100644
--- a/drivers/usb/gadget/r8a66597-udc.h
+++ b/drivers/usb/gadget/r8a66597-udc.h
@@ -43,6 +43,7 @@
((pipenum >= R8A66597_BASE_PIPENUM_ISOC) && \
(pipenum < (R8A66597_BASE_PIPENUM_ISOC + R8A66597_MAX_NUM_ISOC)))
-
+
+#define r8a66597_is_sudmac(r8a66597) (r8a66597->pdata->sudmac)
struct r8a66597_pipe_info {
u16 pipe;
@@ -536,7 +532,7 @@ index 832ee59..8e3de61 100644
struct usb_ep ep;
struct r8a66597 *r8a66597;
+ struct r8a66597_dma *dma;
-
+
struct list_head queue;
unsigned busy:1;
@@ -75,13 +77,20 @@ struct r8a66597_ep {
@@ -553,12 +549,12 @@ index 832ee59..8e3de61 100644
+ unsigned used:1;
+ unsigned dir:1; /* 1 = IN(write), 0 = OUT(read) */
};
-
+
struct r8a66597 {
spinlock_t lock;
void __iomem *reg;
+ void __iomem *sudmac_reg;
-
+
#ifdef CONFIG_HAVE_CLK
struct clk *clk;
@@ -94,6 +103,7 @@ struct r8a66597 {
@@ -566,13 +562,13 @@ index 832ee59..8e3de61 100644
struct r8a66597_ep *pipenum2ep[R8A66597_MAX_NUM_PIPE];
struct r8a66597_ep *epaddr2ep[16];
+ struct r8a66597_dma dma;
-
+
struct timer_list timer;
struct usb_request *ep0_req; /* for internal request */
-@@ -251,7 +261,21 @@ static inline u16 get_xtal_from_pdata(struct r8a66597_platdata *pdata)
+@@ -251,7 +261,21 @@ static inline u16 get_xtal_from_pdata(st
return clock;
}
-
+
+static inline u32 r8a66597_sudmac_read(struct r8a66597 *r8a66597,
+ unsigned long offset)
+{
@@ -588,27 +584,25 @@ index 832ee59..8e3de61 100644
#define get_pipectr_addr(pipenum) (PIPE1CTR + (pipenum - 1) * 2)
+#define get_pipetre_addr(pipenum) (PIPE1TRE + (pipenum - 1) * 4)
+#define get_pipetrn_addr(pipenum) (PIPE1TRN + (pipenum - 1) * 4)
-
+
#define enable_irq_ready(r8a66597, pipenum) \
enable_pipe_irq(r8a66597, pipenum, BRDYENB)
-diff --git a/include/linux/usb/r8a66597.h b/include/linux/usb/r8a66597.h
-index 7cd89e7..1f5ef88 100644
--- a/include/linux/usb/r8a66597.h
+++ b/include/linux/usb/r8a66597.h
@@ -48,6 +48,9 @@ struct r8a66597_platdata {
-
+
/* (external controller only) set one = WR0_N shorted to WR1_N */
unsigned wr0_shorted_to_wr1:1;
+
+ /* set one = using SUDMAC */
+ unsigned sudmac:1;
};
-
+
/* Register definitions */
@@ -417,5 +420,62 @@ struct r8a66597_platdata {
#define USBSPD 0x00C0
#define RTPORT 0x0001
-
+
+/* SUDMAC registers */
+#define CH0CFG 0x00
+#define CH1CFG 0x04
@@ -667,11 +661,4 @@ index 7cd89e7..1f5ef88 100644
+#define CH0ENDC 0x0001 /* b1: Ch0 DMA Transfer End Int Stat Clear */
+
#endif /* __LINUX_USB_R8A66597_H */
-
---
-1.7.1
-_______________________________________________
-LTSI-dev mailing list
-LTSI-dev@lists.linuxfoundation.org
-https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev
-
+
diff --git a/patches.sh7757lcr/drivers-sh-generalize-runtime-pm-platform-stub.patch b/patches.sh7757lcr/drivers-sh-generalize-runtime-pm-platform-stub.patch
new file mode 100644
index 00000000000000..f9d1a536719b3a
--- /dev/null
+++ b/patches.sh7757lcr/drivers-sh-generalize-runtime-pm-platform-stub.patch
@@ -0,0 +1,198 @@
+From ltsi-dev-bounces@lists.linuxfoundation.org Tue Jul 10 22:13:21 2012
+From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
+Date: Wed, 11 Jul 2012 14:13:16 +0900
+Subject: drivers: sh: Generalize runtime PM platform stub.
+To: ltsi-dev@lists.linuxfoundation.org
+Message-ID: <4FFD0B6C.1060006@renesas.com>
+
+
+>From 11b01cfe8fbb175d81f1049e7c265d5618234357 Mon Sep 17 00:00:00 2001
+From: Paul Mundt <lethal@linux-sh.org>
+Date: Fri, 11 Nov 2011 15:41:50 +0900
+Subject: drivers: sh: Generalize runtime PM platform stub.
+
+The runtime PM platform support stub in use by ARM-based SH/R-Mobile
+platforms contains nothing that's specifically ARM-related and instead of
+wholly generic to anything using the clock framework.
+
+The recent runtime PM changes interact rather badly with the lazy
+disabling of clocks late in the boot process through the clock framework,
+leading to situations where the runtime suspend/resume paths are entered
+without a clock being actively driven due to having been lazily gated
+off.
+
+In order to correct this we can trivially tie in the aforementioned stub
+as a general fallback for all SH platforms that don't presently have
+their own runtime PM implementations (the corner case being SH-based
+SH-Mobile platforms, which have their own stub through the hwblk API --
+which in turn has bitrotted and will be subsequently adapted to use the
+same stub as everyone else), regardless of whether the platforms choose
+to define power domains of their own or not.
+
+This fixes up regressions for clock framework users who also build in
+runtime PM support without any specific power domains of their own, which
+was previously causing the serial console to be lost when warring with
+lazy clock disabling.
+
+Signed-off-by: Paul Mundt <lethal@linux-sh.org>
+(cherry picked from commit 750a7eee7395492960a7aeb3a3a1aa74158ec326)
+Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Tested-by: Simon Horman <horms@verge.net.au>
+---
+ arch/arm/mach-shmobile/Makefile | 2 -
+ arch/arm/mach-shmobile/pm_runtime.c | 59 ------------------------------------
+ drivers/sh/Makefile | 8 ++++
+ drivers/sh/pm_runtime.c | 59 ++++++++++++++++++++++++++++++++++++
+ 4 files changed, 68 insertions(+), 60 deletions(-)
+ delete mode 100644 arch/arm/mach-shmobile/pm_runtime.c
+ create mode 100644 drivers/sh/pm_runtime.c
+
+--- a/arch/arm/mach-shmobile/Makefile
++++ b/arch/arm/mach-shmobile/Makefile
+@@ -3,7 +3,7 @@
+ #
+
+ # Common objects
+-obj-y := timer.o console.o clock.o pm_runtime.o
++obj-y := timer.o console.o clock.o
+
+ # CPU objects
+ obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
+--- a/arch/arm/mach-shmobile/pm_runtime.c
++++ /dev/null
+@@ -1,59 +0,0 @@
+-/*
+- * arch/arm/mach-shmobile/pm_runtime.c
+- *
+- * Runtime PM support code for SuperH Mobile ARM
+- *
+- * Copyright (C) 2009-2010 Magnus Damm
+- *
+- * This file is subject to the terms and conditions of the GNU General Public
+- * License. See the file "COPYING" in the main directory of this archive
+- * for more details.
+- */
+-
+-#include <linux/init.h>
+-#include <linux/kernel.h>
+-#include <linux/io.h>
+-#include <linux/pm_runtime.h>
+-#include <linux/pm_clock.h>
+-#include <linux/platform_device.h>
+-#include <linux/clk.h>
+-#include <linux/sh_clk.h>
+-#include <linux/bitmap.h>
+-#include <linux/slab.h>
+-
+-#ifdef CONFIG_PM_RUNTIME
+-
+-static int default_platform_runtime_idle(struct device *dev)
+-{
+- /* suspend synchronously to disable clocks immediately */
+- return pm_runtime_suspend(dev);
+-}
+-
+-static struct dev_pm_domain default_pm_domain = {
+- .ops = {
+- .runtime_suspend = pm_clk_suspend,
+- .runtime_resume = pm_clk_resume,
+- .runtime_idle = default_platform_runtime_idle,
+- USE_PLATFORM_PM_SLEEP_OPS
+- },
+-};
+-
+-#define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain)
+-
+-#else
+-
+-#define DEFAULT_PM_DOMAIN_PTR NULL
+-
+-#endif /* CONFIG_PM_RUNTIME */
+-
+-static struct pm_clk_notifier_block platform_bus_notifier = {
+- .pm_domain = DEFAULT_PM_DOMAIN_PTR,
+- .con_ids = { NULL, },
+-};
+-
+-static int __init sh_pm_runtime_init(void)
+-{
+- pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
+- return 0;
+-}
+-core_initcall(sh_pm_runtime_init);
+--- a/drivers/sh/Makefile
++++ b/drivers/sh/Makefile
+@@ -7,3 +7,11 @@ obj-$(CONFIG_HAVE_CLK) += clk/
+ obj-$(CONFIG_MAPLE) += maple/
+ obj-$(CONFIG_SUPERHYWAY) += superhyway/
+ obj-$(CONFIG_GENERIC_GPIO) += pfc.o
++
++#
++# For the moment we only use this framework for ARM-based SH/R-Mobile
++# platforms and generic SH. SH-based SH-Mobile platforms are still using
++# an older framework that is pending up-porting, at which point this
++# special casing can go away.
++#
++obj-$(CONFIG_SUPERH)$(CONFIG_ARCH_SHMOBILE) += pm_runtime.o
+--- /dev/null
++++ b/drivers/sh/pm_runtime.c
+@@ -0,0 +1,59 @@
++/*
++ * arch/arm/mach-shmobile/pm_runtime.c
++ *
++ * Runtime PM support code for SuperH Mobile ARM
++ *
++ * Copyright (C) 2009-2010 Magnus Damm
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file "COPYING" in the main directory of this archive
++ * for more details.
++ */
++
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/io.h>
++#include <linux/pm_runtime.h>
++#include <linux/pm_clock.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/sh_clk.h>
++#include <linux/bitmap.h>
++#include <linux/slab.h>
++
++#ifdef CONFIG_PM_RUNTIME
++
++static int default_platform_runtime_idle(struct device *dev)
++{
++ /* suspend synchronously to disable clocks immediately */
++ return pm_runtime_suspend(dev);
++}
++
++static struct dev_pm_domain default_pm_domain = {
++ .ops = {
++ .runtime_suspend = pm_clk_suspend,
++ .runtime_resume = pm_clk_resume,
++ .runtime_idle = default_platform_runtime_idle,
++ USE_PLATFORM_PM_SLEEP_OPS
++ },
++};
++
++#define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain)
++
++#else
++
++#define DEFAULT_PM_DOMAIN_PTR NULL
++
++#endif /* CONFIG_PM_RUNTIME */
++
++static struct pm_clk_notifier_block platform_bus_notifier = {
++ .pm_domain = DEFAULT_PM_DOMAIN_PTR,
++ .con_ids = { NULL, },
++};
++
++static int __init sh_pm_runtime_init(void)
++{
++ pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
++ return 0;
++}
++core_initcall(sh_pm_runtime_init);
diff --git a/patches.sh7757lcr/sh-also-without-pm_runtime-pm_runtime.o-must-be-built.patch b/patches.sh7757lcr/sh-also-without-pm_runtime-pm_runtime.o-must-be-built.patch
new file mode 100644
index 00000000000000..32a8aee0d9bab4
--- /dev/null
+++ b/patches.sh7757lcr/sh-also-without-pm_runtime-pm_runtime.o-must-be-built.patch
@@ -0,0 +1,41 @@
+From ltsi-dev-bounces@lists.linuxfoundation.org Tue Jul 10 22:13:24 2012
+From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
+Date: Wed, 11 Jul 2012 14:13:20 +0900
+Subject: sh: also without PM_RUNTIME pm_runtime.o must be built
+To: ltsi-dev@lists.linuxfoundation.org
+Message-ID: <4FFD0B70.1010608@renesas.com>
+
+
+>From c219336ade79e8ce6f70b527c20391a239278ce3 Mon Sep 17 00:00:00 2001
+From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Date: Tue, 10 Jan 2012 16:04:11 +0100
+Subject: sh: also without PM_RUNTIME pm_runtime.o must be built
+
+When CONFIG_PM_RUNTIME is off, drivers/sh/pm_runtime.o still has to be
+built on sh platforms, because then it provides means to statically
+switch on device PM clocks.
+
+Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Signed-off-by: Paul Mundt <lethal@linux-sh.org>
+(cherry picked from commit d3442b2bb7ce4089fadcf483b8ae9766ab480238)
+Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Tested-by: Simon Horman <horms@verge.net.au>
+---
+ drivers/sh/Makefile | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+--- a/drivers/sh/Makefile
++++ b/drivers/sh/Makefile
+@@ -7,11 +7,4 @@ obj-$(CONFIG_HAVE_CLK) += clk/
+ obj-$(CONFIG_MAPLE) += maple/
+ obj-$(CONFIG_SUPERHYWAY) += superhyway/
+ obj-$(CONFIG_GENERIC_GPIO) += pfc.o
+-
+-#
+-# For the moment we only use this framework for ARM-based SH/R-Mobile
+-# platforms and generic SH. SH-based SH-Mobile platforms are still using
+-# an older framework that is pending up-porting, at which point this
+-# special casing can go away.
+-#
+-obj-$(CONFIG_SUPERH)$(CONFIG_ARCH_SHMOBILE) += pm_runtime.o
++obj-y += pm_runtime.o
diff --git a/patches.sh7757lcr/sh-fix-clock-sh7757-for-the-latest-sh_mobile_sdhi-driver.patch b/patches.sh7757lcr/sh-fix-clock-sh7757-for-the-latest-sh_mobile_sdhi-driver.patch
new file mode 100644
index 00000000000000..89f047dddc9c60
--- /dev/null
+++ b/patches.sh7757lcr/sh-fix-clock-sh7757-for-the-latest-sh_mobile_sdhi-driver.patch
@@ -0,0 +1,41 @@
+From ltsi-dev-bounces@lists.linuxfoundation.org Tue Jul 10 22:14:44 2012
+From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
+Date: Wed, 11 Jul 2012 14:13:25 +0900
+Subject: sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver
+To: ltsi-dev@lists.linuxfoundation.org
+Message-ID: <4FFD0B75.1040907@renesas.com>
+
+
+>From 87fa88ba8cdcd7425e8d941fef3e5a904da37cc8 Mon Sep 17 00:00:00 2001
+From: Shimoda, Yoshihiro <yoshihiro.shimoda.uh@renesas.com>
+Date: Wed, 4 Apr 2012 11:56:07 +0900
+Subject: sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver
+
+The commit 996bc8aebd2cd5b6d4c5d85085f171fa2447f364 (mmc: sh_mobile_sdhi:
+do not manage PM clocks manually) modified the sh_mobile_sdhi driver to
+remove the clk_enable/clk_disable. So, we need to change
+the "CLKDEV_CON_ID" to "CLKDEV_DEV_ID".
+
+If we don't change this, we will see the following error from the driver:
+ sh_mobile_sdhi sh_mobile_sdhi.0: timeout waiting for hardware interrupt (CMD52)
+
+Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Signed-off-by: Paul Mundt <lethal@linux-sh.org>
+(cherry picked from commit a052d2c31b7b87e9b4bdee634af666b5e830e56f)
+Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Tested-by: Simon Horman <horms@verge.net.au>
+---
+ arch/sh/kernel/cpu/sh4a/clock-sh7757.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
++++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
+@@ -113,7 +113,7 @@ static struct clk_lookup lookups[] = {
+ CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]),
+
+ /* MSTP32 clocks */
+- CLKDEV_CON_ID("sdhi0", &mstp_clks[MSTP004]),
++ CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP004]),
+ CLKDEV_CON_ID("riic0", &mstp_clks[MSTP000]),
+ CLKDEV_CON_ID("riic1", &mstp_clks[MSTP000]),
+ CLKDEV_CON_ID("riic2", &mstp_clks[MSTP000]),
diff --git a/series b/series
index 1f2fdc5db9fddf..e83c375df44575 100644
--- a/series
+++ b/series
@@ -904,6 +904,9 @@ patches.sh7757lcr/018-sh-fix-the-sh_mmcif_plat_data-in-board-sh7757lcr.patch
patches.sh7757lcr/019-sh-modify-a-resource-of-sh_eth_giga1_resources-in-board-sh7757lcr.patch
patches.sh7757lcr/020-sh-kexec-register-crashk_res.patch
patches.sh7757lcr/021-sh-kexec-add-physical_start.patch
+patches.sh7757lcr/drivers-sh-generalize-runtime-pm-platform-stub.patch
+patches.sh7757lcr/sh-also-without-pm_runtime-pm_runtime.o-must-be-built.patch
+patches.sh7757lcr/sh-fix-clock-sh7757-for-the-latest-sh_mobile_sdhi-driver.patch
patches.r8a66597-udc/001-usb-gadget-add-platform-module-alias-where-it-is-missing.patch