Devicetree
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
Cc: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	duyl-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org,
	linnj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org,
	edgar.iglesias-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	john.williams-g5w7nrANp4BDPfheJLI6IQ@public.gmane.org
Subject: Re: [PATCH 2/7] of: MTD: Fix OF probing on little-endian systems
Date: Wed, 29 Sep 2010 15:29:58 +0900	[thread overview]
Message-ID: <20100929062958.GE2439@angua.secretlab.ca> (raw)
In-Reply-To: <1285739538-29058-3-git-send-email-monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>

On Wed, Sep 29, 2010 at 03:52:13PM +1000, Michal Simek wrote:
> Convert big-endian DTB to little-endian if necessary.
> 
> Signed-off-by: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
> CC: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> CC: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> CC: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> CC: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> CC: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> CC: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

Applied, thanks.

g.

> ---
>  drivers/mtd/maps/physmap_of.c |    2 +-
>  drivers/mtd/ofpart.c          |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
> index fe63f6b..ec3edf6 100644
> --- a/drivers/mtd/maps/physmap_of.c
> +++ b/drivers/mtd/maps/physmap_of.c
> @@ -294,7 +294,7 @@ static int __devinit of_flash_probe(struct platform_device *dev,
>  		info->list[i].map.name = dev_name(&dev->dev);
>  		info->list[i].map.phys = res.start;
>  		info->list[i].map.size = res_size;
> -		info->list[i].map.bankwidth = *width;
> +		info->list[i].map.bankwidth = be32_to_cpup(width);
>  
>  		err = -ENOMEM;
>  		info->list[i].map.virt = ioremap(info->list[i].map.phys,
> diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
> index 8bf7dc6..7bd171e 100644
> --- a/drivers/mtd/ofpart.c
> +++ b/drivers/mtd/ofpart.c
> @@ -53,8 +53,8 @@ int __devinit of_mtd_parse_partitions(struct device *dev,
>  			continue;
>  		}
>  
> -		(*pparts)[i].offset = reg[0];
> -		(*pparts)[i].size = reg[1];
> +		(*pparts)[i].offset = be32_to_cpu(reg[0]);
> +		(*pparts)[i].size = be32_to_cpu(reg[1]);
>  
>  		partname = of_get_property(pp, "label", &len);
>  		if (!partname)
> -- 
> 1.5.5.1
> 

  parent reply	other threads:[~2010-09-29  6:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1285739538-29058-1-git-send-email-monstr@monstr.eu>
     [not found] ` <1285739538-29058-1-git-send-email-monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2010-09-29  5:52   ` [PATCH 1/7] of: GPIO: Fix OF probing on little-endian systems Michal Simek
     [not found]     ` <1285739538-29058-2-git-send-email-monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2010-09-29  5:52       ` [PATCH 2/7] of: MTD: " Michal Simek
     [not found]         ` <1285739538-29058-3-git-send-email-monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2010-09-29  5:52           ` [PATCH 3/7] of: Fix uart16550 initialization " Michal Simek
     [not found]             ` <1285739538-29058-4-git-send-email-monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2010-09-29  5:52               ` [PATCH 4/7] net: emaclite: Add support for little-endian platforms Michal Simek
2010-09-29  6:11                 ` Grant Likely
     [not found]                   ` <20100929061146.GA2439-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-09-29  6:27                     ` David Miller
     [not found]                       ` <20100928.232722.189705899.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-09-29  7:33                         ` Michal Simek
2010-09-29  6:29               ` [PATCH 3/7] of: Fix uart16550 initialization on little-endian systems Grant Likely
2010-09-29  6:29           ` Grant Likely [this message]
2010-09-29  6:30       ` [PATCH 1/7] of: GPIO: Fix OF probing " Grant Likely

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=20100929062958.GE2439@angua.secretlab.ca \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=duyl-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=edgar.iglesias-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=john.williams-g5w7nrANp4BDPfheJLI6IQ@public.gmane.org \
    --cc=linnj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org \
    --cc=monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox