From 798e19c384926a1bea7623e699b25f547924f86b Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 17 Apr 2013 10:26:16 +0100 Subject: [PATCH] Minor ARM config updates, Add patch for DT DMA issues that affect at least highbank/tegra ARM devices --- arm-of-dma.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ config-armv7 | 9 ++++++++- config-armv7-generic | 5 +++-- kernel.spec | 11 +++++++++-- 4 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 arm-of-dma.patch diff --git a/arm-of-dma.patch b/arm-of-dma.patch new file mode 100644 index 000000000..c3223a4e6 --- /dev/null +++ b/arm-of-dma.patch @@ -0,0 +1,43 @@ +From 7362f04c2888b14c20f8aaa02e1a897025261768 Mon Sep 17 00:00:00 2001 +From: Viresh Kumar +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 +Signed-off-by: Vinod Koul +--- +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 diff --git a/config-armv7 b/config-armv7 index dc80b797c..37d8485e6 100644 --- a/config-armv7 +++ b/config-armv7 @@ -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 diff --git a/config-armv7-generic b/config-armv7-generic index 883e8ffaf..5f3159bed 100644 --- a/config-armv7-generic +++ b/config-armv7-generic @@ -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 diff --git a/kernel.spec b/kernel.spec index ec2bf7898..cb0e4102e 100644 --- a/kernel.spec +++ b/kernel.spec @@ -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 +- 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 - 3.9.0-0.rc7.git1.1 - Linux v3.9-rc7-4-gbb33db7 - Reenable debugging options.