Minor ARM config updates, Add patch for DT DMA issues that affect at least highbank/tegra ARM devices

This commit is contained in:
Peter Robinson 2013-04-17 10:26:16 +01:00
parent 046ffa1bba
commit 798e19c384
4 changed files with 63 additions and 5 deletions

43
arm-of-dma.patch Normal file
View File

@ -0,0 +1,43 @@
From 7362f04c2888b14c20f8aaa02e1a897025261768 Mon Sep 17 00:00:00 2001
From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Fri, 15 Mar 2013 08:48:20 +0000
Subject: DMA: OF: Check properties value before running be32_to_cpup() on it
In of_dma_controller_register() routine we are calling of_get_property() as an
parameter to be32_to_cpup(). In case the property doesn't exist we will get a
crash.
This patch changes this code to check if we got a valid property first and then
runs be32_to_cpup() on it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index 6036cd0..00db454 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -93,6 +93,7 @@ int of_dma_controller_register(struct device_node *np,
{
struct of_dma *ofdma;
int nbcells;
+ const __be32 *prop;
if (!np || !of_dma_xlate) {
pr_err("%s: not enough information provided\n", __func__);
@@ -103,8 +104,11 @@ int of_dma_controller_register(struct device_node *np,
if (!ofdma)
return -ENOMEM;
- nbcells = be32_to_cpup(of_get_property(np, "#dma-cells", NULL));
- if (!nbcells) {
+ prop = of_get_property(np, "#dma-cells", NULL);
+ if (prop)
+ nbcells = be32_to_cpup(prop);
+
+ if (!prop || !nbcells) {
pr_err("%s: #dma-cells property is missing or invalid\n",
__func__);
kfree(ofdma);
--
cgit v0.9.1

View File

@ -72,6 +72,7 @@ CONFIG_MVEBU_CLK_CORE=y
CONFIG_MVEBU_CLK_GATING=y
CONFIG_MMC_MVSDIO=m
CONFIG_SPI_ORION=m
CONFIG_USB_MV_UDC=m
# omap
CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
@ -125,6 +126,7 @@ CONFIG_OMAP_MBOX_KFIFO_SIZE=256
CONFIG_OMAP_DM_TIMER=y
CONFIG_OMAP_PM_NOOP=y
CONFIG_OMAP_IOMMU=y
CONFIG_OMAP_IOVMM=m
CONFIG_OMAP3_EMU=y
# CONFIG_OMAP3_SDRC_AC_TIMING is not set
CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
@ -136,6 +138,7 @@ CONFIG_TI_DAVINCI_MDIO=m
CONFIG_TI_DAVINCI_CPDMA=m
CONFIG_TI_CPSW=m
CONFIG_TI_CPTS=y
CONFIG_TI_EMIF=m
CONFIG_SERIAL_OMAP=y
CONFIG_SERIAL_OMAP_CONSOLE=y
@ -155,12 +158,17 @@ CONFIG_TWL6030_USB=m
CONFIG_TWL6030_PWM=m
CONFIG_TWL6040_CORE=y
CONFIG_CLK_TWL6040=m
CONFIG_OMAP_INTERCONNECT=m
# CONFIG_MFD_TPS80031 is not set
CONFIG_MFD_TI_AM335X_TSCADC=m
CONFIG_MFD_OMAP_USB_HOST=y
CONFIG_MTD_ONENAND_OMAP2=m
CONFIG_HDQ_MASTER_OMAP=m
CONFIG_REGULATOR_TWL4030=y
CONFIG_BACKLIGHT_PANDORA=m
CONFIG_OMAP_OCP2SCP=m
CONFIG_USB_EHCI_HCD_OMAP=y
CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_OHCI_HCD_OMAP3=y
CONFIG_USB_MUSB_AM35X=m
CONFIG_USB_MUSB_OMAP2PLUS=m
@ -473,7 +481,6 @@ CONFIG_REGULATOR_LP8755=m
# CONFIG_MFD_DA9055 is not set
# CONFIG_MFD_SMSC is not set
# CONFIG_MFD_TPS65910 is not set
# CONFIG_MFD_TPS80031 is not set
# CONFIG_MFD_AS3711 is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_PMIC_ADP5520 is not set

View File

@ -112,8 +112,6 @@ CONFIG_HW_PERF_EVENTS=y
CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_CC_STACKPROTECTOR=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
@ -219,6 +217,8 @@ CONFIG_GPIO_MAX7301=m
CONFIG_GPIO_MC33880=m
CONFIG_GPIO_74X164=m
CONFIG_GPIO_TPS65912=m
CONFIG_W1_MASTER_GPIO=m
CONFIG_CHARGER_GPIO=m
CONFIG_SPI=y
CONFIG_SPI_GPIO=m
@ -340,6 +340,7 @@ CONFIG_SENSORS_LM70=m
CONFIG_SENSORS_MAX1111=m
CONFIG_SENSORS_ADS7871=m
CONFIG_SENSORS_LIS3_SPI=m
CONFIG_SENSORS_GPIO_FAN=m
CONFIG_LCD_L4F00242T03=m
CONFIG_LCD_LMS283GF05=m

View File

@ -701,12 +701,14 @@ Patch14010: lis3-improve-handling-of-null-rate.patch
# ARM
Patch21000: arm-export-read_current_timer.patch
# https://lists.ozlabs.org/pipermail/devicetree-discuss/2013-March/029029.html
Patch21001: arm-of-dma.patch
# lpae
Patch21001: arm-lpae-ax88796.patch
Patch21002: arm-lpae-ax88796.patch
# ARM omap
Patch21002: arm-omap-ehci-fix.patch
Patch21003: arm-omap-ehci-fix.patch
# ARM tegra
Patch21005: arm-tegra-usb-no-reset-linux33.patch
@ -1307,6 +1309,7 @@ ApplyPatch debug-bad-pte-modules.patch
# ARM
#
ApplyPatch arm-export-read_current_timer.patch
ApplyPatch arm-of-dma.patch
ApplyPatch arm-lpae-ax88796.patch
ApplyPatch arm-omap-ehci-fix.patch
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
@ -2285,6 +2288,10 @@ fi
# ||----w |
# || ||
%changelog
* Wed Apr 17 2013 Peter Robinson <pbrobinson@fedoraproject.org>
- Minor ARM config updates
- Add patch for DT DMA issues that affect at least highbank/tegra ARM devices
* Tue Apr 16 2013 Justin M. Forbes <jforbes@redhat.com> - 3.9.0-0.rc7.git1.1
- Linux v3.9-rc7-4-gbb33db7
- Reenable debugging options.