hcd.c (c9c394abfa8456808fd3a0083f7fd81c3188bd0c) | hcd.c (139fae7a08381c21026b05732e63c79018bb6c60) |
---|---|
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2/* 3 * hcd.c - DesignWare HS OTG Controller host-mode routines 4 * 5 * Copyright (C) 2004-2013 Synopsys, Inc. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 42 unchanged lines hidden (view full) --- 51#include <linux/usb.h> 52 53#include <linux/usb/hcd.h> 54#include <linux/usb/ch11.h> 55 56#include "core.h" 57#include "hcd.h" 58 | 1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2/* 3 * hcd.c - DesignWare HS OTG Controller host-mode routines 4 * 5 * Copyright (C) 2004-2013 Synopsys, Inc. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 42 unchanged lines hidden (view full) --- 51#include <linux/usb.h> 52 53#include <linux/usb/hcd.h> 54#include <linux/usb/ch11.h> 55 56#include "core.h" 57#include "hcd.h" 58 |
59static void dwc2_port_resume(struct dwc2_hsotg *hsotg); 60 | |
61/* 62 * ========================================================================= 63 * Host Core Layer Functions 64 * ========================================================================= 65 */ 66 67/** 68 * dwc2_enable_common_interrupts() - Initializes the commmon interrupts, --- 3203 unchanged lines hidden (view full) --- 3272 3273static int dwc2_host_is_b_hnp_enabled(struct dwc2_hsotg *hsotg) 3274{ 3275 struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); 3276 3277 return hcd->self.b_hnp_enable; 3278} 3279 | 59/* 60 * ========================================================================= 61 * Host Core Layer Functions 62 * ========================================================================= 63 */ 64 65/** 66 * dwc2_enable_common_interrupts() - Initializes the commmon interrupts, --- 3203 unchanged lines hidden (view full) --- 3270 3271static int dwc2_host_is_b_hnp_enabled(struct dwc2_hsotg *hsotg) 3272{ 3273 struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); 3274 3275 return hcd->self.b_hnp_enable; 3276} 3277 |
3280/* Must NOT be called with interrupt disabled or spinlock held */ 3281static void dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex) | 3278/** 3279 * dwc2_port_suspend() - Put controller in suspend mode for host. 3280 * 3281 * @hsotg: Programming view of the DWC_otg controller 3282 * @windex: The control request wIndex field 3283 * 3284 * This function is for entering Host mode suspend. 3285 * Must NOT be called with interrupt disabled or spinlock held. 3286 */ 3287void dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex) |
3282{ 3283 unsigned long flags; 3284 u32 hprt0; 3285 u32 pcgctl; 3286 u32 gotgctl; 3287 3288 dev_dbg(hsotg->dev, "%s()\n", __func__); 3289 --- 33 unchanged lines hidden (view full) --- 3323 spin_unlock_irqrestore(&hsotg->lock, flags); 3324 3325 msleep(200); 3326 } else { 3327 spin_unlock_irqrestore(&hsotg->lock, flags); 3328 } 3329} 3330 | 3288{ 3289 unsigned long flags; 3290 u32 hprt0; 3291 u32 pcgctl; 3292 u32 gotgctl; 3293 3294 dev_dbg(hsotg->dev, "%s()\n", __func__); 3295 --- 33 unchanged lines hidden (view full) --- 3329 spin_unlock_irqrestore(&hsotg->lock, flags); 3330 3331 msleep(200); 3332 } else { 3333 spin_unlock_irqrestore(&hsotg->lock, flags); 3334 } 3335} 3336 |
3331/* Must NOT be called with interrupt disabled or spinlock held */ 3332static void dwc2_port_resume(struct dwc2_hsotg *hsotg) | 3337/** 3338 * dwc2_port_resume() - Exit controller from suspend mode for host. 3339 * 3340 * @hsotg: Programming view of the DWC_otg controller 3341 * 3342 * This function is for exiting Host mode suspend. 3343 * Must NOT be called with interrupt disabled or spinlock held. 3344 */ 3345void dwc2_port_resume(struct dwc2_hsotg *hsotg) |
3333{ 3334 unsigned long flags; 3335 u32 hprt0; 3336 u32 pcgctl; 3337 3338 spin_lock_irqsave(&hsotg->lock, flags); 3339 3340 /* --- 2429 unchanged lines hidden --- | 3346{ 3347 unsigned long flags; 3348 u32 hprt0; 3349 u32 pcgctl; 3350 3351 spin_lock_irqsave(&hsotg->lock, flags); 3352 3353 /* --- 2429 unchanged lines hidden --- |