All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: balbi@ti.com, Sneeker Yeh <sneeker.yeh@gmail.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Grant Likely <grant.likely@linaro.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Paul Bolle <pebolle@tiscali.nl>,
	Hans de Goede <hdegoede@redhat.com>,
	Thomas Pugliese <thomas.pugliese@gmail.com>,
	David Mosberger <davidm@egauge.net>,
	Peter Griffin <peter.griffin@linaro.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Andrew Bresticker <abrestic@chromium.org>,
	Gregory CLEMENT <gregory.clement@free-electrons.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.
Subject: Re: [PATCH 2/3] usb: dwc3: add Fujitsu Specific Glue layer
Date: Mon, 5 Jan 2015 09:50:49 -0600	[thread overview]
Message-ID: <20150105155049.GF19336@saruman> (raw)
In-Reply-To: <3428284.QtTr113xXr@wuerfel>

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]

Hi,

On Mon, Jan 05, 2015 at 04:28:34PM +0100, Arnd Bergmann wrote:
> On Friday 02 January 2015 19:21:28 Felipe Balbi wrote:
> > 
> > On Tue, Dec 30, 2014 at 11:12:51AM +0100, Arnd Bergmann wrote:
> > > On Monday 29 December 2014 01:52:04 Sneeker Yeh wrote:
> > > > > > +static int dwc3_mb86s70_remove_child(struct device *dev, void *unused)
> > > > > > +{
> > > > > > +     struct platform_device *pdev = to_platform_device(dev);
> > > > > > +
> > > > > > +     of_device_unregister(pdev);
> > > > > > +
> > > > > > +     return 0;
> > > > > > +}
> > > > > > +
> > > > > > +static u64 dwc3_mb86s70_dma_mask = DMA_BIT_MASK(32);
> > > > >
> > > > > why ? Use dma_coerce_mask_and_coherent().
> > > > >
> > > > 
> > > > okay.
> > > 
> > > Actually that is still wrong: we use dma_coerce_mask_and_coherent() to
> > > annotate drivers that have traditionally been forcing their own dma mask
> > > by some other means and that need to be changed to something proper (after
> > > finding out why they did it in the first place).
> > > 
> > > Since this is about a child device, the correct interface is to use
> > > platform_device_register_full().
> > 
> > no, that's wrong. He's essentially fixing the default set by OF core,
> > which is always 32-bits anyway, so this can actually be removed. Your
> > suggestion would just make it worse.
> 
> Ah, so this was for a device that gets probed from DT? Yes, then no
> change is needed here at all.

right.

> Note that I'm working on a patch set to change the DT initialization to
> be a little smarter about the mask. Specifically any device whose parent
> has a smaller dma-ranges window than 4GB needs to start out with the
> smaller mask, and the dma_set_mask function that is called to allow 64-bit
> DMA on a device will check if the bus can actually support it.

please make sure have that patch soaking in linux-next for weeks before
attempting to merge it upstream. I would target v3.21 with such a patch.
At least keystone might be a little weird about what you describe
considering the thing boots from HIGHMEM. Also needs to consider LPAE,
etc.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@ti.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: <balbi@ti.com>, Sneeker Yeh <sneeker.yeh@gmail.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Grant Likely <grant.likely@linaro.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Paul Bolle <pebolle@tiscali.nl>,
	Hans de Goede <hdegoede@redhat.com>,
	Thomas Pugliese <thomas.pugliese@gmail.com>,
	David Mosberger <davidm@egauge.net>,
	Peter Griffin <peter.griffin@linaro.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Andrew Bresticker <abrestic@chromium.org>,
	Gregory CLEMENT <gregory.clement@free-electrons.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-usb@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	Andy Green <andy.green@linaro.org>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	Sneeker Yeh <Sneeker.Yeh@tw.fujitsu.com>
Subject: Re: [PATCH 2/3] usb: dwc3: add Fujitsu Specific Glue layer
Date: Mon, 5 Jan 2015 09:50:49 -0600	[thread overview]
Message-ID: <20150105155049.GF19336@saruman> (raw)
In-Reply-To: <3428284.QtTr113xXr@wuerfel>

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]

Hi,

On Mon, Jan 05, 2015 at 04:28:34PM +0100, Arnd Bergmann wrote:
> On Friday 02 January 2015 19:21:28 Felipe Balbi wrote:
> > 
> > On Tue, Dec 30, 2014 at 11:12:51AM +0100, Arnd Bergmann wrote:
> > > On Monday 29 December 2014 01:52:04 Sneeker Yeh wrote:
> > > > > > +static int dwc3_mb86s70_remove_child(struct device *dev, void *unused)
> > > > > > +{
> > > > > > +     struct platform_device *pdev = to_platform_device(dev);
> > > > > > +
> > > > > > +     of_device_unregister(pdev);
> > > > > > +
> > > > > > +     return 0;
> > > > > > +}
> > > > > > +
> > > > > > +static u64 dwc3_mb86s70_dma_mask = DMA_BIT_MASK(32);
> > > > >
> > > > > why ? Use dma_coerce_mask_and_coherent().
> > > > >
> > > > 
> > > > okay.
> > > 
> > > Actually that is still wrong: we use dma_coerce_mask_and_coherent() to
> > > annotate drivers that have traditionally been forcing their own dma mask
> > > by some other means and that need to be changed to something proper (after
> > > finding out why they did it in the first place).
> > > 
> > > Since this is about a child device, the correct interface is to use
> > > platform_device_register_full().
> > 
> > no, that's wrong. He's essentially fixing the default set by OF core,
> > which is always 32-bits anyway, so this can actually be removed. Your
> > suggestion would just make it worse.
> 
> Ah, so this was for a device that gets probed from DT? Yes, then no
> change is needed here at all.

right.

> Note that I'm working on a patch set to change the DT initialization to
> be a little smarter about the mask. Specifically any device whose parent
> has a smaller dma-ranges window than 4GB needs to start out with the
> smaller mask, and the dma_set_mask function that is called to allow 64-bit
> DMA on a device will check if the bus can actually support it.

please make sure have that patch soaking in linux-next for weeks before
attempting to merge it upstream. I would target v3.21 with such a patch.
At least keystone might be a little weird about what you describe
considering the thing boots from HIGHMEM. Also needs to consider LPAE,
etc.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-01-05 15:50 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  2:10 [PATCH 0/3] Add support for Fujitsu USB host controller Sneeker Yeh
2014-12-16  2:10 ` Sneeker Yeh
2014-12-16  2:10 ` [PATCH 1/3] usb: host: f_usb20ho: add support for Fujitsu ehci/ohci USB 2.0 " Sneeker Yeh
2014-12-16  2:10   ` Sneeker Yeh
2014-12-16  9:06   ` Arnd Bergmann
2014-12-16  9:06     ` Arnd Bergmann
2014-12-17 15:33     ` Sneeker.Yeh
     [not found]       ` <830AC58E49A426478AC39824BC0FA915D8BB402BB7-BxlyW7DJwtfE0yrG4eIIn8GT06e9YD5CS4/B3AGzWvkvtab9mdV7tw@public.gmane.org>
2014-12-17 15:44         ` Arnd Bergmann
2014-12-17 15:44           ` Arnd Bergmann
2014-12-17 15:46           ` Sneeker.Yeh
2014-12-16  2:10 ` [PATCH 2/3] usb: dwc3: add Fujitsu Specific Glue layer Sneeker Yeh
2014-12-16  2:10   ` Sneeker Yeh
     [not found]   ` <1418695828-605-3-git-send-email-Sneeker.Yeh-l16TxrwUIHTQFUHtdCDX3A@public.gmane.org>
2014-12-22 15:59     ` Felipe Balbi
2014-12-22 15:59       ` Felipe Balbi
2014-12-28 17:52       ` Sneeker Yeh
2014-12-29 16:14         ` Felipe Balbi
2014-12-29 16:14           ` Felipe Balbi
2015-01-04 13:16           ` Sneeker Yeh
2015-01-05 15:52             ` Felipe Balbi
2015-01-05 15:52               ` Felipe Balbi
     [not found]         ` <CAJ1gpc0uniw3F3O9nxTLHp9M2boxrOACYDB=fgruhLOLdqg9yA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-30 10:12           ` Arnd Bergmann
2014-12-30 10:12             ` Arnd Bergmann
2015-01-03  1:21             ` Felipe Balbi
2015-01-03  1:21               ` Felipe Balbi
2015-01-05 15:28               ` Arnd Bergmann
2015-01-05 15:28                 ` Arnd Bergmann
2015-01-05 15:50                 ` Felipe Balbi [this message]
2015-01-05 15:50                   ` Felipe Balbi
2015-01-04 14:32             ` Sneeker Yeh
2014-12-16  2:10 ` [PATCH 3/3] usb: dwc3: add a quirk for device disconnection issue in Synopsis dwc3 core Sneeker Yeh
2014-12-16  2:10   ` Sneeker Yeh
2014-12-22 15:37   ` Felipe Balbi
2014-12-22 15:37     ` Felipe Balbi
2014-12-29  6:41     ` Sneeker Yeh
2014-12-29  8:07       ` Sneeker Yeh
     [not found]         ` <CAJ1gpc3-Wjtm54WOhO6RXjZft9BMngzyYC0-S-XnTacV-qKgMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-29 16:06           ` Felipe Balbi
2014-12-29 16:06             ` Felipe Balbi
2015-01-04 12:55             ` Sneeker Yeh
     [not found]               ` <CAJ1gpc0Uu4vS2iA_o_W5NaE_QBWDYFZJio7yKvhpaR5f=qWcGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-05 17:09                 ` Felipe Balbi
2015-01-05 17:09                   ` Felipe Balbi
2015-01-11 15:19                   ` Sneeker Yeh
2015-01-12 17:20                     ` Felipe Balbi
2015-01-12 17:20                       ` Felipe Balbi
2015-01-12 17:29                       ` Paul Bolle
2015-01-12 17:29                         ` Paul Bolle
2015-01-12 17:50                         ` Felipe Balbi
2015-01-12 17:50                           ` Felipe Balbi
2015-01-14  7:08                       ` Sneeker Yeh
2015-01-14 17:02                         ` Felipe Balbi
2015-01-14 17:02                           ` Felipe Balbi
2015-01-17 10:52                           ` Sneeker Yeh

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=20150105155049.GF19336@saruman \
    --to=balbi@ti.com \
    --cc=abrestic@chromium.org \
    --cc=arnd@arndb.de \
    --cc=davidm@egauge.net \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=hdegoede@redhat.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger. \
    --cc=mark.rutland@arm.com \
    --cc=mathias.nyman@intel.com \
    --cc=pawel.moll@arm.com \
    --cc=pebolle@tiscali.nl \
    --cc=peter.griffin@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sneeker.yeh@gmail.com \
    --cc=stern@rowland.harvard.edu \
    --cc=thomas.pugliese@gmail.com \
    --cc=yoshihiro.shimoda.uh@renesas.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.