From patchwork Thu May 12 14:20:13 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: 571795 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:66c4:0:0:0:0 with SMTP id x4csp704944mal; Thu, 12 May 2022 07:20:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAoaoF1JEF5R/zHYnHym/j4RW3VeUmqG4woV9teD2nY+hclriTTk0zC0VE8A4waPYFVCs9 X-Received: by 2002:a17:906:5d05:b0:6f6:2f7c:ffb8 with SMTP id g5-20020a1709065d0500b006f62f7cffb8mr118593ejt.649.1652365236606; Thu, 12 May 2022 07:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652365236; cv=none; d=google.com; s=arc-20160816; b=uYPE39EXPTBULk3VwxYN6nGS7JcaHOujEESlAPFUSvA3UrJQHVge9iTkRn8pN/AVmi BSZUY8RhDEPehvb9JVLOEFyZp/gOFJ580XD9i7n75BadfDQ6DRap0zqaOXF/LVIO0Lnr zaVmnSh1W69/08zx6X3cuN8WhJv4nGepA+UMyydm++CeJwz9bJldaVvQRVXyuTSpbPaV CAipv0v3//abSJWj7D0nrlZ5Xz7JNfT9mGYu3eNPJkJOjnL8hrnV81Ybtrek0mJgMP42 EA68kPj0xavHuK7Bm5M1WP9ltxoj8Q8zbNBBFND9jbJYw8atgtpI+PgQp4llpWUW/lqN TaGg== 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=rybx8WSDfRkXWefcbhSFsYPitISbHsRlf5zXejfWSmc=; b=qZXc1hWwHsfmdeTjz1+7bSVzxRUQ5bOEWhmCDxQzc6dOsu2JgzazzeN57n87E2IwN9 uUCzuxhB57Xe1Q7dpaU0opS5zA3qZPBc0BhMx84/rkeMNas49rZ51f38Sm6+Ql/lA9Tn HSephi9yBQBEGDMKxPouXc9eMbXR4tuLPP9eoKC+kxbVcqM0mom5ZKM8KflVZdskRsbY WkgSxtlnsu8UJz6E34xShioDWt4RF+c8QotiXvuGyYkK+BM2u9lesuxdHb/RNwfqAQiZ kMA7zvd8kpHgLiKwolc4VnTzw07JaW8lBZagpDwKxPwrXr5BEi+z23aqzw6dw2xXBwYg bunQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jFBXStLs; 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 c29-20020a50f61d000000b0041d7123418esi5761543edn.536.2022.05.12.07.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 07:20:36 -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=jFBXStLs; 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 B608983BAC; Thu, 12 May 2022 16:20:31 +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="jFBXStLs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 181A883A97; Thu, 12 May 2022 16:20:29 +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-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 EDC2F80885 for ; Thu, 12 May 2022 16:20:25 +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-wr1-x434.google.com with SMTP id t6so7510937wra.4 for ; Thu, 12 May 2022 07:20:25 -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=rybx8WSDfRkXWefcbhSFsYPitISbHsRlf5zXejfWSmc=; b=jFBXStLsatENfFBzzohYdlXZfgTcfyCOhnDiNuWILN3uta7ABGcX6qtTHV6rTveMiM TevqpYRwLY4f9gKf1B/sZgkbo+IlwdmdUHPKLj6/QJCN8xEZvFHawgRjw/wwEDZZ+7rG vYQrahqmGnt0DBMmxjFgouksbX77kUt5aP6lx1djiMwObPAe8XAwn9+Fnr+nQWmGAQSs lpVzgYGBGlRm4hSvL4pzJbh08UQ9V6L3ZcJcmxtfORAGvGDkU5/VlVGRwSykOaCYbMra R/xLpA7Opg3mQgyKYsTSkv0py2VISj5zbta0zyvSX1DuHmUbUcSK4goxM4f32MYSuzR4 v1og== 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=rybx8WSDfRkXWefcbhSFsYPitISbHsRlf5zXejfWSmc=; b=V6NrfBuxCLmqbplNexgkxT9tyxZAR7iW/DHqtVvBqbOEwhbJv+W8gJTHsEVf9fhAwl XqO+9B7m4WHP8jwOuANkzgUjedFpG65d0boljUvc3OZi1LoxgrGHlDoiVe4VtrAaYWjo PxGJzNXvtCFoGoZ8rY2VxNwiNa0V0Y7H0r9u0En0yZUbyKu3MZjIb2udBfnAinBGAncw BHinaIL0NF81zkrsDDrFBpIwqfg5pqZVy8HaItX8j3iRjLYSOKSIO8mvR4PAP+XhSUDT D0sseP+2Mm+AF4yONB65kTDjd18PpxL+vY4Qo5QNjigrSmFXC/3paULcJxHUjd+iuhVo 1w+A== X-Gm-Message-State: AOAM533xs8Io9ZdbkT4ZK9k1H1WHkHqrH7BgN5BPG/i+oj24uEBGIm1O 7b5DS7hek2z2zBXqEcMiH+W+Spv2gVlGkg== X-Received: by 2002:a05:6000:242:b0:20a:c4aa:d070 with SMTP id m2-20020a056000024200b0020ac4aad070mr27438854wrz.606.1652365225291; Thu, 12 May 2022 07:20:25 -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 y14-20020a1c4b0e000000b003942a244ecesm2767999wma.19.2022.05.12.07.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 07:20:24 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Rui Miguel Silva Subject: [PATCH 0/3] usb: add isp1760 hcd support Date: Thu, 12 May 2022 15:20:13 +0100 Message-Id: <20220512142016.2025129-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 PS: This should go on top of the corstone1000 platform enable series [0] 0: 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 | 376 +++ 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, 3821 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%)