On 2/28/2017 3:44 PM, Francesco Lavra wrote:
> Hi Vardan,
>
> On 02/28/2017 09:41 AM, Vardan Mikayelyan wrote:
>> On 2/27/2017 11:55 PM, Francesco Lavra wrote:
>>> Hi,
>>>
>>> On 02/23/2017 08:27 PM, Heiko Stuebner wrote:
>>>> Hi Francesco,
&
On 2/27/2017 11:55 PM, Francesco Lavra wrote:
> Hi,
>
> On 02/23/2017 08:27 PM, Heiko Stuebner wrote:
>> Hi Francesco,
>>
>> Am Donnerstag, 23. Februar 2017, 19:11:37 CET schrieb Francesco Lavra:
>>> I'm having trouble getting the RK3288 OTG controller (the one at
>>> ff58) to work in periphera
switch to B-DEVICE.
Signed-off-by: Vardan Mikayelyan
---
drivers/usb/dwc2/gadget.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 98a4a79..9322f80 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb
True if core is hibernated.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.h | 2 ++
drivers/usb/dwc2/platform.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 60ad2e6..d84d0ce 100644
--- a
These are wrapper functions which are calling device or host
enter/exit hibernation functions.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 38 ++
drivers/usb/dwc2/core.h | 3 +++
2 files changed, 41 insertions
ation()
dwc2_gadget_exit_hibernation()
dwc2_host_enter_hibernation()
dwc2_host_exit_hibernation()
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 4 +-
drivers/usb/dwc2/core.h | 18
drivers/usb/dwc2/gadget.c
signalling.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.h | 3 +++
drivers/usb/dwc2/gadget.c | 6 ++
2 files changed, 9 insertions(+)
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index d84d0ce..ace383f 100644
--- a/drivers/usb/dwc2/core.h
Add common (host/device) helper functions, which will be called while
exiting from hibernation, from both sides.
dwc2_restore_essential_regs()
dwc2_hib_restore_common()
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 136
_registers()
dwc2_restore_host_registers()
dwc2_backup_global_registers()
dwc2_restore_global_registers()
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 8 ++--
drivers/usb/dwc2/core.h | 6 --
drivers/usb/dwc2/hcd.c | 2 ++
3 files changed, 12 insertions(+), 4 deletion
function responsible for exiting from hibernation.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 2 +-
drivers/usb/dwc2/core.h | 5 +++--
drivers/usb/dwc2/gadget.c | 16 +++-
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git
Add parameter and it's initialization, needed for hibernation.
Reimplement dwc2_set_param_power_down() to support hibernation too.
Now 'power_down' parameter can be initialized with 0, 1 or 2.
0 - No
1 - Partial power down
2 - Hibernation
Signed-off-by: Vardan Mikayelyan
Sign
Moved dtxfsiz from dwc2_gregs_backup to dwc2_dregs_backup,
because it is device register.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 8 ++--
drivers/usb/dwc2/core.h | 4 ++--
drivers/usb/dwc2/gadget.c | 2 ++
3 files changed, 6 insertions
Do changes to allow entering hibernated state from USB_SUSPEND
interrupt. All code is added under if conditions and mustn't impact
existing functionality.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core_intr.c
From: John Youn
Enable the power down option based on the core capability.
Signed-off-by: John Youn
Signed-off-by: Vardan Mikayelyan
---
drivers/usb/dwc2/params.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2
corresponing functions for
host and gadget), maybe in the future we'll resolve this problem
and will use dwc2_core_init for both sides.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.h | 3 ++
drivers/usb/dwc2/core_intr.c
Affected cases:
ClearPortFeature's
USB_PORT_FEAT_SUSPEND
SetPortFeature's
USB_PORT_FEAT_SUSPEND
USB_PORT_FEAT_RESET
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/hcd.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
di
:
-remove "usb: dwc2: Replace msleep with mdelay in dwc2_clear_force_mode()"
from this series because it is unnescessary after force mode optimizations.
John Youn (1):
usb: dwc2: Enable power down
Vardan Mikayelyan (13):
usb: dwc2: Rename hibernation to partial_power_down
usb:
No-op change, only rename.
This code was misnamed originally. It was only responsible for partial
power down and not for hibernation.
Rename core_params->hibernation to core_params->power_down,
dwc2_set_param_hibernation() to dwc2_set_param_power_down().
Signed-off-by: Vardan Mikayelyan
On 2/22/2017 10:59 PM, John Youn wrote:
> On 2/21/2017 5:16 AM, David Laight wrote:
>> From: Vardan Mikayelyan
>>> Sent: 20 February 2017 15:15
>>> dwc2_clear_force_mode() can be called in hibernation exit flow which
>>> can occur in interrupt context.
>
function responsible for exiting from hibernation.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 2 +-
drivers/usb/dwc2/core.h | 5 +++--
drivers/usb/dwc2/gadget.c | 16 +++-
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git
dwc2_clear_force_mode() can be called in hibernation exit flow which
can occur in interrupt context.
Signed-off-by: Vardan Mikayelyan
---
drivers/usb/dwc2/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 2c90d8e
Affected cases:
ClearPortFeature's
USB_PORT_FEAT_SUSPEND
SetPortFeature's
USB_PORT_FEAT_SUSPEND
USB_PORT_FEAT_RESET
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/hcd.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
di
corresponing functions for
host and gadget), maybe in the future we'll resolve this problem
and will use dwc2_core_init for both sides.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.h | 3 ++
drivers/usb/dwc2/core_intr.c
From: John Youn
Enable the power down option based on the core capability.
Signed-off-by: John Youn
Signed-off-by: Vardan Mikayelyan
---
drivers/usb/dwc2/params.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2
No-op change, only rename.
This code was misnamed originally. It was only responsible for partial
power down and not for hibernation.
Rename core_params->hibernation to core_params->power_down,
dwc2_set_param_hibernation() to dwc2_set_param_power_down().
Signed-off-by: Vardan Mikayelyan
Add parameter and it's initialization, needed for hibernation.
Reimplement dwc2_set_param_power_down() to support hibernation too.
Now 'power_down' parameter can be initialized with 0, 1 or 2.
0 - No
1 - Partial power down
2 - Hibernation
Signed-off-by: Vardan Mikayelyan
Sign
These are wrapper functions which are calling device or host
enter/exit hibernation functions.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 38 ++
drivers/usb/dwc2/core.h | 3 +++
2 files changed, 41 insertions
Do changes to allow entering hibernated state from USB_SUSPEND
interrupt. All code is added under if conditions and mustn't impact
existing functionality.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core_intr.c
):
usb: dwc2: Enable power down
Vardan Mikayelyan (14):
usb: dwc2: Rename hibernation to partial_power_down
usb: dwc2: Add hibernation field into dwc2_hw_params
usb: dwc2: gadget: Moved dtxfsiz backup array place
usb: dwc2: gadget: Fix dwc2_restore_device_registers
usb: dwc2: core: Add
signalling.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.h | 3 +++
drivers/usb/dwc2/gadget.c | 6 ++
2 files changed, 9 insertions(+)
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index d84d0ce..ace383f 100644
--- a/drivers/usb/dwc2/core.h
_registers()
dwc2_restore_host_registers()
dwc2_backup_global_registers()
dwc2_restore_global_registers()
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 8 ++--
drivers/usb/dwc2/core.h | 6 --
drivers/usb/dwc2/hcd.c | 2 ++
3 files changed, 12 insertions(+), 4 deletion
Add common (host/device) helper functions, which will be called while
exiting from hibernation, from both sides.
dwc2_restore_essential_regs()
dwc2_hib_restore_common()
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 136
True if core is hibernated.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.h | 2 ++
drivers/usb/dwc2/platform.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 60ad2e6..d84d0ce 100644
--- a
ation()
dwc2_gadget_exit_hibernation()
dwc2_host_enter_hibernation()
dwc2_host_exit_hibernation()
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 4 +-
drivers/usb/dwc2/core.h | 18
drivers/usb/dwc2/gadget.c
Moved dtxfsiz from dwc2_gregs_backup to dwc2_dregs_backup,
because it is device register.
Signed-off-by: Vardan Mikayelyan
Signed-off-by: John Youn
---
drivers/usb/dwc2/core.c | 8 ++--
drivers/usb/dwc2/core.h | 4 ++--
drivers/usb/dwc2/gadget.c | 2 ++
3 files changed, 6 insertions
avoid
calling of platform_device_unregister().
Reviewed-by: Wei Yongjun
Signed-off-by: Vardan Mikayelyan
---
Changes in v2:
- Remove kfree(glue) as suggested Janusz Dziedzic.
drivers/usb/dwc2/pci.c | 27 +--
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git
avoid
calling of platform_device_unregister().
Reviewed-by: Wei Yongjun
Signed-off-by: Vardan Mikayelyan
---
drivers/usb/dwc2/pci.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c
index fdeb8c7
wc2_pci_probe
Move usb_phy_generic_register() function call to the top, to simplify
error handling.
Replace kzalloc() with devm_kzalloc().
After platform_device_add(), if we error out, we must do
platform_device_unregister(), which also does the put. So lets move
devm_kzalloc() to simplify err
On 12/14/2016 6:25 AM, John Stultz wrote:
> On Tue, Dec 13, 2016 at 3:51 PM, John Youn wrote:
>> On 12/13/2016 3:23 PM, John Stultz wrote:
>>> I've found trying to boot Linus' HEAD today on HiKey, I'm hitting the
>>> following WARNINGS/panics, which I bisected down to being introduced
>>> with 5f5
usleep_range(2, 4);
> + gotgctl = dwc2_readl(hsotg->regs + GOTGCTL);
> + if (!(gotgctl & GOTGCTL_CONID_B))
> + goto again;
> if (++count > 250)
>
40 matches
Mail list logo