Skip to content

Commit e9b29ff

Browse files
jacmetgregkh
authored andcommitted
USB: add Cypress c67x00 OTG controller HCD driver
This patch adds HCD support for the Cypress c67x00 family of devices. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent b02b371 commit e9b29ff

9 files changed

Lines changed: 1836 additions & 0 deletions

File tree

‎drivers/usb/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ obj-$(CONFIG_USB_SL811_HCD) += host/
1717
obj-$(CONFIG_USB_U132_HCD) += host/
1818
obj-$(CONFIG_USB_R8A66597_HCD) += host/
1919

20+
obj-$(CONFIG_USB_C67X00_HCD) += c67x00/
21+
2022
obj-$(CONFIG_USB_ACM) += class/
2123
obj-$(CONFIG_USB_PRINTER) += class/
2224

‎drivers/usb/c67x00/Makefile‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Makefile for Cypress C67X00 USB Controller
3+
#
4+
5+
ccflags-$(CONFIG_USB_DEBUG) += -DDEBUG
6+
7+
obj-$(CONFIG_USB_C67X00_HCD) += c67x00.o
8+
9+
c67x00-objs := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o

‎drivers/usb/c67x00/c67x00-drv.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <linux/usb/c67x00.h>
4242

4343
#include "c67x00.h"
44+
#include "c67x00-hcd.h"
4445

4546
static void c67x00_probe_sie(struct c67x00_sie *sie,
4647
struct c67x00_device *dev, int sie_num)
@@ -51,6 +52,10 @@ static void c67x00_probe_sie(struct c67x00_sie *sie,
5152
sie->mode = c67x00_sie_config(dev->pdata->sie_config, sie_num);
5253

5354
switch (sie->mode) {
55+
case C67X00_SIE_HOST:
56+
c67x00_hcd_probe(sie);
57+
break;
58+
5459
case C67X00_SIE_UNUSED:
5560
dev_info(sie_dev(sie),
5661
"Not using SIE %d as requested\n", sie->sie_num);
@@ -66,6 +71,14 @@ static void c67x00_probe_sie(struct c67x00_sie *sie,
6671

6772
static void c67x00_remove_sie(struct c67x00_sie *sie)
6873
{
74+
switch (sie->mode) {
75+
case C67X00_SIE_HOST:
76+
c67x00_hcd_remove(sie);
77+
break;
78+
79+
default:
80+
break;
81+
}
6982
}
7083

7184
static irqreturn_t c67x00_irq(int irq, void *__dev)

0 commit comments

Comments
 (0)