From: Pawel Laszczak <pawell@cadence.com>
To: PETER CHEN <peter.chen@nxp.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"rogerq@ti.com" <rogerq@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Alan Douglas <adouglas@cadence.com>,
"jbergsagel@ti.com" <jbergsagel@ti.com>,
"nsekhar@ti.com" <nsekhar@ti.com>, "nm@ti.com" <nm@ti.com>,
Suresh Punnoose <sureshp@cadence.com>,
Pawel Jez <pjez@cadence.com>, Rahul Kumar <kurahul@cadence.com>
Subject: RE: [RFC PATCH v2 02/15] usb:cdns3: Device side header file.
Date: Sun, 2 Dec 2018 19:27:28 +0000 [thread overview]
Message-ID: <BYAPR07MB4709E47639F2DA3339D99147DDAD0@BYAPR07MB4709.namprd07.prod.outlook.com> (raw)
In-Reply-To: <VI1PR04MB5327F686BE6E9F5D85380BA98BD30@VI1PR04MB5327.eurprd04.prod.outlook.com>
Hi Peter
>> +
>> +/*
>> + * USBSS-DEV register interface.
>> + * This corresponds to the USBSS Device Controller Interface */
>> +/**
>> + * struct xhci_cap_regs - xHCI Host Controller Capability Registers.
>
>struct cdns3_usb_regs - device controller registers
thanks,
I had this from beginning. I don't know why.
I
>
>> +struct cdns3_device;
>> +
>> +struct cdns3_endpoint {
>> + struct usb_ep endpoint;
>> + struct list_head request_list;
>> + struct list_head ep_match_pending_list;
>> +
>> + struct cdns3_trb *trb_pool;
>> + dma_addr_t trb_pool_dma;
>> +
>> + struct cdns3_device *cdns3_dev;
>> + char name[20];
>> +
>> +#define EP_ENABLED BIT(0)
>> +#define EP_STALL BIT(1)
>> +#define EP_WEDGE BIT(2)
>> +#define EP_TRANSFER_STARTED BIT(3)
>> +#define EP_UPDATE_EP_TRBADDR BIT(4)
>> +#define EP_PENDING_REQUEST BIT(5)
>> +#define EP_USED BIT(5)
>> + u32 flags;
>> +
>> + void *aligned_buff;
>> + dma_addr_t aligned_dma_addr;
>> + u8 dir;
>> + u8 num;
>> + u8 type;
>> +
>> + int free_trbs;
>> + u8 pcs;
>> + u8 ccs;
>> + int enqueue;
>> + int dequeue;
>> +};
>> +
>
>Would you please add kernel doc for above structure?
Done.
>
>> +struct cdns3_request {
>> + struct usb_request request;
>> + struct cdns3_endpoint *priv_ep;
>> + struct cdns3_trb *trb;
>> + int start_trb;
>> + int end_trb;
>> + int on_ring:1;
>> +};
>> +
>> +#define to_cdns3_request(r) (container_of(r, struct cdns3_request,
>> +request))
>> +
>> +struct cdns3_device {
>> + struct device dev;
>> + struct cdns3_usb_regs __iomem *regs;
>> +
>> + struct usb_gadget gadget;
>> + struct usb_gadget_driver *gadget_driver;
>> +
>> + struct usb_ctrlrequest *setup;
>> + dma_addr_t setup_dma;
>> + dma_addr_t trb_ep0_dma;
>> + struct cdns3_trb *trb_ep0;
>> + void *zlp_buf;
>> +
>> + struct cdns3_endpoint *eps[USB_SS_ENDPOINTS_MAX_COUNT];
>> + int ep_nums;
>> + /*
>> + * field used for improving performance. It holds the last
>> + * selected endpoint number
>> + */
>> + u32 selected_ep;
>> + struct usb_request *ep0_request;
>> + int ep0_data_dir;
>> + int hw_configured_flag;
>> + int wake_up_flag;
>> + u16 isoch_delay;
>> + /* generic spin-lock for drivers */
>> + spinlock_t lock;
>> +
>> + unsigned is_connected:1;
>> + unsigned in_standby_mode:1;
>> + unsigned status_completion_no_call:1;
>> + unsigned u1_allowed:1;
>> + unsigned u2_allowed:1;
>> +
>> + u32 usb_ien;
>> + u32 ep_ien;
>> + int setup_pending;
>> + struct device *sysdev;
>> + /* The device mode is enabled */
>> + int start_gadget;
>> + struct list_head ep_match_list;
>> + /* KB */
>> + int onchip_mem_allocated_size;
>> + /* Memory is allocated for OUT */
>> + int out_mem_is_allocated:1;
>> + struct work_struct pending_status_wq;
>> + struct usb_request *pending_status_request;
>> +};
>> +
Cheers
Pawel
next prev parent reply other threads:[~2018-12-02 19:28 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-18 10:08 [RFC PATCH v2 00/15] Introduced new Cadence USBSS DRD Driver Pawel Laszczak
2018-11-18 10:08 ` [RFC PATCH v2 01/15] usb:cdns3: add pci to platform driver wrapper Pawel Laszczak
2018-11-23 10:44 ` Roger Quadros
2018-11-18 10:08 ` [RFC PATCH v2 02/15] usb:cdns3: Device side header file Pawel Laszczak
2018-11-30 6:48 ` PETER CHEN
2018-12-02 19:27 ` Pawel Laszczak [this message]
2018-11-18 10:08 ` [RFC PATCH v2 03/15] dt-bindings: add binding for USBSS-DRD controller Pawel Laszczak
2018-11-23 10:53 ` Roger Quadros
2018-11-25 7:33 ` Pawel Laszczak
2018-12-04 22:41 ` Rob Herring
2018-12-06 10:26 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code Pawel Laszczak
2018-11-23 11:35 ` Roger Quadros
2018-11-25 12:35 ` Pawel Laszczak
2018-12-04 9:09 ` Peter Chen
2018-12-06 7:00 ` Pawel Laszczak
2018-12-04 8:50 ` Peter Chen
2018-12-04 10:46 ` Roger Quadros
2018-12-05 8:57 ` Peter Chen
2018-12-06 9:31 ` Pawel Laszczak
2018-12-05 19:24 ` Pawel Laszczak
2018-12-05 19:42 ` Pawel Laszczak
2018-12-06 10:02 ` Pawel Laszczak
2018-11-30 7:32 ` Peter Chen
2018-12-02 20:34 ` Pawel Laszczak
2018-12-04 7:11 ` Peter Chen
2018-12-05 7:19 ` Pawel Laszczak
2018-12-05 8:55 ` Alan Douglas
2018-12-05 9:07 ` Peter Chen
2018-11-18 10:09 ` [RFC PATCH v2 05/15] usb:cdns3: Added DRD support Pawel Laszczak
2018-11-23 14:51 ` Roger Quadros
2018-11-26 7:23 ` Pawel Laszczak
2018-11-26 8:07 ` Roger Quadros
2018-11-26 8:39 ` Pawel Laszczak
2018-11-26 9:39 ` Roger Quadros
2018-11-26 10:09 ` Pawel Laszczak
2018-11-26 10:15 ` Roger Quadros
2018-11-27 11:29 ` Pawel Laszczak
2018-11-27 12:10 ` Roger Quadros
2018-12-04 9:18 ` Peter Chen
2018-12-06 7:25 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 06/15] usb:cdns3: Adds Host support Pawel Laszczak
2018-11-23 14:23 ` Roger Quadros
2018-11-26 8:24 ` Pawel Laszczak
2018-11-26 9:50 ` Roger Quadros
2018-11-26 10:17 ` Pawel Laszczak
2018-12-05 8:41 ` Peter Chen
2018-11-18 10:09 ` [RFC PATCH v2 07/15] usb:cdns3: Adds Device mode support - initialization Pawel Laszczak
2018-11-28 11:34 ` Roger Quadros
2018-11-28 11:40 ` Felipe Balbi
2018-11-30 4:20 ` PETER CHEN
2018-11-30 6:29 ` Pawel Laszczak
2018-11-30 14:36 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API Pawel Laszczak
2018-11-28 12:22 ` Roger Quadros
2018-12-01 11:11 ` Pawel Laszczak
2018-12-03 10:19 ` Pawel Laszczak
2018-12-10 2:12 ` Peter Chen
2018-12-11 11:26 ` Sekhar Nori
2018-12-11 19:49 ` Pawel Laszczak
2018-12-14 1:34 ` Peter Chen
2018-12-14 6:49 ` Pawel Laszczak
2018-12-14 10:39 ` Sekhar Nori
2018-12-14 10:47 ` Felipe Balbi
2018-12-14 11:13 ` Sekhar Nori
2018-12-14 11:26 ` Felipe Balbi
2018-12-14 12:20 ` Sekhar Nori
2018-12-14 12:30 ` Felipe Balbi
2018-12-16 13:31 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 09/15] usb:cdns3: EpX " Pawel Laszczak
2018-11-28 12:46 ` Roger Quadros
2018-12-01 13:30 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 10/15] usb:cdns3: Ep0 " Pawel Laszczak
2018-11-28 14:31 ` Roger Quadros
2018-12-02 10:34 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 11/15] usb:cdns3: Implements ISR functionality Pawel Laszczak
2018-11-28 14:54 ` Roger Quadros
2018-12-02 11:49 ` Pawel Laszczak
2018-12-02 12:52 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 12/15] usb:cdns3: Adds enumeration related function Pawel Laszczak
2018-11-28 15:50 ` Roger Quadros
2018-12-02 16:39 ` Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 13/15] usb:cdns3: Adds transfer " Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 14/15] usb:cdns3: Adds debugging function Pawel Laszczak
2018-11-18 10:09 ` [RFC PATCH v2 15/15] usb:cdns3: Feature for changing role 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=BYAPR07MB4709E47639F2DA3339D99147DDAD0@BYAPR07MB4709.namprd07.prod.outlook.com \
--to=pawell@cadence.com \
--cc=adouglas@cadence.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jbergsagel@ti.com \
--cc=kurahul@cadence.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nm@ti.com \
--cc=nsekhar@ti.com \
--cc=peter.chen@nxp.com \
--cc=pjez@cadence.com \
--cc=rogerq@ti.com \
--cc=sureshp@cadence.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;
as well as URLs for NNTP newsgroup(s).