aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-06 07:19:28 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-07-06 07:19:28 -0400
commit7119888df1fd115573616ae43747b2e823b0663e (patch)
treecfe0c769b4e7bf8323d1958c46590d6200516a29 /drivers
parentc652d780c9cf7f860141de232b37160fe013feca (diff)
parent0f60bb25b4036d30fd795709be09626c58c52464 (diff)
Merge branches 'sh/ftrace' and 'sh/cachetlb'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/sh-sci.c7
-rw-r--r--drivers/usb/gadget/m66592-udc.c34
-rw-r--r--drivers/usb/gadget/m66592-udc.h1
-rw-r--r--drivers/usb/host/Kconfig4
4 files changed, 18 insertions, 28 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 66f52674ca0c..12bd64684f12 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -707,12 +707,13 @@ static irqreturn_t sci_br_interrupt(int irq, void *ptr)
707 707
708static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) 708static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
709{ 709{
710 unsigned short ssr_status, scr_status; 710 unsigned short ssr_status, scr_status, err_enabled;
711 struct uart_port *port = ptr; 711 struct uart_port *port = ptr;
712 irqreturn_t ret = IRQ_NONE; 712 irqreturn_t ret = IRQ_NONE;
713 713
714 ssr_status = sci_in(port, SCxSR); 714 ssr_status = sci_in(port, SCxSR);
715 scr_status = sci_in(port, SCSCR); 715 scr_status = sci_in(port, SCSCR);
716 err_enabled = scr_status & (SCI_CTRL_FLAGS_REIE | SCI_CTRL_FLAGS_RIE);
716 717
717 /* Tx Interrupt */ 718 /* Tx Interrupt */
718 if ((ssr_status & 0x0020) && (scr_status & SCI_CTRL_FLAGS_TIE)) 719 if ((ssr_status & 0x0020) && (scr_status & SCI_CTRL_FLAGS_TIE))
@@ -721,10 +722,10 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
721 if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE)) 722 if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE))
722 ret = sci_rx_interrupt(irq, ptr); 723 ret = sci_rx_interrupt(irq, ptr);
723 /* Error Interrupt */ 724 /* Error Interrupt */
724 if ((ssr_status & 0x0080) && (scr_status & SCI_CTRL_FLAGS_REIE)) 725 if ((ssr_status & 0x0080) && err_enabled)
725 ret = sci_er_interrupt(irq, ptr); 726 ret = sci_er_interrupt(irq, ptr);
726 /* Break Interrupt */ 727 /* Break Interrupt */
727 if ((ssr_status & 0x0010) && (scr_status & SCI_CTRL_FLAGS_REIE)) 728 if ((ssr_status & 0x0010) && err_enabled)
728 ret = sci_br_interrupt(irq, ptr); 729 ret = sci_br_interrupt(irq, ptr);
729 730
730 return ret; 731 return ret;
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index 43dcf9e1af6b..0dddd2f8ff35 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
37MODULE_AUTHOR("Yoshihiro Shimoda"); 37MODULE_AUTHOR("Yoshihiro Shimoda");
38MODULE_ALIAS("platform:m66592_udc"); 38MODULE_ALIAS("platform:m66592_udc");
39 39
40#define DRIVER_VERSION "18 Oct 2007" 40#define DRIVER_VERSION "26 Jun 2009"
41 41
42/* module parameters */ 42/* module parameters */
43#if defined(CONFIG_SUPERH_BUILT_IN_M66592) 43#if defined(CONFIG_SUPERH_BUILT_IN_M66592)
@@ -276,24 +276,27 @@ static int pipe_buffer_setting(struct m66592 *m66592,
276 buf_bsize = 0; 276 buf_bsize = 0;
277 break; 277 break;
278 case M66592_BULK: 278 case M66592_BULK:
279 bufnum = m66592->bi_bufnum + 279 /* isochronous pipes may be used as bulk pipes */
280 (info->pipe - M66592_BASE_PIPENUM_BULK) * 16; 280 if (info->pipe > M66592_BASE_PIPENUM_BULK)
281 m66592->bi_bufnum += 16; 281 bufnum = info->pipe - M66592_BASE_PIPENUM_BULK;
282 else
283 bufnum = info->pipe - M66592_BASE_PIPENUM_ISOC;
284
285 bufnum = M66592_BASE_BUFNUM + (bufnum * 16);
282 buf_bsize = 7; 286 buf_bsize = 7;
283 pipecfg |= M66592_DBLB; 287 pipecfg |= M66592_DBLB;
284 if (!info->dir_in) 288 if (!info->dir_in)
285 pipecfg |= M66592_SHTNAK; 289 pipecfg |= M66592_SHTNAK;
286 break; 290 break;
287 case M66592_ISO: 291 case M66592_ISO:
288 bufnum = m66592->bi_bufnum + 292 bufnum = M66592_BASE_BUFNUM +
289 (info->pipe - M66592_BASE_PIPENUM_ISOC) * 16; 293 (info->pipe - M66592_BASE_PIPENUM_ISOC) * 16;
290 m66592->bi_bufnum += 16;
291 buf_bsize = 7; 294 buf_bsize = 7;
292 break; 295 break;
293 } 296 }
294 if (m66592->bi_bufnum > M66592_MAX_BUFNUM) { 297
295 pr_err("m66592 pipe memory is insufficient(%d)\n", 298 if (buf_bsize && ((bufnum + 16) >= M66592_MAX_BUFNUM)) {
296 m66592->bi_bufnum); 299 pr_err("m66592 pipe memory is insufficient\n");
297 return -ENOMEM; 300 return -ENOMEM;
298 } 301 }
299 302
@@ -313,17 +316,6 @@ static void pipe_buffer_release(struct m66592 *m66592,
313 if (info->pipe == 0) 316 if (info->pipe == 0)
314 return; 317 return;
315 318
316 switch (info->type) {
317 case M66592_BULK:
318 if (is_bulk_pipe(info->pipe))
319 m66592->bi_bufnum -= 16;
320 break;
321 case M66592_ISO:
322 if (is_isoc_pipe(info->pipe))
323 m66592->bi_bufnum -= 16;
324 break;
325 }
326
327 if (is_bulk_pipe(info->pipe)) { 319 if (is_bulk_pipe(info->pipe)) {
328 m66592->bulk--; 320 m66592->bulk--;
329 } else if (is_interrupt_pipe(info->pipe)) 321 } else if (is_interrupt_pipe(info->pipe))
@@ -1603,8 +1595,6 @@ static int __init m66592_probe(struct platform_device *pdev)
1603 m66592->timer.data = (unsigned long)m66592; 1595 m66592->timer.data = (unsigned long)m66592;
1604 m66592->reg = reg; 1596 m66592->reg = reg;
1605 1597
1606 m66592->bi_bufnum = M66592_BASE_BUFNUM;
1607
1608 ret = request_irq(irq, m66592_irq, IRQF_DISABLED | IRQF_SHARED, 1598 ret = request_irq(irq, m66592_irq, IRQF_DISABLED | IRQF_SHARED,
1609 udc_name, m66592); 1599 udc_name, m66592);
1610 if (ret < 0) { 1600 if (ret < 0) {
diff --git a/drivers/usb/gadget/m66592-udc.h b/drivers/usb/gadget/m66592-udc.h
index 286ce07e7960..9a9c2bf9fbd5 100644
--- a/drivers/usb/gadget/m66592-udc.h
+++ b/drivers/usb/gadget/m66592-udc.h
@@ -506,7 +506,6 @@ struct m66592 {
506 int interrupt; 506 int interrupt;
507 int isochronous; 507 int isochronous;
508 int num_dma; 508 int num_dma;
509 int bi_bufnum; /* bulk and isochronous's bufnum */
510}; 509};
511 510
512#define gadget_to_m66592(_gadget) container_of(_gadget, struct m66592, gadget) 511#define gadget_to_m66592(_gadget) container_of(_gadget, struct m66592, gadget)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 1576a0520adf..0c03471f0d41 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -337,10 +337,10 @@ config USB_R8A66597_HCD
337 337
338config SUPERH_ON_CHIP_R8A66597 338config SUPERH_ON_CHIP_R8A66597
339 boolean "Enable SuperH on-chip R8A66597 USB" 339 boolean "Enable SuperH on-chip R8A66597 USB"
340 depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723) 340 depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7724)
341 help 341 help
342 This driver enables support for the on-chip R8A66597 in the 342 This driver enables support for the on-chip R8A66597 in the
343 SH7366 and SH7723 processors. 343 SH7366, SH7723 and SH7724 processors.
344 344
345config USB_WHCI_HCD 345config USB_WHCI_HCD
346 tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)" 346 tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)"