<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/cdns3/core.h, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-05-01T15:36:12+00:00</updated>
<entry>
<title>usb: cdnsp: Fix issue with resuming from L1</title>
<updated>2025-05-01T15:36:12+00:00</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2025-04-18T04:55:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=241e2ce88e5a494be7a5d44c0697592f1632fbee'/>
<id>urn:sha1:241e2ce88e5a494be7a5d44c0697592f1632fbee</id>
<content type='text'>
In very rare cases after resuming controller from L1 to L0 it reads
registers before the clock UTMI have been enabled and as the result
driver reads incorrect value.
Most of registers are in APB domain clock but some of them (e.g. PORTSC)
are in UTMI domain clock.
After entering to L1 state the UTMI clock can be disabled.
When controller transition from L1 to L0 the port status change event is
reported and in interrupt runtime function driver reads PORTSC.
During this read operation controller synchronize UTMI and APB domain
but UTMI clock is still disabled and in result it reads 0xFFFFFFFF value.
To fix this issue driver increases APB timeout value.

The issue is platform specific and if the default value of APB timeout
is not sufficient then this time should be set Individually for each
platform.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/PH7PR07MB953846C57973E4DB134CAA71DDBF2@PH7PR07MB9538.namprd07.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdns3: rename hibernated argument of role-&gt;resume() to lost_power</title>
<updated>2025-03-14T08:18:02+00:00</updated>
<author>
<name>Théo Lebrun</name>
<email>theo.lebrun@bootlin.com</email>
</author>
<published>2025-02-05T17:36:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bde749c58c72405c54a1eabf6266a0273377226'/>
<id>urn:sha1:0bde749c58c72405c54a1eabf6266a0273377226</id>
<content type='text'>
The cdns_role_driver-&gt;resume() callback takes a second boolean argument
named `hibernated` in its implementations. This is mistaken; the only
potential caller is:

int cdns_resume(struct cdns *cdns)
{
	/* ... */

	if (cdns-&gt;roles[cdns-&gt;role]-&gt;resume)
		cdns-&gt;roles[cdns-&gt;role]-&gt;resume(cdns, cdns_power_is_lost(cdns));

	return 0;
}

The argument can be true in cases outside of return from hibernation.
Reflect the true meaning by renaming both arguments to `lost_power`.

Signed-off-by: Théo Lebrun &lt;theo.lebrun@bootlin.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20250205-s2r-cdns-v7-3-13658a271c3c@bootlin.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdns3: Add quirk flag to enable suspend residency</title>
<updated>2024-06-04T13:41:10+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@kernel.org</email>
</author>
<published>2024-05-16T04:45:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0aca19e4037a4143273e90f1b44666b78b4dde9b'/>
<id>urn:sha1:0aca19e4037a4143273e90f1b44666b78b4dde9b</id>
<content type='text'>
Some platforms (e.g. ti,j721e-usb, ti,am64-usb) require
this bit to be set to workaround a lockup issue with PHY
short suspend intervals [1]. Add a platform quirk flag
to indicate if Suspend Residency should be enabled.

[1] - https://www.ti.com/lit/er/sprz457h/sprz457h.pdf
i2409 - USB: USB2 PHY locks up due to short suspend

Signed-off-by: Roger Quadros &lt;rogerq@kernel.org&gt;
Signed-off-by: Ravi Gunasekaran &lt;r-gunasekaran@ti.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20240516044537.16801-2-r-gunasekaran@ti.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled</title>
<updated>2023-10-02T12:25:39+00:00</updated>
<author>
<name>Xiaolei Wang</name>
<email>xiaolei.wang@windriver.com</email>
</author>
<published>2023-09-26T07:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f35d612da5592f1bf1cae44ec1e023df37bea12'/>
<id>urn:sha1:9f35d612da5592f1bf1cae44ec1e023df37bea12</id>
<content type='text'>
The return type of cdns_set_active () is inconsistent
depending on whether CONFIG_PM_SLEEP is enabled, so the
return value is modified to void type.

Reported-by: Pavel Machek &lt;pavel@denx.de&gt;
Closes: https://lore.kernel.org/all/ZP7lIKUzD68XA91j@duo.ucw.cz/
Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
Cc: stable@vger.kernel.org
Signed-off-by: Xiaolei Wang &lt;xiaolei.wang@windriver.com&gt;
Reviewed-by: Pavel Machek &lt;pavel@denx.de&gt;
Reviewed-by: Roger Quadros &lt;rogerq@kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20230926075333.1791011-1-xiaolei.wang@windriver.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdns3: Put the cdns set active part outside the spin lock</title>
<updated>2023-07-25T15:49:25+00:00</updated>
<author>
<name>Xiaolei Wang</name>
<email>xiaolei.wang@windriver.com</email>
</author>
<published>2023-06-16T02:19:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2319b9c87fe243327285f2fefd7374ffd75a65fc'/>
<id>urn:sha1:2319b9c87fe243327285f2fefd7374ffd75a65fc</id>
<content type='text'>
The device may be scheduled during the resume process,
so this cannot appear in atomic operations. Since
pm_runtime_set_active will resume suppliers, put set
active outside the spin lock, which is only used to
protect the struct cdns data structure, otherwise the
kernel will report the following warning:

  BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1163
  in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 651, name: sh
  preempt_count: 1, expected: 0
  RCU nest depth: 0, expected: 0
  CPU: 0 PID: 651 Comm: sh Tainted: G        WC         6.1.20 #1
  Hardware name: Freescale i.MX8QM MEK (DT)
  Call trace:
    dump_backtrace.part.0+0xe0/0xf0
    show_stack+0x18/0x30
    dump_stack_lvl+0x64/0x80
    dump_stack+0x1c/0x38
    __might_resched+0x1fc/0x240
    __might_sleep+0x68/0xc0
    __pm_runtime_resume+0x9c/0xe0
    rpm_get_suppliers+0x68/0x1b0
    __pm_runtime_set_status+0x298/0x560
    cdns_resume+0xb0/0x1c0
    cdns3_controller_resume.isra.0+0x1e0/0x250
    cdns3_plat_resume+0x28/0x40

Signed-off-by: Xiaolei Wang &lt;xiaolei.wang@windriver.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20230616021952.1025854-1-xiaolei.wang@windriver.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>headers/prep: Fix non-standard header section: drivers/usb/cdns3/core.h</title>
<updated>2022-01-05T15:17:31+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2021-09-07T17:00:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd33707d0fd1b65c419f30816dd7f8123472caab'/>
<id>urn:sha1:cd33707d0fd1b65c419f30816dd7f8123472caab</id>
<content type='text'>
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdns3: Adds missing __iomem markers</title>
<updated>2021-01-14T01:01:33+00:00</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2020-12-15T10:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6500f30b1642288f5564a508752bc20a44219e8d'/>
<id>urn:sha1:6500f30b1642288f5564a508752bc20a44219e8d</id>
<content type='text'>
Patch adds missing __iomem markers in core.h file
and makes some changes in drd.c file related with
these markers.

The lack of __iomem has reported by sparse checker
on parsic architecture.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: cdns3: fix build when PM_SLEEP is not set</title>
<updated>2020-12-29T04:36:13+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2020-12-08T19:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28a25ba3e59263a66b2a2cd3e153351b2db2a6b6'/>
<id>urn:sha1:28a25ba3e59263a66b2a2cd3e153351b2db2a6b6</id>
<content type='text'>
Fix build error when CONFIG_PM_SLEEP is not enabled by adding
stubs for the PM_SLEEP functions.

../drivers/usb/cdns3/cdns3-plat.c: In function ‘cdns3_controller_resume’:
../drivers/usb/cdns3/cdns3-plat.c:246:2: error: implicit declaration of function ‘cdns_resume’; did you mean ‘cdns_remove’? [-Werror=implicit-function-declaration]
  cdns_resume(cdns, !PMSG_IS_AUTO(msg));
  ^~~~~~~~~~~

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Pawel Laszczak &lt;pawell@cadence.com&gt;
Cc: Roger Quadros &lt;rogerq@ti.com&gt;
Cc: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver</title>
<updated>2020-12-29T04:36:13+00:00</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2020-12-07T10:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d82904559f4f5a2622db1b21de3edf2eded7664'/>
<id>urn:sha1:3d82904559f4f5a2622db1b21de3edf2eded7664</id>
<content type='text'>
This patch introduces the main part of Cadence USBSSP DRD driver
to Linux kernel.
To reduce the patch size a little bit, the header file gadget.h was
intentionally added as separate patch.

The Cadence USBSSP DRD Controller is a highly configurable IP Core which
can be instantiated as Dual-Role Device (DRD), Peripheral Only and
Host Only (XHCI)configurations.

The current driver has been validated with FPGA platform. We have
support for PCIe bus, which is used on FPGA prototyping.

The host side of USBSS DRD controller is compliant with XHCI.
The architecture for device side is almost the same as for host side,
and most of the XHCI specification can be used to understand how
this controller operates.

Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>usb: cdns3: Changed type of gadget_dev in cdns structure</title>
<updated>2020-12-29T04:36:13+00:00</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2020-12-07T10:32:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac5bca142759db36bbff2e0834c37fe956171233'/>
<id>urn:sha1:ac5bca142759db36bbff2e0834c37fe956171233</id>
<content type='text'>
Patch changes the type for gadget_dev pointer in cdns structure from
pointer to cdns3_device structure to void pointer.
This filed is in reusable code and after this change it will be used to
point to both cdns3_device or cdnsp_device objects.

Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Tested-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
</feed>
