Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B010C433EF for ; Mon, 13 Jun 2022 00:02:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBE288442B; Mon, 13 Jun 2022 02:02:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="YFERkEGb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6DDD984431; Mon, 13 Jun 2022 02:02:14 +0200 (CEST) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 6186484411 for ; Mon, 13 Jun 2022 02:02:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x829.google.com with SMTP id i25so2973240qtq.0 for ; Sun, 12 Jun 2022 17:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=tlMJZrHY7q2q3pkwMpIbhf1YF0vySEe/wexGn0IZV6E=; b=YFERkEGb5fNarMutVCi429voidlFeCU8RgMv5+i+uuX4+25Z8l8L7meDqtkOenI5JS pt4GMBLBYgDwUZTLMbx5VkEMjwcc0UNb4bOdt4tv8brcWO681VK6MQfbowVdjpNXoJAP WiUdlRu35VTqsxntb4oZi63j/hWX0wvc2oZDs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tlMJZrHY7q2q3pkwMpIbhf1YF0vySEe/wexGn0IZV6E=; b=f3cyakk5g2q7PSeGK7uv/A8Tw5ebd93j98dKop22H+am3q2OX4YaLUBCrjCI5XTIyz 3tqIFJAmEgjhdwtsnIkCfQ9gvCgfLWDbiR58NSGIY2RlMlpufALogzzpau7V9Y7Qiuwy T3Yq9gRgSJaf7z2fC/d2juRWm0D69u8j9SJTjLZRbHibRKLZeOy7fG47B6GNe8gCnuzo LeFJfUHQnDAH2bzvDjU8vfiOwe69ttaO+S+UbZzFSEeP8O7ys+eX11L2aTSoJiWtZoad JPr7u/eof2FDVonxQqY8l0FEK//InpoX4fB0WoaGyKWbZsnJnt14O7oBFTu2V53rsQTe e6oA== X-Gm-Message-State: AOAM5320PsfAP8eQEfS+J+n5W4Y2iq3lursTyNcwn/Yy65Qr9minQG+8 RFztPnpoW9NF57xXPfECmjzHMb11xWsHrg== X-Google-Smtp-Source: ABdhPJwgrk9rw/n4pa0rCymaAZzGmSd+f4PYG78iDLaerv93XNcVw5y42k/VJeWVvU6v0bzxR6udrw== X-Received: by 2002:a05:622a:4f:b0:305:2678:714b with SMTP id y15-20020a05622a004f00b003052678714bmr6410408qtw.143.1655078530576; Sun, 12 Jun 2022 17:02:10 -0700 (PDT) Received: from bill-the-cat.lan (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id h5-20020a05620a400500b006a6d4261f40sm2625551qko.111.2022.06.12.17.02.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 17:02:09 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 4/8] usb: Remove non-DM code in ehci-fsl and xhci Date: Sun, 12 Jun 2022 20:02:01 -0400 Message-Id: <20220613000205.891039-4-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220613000205.891039-1-trini@konsulko.com> References: <20220613000205.891039-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The DM_USB migration deadline has passed and this is not used in SPL. Remove this now unused code. Signed-off-by: Tom Rini --- drivers/usb/host/ehci-fsl.c | 4 -- drivers/usb/host/xhci.c | 110 ------------------------------------ 2 files changed, 114 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 82da339fd505..0569dd54fff9 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -25,10 +25,6 @@ DECLARE_GLOBAL_DATA_PTR; -#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 -#endif - struct ehci_fsl_priv { struct ehci_ctrl ehci; fdt_addr_t hcd_base; diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ad73ba12e2be..dbeb88afe370 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -37,10 +37,6 @@ #include #include -#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 -#endif - static struct descriptor { struct usb_hub_descriptor hub; struct usb_device_descriptor device; @@ -115,13 +111,8 @@ static struct descriptor { }, }; -#if !CONFIG_IS_ENABLED(DM_USB) -static struct xhci_ctrl xhcic[CONFIG_USB_MAX_CONTROLLER_COUNT]; -#endif - struct xhci_ctrl *xhci_get_ctrl(struct usb_device *udev) { -#if CONFIG_IS_ENABLED(DM_USB) struct udevice *dev; /* Find the USB controller */ @@ -130,9 +121,6 @@ struct xhci_ctrl *xhci_get_ctrl(struct usb_device *udev) dev = dev->parent) ; return dev_get_priv(dev); -#else - return udev->controller; -#endif } /** @@ -752,13 +740,6 @@ static int _xhci_alloc_device(struct usb_device *udev) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB) -int usb_alloc_device(struct usb_device *udev) -{ - return _xhci_alloc_device(udev); -} -#endif - /* * Full speed devices may have a max packet size greater than 8 bytes, but the * USB core doesn't know that until it reads the first 8 bytes of the @@ -1267,95 +1248,6 @@ static int xhci_lowlevel_stop(struct xhci_ctrl *ctrl) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB) -int submit_control_msg(struct usb_device *udev, unsigned long pipe, - void *buffer, int length, struct devrequest *setup) -{ - struct usb_device *hop = udev; - - if (hop->parent) - while (hop->parent->parent) - hop = hop->parent; - - return _xhci_submit_control_msg(udev, pipe, buffer, length, setup, - hop->portnr); -} - -int submit_bulk_msg(struct usb_device *udev, unsigned long pipe, void *buffer, - int length) -{ - return _xhci_submit_bulk_msg(udev, pipe, buffer, length); -} - -int submit_int_msg(struct usb_device *udev, unsigned long pipe, void *buffer, - int length, int interval, bool nonblock) -{ - return _xhci_submit_int_msg(udev, pipe, buffer, length, interval, - nonblock); -} - -/** - * Intialises the XHCI host controller - * and allocates the necessary data structures - * - * @param index index to the host controller data structure - * Return: pointer to the intialised controller - */ -int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) -{ - struct xhci_hccr *hccr; - struct xhci_hcor *hcor; - struct xhci_ctrl *ctrl; - int ret; - - *controller = NULL; - - if (xhci_hcd_init(index, &hccr, (struct xhci_hcor **)&hcor) != 0) - return -ENODEV; - - if (xhci_reset(hcor) != 0) - return -ENODEV; - - ctrl = &xhcic[index]; - - ctrl->hccr = hccr; - ctrl->hcor = hcor; - - ret = xhci_lowlevel_init(ctrl); - - if (ret) { - ctrl->hccr = NULL; - ctrl->hcor = NULL; - } else { - *controller = &xhcic[index]; - } - - return ret; -} - -/** - * Stops the XHCI host controller - * and cleans up all the related data structures - * - * @param index index to the host controller data structure - * Return: none - */ -int usb_lowlevel_stop(int index) -{ - struct xhci_ctrl *ctrl = (xhcic + index); - - if (ctrl->hcor) { - xhci_lowlevel_stop(ctrl); - xhci_hcd_stop(index); - xhci_cleanup(ctrl); - } - - return 0; -} -#endif /* CONFIG_IS_ENABLED(DM_USB) */ - -#if CONFIG_IS_ENABLED(DM_USB) - static int xhci_submit_control_msg(struct udevice *dev, struct usb_device *udev, unsigned long pipe, void *buffer, int length, struct devrequest *setup) @@ -1546,5 +1438,3 @@ struct dm_usb_ops xhci_usb_ops = { .update_hub_device = xhci_update_hub_device, .get_max_xfer_size = xhci_get_max_xfer_size, }; - -#endif -- 2.25.1