From: Pawel Laszczak <pawell@cadence.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"Daisy.Barrera@siriusxm.com" <Daisy.Barrera@siriusxm.com>,
"Cliff.Holden@siriusxm.com" <Cliff.Holden@siriusxm.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"tony@atomide.com" <tony@atomide.com>,
"jdelvare@suse.de" <jdelvare@suse.de>,
"neal_liu@aspeedtech.com" <neal_liu@aspeedtech.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"egtvedt@samfundet.no" <egtvedt@samfundet.no>,
"biju.das.jz@bp.renesas.com" <biju.das.jz@bp.renesas.com>,
"herve.codina@bootlin.com" <herve.codina@bootlin.com>
Subject: RE: [PATCH 1/4] usb: cdns2: Device side header file for CDNS2 driver
Date: Thu, 16 Feb 2023 11:53:19 +0000 [thread overview]
Message-ID: <BYAPR07MB53816694801FCEE0CA9C73F0DDA09@BYAPR07MB5381.namprd07.prod.outlook.com> (raw)
In-Reply-To: <Y+4SXE25Xl7Lv/K8@kroah.com>
>-----Original Message-----
>From: Greg KH <gregkh@linuxfoundation.org>
>Sent: Thursday, February 16, 2023 12:24 PM
>To: Pawel Laszczak <pawell@cadence.com>
>Cc: linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org;
>Daisy.Barrera@siriusxm.com; Cliff.Holden@siriusxm.com; arnd@arndb.de;
>tony@atomide.com; jdelvare@suse.de; neal_liu@aspeedtech.com;
>linus.walleij@linaro.org; egtvedt@samfundet.no; biju.das.jz@bp.renesas.com;
>herve.codina@bootlin.com
>Subject: Re: [PATCH 1/4] usb: cdns2: Device side header file for CDNS2 driver
>
>EXTERNAL MAIL
>
>
>On Thu, Feb 16, 2023 at 05:54:08AM -0500, Pawel Laszczak wrote:
>> Patch defines macros, registers and structures used by Device side
>> driver.
>>
>> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
>> ---
>> drivers/usb/gadget/udc/cdns2/cdns2-gadget.h | 670
>> ++++++++++++++++++++
>> 1 file changed, 670 insertions(+)
>> create mode 100644 drivers/usb/gadget/udc/cdns2/cdns2-gadget.h
>>
>> diff --git a/drivers/usb/gadget/udc/cdns2/cdns2-gadget.h
>> b/drivers/usb/gadget/udc/cdns2/cdns2-gadget.h
>> new file mode 100644
>> index 000000000000..66cdb902163c
>> --- /dev/null
>> +++ b/drivers/usb/gadget/udc/cdns2/cdns2-gadget.h
>> @@ -0,0 +1,670 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * USBHS-DEV device controller driver header file
>> + *
>> + * Copyright (C) 2023 Cadence.
>> + *
>> + * Author: Pawel Laszczak <pawell@cadence.com> */
>> +
>> +#ifndef __LINUX_CDNS2_GADGET
>> +#define __LINUX_CDNS2_GADGET
>> +
>> +#include <linux/usb/gadget.h>
>> +#include <linux/dma-direction.h>
>> +
>> +/*
>> + * USBHS register interface.
>> + * This corresponds to the USBHS Device Controller Interface.
>> + */
>> +
>> +/**
>> + * struct cdns2_ep0_regs - endpoint 0 related registers.
>> + * @rxbc: receive (OUT) 0 endpoint byte count register.
>> + * @txbc: transmit (IN) 0 endpoint byte count register.
>> + * @cs: 0 endpoint control and status register.
>> + * @fifo: 0 endpoint fifo register.
>> + * @setupdat: SETUP data register.
>> + * @maxpack: 0 endpoint max packet size.
>
>You didn't describe the "reserved" fields in here, so you will get a kerneldoc
>warning :(
>
>> + */
>> +struct cdns2_ep0_regs {
>> + __u8 rxbc;
>> + __u8 txbc;
>> + __u8 cs;
>> + __u8 reserved1[4];
>> + __u8 fifo;
>> + __le32 reserved2[94];
>> + __u8 setupdat[8];
>> + __u8 reserved4[88];
>
>Why are these all reserved? Should they be set to 0? Something else?
>
>Same with the other reserved fields in this file, you need to fix up the
>kerneldoc for them too.
>
Structure describes the part of register map related with ep0 endpoint.
In the reserved space there can be other registers related with another controller
logic. Not all reserved field are set to 0.
The registers map is quite big and confusing, and I tried to split them into some group
to make driver more readable.
I will add some descriptions for all reserved* field in this file.
Thanks,
Pawel Laszczak
next prev parent reply other threads:[~2023-02-16 11:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 10:54 [PATCH 0/4] Introduced new Cadence USBHS Driver Pawel Laszczak
2023-02-16 10:54 ` [PATCH 1/4] usb: cdns2: Device side header file for CDNS2 driver Pawel Laszczak
2023-02-16 11:24 ` Greg KH
2023-02-16 11:53 ` Pawel Laszczak [this message]
2023-02-16 10:54 ` [PATCH 2/4] usb: cdns2: Add main part of Cadence USBHS driver Pawel Laszczak
2023-02-16 11:26 ` Greg KH
2023-02-17 7:12 ` kernel test robot
2023-02-16 10:54 ` [PATCH 3/4] usb: cdns2: Add tracepoints for CDNS2 driver Pawel Laszczak
2023-02-16 11:22 ` Greg KH
2023-02-16 11:36 ` Pawel Laszczak
2023-02-18 20:19 ` kernel test robot
2023-02-16 10:54 ` [PATCH 4/4] MAINTAINERS: add Cadence USBHS driver entry Pawel Laszczak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BYAPR07MB53816694801FCEE0CA9C73F0DDA09@BYAPR07MB5381.namprd07.prod.outlook.com \
--to=pawell@cadence.com \
--cc=Cliff.Holden@siriusxm.com \
--cc=Daisy.Barrera@siriusxm.com \
--cc=arnd@arndb.de \
--cc=biju.das.jz@bp.renesas.com \
--cc=egtvedt@samfundet.no \
--cc=gregkh@linuxfoundation.org \
--cc=herve.codina@bootlin.com \
--cc=jdelvare@suse.de \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neal_liu@aspeedtech.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®