* [PATCH 1/1] usb: gadget: tegra-xudc: Do not program SPARAM
@ 2022-01-07 9:04 Wayne Chang
2022-02-25 13:18 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Wayne Chang @ 2022-01-07 9:04 UTC (permalink / raw)
To: balbi, gregkh, thierry.reding, jonathanh
Cc: zhangqilong3, yangyingliang, rikard.falkeborn, chunfeng.yun,
waynec, linux-usb, linux-tegra, linux-kernel
According to the Tegra Technical Reference Manual, SPARAM
is a read-only register and should not be programmed in
the driver.
The change removes the wrong SPARAM usage.
Signed-off-by: Wayne Chang <waynec@nvidia.com>
---
drivers/usb/gadget/udc/tegra-xudc.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
index 43f1b0d461c1..716d9ab2d2ff 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -32,9 +32,6 @@
#include <linux/workqueue.h>
/* XUSB_DEV registers */
-#define SPARAM 0x000
-#define SPARAM_ERSTMAX_MASK GENMASK(20, 16)
-#define SPARAM_ERSTMAX(x) (((x) << 16) & SPARAM_ERSTMAX_MASK)
#define DB 0x004
#define DB_TARGET_MASK GENMASK(15, 8)
#define DB_TARGET(x) (((x) << 8) & DB_TARGET_MASK)
@@ -3295,11 +3292,6 @@ static void tegra_xudc_init_event_ring(struct tegra_xudc *xudc)
unsigned int i;
u32 val;
- val = xudc_readl(xudc, SPARAM);
- val &= ~(SPARAM_ERSTMAX_MASK);
- val |= SPARAM_ERSTMAX(XUDC_NR_EVENT_RINGS);
- xudc_writel(xudc, val, SPARAM);
-
for (i = 0; i < ARRAY_SIZE(xudc->event_ring); i++) {
memset(xudc->event_ring[i], 0, XUDC_EVENT_RING_SIZE *
sizeof(*xudc->event_ring[i]));
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] usb: gadget: tegra-xudc: Do not program SPARAM
2022-01-07 9:04 [PATCH 1/1] usb: gadget: tegra-xudc: Do not program SPARAM Wayne Chang
@ 2022-02-25 13:18 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2022-02-25 13:18 UTC (permalink / raw)
To: Wayne Chang
Cc: balbi, gregkh, jonathanh, zhangqilong3, yangyingliang,
rikard.falkeborn, chunfeng.yun, linux-usb, linux-tegra,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
On Fri, Jan 07, 2022 at 05:04:43PM +0800, Wayne Chang wrote:
> According to the Tegra Technical Reference Manual, SPARAM
> is a read-only register and should not be programmed in
> the driver.
>
> The change removes the wrong SPARAM usage.
>
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> ---
> drivers/usb/gadget/udc/tegra-xudc.c | 8 --------
> 1 file changed, 8 deletions(-)
What's the impact on this? Does it fix a bug? Or is it more of a
cosmetic change?
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-25 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-07 9:04 [PATCH 1/1] usb: gadget: tegra-xudc: Do not program SPARAM Wayne Chang
2022-02-25 13:18 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).