From patchwork Tue Feb 25 19:40:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 25306 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D176F20143 for ; Tue, 25 Feb 2014 19:42:18 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id oz11sf2159913veb.0 for ; Tue, 25 Feb 2014 11:42:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=iVH19CaB6d3cxs6y/irY0e5rkbXefA5vqt/WehBzqPw=; b=e9sWomBm72Ig1p+gwBemRjR0GFD3cd5qYNz1AsOzGRpwMyH3y2RqPCVie7WgSTCuYm dGmDZWfx4KBKxo3bzBkxI1EXdFTFABvmSb0wO0O0wDuVcBem5Gl1lEFVe2S4TAJCBUHI sSELh3nQ5SmafkHEXFk9SCv2Jg5rAGXHmbIQ13LnTeOo+23ZyWCtGGEpQtH3yzwOzrlP eaPQ6EdxBoHm69TKkbzmbMGt64zbZ8h3cDeanQKFP86yrFV8nbtguFqB06fa4cX/DrUp +JhN7B/akTaErSx5SDveifH69PFvdPG0mAASNr8xkxFUNK1WtZDqRvR91bTn7T445f5Y K38w== X-Gm-Message-State: ALoCoQknuvmrnwuiEUK5mI7Mtf2oO4vHiOHFJEoLfVGeDRRLw66F/4WCM0mgbsFG/YM9pQrM302D X-Received: by 10.58.218.40 with SMTP id pd8mr1457353vec.39.1393357338412; Tue, 25 Feb 2014 11:42:18 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.241 with SMTP id r104ls2093683qgd.98.gmail; Tue, 25 Feb 2014 11:42:18 -0800 (PST) X-Received: by 10.52.191.9 with SMTP id gu9mr1939695vdc.37.1393357338230; Tue, 25 Feb 2014 11:42:18 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id wz4si7079165vdc.33.2014.02.25.11.42.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 11:42:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id jw12so1013558veb.26 for ; Tue, 25 Feb 2014 11:42:18 -0800 (PST) X-Received: by 10.52.229.133 with SMTP id sq5mr323232vdc.45.1393357338142; Tue, 25 Feb 2014 11:42:18 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp163110vcz; Tue, 25 Feb 2014 11:42:17 -0800 (PST) X-Received: by 10.68.108.1 with SMTP id hg1mr1695043pbb.80.1393357337259; Tue, 25 Feb 2014 11:42:17 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tm9si21575346pab.250.2014.02.25.11.42.16; Tue, 25 Feb 2014 11:42:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753364AbaBYTmN (ORCPT + 3 others); Tue, 25 Feb 2014 14:42:13 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:43623 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753410AbaBYTmK (ORCPT ); Tue, 25 Feb 2014 14:42:10 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1PJg9Mh014195 for ; Tue, 25 Feb 2014 13:42:09 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1PJg9Ow005371 for ; Tue, 25 Feb 2014 13:42:09 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Tue, 25 Feb 2014 13:42:08 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1PJg8P7029181; Tue, 25 Feb 2014 13:42:08 -0600 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH 01/11] usb: dwc3: cleanup struct dwc3 Date: Tue, 25 Feb 2014 13:40:33 -0600 Message-ID: <1393357243-2958-2-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393357243-2958-1-git-send-email-balbi@ti.com> References: <1393357243-2958-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , move 1-bit flags to the bottom of the structure, sort all bit flags alphabetically, add documentation which was missing. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 69c4583..02c4877 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -615,14 +615,6 @@ struct dwc3_scratchpad_array { * @usb3_phy: pointer to USB3 PHY * @dcfg: saved contents of DCFG register * @gctl: saved contents of GCTL register - * @is_selfpowered: true when we are selfpowered - * @three_stage_setup: set if we perform a three phase setup - * @ep0_bounced: true when we used bounce buffer - * @ep0_expect_in: true when we expect a DATA IN transfer - * @start_config_issued: true when StartConfig command has been issued - * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround - * @needs_fifo_resize: not all users might want fifo resizing, flag it - * @resize_fifos: tells us it's ok to reconfigure our TxFIFO sizes. * @isoch_delay: wValue from Set Isochronous Delay request; * @u2sel: parameter from Set SEL request. * @u2pel: parameter from Set SEL request. @@ -637,6 +629,19 @@ struct dwc3_scratchpad_array { * @mem: points to start of memory which is used for this struct. * @hwparams: copy of hwparams registers * @root: debugfs root folder pointer + * @regset: debugfs pointer to regdump file + * @test_mode: true when we're entering a USB test mode + * @test_mode_nr: test feature selector + * @delayed_status: true when gadget driver asks for delayed status + * @ep0_bounced: true when we used bounce buffer + * @ep0_expect_in: true when we expect a DATA IN transfer + * @is_selfpowered: true when we are selfpowered + * @needs_fifo_resize: not all users might want fifo resizing, flag it + * @pullups_connected: true when Run/Stop bit is set + * @resize_fifos: tells us it's ok to reconfigure our TxFIFO sizes. + * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround + * @start_config_issued: true when StartConfig command has been issued + * @three_stage_setup: set if we perform a three phase setup */ struct dwc3 { struct usb_ctrlrequest *ctrl_req; @@ -696,17 +701,6 @@ struct dwc3 { #define DWC3_REVISION_240A 0x5533240a #define DWC3_REVISION_250A 0x5533250a - unsigned is_selfpowered:1; - unsigned three_stage_setup:1; - unsigned ep0_bounced:1; - unsigned ep0_expect_in:1; - unsigned start_config_issued:1; - unsigned setup_packet_pending:1; - unsigned delayed_status:1; - unsigned needs_fifo_resize:1; - unsigned resize_fifos:1; - unsigned pullups_connected:1; - enum dwc3_ep0_next ep0_next_event; enum dwc3_ep0_state ep0state; enum dwc3_link_state link_state; @@ -730,6 +724,17 @@ struct dwc3 { u8 test_mode; u8 test_mode_nr; + + unsigned delayed_status:1; + unsigned ep0_bounced:1; + unsigned ep0_expect_in:1; + unsigned is_selfpowered:1; + unsigned needs_fifo_resize:1; + unsigned pullups_connected:1; + unsigned resize_fifos:1; + unsigned setup_packet_pending:1; + unsigned start_config_issued:1; + unsigned three_stage_setup:1; }; /* -------------------------------------------------------------------------- */