Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp255055pxt; Wed, 11 Aug 2021 20:22:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjEZOa8YZ60BxX4lfWI8xAkxCUVIglPbKuEx0l8uK5bljk26J+7Ore4m35Jll8Qg96w6am X-Received: by 2002:a05:6638:304a:: with SMTP id u10mr1896738jak.62.1628738561864; Wed, 11 Aug 2021 20:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628738561; cv=none; d=google.com; s=arc-20160816; b=WqzYm3U2EMKbIAeEtEQ4NomtiXg1w0uC6YeNQlx9WG5TjejeyKbVDHs+K2PnQhAKeu 9vZKJgEpHCK6L0coUs6cc5wvDOhZeUsheBZp3n5gPmZU6prHh3JXuS6NY5rNvM94xMRD ZHWom2yBOmqIZGd3o6GrZFMxcKC1uyN9XZozNFOd55sxnaVvtbOpj0+Q+y42iiSz+Xm1 Rs46IKudi4HL23sShINNEBK/zETP9CzgaArVdU+TfRSqkVZ1WY85lLaqlvhOyBbLnifp JFWVlSF2vDN2UijVdCLc4b+bWXNpS+SypZgfEStuJlQMbK4jO9eYf6Aiyc14+8yza4is o4zA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=5JjXH/H6ie/6WRTQsTrld8apaEdquwT+9LAWsqqnmCc=; b=O2Cg+OQa7I/SDIFuwIgi0I7jwcq9D3aJuwAB94qRkgr1Sxx3js06eZUiWTRIHGKNNG 0O85S2jNXGY6xnTPKU/7Yh21er8YQ+K3Qr5gST+xY9sHFKAlMtTx+eicRo4NWj/yJuyE uBK50ABhbRYBBRZa+WRqCGnqq7GKVCrSws0TconElEGQ2FriNl9mSp+N+ib96f3ZMzpj Zq/AdF8/gc4RC3OAWvBI9DN1yKOW5rCKPHkE9ZA+OonddpdHTKX1H3PO08T3n6k4qJte IvldVAzDsKciMzQr/srUaP01sridwL2Jaj9j/EvRW5CthOs73F6i9NhNQggqrTcJA/ZF joYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=DBQV8AAI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si1411273jas.83.2021.08.11.20.22.30; Wed, 11 Aug 2021 20:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=DBQV8AAI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233758AbhHLDRc (ORCPT + 99 others); Wed, 11 Aug 2021 23:17:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233716AbhHLDR2 (ORCPT ); Wed, 11 Aug 2021 23:17:28 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29C44C0613D3 for ; Wed, 11 Aug 2021 20:17:04 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 8061A806AC; Thu, 12 Aug 2021 15:17:02 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1628738222; bh=5JjXH/H6ie/6WRTQsTrld8apaEdquwT+9LAWsqqnmCc=; h=From:To:Cc:Subject:Date; b=DBQV8AAI/0cV6BC2tuiB47Uya5zLFLLFLWaK28j4uWPWCJZEMqzDvyIaUXoSSCP6K Qa8RZlxPekajq1lvb+v7Gb1/F5rob4c/9NMn9q1rPt3xiwd+mcJcvF4dbcHnSKN8e0 8n+/kppSXNKrxXc+GtbgwHZuzKbY2TrT+t5w53yBLogkVcCU37ckrG4wpYkKHcwyzn GAPT9+M9mLPEBD17ozNkTg1B/XKLMdoqndtTpo0WvTQkQJMFS2lq7OtvRXhSsEu4/+ CJSNDsRP+EUMDlvMnYgjhiURUOdf/rPkZQpMOsEuwqePznW53MvcJywTJAS0IgkMVn faLZOUcpKTRvg== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Thu, 12 Aug 2021 15:17:02 +1200 Received: from pauld-dl.ws.atlnz.lc (pauld-dl.ws.atlnz.lc [10.33.23.37]) by pat.atlnz.lc (Postfix) with ESMTP id 6307813EE8E; Thu, 12 Aug 2021 15:17:02 +1200 (NZST) Received: by pauld-dl.ws.atlnz.lc (Postfix, from userid 1684) id 5360A1E02B4; Thu, 12 Aug 2021 15:17:02 +1200 (NZST) From: Paul Davey To: Manivannan Sadhasivam Cc: Hemant Kumar , Bhaumik Bhatt , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Davey Subject: [PATCH v4 0/2] bus: mhi: Fix MHI on big endian architectures Date: Thu, 12 Aug 2021 15:16:58 +1200 Message-Id: <20210812031700.23397-1-paul.davey@alliedtelesis.co.nz> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.3 cv=aqTM9hRV c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=MhDmnRu9jo8A:10 a=LpQP-O61AAAA:8 a=4bNo0gKVkgJuf2YILAYA:9 a=pioyyrs4ZptJ924tMmac:22 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I encountered some problems getting the MHI driver to work on an Octeon 3 platform these seem to all be related to endianness issues. The modem interface appears to require the DMA structures to be in little endian, however the MHI core driver was assembling them in native endianness. Using little endian explicitly allows the interface to function as expected. Changes in v4: - add Fixes and Reviewed-By tags as requested/offered. Changes in v3: - removed change of doorbell helper functions db_val type from dma_addr_t to __le64 favouring doing conversion only when writing to context wp fields. =20 Changes in v2: - use __fls instead of find_last_bit in pm_state conversion patch as requested by Hemant Kumar Paul Davey (2): bus: mhi: Fix pm_state conversion to string bus: mhi: Fix MHI DMA structure endianness drivers/bus/mhi/core/debugfs.c | 26 +++---- drivers/bus/mhi/core/init.c | 43 ++++++------ drivers/bus/mhi/core/internal.h | 119 ++++++++++++++++---------------- drivers/bus/mhi/core/main.c | 22 +++--- drivers/bus/mhi/core/pm.c | 4 +- 5 files changed, 109 insertions(+), 105 deletions(-) --=20 2.32.0