Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4324585rwd; Tue, 23 May 2023 06:22:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xkY8gucGjmAR7Ss37YuDy20y/X8XJyt3Mkuz25GrviIiaS/bpCvexoKh6uUkZh2SzBf2K X-Received: by 2002:a17:902:ced0:b0:1af:b47e:7892 with SMTP id d16-20020a170902ced000b001afb47e7892mr7134455plg.67.1684848176165; Tue, 23 May 2023 06:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684848176; cv=none; d=google.com; s=arc-20160816; b=huStw1XiRCp6dKgMQOqL/jK9CNwfI89SuMDeL+ht8E0GTUB8jW/S1cWT/rS6RksB60 9HXuK5AS40NaGPoZmQjiiBlkpQRO7lX28uzCmf36dHiSDJDYmRjnuaMFnylhAZLmSzkP h8hFx8KF/zN+3aYQtfUiXFkmUOn1cAuxUchlGLe79Xa/MhiFne+A+G7cFALHUFLQ3qMW 9ecoWq/VoWKSxmKFp6wBcF/AFxNjQ49aXEbjC7ICUdbl6Qe+taocdni8NQcrVC72Bks7 cxhNsgJ/ePKhvHIiRZYGTf+Tj7vp4c87s7aaW0Wm2WzNy1v/AvQPgPqFtPCbBgfSo6Mf gIjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/y8I9Pv/4V6YStWX5R2hWIwO0b0qZb/p+qZFG9UP80A=; b=XW+34L0CnEoyHqrYtFwRYPbyOIxWj1Y8D13tUBffszCMADEBddBPZihzy/2dk6jTqH xhUAm3W+VJ16gheCZVXD9vt4zpatHzcT7n5At+tiF8xknuo0i441zaVDIoXt2x0Ui9Ow G/pSBjG8MeYWa253r3r1uHBcrAirCtDmdIHjKTKTDarIZip642/DWXL91wzRgHvDLY6i UJqeTWw8y5vE5wk/rY0o4c44nPG0f0x4LDp8BVkTee0mInHtjeo8z1WvSw8XChQaEh2P bXbJMSh3S71JLilAA3nePB54Nf6KzOAX0OP07tFUag5Y+92F2YogrjCIvF9TOosH8a1K PJMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OIvUK9YM; 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 r22-20020a170902be1600b001ab23ced2d2si2531895pls.613.2023.05.23.06.22.42; Tue, 23 May 2023 06:22:56 -0700 (PDT) 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=OIvUK9YM; 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 S236523AbjEWNT2 (ORCPT + 99 others); Tue, 23 May 2023 09:19:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233330AbjEWNT1 (ORCPT ); Tue, 23 May 2023 09:19:27 -0400 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70A71109 for ; Tue, 23 May 2023 06:19:24 -0700 (PDT) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-56187339d6eso93859417b3.2 for ; Tue, 23 May 2023 06:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684847963; x=1687439963; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/y8I9Pv/4V6YStWX5R2hWIwO0b0qZb/p+qZFG9UP80A=; b=OIvUK9YMalUppxB8kSu51gObJXvRPS5kRx5ma9aApqEDi59LWrpN5QR7NZohdMM/Z9 CvKp4N1eOkMX5MA0EPbt5dxeCJqZ8ZRAGq9hG3m1x6Q7CIWML9Zi6pjn0Gwxc0UFOxZo KoNv9t0GuZ2wXhQZTfDS1b0gzjoLY9VqGwrozfdW9980ADGshUzbRh/v586Hfc2ZcJvd niF/iW4URNhQNhkQs0DwahCAvxMHM0wPFrQ6ZaEt5SibaffLRD/qt3wZLTriyJ3PhPNL xSY+/V1cJfM25Iaf5FuAtIY0Ns++qV/NaTMUB4YyXxolaGvnAwS7ovbUofRHQUvjU1ID yZsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684847963; x=1687439963; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/y8I9Pv/4V6YStWX5R2hWIwO0b0qZb/p+qZFG9UP80A=; b=RHDhOxlTChgtPWYCg0nZTnaZkk/Vlsmit8L2uZf5lYADywxxqu307/G/q4a42AF4Sa R/wsYJXBtjG5+sJlvN/Whbc5WMFWo2cPD/qL6TBv5eW9pgTZvCZIPaQPYS66+pRZh16P Wqb0AhsqMrz34phWpoS56YMCxT3FYsdf+DneYmm7CyBZx63As7tIeb8H+IrZfhYOkT6y 1nhaud9GG/EMYe+peZuTL/G8rAD2DjXVkC8x7/+3NuUDrtPb2LOSB9VmiRgvzAK72jZr athmgcIi/QQhuDYglxackK1HMaNyrDxbH2v3NOhmZGzV+Y3oG7TYOFQiNW50ODrv44HU fvHw== X-Gm-Message-State: AC+VfDyse3HjgvK0/dro9YOoipCywWm2t22SzyI7D3b4n7YLg665ktFC USTzkZ3KK5zz4TcLr+7OhOh90Q88eHkRrGMdc/QPeQ== X-Received: by 2002:a0d:cb16:0:b0:561:a80b:6647 with SMTP id n22-20020a0dcb16000000b00561a80b6647mr13906047ywd.45.1684847963644; Tue, 23 May 2023 06:19:23 -0700 (PDT) MIME-Version: 1.0 References: <20230506-seama-partitions-v1-0-5806af1e4ac7@linaro.org> <20230509093129.40b30c7a@xps-13> <20230522164559.6c599c61@xps-13> In-Reply-To: <20230522164559.6c599c61@xps-13> From: Linus Walleij Date: Tue, 23 May 2023 15:19:12 +0200 Message-ID: Subject: Re: [PATCH 0/2] Add SEAMA partition types To: Miquel Raynal Cc: Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Florian Fainelli , Hauke Mehrtens , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Broadcom internal kernel review list , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 On Mon, May 22, 2023 at 4:46=E2=80=AFPM Miquel Raynal wrote: > > The mtdsplit code uses different magic numbers to identify where > > the different partitions start. > > Is mtdsplit acting on a device or on a partition? It acts on a partition, usually you use a fixed-partitition scheme to point out the different chunks in the flash and then mtdsplit comes in to do its job. > Right now you define > a partition to be compatible with seama, I would have imagined the > partitions container should be compatible with seama instead of > fixed-partitions, but I haven't looked at the whole implementation, so > maybe my comment is just wrong. The NAND flash on my device needs it to be a partition, it looks like so: &nandcs { /* Spansion S34ML01G2, 128MB with 128KB erase blocks */ partitions { compatible =3D "fixed-partitions"; #address-cells =3D <1>; #size-cells =3D <1>; firmware@0 { compatible =3D "seama"; label =3D "firmware"; reg =3D <0x00000000 0x08000000>; }; }; }; The reason is mainly that other devices may put eraseblocks aside for other things, and the SEAMA format itself does not know its extents (it needs to be told where the end of the partition is). > > One such type of partition is seama, so the code needs to know > > that it should look for seama magic to determine the size and > > split this partition in a kernel and rootfs part. This is the code: > > https://git.openwrt.org/?p=3Dopenwrt/openwrt.git;a=3Dtree;f=3Dtarget/li= nux/generic/files/drivers/mtd/mtdsplit;h=3D3e0df856713a84b1decf17190f171cb1= 0ce7a757;hb=3DHEAD > > That's very informative, thanks for all the context. I believe this > could actually be part of the binding description (not the "this is an > openWRT stuff", of course). Hm I'll think about what I can put in there... Yours, Linus Walleij