From patchwork Wed May 25 13:22:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 576000 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:c603:0:0:0:0 with SMTP id jv3csp3202683mab; Wed, 25 May 2022 06:23:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA6432XXfZkDWXv6w4kodmsArdCGREyYluDaZ4mr0MHesF7h/KyxEhGRCFLBusfdAiK8Ew X-Received: by 2002:a05:6638:1481:b0:330:4470:b7a4 with SMTP id j1-20020a056638148100b003304470b7a4mr2714617jak.61.1653484993724; Wed, 25 May 2022 06:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653484993; cv=none; d=google.com; s=arc-20160816; b=kVYnNohINX5OgsA3263QpCHMVcJ8STbuwkfRYfRkrDhXyem1yvrrpIwXvd1tDx0fCY GfHsO5/xP+4REQCzafheKTyrP/QHg5ISUtQgdF+a4RitEvb72K1Isu3qAf5ZgD6B7/Rx 2CyqQldwhNSkQq668j3vYTJswn3vjHaXg+WKv+CEtDt0+LXWjJ3kICRzof8wC/qT1Tff YT7OU4PlbPl7LpUBIJT0VYD44YEgobmYrDC4lqUn/cyctIL6C6E4SJNt9jIYsA62/w7H M2FkDO9Lcz1uneTGft8JE54rxNyOgik6+AZqIgohAYTbEgVOdhiByhmBfz9/bHoKznhY c3SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=949oXKWwiJo4KjzjNv3aK9V8Giqm0nEhMmIonP2z2mY=; b=kE2386Ok58spaXRHpd2n72KTzwe7OLd9qgn7+Nd0r7QUqjC9RYyrPBNJNMzHqE9V4q ke1DnEJb1Dtr4wybqODQ/SSXqza/kJefZL0xasVmSdq21lrjJ5MHzXnM5e/dAz13o+BV tlDsJfw0qWESAVNIqrx1kMR5mBaTnow84SuIq++LDYoY9Jgn5rmO6cnRZYxI0eiAq6mz JwLcBvcd+EBPdbdQnhTZq1jA7diVys4LUVZjyJxdtidLhlGX/y00TakIC+JEKclkFm+r Gpt+4RQY2QkUDTUd33IcQZL/1P0mQEr04OTvm3yD1M2V2bHs6emwQkiubQhg2KfNySK2 gS/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hea1Ruch; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id j7-20020a056e02154700b002d14d5f57f2si20085677ilu.63.2022.05.25.06.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 06:23:13 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hea1Ruch; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 16CE7842E3; Wed, 25 May 2022 15:23:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Hea1Ruch"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51E79842EE; Wed, 25 May 2022 15:23:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A36FC842D9 for ; Wed, 25 May 2022 15:22:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rui.silva@linaro.org Received: by mail-wm1-x32b.google.com with SMTP id i20-20020a05600c355400b0039456976dcaso2528112wmq.1 for ; Wed, 25 May 2022 06:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=949oXKWwiJo4KjzjNv3aK9V8Giqm0nEhMmIonP2z2mY=; b=Hea1RuchHb6kVLAzsoPo4jIPe53YqdR7LP6zbkrnSzM9NBNSLN/wwWItx8ZdDiqZpv faNFQcng1AYbxzW5LYU5D8WZgn13DfD/M6LilW3sXZJGthOPUc/VwE2o8C2oaRgI8DR0 6U2TliBSnh9I87Q8V99uwINi2yIpGzaJsa2SNpcX6YhLg/9lpMboYqTVRTB1pOua+MDY wdeH7NK6SBRTYStev8nFBi2ns/BESfDbRBJWqo6PKjoVLBFlaV2HvFdBxEUQEbyww6iJ hgh0taIOuC2da42mc0b8KR/a/d3hKO6us0GDHAGYL51G4Z5O7Y/URCmvm7j+gSXIxXOx FKtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=949oXKWwiJo4KjzjNv3aK9V8Giqm0nEhMmIonP2z2mY=; b=Dcle1NndIZYh78Hprw1B/zurPSweNnbnoAeDbfkvlFvxH62dVZOP7OEpSc7AOTUdhW zBuvdr+fSTB2YlP5idiY9IcMMkMeLB9Z+41DEPRkDijJCRpeZ7T6EuWiTa/GxnmQSE+R mzgyFjUY3VPorGiBaF6Hz+2zt98oiYIklfrINPEvkr1KeTm7/JUpQ7ZER86sLs+oWg6i 2aDZPHOWLGAoINz8RMtwGodIjif+697/NAjrtQdyU+kXRNg8vkhGa/ED97r+T+iyDkTI xhT2/A3ZQCOdMg/Jk9X63hdXrhFxMRhHCjt5Je2+v2v3L5h+zy3sZrA/hawhV8FiapsP +ApA== X-Gm-Message-State: AOAM5315Tw8YmDQmjPidNKiTNOWAP/YHa2H/GL00o67rr2+fsQgfZJsF 1olC/Qm+DY0BmvNgRk5mDkpEUaKSmWUdLQ== X-Received: by 2002:a05:600c:3553:b0:397:4d3d:9082 with SMTP id i19-20020a05600c355300b003974d3d9082mr8114275wmq.86.1653484978631; Wed, 25 May 2022 06:22:58 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id g18-20020a05600c4ed200b003942a244f38sm1987806wmq.17.2022.05.25.06.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 06:22:58 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Rui Miguel Silva Subject: [PATCH v3 0/3] usb: add isp1760 hcd support Date: Wed, 25 May 2022 14:22:48 +0100 Message-Id: <20220525132251.240868-1-rui.silva@linaro.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Add support for the usb isp1760 host controller family, which for example is present in MPS3 FPGA board from Arm (isp1763). First we move some helper functions and defines to a more common place to be shared by several urb users. (patch 1/3) Then add the driver itself, is a ported version of the kernel actual driver, which I am also the maintainer. (patch 2/3) And last, enable it for the corstone1000 platform that uses that MPS3 board for its implementation (patch 3/3). Cheers, Rui v2[3] -> v3: - when you think you have amend commit and fix stay uncommitted. s/[HC_FIELD_MAX] = {};/[HC_FIELD_MAX] = {},/ v1[0] -> v2: - gentle ping - merge fix from kernel upstream [1] PS: This should go on top of the corstone1000 platform enable series [2] 0: https://lore.kernel.org/u-boot/20220512142016.2025129-1-rui.silva@linaro.org/ 1: https://lore.kernel.org/linux-usb/20220516091424.391209-1-linus.walleij@linaro.org/ 2: https://lore.kernel.org/u-boot/20220511095541.1461937-1-rui.silva@linaro.org/T/#t 3: https://lore.kernel.org/u-boot/20220523090119.1212016-1-rui.silva@linaro.org/ Rui Miguel Silva (3): usb: common: move urb code to common usb: add isp1760 family driver corstone1000: enable isp1763 usb controller and mmc Makefile | 1 + configs/corstone1000_defconfig | 3 + drivers/usb/Kconfig | 2 + drivers/usb/common/Makefile | 3 + drivers/usb/common/usb_urb.c | 160 ++ drivers/usb/host/r8a66597-hcd.c | 30 +- drivers/usb/isp1760/Kconfig | 12 + drivers/usb/isp1760/Makefile | 6 + drivers/usb/isp1760/isp1760-core.c | 380 +++ drivers/usb/isp1760/isp1760-core.h | 96 + drivers/usb/isp1760/isp1760-hcd.c | 2477 +++++++++++++++++ drivers/usb/isp1760/isp1760-hcd.h | 81 + drivers/usb/isp1760/isp1760-if.c | 125 + drivers/usb/isp1760/isp1760-regs.h | 292 ++ drivers/usb/isp1760/isp1760-uboot.c | 75 + drivers/usb/isp1760/isp1760-uboot.h | 27 + drivers/usb/musb-new/musb_core.c | 2 +- drivers/usb/musb-new/musb_host.c | 2 +- drivers/usb/musb-new/musb_host.h | 2 +- drivers/usb/musb-new/musb_uboot.c | 38 +- drivers/usb/musb-new/musb_uboot.h | 2 +- include/configs/corstone1000.h | 6 + .../linux/usb/usb_urb_compat.h | 47 +- include/usb_defs.h | 32 + 24 files changed, 3825 insertions(+), 76 deletions(-) create mode 100644 drivers/usb/common/usb_urb.c create mode 100644 drivers/usb/isp1760/Kconfig create mode 100644 drivers/usb/isp1760/Makefile create mode 100644 drivers/usb/isp1760/isp1760-core.c create mode 100644 drivers/usb/isp1760/isp1760-core.h create mode 100644 drivers/usb/isp1760/isp1760-hcd.c create mode 100644 drivers/usb/isp1760/isp1760-hcd.h create mode 100644 drivers/usb/isp1760/isp1760-if.c create mode 100644 drivers/usb/isp1760/isp1760-regs.h create mode 100644 drivers/usb/isp1760/isp1760-uboot.c create mode 100644 drivers/usb/isp1760/isp1760-uboot.h rename drivers/usb/musb-new/usb-compat.h => include/linux/usb/usb_urb_compat.h (59%)