mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
usb: dwc_otg_310: fixed compilation error
Change-Id: I5f501184c11d25493f6855d994e32c1043371161 Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
2
drivers/usb/dwc_otg_310/dwc_otg_cil_intr.c
Executable file → Normal file
2
drivers/usb/dwc_otg_310/dwc_otg_cil_intr.c
Executable file → Normal file
@@ -507,7 +507,7 @@ static inline void rk_dwc_otg_phy_soft_reset(dwc_otg_core_if_t *core_if)
|
||||
pldata = core_if->otg_dev->pldata;
|
||||
guid.d32 = core_if->core_global_regs->guid;
|
||||
|
||||
if ((cpu_is_rk3288()) && ((guid.d32 & 0x01) == 0)) {
|
||||
if ((is_rk3288_usb()) && ((guid.d32 & 0x01) == 0)) {
|
||||
/* only used for HOST20, OTG HOST do not need.
|
||||
* first, do soft reset usb phy, and then usb phy
|
||||
* can drive resume signal.
|
||||
|
||||
@@ -1626,7 +1626,7 @@ void rk_usb_power_up(void)
|
||||
struct rkehci_platform_data *pldata_ehci;
|
||||
#endif
|
||||
|
||||
if (cpu_is_rk3288()) {
|
||||
if (is_rk3288_usb()) {
|
||||
#ifdef CONFIG_RK_USB_UART
|
||||
/* enable USB bypass UART function */
|
||||
writel_relaxed(0x00c00000 | usb_to_uart_status,
|
||||
@@ -1682,7 +1682,7 @@ void rk_usb_power_down(void)
|
||||
struct rkehci_platform_data *pldata_ehci;
|
||||
#endif
|
||||
|
||||
if (cpu_is_rk3288()) {
|
||||
if (is_rk3288_usb()) {
|
||||
#ifdef CONFIG_RK_USB_UART
|
||||
/* disable USB bypass UART function */
|
||||
usb_to_uart_status =
|
||||
|
||||
@@ -155,4 +155,13 @@ struct rkehci_pdata_id {
|
||||
char name[32];
|
||||
struct rkehci_platform_data *pdata;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARM
|
||||
int is_rk3288_usb(void);
|
||||
#else
|
||||
static inline int is_rk3288_usb(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
8
drivers/usb/dwc_otg_310/usbdev_rk32.c
Executable file → Normal file
8
drivers/usb/dwc_otg_310/usbdev_rk32.c
Executable file → Normal file
@@ -4,6 +4,14 @@
|
||||
#include "dwc_otg_regs.h"
|
||||
static struct dwc_otg_control_usb *control_usb;
|
||||
|
||||
int is_rk3288_usb(void)
|
||||
{
|
||||
if (!control_usb)
|
||||
return false;
|
||||
|
||||
return control_usb->chip_id == RK3288_USB_CTLR ? true : false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB20_OTG
|
||||
static void usb20otg_hw_init(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user