Skip to contentSkip to conversation

linux-next ARM defconfig fixes

PATCH Applied Arnd Bergmann 8 participants 24 messages Feb 14, 2013 – Mar 11, 2013

Subsystems (11)
lore
Share & tools
lore
#0 lore raw

cover linux-next ARM defconfig fixes

I have tried building all ARM default configurations in linux-next today, and found a number of obvious problems that came in from somewhere other than the arm-soc tree (I have a separate series for those).

Here are the fixes I came up with. Please apply or merge into the original patch that broke them, or find a different fix that solves the problem.

Arnd Bergmann (9):
ARM: sa1100/assabet: include platform_device.h directly fb/exynos: include platform_device.h
clk: sunxi: remove stale Makefile entry
mfd: max8925: fix trivial build warning for non-dt
ARM: shmobile: mark mackerel sh_mmcif_device __maybe_unused drm/pci: move drm_pcie_get_speed_cap_mask inside #ifdef CONFIG_PCI ARM defconfigs: add missing inclusions of linux/platform_device.h [media] s5p-fimc: fix s5pv210 build
thermal: rcar: remove __devinitconst

Cc Dave Airlie <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Mike Turquette <[email protected]>
Cc Russell King <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Sylwester Nawrocki <[email protected]>
Cc Zhang Rui <[email protected]>
 arch/arm/mach-s5pv210/mach-goni.c               |  2 +-
 arch/arm/mach-sa1100/assabet.c                  |  1 +
 arch/arm/mach-shmobile/board-mackerel.c         |  2 +-
 arch/arm/plat-samsung/include/plat/adc.h        |  1 +
 drivers/clk/Makefile                            |  1 -
 drivers/gpu/drm/drm_pci.c                       | 75 ++++++++++++-------------
 drivers/thermal/rcar_thermal.c                  |  2 +-
 drivers/video/backlight/max8925_bl.c            |  6 +-
 drivers/video/clps711xfb.c                      |  1 +
 drivers/video/exynos/exynos_mipi_dsi_common.c   |  1 +
 drivers/video/exynos/exynos_mipi_dsi_lowlevel.c |  1 +
 drivers/video/mmp/fb/mmpfb.c                    |  1 +
 include/linux/platform_data/s3c-hsotg.h         |  2 +
 13 files changed, 49 insertions(+), 47 deletions(-)
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/9 ARM: sa1100/assabet: include platform_device.h directly

Patch "16559ae kgdb: remove #include <linux/serial_8250.h> from kgdb.h caused assabet_defconfig to fail, since assabet.c did not itself include linux/platform_device.h, although it needs it:

In file included from include/linux/mfd/ucb1x00.h:13:0,

                 from arch/arm/mach-sa1100/assabet.c:19:

include/linux/mfd/mcp.h:22:16: error: field 'attached_device' has incomplete type
include/linux/mfd/mcp.h:48:23: error: field 'drv' has incomplete type
In file included from arch/arm/mach-sa1100/assabet.c:19:0:
include/linux/mfd/ucb1x00.h:137:16: error: field 'dev' has incomplete type
arch/arm/mach-sa1100/assabet.c: In function 'assabet_init':
arch/arm/mach-sa1100/assabet.c:343:3: error: implicit declaration of function 'platform_device_register_simple' [-Wimplicit-function-declaration]

Cc Russell King <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 arch/arm/mach-sa1100/assabet.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-sa1100/assabet.c +1 -0
index b38d252..e838ba2 100644
@@ -16,6 +16,7 @@
 #include <linux/ioport.h>
 #include <linux/platform_data/sa11x0-serial.h>
 #include <linux/serial_core.h>
+#include <linux/platform_device.h>
 #include <linux/mfd/ucb1x00.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH 2/9 fb/exynos: include platform_device.h

In reply to Arnd Bergmann

Patch 16559ae "kgdb: remove #include <linux/serial_8250.h> from kgdb.h" removed an implicit inclusion of linux/platform_device.h from the exynos framebuffer driver. This adds back the required explicit header file inclusions.

Cc Greg Kroah-Hartman <[email protected]>
Cc Ajay Kumar <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>
---
 drivers/video/exynos/exynos_mipi_dsi_common.c   | 1 +
 drivers/video/exynos/exynos_mipi_dsi_lowlevel.c | 1 +
 2 files changed, 2 insertions(+)
drivers/video/exynos/exynos_mipi_dsi_common.c +1 -0
index 3cd29a4..c70cb89 100644
@@ -25,6 +25,7 @@
 #include <linux/io.h>
 #include <linux/memory.h>
 #include <linux/delay.h>
+#include <linux/irqreturn.h>
 #include <linux/kthread.h>
 
 #include <video/mipi_display.h>
drivers/video/exynos/exynos_mipi_dsi_lowlevel.c +1 -0
index 0ef38ce..95cb99a 100644
@@ -21,6 +21,7 @@
 #include <linux/fs.h>
 #include <linux/mm.h>
 #include <linux/ctype.h>
+#include <linux/platform_device.h>
 #include <linux/io.h>
 
 #include <video/exynos_mipi_dsim.h>
Signature · 1 line
1.8.1.2
#3 lore raw

PATCH 3/9 clk: sunxi: remove stale Makefile entry

In reply to Arnd Bergmann

Patch 85a18198 "clk: sunxi: Use common of_clk_init() function" removed the clk-sunxi.c file but left the Makefile entry, which causes a build error in multi_v7_defconfig:

make[4]: *** No rule to make target drivers/clk/clk-sunxi.o', needed by drivers/clk/built-in.o'.

The obvious fix is to remove the extraneous line from the Makefile.

Cc Prashant Gaikwad <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Mike Turquette <[email protected]>
---
 drivers/clk/Makefile | 1 -
 1 file changed, 1 deletion(-)
drivers/clk/Makefile +0 -1
index ce77077..be9392e 100644
@@ -25,7 +25,6 @@ endif
 obj-$(CONFIG_MACH_LOONGSON1)	+= clk-ls1x.o
 obj-$(CONFIG_ARCH_U8500)	+= ux500/
 obj-$(CONFIG_ARCH_VT8500)	+= clk-vt8500.o
-obj-$(CONFIG_ARCH_SUNXI)	+= clk-sunxi.o
 obj-$(CONFIG_ARCH_ZYNQ)		+= clk-zynq.o
 obj-$(CONFIG_X86)		+= x86/
 obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
Signature · 1 line
1.8.1.2
#4 lore raw

Re: [PATCH 3/9] clk: sunxi: remove stale Makefile entry

Quoting Arnd Bergmann (2013-02-14 14:26:52)

Quoted 9 lines

Patch 85a18198 "clk: sunxi: Use common of_clk_init() function" removed the clk-sunxi.c file but left the Makefile entry, which causes a build error in multi_v7_defconfig:

make[4]: *** No rule to make target drivers/clk/clk-sunxi.o', needed by drivers/clk/built-in.o'.

The obvious fix is to remove the extraneous line from the Makefile.

The fix is correct. I can't rebase my branch since there is an existing dependency with the tegra tree, so I have taken this patch as-is with the addition of my SoB.

Thanks,
Mike

Quoted 22 lines
Cc Prashant Gaikwad <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Mike Turquette <[email protected]>
---
 drivers/clk/Makefile | 1 -
 1 file changed, 1 deletion(-)
drivers/clk/Makefile +0 -1
index ce77077..be9392e 100644
@@ -25,7 +25,6 @@ endif
 obj-$(CONFIG_MACH_LOONGSON1)   += clk-ls1x.o
 obj-$(CONFIG_ARCH_U8500)       += ux500/
 obj-$(CONFIG_ARCH_VT8500)      += clk-vt8500.o
-obj-$(CONFIG_ARCH_SUNXI)       += clk-sunxi.o
 obj-$(CONFIG_ARCH_ZYNQ)                += clk-zynq.o
 obj-$(CONFIG_X86)              += x86/
 obj-$(CONFIG_ARCH_TEGRA)       += tegra/
Signature · 1 line
1.8.1.2
#5 lore raw

Re: [PATCH 3/9] clk: sunxi: remove stale Makefile entry

Quoted 7 lines · Mike Turquette

Quoting Arnd Bergmann (2013-02-14 14:26:52)

Quoted 6 lines

Patch 85a18198 "clk: sunxi: Use common of_clk_init() function" removed the clk-sunxi.c file but left the Makefile entry, which causes a build error in multi_v7_defconfig:

make[4]: *** No rule to make target drivers/clk/clk-sunxi.o', needed by drivers/clk/built-in.o'.

Quoted 8 lines
Quoted 3 lines

The obvious fix is to remove the extraneous line from the Makefile.

The fix is correct. I can't rebase my branch since there is an existing dependency with the tegra tree, so I have taken this patch as-is with the addition of my SoB.

Ok, thanks!

Arnd

#6 lore raw

PATCH 4/9 mfd: max8925: fix trivial build warning for non-dt

In reply to Arnd Bergmann

Patch fe527ea5a "mfd: max8925: Support dt for backlight" added a new function for DT probing but introduced a build warning for the case where CONFIG_OF is disabled:

drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_probe':
drivers/video/backlight/max8925_bl.c:177:3: warning: statement with no effect [-Wunused-value]

A much nicer fix is to use the IS_ENABLED keyword to have the same effect of dropping the device tree specific function when it's not needed.

Cc Qing Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Samuel Ortiz <[email protected]>
---
 drivers/video/backlight/max8925_bl.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/video/backlight/max8925_bl.c +1 -5
index 5ca11b0..9958fb1 100644
@@ -101,14 +101,13 @@ static const struct backlight_ops max8925_backlight_ops = {
 	.get_brightness	= max8925_backlight_get_brightness,
 };
 
-#ifdef CONFIG_OF
 static int max8925_backlight_dt_init(struct platform_device *pdev,
 			      struct max8925_backlight_pdata *pdata)
 {
 	struct device_node *nproot = pdev->dev.parent->of_node, *np;
 	int dual_string;
 
-	if (!nproot)
+	if (!nproot || !IS_ENABLED(CONFIG_OF))
 		return -ENODEV;
 	np = of_find_node_by_name(nproot, "backlight");
 	if (!np) {
@@ -120,9 +119,6 @@ static int max8925_backlight_dt_init(struct platform_device *pdev,
 	pdata->dual_string = dual_string;
 	return 0;
 }
-#else
-#define max8925_backlight_dt_init(x, y)	(-1)
-#endif
 
 static int max8925_backlight_probe(struct platform_device *pdev)
 {
Signature · 1 line
1.8.1.2
Acked-by on v1 4/9
#7 lore raw

Re: [PATCH 4/9] mfd: max8925: fix trivial build warning for non-dt

Quoted 50 lines · Arnd Bergmann

Patch fe527ea5a "mfd: max8925: Support dt for backlight" added a new function for DT probing but introduced a build warning for the case where CONFIG_OF is disabled:

drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_probe':
drivers/video/backlight/max8925_bl.c:177:3: warning: statement with no effect [-Wunused-value]

A much nicer fix is to use the IS_ENABLED keyword to have the same effect of dropping the device tree specific function when it's not needed.

Cc Qing Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Samuel Ortiz <[email protected]>
---
 drivers/video/backlight/max8925_bl.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/video/backlight/max8925_bl.c +1 -6
index 5ca11b0..9958fb1 100644
@@ -101,14 +101,13 @@ static const struct backlight_ops max8925_backlight_ops = {
        .get_brightness = max8925_backlight_get_brightness,
 };
 
-#ifdef CONFIG_OF
 static int max8925_backlight_dt_init(struct platform_device *pdev,
                              struct max8925_backlight_pdata *pdata)
 {
        struct device_node *nproot = pdev->dev.parent->of_node, *np;
        int dual_string;
 
-       if (!nproot)
+       if (!nproot || !IS_ENABLED(CONFIG_OF))
                return -ENODEV;
        np = of_find_node_by_name(nproot, "backlight");
        if (!np) {
@@ -120,9 +119,6 @@ static int max8925_backlight_dt_init(struct platform_device *pdev,
        pdata->dual_string = dual_string;
        return 0;
 }
-#else
-#define max8925_backlight_dt_init(x, y)        (-1)
-#endif
 
 static int max8925_backlight_probe(struct platform_device *pdev)
 {
--
Quoted 2 lines

1.8.1.2

#8 lore raw

Re: [PATCH 4/9] mfd: max8925: fix trivial build warning for non-dt

In reply to Arnd Bergmann
Quoted 40 lines · Arnd Bergmann

Patch fe527ea5a "mfd: max8925: Support dt for backlight" added a new function for DT probing but introduced a build warning for the case where CONFIG_OF is disabled:

drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_probe':
drivers/video/backlight/max8925_bl.c:177:3: warning: statement with no effect [-Wunused-value]

A much nicer fix is to use the IS_ENABLED keyword to have the same effect of dropping the device tree specific function when it's not needed.

Cc Qing Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Samuel Ortiz <[email protected]>
---
  drivers/video/backlight/max8925_bl.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
drivers/video/backlight/max8925_bl.c +1 -2
index 5ca11b0..9958fb1 100644
@@ -101,14 +101,13 @@ static const struct backlight_ops max8925_backlight_ops = {
  	.get_brightness	= max8925_backlight_get_brightness,
  };
 
-#ifdef CONFIG_OF
  static int max8925_backlight_dt_init(struct platform_device *pdev,
  			      struct max8925_backlight_pdata *pdata)
  {
  	struct device_node *nproot = pdev->dev.parent->of_node, *np;
  	int dual_string;
 
-	if (!nproot)
+	if (!nproot || !IS_ENABLED(CONFIG_OF))
  		return -ENODEV;
  	np = of_find_node_by_name(nproot, "backlight");
  	if (!np) {

drivers/video/backlight/max8925_bl.c static int max8925_backlight_dt_init(struct platform_device *pdev, · line 124

Quoted 9 lines
drivers/video/backlight/max8925_bl.c +0 -3
@@ -120,9 +119,6 @@ static int max8925_backlight_dt_init(struct platform_device *pdev,
  	pdata->dual_string = dual_string;
  	return 0;
  }
-#else
-#define max8925_backlight_dt_init(x, y)	(-1)
-#endif
 
  static int max8925_backlight_probe(struct platform_device *pdev)
  {

thanks, I am ok with the change.

#9 lore raw

Re: [PATCH 4/9] mfd: max8925: fix trivial build warning for non-dt

In reply to Arnd Bergmann
Quoted 7 lines · Arnd Bergmann

Patch fe527ea5a "mfd: max8925: Support dt for backlight" added a new function for DT probing but introduced a build warning for the case where CONFIG_OF is disabled:

drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_probe':
drivers/video/backlight/max8925_bl.c:177:3: warning: statement with no effect [-Wunused-value]

Quoted 8 lines

A much nicer fix is to use the IS_ENABLED keyword to have the same effect of dropping the device tree specific function when it's not needed.

Cc Qing Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Samuel Ortiz <[email protected]>

Hmm, it seems I already had this patch for the issue, but for some reason it didn't apply for some time and when I looked at the problem again now, I found more issues, and I'd suggest reverting commit fe527ea5a completely. There are similar problems in the max8925_power patch.

Arnd

#10 lore raw

PATCH 5/9 ARM: shmobile: mark mackerel sh_mmcif_device __maybe_unused

In reply to Arnd Bergmann

Patch eac036ef9e "ARM: shmobile: streamline mackerel SD and MMC devices" made the use of the sh_mmcif_device variable for mackarel optional, but the definition is always provided, causing a build warning.

arch/arm/mach-shmobile/board-mackerel.c:1120:31: warning: 'sh_mmcif_device'
defined but not used [-Wunused-variable]

Marking the variable as __maybe_unused will do the right thing here.

Cc Guennadi Liakhovetski <[email protected]>
Cc Simon Horman <[email protected]>
---
 arch/arm/mach-shmobile/board-mackerel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-mackerel.c +1 -1
index 0c78207..1de898f 100644
@@ -1117,7 +1117,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = {
 	.slave_id_rx	= SHDMA_SLAVE_MMCIF_RX,
 };
 
-static struct platform_device sh_mmcif_device = {
+static struct platform_device sh_mmcif_device __maybe_unused = {
 	.name		= "sh_mmcif",
 	.id		= 0,
 	.dev		= {
Signature · 1 line
1.8.1.2
Acked-by on v1 5/9
#11 lore raw

Re: [PATCH 5/9] ARM: shmobile: mark mackerel sh_mmcif_device __maybe_unused

Quoted 4 lines · Arnd Bergmann

Patch eac036ef9e "ARM: shmobile: streamline mackerel SD and MMC devices" made the use of the sh_mmcif_device variable for mackarel optional, but the definition is always provided, causing a build warning.

Quoted 8 lines

arch/arm/mach-shmobile/board-mackerel.c:1120:31: warning: 'sh_mmcif_device'
defined but not used [-Wunused-variable]

Marking the variable as __maybe_unused will do the right thing here.

Cc Guennadi Liakhovetski <[email protected]>
Cc Simon Horman <[email protected]>

No objections here.

Quoted 20 lines
---
 arch/arm/mach-shmobile/board-mackerel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-mackerel.c +1 -1
index 0c78207..1de898f 100644
@@ -1117,7 +1117,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = {
 	.slave_id_rx	= SHDMA_SLAVE_MMCIF_RX,
 };
 
-static struct platform_device sh_mmcif_device = {
+static struct platform_device sh_mmcif_device __maybe_unused = {
 	.name		= "sh_mmcif",
 	.id		= 0,
 	.dev		= {
Signature · 1 line
1.8.1.2
#12 lore raw

Re: [PATCH 5/9] ARM: shmobile: mark mackerel sh_mmcif_device __maybe_unused

Quoted 10 lines · Simon Horman
Quoted 9 lines · Arnd Bergmann

Patch eac036ef9e "ARM: shmobile: streamline mackerel SD and MMC devices" made the use of the sh_mmcif_device variable for mackarel optional, but the definition is always provided, causing a build warning.

arch/arm/mach-shmobile/board-mackerel.c:1120:31: warning: 'sh_mmcif_device'
defined but not used [-Wunused-variable]

Marking the variable as __maybe_unused will do the right thing here.

Quoted 7 lines
Quoted 3 lines
Cc Guennadi Liakhovetski <[email protected]>
Cc Simon Horman <[email protected]>

No objections here.

AFAICT, the change that caused this is in linux-next only through your heads/boards3 branch but not through arm-soc, so please apply my patch on your branch.

Arnd

#13 lore raw

Re: [PATCH 5/9] ARM: shmobile: mark mackerel sh_mmcif_device __maybe_unused

Quoted 15 lines · Arnd Bergmann
Quoted 14 lines · Simon Horman
Quoted 12 lines · Arnd Bergmann

Patch eac036ef9e "ARM: shmobile: streamline mackerel SD and MMC devices" made the use of the sh_mmcif_device variable for mackarel optional, but the definition is always provided, causing a build warning.

arch/arm/mach-shmobile/board-mackerel.c:1120:31: warning: 'sh_mmcif_device'
defined but not used [-Wunused-variable]

Marking the variable as __maybe_unused will do the right thing here.

Cc Guennadi Liakhovetski <[email protected]>
Cc Simon Horman <[email protected]>
Quoted 7 lines
Quoted 3 lines

No objections here.

AFAICT, the change that caused this is in linux-next only through your heads/boards3 branch but not through arm-soc, so please apply my patch on your branch.

Sure, will do.

#14 lore raw

PATCH 6/9 drm/pci: move drm_pcie_get_speed_cap_mask inside #ifdef CONFIG_PCI

In reply to Arnd Bergmann

commit dd66cc2e1 "drm/pci: Use PCI Express Capability accessors" introduced the use of the pcie_capability_read_dword function in the drm_pci code, which is only defined when PCI is enabled. While most of the file is already hidden away behind an #ifdef CONFIG_PCI, this function is not, and that now causes a link error in the ARM imx_v6_v7_defconfig configuration.

Moving the function into the #ifdef section makes this work again on IMX, which does not have PCI support, and should have no impact on platforms that do.

Cc Bjorn Helgaas <[email protected]>
Cc Dave Airlie <[email protected]>
---
 drivers/gpu/drm/drm_pci.c | 75 +++++++++++++++++++++++------------------------
 1 file changed, 37 insertions(+), 38 deletions(-)
drivers/gpu/drm/drm_pci.c +37 -38
index 86102a0..9c408e0 100644
@@ -388,6 +388,43 @@ err_g1:
 }
 EXPORT_SYMBOL(drm_get_pci_dev);
 
+int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask)
+{
+	struct pci_dev *root;
+	u32 lnkcap, lnkcap2;
+
+	*mask = 0;
+	if (!dev->pdev)
+		return -EINVAL;
+
+	root = dev->pdev->bus->self;
+
+	/* we've been informed via and serverworks don't make the cut */
+	if (root->vendor == PCI_VENDOR_ID_VIA ||
+	    root->vendor == PCI_VENDOR_ID_SERVERWORKS)
+		return -EINVAL;
+
+	pcie_capability_read_dword(root, PCI_EXP_LNKCAP, &lnkcap);
+	pcie_capability_read_dword(root, PCI_EXP_LNKCAP2, &lnkcap2);
+
+	if (lnkcap2) {	/* PCIe r3.0-compliant */
+		if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB)
+			*mask |= DRM_PCIE_SPEED_25;
+		if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB)
+			*mask |= DRM_PCIE_SPEED_50;
+		if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB)
+			*mask |= DRM_PCIE_SPEED_80;
+	} else {	/* pre-r3.0 */
+		if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB)
+			*mask |= DRM_PCIE_SPEED_25;
+		if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB)
+			*mask |= (DRM_PCIE_SPEED_25 | DRM_PCIE_SPEED_50);
+	}
+
+	DRM_INFO("probing gen 2 caps for device %x:%x = %x/%x\n", root->vendor, root->device, lnkcap, lnkcap2);
+	return 0;
+}
+EXPORT_SYMBOL(drm_pcie_get_speed_cap_mask);
 /**
  * PCI device initialization. Called direct from modules at load time.
  *
@@ -465,41 +502,3 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
 	DRM_INFO("Module unloaded\n");
 }
 EXPORT_SYMBOL(drm_pci_exit);
-
-int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask)
-{
-	struct pci_dev *root;
-	u32 lnkcap, lnkcap2;
-
-	*mask = 0;
-	if (!dev->pdev)
-		return -EINVAL;
-
-	root = dev->pdev->bus->self;
-
-	/* we've been informed via and serverworks don't make the cut */
-	if (root->vendor == PCI_VENDOR_ID_VIA ||
-	    root->vendor == PCI_VENDOR_ID_SERVERWORKS)
-		return -EINVAL;
-
-	pcie_capability_read_dword(root, PCI_EXP_LNKCAP, &lnkcap);
-	pcie_capability_read_dword(root, PCI_EXP_LNKCAP2, &lnkcap2);
-
-	if (lnkcap2) {	/* PCIe r3.0-compliant */
-		if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB)
-			*mask |= DRM_PCIE_SPEED_25;
-		if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB)
-			*mask |= DRM_PCIE_SPEED_50;
-		if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB)
-			*mask |= DRM_PCIE_SPEED_80;
-	} else {	/* pre-r3.0 */
-		if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB)
-			*mask |= DRM_PCIE_SPEED_25;
-		if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB)
-			*mask |= (DRM_PCIE_SPEED_25 | DRM_PCIE_SPEED_50);
-	}
-
-	DRM_INFO("probing gen 2 caps for device %x:%x = %x/%x\n", root->vendor, root->device, lnkcap, lnkcap2);
-	return 0;
-}
-EXPORT_SYMBOL(drm_pcie_get_speed_cap_mask);
Signature · 1 line
1.8.1.2
#15 lore raw

Re: [PATCH 6/9] drm/pci: move drm_pcie_get_speed_cap_mask inside #ifdef CONFIG_PCI

Quoted 7 lines · Arnd Bergmann

commit dd66cc2e1 "drm/pci: Use PCI Express Capability accessors" introduced the use of the pcie_capability_read_dword function in the drm_pci code, which is only defined when PCI is enabled. While most of the file is already hidden away behind an #ifdef CONFIG_PCI, this function is not, and that now causes a link error in the ARM imx_v6_v7_defconfig configuration.

Quoted 7 lines

Moving the function into the #ifdef section makes this work again on IMX, which does not have PCI support, and should have no impact on platforms that do.

Cc Bjorn Helgaas <[email protected]>
Cc Dave Airlie <[email protected]>

Bjorn has already sent a fix for this problem:
http://www.spinics.net/lists/arm-kernel/msg224425.html

#17 lore raw

PATCH 7/9 ARM defconfigs: add missing inclusions of linux/platform_device.h

In reply to Arnd Bergmann

Patch 16559ae "kgdb: remove #include <linux/serial_8250.h> from kgdb.h" removed an implicit inclusion of linux/platform_device.h
In a number of places. This adds back explicit inclusions in a few more places I found.

Cc Greg Kroah-Hartman <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>
---
 arch/arm/plat-samsung/include/plat/adc.h | 1 +
 drivers/video/clps711xfb.c               | 1 +
 drivers/video/mmp/fb/mmpfb.c             | 1 +
 include/linux/platform_data/s3c-hsotg.h  | 2 ++
 4 files changed, 5 insertions(+)
arch/arm/plat-samsung/include/plat/adc.h +1 -0
index b258a08..2fc8931 100644
@@ -15,6 +15,7 @@
 #define __ASM_PLAT_ADC_H __FILE__
 
 struct s3c_adc_client;
+struct platform_device;
 
 extern int s3c_adc_start(struct s3c_adc_client *client,
 			 unsigned int channel, unsigned int nr_samples);
drivers/video/clps711xfb.c +1 -0
index 5a7af0d..f009806 100644
@@ -26,6 +26,7 @@
 #include <linux/fb.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/platform_device.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
drivers/video/mmp/fb/mmpfb.c +1 -0
index f34a3a9..6d1fa96 100644
@@ -21,6 +21,7 @@
  */
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
 #include "mmpfb.h"
 
 static int var_to_pixfmt(struct fb_var_screeninfo *var)
include/linux/platform_data/s3c-hsotg.h +2 -0
index 8b79e09..3f1cbf9 100644
@@ -15,6 +15,8 @@
 #ifndef __LINUX_USB_S3C_HSOTG_H
 #define __LINUX_USB_S3C_HSOTG_H
 
+struct platform_device;
+
 enum s3c_hsotg_dmamode {
 	S3C_HSOTG_DMA_NONE,	/* do not use DMA at-all */
 	S3C_HSOTG_DMA_ONLY,	/* always use DMA */
Signature · 1 line
1.8.1.2
#18 lore raw

Re: [PATCH 7/9] ARM defconfigs: add missing inclusions of linux/platform_device.h

Quoted 5 lines · Arnd Bergmann

Patch 16559ae "kgdb: remove #include <linux/serial_8250.h> from kgdb.h" removed an implicit inclusion of linux/platform_device.h
In a number of places. This adds back explicit inclusions in a few more places I found.

Quoted 7 lines
Cc Greg Kroah-Hartman <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>
---
 arch/arm/plat-samsung/include/plat/adc.h | 1 +
 drivers/video/clps711xfb.c               | 1 +
 drivers/video/mmp/fb/mmpfb.c             | 1 +

This file isn't my tty tree, so I can't apply that part of the patch, but I've applied the rest of the patch, and the 2 others you sent me to fix this issue.

thanks,

greg k-h

#19 lore raw

fb: mmp: include linux/platform_device.h

Patch 16559ae "kgdb: remove #include <linux/serial_8250.h> from kgdb.h" changes the kgdb.h file so that drivers including it do not implicitly include linux/platform_device.h. The mmp framebuffer driver is new, so Greg did not have a chance to fix it up when introducing his change.

---

Quoted 11 lines · Greg Kroah-Hartman
Quoted 6 lines · Arnd Bergmann

Patch 16559ae "kgdb: remove #include <linux/serial_8250.h> from kgdb.h" removed an implicit inclusion of linux/platform_device.h
In a number of places. This adds back explicit inclusions in a few more places I found.

 drivers/video/mmp/fb/mmpfb.c             | 1 +

This file isn't my tty tree, so I can't apply that part of the patch, but I've applied the rest of the patch, and the 2 others you sent me to fix this issue.

Right. It seems the driver is only in Andrew's tree. Andrew, can you add this hunk on top?

drivers/video/mmp/fb/mmpfb.c +1 -0
index f34a3a9..6d1fa96 100644
@@ -21,6 +21,7 @@
  */
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
 #include "mmpfb.h"
 
 static int var_to_pixfmt(struct fb_var_screeninfo *var)
#20 lore raw

Re: fb: mmp: include linux/platform_device.h

Quoted 28 lines · Arnd Bergmann

Patch 16559ae "kgdb: remove #include <linux/serial_8250.h> from kgdb.h" changes the kgdb.h file so that drivers including it do not implicitly include linux/platform_device.h. The mmp framebuffer driver is new, so Greg did not have a chance to fix it up when introducing his change.

---

Quoted 11 lines · Greg Kroah-Hartman
Quoted 6 lines · Arnd Bergmann

Patch 16559ae "kgdb: remove #include <linux/serial_8250.h> from kgdb.h" removed an implicit inclusion of linux/platform_device.h
In a number of places. This adds back explicit inclusions in a few more places I found.

 drivers/video/mmp/fb/mmpfb.c             | 1 +

This file isn't my tty tree, so I can't apply that part of the patch, but I've applied the rest of the patch, and the 2 others you sent me to fix this issue.

Right. It seems the driver is only in Andrew's tree. Andrew, can you add this hunk on top?

drivers/video/mmp/fb/mmpfb.c +0 -0
index f34a3a9..6d1fa96 100644

drivers/video/mmp/fb/mmpfb.c line 27

Quoted 7 lines
drivers/video/mmp/fb/mmpfb.c +1 -0
@@ -21,6 +21,7 @@
  */
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
 #include "mmpfb.h"
 
 static int var_to_pixfmt(struct fb_var_screeninfo *var)
#21 lore raw

PATCH 8/9 s5p-fimc: fix s5pv210 build

In reply to Arnd Bergmann

56bc911 "[media] s5p-fimc: Redefine platform data structure for fimc-is" changed the bus_type member of struct fimc_source_info treewide, but got one instance wrong in mach-s5pv210, which was evidently not even build tested.

This adds the missing change to get s5pv210_defconfig to build again. Applies on the Mauro's media tree.

Cc Sylwester Nawrocki <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 arch/arm/mach-s5pv210/mach-goni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-s5pv210/mach-goni.c +1 -1
index 3a38f7b..e373de4 100644
@@ -845,7 +845,7 @@ static struct fimc_source_info goni_camera_sensors[] = {
 		.mux_id		= 0,
 		.flags		= V4L2_MBUS_PCLK_SAMPLE_FALLING |
 				  V4L2_MBUS_VSYNC_ACTIVE_LOW,
-		.bus_type	= FIMC_BUS_TYPE_ITU_601,
+		.fimc_bus_type	= FIMC_BUS_TYPE_ITU_601,
 		.board_info	= &noon010pc30_board_info,
 		.i2c_bus_num	= 0,
 		.clk_frequency	= 16000000UL,
Signature · 1 line
1.8.1.2
#22 lore raw

PATCH 9/9 thermal: rcar: remove __devinitconst

In reply to Arnd Bergmann

commit 76cc18874 "thermal: rcar: add Device Tree support" added device tree support for this driver, but also added an instance of __devinitconst, which is no longer defined

Cc Kuninori Morimoto <[email protected]>
Cc Zhang Rui <[email protected]>
---
 drivers/thermal/rcar_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/rcar_thermal.c +1 -1
index 909bb4b..28f0919 100644
@@ -476,7 +476,7 @@ static int rcar_thermal_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct of_device_id rcar_thermal_dt_ids[] __devinitconst = {
+static const struct of_device_id rcar_thermal_dt_ids[] = {
 	{ .compatible = "renesas,rcar-thermal", },
 	{},
 };
Signature · 1 line
1.8.1.2
reviewer Applied
#23 lore raw

Re: [PATCH 9/9] thermal: rcar: remove __devinitconst

Quoted 7 lines · Arnd Bergmann

commit 76cc18874 "thermal: rcar: add Device Tree support" added device tree support for this driver, but also added an instance of __devinitconst, which is no longer defined

Cc Kuninori Morimoto <[email protected]>
Cc Zhang Rui <[email protected]>

applied to thermal -next tree.

thanks,
rui

Quoted 17 lines
---
 drivers/thermal/rcar_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/rcar_thermal.c +1 -1
index 909bb4b..28f0919 100644
@@ -476,7 +476,7 @@ static int rcar_thermal_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct of_device_id rcar_thermal_dt_ids[] __devinitconst = {
+static const struct of_device_id rcar_thermal_dt_ids[] = {
 	{ .compatible = "renesas,rcar-thermal", },
 	{},
 };