aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-05-13 11:07:02 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2014-05-13 11:07:02 +0900
commit200d963bf49c3399a5f044d53b5b4a8f133a776c (patch)
treec8ff3f50f3f4494f7a113baa3bf2686ecf999ec7 /arch/arm/common
parentMerge branch 'for-3.15' of git://linux-nfs.org/~bfields/linux (diff)
parentMerge tag 'davinci-fixes-for-v3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes (diff)
downloadlinux-dev-200d963bf49c3399a5f044d53b5b4a8f133a776c.tar.xz
linux-dev-200d963bf49c3399a5f044d53b5b4a8f133a776c.zip
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson: "Seems like we've had more fixes than usual this release cycle, but there's nothing in particular that we're doing differently. Perhaps it's just one of those cycles where more people are finding more regressions (and/or that the latency of when people actually test what's been in the tree for a while is catching up so that we get the bug reports now). The bigger changes here are are for TI and Marvell platforms: * Timing changes for GPMC (generic localbus) on OMAP causing some largeish DTS deltas. * Fixes to window allocation on PCI for mvebu touching drivers/ stuff. Patches have acks from subsystem maintainers where needed. * A fix from Thomas for a botched DT conversion in drivers/edma. There's a handful of other fixes for the above platforms as well as sunxi, at91, i.MX. I also included a MAINTAINER update for Broadcom, and a trivial move of a binding doc. I know you said you'd be offline this week, but I might as well post it for when you return. :)" I'm not quite offline yet. Doing a few pulls in the last hour before my internet goes away.. * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits) MAINTAINERS: update Broadcom ARM tree location and add an SoC family ARM: dts: i.MX53: Fix ipu register space size ARM: dts: kirkwood: fix mislocated pcie-controller nodes ARM: sunxi: Enable GMAC in sunxi_defconfig ARM: common: edma: Fix xbar mapping ARM: sun7i: Fix i2c4 base address ARM: Kirkwood: T5325: Fix double probe of Codec ARM: mvebu: enable the SATA interface on Armada 375 DB ARM: mvebu: specify I2C bus frequency on Armada 370 DB ARM: mvebu: use qsgmii phy-mode for Armada XP GP interfaces ARM: mvebu: fix NOR bus-width in Armada XP OpenBlocks AX3 Device Tree ARM: mvebu: fix NOR bus-width in Armada XP DB Device Tree ARM: mvebu: fix NOR bus-width in Armada XP GP Device Tree ARM: dts: AM3517: Disable absent IPs inherited from OMAP3 ARM: dts: OMAP2: Fix interrupts for OMAP2420 mailbox ARM: dts: OMAP5: Add mailbox dt node to fix boot warning ARM: OMAP5: Switch to THUMB mode if needed on secondary CPU ARM: dts: am437x-gp-evm: Do not reset gpio5 ARM: dts: omap3-igep0020: use SMSC9221 timings PCI: mvebu: split PCIe BARs into multiple MBus windows when needed ...
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/edma.c48
1 files changed, 15 insertions, 33 deletions
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 41bca32409fc..5339009b3c0c 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1423,55 +1423,38 @@ EXPORT_SYMBOL(edma_clear_event);
#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DMADEVICES)
-static int edma_of_read_u32_to_s16_array(const struct device_node *np,
- const char *propname, s16 *out_values,
- size_t sz)
+static int edma_xbar_event_map(struct device *dev, struct device_node *node,
+ struct edma_soc_info *pdata, size_t sz)
{
- int ret;
-
- ret = of_property_read_u16_array(np, propname, out_values, sz);
- if (ret)
- return ret;
-
- /* Terminate it */
- *out_values++ = -1;
- *out_values++ = -1;
-
- return 0;
-}
-
-static int edma_xbar_event_map(struct device *dev,
- struct device_node *node,
- struct edma_soc_info *pdata, int len)
-{
- int ret, i;
+ const char pname[] = "ti,edma-xbar-event-map";
struct resource res;
void __iomem *xbar;
- const s16 (*xbar_chans)[2];
+ s16 (*xbar_chans)[2];
+ size_t nelm = sz / sizeof(s16);
u32 shift, offset, mux;
+ int ret, i;
- xbar_chans = devm_kzalloc(dev,
- len/sizeof(s16) + 2*sizeof(s16),
- GFP_KERNEL);
+ xbar_chans = devm_kzalloc(dev, (nelm + 2) * sizeof(s16), GFP_KERNEL);
if (!xbar_chans)
return -ENOMEM;
ret = of_address_to_resource(node, 1, &res);
if (ret)
- return -EIO;
+ return -ENOMEM;
xbar = devm_ioremap(dev, res.start, resource_size(&res));
if (!xbar)
return -ENOMEM;
- ret = edma_of_read_u32_to_s16_array(node,
- "ti,edma-xbar-event-map",
- (s16 *)xbar_chans,
- len/sizeof(u32));
+ ret = of_property_read_u16_array(node, pname, (u16 *)xbar_chans, nelm);
if (ret)
return -EIO;
- for (i = 0; xbar_chans[i][0] != -1; i++) {
+ /* Invalidate last entry for the other user of this mess */
+ nelm >>= 1;
+ xbar_chans[nelm][0] = xbar_chans[nelm][1] = -1;
+
+ for (i = 0; i < nelm; i++) {
shift = (xbar_chans[i][1] & 0x03) << 3;
offset = xbar_chans[i][1] & 0xfffffffc;
mux = readl(xbar + offset);
@@ -1480,8 +1463,7 @@ static int edma_xbar_event_map(struct device *dev,
writel(mux, (xbar + offset));
}
- pdata->xbar_chans = xbar_chans;
-
+ pdata->xbar_chans = (const s16 (*)[2]) xbar_chans;
return 0;
}