From patchwork Thu Mar 26 10:43:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11459789 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 20C7D1668 for ; Thu, 26 Mar 2020 10:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01CBF20774 for ; Thu, 26 Mar 2020 10:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585219421; bh=OZQ6h2G5aW8cEj+kZSt+w47jzOr4L+jzrjMQVhuLEZ0=; h=From:To:Cc:Subject:Date:List-ID:From; b=cVDT+Its0LedkwpCjiIJPrLMKIMNMMkyS45ASir6nbkIBxPc+gSpaQbgv4tSb08Ju n2wHSgtNNjyQfcrSEXl0eG3jKcNK6JOqrC4g+dbMr1DgAjt5YZC7Gjvd6dY5F/yJkB MXdD4tmboFjzpg88To+oij8xwEquGZLQtUYR3h38= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727781AbgCZKnk (ORCPT ); Thu, 26 Mar 2020 06:43:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:35488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727560AbgCZKnk (ORCPT ); Thu, 26 Mar 2020 06:43:40 -0400 Received: from localhost.localdomain (unknown [180.171.74.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 85EC820714; Thu, 26 Mar 2020 10:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585219419; bh=OZQ6h2G5aW8cEj+kZSt+w47jzOr4L+jzrjMQVhuLEZ0=; h=From:To:Cc:Subject:Date:From; b=eDPVPrwwvGcfGlgDaCwYu1QuQ4ZIu0tDUCIOeZ8xqiMxS2MkYi+YnmuwkW7mV6nwl KutwQELWMuOgKDSF7bjId5pqXK8HnN/WdD/kmaDa8LZKSOFsEbVvpnWowLNUIuVYvd ZYw7z0+p9Qf6cDAcGtJMdTE05+rEsG6MliaSZWXQ= From: Peter Chen To: linux-usb@vger.kernel.org Cc: linux-imx@nxp.com, jun.li@nxp.com, Peter Chen Subject: [PATCH 1/3] usb: chipidea: udc: fix the kernel doc for udc.h Date: Thu, 26 Mar 2020 18:43:23 +0800 Message-Id: <20200326104325.5628-1-peter.chen@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Peter Chen The kernel doc for td_node is outdated, update it. Signed-off-by: Peter Chen --- drivers/usb/chipidea/udc.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/chipidea/udc.h b/drivers/usb/chipidea/udc.h index ebb11b625bb8..32b56f84f77a 100644 --- a/drivers/usb/chipidea/udc.h +++ b/drivers/usb/chipidea/udc.h @@ -67,10 +67,7 @@ struct td_node { * struct ci_hw_req - usb request representation * @req: request structure for gadget drivers * @queue: link to QH list - * @ptr: transfer descriptor for this request - * @dma: dma address for the transfer descriptor - * @zptr: transfer descriptor for the zero packet - * @zdma: dma address of the zero packet's transfer descriptor + * @tds: link to TD list */ struct ci_hw_req { struct usb_request req; From patchwork Thu Mar 26 10:43:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11459791 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED6611668 for ; Thu, 26 Mar 2020 10:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5D5320775 for ; Thu, 26 Mar 2020 10:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585219422; bh=Vx58WJqq6eBV9PhOoButEhE8nnenlrmHCrgCNuY+Lbo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Ilx9MxxWq/Gub9kXSxghehR/32CChoU8ElM/ubgRikk+guv45Ok/MKy3jpZ+PGkfv +wip7DJbtwPDhlTb5g48QMvyRAofbuqFtV2SR8YZEo3tnF1yGe95v0pZkSzo7td//5 Q+ceIBEUCmksdTi3Amy6ePZ11pib8HDplSoSych8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727953AbgCZKnm (ORCPT ); Thu, 26 Mar 2020 06:43:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:35510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727841AbgCZKnm (ORCPT ); Thu, 26 Mar 2020 06:43:42 -0400 Received: from localhost.localdomain (unknown [180.171.74.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3CDEF20748; Thu, 26 Mar 2020 10:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585219421; bh=Vx58WJqq6eBV9PhOoButEhE8nnenlrmHCrgCNuY+Lbo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vLPmb3lKFIQXtY7uNLuPFl7pROheH74MDwMIhm15uK7sLQVHSGEWO/uFMhQg+Ap0l wqISuoNoUbplKo3VpUEIhYeDQdv9ziUyIMeFPAxiXqb6LXzCmykpyZpmCkCbB7kOiS L6hR89F56V6fZoNZwQjeqzV0tuAl71N5pDcVxjwM= From: Peter Chen To: linux-usb@vger.kernel.org Cc: linux-imx@nxp.com, jun.li@nxp.com, Peter Chen Subject: [PATCH 2/3] usb: chipidea: core: refine the description for this driver Date: Thu, 26 Mar 2020 18:43:24 +0800 Message-Id: <20200326104325.5628-2-peter.chen@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200326104325.5628-1-peter.chen@kernel.org> References: <20200326104325.5628-1-peter.chen@kernel.org> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Peter Chen Some descriptions are outdated, update them. Signed-off-by: Peter Chen --- drivers/usb/chipidea/core.c | 40 +++++++------------------------------ 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index ae0bdc036464..12971c96c19e 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -3,42 +3,16 @@ * core.c - ChipIdea USB IP core family device controller * * Copyright (C) 2008 Chipidea - MIPS Technologies, Inc. All rights reserved. + * Copyright (C) 2020 NXP * * Author: David Lopo - */ - -/* - * Description: ChipIdea USB IP core family device controller - * - * This driver is composed of several blocks: - * - HW: hardware interface - * - DBG: debug facilities (optional) - * - UTIL: utilities - * - ISR: interrupts handling - * - ENDPT: endpoint operations (Gadget API) - * - GADGET: gadget operations (Gadget API) - * - BUS: bus glue code, bus abstraction layer - * - * Compile Options - * - STALL_IN: non-empty bulk-in pipes cannot be halted - * if defined mass storage compliance succeeds but with warnings - * => case 4: Hi > Dn - * => case 5: Hi > Di - * => case 8: Hi <> Do - * if undefined usbtest 13 fails - * - TRACE: enable function tracing (depends on DEBUG) - * - * Main Features - * - Chapter 9 & Mass Storage Compliance with Gadget File Storage - * - Chapter 9 Compliance with Gadget Zero (STALL_IN undefined) - * - Normal & LPM support - * - * USBTEST Report - * - OK: 0-12, 13 (STALL_IN defined) & 14 - * - Not Supported: 15 & 16 (ISO) + * Peter Chen * - * TODO List - * - Suspend & Remote Wakeup + * Main Features: + * - Four transfers are supported, usbtest is passed + * - USB Certification for gadget: CH9 and Mass Storage are passed + * - Low power mode + * - USB wakeup */ #include #include From patchwork Thu Mar 26 10:43:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11459793 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C1E015AB for ; Thu, 26 Mar 2020 10:43:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DB1020748 for ; Thu, 26 Mar 2020 10:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585219426; bh=aCk6r2q6VK/uGhzy0qoSo2kidcROxyinP377YtYGdeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=q3VFFYbEAdXEAH5b8ZzCQncUwq85Pw93BXaMcoIVILfP9+aSrc1lCwgjEeQl07VK+ 41q3tqpW7k4zL5wvxlhO9Fd0kmyZFt9zSbdP5FYwfln9xe7IE//IHEVSAKRJL6a0B4 IaTb7CoXU1a6LcRarWy27SvJPohAAHBM7x5Ht6BM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbgCZKnp (ORCPT ); Thu, 26 Mar 2020 06:43:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:35526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727560AbgCZKno (ORCPT ); Thu, 26 Mar 2020 06:43:44 -0400 Received: from localhost.localdomain (unknown [180.171.74.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA5EE20714; Thu, 26 Mar 2020 10:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585219423; bh=aCk6r2q6VK/uGhzy0qoSo2kidcROxyinP377YtYGdeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n6MBmczrilkYMOPOvMUh95mQUXT4w0xsq2da13nvVwO291viqfVBRbKxE/1tmnxli d/7XF9JJhMDt2oxyPqjOh6xEK8dY0QLSc7/tLJFZdzZdVhHQBr/cDLoUktveR4/pVx hW9TUtd8k4jYuBR7FG4twtl737SKEF7ccUDxlRT4= From: Peter Chen To: linux-usb@vger.kernel.org Cc: linux-imx@nxp.com, jun.li@nxp.com, Peter Chen Subject: [PATCH 3/3] usb: chipidea: core: show the real pointer value for register Date: Thu, 26 Mar 2020 18:43:25 +0800 Message-Id: <20200326104325.5628-3-peter.chen@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200326104325.5628-1-peter.chen@kernel.org> References: <20200326104325.5628-1-peter.chen@kernel.org> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Peter Chen The pointer value is "ptrval" like below at current code: ci_hdrc ci_hdrc.0: ChipIdea HDRC found, revision: 25, lpm: 0; cap: (ptrval) op: (ptrval) According to Documentation/core-api/printk-formats.rst, we change it from %p to %px for real value. Signed-off-by: Peter Chen --- drivers/usb/chipidea/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 12971c96c19e..ea8ac4a54a8d 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -246,7 +246,7 @@ static int hw_device_init(struct ci_hdrc *ci, void __iomem *base) ci->rev = ci_get_revision(ci); dev_dbg(ci->dev, - "ChipIdea HDRC found, revision: %d, lpm: %d; cap: %p op: %p\n", + "revision: %d, lpm: %d; cap: %px op: %px\n", ci->rev, ci->hw_bank.lpm, ci->hw_bank.cap, ci->hw_bank.op); /* setup lock mode ? */