-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supports host only mode and the code is ported from host/xhci-mtk.c IPPC register shared between host and device is moved into common glue layer. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Chunfeng Yun
authored and
Greg Kroah-Hartman
committed
Oct 27, 2016
1 parent
a29de31
commit b3f4e72
Showing
7 changed files
with
691 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
obj-$(CONFIG_USB_MTU3) += mtu3.o | ||
mtu3-y := mtu3_plat.o mtu3_core.o mtu3_gadget_ep0.o mtu3_gadget.o mtu3_qmu.o | ||
|
||
mtu3-y := mtu3_plat.o | ||
|
||
ifneq ($(filter y,$(CONFIG_USB_MTU3_HOST)),) | ||
mtu3-y += mtu3_host.o | ||
endif | ||
|
||
ifneq ($(filter y,$(CONFIG_USB_MTU3_GADGET)),) | ||
mtu3-y += mtu3_core.o mtu3_gadget_ep0.o mtu3_gadget.o mtu3_qmu.o | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* mtu3_dr.h - dual role switch and host glue layer header | ||
* | ||
* Copyright (C) 2016 MediaTek Inc. | ||
* | ||
* Author: Chunfeng Yun <chunfeng.yun@mediatek.com> | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
#ifndef _MTU3_DR_H_ | ||
#define _MTU3_DR_H_ | ||
|
||
#if IS_ENABLED(CONFIG_USB_MTU3_HOST) | ||
|
||
int ssusb_host_init(struct ssusb_mtk *ssusb, struct device_node *parent_dn); | ||
void ssusb_host_exit(struct ssusb_mtk *ssusb); | ||
int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb, | ||
struct device_node *dn); | ||
int ssusb_host_enable(struct ssusb_mtk *ssusb); | ||
int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend); | ||
int ssusb_wakeup_enable(struct ssusb_mtk *ssusb); | ||
void ssusb_wakeup_disable(struct ssusb_mtk *ssusb); | ||
|
||
#else | ||
|
||
static inline int ssusb_host_init(struct ssusb_mtk *ssusb, | ||
|
||
struct device_node *parent_dn) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline void ssusb_host_exit(struct ssusb_mtk *ssusb) | ||
{} | ||
|
||
static inline int ssusb_wakeup_of_property_parse( | ||
struct ssusb_mtk *ssusb, struct device_node *dn) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline int ssusb_host_enable(struct ssusb_mtk *ssusb) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline int ssusb_wakeup_enable(struct ssusb_mtk *ssusb) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline void ssusb_wakeup_disable(struct ssusb_mtk *ssusb) | ||
{} | ||
|
||
#endif | ||
|
||
|
||
#if IS_ENABLED(CONFIG_USB_MTU3_GADGET) | ||
int ssusb_gadget_init(struct ssusb_mtk *ssusb); | ||
void ssusb_gadget_exit(struct ssusb_mtk *ssusb); | ||
#else | ||
static inline int ssusb_gadget_init(struct ssusb_mtk *ssusb) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline void ssusb_gadget_exit(struct ssusb_mtk *ssusb) | ||
{} | ||
#endif | ||
|
||
#endif /* _MTU3_DR_H_ */ |
Oops, something went wrong.