From patchwork Mon May 23 09:01:16 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: 575398 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:c603:0:0:0:0 with SMTP id jv3csp1207682mab; Mon, 23 May 2022 02:01:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOzkKVBYxIBPHkNHmkE9W16ltO9apYMRq+7xdIJbEKsDq0g22Mdhr6Zj3c0YyaxAaEgmMD X-Received: by 2002:a05:6e02:1808:b0:2d1:8fff:e56a with SMTP id a8-20020a056e02180800b002d18fffe56amr4448361ilv.202.1653296496318; Mon, 23 May 2022 02:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653296496; cv=none; d=google.com; s=arc-20160816; b=dYkZJTe31Tg8MGY3vemD7a+UaYcQeVx6iJln19E5wzXUvxTy5OeDZomsusNoi8PnLF R3o/D2HSZy7PUZdIoffiPTbF3UBmG/br3LRWt6hsvga4I3GOt3i/9XchWks0t5iwXLZD 3sny/3CNUqqQdFc4iqAGXbCh24D10XC6WRPgh3/lzAyKv8UpyPNHHxqlLmT0/zO3dfe1 EJjJm2BQv/R0VmpUIC2zMYYPf/T3tlSNn8sZOIos/A0XOuJ5i3XTahywJVFy5ZSKKUEF PYMCUz60FQmqIbrezgRG6k4e9sk2oZoQjlNwLMsCkTJsUPQRWZOopUX4z5G9wP3rFAWZ 2LZQ== 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=Y2DA5wTvnxtyWVlDmlZIJoqnq5ks+iz89IPzjUdAVqU=; b=BfyXYDtuSkE0Fct+DGgftZaF5Z6C+iKfAH3pN2bMlCT5OFqjcXgTyXFZTMXaUBQBjG /KXxEk3Pqyu355FNvyAEDIYzsZWUVUAy0LNw/w1Dq1sSiEZ0d5hCQ0DY8LyviM8t/Yr9 xrWsxoQAp2I9Zm9iPEuf1bhbDRyUdQoBP1AeKk1IOeKjNO920tZAu5Qs4d3OKOn8yftx hIq9xbJL6GQoVtR7VxjubY2vqLRKJWps8dyZ6L9i+SGSKD6lO1seNQZIxt5+7gvlDbHk xcO+tQSCOiX/Dk1geU609W5oBPF2k/98h7rI5BCbFxKTahNwm1OMllgPnhDxmX3oHFgT ZCTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aG4KuCza; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id n12-20020a6b410c000000b0065ac88e4e31si3721546ioa.23.2022.05.23.02.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 02:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aG4KuCza; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 A6A9483F63; Mon, 23 May 2022 11:01:30 +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="aG4KuCza"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B6A3883F2F; Mon, 23 May 2022 11:01:27 +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-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 7A34083EB7 for ; Mon, 23 May 2022 11:01:24 +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-x332.google.com with SMTP id p5-20020a1c2905000000b003970dd5404dso8099649wmp.0 for ; Mon, 23 May 2022 02:01:24 -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=Y2DA5wTvnxtyWVlDmlZIJoqnq5ks+iz89IPzjUdAVqU=; b=aG4KuCza9+xzSrQgVeYW9DGxMtaOdHXQhkrrlG32tQCAy62273d3nTMDu36XzNoOeG 7247Ga1ETP/ernU00ySI2wyzgJ5TdrbkMILYYWtXYdopx5zqRfAnZZ2aFswa0MHinaMi V36YZci6A+CAEGc6cZiHB50J7PccHYkpguyQOMQRJ0Af/igpzmr2h/OTkpxstTE70oAT vtDcLBZiZ8xJHLgY025/wD0K6wDxUIMi+txdEPxGhSTREzOfa9f7y5YjlxLY7YRSfE/0 5RI6M1NxxrEldTVvu7W7OtBFU5cIbtiiRvABJoMhGYLKOBjEBx/uJFZ51c3w1BWSKzVP gifg== 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=Y2DA5wTvnxtyWVlDmlZIJoqnq5ks+iz89IPzjUdAVqU=; b=CYrBYyTNn7IqvOPaCzWZul8arcD6kDyJ8xnLIl0qY70Z/uUQmNXTzfz5NaSQ8ousWU 0jB+PT6L8JE7iOhel86DRbbabKN+Qdjp1z3T/MvIQSPgRS7AzVt91hntVvUlOw2PJS17 bty/ly0Cuzv4WdvZdIdyu5hGFW8Xmu3pCZwuODd80RhFbgMtVwhFsZLPTrpX/TOC5snx 4jElE17J3bKapLUJfj1AnBRro6fRpQOr6k4HZcDt7rsKV8MpRmNnximlQh3PjfqCqnBq C0F7x85JBKrv6brfiUBcLyhBOraYyiTJHS2GRt2zAjji6KI45RgFuBGNGXMxsOODO3m1 7iWA== X-Gm-Message-State: AOAM533v4Nw7fGeUS7ebTCITu6YsSwDR6hhM6Agg+QYnUA/7/SJucbmw rdNUpKUpSJdu391W7WatJU3iSEbguYSvWA== X-Received: by 2002:a05:600c:3503:b0:394:8382:9fda with SMTP id h3-20020a05600c350300b0039483829fdamr19681822wmq.0.1653296483878; Mon, 23 May 2022 02:01:23 -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 d24-20020adfa358000000b0020c5253d8casm9880775wrb.22.2022.05.23.02.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 02:01:23 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Rui Miguel Silva Subject: [PATCH v2 0/3] usb: add isp1760 hcd support Date: Mon, 23 May 2022 10:01:16 +0100 Message-Id: <20220523090119.1212016-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 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 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%)