aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-08-29 17:09:04 -0400
committerOlof Johansson <olof@lixom.net>2013-08-29 17:09:04 -0400
commit3616257f30316cccb0d92eed83d858f5b49e57ac (patch)
tree52031e5e8b76d998a8a0c7e2357c0922a73e4e44 /drivers
parent6f244c9ccf22bc38d2ce39b1c7ee304dab7e5328 (diff)
parente7dc0796083c7a9e8e3620600a80f6bc7a2fce1a (diff)
Merge tag 'highbank-for-3.12' of git://sources.calxeda.com/kernel/linux into late/all
From Rob Herring: Updates for Highbank for 3.12: - A couple of fixes to enable LPAE. - pl08x driver fixes to make it build with ARCH_DMA_ADDR_T_64BIT. - Avoid L2 related smc calls on Midway. - Add selecting of necesssary ARM errata. * tag 'highbank-for-3.12' of git://sources.calxeda.com/kernel/linux: ARM: highbank: clean-up some unused includes ARM: highbank: avoid L2 cache smc calls when PL310 is not present ARM: move outer_cache declaration out of ifdef ARM: highbank: select ARCH_DMA_ADDR_T_64BIT for LPAE DMA: fix printk warning in AMBA PL08x DMA driver DMA: fix AMBA PL08x compilation issue with 64bit DMA address type ARM: highbank: select required errata work-arounds ARM: highbank: select ARCH_HAS_HOLES_MEMORYMODEL ARM: highbank: enable DMA zone for LPAE ARM: use phys_addr_t for DMA zone sizes Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/amba-pl08x.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 06fe45c74de5..bff41d4848e5 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -133,6 +133,8 @@ struct pl08x_bus_data {
133 u8 buswidth; 133 u8 buswidth;
134}; 134};
135 135
136#define IS_BUS_ALIGNED(bus) IS_ALIGNED((bus)->addr, (bus)->buswidth)
137
136/** 138/**
137 * struct pl08x_phy_chan - holder for the physical channels 139 * struct pl08x_phy_chan - holder for the physical channels
138 * @id: physical index to this channel 140 * @id: physical index to this channel
@@ -845,10 +847,13 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
845 847
846 pl08x_choose_master_bus(&bd, &mbus, &sbus, cctl); 848 pl08x_choose_master_bus(&bd, &mbus, &sbus, cctl);
847 849
848 dev_vdbg(&pl08x->adev->dev, "src=0x%08x%s/%u dst=0x%08x%s/%u len=%zu\n", 850 dev_vdbg(&pl08x->adev->dev,
849 bd.srcbus.addr, cctl & PL080_CONTROL_SRC_INCR ? "+" : "", 851 "src=0x%08llx%s/%u dst=0x%08llx%s/%u len=%zu\n",
852 (u64)bd.srcbus.addr,
853 cctl & PL080_CONTROL_SRC_INCR ? "+" : "",
850 bd.srcbus.buswidth, 854 bd.srcbus.buswidth,
851 bd.dstbus.addr, cctl & PL080_CONTROL_DST_INCR ? "+" : "", 855 (u64)bd.dstbus.addr,
856 cctl & PL080_CONTROL_DST_INCR ? "+" : "",
852 bd.dstbus.buswidth, 857 bd.dstbus.buswidth,
853 bd.remainder); 858 bd.remainder);
854 dev_vdbg(&pl08x->adev->dev, "mbus=%s sbus=%s\n", 859 dev_vdbg(&pl08x->adev->dev, "mbus=%s sbus=%s\n",
@@ -886,8 +891,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
886 return 0; 891 return 0;
887 } 892 }
888 893
889 if ((bd.srcbus.addr % bd.srcbus.buswidth) || 894 if (!IS_BUS_ALIGNED(&bd.srcbus) ||
890 (bd.dstbus.addr % bd.dstbus.buswidth)) { 895 !IS_BUS_ALIGNED(&bd.dstbus)) {
891 dev_err(&pl08x->adev->dev, 896 dev_err(&pl08x->adev->dev,
892 "%s src & dst address must be aligned to src" 897 "%s src & dst address must be aligned to src"
893 " & dst width if peripheral is flow controller", 898 " & dst width if peripheral is flow controller",
@@ -908,9 +913,9 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
908 */ 913 */
909 if (bd.remainder < mbus->buswidth) 914 if (bd.remainder < mbus->buswidth)
910 early_bytes = bd.remainder; 915 early_bytes = bd.remainder;
911 else if ((mbus->addr) % (mbus->buswidth)) { 916 else if (!IS_BUS_ALIGNED(mbus)) {
912 early_bytes = mbus->buswidth - (mbus->addr) % 917 early_bytes = mbus->buswidth -
913 (mbus->buswidth); 918 (mbus->addr & (mbus->buswidth - 1));
914 if ((bd.remainder - early_bytes) < mbus->buswidth) 919 if ((bd.remainder - early_bytes) < mbus->buswidth)
915 early_bytes = bd.remainder; 920 early_bytes = bd.remainder;
916 } 921 }
@@ -928,7 +933,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
928 * Master now aligned 933 * Master now aligned
929 * - if slave is not then we must set its width down 934 * - if slave is not then we must set its width down
930 */ 935 */
931 if (sbus->addr % sbus->buswidth) { 936 if (!IS_BUS_ALIGNED(sbus)) {
932 dev_dbg(&pl08x->adev->dev, 937 dev_dbg(&pl08x->adev->dev,
933 "%s set down bus width to one byte\n", 938 "%s set down bus width to one byte\n",
934 __func__); 939 __func__);