Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp339215rwb; Mon, 26 Sep 2022 20:15:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4AGyZrzFw4C5Zdy21uO1k+iYUpB354kspylNq6WKdxLzjIP2lLYLmTIS0xfUL1tuh5AkO/ X-Received: by 2002:a50:cdd8:0:b0:457:269a:decf with SMTP id h24-20020a50cdd8000000b00457269adecfmr11120585edj.359.1664248540988; Mon, 26 Sep 2022 20:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664248540; cv=none; d=google.com; s=arc-20160816; b=cJvuOguUx4ll09yYawSOYCE61vOtp7RNVowfQVqUZUPjWa7aZ73cKNyfPkHm+Fw9wf u1bdJhXDIvItCCWK0wCUvPO1CYYK9XOHaVCtedGTV2qkGINoil40tCLz8Q+fvEyngX2M OVikFdarB/jDS2pntWaO2f1gaxVBWfPUzQPwJUyEGQDPX3ylV/qm/tee6hfyrbXVeP87 K3zxJA/cDnxjar3/VNm8oE30cpURs4jnMz8eNV7dyOf8T6N8sEdByzwvUcuwY/e17dVz ZixRfdhNhzJtWqroHziKOEowN7oVQdRNYKXF0JlzftnznLWs+Qri4TEMyE5EKLAizwFC 89pg== 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=NpIohj1MqrHMplpfuy2jBg+VW7xqrhYbAbLY0Hnptsk=; b=TuF1VxS5Bm5KNsojvOq8+I8k8y6yASBMHFZSjZaHVvJAtSyOtShXmV3+p/aTyartWO 4QdXtg7A87j94A36n5JGaI3pMcLqCYymw8+gc/fqosOQ1hn5lfrFVjEwkbh/DqEgXnT3 2S07VFSyXCnKKqWh1Kvgcebe3yD11wpjg3zx8z9xU6Fpt4N/jtTgfy55Va6EbUrRS9/2 eqwFp2QSt5U7s/gc6AFKHMN18WoQFb01BgaRWSVNCjLj7L3ewG/x9d7GkbRcMpEhyMPx CavogPoIhLmUYGPCeCLiyUkOgDxJl1zHTgDUnaWUKPimlETS6zhqVdCEz6go2swYy+JZ LdMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maxlinear.com header.s=selector header.b=VA59UMoK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=maxlinear.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a05640234c900b00450bda7e40bsi517742edc.29.2022.09.26.20.14.58; Mon, 26 Sep 2022 20:15:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@maxlinear.com header.s=selector header.b=VA59UMoK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=maxlinear.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231458AbiI0DN1 (ORCPT + 99 others); Mon, 26 Sep 2022 23:13:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbiI0DMX (ORCPT ); Mon, 26 Sep 2022 23:12:23 -0400 Received: from us-smtp-delivery-115.mimecast.com (us-smtp-delivery-115.mimecast.com [170.10.133.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F31DF1168 for ; Mon, 26 Sep 2022 20:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maxlinear.com; s=selector; t=1664248221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NpIohj1MqrHMplpfuy2jBg+VW7xqrhYbAbLY0Hnptsk=; b=VA59UMoKCXKy4oCpAbacxcW59iT7KsjIG7B7uKHAKlv02frVMQtIv5URuLpBOwhOrqc11F 4jbMsHfvMI2ZTUERHyBWJtYMA5ioQAvL4OlTpiv5MzbM/18JiJvKXDpkeRYU9/Jo9ZtqEn VfzL77z60atTbUp1zymQ3SMN4uIv3F/d3qpLk3qozJkmEokh7Ow7lLP5QGf0IVs+Pk0DWY woBMVv/7E+0j8jRkth9oGix8nSse0IiRb1v4fPvhmvwPjupTyko8Pz29YZ5VC47EX14jKv yjYrD4kXY7G0hV6L1WZSx9kMvBe9jS5CV0GZUkl+cCek89J2sbZB0Jw3r9jSjA== Received: from mail.maxlinear.com (174-47-1-83.static.ctl.one [174.47.1.83]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id us-mta-520-Dphtqy8RPreigSlUTNuIuw-1; Mon, 26 Sep 2022 23:10:18 -0400 X-MC-Unique: Dphtqy8RPreigSlUTNuIuw-1 Received: from sgsxdev002.isng.phoenix.local (10.226.81.112) by mail.maxlinear.com (10.23.38.120) with Microsoft SMTP Server id 15.1.2375.24; Mon, 26 Sep 2022 20:10:15 -0700 From: Peter Harliman Liem To: , CC: , , , Peter Harliman Liem Subject: [PATCH v2 0/3] crypto: inside-secure: Add Support for MaxLinear Platform Date: Tue, 27 Sep 2022 11:10:07 +0800 Message-ID: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: maxlinear.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable 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 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-crypto@vger.kernel.org Hi, I have been utilizing inside-secure driver on MaxLinear SoC platform (which has eip197 hardware inside). One issue I found is that I needed to flip the endianness in eip197_write_firmware() function, which for reason I am not aware is using big-endian. The firmware that I have is clearly using little-endian, and unfortunately I do not have access to Marvell platform to do more investigation or comparison there. I have also tried to look for clues in Inside-Secure's hardware/firmware documentation, without success. Thus, assuming each vendor may use different endian format, on these patch set I add support for little-endian firmware (default remains big-endian). MaxLinear platform can then utilize the option, which is implemented as soc data. An alternative to this would be implementing the option as a new device-tree property, but for now I assume we do not need that since each platform endianness should be fixed, and will not vary per board/hardware. Please help review. Thanks! v2: Revert directory change for generic case. Add missing driver data change in pci_device_id. Rename data struct to safexcel_priv_data. Rework endianness selection code casting, to fix warning caught by kernel = test robot. Rename mxl version string to eip197 'c'. Peter Harliman Liem (3): crypto: inside-secure - Expand soc data structure crypto: inside-secure - Add fw_little_endian option crypto: inside-secure - Add MaxLinear platform drivers/crypto/inside-secure/safexcel.c | 69 ++++++++++++++++++------- drivers/crypto/inside-secure/safexcel.h | 10 +++- 2 files changed, 59 insertions(+), 20 deletions(-) --=20 2.17.1