From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81D814DA04 for ; Mon, 30 Dec 2024 09:16:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735550198; cv=none; b=QmF2ttQKouGkxHpEJJL4B7mbVt1FZc0VEfT6ZyXcki0DtXqrAoZLJDbZQ8vkl4u+qEeFfJgvSpkM0iwucwlhNJmtBtYpDerWxa06icrEd6Yeo529wGfP/iJrvUYCxlOMixpRZ/XjMttHCJiDP9hEfznCFZKDaegUEr10aYOX86g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735550198; c=relaxed/simple; bh=30qJniL6f2CSMnlAsj4d7FMH8lqsrWJ+fg4klQCq7mY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=cRiQeu6XWDrBCUY/9hZ+jbcVD+ZJjacn/B++pppunzhfy+ID6Zoxh3HgTfPxjNUAhJzaBpGp93hqM2udF5fxIAouNXu0omwZZNV6acJlHlASgt9AfWEpShzg5h7I1l8o+jKQGpJhk5MOKLjsLjrIqeNIMCZarTLkrQc8SaydW/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=fvDS+YTK; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fvDS+YTK" Received: by mail.gandi.net (Postfix) with ESMTPSA id 31BF5E000A; Mon, 30 Dec 2024 09:16:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1735550183; 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=30qJniL6f2CSMnlAsj4d7FMH8lqsrWJ+fg4klQCq7mY=; b=fvDS+YTKlc6ZG0pfDggZ2mz+oxoyLWl/aSXxvTaifEk6/kYJ/C/ez0HzOKzHrchgsYe7oY JXmjBXK/vGgByfUUsifd8HBYFYzgPIMPOVmg2cU+hmoW3IjR8pvcrfquixd2mSEV5NMEmY be1JCKx9pIH797Bp2OJS3yOtfOOrEZhX7SuehMxt+w4eJNab9OnQ1k72qTHrqFtb2bNJ7g Iwhwz+JA8wX82MXLXpfFi3mHzre3KaK7nmxekYcxm6iayF9u0GE7oT+PuJJjAdUGDn+csB Bl5ep75dqvI+OP5p7ppfZGdj8NaLbwW3mgSpbKM8vR63wxuivHMxYx64hWov0g== From: Miquel Raynal To: Martin Kurbanov Cc: Richard Weinberger , Vignesh Raghavendra , Ezra Buehler , Alexey Romanov , Frieder Schrempf , , , Subject: Re: [PATCH v3 4/7] mtd: spinand: add start_page to otp layout In-Reply-To: <20241226135623.43098-5-mmkurbanov@salutedevices.com> (Martin Kurbanov's message of "Thu, 26 Dec 2024 16:55:49 +0300") References: <20241226135623.43098-1-mmkurbanov@salutedevices.com> <20241226135623.43098-5-mmkurbanov@salutedevices.com> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Mon, 30 Dec 2024 10:16:22 +0100 Message-ID: <87o70t7cpl.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com On 26/12/2024 at 16:55:49 +03, Martin Kurbanov wrote: > The OTP area is divided into two parts: the factory and the user. > In SPI-NAND, it is usually this one OTP region: the first few pages > are (this sentence might be reworded, it is not very clear) > allocated to the factory area. Therefore, enter the start_page field, > which indicates from which page the custom OTP region starts. TBH I don't like this shortcut and I would prefer having: - two otp structures defining each parts (user/factory) - both the user and factory otp hooks provided - perhaps a top level macro which does both initializations based on the (user_otp_)start_page parameter. But I don't like much hiding the layout subtlety behind a "start_page" member (although it should probably be named "user_area_start_page" or something like that, otherwise it's misleading). This would also be more future proof, manufacturers are creative. Thanks, Miqu=C3=A8l