Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
"Two fixes for slave-dmaengine.

The first one is for making slave_id value correct for dw_dmac and
the other one fixes the endieness in DT parsing"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dw_dmac: adjust slave_id accordingly to request line base
dmaengine: dw_dma: fix endianess for DT xlate function

Changed files
+20 -4
drivers
+19 -4
drivers/dma/dw_dmac.c
··· 1001 1001 *maxburst = 0; 1002 1002 } 1003 1003 1004 + static inline void convert_slave_id(struct dw_dma_chan *dwc) 1005 + { 1006 + struct dw_dma *dw = to_dw_dma(dwc->chan.device); 1007 + 1008 + dwc->dma_sconfig.slave_id -= dw->request_line_base; 1009 + } 1010 + 1004 1011 static int 1005 1012 set_runtime_config(struct dma_chan *chan, struct dma_slave_config *sconfig) 1006 1013 { ··· 1022 1015 1023 1016 convert_burst(&dwc->dma_sconfig.src_maxburst); 1024 1017 convert_burst(&dwc->dma_sconfig.dst_maxburst); 1018 + convert_slave_id(dwc); 1025 1019 1026 1020 return 0; 1027 1021 } ··· 1284 1276 if (dma_spec->args_count != 3) 1285 1277 return NULL; 1286 1278 1287 - fargs.req = be32_to_cpup(dma_spec->args+0); 1288 - fargs.src = be32_to_cpup(dma_spec->args+1); 1289 - fargs.dst = be32_to_cpup(dma_spec->args+2); 1279 + fargs.req = dma_spec->args[0]; 1280 + fargs.src = dma_spec->args[1]; 1281 + fargs.dst = dma_spec->args[2]; 1290 1282 1291 1283 if (WARN_ON(fargs.req >= DW_DMA_MAX_NR_REQUESTS || 1292 1284 fargs.src >= dw->nr_masters || ··· 1636 1628 1637 1629 static int dw_probe(struct platform_device *pdev) 1638 1630 { 1631 + const struct platform_device_id *match; 1639 1632 struct dw_dma_platform_data *pdata; 1640 1633 struct resource *io; 1641 1634 struct dw_dma *dw; ··· 1719 1710 dw->nr_masters = pdata->nr_masters; 1720 1711 memcpy(dw->data_width, pdata->data_width, 4); 1721 1712 } 1713 + 1714 + /* Get the base request line if set */ 1715 + match = platform_get_device_id(pdev); 1716 + if (match) 1717 + dw->request_line_base = (unsigned int)match->driver_data; 1722 1718 1723 1719 /* Calculate all channel mask before DMA setup */ 1724 1720 dw->all_chan_mask = (1 << nr_channels) - 1; ··· 1920 1906 #endif 1921 1907 1922 1908 static const struct platform_device_id dw_dma_ids[] = { 1923 - { "INTL9C60", 0 }, 1909 + /* Name, Request Line Base */ 1910 + { "INTL9C60", (kernel_ulong_t)16 }, 1924 1911 { } 1925 1912 }; 1926 1913
+1
drivers/dma/dw_dmac_regs.h
··· 247 247 /* hardware configuration */ 248 248 unsigned char nr_masters; 249 249 unsigned char data_width[4]; 250 + unsigned int request_line_base; 250 251 251 252 struct dw_dma_chan chan[0]; 252 253 };