mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Linn <John.Linn@xilinx.com>
To: <monstr@monstr.eu>, <grant.likely@secretlab.ca>
Cc: <spi-devel-general@lists.sourceforge.net>,
	<richard.rojfors@mocean-labs.com>, <linux-kernel@vger.kernel.org>
Subject: RE: [RFC PATCH 0/3] spi/xilinx: Merge OF and non-OF drivers
Date: Mon, 8 Nov 2010 07:34:05 -0700	[thread overview]
Message-ID: <ec622bb7-57d1-4aa2-80f1-65fa4b3fa7eb@VA3EHSMHS033.ehs.local> (raw)
In-Reply-To: <4CD7FB27.9030804@monstr.eu>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 2938 bytes --]

> -----Original Message-----
> From: Michal Simek [mailto:monstr@monstr.eu]
> Sent: Monday, November 08, 2010 6:29 AM
> To: grant.likely@secretlab.ca
> Cc: spi-devel-general@lists.sourceforge.net; richard.rojfors@mocean-labs.com; John Linn; linux-
> kernel@vger.kernel.org
> Subject: Re: [RFC PATCH 0/3] spi/xilinx: Merge OF and non-OF drivers
> 
> Hi Grant,
> 
> Grant Likely wrote:
> > Since of_platform_bus_type has been merged with the platform_bus_type,
> > a single platform driver can now support both use cases.  This patch
> > series merges the two halves of the xilinx_spi device driver.
> >
> > Compile tested only.  I haven't booted this yet.
> 
> I have tested it on sp605 and works well. Have you added that patches
> to your repository? Or are they somewhere else? Who is responsible for?
> 
> I would like to also discuss one change which is related mmc_spi kernel driver.
> Let me describe the problem. Microblaze can use dma in all addresses
> that's why dma_mask is setup to 0xffffffff in of_platform_device_create.
> Xilinx spi driver doesn't support dma but mmc_spi driver is checking dma_mask in parent device
> which is xilinx spi driver.
> 
> Here is the corresponding the part of code (Expect dma_mask=zero for no dma operations).
> mmc_spi.c:~1395
> 	if (spi->master->dev.parent->dma_mask) {
> 		struct device	*dev = spi->master->dev.parent;
> 
> 		host->dma_dev = dev;
> 
> 
> Based on this one our customer came with the following solution to setup
> dma_mask in xilinx_spi to zero and then mmc_spi doesn't setup dma operation.
> 
> I think that this is nice solution but I would like to be sure that I didn't miss anything.
> After that i will create proper patch with description.

Seems reasonable to me.

Thanks,
John

> 
> 
> diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
> index 7adaef6..3612e1b 100644
> --- a/drivers/spi/xilinx_spi.c
> +++ b/drivers/spi/xilinx_spi.c
> @@ -519,6 +519,9 @@ static int __devinit xilinx_spi_probe(struct platform_device *dev)
>         }
> 
>         platform_set_drvdata(dev, master);
> +       /* clear the dma_mask, to try to disable use of dma */
> +       dev->dev.dma_mask = 0;
> +
>         return 0;
>  }
> 
> 
> Thanks,
> Michal
> 
> 
> --
> Michal Simek, Ing. (M.Eng)
> w: www.monstr.eu p: +42-0-721842854
> Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
> Microblaze U-BOOT custodian


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2010-11-08 14:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 16:19 Grant Likely
2010-10-14 16:19 ` [RFC PATCH 1/3] spi/xilinx: Eliminate pdata references from common code Grant Likely
2010-10-14 16:20 ` [RFC PATCH 2/3] spi/xilinx: fold platform_driver support into main body Grant Likely
2010-10-14 16:20 ` [RFC PATCH 3/3] spi/xilinx: merge OF support code into main driver Grant Likely
2010-11-08 13:29 ` [RFC PATCH 0/3] spi/xilinx: Merge OF and non-OF drivers Michal Simek
2010-11-08 14:34   ` John Linn [this message]
2010-11-08 18:01     ` Grant Likely
2010-11-09  7:30       ` Michal Simek
2010-11-09 21:16         ` Grant Likely
2010-11-10 13:18       ` Michal Simek
2010-11-10 15:59         ` 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=ec622bb7-57d1-4aa2-80f1-65fa4b3fa7eb@VA3EHSMHS033.ehs.local \
    --to=john.linn@xilinx.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=richard.rojfors@mocean-labs.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®