All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Florian Vaussard <florian.vaussard@epfl.ch>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>
Cc: Benoit Cousson <b-cousson@ti.com>,
	Tony Lindgren <tony@atomide.com>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Anil Kumar <anilk4.v@gmail.com>,
	linux-omap@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] ARM: dts: Add headers with constants for MTD partitions
Date: Tue, 11 Jun 2013 10:24:13 -0600	[thread overview]
Message-ID: <51B74F2D.2080804@wwwdotorg.org> (raw)
In-Reply-To: <1370962138-9631-2-git-send-email-florian.vaussard@epfl.ch>

On 06/11/2013 08:48 AM, Florian Vaussard wrote:
> These constants can be used to easily declare MTD partitions inside
> DTS.
> 
> The constants MTDPART_OFS_* are purposely not included. Indeed,
> parse_ofpart_partitions() is expecting u64, but a DT cell is u32.
> Negative constants, as defined by MTDPART_OFS_*, would be wrongly
> interpreted by parse_ofpart_partitions(). Two cells should be
> used to correctly encode the negative constants, but this breaks
> current usage.

I think addition of common headers like this needs an ack from
Grant/Rob. I CC'd them here.

> diff --git a/include/dt-bindings/mtd/partitions.h b/include/dt-bindings/mtd/partitions.h

> + * This header provides constants used with MTD partitions.
...
> +/* Partition size */
> +#define MTDPART_SIZ_FULL	0

Which binding document in Documentation/devicetree/bindings is this
definition associated with? The comment above should really mention
this. Documentation/devicetree/bindings/mtd/partition.txt doesn't seem
to mention this value.

> diff --git a/include/dt-bindings/sizes.h b/include/dt-bindings/sizes.h

...
> +#define SZ_1G				0x40000000
> +#define SZ_2G				0x80000000
> +
> +#endif

For MTD partitions specifically, SZ_4G and onwards would be useful in
theory, although that would end up putting two cell values into a single
macro. and then the values couldn't be added/or'd together. So, I'm not
really sure if we want to add those larger values, but food for thought...

WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: dts: Add headers with constants for MTD partitions
Date: Tue, 11 Jun 2013 10:24:13 -0600	[thread overview]
Message-ID: <51B74F2D.2080804@wwwdotorg.org> (raw)
In-Reply-To: <1370962138-9631-2-git-send-email-florian.vaussard@epfl.ch>

On 06/11/2013 08:48 AM, Florian Vaussard wrote:
> These constants can be used to easily declare MTD partitions inside
> DTS.
> 
> The constants MTDPART_OFS_* are purposely not included. Indeed,
> parse_ofpart_partitions() is expecting u64, but a DT cell is u32.
> Negative constants, as defined by MTDPART_OFS_*, would be wrongly
> interpreted by parse_ofpart_partitions(). Two cells should be
> used to correctly encode the negative constants, but this breaks
> current usage.

I think addition of common headers like this needs an ack from
Grant/Rob. I CC'd them here.

> diff --git a/include/dt-bindings/mtd/partitions.h b/include/dt-bindings/mtd/partitions.h

> + * This header provides constants used with MTD partitions.
...
> +/* Partition size */
> +#define MTDPART_SIZ_FULL	0

Which binding document in Documentation/devicetree/bindings is this
definition associated with? The comment above should really mention
this. Documentation/devicetree/bindings/mtd/partition.txt doesn't seem
to mention this value.

> diff --git a/include/dt-bindings/sizes.h b/include/dt-bindings/sizes.h

...
> +#define SZ_1G				0x40000000
> +#define SZ_2G				0x80000000
> +
> +#endif

For MTD partitions specifically, SZ_4G and onwards would be useful in
theory, although that would end up putting two cell values into a single
macro. and then the values couldn't be added/or'd together. So, I'm not
really sure if we want to add those larger values, but food for thought...

  reply	other threads:[~2013-06-11 16:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 14:48 [PATCH 0/3] ARM: dts: OMAP3: Use constants with MTD devices Florian Vaussard
2013-06-11 14:48 ` Florian Vaussard
2013-06-11 14:48 ` [PATCH 1/3] ARM: dts: Add headers with constants for MTD partitions Florian Vaussard
2013-06-11 14:48   ` Florian Vaussard
2013-06-11 16:24   ` Stephen Warren [this message]
2013-06-11 16:24     ` Stephen Warren
2013-06-11 17:28     ` Florian Vaussard
2013-06-11 17:28       ` Florian Vaussard
2013-06-12 13:05   ` Grant Likely
2013-06-12 13:05     ` Grant Likely
2013-06-19  9:19     ` Florian Vaussard
2013-06-19  9:19       ` Florian Vaussard
2013-06-11 14:48 ` [PATCH 2/3] ARM: dts: Add omap3-overo NAND flash memory binding Florian Vaussard
2013-06-11 14:48   ` Florian Vaussard
2013-06-11 14:48 ` [PATCH 3/3] ARM: dts: OMAP3: Use MTD constants for OMAP3 boards Florian Vaussard
2013-06-11 14:48   ` Florian Vaussard
2013-06-11 15:29   ` Javier Martinez Canillas
2013-06-11 15:29     ` Javier Martinez Canillas
2013-06-11 17:30     ` Florian Vaussard
2013-06-11 17:30       ` Florian Vaussard
2013-06-12 13:11     ` Grant Likely
2013-06-12 13:11       ` Grant Likely
2013-06-11 16:27   ` Stephen Warren
2013-06-11 16:27     ` Stephen Warren
2013-06-11 17:31     ` Florian Vaussard
2013-06-11 17:31       ` Florian Vaussard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51B74F2D.2080804@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=anilk4.v@gmail.com \
    --cc=b-cousson@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=florian.vaussard@epfl.ch \
    --cc=grant.likely@secretlab.ca \
    --cc=javier.martinez@collabora.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.