2013-04-23 16:32:30

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 00/21] ARM build fixes for 3.10

Hi everyone,

This is a set of bug fixes for build errors and warnings I am
seeing in the various defconfigs and/or allmodconfig builds
on linux-next. The majority of these showed up because we now
include a lot more platforms in allmodconfig than we used to.

Please apply to appropriate maintainer trees or provide
feedback, I can take care of the rest sending those through
arm-soc that I get no feedback on.

Arnd

Arnd Bergmann (21):
Turn off -Wmaybe-uninitialized when building with -Os
ARM: compressed/head.S: work around new binutils warning
ARM: use optimized do_div only for EABI
ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally
ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7
ARM: tegra: call cpu_do_idle from C code
ARM: tegra: unify tegra_idle_device definitions
ASoC: ux500: forward declare msp_i2s_platform_data
spi/sirf: fix MODULE_DEVICE_TABLE
ssb: fix alignment of struct bcma_device_id
drm/tilcdc: use only a single module device table
mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE
misc: mark spear13xx-pcie-gadget as broken
staging: nvec: allow modular build
staging: comedi/dawboard2000: use mdelay for large delays
staging/zsmalloc: don't use pgtable-mapping from modules
tty/serial/sirf: fix MODULE_DEVICE_TABLE
usb: phy: tegra: don't call into tegra-ehci directly
usb: phy: don't mark usb_bind_phy as __init
MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly
mtd: omap2: allow bulding as a module

Makefile | 2 +-
arch/arm/boot/compressed/Makefile | 2 +-
arch/arm/boot/compressed/head.S | 12 ++++++++++++
arch/arm/include/asm/div64.h | 2 +-
arch/arm/kvm/Kconfig | 6 +++---
arch/arm/mach-omap2/Kconfig | 5 +++++
arch/arm/mach-tegra/cpuidle-tegra114.c | 5 ++---
arch/arm/mach-tegra/cpuidle-tegra20.c | 4 +---
arch/arm/mach-tegra/cpuidle-tegra30.c | 4 +---
arch/arm/mach-tegra/cpuidle.c | 2 ++
arch/arm/mach-tegra/cpuidle.h | 4 ++++
arch/arm/mach-tegra/pm.c | 5 +++++
arch/arm/mach-tegra/sleep-tegra20.S | 2 +-
drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 -
drivers/gpu/drm/tilcdc/tilcdc_slave.c | 1 -
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 -
drivers/mfd/ab8500-gpadc.c | 2 +-
drivers/misc/Kconfig | 2 +-
drivers/mmc/host/sdhci-tegra.c | 2 +-
drivers/mtd/nand/Kconfig | 2 +-
drivers/spi/spi-sirf.c | 2 +-
drivers/staging/comedi/drivers/daqboard2000.c | 14 +++++++-------
drivers/staging/nvec/Kconfig | 10 +++++-----
drivers/staging/zsmalloc/zsmalloc-main.c | 2 +-
drivers/tty/serial/sirfsoc_uart.c | 2 +-
drivers/usb/host/ehci-tegra.c | 10 +++++-----
drivers/usb/otg/otg.c | 2 +-
drivers/usb/phy/tegra_usb_phy.c | 13 +++++++++----
include/linux/mod_devicetable.h | 5 +++--
include/linux/usb/tegra_usb_phy.h | 10 +++++-----
sound/soc/ux500/ux500_msp_i2s.h | 1 +
31 files changed, 82 insertions(+), 55 deletions(-)

--
1.8.1.2

Cc: Alan Stern <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Chris Ball <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Russell King <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]


2013-04-23 16:31:50

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 01/21] Turn off -Wmaybe-uninitialized when building with -Os

gcc-4.7 and higher add a lot of false positive warnings about
potential uses of uninitialized warnings, but only when optimizing
for size (-Os). This is the default when building allyesconfig,
which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.

In order to avoid getting a lot of patches that initialize such
variables and accidentally hide real errors along the way, let's
just turn off this warning on the respective gcc versions
when building with size optimizations. The -Wmaybe-uninitialized
option was introduced in the same gcc version (4.7) that is now
causing the false positives, so there is no effect on older compilers.

A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE,
we might now see /fewer/ warnings about possibly uninitialized
warnings than with -O2, but that is still much better than seeing
warnings known to be bogus.

Signed-off-by: Arnd Bergmann <[email protected]>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 46263d8..dc87b2e 100644
--- a/Makefile
+++ b/Makefile
@@ -571,7 +571,7 @@ endif # $(dot-config)
all: vmlinux

ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS += -Os
+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
else
KBUILD_CFLAGS += -O2
endif
--
1.8.1.2

2013-04-23 16:31:54

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 02/21] ARM: compressed/head.S: work around new binutils warning

In August 2012, Matthew Gretton-Dann checked a change into binutils
labelled "Error on obsolete & warn on deprecated registers", apparently as
part of ARMv8 support. Apparently, this was supposed to emit the message
"Warning: This coprocessor register access is deprecated in ARMv8" when
using certain mcr/mrc instructions and building for ARMv8. Unfortunately,
the message that is actually emitted appears to be '(null)', which is
less helpful in comparison.

Even more unfortunately, this is biting us on every single kernel
build with a new gas, because arch/arm/boot/compressed/head.S and some
other files in that directory are built with -march=all since kernel
commit 80cec14a8 "[ARM] Add -march=all to assembly file build in
arch/arm/boot/compressed" back in v2.6.28.

This patch reverts Russell's nice solution and replaces it with a more
complex one that sprinkles .arch statements inside of the head.S file
in functions that are executed in different architecture levels, which
seems to solve the original problem just as well, and gets rid of the
new one, too.

Without this patch, building anything results in:

arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:565: Warning: (null)
arch/arm/boot/compressed/head.S:676: Warning: (null)
arch/arm/boot/compressed/head.S:698: Warning: (null)
arch/arm/boot/compressed/head.S:722: Warning: (null)
arch/arm/boot/compressed/head.S:726: Warning: (null)
arch/arm/boot/compressed/head.S:957: Warning: (null)
arch/arm/boot/compressed/head.S:996: Warning: (null)
arch/arm/boot/compressed/head.S:997: Warning: (null)
arch/arm/boot/compressed/head.S:1027: Warning: (null)
arch/arm/boot/compressed/head.S:1035: Warning: (null)
arch/arm/boot/compressed/head.S:1046: Warning: (null)
arch/arm/boot/compressed/head.S:1060: Warning: (null)
arch/arm/boot/compressed/head.S:1092: Warning: (null)
arch/arm/boot/compressed/head.S:1094: Warning: (null)
arch/arm/boot/compressed/head.S:1095: Warning: (null)
arch/arm/boot/compressed/head.S:1102: Warning: (null)
arch/arm/boot/compressed/head.S:1134: Warning: (null)

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Matthew Gretton-Dann <[email protected]>
Cc: Russell King <[email protected]>
---
arch/arm/boot/compressed/Makefile | 2 +-
arch/arm/boot/compressed/head.S | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index afed28e..27f3604 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -121,7 +121,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
endif

ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
-asflags-y := -Wa,-march=all -DZIMAGE
+asflags-y := -DZIMAGE

# Supply kernel BSS size to the decompressor via a linker symbol.
KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index fe4d9c3..3b0b21a 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -548,6 +548,7 @@ cache_on: mov r3, #8 @ cache_on function
* to cover all 32bit address and cacheable and bufferable.
*/
__armv4_mpu_cache_on:
+ .arch armv4
mov r0, #0x3f @ 4G, the whole
mcr p15, 0, r0, c6, c7, 0 @ PR7 Area Setting
mcr p15, 0, r0, c6, c7, 1
@@ -655,6 +656,7 @@ ENDPROC(__setup_mmu)
@ Enable unaligned access on v6, to allow better code generation
@ for the decompressor C code:
__armv6_mmu_cache_on:
+ .arch armv6
mrc p15, 0, r0, c1, c0, 0 @ read SCTLR
bic r0, r0, #2 @ A (no unaligned access fault)
orr r0, r0, #1 << 22 @ U (v6 unaligned access model)
@@ -663,11 +665,13 @@ __armv6_mmu_cache_on:

__arm926ejs_mmu_cache_on:
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
+ .arch armv5
mov r0, #4 @ put dcache in WT mode
mcr p15, 7, r0, c15, c0, 0
#endif

__armv4_mmu_cache_on:
+ .arch armv4
mov r12, lr
#ifdef CONFIG_MMU
mov r6, #CB_BITS | 0x12 @ U
@@ -688,6 +692,7 @@ __armv4_mmu_cache_on:
mov pc, r12

__armv7_mmu_cache_on:
+ .arch armv7-a
mov r12, lr
#ifdef CONFIG_MMU
mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0
@@ -1031,6 +1036,7 @@ cache_clean_flush:
mov r3, #16
b call_cache_fn

+ .arch armv4
__armv4_mpu_cache_flush:
mov r2, #1
mov r3, #0
@@ -1056,6 +1062,7 @@ __fa526_cache_flush:
mov pc, lr

__armv6_mmu_cache_flush:
+ .arch armv6
mov r1, #0
mcr p15, 0, r1, c7, c14, 0 @ clean+invalidate D
mcr p15, 0, r1, c7, c5, 0 @ invalidate I+BTB
@@ -1063,6 +1070,7 @@ __armv6_mmu_cache_flush:
mcr p15, 0, r1, c7, c10, 4 @ drain WB
mov pc, lr

+ .arch armv7-a
__armv7_mmu_cache_flush:
mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1
tst r10, #0xf << 16 @ hierarchical cache (ARMv7)
@@ -1123,6 +1131,7 @@ iflush:
mcr p15, 0, r10, c7, c5, 4 @ ISB
mov pc, lr

+ .arch armv5
__armv5tej_mmu_cache_flush:
1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate D cache
bne 1b
@@ -1130,6 +1139,7 @@ __armv5tej_mmu_cache_flush:
mcr p15, 0, r0, c7, c10, 4 @ drain WB
mov pc, lr

+ .arch armv4
__armv4_mmu_cache_flush:
mov r2, #64*1024 @ default: 32K dcache size (*2)
mov r11, #32 @ default: 32 byte line size
@@ -1168,6 +1178,8 @@ __armv3_mpu_cache_flush:
mcr p15, 0, r1, c7, c0, 0 @ invalidate whole cache v3
mov pc, lr

+ .arch armv4
+
/*
* Various debugging routines for printing hex characters and
* memory, which again must be relocatable.
--
1.8.1.2

2013-04-23 16:32:08

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 08/21] ASoC: ux500: forward declare msp_i2s_platform_data

We get a lot of build warnings from the msp driver like:

In file included from sound/soc/ux500/ux500_msp_dai.h:21:0,
from sound/soc/ux500/mop500.c:25:
sound/soc/ux500/ux500_msp_i2s.h:546:11: warning: 'struct msp_i2s_platform_data' declared inside parameter list [enabled by default]
struct msp_i2s_platform_data *platform_data);
^
sound/soc/ux500/ux500_msp_i2s.h:546:11: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

The easiest solution is to add a declaration of the struct name.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Ola Lilja <[email protected]>
Cc: [email protected]
---
sound/soc/ux500/ux500_msp_i2s.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h
index 1311c0d..6f3e3dc 100644
--- a/sound/soc/ux500/ux500_msp_i2s.h
+++ b/sound/soc/ux500/ux500_msp_i2s.h
@@ -543,6 +543,7 @@ struct ux500_msp_dma_params {
struct stedma40_chan_cfg *dma_cfg;
};

+struct msp_i2s_platform_data;
int ux500_msp_i2s_init_msp(struct platform_device *pdev,
struct ux500_msp **msp_p,
struct msp_i2s_platform_data *platform_data);
--
1.8.1.2

2013-04-23 16:32:15

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 03/21] ARM: use optimized do_div only for EABI

In OABI configurations, some uses of the do_div function
cause gcc to run out of registers. To work around that,
we can force the use of the out-of-line version for
configurations that build a OABI kernel.

Without this patch, building netx_defconfig results in:

net/core/pktgen.c: In function 'pktgen_if_show':
net/core/pktgen.c:682:2775: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
net/core/pktgen.c:682:3153: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
net/core/pktgen.c:682:2775: error: 'asm' operand has impossible constraints
net/core/pktgen.c:682:3153: error: 'asm' operand has impossible constraints

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Russell King <[email protected]>
---
arch/arm/include/asm/div64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h
index fe92ccf..191ada6 100644
--- a/arch/arm/include/asm/div64.h
+++ b/arch/arm/include/asm/div64.h
@@ -46,7 +46,7 @@
__rem; \
})

-#if __GNUC__ < 4
+#if __GNUC__ < 4 || !defined(CONFIG_AEABI)

/*
* gcc versions earlier than 4.0 are simply too problematic for the
--
1.8.1.2

2013-04-23 16:32:23

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 21/21] mtd: omap2: allow bulding as a module

The omap2 nand device driver calls into the the elm code, which can
be a loadable module, and in that case it cannot be built-in itself.
I can see no reason why the omap2 driver cannot also be a module,
so let's make the option "tristate" in Kconfig to fix this allmodconfig
build error:

ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined!
ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko] undefined!

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Afzal Mohammed <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
---
drivers/mtd/nand/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 81bf5e5..106b55e 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -109,7 +109,7 @@ config MTD_NAND_OMAP2

config MTD_NAND_OMAP_BCH
depends on MTD_NAND && MTD_NAND_OMAP2 && ARCH_OMAP3
- bool "Enable support for hardware BCH error correction"
+ tristate "Enable support for hardware BCH error correction"
default n
select BCH
select BCH_CONST_PARAMS
--
1.8.1.2

2013-04-23 16:32:53

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 18/21] usb: phy: tegra: don't call into tegra-ehci directly

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one,
which does not work if one of them or both are loadable modules, resulting
in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci
driver pass two function pointers for callbacks that need to be called by
the phy driver.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Venu Byravarasu <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: [email protected]
---
drivers/usb/host/ehci-tegra.c | 10 +++++-----
drivers/usb/phy/tegra_usb_phy.c | 13 +++++++++----
include/linux/usb/tegra_usb_phy.h | 10 +++++-----
3 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 568aecc..07419e4 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -610,7 +610,7 @@ static const struct dev_pm_ops tegra_ehci_pm_ops = {
/* Bits of PORTSC1, which will get cleared by writing 1 into them */
#define TEGRA_PORTSC1_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)

-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
+static void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
{
unsigned long val;
struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -621,9 +621,8 @@ void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
val |= TEGRA_USB_PORTSC1_PTS(pts_val & 3);
writel(val, base + TEGRA_USB_PORTSC1);
}
-EXPORT_SYMBOL_GPL(tegra_ehci_set_pts);

-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
+static void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
{
unsigned long val;
struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -636,7 +635,6 @@ void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
val &= ~TEGRA_USB_PORTSC1_PHCD;
writel(val, base + TEGRA_USB_PORTSC1);
}
-EXPORT_SYMBOL_GPL(tegra_ehci_set_phcd);

static u64 tegra_ehci_dma_mask = DMA_BIT_MASK(32);

@@ -733,7 +731,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)

tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
pdata->phy_config,
- TEGRA_USB_PHY_MODE_HOST);
+ TEGRA_USB_PHY_MODE_HOST,
+ &tegra_ehci_set_pts,
+ tegra_ehci_set_phcd);
if (IS_ERR(tegra->phy)) {
dev_err(&pdev->dev, "Failed to open USB phy\n");
err = -ENXIO;
diff --git a/drivers/usb/phy/tegra_usb_phy.c b/drivers/usb/phy/tegra_usb_phy.c
index 5487d38..17d8112 100644
--- a/drivers/usb/phy/tegra_usb_phy.c
+++ b/drivers/usb/phy/tegra_usb_phy.c
@@ -299,7 +299,7 @@ static void utmi_phy_clk_disable(struct tegra_usb_phy *phy)
val &= ~USB_SUSP_SET;
writel(val, base + USB_SUSP_CTRL);
} else
- tegra_ehci_set_phcd(&phy->u_phy, true);
+ phy->set_phcd(&phy->u_phy, true);

if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID, 0) < 0)
pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
@@ -321,7 +321,7 @@ static void utmi_phy_clk_enable(struct tegra_usb_phy *phy)
val &= ~USB_SUSP_CLR;
writel(val, base + USB_SUSP_CTRL);
} else
- tegra_ehci_set_phcd(&phy->u_phy, false);
+ phy->set_phcd(&phy->u_phy, false);

if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
USB_PHY_CLK_VALID))
@@ -444,7 +444,7 @@ static int utmi_phy_power_on(struct tegra_usb_phy *phy)
utmi_phy_clk_enable(phy);

if (!phy->is_legacy_phy)
- tegra_ehci_set_pts(&phy->u_phy, 0);
+ phy->set_pts(&phy->u_phy, 0);

return 0;
}
@@ -688,7 +688,10 @@ static int tegra_usb_phy_suspend(struct usb_phy *x, int suspend)
}

struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
- void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode)
+ void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+ void (*set_pts)(struct usb_phy *x, u8 pts_val),
+ void (*set_phcd)(struct usb_phy *x, bool enable))
+
{
struct tegra_usb_phy *phy;
unsigned long parent_rate;
@@ -707,6 +710,8 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
phy->dev = dev;
phy->is_legacy_phy =
of_property_read_bool(np, "nvidia,has-legacy-mode");
+ phy->set_pts = set_pts;
+ phy->set_phcd = set_phcd;
err = of_property_match_string(np, "phy_type", "ulpi");
if (err < 0)
phy->is_ulpi_phy = false;
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index 9ebebe9..1b7519a 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -61,10 +61,14 @@ struct tegra_usb_phy {
struct device *dev;
bool is_legacy_phy;
bool is_ulpi_phy;
+ void (*set_pts)(struct usb_phy *x, u8 pts_val);
+ void (*set_phcd)(struct usb_phy *x, bool enable);
};

struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
- void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode);
+ void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+ void (*set_pts)(struct usb_phy *x, u8 pts_val),
+ void (*set_phcd)(struct usb_phy *x, bool enable));

void tegra_usb_phy_preresume(struct usb_phy *phy);

@@ -75,8 +79,4 @@ void tegra_ehci_phy_restore_start(struct usb_phy *phy,

void tegra_ehci_phy_restore_end(struct usb_phy *phy);

-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val);
-
-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable);
-
#endif /* __TEGRA_USB_PHY_H */
--
1.8.1.2

2013-04-23 16:32:21

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 09/21] spi/sirf: fix MODULE_DEVICE_TABLE

This fixes building the spi-sirf driver as a loadable module, which uses
an incorrect MODULE_DEVICE_TABLE, by changing the reference to the
correct symbol.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: [email protected]
Cc: Barry Song <[email protected]>
---
drivers/spi/spi-sirf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index f59d417..0808cd5 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -660,7 +660,7 @@ static const struct of_device_id spi_sirfsoc_of_match[] = {
{ .compatible = "sirf,marco-spi", },
{}
};
-MODULE_DEVICE_TABLE(of, sirfsoc_spi_of_match);
+MODULE_DEVICE_TABLE(of, spi_sirfsoc_of_match);

static struct platform_driver spi_sirfsoc_driver = {
.driver = {
--
1.8.1.2

2013-04-23 16:32:13

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 16/21] staging/zsmalloc: don't use pgtable-mapping from modules

Building zsmalloc as a module does not work on ARM because it uses
an interface that is not exported:

ERROR: "flush_tlb_kernel_range" [drivers/staging/zsmalloc/zsmalloc.ko] undefined!

Since this is only used as a performance optimization and only on ARM,
we can avoid the problem simply by not using that optimization when
building zsmalloc it is a loadable module.

flush_tlb_kernel_range is often an inline function, but out of the
architectures that use an extern function, only powerpc exports
it.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: Nitin Gupta <[email protected]>
---
drivers/staging/zsmalloc/zsmalloc-main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c
index e78d262..291c1d8 100644
--- a/drivers/staging/zsmalloc/zsmalloc-main.c
+++ b/drivers/staging/zsmalloc/zsmalloc-main.c
@@ -225,7 +225,7 @@ struct zs_pool {
* so that USE_PGTABLE_MAPPING is defined. This causes zsmalloc to use
* page table mapping rather than copying for object mapping.
*/
-#if defined(CONFIG_ARM)
+#if defined(CONFIG_ARM) && !defined(MODULE)
#define USE_PGTABLE_MAPPING
#endif

--
1.8.1.2

2013-04-23 16:32:12

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 15/21] staging: comedi/dawboard2000: use mdelay for large delays

On ARM, it is not legal to pass values larger than 2ms into udelay(),
and mdelay() must be used instead, to avoid this build error:

ERROR: "__bad_udelay" [drivers/staging/comedi/drivers/daqboard2000.ko]
undefined!

On a related note, any use of mdelay() or large udelay() numbers should
be carefully reviewed, and replaced with msleep() or a different
implementation that does not rely on delaying the work.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/comedi/drivers/daqboard2000.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 50b450f..b213e36 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -462,9 +462,9 @@ static void daqboard2000_resetLocalBus(struct comedi_device *dev)
struct daqboard2000_private *devpriv = dev->private;

writel(DAQBOARD2000_SECRLocalBusHi, devpriv->plx + 0x6c);
- udelay(10000);
+ mdelay(10);
writel(DAQBOARD2000_SECRLocalBusLo, devpriv->plx + 0x6c);
- udelay(10000);
+ mdelay(10);
}

static void daqboard2000_reloadPLX(struct comedi_device *dev)
@@ -472,11 +472,11 @@ static void daqboard2000_reloadPLX(struct comedi_device *dev)
struct daqboard2000_private *devpriv = dev->private;

writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
- udelay(10000);
+ mdelay(10);
writel(DAQBOARD2000_SECRReloadHi, devpriv->plx + 0x6c);
- udelay(10000);
+ mdelay(10);
writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
- udelay(10000);
+ mdelay(10);
}

static void daqboard2000_pulseProgPin(struct comedi_device *dev)
@@ -484,9 +484,9 @@ static void daqboard2000_pulseProgPin(struct comedi_device *dev)
struct daqboard2000_private *devpriv = dev->private;

writel(DAQBOARD2000_SECRProgPinHi, devpriv->plx + 0x6c);
- udelay(10000);
+ mdelay(10);
writel(DAQBOARD2000_SECRProgPinLo, devpriv->plx + 0x6c);
- udelay(10000); /* Not in the original code, but I like symmetry... */
+ mdelay(10); /* Not in the original code, but I like symmetry... */
}

static int daqboard2000_pollCPLD(struct comedi_device *dev, int mask)
--
1.8.1.2

2013-04-23 16:32:07

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 06/21] ARM: tegra: call cpu_do_idle from C code

When building a kernel for multiple CPU architecture levels,
cpu_do_idle() is a macro for an indirect function call, which
cannot be called from assembly code as Tegra does.

Adding a trivial C wrapper for this function lets us build
a tegra kernel with ARMv6 support enabled.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Joseph Lo <[email protected]>
Cc: Stephen Warren <[email protected]>
---
arch/arm/mach-tegra/pm.c | 5 +++++
arch/arm/mach-tegra/sleep-tegra20.S | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index 523604d..398e932 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -181,6 +181,11 @@ bool tegra_set_cpu_in_lp2(int phy_cpu_id)
return last_cpu;
}

+int tegra_cpu_do_idle(void)
+{
+ return cpu_do_idle();
+}
+
static int tegra_sleep_cpu(unsigned long v2p)
{
/* Switch to the identity mapping. */
diff --git a/arch/arm/mach-tegra/sleep-tegra20.S b/arch/arm/mach-tegra/sleep-tegra20.S
index 9f6bfafd..e3f2417 100644
--- a/arch/arm/mach-tegra/sleep-tegra20.S
+++ b/arch/arm/mach-tegra/sleep-tegra20.S
@@ -197,7 +197,7 @@ ENTRY(tegra20_sleep_cpu_secondary_finish)
mov r3, #CPU_RESETTABLE
str r3, [r0]

- bl cpu_do_idle
+ bl tegra_cpu_do_idle

/*
* cpu may be reset while in wfi, which will return through
--
1.8.1.2

2013-04-23 16:34:21

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 17/21] tty/serial/sirf: fix MODULE_DEVICE_TABLE

This fixes building the sirfsorc-uart driver as a loadable module,
which uses an incorrect MODULE_DEVICE_TABLE, by changing the reference to the
correct symbol.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jiri Slaby <[email protected]>
---
drivers/tty/serial/sirfsoc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 6bbfe99..03465b6 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -758,7 +758,7 @@ static struct of_device_id sirfsoc_uart_ids[] = {
{ .compatible = "sirf,marco-uart", },
{}
};
-MODULE_DEVICE_TABLE(of, sirfsoc_serial_of_match);
+MODULE_DEVICE_TABLE(of, sirfsoc_uart_ids);

static struct platform_driver sirfsoc_uart_driver = {
.probe = sirfsoc_uart_probe,
--
1.8.1.2

2013-04-23 16:32:05

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 04/21] ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the
kernel/context_tracking.c code, which includes the vgic data structures
implictly through the kvm headers. Definining the symbol to zero
on builds without KVM resolves this build error:

In file included from include/linux/kvm_host.h:33:0,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_host.h:28:23: warning: "CONFIG_KVM_ARM_MAX_VCPUS" is not defined [-Wundef]
#define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
^
arch/arm/include/asm/kvm_vgic.h:34:24: note: in expansion of macro 'KVM_MAX_VCPUS'
#define VGIC_MAX_CPUS KVM_MAX_VCPUS
^
arch/arm/include/asm/kvm_vgic.h:38:6: note: in expansion of macro 'VGIC_MAX_CPUS'
#if (VGIC_MAX_CPUS > 8)
^
In file included from arch/arm/include/asm/kvm_host.h:41:0,
from include/linux/kvm_host.h:33,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_vgic.h:59:11: error: 'CONFIG_KVM_ARM_MAX_VCPUS' undeclared here (not in a function)
} percpu[VGIC_MAX_CPUS];
^

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Christoffer Dall <[email protected]>
Cc: Will Deacon <[email protected]>
---
arch/arm/kvm/Kconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
index 49dd64e..370e1a8 100644
--- a/arch/arm/kvm/Kconfig
+++ b/arch/arm/kvm/Kconfig
@@ -41,9 +41,9 @@ config KVM_ARM_HOST
Provides host support for ARM processors.

config KVM_ARM_MAX_VCPUS
- int "Number maximum supported virtual CPUs per VM"
- depends on KVM_ARM_HOST
- default 4
+ int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST
+ default 4 if KVM_ARM_HOST
+ default 0
help
Static number of max supported virtual CPUs per VM.

--
1.8.1.2

2013-04-23 16:32:03

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 14/21] staging: nvec: allow modular build

The serio code can be a loadable module, which in turn means that nvec
also has to be a module, so mark it as "tristate" in Kconfig.

drivers/built-in.o: In function `nvec_mouse_remove':
drivers/staging/nvec/nvec_ps2.c:136: undefined reference to `serio_unregister_port'
drivers/built-in.o: In function `nvec_mouse_probe':
drivers/staging/nvec/nvec_ps2.c:126: undefined reference to `__serio_register_port'
drivers/built-in.o: In function `nvec_ps2_notifier':
drivers/staging/nvec/nvec_ps2.c:84: undefined reference to `serio_interrupt'
drivers/staging/nvec/nvec_ps2.c:91: undefined reference to `serio_interrupt'

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Marc Dietrich <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/nvec/Kconfig | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/nvec/Kconfig b/drivers/staging/nvec/Kconfig
index f779fdc..7e61ada 100644
--- a/drivers/staging/nvec/Kconfig
+++ b/drivers/staging/nvec/Kconfig
@@ -1,5 +1,5 @@
config MFD_NVEC
- bool "NV Tegra Embedded Controller SMBus Interface"
+ tristate "NV Tegra Embedded Controller SMBus Interface"
depends on I2C && GPIOLIB && ARCH_TEGRA
select MFD_CORE
help
@@ -7,28 +7,28 @@ config MFD_NVEC
controller.

config KEYBOARD_NVEC
- bool "Keyboard on nVidia compliant EC"
+ tristate "Keyboard on nVidia compliant EC"
depends on MFD_NVEC && INPUT
help
Say Y here to enable support for a keyboard connected to
a nVidia compliant embedded controller.

config SERIO_NVEC_PS2
- bool "PS2 on nVidia EC"
+ tristate "PS2 on nVidia EC"
depends on MFD_NVEC && SERIO
help
Say Y here to enable support for a Touchpad / Mouse connected
to a nVidia compliant embedded controller.

config NVEC_POWER
- bool "NVEC charger and battery"
+ tristate "NVEC charger and battery"
depends on MFD_NVEC && POWER_SUPPLY
help
Say Y to enable support for battery and charger interface for
nVidia compliant embedded controllers.

config NVEC_PAZ00
- bool "Support for OEM specific functions on Compal PAZ00 based devices"
+ tristate "Support for OEM specific functions on Compal PAZ00 based devices"
depends on MFD_NVEC && LEDS_CLASS
help
Say Y to enable control of the yellow side leds on Compal PAZ00 based
--
1.8.1.2

2013-04-23 16:35:37

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 12/21] mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

The symbol referenced in MODULE_DEVICE_TABLE must match the actual
table, otherwise we get a build error like

sdhci-tegra.c:206:34: error: '__mod_of_device_table' aliased to undefined symbol 'sdhci_dt_ids'

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Chris Ball <[email protected]>
---
drivers/mmc/host/sdhci-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 08b06e9..85052bf 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -214,7 +214,7 @@ static const struct of_device_id sdhci_tegra_dt_match[] = {
#endif
{}
};
-MODULE_DEVICE_TABLE(of, sdhci_dt_ids);
+MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match);

static void sdhci_tegra_parse_dt(struct device *dev,
struct sdhci_tegra *tegra_host)
--
1.8.1.2

2013-04-23 16:36:37

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 13/21] misc: mark spear13xx-pcie-gadget as broken

This driver was merged in 2.6.38 but never actually compiled because
it depends on the <mach/pcie.h> header that has not made it into the
kernel. Starting with Linux-3.10, this results in "allyesconfig"
build errors, since spear13xx can now be enabled with the default
"multiplatform" platform on ARM. Let's mark it as broken for now.
If it doesn't get fixed, we can drop it completely.

Cc: Pratyush Anand <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Jesse Barnes <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Shiraz Hashim <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/misc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index e83fdfe..c74b13b 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -398,7 +398,7 @@ config DS1682

config SPEAR13XX_PCIE_GADGET
bool "PCIe gadget support for SPEAr13XX platform"
- depends on ARCH_SPEAR13XX
+ depends on ARCH_SPEAR13XX && BROKEN
default n
help
This option enables gadget support for PCIe controller. If
--
1.8.1.2

2013-04-23 16:32:00

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 20/21] MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly

Apparently the ab8500_gpadc_sw_hw_convert function got renamed
from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in
commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion",
but the export for this function did not get changed at the
same time, causing this allyesconfig error:

ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!

This patch fixes the export.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: M'boumba Cedric Madianga <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Mattias WALLIN <[email protected]>
Cc: Michel JAOUEN <[email protected]>
Cc: Samuel Ortiz <[email protected]>
---
drivers/mfd/ab8500-gpadc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
index 5f341a5..184df96 100644
--- a/drivers/mfd/ab8500-gpadc.c
+++ b/drivers/mfd/ab8500-gpadc.c
@@ -269,7 +269,7 @@ int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel)

return voltage;
}
-EXPORT_SYMBOL(ab8500_gpadc_convert);
+EXPORT_SYMBOL(ab8500_gpadc_sw_hw_convert);

/**
* ab8500_gpadc_read_raw() - gpadc read
--
1.8.1.2

2013-04-23 16:31:59

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 19/21] usb: phy: don't mark usb_bind_phy as __init

It makes no sense for a symbol to be both exported and marked __init,
because any users in modules would be calling this function after
it gets discarded. Further, this patch revolves a section mismatch
warning from usbhs_init_phys(), which is intentionally not marked
__init:

WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from
the function usbhs_init_phys() to the function .init.text:usb_bind_phy()

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
drivers/usb/otg/otg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
index 2bd03d2..77346cf 100644
--- a/drivers/usb/otg/otg.c
+++ b/drivers/usb/otg/otg.c
@@ -414,7 +414,7 @@ EXPORT_SYMBOL(usb_remove_phy);
*
* To be used by platform specific initialization code.
*/
-int __init usb_bind_phy(const char *dev_name, u8 index,
+int usb_bind_phy(const char *dev_name, u8 index,
const char *phy_dev_name)
{
struct usb_phy_bind *phy_bind;
--
1.8.1.2

2013-04-23 16:37:34

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 10/21] ssb: fix alignment of struct bcma_device_id

The ARM OABI and EABI disagree on the alignment of structures
with small members, so module init tools may interpret the
ssb device table incorrectly, as shown by this warning when
building the b43 device driver in an OABI kernel:

FATAL: drivers/net/wireless/b43/b43: sizeof(struct ssb_device_id)=6 is
not a modulo of the size of section __mod_ssb_device_table=88.

Forcing the default (EABI) alignment on the structure makes this
problem go away. Since the ssb_device_id may have the same problem,
better fix both structures.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Russell King <[email protected]>
Cc: John W. Linville <[email protected]>
Cc: Michael Buesch <[email protected]>
Cc: Larry Finger <[email protected]>
---
include/linux/mod_devicetable.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 779cf7c..ce363a5 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -360,7 +360,8 @@ struct ssb_device_id {
__u16 vendor;
__u16 coreid;
__u8 revision;
-};
+ __u8 __pad;
+} __attribute__((packed, aligned(2)));
#define SSB_DEVICE(_vendor, _coreid, _revision) \
{ .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
#define SSB_DEVTABLE_END \
@@ -376,7 +377,7 @@ struct bcma_device_id {
__u16 id;
__u8 rev;
__u8 class;
-};
+} __attribute__((packed,aligned(2)));
#define BCMA_CORE(_manuf, _id, _rev, _class) \
{ .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
#define BCMA_CORETABLE_END \
--
1.8.1.2

2013-04-23 16:37:52

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

The three tegra variants (20, 30, 114) each define their own per-cpu
variable for tegra_idle_device, which causes link errors when you
build the kernel for more than one of them:

cpuidle-tegra30.o:(.discard+0x0): multiple definition of `__pcpu_unique_tegra_idle_device'
cpuidle-tegra20.o:(.discard+0x0): first defined here
cpuidle-tegra114.o:(.discard+0x0): multiple definition of `__pcpu_unique_tegra_idle_device'
cpuidle-tegra20.o:(.discard+0x0): first defined here

By moving the variable into the common cpuidle.c file, we save a little
bit of object code size and avoid that warning.
As a bonus, this patch also removes the unused "drv" variables in each
of the three files that caused a warning since 0697598db "ARM: tegra:
cpuidle: remove useless initialization".

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Joseph Lo <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
---
arch/arm/mach-tegra/cpuidle-tegra114.c | 5 ++---
arch/arm/mach-tegra/cpuidle-tegra20.c | 4 +---
arch/arm/mach-tegra/cpuidle-tegra30.c | 4 +---
arch/arm/mach-tegra/cpuidle.c | 2 ++
arch/arm/mach-tegra/cpuidle.h | 4 ++++
5 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
index 0f4e8c4..09067a1 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra114.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
@@ -20,6 +20,8 @@

#include <asm/cpuidle.h>

+#include "cpuidle.h"
+
static struct cpuidle_driver tegra_idle_driver = {
.name = "tegra_idle",
.owner = THIS_MODULE,
@@ -30,14 +32,11 @@ static struct cpuidle_driver tegra_idle_driver = {
},
};

-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
int __init tegra114_cpuidle_init(void)
{
int ret;
unsigned int cpu;
struct cpuidle_device *dev;
- struct cpuidle_driver *drv = &tegra_idle_driver;

ret = cpuidle_register_driver(&tegra_idle_driver);
if (ret) {
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 825ced4..c811328 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -36,6 +36,7 @@
#include "iomap.h"
#include "irq.h"
#include "flowctrl.h"
+#include "cpuidle.h"

#ifdef CONFIG_PM_SLEEP
static bool abort_flag;
@@ -67,8 +68,6 @@ static struct cpuidle_driver tegra_idle_driver = {
.en_core_tk_irqen = 1,
};

-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
#ifdef CONFIG_PM_SLEEP
#ifdef CONFIG_SMP
static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
@@ -220,7 +219,6 @@ int __init tegra20_cpuidle_init(void)
int ret;
unsigned int cpu;
struct cpuidle_device *dev;
- struct cpuidle_driver *drv = &tegra_idle_driver;

#ifdef CONFIG_PM_SLEEP
tegra_tear_down_cpu = tegra20_tear_down_cpu;
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index 8b50cf4..6187478 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -33,6 +33,7 @@

#include "pm.h"
#include "sleep.h"
+#include "cpuidle.h"

#ifdef CONFIG_PM_SLEEP
static int tegra30_idle_lp2(struct cpuidle_device *dev,
@@ -65,8 +66,6 @@ static struct cpuidle_driver tegra_idle_driver = {
},
};

-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
#ifdef CONFIG_PM_SLEEP
static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
@@ -160,7 +159,6 @@ int __init tegra30_cpuidle_init(void)
int ret;
unsigned int cpu;
struct cpuidle_device *dev;
- struct cpuidle_driver *drv = &tegra_idle_driver;

#ifdef CONFIG_PM_SLEEP
tegra_tear_down_cpu = tegra30_tear_down_cpu;
diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c
index 4b744c4..1bac560 100644
--- a/arch/arm/mach-tegra/cpuidle.c
+++ b/arch/arm/mach-tegra/cpuidle.c
@@ -27,6 +27,8 @@
#include "fuse.h"
#include "cpuidle.h"

+DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
+
static int __init tegra_cpuidle_init(void)
{
int ret;
diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h
index d733f75..a4c5f17 100644
--- a/arch/arm/mach-tegra/cpuidle.h
+++ b/arch/arm/mach-tegra/cpuidle.h
@@ -17,6 +17,10 @@
#ifndef __MACH_TEGRA_CPUIDLE_H
#define __MACH_TEGRA_CPUIDLE_H

+#include <linux/cpuidle.h>
+
+DECLARE_PER_CPU(struct cpuidle_device, tegra_idle_device);
+
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
int tegra20_cpuidle_init(void);
#else
--
1.8.1.2

2013-04-23 16:31:52

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 05/21] ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7

CONFIG_ARCH_OMAP2PLUS depends on (ARCH_MULTI_V6 || ARCH_MULTI_V7) as of
a0694861 "ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support", but the
individual OMAP2/3/4/5 and AM33XX platforms can all be selected independent
of what we are building for, which is a bug and prevents us from easily
building e.g. an ARMv7-only defconfig.

This makes ARCH_OMAP2 depend on ARCH_MULTI_V6 and the others depend on
ARCH_MULTI_V7, to ensure we really only build the platforms for the
CPUs we have enabled in the global multiplatform configuration step.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Ezequiel Garcia <[email protected]>
Cc: Tony Lindgren <[email protected]>
---
arch/arm/mach-omap2/Kconfig | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8111cd9..552341d 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -55,6 +55,7 @@ config SOC_HAS_REALTIME_COUNTER
config ARCH_OMAP2
bool "TI OMAP2"
depends on ARCH_OMAP2PLUS
+ depends on ARCH_MULTI_V6
default y
select CPU_V6
select MULTI_IRQ_HANDLER
@@ -64,6 +65,7 @@ config ARCH_OMAP2
config ARCH_OMAP3
bool "TI OMAP3"
depends on ARCH_OMAP2PLUS
+ depends on ARCH_MULTI_V7
default y
select ARCH_HAS_OPP
select ARM_CPU_SUSPEND if PM
@@ -80,6 +82,7 @@ config ARCH_OMAP4
bool "TI OMAP4"
default y
depends on ARCH_OMAP2PLUS
+ depends on ARCH_MULTI_V7
select ARCH_HAS_OPP
select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
select ARM_CPU_SUSPEND if PM
@@ -99,6 +102,7 @@ config ARCH_OMAP4

config SOC_OMAP5
bool "TI OMAP5"
+ depends on ARCH_MULTI_V7
select ARM_CPU_SUSPEND if PM
select ARM_GIC
select CPU_V7
@@ -135,6 +139,7 @@ config SOC_TI81XX

config SOC_AM33XX
bool "AM33XX support"
+ depends on ARCH_MULTI_V7
default y
select ARM_CPU_SUSPEND if PM
select CPU_V7
--
1.8.1.2

2013-04-23 16:38:15

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 11/21] drm/tilcdc: use only a single module device table

The tilcdc driver fails to be built as a module because of extraneous
MODULE_DEVICE_TABLE entries:

drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of `__mod_of_device_table'
drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of `__mod_of_device_table'
drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of `__mod_of_device_table'
drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here

Since the entire point of these entries is to make the module autoload
when one of the devices is present, it's enough to keep the one entry
for "ti,am33xx-tilcdc", which should always be there if any of the
others are.

Cc: Rob Clark <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: [email protected]
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 -
drivers/gpu/drm/tilcdc/tilcdc_slave.c | 1 -
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 -
3 files changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 580b74e..eb99f42 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -413,7 +413,6 @@ static struct of_device_id panel_of_match[] = {
{ .compatible = "ti,tilcdc,panel", },
{ },
};
-MODULE_DEVICE_TABLE(of, panel_of_match);

struct platform_driver panel_driver = {
.probe = panel_probe,
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
index 568dc1c..db1d2fc 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
@@ -353,7 +353,6 @@ static struct of_device_id slave_of_match[] = {
{ .compatible = "ti,tilcdc,slave", },
{ },
};
-MODULE_DEVICE_TABLE(of, slave_of_match);

struct platform_driver slave_driver = {
.probe = slave_probe,
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
index 58d487b..a36788f 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
@@ -396,7 +396,6 @@ static struct of_device_id tfp410_of_match[] = {
{ .compatible = "ti,tilcdc,tfp410", },
{ },
};
-MODULE_DEVICE_TABLE(of, tfp410_of_match);

struct platform_driver tfp410_driver = {
.probe = tfp410_probe,
--
1.8.1.2

2013-04-23 16:42:25

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH 18/21] usb: phy: tegra: don't call into tegra-ehci directly

On Tue, 23 Apr 2013, Arnd Bergmann wrote:

> Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one,
> which does not work if one of them or both are loadable modules, resulting
> in an error like:
>
> drivers/built-in.o: In function `utmi_phy_clk_disable':
> drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd'
> drivers/built-in.o: In function `utmi_phy_clk_enable':
> drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd'
> drivers/built-in.o: In function `utmi_phy_power_on':
> drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'
>
> This turns the interface into a one-way dependency by letting the tegra ehci
> driver pass two function pointers for callbacks that need to be called by
> the phy driver.

> @@ -733,7 +731,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
>
> tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
> pdata->phy_config,
> - TEGRA_USB_PHY_MODE_HOST);
> + TEGRA_USB_PHY_MODE_HOST,
> + &tegra_ehci_set_pts,
> + tegra_ehci_set_phcd);

Does the compiler warn about the unnecessary '&'? In any case, it
looks strange to have one function pointer with an '&' and another
without.

Aside from that minor detail, the ehci-tegra.c changes are fine.

Alan Stern

2013-04-23 16:46:23

by Chris Ball

[permalink] [raw]
Subject: Re: [PATCH 12/21] mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

Hi Arnd,

On Tue, Apr 23 2013, Arnd Bergmann wrote:
> The symbol referenced in MODULE_DEVICE_TABLE must match the actual
> table, otherwise we get a build error like
>
> sdhci-tegra.c:206:34: error: '__mod_of_device_table' aliased to undefined symbol 'sdhci_dt_ids'
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Stephen Warren <[email protected]>
> Cc: Chris Ball <[email protected]>
> ---
> drivers/mmc/host/sdhci-tegra.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index 08b06e9..85052bf 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -214,7 +214,7 @@ static const struct of_device_id sdhci_tegra_dt_match[] = {
> #endif
> {}
> };
> -MODULE_DEVICE_TABLE(of, sdhci_dt_ids);
> +MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match);
>
> static void sdhci_tegra_parse_dt(struct device *dev,
> struct sdhci_tegra *tegra_host)

I was going to take this, but it doesn't apply to mmc-next or
linux-next, because the #endif in your first line of context isn't
present in those trees -- which tree is this based on?

Sounds like it might make more sense for you to take this; if so:
Acked-by: Chris Ball <[email protected]>

Thanks,

- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child

2013-04-23 16:54:50

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH 15/21] staging: comedi/dawboard2000: use mdelay for large delays

On Tuesday, April 23, 2013 9:31 AM, Arnd Bergmann wrote:
> Subject: [PATCH 15/21] staging: comedi/dawboard2000: use mdelay for large delays

Nit.. Typo in subject.

> On ARM, it is not legal to pass values larger than 2ms into udelay(),
> and mdelay() must be used instead, to avoid this build error:
>
> ERROR: "__bad_udelay" [drivers/staging/comedi/drivers/daqboard2000.ko]
> undefined!
>
> On a related note, any use of mdelay() or large udelay() numbers should
> be carefully reviewed, and replaced with msleep() or a different
> implementation that does not rely on delaying the work.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: H Hartley Sweeten <[email protected]>
> Cc: Ian Abbott <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>

Reviewed-by: H Hartley Sweeten <[email protected]>

Thanks,
Hartley

2013-04-23 16:56:16

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

On 04/23/2013 06:30 PM, Arnd Bergmann wrote:
> The three tegra variants (20, 30, 114) each define their own per-cpu
> variable for tegra_idle_device, which causes link errors when you
> build the kernel for more than one of them:
>
> cpuidle-tegra30.o:(.discard+0x0): multiple definition of `__pcpu_unique_tegra_idle_device'
> cpuidle-tegra20.o:(.discard+0x0): first defined here
> cpuidle-tegra114.o:(.discard+0x0): multiple definition of `__pcpu_unique_tegra_idle_device'
> cpuidle-tegra20.o:(.discard+0x0): first defined here
>
> By moving the variable into the common cpuidle.c file, we save a little
> bit of object code size and avoid that warning.
> As a bonus, this patch also removes the unused "drv" variables in each
> of the three files that caused a warning since 0697598db "ARM: tegra:
> cpuidle: remove useless initialization".
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Stephen Warren <[email protected]>
> Cc: Joseph Lo <[email protected]>
> Cc: Daniel Lezcano <[email protected]>
> Cc: Rafael J. Wysocki <[email protected]>
> ---

Hi Arnd,

the patch sounds good but I think the side effect of the consolidation
patchset [1] fixed that.

You can find these fixes in Rafael's tree:

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=4c637b2175a0dc65d533494225525c6c82d73293

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=e158f9da6974cc11bfab2246a9b10021af0e0d8a

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=c5106c9dea9a6022ab84c6cb1d4a0b19fc5af0e2

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=f040c26ffaa5e56f2bca427c719c9601a02e70e5

[1] http://www.spinics.net/lists/arm-kernel/msg239811.html

> arch/arm/mach-tegra/cpuidle-tegra114.c | 5 ++---
> arch/arm/mach-tegra/cpuidle-tegra20.c | 4 +---
> arch/arm/mach-tegra/cpuidle-tegra30.c | 4 +---
> arch/arm/mach-tegra/cpuidle.c | 2 ++
> arch/arm/mach-tegra/cpuidle.h | 4 ++++
> 5 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
> index 0f4e8c4..09067a1 100644
> --- a/arch/arm/mach-tegra/cpuidle-tegra114.c
> +++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
> @@ -20,6 +20,8 @@
>
> #include <asm/cpuidle.h>
>
> +#include "cpuidle.h"
> +
> static struct cpuidle_driver tegra_idle_driver = {
> .name = "tegra_idle",
> .owner = THIS_MODULE,
> @@ -30,14 +32,11 @@ static struct cpuidle_driver tegra_idle_driver = {
> },
> };
>
> -static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
> -
> int __init tegra114_cpuidle_init(void)
> {
> int ret;
> unsigned int cpu;
> struct cpuidle_device *dev;
> - struct cpuidle_driver *drv = &tegra_idle_driver;
>
> ret = cpuidle_register_driver(&tegra_idle_driver);
> if (ret) {
> diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
> index 825ced4..c811328 100644
> --- a/arch/arm/mach-tegra/cpuidle-tegra20.c
> +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
> @@ -36,6 +36,7 @@
> #include "iomap.h"
> #include "irq.h"
> #include "flowctrl.h"
> +#include "cpuidle.h"
>
> #ifdef CONFIG_PM_SLEEP
> static bool abort_flag;
> @@ -67,8 +68,6 @@ static struct cpuidle_driver tegra_idle_driver = {
> .en_core_tk_irqen = 1,
> };
>
> -static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
> -
> #ifdef CONFIG_PM_SLEEP
> #ifdef CONFIG_SMP
> static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
> @@ -220,7 +219,6 @@ int __init tegra20_cpuidle_init(void)
> int ret;
> unsigned int cpu;
> struct cpuidle_device *dev;
> - struct cpuidle_driver *drv = &tegra_idle_driver;
>
> #ifdef CONFIG_PM_SLEEP
> tegra_tear_down_cpu = tegra20_tear_down_cpu;
> diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
> index 8b50cf4..6187478 100644
> --- a/arch/arm/mach-tegra/cpuidle-tegra30.c
> +++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
> @@ -33,6 +33,7 @@
>
> #include "pm.h"
> #include "sleep.h"
> +#include "cpuidle.h"
>
> #ifdef CONFIG_PM_SLEEP
> static int tegra30_idle_lp2(struct cpuidle_device *dev,
> @@ -65,8 +66,6 @@ static struct cpuidle_driver tegra_idle_driver = {
> },
> };
>
> -static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
> -
> #ifdef CONFIG_PM_SLEEP
> static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
> struct cpuidle_driver *drv,
> @@ -160,7 +159,6 @@ int __init tegra30_cpuidle_init(void)
> int ret;
> unsigned int cpu;
> struct cpuidle_device *dev;
> - struct cpuidle_driver *drv = &tegra_idle_driver;
>
> #ifdef CONFIG_PM_SLEEP
> tegra_tear_down_cpu = tegra30_tear_down_cpu;
> diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c
> index 4b744c4..1bac560 100644
> --- a/arch/arm/mach-tegra/cpuidle.c
> +++ b/arch/arm/mach-tegra/cpuidle.c
> @@ -27,6 +27,8 @@
> #include "fuse.h"
> #include "cpuidle.h"
>
> +DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
> +
> static int __init tegra_cpuidle_init(void)
> {
> int ret;
> diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h
> index d733f75..a4c5f17 100644
> --- a/arch/arm/mach-tegra/cpuidle.h
> +++ b/arch/arm/mach-tegra/cpuidle.h
> @@ -17,6 +17,10 @@
> #ifndef __MACH_TEGRA_CPUIDLE_H
> #define __MACH_TEGRA_CPUIDLE_H
>
> +#include <linux/cpuidle.h>
> +
> +DECLARE_PER_CPU(struct cpuidle_device, tegra_idle_device);
> +
> #ifdef CONFIG_ARCH_TEGRA_2x_SOC
> int tegra20_cpuidle_init(void);
> #else
>


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

2013-04-23 17:17:07

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 18/21] usb: phy: tegra: don't call into tegra-ehci directly

On Tue, Apr 23, 2013 at 06:30:50PM +0200, Arnd Bergmann wrote:
> Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one,
> which does not work if one of them or both are loadable modules, resulting
> in an error like:
>
> drivers/built-in.o: In function `utmi_phy_clk_disable':
> drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd'
> drivers/built-in.o: In function `utmi_phy_clk_enable':
> drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd'
> drivers/built-in.o: In function `utmi_phy_power_on':
> drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'
>
> This turns the interface into a one-way dependency by letting the tegra ehci
> driver pass two function pointers for callbacks that need to be called by
> the phy driver.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Venu Byravarasu <[email protected]>
> Cc: Alan Stern <[email protected]>
> Cc: Felipe Balbi <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Stephen Warren <[email protected]>
> Cc: [email protected]
> ---
> drivers/usb/host/ehci-tegra.c | 10 +++++-----
> drivers/usb/phy/tegra_usb_phy.c | 13 +++++++++----
> include/linux/usb/tegra_usb_phy.h | 10 +++++-----
> 3 files changed, 19 insertions(+), 14 deletions(-)

Not all of these files are in my usb-next tree, so I can't take this
patch, sorry.

greg k-h

2013-04-23 17:17:38

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 19/21] usb: phy: don't mark usb_bind_phy as __init

On Tue, Apr 23, 2013 at 06:30:51PM +0200, Arnd Bergmann wrote:
> It makes no sense for a symbol to be both exported and marked __init,
> because any users in modules would be calling this function after
> it gets discarded. Further, this patch revolves a section mismatch
> warning from usbhs_init_phys(), which is intentionally not marked
> __init:
>
> WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from
> the function usbhs_init_phys() to the function .init.text:usb_bind_phy()
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Alan Stern <[email protected]>
> Cc: Felipe Balbi <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> ---
> drivers/usb/otg/otg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

What tree has this file? It's not mine :(

2013-04-23 17:29:12

by Christoffer Dall

[permalink] [raw]
Subject: Re: [PATCH 04/21] ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

On Tue, Apr 23, 2013 at 9:30 AM, Arnd Bergmann <[email protected]> wrote:
> The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the
> kernel/context_tracking.c code, which includes the vgic data structures
> implictly through the kvm headers. Definining the symbol to zero
> on builds without KVM resolves this build error:
>
> In file included from include/linux/kvm_host.h:33:0,
> from kernel/context_tracking.c:18:
> arch/arm/include/asm/kvm_host.h:28:23: warning: "CONFIG_KVM_ARM_MAX_VCPUS" is not defined [-Wundef]
> #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
> ^
> arch/arm/include/asm/kvm_vgic.h:34:24: note: in expansion of macro 'KVM_MAX_VCPUS'
> #define VGIC_MAX_CPUS KVM_MAX_VCPUS
> ^
> arch/arm/include/asm/kvm_vgic.h:38:6: note: in expansion of macro 'VGIC_MAX_CPUS'
> #if (VGIC_MAX_CPUS > 8)
> ^
> In file included from arch/arm/include/asm/kvm_host.h:41:0,
> from include/linux/kvm_host.h:33,
> from kernel/context_tracking.c:18:
> arch/arm/include/asm/kvm_vgic.h:59:11: error: 'CONFIG_KVM_ARM_MAX_VCPUS' undeclared here (not in a function)
> } percpu[VGIC_MAX_CPUS];
> ^
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Marc Zyngier <[email protected]>
> Cc: Christoffer Dall <[email protected]>
> Cc: Will Deacon <[email protected]>
> ---
> arch/arm/kvm/Kconfig | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
> index 49dd64e..370e1a8 100644
> --- a/arch/arm/kvm/Kconfig
> +++ b/arch/arm/kvm/Kconfig
> @@ -41,9 +41,9 @@ config KVM_ARM_HOST
> Provides host support for ARM processors.
>
> config KVM_ARM_MAX_VCPUS
> - int "Number maximum supported virtual CPUs per VM"
> - depends on KVM_ARM_HOST
> - default 4
> + int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST
> + default 4 if KVM_ARM_HOST
> + default 0
> help
> Static number of max supported virtual CPUs per VM.
>
> --
> 1.8.1.2
>

Acked-by: Christoffer Dall <[email protected]>

2013-04-23 17:32:33

by Christoffer Dall

[permalink] [raw]
Subject: Re: [PATCH 04/21] ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

On Tue, Apr 23, 2013 at 10:29 AM, Christoffer Dall
<[email protected]> wrote:
> On Tue, Apr 23, 2013 at 9:30 AM, Arnd Bergmann <[email protected]> wrote:
>> The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the
>> kernel/context_tracking.c code, which includes the vgic data structures
>> implictly through the kvm headers. Definining the symbol to zero
>> on builds without KVM resolves this build error:
>>
>> In file included from include/linux/kvm_host.h:33:0,
>> from kernel/context_tracking.c:18:
>> arch/arm/include/asm/kvm_host.h:28:23: warning: "CONFIG_KVM_ARM_MAX_VCPUS" is not defined [-Wundef]
>> #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
>> ^
>> arch/arm/include/asm/kvm_vgic.h:34:24: note: in expansion of macro 'KVM_MAX_VCPUS'
>> #define VGIC_MAX_CPUS KVM_MAX_VCPUS
>> ^
>> arch/arm/include/asm/kvm_vgic.h:38:6: note: in expansion of macro 'VGIC_MAX_CPUS'
>> #if (VGIC_MAX_CPUS > 8)
>> ^
>> In file included from arch/arm/include/asm/kvm_host.h:41:0,
>> from include/linux/kvm_host.h:33,
>> from kernel/context_tracking.c:18:
>> arch/arm/include/asm/kvm_vgic.h:59:11: error: 'CONFIG_KVM_ARM_MAX_VCPUS' undeclared here (not in a function)
>> } percpu[VGIC_MAX_CPUS];
>> ^
>>
>> Signed-off-by: Arnd Bergmann <[email protected]>
>> Cc: Marc Zyngier <[email protected]>
>> Cc: Christoffer Dall <[email protected]>
>> Cc: Will Deacon <[email protected]>
>> ---
>> arch/arm/kvm/Kconfig | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
>> index 49dd64e..370e1a8 100644
>> --- a/arch/arm/kvm/Kconfig
>> +++ b/arch/arm/kvm/Kconfig
>> @@ -41,9 +41,9 @@ config KVM_ARM_HOST
>> Provides host support for ARM processors.
>>
>> config KVM_ARM_MAX_VCPUS
>> - int "Number maximum supported virtual CPUs per VM"
>> - depends on KVM_ARM_HOST
>> - default 4
>> + int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST
>> + default 4 if KVM_ARM_HOST
>> + default 0
>> help
>> Static number of max supported virtual CPUs per VM.
>>
>> --
>> 1.8.1.2
>>
>
> Acked-by: Christoffer Dall <[email protected]>

actually let me just pull that into my tree. thanks.

2013-04-23 18:01:53

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 05/21] ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7

* Arnd Bergmann <[email protected]> [130423 09:36]:
> CONFIG_ARCH_OMAP2PLUS depends on (ARCH_MULTI_V6 || ARCH_MULTI_V7) as of
> a0694861 "ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support", but the
> individual OMAP2/3/4/5 and AM33XX platforms can all be selected independent
> of what we are building for, which is a bug and prevents us from easily
> building e.g. an ARMv7-only defconfig.
>
> This makes ARCH_OMAP2 depend on ARCH_MULTI_V6 and the others depend on
> ARCH_MULTI_V7, to ensure we really only build the platforms for the
> CPUs we have enabled in the global multiplatform configuration step.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Ezequiel Garcia <[email protected]>

Acked-by: Tony Lindgren <[email protected]>

2013-04-23 18:03:26

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 21/21] mtd: omap2: allow bulding as a module

* Arnd Bergmann <[email protected]> [130423 09:37]:
> The omap2 nand device driver calls into the the elm code, which can
> be a loadable module, and in that case it cannot be built-in itself.
> I can see no reason why the omap2 driver cannot also be a module,
> so let's make the option "tristate" in Kconfig to fix this allmodconfig
> build error:
>
> ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined!
> ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko] undefined!
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: David Woodhouse <[email protected]>
> Cc: Artem Bityutskiy <[email protected]>
> Cc: Tony Lindgren <[email protected]>
> Cc: Afzal Mohammed <[email protected]>
> Cc: Russell King <[email protected]>
> Cc: [email protected]
> ---
> drivers/mtd/nand/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 81bf5e5..106b55e 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -109,7 +109,7 @@ config MTD_NAND_OMAP2
>
> config MTD_NAND_OMAP_BCH
> depends on MTD_NAND && MTD_NAND_OMAP2 && ARCH_OMAP3
> - bool "Enable support for hardware BCH error correction"
> + tristate "Enable support for hardware BCH error correction"
> default n
> select BCH
> select BCH_CONST_PARAMS

Acked-by: Tony Lindgren <[email protected]>

While at it, you could also drop the "default n" as that's
the default anyways.

Regards,

Tony

2013-04-23 18:25:35

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 08/21] ASoC: ux500: forward declare msp_i2s_platform_data

On Tue, Apr 23, 2013 at 06:30:40PM +0200, Arnd Bergmann wrote:
> We get a lot of build warnings from the msp driver like:

Applied, thanks.


Attachments:
(No filename) (140.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-04-23 18:27:29

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 09/21] spi/sirf: fix MODULE_DEVICE_TABLE

On Tue, Apr 23, 2013 at 06:30:41PM +0200, Arnd Bergmann wrote:
> This fixes building the spi-sirf driver as a loadable module, which uses
> an incorrect MODULE_DEVICE_TABLE, by changing the reference to the
> correct symbol.

Applied, thanks.


Attachments:
(No filename) (243.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-04-23 18:55:43

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 12/21] mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

The symbol referenced in MODULE_DEVICE_TABLE must match the actual
table, otherwise we get a build error like

sdhci-tegra.c:206:34: error: '__mod_of_device_table' aliased to undefined symbol 'sdhci_dt_ids'

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Chris Ball <[email protected]>
---
On Tuesday 23 April 2013, Chris Ball wrote:

> I was going to take this, but it doesn't apply to mmc-next or
> linux-next, because the #endif in your first line of context isn't
> present in those trees -- which tree is this based on?

I based it on 3.9-rc8.

> Sounds like it might make more sense for you to take this; if so:
> Acked-by: Chris Ball <[email protected]>

This is the rebased version on linux-next. I think it's better if you
take it, otherwise we just create a merge conflict for Linus.

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 45048d1..e0dba74 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -203,7 +203,7 @@ static const struct of_device_id sdhci_tegra_dt_match[] = {
{ .compatible = "nvidia,tegra20-sdhci", .data = &soc_data_tegra20 },
{}
};
-MODULE_DEVICE_TABLE(of, sdhci_dt_ids);
+MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match);

static void sdhci_tegra_parse_dt(struct device *dev)
{

2013-04-23 19:02:55

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 18/21] usb: phy: tegra: don't call into tegra-ehci directly

On Tuesday 23 April 2013, Alan Stern wrote:
> On Tue, 23 Apr 2013, Arnd Bergmann wrote:

> > @@ -733,7 +731,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
> >
> > tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
> > pdata->phy_config,
> > - TEGRA_USB_PHY_MODE_HOST);
> > + TEGRA_USB_PHY_MODE_HOST,
> > + &tegra_ehci_set_pts,
> > + tegra_ehci_set_phcd);
>
> Does the compiler warn about the unnecessary '&'?

No, AFAIK, both variants are equally acceptable C.

> In any case, it
> looks strange to have one function pointer with an '&' and another
> without.

Yes, that was certainly not intentional. I've removed the '&' now.

> Aside from that minor detail, the ehci-tegra.c changes are fine.

Ok, thanks for the feedback.

Arnd

2013-04-23 19:06:01

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH v2] usb: phy: tegra: don't call into tegra-ehci directly

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one,
which does not work if one of them or both are loadable modules, resulting
in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci
driver pass two function pointers for callbacks that need to be called by
the phy driver.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Venu Byravarasu <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: [email protected]

---
On Tuesday 23 April 2013, Greg Kroah-Hartman wrote:

> > drivers/usb/host/ehci-tegra.c | 10 +++++-----
> > drivers/usb/phy/tegra_usb_phy.c | 13 +++++++++----
> > include/linux/usb/tegra_usb_phy.h | 10 +++++-----
> > 3 files changed, 19 insertions(+), 14 deletions(-)
>
> Not all of these files are in my usb-next tree, so I can't take this
> patch, sorry.

Right. I created the patch again linux-next but then rebased the series
to 3.9-rc8 for submission. I had not realized that the files got renamed
between the trees.

Arnd

drivers/usb/host/ehci-tegra.c | 10 +++++-----
drivers/usb/phy/phy-tegra-usb.c | 13 +++++++++----
include/linux/usb/tegra_usb_phy.h | 10 +++++-----
3 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index ed201ae..e3eddc3 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -611,7 +611,7 @@ static const struct dev_pm_ops tegra_ehci_pm_ops = {
/* Bits of PORTSC1, which will get cleared by writing 1 into them */
#define TEGRA_PORTSC1_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)

-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
+static void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
{
unsigned long val;
struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -622,9 +622,8 @@ void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
val |= TEGRA_USB_PORTSC1_PTS(pts_val & 3);
writel(val, base + TEGRA_USB_PORTSC1);
}
-EXPORT_SYMBOL_GPL(tegra_ehci_set_pts);

-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
+static void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
{
unsigned long val;
struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -637,7 +636,6 @@ void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
val &= ~TEGRA_USB_PORTSC1_PHCD;
writel(val, base + TEGRA_USB_PORTSC1);
}
-EXPORT_SYMBOL_GPL(tegra_ehci_set_phcd);

static u64 tegra_ehci_dma_mask = DMA_BIT_MASK(32);

@@ -738,7 +736,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)

tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
pdata->phy_config,
- TEGRA_USB_PHY_MODE_HOST);
+ TEGRA_USB_PHY_MODE_HOST,
+ tegra_ehci_set_pts,
+ tegra_ehci_set_phcd);
if (IS_ERR(tegra->phy)) {
dev_err(&pdev->dev, "Failed to open USB phy\n");
err = -ENXIO;
diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
index 5487d38..17d8112 100644
--- a/drivers/usb/phy/phy-tegra-usb.c
+++ b/drivers/usb/phy/phy-tegra-usb.c
@@ -299,7 +299,7 @@ static void utmi_phy_clk_disable(struct tegra_usb_phy *phy)
val &= ~USB_SUSP_SET;
writel(val, base + USB_SUSP_CTRL);
} else
- tegra_ehci_set_phcd(&phy->u_phy, true);
+ phy->set_phcd(&phy->u_phy, true);

if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID, 0) < 0)
pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
@@ -321,7 +321,7 @@ static void utmi_phy_clk_enable(struct tegra_usb_phy *phy)
val &= ~USB_SUSP_CLR;
writel(val, base + USB_SUSP_CTRL);
} else
- tegra_ehci_set_phcd(&phy->u_phy, false);
+ phy->set_phcd(&phy->u_phy, false);

if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
USB_PHY_CLK_VALID))
@@ -444,7 +444,7 @@ static int utmi_phy_power_on(struct tegra_usb_phy *phy)
utmi_phy_clk_enable(phy);

if (!phy->is_legacy_phy)
- tegra_ehci_set_pts(&phy->u_phy, 0);
+ phy->set_pts(&phy->u_phy, 0);

return 0;
}
@@ -688,7 +688,10 @@ static int tegra_usb_phy_suspend(struct usb_phy *x, int suspend)
}

struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
- void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode)
+ void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+ void (*set_pts)(struct usb_phy *x, u8 pts_val),
+ void (*set_phcd)(struct usb_phy *x, bool enable))
+
{
struct tegra_usb_phy *phy;
unsigned long parent_rate;
@@ -707,6 +710,8 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
phy->dev = dev;
phy->is_legacy_phy =
of_property_read_bool(np, "nvidia,has-legacy-mode");
+ phy->set_pts = set_pts;
+ phy->set_phcd = set_phcd;
err = of_property_match_string(np, "phy_type", "ulpi");
if (err < 0)
phy->is_ulpi_phy = false;
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index 9ebebe9..1b7519a 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -61,10 +61,14 @@ struct tegra_usb_phy {
struct device *dev;
bool is_legacy_phy;
bool is_ulpi_phy;
+ void (*set_pts)(struct usb_phy *x, u8 pts_val);
+ void (*set_phcd)(struct usb_phy *x, bool enable);
};

struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
- void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode);
+ void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+ void (*set_pts)(struct usb_phy *x, u8 pts_val),
+ void (*set_phcd)(struct usb_phy *x, bool enable));

void tegra_usb_phy_preresume(struct usb_phy *phy);

@@ -75,8 +79,4 @@ void tegra_ehci_phy_restore_start(struct usb_phy *phy,

void tegra_ehci_phy_restore_end(struct usb_phy *phy);

-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val);
-
-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable);
-
#endif /* __TEGRA_USB_PHY_H */

2013-04-23 19:07:27

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH v2] usb: phy: don't mark usb_bind_phy as __init

It makes no sense for a symbol to be both exported and marked __init,
because any users in modules would be calling this function after
it gets discarded. Further, this patch revolves a section mismatch
warning from usbhs_init_phys(), which is intentionally not marked
__init:

WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from
the function usbhs_init_phys() to the function .init.text:usb_bind_phy()

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---

v2: rebased on linux-next

diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index f52c006..a9984c7 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -413,7 +413,7 @@ EXPORT_SYMBOL_GPL(usb_remove_phy);
*
* To be used by platform specific initialization code.
*/
-int __init usb_bind_phy(const char *dev_name, u8 index,
+int usb_bind_phy(const char *dev_name, u8 index,
const char *phy_dev_name)
{
struct usb_phy_bind *phy_bind;

2013-04-23 19:07:42

by Chris Ball

[permalink] [raw]
Subject: Re: [PATCH 12/21] mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

Hi,

On Tue, Apr 23 2013, Arnd Bergmann wrote:
>> I was going to take this, but it doesn't apply to mmc-next or
>> linux-next, because the #endif in your first line of context isn't
>> present in those trees -- which tree is this based on?
>
> I based it on 3.9-rc8.

Thanks, I should have thought of that; applied to mmc-next for 3.10.

- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child

2013-04-23 19:21:17

by Marc Dietrich

[permalink] [raw]
Subject: Re: [PATCH 14/21] staging: nvec: allow modular build

Arnd,

On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> The serio code can be a loadable module, which in turn means that nvec
> also has to be a module, so mark it as "tristate" in Kconfig.

oh, I didn't saw this randconfig error posting. NVEC isn't prepared for
modularized builds yet (it's on the TODO list though). So better say SERIO=y
here. Looking a bit closer, there is other stuff which can also be a module
(GPIOLIB, I2C, ...) so these also need a =y.

Should a post a patch?

Marc

> drivers/built-in.o: In function `nvec_mouse_remove':
> drivers/staging/nvec/nvec_ps2.c:136: undefined reference to
> `serio_unregister_port' drivers/built-in.o: In function `nvec_mouse_probe':
> drivers/staging/nvec/nvec_ps2.c:126: undefined reference to
> `__serio_register_port' drivers/built-in.o: In function
> `nvec_ps2_notifier':
> drivers/staging/nvec/nvec_ps2.c:84: undefined reference to `serio_interrupt'
> drivers/staging/nvec/nvec_ps2.c:91: undefined reference to
> `serio_interrupt'
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Marc Dietrich <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> ---
> drivers/staging/nvec/Kconfig | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/nvec/Kconfig b/drivers/staging/nvec/Kconfig
> index f779fdc..7e61ada 100644
> --- a/drivers/staging/nvec/Kconfig
> +++ b/drivers/staging/nvec/Kconfig
> @@ -1,5 +1,5 @@
> config MFD_NVEC
> - bool "NV Tegra Embedded Controller SMBus Interface"
> + tristate "NV Tegra Embedded Controller SMBus Interface"
> depends on I2C && GPIOLIB && ARCH_TEGRA
> select MFD_CORE
> help
> @@ -7,28 +7,28 @@ config MFD_NVEC
> controller.
>
> config KEYBOARD_NVEC
> - bool "Keyboard on nVidia compliant EC"
> + tristate "Keyboard on nVidia compliant EC"
> depends on MFD_NVEC && INPUT
> help
> Say Y here to enable support for a keyboard connected to
> a nVidia compliant embedded controller.
>
> config SERIO_NVEC_PS2
> - bool "PS2 on nVidia EC"
> + tristate "PS2 on nVidia EC"
> depends on MFD_NVEC && SERIO
> help
> Say Y here to enable support for a Touchpad / Mouse connected
> to a nVidia compliant embedded controller.
>
> config NVEC_POWER
> - bool "NVEC charger and battery"
> + tristate "NVEC charger and battery"
> depends on MFD_NVEC && POWER_SUPPLY
> help
> Say Y to enable support for battery and charger interface for
> nVidia compliant embedded controllers.
>
> config NVEC_PAZ00
> - bool "Support for OEM specific functions on Compal PAZ00 based devices"
> + tristate "Support for OEM specific functions on Compal PAZ00 based
> devices" depends on MFD_NVEC && LEDS_CLASS
> help
> Say Y to enable control of the yellow side leds on Compal PAZ00 based

2013-04-23 19:31:21

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 05/21] ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7

On Tuesday 23 April 2013, Tony Lindgren wrote:
> * Arnd Bergmann <[email protected]> [130423 09:36]:
> > CONFIG_ARCH_OMAP2PLUS depends on (ARCH_MULTI_V6 || ARCH_MULTI_V7) as of
> > a0694861 "ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support", but the
> > individual OMAP2/3/4/5 and AM33XX platforms can all be selected independent
> > of what we are building for, which is a bug and prevents us from easily
> > building e.g. an ARMv7-only defconfig.
> >
> > This makes ARCH_OMAP2 depend on ARCH_MULTI_V6 and the others depend on
> > ARCH_MULTI_V7, to ensure we really only build the platforms for the
> > CPUs we have enabled in the global multiplatform configuration step.
> >
> > Signed-off-by: Arnd Bergmann <[email protected]>
> > Cc: Ezequiel Garcia <[email protected]>
>
> Acked-by: Tony Lindgren <[email protected]>
>
Thanks, I've now applied it to the next/fixes-non-critical branch.

Arnd

2013-04-23 19:31:26

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2] usb: phy: don't mark usb_bind_phy as __init

On Tue, Apr 23, 2013 at 09:07:21PM +0200, Arnd Bergmann wrote:
> It makes no sense for a symbol to be both exported and marked __init,
> because any users in modules would be calling this function after
> it gets discarded. Further, this patch revolves a section mismatch
> warning from usbhs_init_phys(), which is intentionally not marked
> __init:
>
> WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from
> the function usbhs_init_phys() to the function .init.text:usb_bind_phy()
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Alan Stern <[email protected]>
> Cc: Felipe Balbi <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> ---
>
> v2: rebased on linux-next

not needed, Greg already has a patch doing exactly this in usb-next.

--
balbi


Attachments:
(No filename) (833.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-04-23 19:41:09

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 14/21] staging: nvec: allow modular build

On Tuesday 23 April 2013, Marc Dietrich wrote:
> On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> > The serio code can be a loadable module, which in turn means that nvec
> > also has to be a module, so mark it as "tristate" in Kconfig.
>
> oh, I didn't saw this randconfig error posting. NVEC isn't prepared for
> modularized builds yet (it's on the TODO list though). So better say SERIO=y
> here. Looking a bit closer, there is other stuff which can also be a module
> (GPIOLIB, I2C, ...) so these also need a =y.

What is the problem with building it as a module? It looks all fine in that
regard.

I also did not see any problems with the other symbols, but that may be
because they get turned on as built-in even in allmodconfig. Marking it
as tristate certainly avoids the problem altogether.

> Should a post a patch?

If you have follow-on patches, they need to go on top now, since Greg
already took this patch.

Arnd

2013-04-23 19:47:00

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH v2] usb: phy: don't mark usb_bind_phy as __init

On Tuesday 23 April 2013, Felipe Balbi wrote:
> On Tue, Apr 23, 2013 at 09:07:21PM +0200, Arnd Bergmann wrote:
> > It makes no sense for a symbol to be both exported and marked __init,
> > because any users in modules would be calling this function after
> > it gets discarded. Further, this patch revolves a section mismatch
> > warning from usbhs_init_phys(), which is intentionally not marked
> > __init:
> >
> > WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from
> > the function usbhs_init_phys() to the function .init.text:usb_bind_phy()
> >
> > Signed-off-by: Arnd Bergmann <[email protected]>
> > Cc: Alan Stern <[email protected]>
> > Cc: Felipe Balbi <[email protected]>
> > Cc: Greg Kroah-Hartman <[email protected]>
> > Cc: [email protected]
> > ---
> >
> > v2: rebased on linux-next
>
> not needed, Greg already has a patch doing exactly this in usb-next.

Right, I see it now. I had checked today's linux-next but not usb-next
or any of the other trees for stuff that was just applied today.

Arnd

2013-04-23 19:55:59

by Marc Dietrich

[permalink] [raw]
Subject: Re: [PATCH 14/21] staging: nvec: allow modular build

On Tuesday 23 April 2013 21:41:03 Arnd Bergmann wrote:
> On Tuesday 23 April 2013, Marc Dietrich wrote:
> > On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> > > The serio code can be a loadable module, which in turn means that nvec
> > > also has to be a module, so mark it as "tristate" in Kconfig.
> >
> > oh, I didn't saw this randconfig error posting. NVEC isn't prepared for
> > modularized builds yet (it's on the TODO list though). So better say
> > SERIO=y here. Looking a bit closer, there is other stuff which can also
> > be a module (GPIOLIB, I2C, ...) so these also need a =y.
>
> What is the problem with building it as a module? It looks all fine in that
> regard.

It builds, but I haven't tried out it yet. At least the mfd children need to
unregister the event notifier I guess. Anyway, I have no time to test this
now, so I prefer to force =y for the dependencies for now.

> I also did not see any problems with the other symbols, but that may be
> because they get turned on as built-in even in allmodconfig. Marking it
> as tristate certainly avoids the problem altogether.
>
> > Should a post a patch?
>
> If you have follow-on patches, they need to go on top now, since Greg
> already took this patch.

arrr, I wonder why Greg thought that a 4 minute review time is enough :-(
I'll try to post a patch tomorrow then.

Marc

2013-04-23 20:05:59

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 14/21] staging: nvec: allow modular build

On Tue, Apr 23, 2013 at 09:55:48PM +0200, Marc Dietrich wrote:
> On Tuesday 23 April 2013 21:41:03 Arnd Bergmann wrote:
> > On Tuesday 23 April 2013, Marc Dietrich wrote:
> > > On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> > > > The serio code can be a loadable module, which in turn means that nvec
> > > > also has to be a module, so mark it as "tristate" in Kconfig.
> > >
> > > oh, I didn't saw this randconfig error posting. NVEC isn't prepared for
> > > modularized builds yet (it's on the TODO list though). So better say
> > > SERIO=y here. Looking a bit closer, there is other stuff which can also
> > > be a module (GPIOLIB, I2C, ...) so these also need a =y.
> >
> > What is the problem with building it as a module? It looks all fine in that
> > regard.
>
> It builds, but I haven't tried out it yet. At least the mfd children need to
> unregister the event notifier I guess. Anyway, I have no time to test this
> now, so I prefer to force =y for the dependencies for now.
>
> > I also did not see any problems with the other symbols, but that may be
> > because they get turned on as built-in even in allmodconfig. Marking it
> > as tristate certainly avoids the problem altogether.
> >
> > > Should a post a patch?
> >
> > If you have follow-on patches, they need to go on top now, since Greg
> > already took this patch.
>
> arrr, I wonder why Greg thought that a 4 minute review time is enough :-(

It was longer than 4 minutes...

I trust Arnd, and it's only a staging driver, what's the worse thing
that could happen to it? :)

> I'll try to post a patch tomorrow then.

That would be great.

thanks,

greg k-h

2013-04-23 20:14:27

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 14/21] staging: nvec: allow modular build

On Tuesday 23 April 2013, Marc Dietrich wrote:
> It builds, but I haven't tried out it yet. At least the mfd children need to
> unregister the event notifier I guess. Anyway, I have no time to test this
> now, so I prefer to force =y for the dependencies for now.

Ah, so you can load it fine, but not safely unload it? In that case I think
it's better to leave it as tristate but remove the module_exit() function to
prevent unloading.

You'll have to change the module_platform_driver() back into a manual
module_init() function to register the driver, but that sounds like
the cleanest solution aside from fixing the notifier calls.

Arnd

2013-04-23 20:21:17

by Marc Dietrich

[permalink] [raw]
Subject: Re: [PATCH 14/21] staging: nvec: allow modular build

On Tuesday 23 April 2013 22:14:18 Arnd Bergmann wrote:
> On Tuesday 23 April 2013, Marc Dietrich wrote:
> > It builds, but I haven't tried out it yet. At least the mfd children need
> > to unregister the event notifier I guess. Anyway, I have no time to test
> > this now, so I prefer to force =y for the dependencies for now.
>
> Ah, so you can load it fine, but not safely unload it? In that case I think
> it's better to leave it as tristate but remove the module_exit() function to
> prevent unloading.
>
> You'll have to change the module_platform_driver() back into a manual
> module_init() function to register the driver, but that sounds like
> the cleanest solution aside from fixing the notifier calls.

ok, I'll look into it - maybe I can also fix unloading.

Thanks!

Marc

2013-04-23 22:04:29

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

On 04/23/2013 08:57 PM, Arnd Bergmann wrote:
> On Tuesday 23 April 2013, Daniel Lezcano wrote:
>> the patch sounds good but I think the side effect of the consolidation
>> patchset [1] fixed that.
>>
>> You can find these fixes in Rafael's tree:
>>
>> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=4c637b2175a0dc65d533494225525c6c82d73293
>>
>> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=e158f9da6974cc11bfab2246a9b10021af0e0d8a
>>
>> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=c5106c9dea9a6022ab84c6cb1d4a0b19fc5af0e2
>>
>> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=f040c26ffaa5e56f2bca427c719c9601a02e70e5
>>
>> [1] http://www.spinics.net/lists/arm-kernel/msg239811.html
>>
>
> Ah. Is that not in linux-next? I created the patch today based on the latest
> linux-next from today (Tuesday).

Ah, ok. Actually the patches were taken by Rafael right today. So it is
possible the changes were not reflected in linux-next yet.


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

2013-04-24 02:55:32

by Joseph Lo

[permalink] [raw]
Subject: Re: [PATCH 06/21] ARM: tegra: call cpu_do_idle from C code

On Wed, 2013-04-24 at 00:30 +0800, Arnd Bergmann wrote:
> When building a kernel for multiple CPU architecture levels,
> cpu_do_idle() is a macro for an indirect function call, which
> cannot be called from assembly code as Tegra does.
>
> Adding a trivial C wrapper for this function lets us build
> a tegra kernel with ARMv6 support enabled.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Joseph Lo <[email protected]>
> Cc: Stephen Warren <[email protected]>
> ---

Hi Arnd,

Thanks for fixing.

Tested-by: Joseph Lo <[email protected]>

Joseph

2013-04-24 02:56:46

by Joseph Lo

[permalink] [raw]
Subject: Re: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

On Wed, 2013-04-24 at 06:04 +0800, Daniel Lezcano wrote:
> On 04/23/2013 08:57 PM, Arnd Bergmann wrote:
> > On Tuesday 23 April 2013, Daniel Lezcano wrote:
> >> the patch sounds good but I think the side effect of the consolidation
> >> patchset [1] fixed that.
> >>
> >> You can find these fixes in Rafael's tree:
> >>
> >> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=4c637b2175a0dc65d533494225525c6c82d73293
> >>
> >> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=e158f9da6974cc11bfab2246a9b10021af0e0d8a
> >>
> >> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=c5106c9dea9a6022ab84c6cb1d4a0b19fc5af0e2
> >>
> >> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=f040c26ffaa5e56f2bca427c719c9601a02e70e5
> >>
> >> [1] http://www.spinics.net/lists/arm-kernel/msg239811.html
> >>
> >
> > Ah. Is that not in linux-next? I created the patch today based on the latest
> > linux-next from today (Tuesday).
>
> Ah, ok. Actually the patches were taken by Rafael right today. So it is
> possible the changes were not reflected in linux-next yet.
>
Hi Arnd and Daniel,

Thanks for taking care this.:)

Joseph

2013-04-24 03:20:30

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 13/21] misc: mark spear13xx-pcie-gadget as broken

On Tue, Apr 23, 2013 at 10:00 PM, Arnd Bergmann <[email protected]> wrote:
> This driver was merged in 2.6.38 but never actually compiled because
> it depends on the <mach/pcie.h> header that has not made it into the
> kernel. Starting with Linux-3.10, this results in "allyesconfig"
> build errors, since spear13xx can now be enabled with the default
> "multiplatform" platform on ARM. Let's mark it as broken for now.
> If it doesn't get fixed, we can drop it completely.
>
> Cc: Pratyush Anand <[email protected]>
> Cc: Randy Dunlap <[email protected]>
> Cc: Jesse Barnes <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: Shiraz Hashim <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> drivers/misc/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Viresh Kumar <[email protected]>

@Pratyush: Please see if we can get it fixed soon.

2013-04-24 05:34:48

by Gupta, Pekon

[permalink] [raw]
Subject: RE: [PATCH 21/21] mtd: omap2: allow bulding as a module

> * Arnd Bergmann <[email protected]> [130423 09:37]:
> > The omap2 nand device driver calls into the the elm code, which can
> > be a loadable module, and in that case it cannot be built-in itself.
> > I can see no reason why the omap2 driver cannot also be a module,
> > so let's make the option "tristate" in Kconfig to fix this allmodconfig
> > build error:
> >
> > ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined!
> > ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko]
> undefined!
> >
[Pekon]:
ELM module is required in for Hardware based ECC correction for
NAND devices. And this driver has a very small foot-print.

The only cases this drives would _not_ be used are:
(a) Using S/W based ECC scheme, which have vey high CPU utilization
(b) Using single bit ECC scheme, which are becoming obsolete due to
increasing NAND densities.
For most of the cases ELM module will be used with nand-driver. So
there should be no harm in having this module as built-in, if not used
in 10% of the use-cases.

Thus I think it's better to keep this module tied to GPMC module,
rather than independent control via KConfig.
And user should just selects which ECC scheme he would like to
use via DT, without worrying about KConfig options.

I'm working in cleaning up omap2-nand driver to remove some
redundancies. So would like to know your feedback on same..


with regards, pekon

2013-04-25 17:39:34

by Rob Clark

[permalink] [raw]
Subject: Re: [PATCH 11/21] drm/tilcdc: use only a single module device table

On Tue, Apr 23, 2013 at 12:30 PM, Arnd Bergmann <[email protected]> wrote:
> The tilcdc driver fails to be built as a module because of extraneous
> MODULE_DEVICE_TABLE entries:
>
> drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of `__mod_of_device_table'
> drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
> drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of `__mod_of_device_table'
> drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
> drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of `__mod_of_device_table'
> drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
>
> Since the entire point of these entries is to make the module autoload
> when one of the devices is present, it's enough to keep the one entry
> for "ti,am33xx-tilcdc", which should always be there if any of the
> others are.

Thanks Arnd

Acked-By: Rob Clark <[email protected]>

> Cc: Rob Clark <[email protected]>
> Cc: Dave Airlie <[email protected]>
> Cc: [email protected]
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 -
> drivers/gpu/drm/tilcdc/tilcdc_slave.c | 1 -
> drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 -
> 3 files changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
> index 580b74e..eb99f42 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
> @@ -413,7 +413,6 @@ static struct of_device_id panel_of_match[] = {
> { .compatible = "ti,tilcdc,panel", },
> { },
> };
> -MODULE_DEVICE_TABLE(of, panel_of_match);
>
> struct platform_driver panel_driver = {
> .probe = panel_probe,
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
> index 568dc1c..db1d2fc 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
> @@ -353,7 +353,6 @@ static struct of_device_id slave_of_match[] = {
> { .compatible = "ti,tilcdc,slave", },
> { },
> };
> -MODULE_DEVICE_TABLE(of, slave_of_match);
>
> struct platform_driver slave_driver = {
> .probe = slave_probe,
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
> index 58d487b..a36788f 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
> @@ -396,7 +396,6 @@ static struct of_device_id tfp410_of_match[] = {
> { .compatible = "ti,tilcdc,tfp410", },
> { },
> };
> -MODULE_DEVICE_TABLE(of, tfp410_of_match);
>
> struct platform_driver tfp410_driver = {
> .probe = tfp410_probe,
> --
> 1.8.1.2
>

2013-04-26 08:14:04

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 20/21] MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly

On Tue, Apr 23, 2013 at 6:30 PM, Arnd Bergmann <[email protected]> wrote:

> Apparently the ab8500_gpadc_sw_hw_convert function got renamed
> from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in
> commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion",
> but the export for this function did not get changed at the
> same time, causing this allyesconfig error:
>
> ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!
>
> This patch fixes the export.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: M'boumba Cedric Madianga <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: Mattias WALLIN <[email protected]>
> Cc: Michel JAOUEN <[email protected]>
> Cc: Samuel Ortiz <[email protected]>

Acked-by: Linus Walleij <[email protected]>

Sam -> please pick this...

Yours,
Linus Walleij

2013-04-26 09:24:38

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH 20/21] MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly

Hi Arnd,

On Tue, Apr 23, 2013 at 06:30:52PM +0200, Arnd Bergmann wrote:
> Apparently the ab8500_gpadc_sw_hw_convert function got renamed
> from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in
> commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion",
> but the export for this function did not get changed at the
> same time, causing this allyesconfig error:
>
> ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!
>
> This patch fixes the export.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: M'boumba Cedric Madianga <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: Mattias WALLIN <[email protected]>
> Cc: Michel JAOUEN <[email protected]>
> Cc: Samuel Ortiz <[email protected]>
> ---
> drivers/mfd/ab8500-gpadc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to mfd-next, thanks.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/

2013-04-29 13:34:39

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 21/21] mtd: omap2: allow bulding as a module

On Wednesday 24 April 2013, Gupta, Pekon wrote:
> [Pekon]:
> ELM module is required in for Hardware based ECC correction for
> NAND devices. And this driver has a very small foot-print.
>
> The only cases this drives would not be used are:
> (a) Using S/W based ECC scheme, which have vey high CPU utilization
> (b) Using single bit ECC scheme, which are becoming obsolete due to
> increasing NAND densities.
> For most of the cases ELM module will be used with nand-driver. So
> there should be no harm in having this module as built-in, if not used
> in 10% of the use-cases.
>
> Thus I think it's better to keep this module tied to GPMC module,
> rather than independent control via KConfig.
> And user should just selects which ECC scheme he would like to
> use via DT, without worrying about KConfig options.

Sorry, I'm lost here and have no idea what you are actually suggesting
we do. Can you phrase that as a patch?

Unless you come up with a better solution, I would still like to queue
up my patch since it fixes an annoying bug and seems to have no downsides.

> I'm working in cleaning up omap2-nand driver to remove some
> redundancies. So would like to know your feedback on same..

Sure, just Cc me on your patches.

Arnd