dw_dmac: don't exceed AHB master number in dwc_get_data_width
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 17 Jan 2013 08:03:01 +0000 (10:03 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 21 Jan 2013 04:49:21 +0000 (20:49 -0800)
commit5be10f349bc0a2f3dd2ab6417ffe29746403984c
tree47da236d7cb05c6a7288313c5c0cfc803119de49
parentf8122a82d2eae8ef42de48829deed0ca9d9e1f17
dw_dmac: don't exceed AHB master number in dwc_get_data_width

The driver assumes that hardware has two AHB masters which might not be always
true. In such cases we must not exceed number of the AHB masters present in the
hardware. In the proposed scheme in this patch, we would choose the master with
highest possible number whenever we exceed max AHB masters.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dw_dmac.c