* Re: [v2] bcma: use of_dma_configure() to set initial dma mask
[not found] <20160903140819.245F06216C@smtp.codeaurora.org>
@ 2016-09-05 15:26 ` Arnd Bergmann
2016-09-05 18:34 ` Arend Van Spriel
2016-09-06 7:48 ` Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-09-05 15:26 UTC (permalink / raw)
To: Kalle Valo
Cc: Rafał Miłecki, Hauke Mehrtens, linux-wireless, linux-kernel
On Saturday, September 3, 2016 2:08:19 PM CEST Kalle Valo wrote:
> Arnd Bergmann <arnd@arndb.de> wrote:
> > While fixing another bug, I noticed that bcma manually sets up
> > a dma_mask pointer for its child devices. We have a generic
> > helper for that now, which should be able to cope better with
> > any variations that might be needed to deal with cache coherency,
> > unusual DMA address offsets, iommus, or limited DMA masks, none
> > of which are currently handled here.
> >
> > This changes the core to use the of_dma_configure(), like
> > we do for platform devices that are probed directly from
> > DT.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Nobody tested this, so I'll drop the patch.
>
Should I resend it? I think it's still required.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v2] bcma: use of_dma_configure() to set initial dma mask
2016-09-05 15:26 ` [v2] bcma: use of_dma_configure() to set initial dma mask Arnd Bergmann
@ 2016-09-05 18:34 ` Arend Van Spriel
2016-09-06 7:48 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Arend Van Spriel @ 2016-09-05 18:34 UTC (permalink / raw)
To: Arnd Bergmann, Kalle Valo
Cc: Rafał Miłecki, Hauke Mehrtens, linux-wireless, linux-kernel
On 5-9-2016 17:26, Arnd Bergmann wrote:
> On Saturday, September 3, 2016 2:08:19 PM CEST Kalle Valo wrote:
>> Arnd Bergmann <arnd@arndb.de> wrote:
>>> While fixing another bug, I noticed that bcma manually sets up
>>> a dma_mask pointer for its child devices. We have a generic
>>> helper for that now, which should be able to cope better with
>>> any variations that might be needed to deal with cache coherency,
>>> unusual DMA address offsets, iommus, or limited DMA masks, none
>>> of which are currently handled here.
>>>
>>> This changes the core to use the of_dma_configure(), like
>>> we do for platform devices that are probed directly from
>>> DT.
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> Nobody tested this, so I'll drop the patch.
>>
>
> Should I resend it? I think it's still required.
Maybe you should request some bcma users (Rafał?) explicitly to test
this. I have no equipment with CONFIG_OF enabled over here.
Regards,
Arend
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v2] bcma: use of_dma_configure() to set initial dma mask
2016-09-05 15:26 ` [v2] bcma: use of_dma_configure() to set initial dma mask Arnd Bergmann
2016-09-05 18:34 ` Arend Van Spriel
@ 2016-09-06 7:48 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-09-06 7:48 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rafał Miłecki, Hauke Mehrtens, linux-wireless, linux-kernel
Arnd Bergmann <arnd@arndb.de> writes:
> On Saturday, September 3, 2016 2:08:19 PM CEST Kalle Valo wrote:
>> Arnd Bergmann <arnd@arndb.de> wrote:
>> > While fixing another bug, I noticed that bcma manually sets up
>> > a dma_mask pointer for its child devices. We have a generic
>> > helper for that now, which should be able to cope better with
>> > any variations that might be needed to deal with cache coherency,
>> > unusual DMA address offsets, iommus, or limited DMA masks, none
>> > of which are currently handled here.
>> >
>> > This changes the core to use the of_dma_configure(), like
>> > we do for platform devices that are probed directly from
>> > DT.
>> >
>> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> Nobody tested this, so I'll drop the patch.
>
> Should I resend it? I think it's still required.
Sorry, I misunderstood your comments then. No need to resend, I readded
this to my queue:
https://patchwork.kernel.org/patch/8608751/
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] bcma: use of_dma_configure() to set initial dma mask
@ 2016-03-17 9:39 Arnd Bergmann
2016-09-03 14:08 ` [v2] " Kalle Valo
2016-09-09 9:03 ` Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-03-17 9:39 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Arnd Bergmann, Kalle Valo, Hauke Mehrtens, linux-wireless, linux-kernel
While fixing another bug, I noticed that bcma manually sets up
a dma_mask pointer for its child devices. We have a generic
helper for that now, which should be able to cope better with
any variations that might be needed to deal with cache coherency,
unusual DMA address offsets, iommus, or limited DMA masks, none
of which are currently handled here.
This changes the core to use the of_dma_configure(), like
we do for platform devices that are probed directly from
DT.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
This patch needs to be tested to ensure we don't introduce
regressions, and should probably go into 4.7 as a cleanup.
v2: fix typo
drivers/bcma/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 1f635471f318..2c1798e38abd 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -209,6 +209,8 @@ static void bcma_of_fill_device(struct platform_device *parent,
core->dev.of_node = node;
core->irq = bcma_of_get_irq(parent, core, 0);
+
+ of_dma_configure(&core->dev, node);
}
unsigned int bcma_core_irq(struct bcma_device *core, int num)
@@ -248,12 +250,12 @@ void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
core->irq = bus->host_pci->irq;
break;
case BCMA_HOSTTYPE_SOC:
- core->dev.dma_mask = &core->dev.coherent_dma_mask;
- if (bus->host_pdev) {
+ if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
core->dma_dev = &bus->host_pdev->dev;
core->dev.parent = &bus->host_pdev->dev;
bcma_of_fill_device(bus->host_pdev, core);
} else {
+ core->dev.dma_mask = &core->dev.coherent_dma_mask;
core->dma_dev = &core->dev;
}
break;
--
2.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [v2] bcma: use of_dma_configure() to set initial dma mask
2016-03-17 9:39 [PATCH v2] " Arnd Bergmann
@ 2016-09-03 14:08 ` Kalle Valo
2016-09-09 9:03 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-09-03 14:08 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rafał Miłecki, Arnd Bergmann, Hauke Mehrtens,
linux-wireless, linux-kernel
Arnd Bergmann <arnd@arndb.de> wrote:
> While fixing another bug, I noticed that bcma manually sets up
> a dma_mask pointer for its child devices. We have a generic
> helper for that now, which should be able to cope better with
> any variations that might be needed to deal with cache coherency,
> unusual DMA address offsets, iommus, or limited DMA masks, none
> of which are currently handled here.
>
> This changes the core to use the of_dma_configure(), like
> we do for platform devices that are probed directly from
> DT.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Nobody tested this, so I'll drop the patch.
--
Sent by pwcli
https://patchwork.kernel.org/patch/8608751/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v2] bcma: use of_dma_configure() to set initial dma mask
2016-03-17 9:39 [PATCH v2] " Arnd Bergmann
2016-09-03 14:08 ` [v2] " Kalle Valo
@ 2016-09-09 9:03 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-09-09 9:03 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rafał Miłecki, Arnd Bergmann, Hauke Mehrtens,
linux-wireless, linux-kernel
Arnd Bergmann <arnd@arndb.de> wrote:
> While fixing another bug, I noticed that bcma manually sets up
> a dma_mask pointer for its child devices. We have a generic
> helper for that now, which should be able to cope better with
> any variations that might be needed to deal with cache coherency,
> unusual DMA address offsets, iommus, or limited DMA masks, none
> of which are currently handled here.
>
> This changes the core to use the of_dma_configure(), like
> we do for platform devices that are probed directly from
> DT.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, 1 patch applied to wireless-drivers-next.git:
defb893fffef bcma: use of_dma_configure() to set initial dma mask
--
Sent by pwcli
https://patchwork.kernel.org/patch/8608751/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-09 9:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20160903140819.245F06216C@smtp.codeaurora.org>
2016-09-05 15:26 ` [v2] bcma: use of_dma_configure() to set initial dma mask Arnd Bergmann
2016-09-05 18:34 ` Arend Van Spriel
2016-09-06 7:48 ` Kalle Valo
2016-03-17 9:39 [PATCH v2] " Arnd Bergmann
2016-09-03 14:08 ` [v2] " Kalle Valo
2016-09-09 9:03 ` Kalle Valo
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).