linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: "Shimoda,
	Yoshihiro"
	<yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	SH-Linux <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] spi: spi-sh: add IORESOURCE_MEM_TYPE_MASK decoding for access size
Date: Fri, 27 Jan 2012 03:01:11 +0000	[thread overview]
Message-ID: <20120127030111.GF26283@linux-sh.org> (raw)
In-Reply-To: <4F21FA89.4060709-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>

On Fri, Jan 27, 2012 at 10:14:49AM +0900, Shimoda, Yoshihiro wrote:
> 2012/01/26 19:22, Paul Mundt wrote:
> > On Thu, Jan 26, 2012 at 05:43:57PM +0900, Shimoda, Yoshihiro wrote:
> [ snip ]
> >>  static void spi_sh_set_bit(struct spi_sh_data *ss, unsigned long val,
> >> @@ -464,6 +473,18 @@ static int __devinit spi_sh_probe(struct platform_device *pdev)
> >>  	ss = spi_master_get_devdata(master);
> >>  	dev_set_drvdata(&pdev->dev, ss);
> >>
> >> +	switch (res->flags & IORESOURCE_MEM_TYPE_MASK) {
> >> +	case IORESOURCE_MEM_8BIT:
> >> +		ss->width = 8;
> >> +		break;
> >> +	case IORESOURCE_MEM_32BIT:
> >> +		ss->width = 32;
> >> +		break;
> >> +	default:
> >> +		dev_err(&pdev->dev, "No support width\n");
> >> +		ret = -ENODEV;
> >> +		goto error1;
> > 
> > If the default up to this point has been 32-bit only then it makes sense
> > for 32 to still remain the default. The 8-bit user is presumably a new
> > one and therefore has no existing platform data configuration to worry
> > about, while this change would require existing users to be updated for
> > the new 32-bit flag to behave the same way they have up until now. 
> 
> Thank you for your comment.
> Unfortunately, the value of IORESOURCE_MEM_8BIT is (0<<3), so existing users
> will not enter to the default.
> 
Ah, ok, I missed that. In that case I suppose your original patch makes
the most sense. We should be able to roll in the platform update patch
early anyways.

      parent reply	other threads:[~2012-01-27  3:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26  8:43 [PATCH] spi: spi-sh: add IORESOURCE_MEM_TYPE_MASK decoding for access size Shimoda, Yoshihiro
2012-01-26 10:22 ` Paul Mundt
2012-01-27  1:14   ` Shimoda, Yoshihiro
     [not found]     ` <4F21FA89.4060709-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2012-01-27  3:01       ` Paul Mundt [this message]

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=20120127030111.GF26283@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@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;
as well as URLs for NNTP newsgroup(s).