Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp730695imm; Wed, 1 Aug 2018 04:29:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdIpc2+1PoVWHYXwEn7EpQSTDahn23eVdpU5lpI8Vuzo7aV9L7j1LPs188gLJWNfjNoxtvj X-Received: by 2002:a63:2359:: with SMTP id u25-v6mr24368199pgm.220.1533122987583; Wed, 01 Aug 2018 04:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533122987; cv=none; d=google.com; s=arc-20160816; b=Ho56ymytyDwiJmvC60Kn1iHpnnHflVpacrxTlfDURdUBIGdyhXtintk6IC+xIoilQa Ui8UMFe3bR3Ari6jHVvy6wTXVvgL+Ibu2Lv4NwESNvr86lm9oGlMHCftqzPtTKOsDa4j hrsGrdRyNQ+/TBdCzVAVl68LJHgGVketjhRyaotUjGziZIkD09bmC0R+7MLwGOigZpWi Pb/9AjvUissaS74ha6i0yj3Mcrp90Tb+YXyyZhEa7LBfYWbnCxzlNrJVQXWVqGjTkNe2 kXW54Vcp12u7i8YOrVrNJR++WLDXbv2ZUXDyxB/86azqjiIuwDYkjSFY5TMaMfZ4aF5Y 0f0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=G25mBoRDpjjYlaBadScCg9IduHrzT73FfIQG5nDw0hE=; b=0Czx18SJSTDcxNf9b84Xt5EX6ApMi7c9UqawJb/U3OancZwpfDqNKeur7giSrsW2cj iFHWMaTBOZ4+5gp3nRIQ/ORUIRrzCYftOGrqs9F2z1ub6SkDWOKIFB0SgM04CvkYVRLh XgOd4xGvSnXzfBpgo2MD4ryMdd6A8cis5/TNBdmWOStWW+re3xhCWCAiY7kdTjQZcu0r VRL5+AWsc162HcMZno4p4IEF4MKuNlcFcJgajI9hOn5j9pgzo8tfzYzMQ+/5LgyfHIwP aOTJE1wu6XLciMN4n3KK6MT8cOJZV0T5UyE2dotpWfkJeElTV0o4JKIGvOVbiAP3YnLa k0nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H1HLylfb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si16983377pgi.221.2018.08.01.04.29.32; Wed, 01 Aug 2018 04:29:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H1HLylfb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389052AbeHANN0 (ORCPT + 99 others); Wed, 1 Aug 2018 09:13:26 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45602 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388464AbeHANN0 (ORCPT ); Wed, 1 Aug 2018 09:13:26 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id w71BRvNX002300; Wed, 1 Aug 2018 06:27:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1533122877; bh=G25mBoRDpjjYlaBadScCg9IduHrzT73FfIQG5nDw0hE=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=H1HLylfb3v0q2g1VMogHiiBt0JHtOss65YgqXiw5+wvpinzxVgaydTylN6lG/2hb+ 9kCxftYVHZn2L6H4eHcaTV5z59z7uPPgZq66gwgwU6Cs14NheIBViDlMfsHP/4iqJM 78ia9MOJkn/kj2pB2ECDKfD2W4XjbvxSVCD+3Isk= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w71BRvhr019929; Wed, 1 Aug 2018 06:27:57 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 1 Aug 2018 06:27:57 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 1 Aug 2018 06:27:57 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w71BRtCE005672; Wed, 1 Aug 2018 06:27:55 -0500 Subject: Re: [PATCH 00/31] Introduced new Cadence USBSSP DRD Driver To: Pawel Laszczak CC: Greg Kroah-Hartman , , Felipe Balbi , , , References: <1532023084-28083-1-git-send-email-pawell@cadence.com> From: Roger Quadros Openpgp: preference=signencrypt Autocrypt: addr=rogerq@ti.com; prefer-encrypt=mutual; keydata= xsFNBFT1lPYBEADZlKgOS2lxNkDRlcROza/QPsYrS+V2YAXOd4rO/sshQDt1OgU4E8DD37t0 F4zipBkMVU1nQ6ZSomg2o9w17wD7sL0wNO+QZ0j5V2yy2SJIlK70lgmz90GlL93V3T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DAAKCRDSWmvTvnYwk8niEACcwBAfe1tTSqCCHkRj zgIrt+NPBBfxilf9JXPGTYqfUkrcVfiNqLGFgIDZKjkLfArxiSmpmtKf1O1VYO9XDgADUKJO RvmUQM/l3Q99QC5b8yUyZOsgfSBOsV6DeqiULO30cXH/uEpR2fUcbtyYXHouiF2UNdq/BV5h HBQkGYtTf7K26NPp4wXMS+YsBm2Gbms/wywJh4KgRPP6LuA+UE/7l0xqMD3pBQ/L1KLTqOQY CItcZ0YbEvlrJc25PRkCssHf1J2c2MXV+CRqsibW8UamBmOyzKHVK/CwvIndwBmcciJrOf+4 uxegvXEnwvYPuQ3wvBSkgbJRFNJemnp5KSczANr4R/aA5cEbxhbg7peLv0FdFyTFJXCsKeuO 1gKoKtOLyxRhDocprSuEamaDWDCy3TmX+6nWaBIPYXDFT7IcHT6l6TyZ6IMjkXiHSLhynTIj f2xjSrvKPljIUxcqjhyqWe+coe/Xwbqz69DsK150xoAaoS3rbNlhmalbg15HNTipNDI/k81A fwt7ncjxvjXVJnA2nqPBDIW3mZO/ED0blLrVdaMZjf5LvS+vvsMdH7dHtrAXA50egr74sX0A NO7iW+gkmFYwap531ipMXthHPWbo5x9xfb+a48xA80ePBJLBDyw9X+cOe40+N4Ybiwy5Q2La IwrfNkJOLj3CvocMIw== Message-ID: <82e8093d-eb6b-ea04-7d36-54ee27df3e06@ti.com> Date: Wed, 1 Aug 2018 14:27:54 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1532023084-28083-1-git-send-email-pawell@cadence.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pawel, On 19/07/18 20:57, Pawel Laszczak wrote: > This patch set introduce new Cadence USBSSP DRD driver > to linux kernel. > > The Cadence USBSSP DRD Driver s 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 burned. We have support for PCIe > bus, which is used on FPGA prototyping. > > The host site of USBSSP controller is compliance > with XHCI specification, so it works with > standard XHCI linux driver. > > Also, device side of USBSSP controller was designed > in such way to looks like XHCI. It means that > most of logic of USBSSP controller is also compliance > with XHCI specification. > > Consequently, the USBSSP driver for peripheral mode > is very similar to XHCI driver. > > This version of driver supports only Device mode but > DRD and Host mode will be added in the future. > Based on the posting date this series looks like v3. You should add the version prefix to the patches next time. e.g. [PATCH v4 ...] It is also recommended to add a Change-log in the cover letter explaining what changes were made in each revision. There are a bunch of checkpatch warnings in this series. You can use ./scripts/checkpatch.pl on the patches and fix the issues. > --- > > Pawel Laszczak (31): > usb: usbssp: Defined register maps and other useful structures. > usb: usbssp: Added some decoding functions. > usb: usbssp: Add trace events used in driver > usb: usbssp: Added USBSSP platform driver > usb: usbssp: Added first part of initialization sequence. > usb: usbssp: added template functions used by upper layer. > usb: usbssp: Initialization - added usbssp_mem_init > usb: usbssp: Added ring and segment handling functions. > usb: usbssp: add implementation of usbssp_mem_cleanup > usb: usbssp: added usbssp_trb_in_td function. > usb: usbssp: added function for stopping driver. > usb: usbssp: added functions for queuing commands. > usb: usbssp: addec procedure for handlin Port Status Change events. > usb: usbssp: added procedure handling command completion events. > usb: usbssp: added device controller error, transfer and SETUP > completion event. > usb: usbssp: added connect/disconnect procedures. > usb: usbssp: added implementation of usbssp_halt_endpoint function. > usb: usbssp: added handling of Port Reset event. > usb: usbssp: added support for USB enumeration process. > usb: usbssp: added queuing procedure for control transfer. > usb: usbssp: added queuing procedure for BULK and INT transfer. > usb: usbssp: added procedure removing request from transfer ring > usb: usbssp: added implementation of transfer events. > usb: usbssp: added detecting command timeout. > usb: usbssp: added implementation of usbssp interface. > usb: usbssp: added endpoint configuration functionality. > usb: usbssp: implements usbssp_gadget_ep_enable function > usb: usbssp: implemented usbssp_gadget_ep_disable function. > usb: usbssp: added support for LPM. > usb: usbssp: added support for TEST_MODE. > usb: usbssp: add pci to platform driver wrapper. > > drivers/usb/Kconfig | 2 + > drivers/usb/Makefile | 2 + > drivers/usb/usbssp/Kconfig | 29 + > drivers/usb/usbssp/Makefile | 15 + > drivers/usb/usbssp/gadget-dbg.c | 39 + > drivers/usb/usbssp/gadget-ep0.c | 571 +++++ > drivers/usb/usbssp/gadget-ext-caps.h | 102 + > drivers/usb/usbssp/gadget-if.c | 569 +++++ > drivers/usb/usbssp/gadget-mem.c | 1938 +++++++++++++++ > drivers/usb/usbssp/gadget-port.c | 287 +++ > drivers/usb/usbssp/gadget-ring.c | 3452 ++++++++++++++++++++++++++ > drivers/usb/usbssp/gadget-trace.c | 13 + > drivers/usb/usbssp/gadget-trace.h | 482 ++++ > drivers/usb/usbssp/gadget.c | 1909 ++++++++++++++ > drivers/usb/usbssp/gadget.h | 2373 ++++++++++++++++++ > drivers/usb/usbssp/usbssp-pci-wrap.c | 226 ++ > drivers/usb/usbssp/usbssp-plat.c | 186 ++ > 17 files changed, 12195 insertions(+) > create mode 100644 drivers/usb/usbssp/Kconfig > create mode 100644 drivers/usb/usbssp/Makefile > create mode 100644 drivers/usb/usbssp/gadget-dbg.c > create mode 100644 drivers/usb/usbssp/gadget-ep0.c > create mode 100644 drivers/usb/usbssp/gadget-ext-caps.h > create mode 100644 drivers/usb/usbssp/gadget-if.c > create mode 100644 drivers/usb/usbssp/gadget-mem.c > create mode 100644 drivers/usb/usbssp/gadget-port.c > create mode 100644 drivers/usb/usbssp/gadget-ring.c > create mode 100644 drivers/usb/usbssp/gadget-trace.c > create mode 100644 drivers/usb/usbssp/gadget-trace.h > create mode 100644 drivers/usb/usbssp/gadget.c > create mode 100644 drivers/usb/usbssp/gadget.h > create mode 100644 drivers/usb/usbssp/usbssp-pci-wrap.c > create mode 100644 drivers/usb/usbssp/usbssp-plat.c > -- cheers, -roger Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki