Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp637637ybl; Thu, 23 Jan 2020 05:11:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxgl8r1rdKsNgTlf4TOX339sJjvcbwz3UJagJYZc56mVbyUp0TDxkKcNNdmE4Hkvxku4ynO X-Received: by 2002:a05:6830:1d7b:: with SMTP id l27mr10463052oti.251.1579785098752; Thu, 23 Jan 2020 05:11:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579785098; cv=none; d=google.com; s=arc-20160816; b=CeRqG4Yo7pRdLGpObEex78XZyezGxqjq5f4NKXW81yOCCJDWWXcGMmR7G9X2mzeqvM PUNSCf69AWktbdPKu11WOeLIdnmCkQDMVE4Jmn7Z56rNXFalp1QIis2ASNfH4GuM+j+L rybTaF61P6rlFqKIjZyeOuckRfayo7zr6OJ46u+C6xpWm+GrfNgBXAULc0bJI9MYZXKq EQuFSiIdbVVg4txHjewxWt9KtzBQzuDEOWCzDJ7HccQSpc4uH01stEUFMj5wBRj5OL4l Q4cHYL0CuAfw/HxMlj6yu4eGpbrTVRK9lj+YP/Pycm8t9dCPAFU8UBRgvq7rP4dZm5c3 Zseg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w+K4QUYUUumgx2GBrpHxL9/aHJwsZb+ZQPrV+qlnlsY=; b=qqFMuQsdfAMpBAak9hvaVui2Cv146HbtmWwIZds4lBS3YqPB10gSBtP58GjunDMxna H5qKZN6ibuce8CzhjlfLKWe8eoLl/sU09zJr2BeCRJEY0KM6KSu2SU082opz92+vAPcA NOCf3cFD/hb/dzN/cEtCfOCFBmIPqgLNgeM61yDpScB7QlieY3L+DX0uQ44OL4biQnhO MUfD1LlgTyeeKMZ9mnmJ/eV/RB1d8VcZAbcOHQOBUvoNWTiYWk9ujFI4TuvhzzWNtfzw uSrvl0ZsLN8YELzDftO24uYE1zhet2JxPLYflmXyCH5bBSPMwdxCQaPz9a/QX9JK3kP0 Pa7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NoDXl5cZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q131si780607oig.203.2020.01.23.05.11.26; Thu, 23 Jan 2020 05:11:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NoDXl5cZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727816AbgAWNKZ (ORCPT + 99 others); Thu, 23 Jan 2020 08:10:25 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43794 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726605AbgAWNKY (ORCPT ); Thu, 23 Jan 2020 08:10:24 -0500 Received: by mail-pl1-f194.google.com with SMTP id p23so1332389plq.10 for ; Thu, 23 Jan 2020 05:10:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=w+K4QUYUUumgx2GBrpHxL9/aHJwsZb+ZQPrV+qlnlsY=; b=NoDXl5cZHlHa7TPuIuglrvunhuT/l5kgyUDrQ5dtVKFmNDn3ABmeQkUL2uaEz5zojz c9JoLAZP+HCaGSAxx2WC6Olqu7T79PFnjmJdmsZXp0xJ4E+GYMYrMWcJXuqD5IR0BiX1 DRSI9g9mxIpy7SgiuT5aLgz1GPoeHc/9z51XSWVAM6GUdTXDgyuriL1jpEWafCwn3DBH 0Eg+hR6gJ5tpwtZLHDPMzXi4ocL1DmiQ1+EyFkGtw2PotA2jZvtcxzrDSSSJevyrcd0V NDDDhHAhH3YU3JQ3R3IL20jVTotLAtCuC1EpogjgjNLSWtZtcFfSkvjcV95uqbebKmQ5 T3hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=w+K4QUYUUumgx2GBrpHxL9/aHJwsZb+ZQPrV+qlnlsY=; b=X+5BCyDyHqyQ+qL5TSA0gLj+JNruQDSxqLazNvxWltw+EYrpbwJ3mU9GF8vdLyYAZ8 GDGcF2aoPnZsin9lwY+Ysj9TD3v7e2oeIpUT+od9BuAL3bnqmUxo42DpGLYf8LpjkQyQ DNj/5lWLXmxY5q/PQmKstLwBN+Xl/OfYualMNyqxOyggs7xOlVjtnSqmZ9J2WprrYgJ6 7aFY9VHGILfVRmjTz86eswCaL2oEm9gf/HPkUHWgDdBl+rnX/VgOqyA43AVhLKjJ8moq Sb3tn5CdChMwB4R7JrRbWQfWlfzpy5GoNI0aE014TW4G/4QpM8XFJUYVzBEou47L54cx EHPg== X-Gm-Message-State: APjAAAUOVeiFbYGmLLLNQgSrMTN1DzOf2hVHVLDvZ5euIGYMj+oWoyNE OQbvjuSs0Jvk1XvjZTiNFCaK X-Received: by 2002:a17:902:8e8c:: with SMTP id bg12mr16253851plb.101.1579785023754; Thu, 23 Jan 2020 05:10:23 -0800 (PST) Received: from mani ([103.59.133.81]) by smtp.gmail.com with ESMTPSA id a69sm2943318pfa.129.2020.01.23.05.10.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Jan 2020 05:10:23 -0800 (PST) Date: Thu, 23 Jan 2020 18:40:15 +0530 From: Manivannan Sadhasivam To: Arnd Bergmann Cc: gregkh , smohanad@codeaurora.org, Jeffrey Hugo , Kalle Valo , Bjorn Andersson , hemantk@codeaurora.org, linux-arm-msm , "linux-kernel@vger.kernel.org" , Jonathan Corbet , "open list:DOCUMENTATION" Subject: Re: [PATCH 01/16] docs: Add documentation for MHI bus Message-ID: <20200123131015.GA11366@mani> References: <20200123111836.7414-1-manivannan.sadhasivam@linaro.org> <20200123111836.7414-2-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 23, 2020 at 01:58:22PM +0100, Arnd Bergmann wrote: > On Thu, Jan 23, 2020 at 12:18 PM Manivannan Sadhasivam > wrote: > > +============ > > +MHI Topology > > +============ > > + > > +This document provides information about the MHI topology modeling and > > +representation in the kernel. > > + > > +MHI Controller > > +-------------- > > + > > +MHI controller driver manages the interaction with the MHI client devices > > +such as the external modems and WiFi chipsets. It is also the MHI bus master > > +which is in charge of managing the physical link between the host and device. > > +It is however not involved in the actual data transfer as the data transfer > > +is taken care by the physical bus such as PCIe. Each controller driver exposes > > +channels and events based on the client device type. > > + > > +Below are the roles of the MHI controller driver: > > + > > +* Turns on the physical bus and establishes the link to the device > > +* Configures IRQs, SMMU, and IOMEM > > +* Allocates struct mhi_controller and registers with the MHI bus framework > > + with channel and event configurations using mhi_register_controller. > > +* Initiates power on and shutdown sequence > > +* Initiates suspend and resume power management operations of the device. > > I don't see any callers of mhi_register_controller(). Did I just miss it or did > you not post one? I'm particularly interested in where the configuration comes > from, is this hardcoded in the driver, or parsed from firmware or from registers > in the hardware itself? > I have not included the controller driver in this patchset. But you can take a look at the ath11k controller driver here: https://git.linaro.org/people/manivannan.sadhasivam/linux.git/tree/drivers/net/wireless/ath/ath11k/mhi.c?h=ath11k-qca6390-mhi#n13 So the configuration comes from the static structures defined in the controller driver. Earlier revision derived the configuration from devicetree but there are many cases where this MHI bus is being used in non DT environments like x86. So inorder to be platform agnostic, we chose static declaration method. In future we can add DT/ACPI support for the applicable parameters. I will include the link to this controller driver in the cover letter of future iterations. Thanks, Mani > Arnd