Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4687187pxb; Sat, 12 Feb 2022 14:39:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8FOyOlDdyYbyjZCF0QQXLD/uLeQjzya64oUsJ+dgTCbuxGlYVlZDACJhPJ1Tik8oMMfio X-Received: by 2002:a17:902:d2c9:: with SMTP id n9mr7393663plc.99.1644705595434; Sat, 12 Feb 2022 14:39:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644705595; cv=none; d=google.com; s=arc-20160816; b=m4qVGpPpe4jNJ527GJ4HNb6esRTMEgczxQf3D3TQuM4gPHVj2RwJ9RhEkOmdGsdOIV 91UeN+yRmdGZBpBJOl6Ftb2u839fLjrSa6sX1Ox3x20Mt8ffYxWU0HxpTsxUpXRgfDOn J1dmCUxRsGcNde2VI/hbX0J41qIt6vCsUba/eET25nBQacS+o+3130XnESRIwEcfIu1I OfPCCV666pEhJ/5JqfQ/4Iz8zy54mICKPyUmWW13hCsuGaPocAIx4wOIRMYLi7JmFQPL F0G3Gpqaf9cBmle5HolHYIfMQo0Suid+2zpikC6ULN9HQsmgiqm0+uTLNRnIRRegz04V QPLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7ok1k9pQCzWci1MKP3xrf+KxWEUg4H3+jdbuzeHSCcU=; b=llOXgiuuyuuGCM+04Fx95ChDxras/lk16+ijq4glf4CPKeTqvLTq99Bqb3BR8h4Pbf EdMK5i81zctqo0TQ3RiwnnzKVqwJpBoWSQbbag4zGY9C1TWx1/FyD5bJ/tTie2IZbQWp 2xKr1Q0I7CoKBIeY83gBk8rjljh9K/UVt8pXBY7F2QN/VEAIdPU/MKCa/KpOLRysiVGG Nvmav5UXM+gCxZ/A8f8SyioTFQNsV3rfNVfU8a1uDlL8O0wUxDj0LbuXSM6jSLSWqGRY l7dJ/Egca+6kxTje3HuVIw73QSdenDBX+Tw9p1necpEXm8+96x9qBtOmlxXBbBwe1dm2 t80g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rDW59zzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ie5si7578703pjb.75.2022.02.12.14.39.39; Sat, 12 Feb 2022 14:39:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rDW59zzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbiBLSWE (ORCPT + 99 others); Sat, 12 Feb 2022 13:22:04 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbiBLSWC (ORCPT ); Sat, 12 Feb 2022 13:22:02 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4024E5A5BB for ; Sat, 12 Feb 2022 10:21:58 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id qe15so10842791pjb.3 for ; Sat, 12 Feb 2022 10:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7ok1k9pQCzWci1MKP3xrf+KxWEUg4H3+jdbuzeHSCcU=; b=rDW59zzthMHIwuoDTyahs56Deb/SPTP28qxv7JVUQbuc3je76sGBJPkwPu2xNz/IG3 Pt/gdPdCAUpb60vbPJnSw860V2D53X40CaHrncMdmw7U00unaxbD2cAWWVRbZ8Y044dg jdZhiCOEOdeYCrtFOE91GJBk1s4If3d/oUn6u0Qxi/Y+BrIzb9TEL+lDqBZOZX8TZa9Y HRj6eZNXsZ3JKXKhP5F8H2oswB7AwV5kARgVqbNx/nPPPCeyW3HEFSWQVdo7BFfNxLJ/ yPMBWX87BWm3YhMgM40DnnWr/teMIvfyv9mLVwAbvFTtKZYHvzH1pSRz52YSPtSskQ7R x5EA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=7ok1k9pQCzWci1MKP3xrf+KxWEUg4H3+jdbuzeHSCcU=; b=qhNNwkH/oV86DjT9q48cem4du8b8do+yY+eYLzEF0leBEsqZkAp8G5pSsRm8h58Gxd xb8nIW7T4C6CSLe1IGbD0Y1oS8+PHzR9RahU9hl1EieqSqsOx09l9QG0LiEAjvVGnWk6 Wu6eZFH0nOP7l1GPVosbuWC7o7IB4csqecEdyNUpoag5oQbekZsY4uaihsdv2GmsCkh0 w5nt4P1OHHe9wxz7Na8hL8cEHtJnTtoFZ41yrJzOD38L0o7bCfEMoSFdxC+ijTAbEFsr y0dHCkx8ZPSbWE8jrYsjN82MHX0UOadwXv/qhNz+oezSIlSKGQOL5KEisNBkIfy2aIEf NSgA== X-Gm-Message-State: AOAM533YihaVCGu9c4oelPEGRdK4jiWos/e9C3WaR23+KtqWDfiTRBK4 OkMJimoDZXRVoGEFWK6d9FsD X-Received: by 2002:a17:90b:3810:: with SMTP id mq16mr6448375pjb.26.1644690117738; Sat, 12 Feb 2022 10:21:57 -0800 (PST) Received: from localhost.localdomain ([27.111.75.57]) by smtp.gmail.com with ESMTPSA id g12sm14961987pfj.148.2022.02.12.10.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Feb 2022 10:21:57 -0800 (PST) From: Manivannan Sadhasivam To: mhi@lists.linux.dev Cc: quic_hemantk@quicinc.com, quic_bbhatt@quicinc.com, quic_jhugo@quicinc.com, vinod.koul@linaro.org, bjorn.andersson@linaro.org, dmitry.baryshkov@linaro.org, quic_vbadigan@quicinc.com, quic_cang@quicinc.com, quic_skananth@quicinc.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, elder@linaro.org, Manivannan Sadhasivam , Hemant Kumar Subject: [PATCH v3 03/25] bus: mhi: Move host MHI code to "host" directory Date: Sat, 12 Feb 2022 23:50:55 +0530 Message-Id: <20220212182117.49438-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220212182117.49438-1-manivannan.sadhasivam@linaro.org> References: <20220212182117.49438-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation of the endpoint MHI support, let's move the host MHI code to its own "host" directory and adjust the toplevel MHI Kconfig & Makefile. While at it, let's also move the "pci_generic" driver to "host" directory as it is a host MHI controller driver. Reviewed-by: Hemant Kumar Signed-off-by: Manivannan Sadhasivam --- drivers/bus/Makefile | 2 +- drivers/bus/mhi/Kconfig | 27 ++------------------ drivers/bus/mhi/Makefile | 8 ++---- drivers/bus/mhi/host/Kconfig | 31 +++++++++++++++++++++++ drivers/bus/mhi/{core => host}/Makefile | 4 ++- drivers/bus/mhi/{core => host}/boot.c | 0 drivers/bus/mhi/{core => host}/debugfs.c | 0 drivers/bus/mhi/{core => host}/init.c | 0 drivers/bus/mhi/{core => host}/internal.h | 0 drivers/bus/mhi/{core => host}/main.c | 0 drivers/bus/mhi/{ => host}/pci_generic.c | 0 drivers/bus/mhi/{core => host}/pm.c | 0 12 files changed, 39 insertions(+), 33 deletions(-) create mode 100644 drivers/bus/mhi/host/Kconfig rename drivers/bus/mhi/{core => host}/Makefile (54%) rename drivers/bus/mhi/{core => host}/boot.c (100%) rename drivers/bus/mhi/{core => host}/debugfs.c (100%) rename drivers/bus/mhi/{core => host}/init.c (100%) rename drivers/bus/mhi/{core => host}/internal.h (100%) rename drivers/bus/mhi/{core => host}/main.c (100%) rename drivers/bus/mhi/{ => host}/pci_generic.c (100%) rename drivers/bus/mhi/{core => host}/pm.c (100%) diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index 52c2f35a26a9..16da51130d1a 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -39,4 +39,4 @@ obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-config.o obj-$(CONFIG_DA8XX_MSTPRI) += da8xx-mstpri.o # MHI -obj-$(CONFIG_MHI_BUS) += mhi/ +obj-y += mhi/ diff --git a/drivers/bus/mhi/Kconfig b/drivers/bus/mhi/Kconfig index da5cd0c9fc62..4748df7f9cd5 100644 --- a/drivers/bus/mhi/Kconfig +++ b/drivers/bus/mhi/Kconfig @@ -2,30 +2,7 @@ # # MHI bus # -# Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. +# Copyright (c) 2021, Linaro Ltd. # -config MHI_BUS - tristate "Modem Host Interface (MHI) bus" - help - Bus driver for MHI protocol. Modem Host Interface (MHI) is a - communication protocol used by the host processors to control - and communicate with modem devices over a high speed peripheral - bus or shared memory. - -config MHI_BUS_DEBUG - bool "Debugfs support for the MHI bus" - depends on MHI_BUS && DEBUG_FS - help - Enable debugfs support for use with the MHI transport. Allows - reading and/or modifying some values within the MHI controller - for debug and test purposes. - -config MHI_BUS_PCI_GENERIC - tristate "MHI PCI controller driver" - depends on MHI_BUS - depends on PCI - help - This driver provides MHI PCI controller driver for devices such as - Qualcomm SDX55 based PCIe modems. - +source "drivers/bus/mhi/host/Kconfig" diff --git a/drivers/bus/mhi/Makefile b/drivers/bus/mhi/Makefile index 0a2d778d6fb4..5f5708a249f5 100644 --- a/drivers/bus/mhi/Makefile +++ b/drivers/bus/mhi/Makefile @@ -1,6 +1,2 @@ -# core layer -obj-y += core/ - -obj-$(CONFIG_MHI_BUS_PCI_GENERIC) += mhi_pci_generic.o -mhi_pci_generic-y += pci_generic.o - +# Host MHI stack +obj-y += host/ diff --git a/drivers/bus/mhi/host/Kconfig b/drivers/bus/mhi/host/Kconfig new file mode 100644 index 000000000000..da5cd0c9fc62 --- /dev/null +++ b/drivers/bus/mhi/host/Kconfig @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# MHI bus +# +# Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. +# + +config MHI_BUS + tristate "Modem Host Interface (MHI) bus" + help + Bus driver for MHI protocol. Modem Host Interface (MHI) is a + communication protocol used by the host processors to control + and communicate with modem devices over a high speed peripheral + bus or shared memory. + +config MHI_BUS_DEBUG + bool "Debugfs support for the MHI bus" + depends on MHI_BUS && DEBUG_FS + help + Enable debugfs support for use with the MHI transport. Allows + reading and/or modifying some values within the MHI controller + for debug and test purposes. + +config MHI_BUS_PCI_GENERIC + tristate "MHI PCI controller driver" + depends on MHI_BUS + depends on PCI + help + This driver provides MHI PCI controller driver for devices such as + Qualcomm SDX55 based PCIe modems. + diff --git a/drivers/bus/mhi/core/Makefile b/drivers/bus/mhi/host/Makefile similarity index 54% rename from drivers/bus/mhi/core/Makefile rename to drivers/bus/mhi/host/Makefile index c3feb4130aa3..859c2f38451c 100644 --- a/drivers/bus/mhi/core/Makefile +++ b/drivers/bus/mhi/host/Makefile @@ -1,4 +1,6 @@ obj-$(CONFIG_MHI_BUS) += mhi.o - mhi-y := init.o main.o pm.o boot.o mhi-$(CONFIG_MHI_BUS_DEBUG) += debugfs.o + +obj-$(CONFIG_MHI_BUS_PCI_GENERIC) += mhi_pci_generic.o +mhi_pci_generic-y += pci_generic.o diff --git a/drivers/bus/mhi/core/boot.c b/drivers/bus/mhi/host/boot.c similarity index 100% rename from drivers/bus/mhi/core/boot.c rename to drivers/bus/mhi/host/boot.c diff --git a/drivers/bus/mhi/core/debugfs.c b/drivers/bus/mhi/host/debugfs.c similarity index 100% rename from drivers/bus/mhi/core/debugfs.c rename to drivers/bus/mhi/host/debugfs.c diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/host/init.c similarity index 100% rename from drivers/bus/mhi/core/init.c rename to drivers/bus/mhi/host/init.c diff --git a/drivers/bus/mhi/core/internal.h b/drivers/bus/mhi/host/internal.h similarity index 100% rename from drivers/bus/mhi/core/internal.h rename to drivers/bus/mhi/host/internal.h diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/host/main.c similarity index 100% rename from drivers/bus/mhi/core/main.c rename to drivers/bus/mhi/host/main.c diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c similarity index 100% rename from drivers/bus/mhi/pci_generic.c rename to drivers/bus/mhi/host/pci_generic.c diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/host/pm.c similarity index 100% rename from drivers/bus/mhi/core/pm.c rename to drivers/bus/mhi/host/pm.c -- 2.25.1