Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3250723rdh; Mon, 27 Nov 2023 09:28:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEv0QYyrTbWdIK2h+8dilO1e1jALDP9ViXCc4CCabE4mV28lsgPBi8e34AXR9ZM+4WJHD0Y X-Received: by 2002:a17:903:1103:b0:1ce:6312:537c with SMTP id n3-20020a170903110300b001ce6312537cmr12522356plh.10.1701106123365; Mon, 27 Nov 2023 09:28:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701106123; cv=none; d=google.com; s=arc-20160816; b=jmCRcKHjAkIgWkergUnbAl5zT91Hj+NpDFn+kf3Db6+iVG5C2b302O37NHZhNPE74j IhGnCoe7U3VSirIlURg1hFxUBHYkyaJ3+iLrNMU31Fj0X70mJs4ma/9JNCeZHaO0ip0t VdbF8VyzhaUWMDBKAmHAhirpKPb3BSV7klxZuqdps9yvSyu3eJ34By+dsDqKxOuGUxUy Z5KYHF9+M3I8Yid+dnnNIaGjvW6tl6VmGfQ/lWvHHxrO7/OrT4/sBREidA6Tp63z2Xoz 9p/0Q3b5toEFuJme2VLo6oO88EcXOmqsqVhPMAFioXeXHK5tPNYH2LMobtmo5idmq43V OVug== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=cgRUTwLXcNd58EG84hnaXaWLqxXMccudnE3zQ48EYVQ=; fh=pm6lM3UqDIPs/aAq/43PUxPgrPpH+VJpTzRQZpNfirI=; b=Kcw35uHknlieSsF5+X2wx0mUJdC6yZ5lKJEj9cVO8dEImckUpxCMbMSwGV/hOWY5In EUkaIoMpTtb3+kS9T/lw/AKNWTPMm4jojGXydXsEEtGOjQK8Z7iY5RBrkP9fY1p3X5fw Av0O09lzoGHm0mXU9ywoeHXWprfO8W/3SIGFSre9uTS8D4NoPHBjUmps8R0EQLN0IsmV 51ocG/A7lpqGimsiAZclQTEYe3p8uD8lH7lioRkBOW/t5W4v40UZXJxPwCiiWTOI7Vms QnXJbjFL/1RqDnQweafEGlx/L+KCOeWp8traxHzu97r34/FAWa9zTFzCF6vTRQlJqGZ+ sDrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="nF/gRJ8x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q5-20020a170902dac500b001c0cb378f04si290008plx.335.2023.11.27.09.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:28:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="nF/gRJ8x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 43C268070DB7; Mon, 27 Nov 2023 09:28:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229631AbjK0R2S (ORCPT + 99 others); Mon, 27 Nov 2023 12:28:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjK0R2R (ORCPT ); Mon, 27 Nov 2023 12:28:17 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66AA085; Mon, 27 Nov 2023 09:28:22 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E4FC14000B; Mon, 27 Nov 2023 17:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701106101; 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: in-reply-to:in-reply-to:references:references; bh=cgRUTwLXcNd58EG84hnaXaWLqxXMccudnE3zQ48EYVQ=; b=nF/gRJ8xfx+oSU3Q8tKHoRZUEPdMORtKkZXe1y9wvSBw1LzUXyhzdMd5avFCzZ6iaSZTzh ygc0xDl00VLDGTbWbG1KcXy06Iutu8rta3w9rAU+rXz4piOf8BXP0hGyEHjgjOyjmhA1GF 6O8IJKtjly+NQEmAwu3BpvxS2eqbh68CSdriYdPRAh7aEuj2pG4NUbv44RtfAZAt/qBzPj oQ1Ml6uEn44cMzzyEIWj2acon53DwEflAJU7sKnLoBnZAPg7L3SHUmXyrzKu5PM3sSzGa9 7GXGLwAoxlF+Z62ykJgSjmfRN23UTP/cRg8QvZgN0HMNZusvH6N617R1QRttWQ== Date: Mon, 27 Nov 2023 18:28:19 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH net-next 9/9] net: pse-pd: Add PD692x0 PSE controller driver Message-ID: <20231127182819.11ee98d2@kmaincent-XPS-13-7390> In-Reply-To: References: <20231116-feature_poe-v1-0-be48044bf249@bootlin.com> <20231116-feature_poe-v1-9-be48044bf249@bootlin.com> <45694d77-bcf8-4377-9aa0-046796de8d74@lunn.ch> <20231122174828.7625d7f4@kmaincent-XPS-13-7390> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 09:28:40 -0800 (PST) On Wed, 22 Nov 2023 18:11:25 +0100 Andrew Lunn wrote: > > > Is the firmware in Motorola SREC format? I thought the kernel had a > > > helper for that, but a quick search did not find it. So maybe i'm > > > remembering wrongly. But it seems silly for every driver to implement > > > an SREC parser. =20 > >=20 > > Oh, I didn't know this format. =20 >=20 > Its often used in small deeply embedded systems. Microcontrollers, > rather than something which can run Linux. >=20 > > The firmware seems indeed to match this format > > specification. > > I found two reference of this Firmware format in the kernel: > > https://elixir.bootlin.com/linux/v6.5.7/source/sound/soc/codecs/zl38060= .c#L178 > > https://elixir.bootlin.com/linux/v6.5.7/source/drivers/staging/wlan-ng/= prism2fw.c > > =20 >=20 > Ah, all inside a header file. Probably why i missed it. But ihex is > not SREC. ihex came from Intel. SREC from Motorola. >=20 > So i would follow the basic flow in include/linux/ihex.h, add an > include/linux/srec.h but adapt it for SREC. In fact the ihex.h header is only adding the ihex_validate_fw and the request_ihex_firmware functions. In my case I do not use request firmware b= ut sysfs firmware loader. I could add srec_validate_fw but I am already checking the firmware during the flashing process due to its special flashi= ng process. I could not treat the firmware to one blob to be send. Each byte need to be send in one i2c messages and at the end of eaxch line we need to wait a "\r= \n" (within 30ms) before sending next line. Yes, it takes time to be flashed! Do you see generic helper that I could add?=20 Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com