Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/30] ARM: omap2/n8x0: work around modular omap mmc
From: Russell King - ARM Linux @ 2011-10-02 15:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-12-git-send-email-arnd@arndb.de>

On Sun, Oct 02, 2011 at 04:45:41PM +0200, Arnd Bergmann wrote:
> -#if defined(CONFIG_MENELAUS) &&						\
> -	(defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE))
> +#if defined(CONFIG_MENELAUS) && defined(CONFIG_MMC_OMAP)
> +/* || defined(CONFIG_MMC_OMAP_MODULE)) */
> +/* FIXME: cannot call omap_mmc_notify_cover_event for ONFIG_MMC_OMAP_MODULE */

#ifdef CONFIG_MMC_OMAP_MODULE
#warning FIXME: cannot call omap_mmc_notify_cover_event for CONFIG_MMC_OMAP_MODULE
#endif
#if defined(CONFIG_MENELAUS) && defined(CONFIG_MMC_OMAP)

So that it can be seen at build time?

Also note the 'ONFIG' typo...

^ permalink raw reply

* [PATCH 00/11] Generic ARM fixes for randconfig
From: Russell King - ARM Linux @ 2011-10-02 15:47 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1412110.pVL3lEeEnX@wuerfel>

On Sun, Oct 02, 2011 at 05:42:16PM +0200, Arnd Bergmann wrote:
> On Sunday 02 October 2011 16:36:46 Russell King - ARM Linux wrote:
> > On Sat, Oct 01, 2011 at 09:21:49PM +0200, Arnd Bergmann wrote:
> > > Please pull these into your tree, or alternatively cherry-pick the
> > > ones that you are happy with if you disagree with some of them.
> > 
> > I think I'll merge all but the first from this - I think the first
> > should be part of a cross-arch cleanup.
> 
> Ok, thanks!
> 
> I'll put the remaining patch into my 'randconfig/hacks' branch, which
> already contains a number of other things that need a proper fix but
> for which there is an easier circumvention.
> 
> Once all the low-hanging fruit are dealt with, I'll get back to that
> branch.

Second thought, I'll take the lot because it fixes build problems, and
the comment on patch 1 can be addressed later.

^ permalink raw reply

* [PATCH 00/11] Generic ARM fixes for randconfig
From: Arnd Bergmann @ 2011-10-02 15:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20111002153646.GX11710@n2100.arm.linux.org.uk>

On Sunday 02 October 2011 16:36:46 Russell King - ARM Linux wrote:
> On Sat, Oct 01, 2011 at 09:21:49PM +0200, Arnd Bergmann wrote:
> > Please pull these into your tree, or alternatively cherry-pick the
> > ones that you are happy with if you disagree with some of them.
> 
> I think I'll merge all but the first from this - I think the first
> should be part of a cross-arch cleanup.

Ok, thanks!

I'll put the remaining patch into my 'randconfig/hacks' branch, which
already contains a number of other things that need a proper fix but
for which there is an easier circumvention.

Once all the low-hanging fruit are dealt with, I'll get back to that
branch.

	Arnd

^ permalink raw reply

* [PATCH 00/11] Generic ARM fixes for randconfig
From: Russell King - ARM Linux @ 2011-10-02 15:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317496920-7764-1-git-send-email-arnd@arndb.de>

On Sat, Oct 01, 2011 at 09:21:49PM +0200, Arnd Bergmann wrote:
> Please pull these into your tree, or alternatively cherry-pick the
> ones that you are happy with if you disagree with some of them.

I think I'll merge all but the first from this - I think the first
should be part of a cross-arch cleanup.

^ permalink raw reply

* [PATCH 01/11] ARM: export rtc_lock for nvram driver
From: Russell King - ARM Linux @ 2011-10-02 15:21 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317496920-7764-2-git-send-email-arnd@arndb.de>

On Sat, Oct 01, 2011 at 09:21:50PM +0200, Arnd Bergmann wrote:
> The rtc_lock is used by both the nvram and rtc drivers, so
> we need to export it if at least one of the two is built,
> not just for the rtc driver.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/kernel/time.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
> index cb634c3..5a54b95 100644
> --- a/arch/arm/kernel/time.c
> +++ b/arch/arm/kernel/time.c
> @@ -39,13 +39,11 @@
>   */
>  static struct sys_timer *system_timer;
>  
> -#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE)
> +#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
> +    defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
>  /* this needs a better home */
>  DEFINE_SPINLOCK(rtc_lock);
> -
> -#ifdef CONFIG_RTC_DRV_CMOS_MODULE
>  EXPORT_SYMBOL(rtc_lock);
> -#endif
>  #endif	/* pc-style 'CMOS' RTC support */

Some architectures always define this lock and export it irrespective of
the configuration.  Others define it, but never export it.  Some define
it but only export it for 32-bit builds.

One thing springs to mind here - why isn't there a symbol to enable the
presence of rtc_lock in the kernel?  A second related point is why is
this in arch code?

^ permalink raw reply

* [PATCH 1/4] ARM: EXYNOS4: Support for generic I/O power domains on EXYNOS4210
From: Sylwester Nawrocki @ 2011-10-02 14:56 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <4E4360B3.7030804@samsung.com>

Hi Chanwoo,

a few minor comments below...
 
On 08/11/2011 06:55 AM, Chanwoo Choi wrote:
> Use the generic power domains support to implement support for
> power domain on EXYNOS4210.
> 
> I refer to the following patch to implement what configure
> the clock-gating control register for block to turn off/on:
> http://git.infradead.org/users/kmpark/linux-2.6-samsung/commit/39a81876d034dcbdc2a4c4c4b847b3b49e38870c
> 
> Signed-off-by: Chanwoo Choi<cw00.choi@samsung.com>
> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
> ---
>   arch/arm/mach-exynos4/Kconfig                      |    1 +
>   arch/arm/mach-exynos4/Makefile                     |    1 +
>   arch/arm/mach-exynos4/include/mach/pm-exynos4210.h |   52 ++++++
>   arch/arm/mach-exynos4/include/mach/regs-clock.h    |    8 +
>   arch/arm/mach-exynos4/pm-exynos4210.c              |  189 ++++++++++++++++++++
>   5 files changed, 251 insertions(+), 0 deletions(-)
>   create mode 100644 arch/arm/mach-exynos4/include/mach/pm-exynos4210.h
>   create mode 100644 arch/arm/mach-exynos4/pm-exynos4210.c
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 64baca7..8d5e876 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -12,6 +12,7 @@ if ARCH_EXYNOS4
>   config CPU_EXYNOS4210
>   	bool
>   	select S3C_PL330_DMA
> +	select PM_GENERIC_DOMAINS if PM
>   	help
>   	  Enable EXYNOS4210 CPU support
> 
> diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
> index b7fe1d7..97c31ce 100644
> --- a/arch/arm/mach-exynos4/Makefile
> +++ b/arch/arm/mach-exynos4/Makefile
> @@ -16,6 +16,7 @@ obj-$(CONFIG_CPU_EXYNOS4210)	+= cpu.o init.o clock.o irq-combiner.o
>   obj-$(CONFIG_CPU_EXYNOS4210)	+= setup-i2c0.o irq-eint.o dma.o pmu.o
>   obj-$(CONFIG_PM)		+= pm.o sleep.o
>   obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
> +obj-$(CONFIG_CPU_EXYNOS4210)	+= pm-exynos4210.o
> 
>   obj-$(CONFIG_SMP)		+= platsmp.o headsmp.o
> 
> diff --git a/arch/arm/mach-exynos4/include/mach/pm-exynos4210.h b/arch/arm/mach-exynos4/include/mach/pm-exynos4210.h
> new file mode 100644
> index 0000000..e36425a
> --- /dev/null
> +++ b/arch/arm/mach-exynos4/include/mach/pm-exynos4210.h
> @@ -0,0 +1,52 @@
> +/* linux/arch/arm/mach-exynos4/include/mach/pm-exynos4210.h
> + *
> + * Exynos4210 Power management support
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + *		http://www.samsung.com
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef PM_EXYNOS4210_H
> +#define PM_EXYNOS4210_H
> +
> +#include<linux/pm_domain.h>
> +
> +struct platform_device;
> +
> +struct exynos4210_pm_domain {

I wonder whether it isn't worth to start with 'struct exynos_pm_domain' as we're
consolidating the code for various exynos variants.

> +	struct generic_pm_domain genpd;
> +
> +	const char *name;
> +	void __iomem *base;
> +	u32 clkgate_mask;
> +	int boot_on;
> +};
> +
> +static inline struct exynos4210_pm_domain *to_exynos4210_pd(
> +		struct generic_pm_domain *pd)
> +{
> +	return container_of(pd, struct exynos4210_pm_domain, genpd);
> +}
> +
> +#ifdef CONFIG_PM
> +extern struct exynos4210_pm_domain exynos4210_pd_mfc;
> +extern struct exynos4210_pm_domain exynos4210_pd_g3d;
> +extern struct exynos4210_pm_domain exynos4210_pd_lcd0;
> +extern struct exynos4210_pm_domain exynos4210_pd_lcd1;
> +extern struct exynos4210_pm_domain exynos4210_pd_tv;
> +extern struct exynos4210_pm_domain exynos4210_pd_cam;
> +extern struct exynos4210_pm_domain exynos4210_pd_gps;
> +
> +extern void exynos4210_init_pm_domain(struct exynos4210_pm_domain *exynos4210_pd);

exynos_pd_init() ?

> +extern void exynos4210_add_device_to_domain(struct exynos4210_pm_domain *exynos4210_pd,

exynos_pd_add_device() ?

> +				struct platform_device *pdev);
> +#else
> +#define exynos4210_init_pm_domain(pd) do { } while(0)
> +#define exynos4210_add_device_to_domain(pd, pdev) do { } while(0)
> +#endif /* CONFIG_PM */
> +
> +#endif /* PM_EXYNOS4210_H */
> diff --git a/arch/arm/mach-exynos4/include/mach/regs-clock.h b/arch/arm/mach-exynos4/include/mach/regs-clock.h
> index d493fdb..0d1c9ec 100644
> --- a/arch/arm/mach-exynos4/include/mach/regs-clock.h
> +++ b/arch/arm/mach-exynos4/include/mach/regs-clock.h
> @@ -183,6 +183,14 @@
>   #define S5P_CLKDIV_BUS_GPLR_SHIFT	(4)

nit: don't need braces

>   #define S5P_CLKDIV_BUS_GPLR_MASK	(0x7<<  S5P_CLKDIV_BUS_GPLR_SHIFT)
> 
> +#define S5P_CLKGATE_BLOCK_CAM		(1<<  0)
> +#define S5P_CLKGATE_BLOCK_TV		(1<<  1)
> +#define S5P_CLKGATE_BLOCK_MFC		(1<<  2)
> +#define S5P_CLKGATE_BLOCK_G3D		(1<<  3)
> +#define S5P_CLKGATE_BLOCK_LCD0		(1<<  4)
> +#define S5P_CLKGATE_BLOCK_LCD1		(1<<  5)
> +#define S5P_CLKGATE_BLOCK_GPS		(1<<  7)
> +
>   /* Compatibility defines and inclusion */
> 
>   #include<mach/regs-pmu.h>
> diff --git a/arch/arm/mach-exynos4/pm-exynos4210.c b/arch/arm/mach-exynos4/pm-exynos4210.c
> new file mode 100644
> index 0000000..d43c37f
> --- /dev/null
> +++ b/arch/arm/mach-exynos4/pm-exynos4210.c
> @@ -0,0 +1,189 @@
> +/* linux/arch/arm/mach-exynos4/pm-exynos4210.c
> + *
> + * Exynos4210 Power management support
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + *		http://www.samsung.com
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include<linux/pm.h>
> +#include<linux/module.h>
> +#include<linux/delay.h>
> +#include<linux/err.h>
> +#include<linux/slab.h>
> +#include<linux/pm_runtime.h>
> +#include<linux/platform_device.h>
> +#include<linux/pm_domain.h>
> +#include<linux/io.h>
> +
> +#include<mach/regs-clock.h>
> +#include<mach/pm-exynos4210.h>
> +
> +#ifdef CONFIG_PM
> +static DEFINE_SPINLOCK(clkgate_block_lock);
> +
> +static int pd_power_down(struct generic_pm_domain *genpd)

__exynos_pd_power_down() ?

> +{
> +	struct exynos4210_pm_domain *exynos4210_pd = to_exynos4210_pd(genpd);
> +	u32 timeout;
> +
> +	/* Disable the power of power-domain */
> +	__raw_writel(0, exynos4210_pd->base);
> +
> +	/* Wait max 1ms */
> +	timeout = 10;
> +	while (__raw_readl(exynos4210_pd->base + 0x4)&  S5P_INT_LOCAL_PWR_EN) {
> +		if (timeout == 0) {
> +			printk(KERN_ERR "Power domain %s disable failed.\n",
> +				exynos4210_pd->name);
> +			return -ETIMEDOUT;
> +		}
> +		timeout--;
> +		udelay(100);
> +	}
> +
> +	/* Configure the clock-gating control register for block to turn off */
> +	if (exynos4210_pd->clkgate_mask) {
> +		unsigned long flags;
> +		u32 reg;
> +
> +		spin_lock_irqsave(&clkgate_block_lock, flags);
> +		reg = __raw_readl(S5P_CLKGATE_BLOCK);
> +		reg&= ~exynos4210_pd->clkgate_mask;
> +		__raw_writel(reg, S5P_CLKGATE_BLOCK);
> +		spin_unlock_irqrestore(&clkgate_block_lock, flags);
> +	}
> +
> +	return 0;
> +}
> +
> +static int pd_power_up(struct generic_pm_domain *genpd)

__exynos_pd_power_up() ?

> +{
> +	struct exynos4210_pm_domain *exynos4210_pd = to_exynos4210_pd(genpd);
> +	u32 timeout;
> +
> +	/* Enable power domain */
> +	__raw_writel(S5P_INT_LOCAL_PWR_EN, exynos4210_pd->base);
> +
> +	/* Wait max 1ms */
> +	timeout = 10;
> +	while ((__raw_readl(exynos4210_pd->base + 0x4)&  S5P_INT_LOCAL_PWR_EN)
> +		!= S5P_INT_LOCAL_PWR_EN) {
> +		if (timeout == 0) {
> +			printk(KERN_ERR "Power domain %s enable failed.\n",
> +				exynos4210_pd->name);
> +			return -ETIMEDOUT;
> +		}
> +		timeout--;
> +		udelay(100);
> +	}
> +
> +	/* Configure the clock-gating control register for block to turn on */
> +	if (exynos4210_pd->clkgate_mask) {
> +		unsigned long flags;
> +		u32 reg;
> +
> +		spin_lock_irqsave(&clkgate_block_lock, flags);
> +		reg = __raw_readl(S5P_CLKGATE_BLOCK);
> +		reg |= exynos4210_pd->clkgate_mask;
> +		__raw_writel(reg, S5P_CLKGATE_BLOCK);
> +		spin_unlock_irqrestore(&clkgate_block_lock, flags);
> +	}
> +
> +	return 0;
> +}
> +
> +static bool pd_active_wakeup(struct device *dev)

__exynos_pd_active_wakeup() ?

> +{
> +	return true;
> +}
> +
> +void exynos4210_init_pm_domain(struct exynos4210_pm_domain *exynos4210_pd)
> +{
> +	struct generic_pm_domain *genpd;
> +
> +	if (!exynos4210_pd)
> +		return;
> +
> +	genpd =&exynos4210_pd->genpd;
> +
> +	pm_genpd_init(genpd, NULL, false);
> +	genpd->stop_device = pm_clk_suspend;
> +	genpd->start_device = pm_clk_resume;

Perhaps each driver has to be inspected before we can do this.
I guess it's better to leave these 2 ops uninitialized for now.

> +	genpd->active_wakeup = pd_active_wakeup;
> +	genpd->power_off = pd_power_down;
> +	genpd->power_on = pd_power_up;
> +
> +	if (exynos4210_pd->boot_on)
> +		pd_power_up(&exynos4210_pd->genpd);
> +}
> +
> +void exynos4210_add_device_to_domain(struct exynos4210_pm_domain *exynos4210_pd,
> +				struct platform_device *pdev)
> +{
> +	struct device *dev =&pdev->dev;
> +
> +	if (!exynos4210_pd || !pdev)
> +		return;
> +
> +	if (!dev->power.subsys_data) {
> +		pm_clk_init(dev);
> +		pm_clk_add(dev, NULL);

Same here, this won't work for many devices, some have multiple clocks associated
with them and non null con_id. It might be needed to separate the clocks addition 
and to handle individually for each device.

> +	}
> +	pm_genpd_add_device(&exynos4210_pd->genpd, dev);
> +}
> +

--
Regards,
Sylwester

^ permalink raw reply

* [PATCH 30/30] ARM: omap2: select ARM_AMBA for OMAP3_EMU
From: Arnd Bergmann @ 2011-10-02 14:46 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

OMAP3_EMU needs OC_ETM, which needs ARM_AMBA. Since the latter
dependency is getting turned from a 'select' into a 'depends',
omap has to select ARM_AMBA itself in order to have a correct
dependency chain. Alternatively, we could change OMAP3_EMU
to have a 'depends on OC_ETM' instead of selecting it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fdd45dd..12ae86e 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -386,6 +386,7 @@ config OMAP3_EMU
 	bool "OMAP3 debugging peripherals"
 	depends on ARCH_OMAP3
 	select OC_ETM
+	select ARM_AMBA
 	help
 	  Say Y here to enable debugging hardware of omap3
 
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 29/30] ARM: omap: select USB_ARCH_HAS_EHCI only when USB is enabled
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

This avoids a warning from Kconfig about missing dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 3921a95..fdd45dd 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -32,7 +32,7 @@ config ARCH_OMAP3
 	depends on ARCH_OMAP2PLUS
 	default y
 	select CPU_V7
-	select USB_ARCH_HAS_EHCI
+	select USB_ARCH_HAS_EHCI if USB_SUPPORT
 	select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4
 	select ARCH_HAS_OPP
 	select PM_OPP if PM
@@ -50,7 +50,7 @@ config ARCH_OMAP4
 	select CACHE_L2X0
 	select ARCH_HAS_OPP
 	select PM_OPP if PM
-	select USB_ARCH_HAS_EHCI
+	select USB_ARCH_HAS_EHCI if USB_SUPPORT
 
 config ARCH_OMAP2_AUTO
 	bool
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 28/30] ARM: omap: select CPU_FREQ_TABLE where needed
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The omap platform requires CPU_FREQ_TABLE support to be enabled for its
CPU_FREQ implementations, so automatically select that when CPU_FREQ
is enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/plat-omap/Kconfig |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index bb8f4a6..f7ef9f4 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -217,6 +217,11 @@ config OMAP_PM_NOOP
 
 endchoice
 
+config OMAP_CPU_FREQ
+	def_bool "y"
+	depends on CPU_FREQ
+	select CPU_FREQ_TABLE
+
 endmenu
 
 endif
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 27/30] ARM: omap: select L2X0 cache on omap4
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The cache controller needs to be enabled for the
cortex-a9 specific errata that are also selected
to work.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fd0ab18..3921a95 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -47,6 +47,7 @@ config ARCH_OMAP4
 	select PL310_ERRATA_588369
 	select PL310_ERRATA_727915
 	select ARM_ERRATA_720789
+	select CACHE_L2X0
 	select ARCH_HAS_OPP
 	select PM_OPP if PM
 	select USB_ARCH_HAS_EHCI
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 26/30] ARM: omap: add board autoselection
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

At least one board file needs to be selected to successfully build
a kernel, so this one adds logic to the omap Kconfig file to
pick one default board file when all others are disabled. Since
the available boards depend on the SoC family (omap2/3/4) being
selected first, this adds one default for each family.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Kconfig |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 3c9fb89..fd0ab18 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -120,6 +120,45 @@ config MACH_OMAP_GENERIC
 	depends on ARCH_OMAP2
 	default y
 
+config MACH_OMAP_AUTO_BOARD
+	def_bool y
+	depends on !MACH_OMAP2_TUSB6010
+	depends on !MACH_OMAP_H4
+	depends on !MACH_OMAP_APOLLON
+	depends on !MACH_OMAP_APOLLON
+	depends on !MACH_OMAP_2430SDP
+	depends on !MACH_OMAP3_BEAGLE
+	depends on !MACH_DEVKIT8000
+	depends on !MACH_OMAP_LDP
+	depends on !MACH_OMAP3530_LV_SOM
+	depends on !MACH_OMAP3_TORPEDO
+	depends on !MACH_OVERO
+	depends on !MACH_OMAP3EVM
+	depends on !MACH_OMAP3517EVM
+	depends on !MACH_CRANEBOARD
+	depends on !MACH_OMAP3_PANDORA
+	depends on !MACH_OMAP3_TOUCHBOOK
+	depends on !MACH_NOKIA_N8X0
+	depends on !MACH_NOKIA_RM680
+	depends on !MACH_NOKIA_RX51
+	depends on !MACH_OMAP_ZOOM2
+	depends on !MACH_OMAP_ZOOM3
+	depends on !MACH_CM_T35
+	depends on !MACH_CM_T3517
+	depends on !MACH_IGEP0020
+	depends on !MACH_IGEP0030
+	depends on !MACH_SBC3530
+	depends on !MACH_OMAP_3630SDP
+	depends on !MACH_TI8168EVM
+	depends on !MACH_OMAP4_PANDA
+	select MACH_OMAP_GENERIC if ARCH_OMAP2
+	select MACH_OMAP_3430SDP if ARCH_OMAP3 && !ARCH_OMAP2
+	select MACH_OMAP_4430SDP if ARCH_OMAP4 && !ARCH_OMAP3 && !ARCH_OMAP2
+	help
+	  The kernel needs to have support for at least one board
+	  in order to build. If none is selected, default to the
+	  generic board.
+
 config MACH_OMAP2_TUSB6010
 	bool
 	depends on ARCH_OMAP2 && SOC_OMAP2420
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 25/30] ARM: OMAP depends on MMU
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

There is no way to build OMAP kernels without an MMU
at this point because of dependencies on MMU-only functions.

As long as nobody is interested in fixing this, let's just disable
this platforms for nommu kernels.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5ebc5d9..e688ca4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -875,6 +875,7 @@ config ARCH_DAVINCI
 
 config ARCH_OMAP
 	bool "TI OMAP"
+	depends on MMU
 	select HAVE_CLK
 	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_HAS_CPUFREQ
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 24/30] ARM: omap2+: ensure that one of omap2/3/4 is selected
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

Random configurations can fail if none of the omap families
in mach-omap2 is selected. This patch automatically selects
omap2 if the user has not made any other choice.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Kconfig |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 4deeade..3c9fb89 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -51,6 +51,16 @@ config ARCH_OMAP4
 	select PM_OPP if PM
 	select USB_ARCH_HAS_EHCI
 
+config ARCH_OMAP2_AUTO
+	bool
+	depends on !ARCH_OMAP3 && !ARCH_OMAP4
+	select ARCH_OMAP2
+	default y
+	help
+	  At least one of OMAP2/OMAP3/OMAP4 needs to be enabled, this
+	  selects OMAP2 if nothing else gets selected, to avoid non-building
+	  configurations.
+
 comment "OMAP Core Type"
 	depends on ARCH_OMAP2
 
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 23/30] ARM: omap2: select twl4030 support on boards that need it
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

These three boards unconditionally use the twl4030 driver
from the board-zoom-display.c file. Make sure that the driver
is always there.
We also need to select the I2C core so we are able to build
that driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Kconfig |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 57b66d5..4deeade 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -253,6 +253,8 @@ config MACH_OMAP_ZOOM2
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_8250_CONSOLE
 	select REGULATOR_FIXED_VOLTAGE
+	select TWL4030_CORE
+	select I2C
 
 config MACH_OMAP_ZOOM3
 	bool "OMAP3630 Zoom3 board"
@@ -263,6 +265,8 @@ config MACH_OMAP_ZOOM3
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_8250_CONSOLE
 	select REGULATOR_FIXED_VOLTAGE
+	select TWL4030_CORE
+	select I2C
 
 config MACH_CM_T35
 	bool "CompuLab CM-T35/CM-T3730 modules"
@@ -304,6 +308,8 @@ config MACH_OMAP_3630SDP
 	depends on ARCH_OMAP3
 	default y
 	select OMAP_PACKAGE_CBP
+	select TWL4030_CORE
+	select I2C
 
 config MACH_TI8168EVM
 	bool "TI8168 Evaluation Module"
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 22/30] mfd: build twl6030 only on omap2
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

We can only have one pwm driver built into the kernel, so make sure
that this one is only available on omap2 to avoid conflicts with
pwm drivers of other platforms.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Balaji T K <balajitk@ti.com>
Cc: Hemanth V <hemanthv@ti.com>
---
 drivers/mfd/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 48cce35..26bebe8 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -256,8 +256,8 @@ config MFD_TWL4030_AUDIO
 	default n
 
 config TWL6030_PWM
-	tristate "TWL6030 PWM (Pulse Width Modulator) Support"
-	depends on TWL4030_CORE
+	bool "TWL6030 PWM (Pulse Width Modulator) Support"
+	depends on TWL4030_CORE && ARCH_OMAP2
 	select HAVE_PWM
 	default n
 	help
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 21/30] sound/soc/omap: limit to omap2plus
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

These drivers do not build correctly on omap1, so only allow
selecting them on omap2 or higher.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Liam Girdwood <lrg@ti.com>
---
 sound/soc/omap/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index fe83d0d..493733e 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -1,6 +1,6 @@
 config SND_OMAP_SOC
 	tristate "SoC Audio for the Texas Instruments OMAP chips"
-	depends on ARCH_OMAP
+	depends on ARCH_OMAP2PLUS
 
 config SND_OMAP_SOC_MCBSP
 	tristate
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 20/30] media/omap_vout: disable driver for now
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

This driver was broken by 8cff88c5d "OMAP: DSS2: remove update_mode
from omapdss":

/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c: In function 'omap_vout_probe':
/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c:2202:15: error: 'struct omap_dss_driver' has no member
named 'set_update_mode'
/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c:2203:12: error: 'struct omap_dss_driver' has no member
named 'set_update_mode'
/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c:2204:8: error: 'OMAP_DSS_UPDATE_MANUAL' undeclared (first
use in this function)
/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c:2204:8: note: each undeclared identifier is reported only
once for each function it appears in
/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c:2206:15: error: 'struct omap_dss_driver' has no member
named 'set_update_mode'
/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c:2207:12: error: 'struct omap_dss_driver' has no member
named 'set_update_mode'
/home/arnd/linux-arm/drivers/media/video/omap/omap_vout.c:2208:8: error: 'OMAP_DSS_UPDATE_AUTO' undeclared (first use
in this function)
make[3]: *** [drivers/media/video/omap/omap_vout.o] Error 1
make[2]: *** [drivers/media/video/omap] Error 2
make[1]: *** [drivers/media/video/] Error 2
make: *** [sub-make] Error 2

Let's disable it for now.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Archit Taneja <archit@ti.com>
Cc: Amber Jain <amber@ti.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
---
 drivers/media/video/omap/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/omap/Kconfig b/drivers/media/video/omap/Kconfig
index 390ab09..ee21f36 100644
--- a/drivers/media/video/omap/Kconfig
+++ b/drivers/media/video/omap/Kconfig
@@ -4,6 +4,7 @@ config VIDEO_OMAP2_VOUT_VRFB
 config VIDEO_OMAP2_VOUT
 	tristate "OMAP2/OMAP3 V4L2-Display driver"
 	depends on ARCH_OMAP2 || ARCH_OMAP3
+	depends on BROKEN # broken by 8cff88c5da "OMAP: DSS2: remove update_mode from omapdss"
 	select VIDEOBUF_GEN
 	select VIDEOBUF_DMA_CONTIG
 	select OMAP2_DSS
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 19/30] tty/serial/omap: console can only be built-in
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

When the omap serial driver is built as a module, we must
not allow the console driver to be selected, because consoles
can not be loadable modules.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Govindraj.R <govindraj.raja@ti.com>
---
 drivers/tty/serial/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 4dcb37bb..eb04b2f 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1346,7 +1346,7 @@ config SERIAL_OMAP
 
 config SERIAL_OMAP_CONSOLE
 	bool "Console on OMAP serial port"
-	depends on SERIAL_OMAP
+	depends on SERIAL_OMAP=y
 	select SERIAL_CORE_CONSOLE
 	help
 	  Select this option if you would like to use omap serial port as
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 18/30] omap-usb: automatically select MFD_OMAP_USB_HOST
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The ehci-omap and ohci-omap3 drivers both depend on the
omap-usb-host MFD support driver. By default, this is
automatically turned on, but it is possible to disable
the driver, which results in a link error.

This patch makes the option invisible so we always do
the right thing.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
 drivers/mfd/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 21574bd..48cce35 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -721,7 +721,7 @@ config MFD_WL1273_CORE
 	  audio codec.
 
 config MFD_OMAP_USB_HOST
-	bool "Support OMAP USBHS core driver"
+	bool
 	depends on USB_EHCI_HCD_OMAP || USB_OHCI_HCD_OMAP3
 	default y
 	help
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 17/30] usb/musb: allow building USB_MUSB_TUSB6010 as a module
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

Commit 1376d92f9 "usb: musb: allow musb and glue layers to be modules"
made the USB_MUSB_TUSB6010 option modular, but actually building
the driver as a module does not work, so various randconfig builds
actually fail. This changes all code that depends on the
option to also check for modular builds, and exports the necessary
symbols.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/board-n8x0.c |    2 +-
 drivers/usb/musb/musb_core.c     |    3 ++-
 drivers/usb/musb/musb_io.h       |    2 +-
 drivers/usb/musb/tusb6010.c      |    1 +
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 403325d..c096dc2 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -46,7 +46,7 @@ static struct device *mmc_device;
 #define TUSB6010_GPIO_ENABLE	0
 #define TUSB6010_DMACHAN	0x3f
 
-#ifdef CONFIG_USB_MUSB_TUSB6010
+#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
 /*
  * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
  * 1.5 V voltage regulators of PM companion chip. Companion chip will then
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 20a2873..9fa2596 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1432,7 +1432,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
 		struct musb_hw_ep	*hw_ep = musb->endpoints + i;
 
 		hw_ep->fifo = MUSB_FIFO_OFFSET(i) + mbase;
-#ifdef CONFIG_USB_MUSB_TUSB6010
+#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE)
 		hw_ep->fifo_async = musb->async + 0x400 + MUSB_FIFO_OFFSET(i);
 		hw_ep->fifo_sync = musb->sync + 0x400 + MUSB_FIFO_OFFSET(i);
 		hw_ep->fifo_sync_va =
@@ -1632,6 +1632,7 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit)
 		}
 	}
 }
+EXPORT_SYMBOL_GPL(musb_dma_completion);
 
 #else
 #define use_dma			0
diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
index 03c6ccd..e61aa95 100644
--- a/drivers/usb/musb/musb_io.h
+++ b/drivers/usb/musb/musb_io.h
@@ -74,7 +74,7 @@ static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data)
 	{ __raw_writel(data, addr + offset); }
 
 
-#ifdef CONFIG_USB_MUSB_TUSB6010
+#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE)
 
 /*
  * TUSB6010 doesn't allow 8-bit access; 16-bit access is the minimum.
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index ec14801..1f40561 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -56,6 +56,7 @@ u8 tusb_get_revision(struct musb *musb)
 
 	return rev;
 }
+EXPORT_SYMBOL_GPL(tusb_get_revision);
 
 static int tusb_print_revision(struct musb *musb)
 {
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 16/30] usb/musb: HDRC depends on TWL4030_CORE for OMAP3/4
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The musb_hdrc driver tries to select TWL4030_USB or TWL6030_USB
on some platforms, but those symbols in turn depend on TWL4030_CORE.
Trying not to spread the 'select' further, this makes the driver
depend on the TWL4030_CORE for the platforms that do other selects.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/musb/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index d596fb2..b6732ee 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -7,6 +7,7 @@
 config USB_MUSB_HDRC
 	depends on USB && USB_GADGET
 	depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
+	depends on TWL4030_CORE || !(MACH_OMAP_3430SDP || MACH_OMAP_4430SDP || MACH_OMAP4_PANDA)
 	select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
 	select TWL4030_USB if MACH_OMAP_3430SDP
 	select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 15/30] usb/musb: use a Kconfig choice to pick the right DMA method
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The logic to allow only one DMA driver in MUSB is currently
flawed, because it also allows picking no DMA driver at all
and also not selecting PIO mode.

Using a choice statement makes this foolproof for now and
also simplifies the Makefile.

Unfortunately, we will have to revisit this when we start
supporting multiple ARM platforms in a single kernel binary,
because at that point we will actually need to select
multiple DMA drivers and pick the right one at run-time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/musb/Kconfig  |   57 ++++++++++++++++++++++++++------------------
 drivers/usb/musb/Makefile |   26 +++-----------------
 2 files changed, 38 insertions(+), 45 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index fc34b8b..d596fb2 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -64,46 +64,57 @@ config USB_MUSB_UX500
 
 endchoice
 
-config MUSB_PIO_ONLY
-	bool 'Disable DMA (always use PIO)'
-	depends on USB_MUSB_HDRC
-	default USB_MUSB_TUSB6010 || USB_MUSB_DA8XX || USB_MUSB_AM35X
+choice
+	prompt 'MUSB DMA mode'
+	default USB_UX500_DMA if USB_MUSB_UX500
+	default USB_INVENTRA_DMA if USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN
+	default USB_TI_CPPI_DMA if USB_MUSB_DAVINCI
+	default USB_TUSB_OMAP_DMA if USB_MUSB_TUSB6010
+	default MUSB_PIO_ONLY if USB_MUSB_TUSB6010 || USB_MUSB_DA8XX || USB_MUSB_AM35X
 	help
-	  All data is copied between memory and FIFO by the CPU.
-	  DMA controllers are ignored.
-
-	  Do not select 'n' here unless DMA support for your SOC or board
-	  is unavailable (or unstable).  When DMA is enabled at compile time,
-	  you can still disable it at run time using the "use_dma=n" module
-	  parameter.
+	  Unfortunately, only one option can be enabled here. Ideally one
+	  should be able to build all these drivers into one kernel to
+	  allow using DMA on multiplatform kernels.
 
 config USB_UX500_DMA
-	bool
-	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
-	default USB_MUSB_UX500
+	bool 'ST Ericsson U8500 and U5500'
+	depends on USB_MUSB_HDRC
+	depends on USB_MUSB_UX500
 	help
 	  Enable DMA transfers on UX500 platforms.
 
 config USB_INVENTRA_DMA
-	bool
-	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
-	default USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN
+	bool 'Inventra'
+	depends on USB_MUSB_HDRC
+	depends on USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN
 	help
 	  Enable DMA transfers using Mentor's engine.
 
 config USB_TI_CPPI_DMA
-	bool
-	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
-	default USB_MUSB_DAVINCI
+	bool 'TI CPPI (Davinci)'
+	depends on USB_MUSB_HDRC
+	depends on USB_MUSB_DAVINCI
 	help
 	  Enable DMA transfers when TI CPPI DMA is available.
 
 config USB_TUSB_OMAP_DMA
-	bool
-	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
+	bool 'TUSB 6010'
+	depends on USB_MUSB_HDRC
 	depends on USB_MUSB_TUSB6010
 	depends on ARCH_OMAP
-	default y
 	help
 	  Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
 
+config MUSB_PIO_ONLY
+	bool 'Disable DMA (always use PIO)'
+	depends on USB_MUSB_HDRC
+	help
+	  All data is copied between memory and FIFO by the CPU.
+	  DMA controllers are ignored.
+
+	  Do not choose this unless DMA support for your SOC or board
+	  is unavailable (or unstable).  When DMA is enabled at compile time,
+	  you can still disable it at run time using the "use_dma=n" module
+	  parameter.
+
+endchoice
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index d8fd9d0..88bfb9d 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -24,25 +24,7 @@ obj-$(CONFIG_USB_MUSB_UX500)			+= ux500.o
 # PIO only, or DMA (several potential schemes).
 # though PIO is always there to back up DMA, and for ep0
 
-ifneq ($(CONFIG_MUSB_PIO_ONLY),y)
-
-  ifeq ($(CONFIG_USB_INVENTRA_DMA),y)
-    musb_hdrc-y			+= musbhsdma.o
-
-  else
-    ifeq ($(CONFIG_USB_TI_CPPI_DMA),y)
-      musb_hdrc-y		+= cppi_dma.o
-
-    else
-      ifeq ($(CONFIG_USB_TUSB_OMAP_DMA),y)
-	musb_hdrc-y		+= tusb6010_omap.o
-
-      else
-        ifeq ($(CONFIG_USB_UX500_DMA),y)
-	  musb_hdrc-y		+= ux500_dma.o
-
-        endif
-      endif
-    endif
-  endif
-endif
+musb_hdrc-$(CONFIG_USB_INVENTRA_DMA)		+= musbhsdma.o
+musb_hdrc-$(CONFIG_USB_TI_CPPI_DMA)		+= cppi_dma.o
+musb_hdrc-$(CONFIG_USB_TUSB_OMAP_DMA)		+= tusb6010_omap.o
+musb_hdrc-$(CONFIG_USB_UX500_DMA)		+= ux500_dma.o
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 14/30] ARM: omap2: irq.c is always needed
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The Makefile only includes irq.o for omap2 and omap3, but it's in
fact also required to build omap4-only kernels.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index dc36bd4..f14549d 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -4,9 +4,9 @@
 
 # Common support
 obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
-	 common.o gpio.o dma.o wd_timer.o
+	 common.o gpio.o dma.o wd_timer.o irq.o
 
-omap-2-3-common				= irq.o sdrc.o
+omap-2-3-common				= sdrc.o
 hwmod-common				= omap_hwmod.o \
 					  omap_hwmod_common_data.o
 clock-common				= clock.o clock_common_data.o \
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 13/30] ARM: omap2+: fix omap_hdq_init compilation
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The definition of the device must depend on the hardware
we run on, not on the kernel configuration.

arch/arm/mach-omap2/devices.c:624:13: error: 'OMAP_HDQ_BASE' undeclared here (not in a function)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/devices.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 1077ad6..392f2b0 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -29,6 +29,7 @@
 #include <mach/gpio.h>
 #include <plat/mmc.h>
 #include <plat/dma.h>
+#include <plat/cpu.h>
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
 #include <plat/omap4-keypad.h>
@@ -615,10 +616,8 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
 
 /*-------------------------------------------------------------------------*/
 
-#if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE)
 #if defined(CONFIG_SOC_OMAP2430) || defined(CONFIG_SOC_OMAP3430)
 #define OMAP_HDQ_BASE	0x480B2000
-#endif
 static struct resource omap_hdq_resources[] = {
 	{
 		.start		= OMAP_HDQ_BASE,
@@ -641,10 +640,13 @@ static struct platform_device omap_hdq_dev = {
 };
 static inline void omap_hdq_init(void)
 {
-	(void) platform_device_register(&omap_hdq_dev);
+	if (cpu_is_omap2430() || cpu_is_omap3430())
+		(void) platform_device_register(&omap_hdq_dev);
 }
 #else
-static inline void omap_hdq_init(void) {}
+static inline void omap_hdq_init(void)
+{
+}
 #endif
 
 /*---------------------------------------------------------------------------*/
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 12/30] ARM: omap4: always build omap_phy_internal
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The functions defined in omap_phy_internal.c are requrired on
omap4-only configurations, not just for specific boards.

twl-common.c:(.init.text+0x6b40): undefined reference to `omap4430_phy_init'
twl-common.c:(.init.text+0x6c68): undefined reference to `omap4430_phy_init'
mach-omap2/built-in.o:(.data+0x154e0): undefined reference to `omap4430_phy_init'
mach-omap2/built-in.o:(.data+0x154e4): undefined reference to `omap4430_phy_exit'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Makefile |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index f343365..dc36bd4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -242,12 +242,9 @@ obj-$(CONFIG_MACH_IGEP0020)		+= board-igep0020.o \
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK)	+= board-omap3touchbook.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)		+= board-4430sdp.o \
-					   hsmmc.o \
-					   omap_phy_internal.o
+					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP4_PANDA)		+= board-omap4panda.o \
-					   hsmmc.o \
-					   omap_phy_internal.o
-
+					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP3517EVM)		+= board-am3517evm.o \
 					   omap_phy_internal.o \
 
@@ -275,6 +272,7 @@ obj-y					+= $(smc91x-m) $(smc91x-y)
 smsc911x-$(CONFIG_SMSC911X)		:= gpmc-smsc911x.o
 obj-y					+= $(smsc911x-m) $(smsc911x-y)
 obj-$(CONFIG_ARCH_OMAP4)		+= hwspinlock.o
+obj-$(CONFIG_ARCH_OMAP4)		+= omap_phy_internal.o
 
 disp-$(CONFIG_OMAP2_DSS)		:= display.o
 obj-y					+= $(disp-m) $(disp-y)
-- 
1.7.5.4

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox