* linux-next: manual merge of the driver-core tree with the slave-dma tree
@ 2012-11-29 3:40 Stephen Rothwell
2012-11-29 3:46 ` Viresh Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2012-11-29 3:40 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, linux-kernel, Bill Pemberton, Viresh Kumar,
Vinod Koul
[-- Attachment #1: Type: text/plain, Size: 3133 bytes --]
Hi Greg,
Today's linux-next merge of the driver-core tree got a conflict in
drivers/dma/dw_dmac.c between commit c4cabfced23f ("dmaengine: dw_dmac:
Enhance device tree support") from the slave-dma tree and commit
463a1f8b3cee ("dma: remove use of __devinit") from the driver-core tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/dma/dw_dmac.c
index 2c8096d,8f0b111..0000000
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@@ -1500,92 -1462,7 +1500,92 @@@ static void dw_dma_off(struct dw_dma *d
dw->chan[i].initialized = false;
}
+#ifdef CONFIG_OF
+static struct dw_dma_platform_data *
+__devinit dw_dma_parse_dt(struct platform_device *pdev)
+{
+ struct device_node *sn, *cn, *np = pdev->dev.of_node;
+ struct dw_dma_platform_data *pdata;
+ struct dw_dma_slave *sd;
+ u32 tmp, arr[4];
+
+ if (!np) {
+ dev_err(&pdev->dev, "Missing DT data\n");
+ return NULL;
+ }
+
+ pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
+ if (!pdata)
+ return NULL;
+
+ if (of_property_read_u32(np, "nr_channels", &pdata->nr_channels))
+ return NULL;
+
+ if (of_property_read_bool(np, "is_private"))
+ pdata->is_private = true;
+
+ if (!of_property_read_u32(np, "chan_allocation_order", &tmp))
+ pdata->chan_allocation_order = (unsigned char)tmp;
+
+ if (!of_property_read_u32(np, "chan_priority", &tmp))
+ pdata->chan_priority = tmp;
+
+ if (!of_property_read_u32(np, "block_size", &tmp))
+ pdata->block_size = tmp;
+
+ if (!of_property_read_u32(np, "nr_masters", &tmp)) {
+ if (tmp > 4)
+ return NULL;
+
+ pdata->nr_masters = tmp;
+ }
+
+ if (!of_property_read_u32_array(np, "data_width", arr,
+ pdata->nr_masters))
+ for (tmp = 0; tmp < pdata->nr_masters; tmp++)
+ pdata->data_width[tmp] = arr[tmp];
+
+ /* parse slave data */
+ sn = of_find_node_by_name(np, "slave_info");
+ if (!sn)
+ return pdata;
+
+ /* calculate number of slaves */
+ tmp = of_get_child_count(sn);
+ if (!tmp)
+ return NULL;
+
+ sd = devm_kzalloc(&pdev->dev, sizeof(*sd) * tmp, GFP_KERNEL);
+ if (!sd)
+ return NULL;
+
+ pdata->sd = sd;
+ pdata->sd_count = tmp;
+
+ for_each_child_of_node(sn, cn) {
+ sd->dma_dev = &pdev->dev;
+ of_property_read_string(cn, "bus_id", &sd->bus_id);
+ of_property_read_u32(cn, "cfg_hi", &sd->cfg_hi);
+ of_property_read_u32(cn, "cfg_lo", &sd->cfg_lo);
+ if (!of_property_read_u32(cn, "src_master", &tmp))
+ sd->src_master = tmp;
+
+ if (!of_property_read_u32(cn, "dst_master", &tmp))
+ sd->dst_master = tmp;
+ sd++;
+ }
+
+ return pdata;
+}
+#else
+static inline struct dw_dma_platform_data *
+dw_dma_parse_dt(struct platform_device *pdev)
+{
+ return NULL;
+}
+#endif
+
- static int __devinit dw_probe(struct platform_device *pdev)
+ static int dw_probe(struct platform_device *pdev)
{
struct dw_dma_platform_data *pdata;
struct resource *io;
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: linux-next: manual merge of the driver-core tree with the slave-dma tree
2012-11-29 3:40 linux-next: manual merge of the driver-core tree with the slave-dma tree Stephen Rothwell
@ 2012-11-29 3:46 ` Viresh Kumar
2012-11-29 5:18 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2012-11-29 3:46 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Greg KH, linux-next, linux-kernel, Bill Pemberton, Vinod Koul
On 29 November 2012 09:10, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> diff --cc drivers/dma/dw_dmac.c
> +#ifdef CONFIG_OF
> +static struct dw_dma_platform_data *
> +__devinit dw_dma_parse_dt(struct platform_device *pdev)
Do we need a separate patch to fix this place? I believe yes.
> - static int __devinit dw_probe(struct platform_device *pdev)
> + static int dw_probe(struct platform_device *pdev)
Thanks for this.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: manual merge of the driver-core tree with the slave-dma tree
2012-11-29 3:46 ` Viresh Kumar
@ 2012-11-29 5:18 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2012-11-29 5:18 UTC (permalink / raw)
To: Viresh Kumar
Cc: Stephen Rothwell, linux-next, linux-kernel, Bill Pemberton,
Vinod Koul
On Thu, Nov 29, 2012 at 09:16:06AM +0530, Viresh Kumar wrote:
> On 29 November 2012 09:10, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > diff --cc drivers/dma/dw_dmac.c
>
> > +#ifdef CONFIG_OF
> > +static struct dw_dma_platform_data *
> > +__devinit dw_dma_parse_dt(struct platform_device *pdev)
>
> Do we need a separate patch to fix this place? I believe yes.
Don't worry about that for now, I'll sweep the tree after 3.8-rc1 is out
to catch stuff like this. Otherwise the merge issues are going to be
even worse.
Or, you can fix this in the slave-dma tree if you want.
> > - static int __devinit dw_probe(struct platform_device *pdev)
> > + static int dw_probe(struct platform_device *pdev)
>
> Thanks for this.
Me too, thanks Stephen, and sorry for the problems this caused.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-29 5:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29 3:40 linux-next: manual merge of the driver-core tree with the slave-dma tree Stephen Rothwell
2012-11-29 3:46 ` Viresh Kumar
2012-11-29 5:18 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox