On Tue, 1 Jul 2014 22:02:31 +0530, Viresh Kumar <viresh.kumar(a)linaro.org> wrote:
> Create a new routine of_clk_shared_by_cpus() that finds if clock lines are
> shared between two CPUs. This is verified by comparing "clocks" property from
> CPU's DT node.
>
> Returns 1 if clock line is shared between them, 0 if clock isn't shared and
> return appropriate errors in case nodes/properties are missing.
>
> Cc: Mike Turquette <mturquette(a)linaro.org>
> Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
> ---
> drivers/clk/clk.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/clk.h | 6 ++++++
> 2 files changed, 62 insertions(+)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 8b73ede..497735c 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -10,6 +10,7 @@
> */
>
> #include <linux/clk-private.h>
> +#include <linux/cpu.h>
> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/spinlock.h>
> @@ -2528,6 +2529,61 @@ const char *of_clk_get_parent_name(struct device_node *np, int index)
> }
> EXPORT_SYMBOL_GPL(of_clk_get_parent_name);
>
> +/**
> + * of_clk_shared_by_cpus - Finds if clock line is shared between CPUs
> + * @cpu1, cpu2: CPU numbers
> + *
> + * Finds if clock lines are shared by two CPUs. This is verified by comparing
> + * "clocks" property from CPU's DT node.
> + *
> + * Returns 1 if clock line is shared between them, 0 if clock isn't shared.
> + * Return appropriate errors in case some requirements aren't met.
> + */
> +int of_clk_shared_by_cpus(int cpu1, int cpu2)
> +{
> + struct device *cpu1_dev, *cpu2_dev;
> + struct device_node *np1, *np2;
> + int ret;
> +
> + cpu1_dev = get_cpu_device(cpu1);
> + if (!cpu1_dev) {
> + pr_err("%s: failed to get cpu_dev for cpu%d\n", __func__, cpu1);
> + return -ENODEV;
> + }
> +
> + cpu2_dev = get_cpu_device(cpu2);
> + if (!cpu2_dev) {
> + pr_err("%s: failed to get cpu_dev for cpu%d\n", __func__, cpu2);
> + return -ENODEV;
> + }
> +
> + np1 = of_node_get(cpu1_dev->of_node);
> + if (!np1) {
> + pr_err("%s: failed to find of_node for cpu%d\n", __func__,
> + cpu1);
> + return -ENODEV;
> + }
> +
> + np2 = of_node_get(cpu2_dev->of_node);
> + if (!np2) {
> + pr_err("%s: failed to find of_node for cpu%d\n", __func__,
> + cpu2);
> + ret = -ENODEV;
> + goto put_np1;
> + }
> +
> + /* Match "clocks" property */
> + ret = of_property_match(np1, np2, "clocks");
This looks naïve. It is entirely possible for different clock specifiers
to resolve to the same clock line, or for there to be multple clocks in
the clocks property. This looks like a buggy way to do it. The only
reliable way to determine if two clocks resolve to the same thing is to
resolve the references with the clock controller.
g.
From: Mark Brown <broonie(a)linaro.org>
Regulator drivers should not be specifying constraints since the valid
configurations depend on how the device is used in a given system, there
is no way to know if a configuration is safe for a given board.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/regulator/lp872x.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index 2e022aabd951..954616f16c81 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -892,14 +892,6 @@ static struct lp872x_platform_data
pdata->regulator_data[i].id =
(enum lp872x_regulator_id)match[i].driver_data;
pdata->regulator_data[i].init_data = match[i].init_data;
-
- /* Operation mode configuration for buck/buck1/buck2 */
- if (strncmp(match[i].name, "buck", 4))
- continue;
-
- d = pdata->regulator_data[i].init_data;
- d->constraints.valid_modes_mask |= LP872X_VALID_OPMODE;
- d->constraints.valid_ops_mask |= REGULATOR_CHANGE_MODE;
}
out:
return pdata;
--
2.0.1
Tree/Branch: next-20140725
Git describe: next-20140725
Commit: 5a7439efd1 Add linux-next specific files for 20140725
Build Time: 9 min 1 sec
Passed: 2 / 3 ( 66.67 %)
Failed: 1 / 3 ( 33.33 %)
Errors: 1
Warnings: 25
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
Errors:
arm64-allmodconfig
collect2: error: ld returned 1 exit status
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
3 warnings 0 mismatches : arm64-allnoconfig
23 warnings 0 mismatches : arm64-allmodconfig
1 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 1
1 collect2: error: ld returned 1 exit status
Warnings Summary: 25
3 ../drivers/char/random.c:1526:6: warning: unused variable ‘r’ [-Wunused-variable]
1 ../sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../sound/soc/fsl/imx-audmux.c:162:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../sound/soc/codecs/adau1977.c:971:3: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../fs/cifs/misc.c:578:1: warning: ‘cifs_oplock_break_wait’ defined but not used [-Wunused-function]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/spi/spi-pl022.c:1420:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../drivers/spi/spi-atmel.c:1250:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/spi/spi-atmel.c:1015:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/irqchip/irq-gic-v3.c:203:12: warning: ‘gic_peek_irq’ defined but not used [-Wunused-function]
1 ../drivers/irqchip/irq-gic-v3.c:132:13: warning: ‘gic_write_sgi1r’ defined but not used [-Wunused-function]
1 ../drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
1 ../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/sh/rcar-dmac.c:1260:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/dma/sh/rcar-dmac.c:1231:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/amba-pl08x.c:1042:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
../drivers/char/random.c:1526:6: warning: unused variable ‘r’ [-Wunused-variable]
../drivers/irqchip/irq-gic-v3.c:132:13: warning: ‘gic_write_sgi1r’ defined but not used [-Wunused-function]
../drivers/irqchip/irq-gic-v3.c:203:12: warning: ‘gic_peek_irq’ defined but not used [-Wunused-function]
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 1 errors, 23 warnings, 0 section mismatches
Errors:
collect2: error: ld returned 1 exit status
Warnings:
../fs/cifs/misc.c:578:1: warning: ‘cifs_oplock_break_wait’ defined but not used [-Wunused-function]
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
../drivers/char/random.c:1526:6: warning: unused variable ‘r’ [-Wunused-variable]
../sound/soc/codecs/adau1977.c:971:3: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘size_t’ [-Wformat=]
../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘size_t’ [-Wformat=]
../drivers/dma/sh/rcar-dmac.c:1231:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/dma/sh/rcar-dmac.c:1260:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/dma/amba-pl08x.c:1042:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat=]
../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../sound/soc/fsl/imx-audmux.c:162:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/spi/spi-atmel.c:1015:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/spi/spi-atmel.c:1250:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/spi/spi-pl022.c:1420:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/char/random.c:1526:6: warning: unused variable ‘r’ [-Wunused-variable]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
Tree/Branch: v3.16-rc7
Git describe: v3.16-rc7
Commit: 64aa90f26c Linux 3.16-rc7
Build Time: 8 min 36 sec
Passed: 2 / 3 ( 66.67 %)
Failed: 1 / 3 ( 33.33 %)
Errors: 3
Warnings: 20
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
Errors:
arm64-allmodconfig
collect2: error: ld returned 1 exit status
../drivers/staging/lustre/lustre/llite/lloop.c:523:78: error: duplicate case value
../drivers/staging/lustre/lustre/llite/lloop.c:523:18: error: previously used here
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
20 warnings 0 mismatches : arm64-allmodconfig
-------------------------------------------------------------------------------
Errors summary: 3
1 collect2: error: ld returned 1 exit status
1 ../drivers/staging/lustre/lustre/llite/lloop.c:523:78: error: duplicate case value
1 ../drivers/staging/lustre/lustre/llite/lloop.c:523:18: error: previously used here
Warnings Summary: 20
1 ../sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../sound/soc/fsl/imx-audmux.c:162:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../sound/soc/codecs/adau1977.c:971:3: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../drivers/staging/bcm/CmHost.c:1563:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1545:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1502:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/spi/spi-pl022.c:1420:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../drivers/spi/spi-atmel.c:1256:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/spi/spi-atmel.c:1021:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/net/xen-netback/netback.c:2006:1: warning: the frame size of 16384 bytes is larger than 2048 bytes [-Wframe-larger-than=]
1 ../drivers/net/wireless/ti/wlcore/spi.c:315:1: warning: the frame size of 12848 bytes is larger than 2048 bytes [-Wframe-larger-than=]
1 ../drivers/mfd/arizona-core.c:505:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
1 ../drivers/iio/adc/exynos_adc.c:112:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/gpio/gpio-sch311x.c:286:18: warning: ignoring return value of ‘gpiochip_remove’, declared with attribute warn_unused_result [-Wunused-result]
1 ../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/amba-pl08x.c:1042:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 3 errors, 20 warnings, 0 section mismatches
Errors:
collect2: error: ld returned 1 exit status
../drivers/staging/lustre/lustre/llite/lloop.c:523:78: error: duplicate case value
../drivers/staging/lustre/lustre/llite/lloop.c:523:18: error: previously used here
Warnings:
../sound/soc/codecs/adau1977.c:971:3: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/dma/amba-pl08x.c:1042:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat=]
../drivers/gpio/gpio-sch311x.c:286:18: warning: ignoring return value of ‘gpiochip_remove’, declared with attribute warn_unused_result [-Wunused-result]
../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../sound/soc/fsl/imx-audmux.c:162:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/iio/adc/exynos_adc.c:112:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
../drivers/mfd/arizona-core.c:505:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/spi/spi-atmel.c:1021:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/spi/spi-atmel.c:1256:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/spi/spi-pl022.c:1420:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/staging/bcm/CmHost.c:1502:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1545:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1563:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/net/wireless/ti/wlcore/spi.c:315:1: warning: the frame size of 12848 bytes is larger than 2048 bytes [-Wframe-larger-than=]
../drivers/net/xen-netback/netback.c:2006:1: warning: the frame size of 16384 bytes is larger than 2048 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm64-defconfig
From: Mark Brown <broonie(a)linaro.org>
The Versatile CLCD helpers call dma_alloc_writecombine() which is only
available on ARM and AVR32, meaning they won't build on other platforms
including arm64. Unfortunately the current Kconfig enables the symbol
by default if ARCH_VEXPRESS is defined which means that it is enabled on
arm64 when building for the ARM reference platforms and models for ARMv8
since they have many hardware similarities with their pre-ARMv8 systems.
Since all the systems that need the helpers are ARM systems fix this by
adding a dependency on ARM.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/video/fbdev/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index e83ed760141b..ce7c76676a70 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -293,6 +293,7 @@ config FB_ARMCLCD
# Helper logic selected only by the ARM Versatile platform family.
config PLAT_VERSATILE_CLCD
def_bool ARCH_VERSATILE || ARCH_REALVIEW || ARCH_VEXPRESS
+ depends on ARM
depends on FB_ARMCLCD && FB=y
config FB_ACORN
--
2.0.1