Re: [PATCH 1/8] ARM: SCU: Add common routines for secondary CPU bootup

2010-12-04 Thread Russell King - ARM Linux
On Thu, Dec 02, 2010 at 06:01:50PM +, Russell King - ARM Linux wrote:
 On Thu, Dec 02, 2010 at 05:38:24PM +, Russell King - ARM Linux wrote:
  What if a platform, for what ever reason, wants to have 3 CPUs,
  numbered 0, 2, 3 ?  That's the reason why the code which sets the
  possible and present maps isn't in the ARM core code - Eg, we don't
  know if a platform wants to keep CPU 1 in AMP mode to run some
  special software on it.
  
  I don't think it's worth it because I think trying to considate this
  is going to cripple the code structure in the future.
 
 I don't think this is particularly worth it either:

As Catalin has pointed out:

http://lists.arm.linux.org.uk/lurker/message/20101202.162840.5465758c.en.html

The SCU is part of the core, and if you consult the TRMs for the MPCore
devices, it is actually different in ARM11 MPCore vs Cortex-A9 MPCore.
Cortex-A15 doesn't have a MMIO addressable SCU at all.

So, this is about as far as I want to go with stripping out the common
code from the various platforms (this includes my previous SMP series):

http://lists.arm.linux.org.uk/lurker/message/20101203.200746.31424430.en.html

This results in a net reduction of 242 LOC, as shown in the following
diffstat:

 arch/arm/include/asm/hardirq.h|   18 ++
 arch/arm/include/asm/mach/irq.h   |2 +-
 arch/arm/include/asm/smp.h|   17 +-
 arch/arm/include/asm/smp_mpidr.h  |   17 --
 arch/arm/kernel/entry-armv.S  |2 +-
 arch/arm/kernel/fiq.c |5 +-
 arch/arm/kernel/head.S|   39 +++--
 arch/arm/kernel/irq.c |   23 ++-
 arch/arm/kernel/smp.c |  243 -
 arch/arm/mach-msm/include/mach/smp.h  |4 +-
 arch/arm/mach-omap2/omap-hotplug.c|   14 +--
 arch/arm/mach-omap2/omap-smp.c|   66 ++--
 arch/arm/mach-realview/hotplug.c  |   18 +--
 arch/arm/mach-realview/include/mach/smp.h |5 +-
 arch/arm/mach-realview/platsmp.c  |   95 +++-
 arch/arm/mach-s5pv310/hotplug.c   |   18 +--
 arch/arm/mach-s5pv310/include/mach/smp.h  |5 +-
 arch/arm/mach-s5pv310/platsmp.c   |   46 +-
 arch/arm/mach-tegra/hotplug.c |   18 +--
 arch/arm/mach-tegra/include/mach/smp.h|   12 +--
 arch/arm/mach-tegra/platsmp.c |   33 +---
 arch/arm/mach-ux500/hotplug.c |   18 +--
 arch/arm/mach-ux500/include/mach/smp.h|5 +-
 arch/arm/mach-ux500/platsmp.c |   57 ++-
 arch/arm/mach-vexpress/include/mach/smp.h |5 +-
 arch/arm/mach-vexpress/platsmp.c  |   54 ++-
 arch/arm/plat-omap/include/plat/smp.h |5 +-
 27 files changed, 301 insertions(+), 543 deletions(-)

Can someone also explain why OMAP uses different file naming from everyone
else?  It's annoying as (eg) arch/arm/*/platsmp.c for editing the platform
SMP support files gets everyone except OMAP.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[REPOST][PATCH] Fix IGEPv2 second MMC channel power supply

2010-12-04 Thread Marc Zyngier
Commit 72f381ba056 (omap3: Remove VMMC2 regulator on IGEP v2)
removed an unused regulator entry, but left the second MMC channel
(used by the Libertas WLAN module) without link to power regulator.
This causes the SDIO module to fail being detected.

This patch adds the two regulators that actually feed the WLAN module
(1v8 from the TWL4030 VIO LDO, and a fixed 3v3). With that patch, the
second channel is properly detected. Details of the power supply
implementation were kindly provided by Enric Balletbo i Serra.

Also change vmmc1 to use symbolic names instead of direct device
reference.

Tested on an IGEPv2 Rev-B.

Signed-off-by: Marc Zyngier m...@misterjones.org
Acked-by: Enric Balletbo i Serra eballe...@gmail.com
Cc: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-igep0020.c |   61 -
 1 files changed, 51 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 5e035a5..9a85e60 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -19,6 +19,7 @@
 #include linux/interrupt.h
 
 #include linux/regulator/machine.h
+#include linux/regulator/fixed.h
 #include linux/i2c/twl.h
 #include linux/mmc/host.h
 
@@ -257,9 +258,8 @@ static inline void __init igep2_init_smsc911x(void) { }
 static struct omap_board_config_kernel igep2_config[] __initdata = {
 };
 
-static struct regulator_consumer_supply igep2_vmmc1_supply = {
-   .supply = vmmc,
-};
+static struct regulator_consumer_supply igep2_vmmc1_supply =
+   REGULATOR_SUPPLY(vmmc, mmci-omap-hs.0);
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep2_vmmc1 = {
@@ -276,6 +276,52 @@ static struct regulator_init_data igep2_vmmc1 = {
.consumer_supplies  = igep2_vmmc1_supply,
 };
 
+static struct regulator_consumer_supply igep2_vio_supply =
+   REGULATOR_SUPPLY(vmmc_aux, mmci-omap-hs.1);
+
+static struct regulator_init_data igep2_vio = {
+   .constraints = {
+   .min_uV = 180,
+   .max_uV = 180,
+   .apply_uV   = 1,
+   .valid_modes_mask   = REGULATOR_MODE_NORMAL
+   | REGULATOR_MODE_STANDBY,
+   .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
+   | REGULATOR_CHANGE_MODE
+   | REGULATOR_CHANGE_STATUS,
+   },
+   .num_consumer_supplies  = 1,
+   .consumer_supplies  = igep2_vio_supply,
+};
+
+static struct regulator_consumer_supply igep2_vmmc2_supply =
+   REGULATOR_SUPPLY(vmmc, mmci-omap-hs.1);
+
+static struct regulator_init_data igep2_vmmc2 = {
+   .constraints= {
+   .valid_modes_mask   = REGULATOR_MODE_NORMAL,
+   .always_on  = 1,
+   },
+   .num_consumer_supplies  = 1,
+   .consumer_supplies  = igep2_vmmc2_supply,
+};
+
+static struct fixed_voltage_config igep2_vwlan = {
+   .supply_name= vwlan,
+   .microvolts = 330,
+   .gpio   = -EINVAL,
+   .enabled_at_boot= 1,
+   .init_data  = igep2_vmmc2,
+};
+
+static struct platform_device igep2_vwlan_device = {
+   .name   = reg-fixed-voltage,
+   .id = 0,
+   .dev = {
+   .platform_data  = igep2_vwlan,
+   },
+};
+
 static struct omap2_hsmmc_info mmc[] = {
{
.mmc= 1,
@@ -373,12 +419,6 @@ static int igep2_twl_gpio_setup(struct device *dev,
omap2_hsmmc_init(mmc);
 
/*
-* link regulators to MMC adapters ... we know the
-* regulators will be set up only *after* we return.
-*/
-   igep2_vmmc1_supply.dev = mmc[0].dev;
-
-   /*
 * REVISIT: need ehci-omap hooks for external VBUS
 * power switch and overcurrent detect
 */
@@ -489,6 +529,7 @@ static void __init igep2_display_init(void)
 
 static struct platform_device *igep2_devices[] __initdata = {
igep2_dss_device,
+   igep2_vwlan_device,
 };
 
 static void __init igep2_init_irq(void)
@@ -519,7 +560,7 @@ static struct twl4030_platform_data igep2_twldata = {
.gpio   = igep2_twl4030_gpio_pdata,
.vmmc1  = igep2_vmmc1,
.vpll2  = igep2_vpll2,
-
+   .vio= igep2_vio,
 };
 
 static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {
-- 
1.7.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] musb: am35x: fix compile error due to control apis

2010-12-04 Thread Gupta, Ajay Kumar
  As the control.h have been moved to new location and it's
  uses are not allowed to drivers directly so moving the phy
  control, interrupt clear and reset functionality to board
  files.
 
  Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
  ---
  Patch created against today's linus tree.
 
 I hope this is a short-term fix only; otherwise you will need
 to duplicate this code in all boards that use an AM3517.

most of the stuff are in usb-musb.c so can be reused by all the boards.
Only the musb reset part is added in board file.

Ajay
 
 - Anand
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] musb: am35x: fix compile error due to control apis

2010-12-04 Thread Gupta, Ajay Kumar
  diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-
 musb.c
  index 7260558..1f32fdb 100644
  --- a/arch/arm/mach-omap2/usb-musb.c
  +++ b/arch/arm/mach-omap2/usb-musb.c
  @@ -33,6 +33,82 @@
 
   #ifdef CONFIG_USB_MUSB_SOC
 
  +static void am35x_musb_phy_power(u8 on)
  +{
  +   unsigned long timeout = jiffies + msecs_to_jiffies(100);
  +   u32 devconf2;
  +
  +   if (on) {
  +   /*
  +* Start the on-chip PHY and its PLL.
  +*/
  +   devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
  +
  +   devconf2 = ~(CONF2_RESET | CONF2_PHYPWRDN | CONF2_OTGPWRDN);
  +   devconf2 |= CONF2_PHY_PLLON;
  +
  +   omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2);
  +
  +   printk(KERN_INFO Waiting for PHY clock good...\n);
 
 pr_info().

This file already uses printk() so used it for uniformity.
 
  +   while (!(omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2)
  +CONF2_PHYCLKGD)) {
  +   cpu_relax();
  +
  +   if (time_after(jiffies, timeout)) {
  +   printk(KERN_ERR musb PHY clock good timed
 out\n);
 
 pr_err().
 
  diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-
 omap/include/plat/usb.h
  index 59c7fe7..4299097 100644
  --- a/arch/arm/plat-omap/include/plat/usb.h
  +++ b/arch/arm/plat-omap/include/plat/usb.h
  @@ -69,6 +69,9 @@ struct omap_musb_board_data {
  u8  mode;
  u16 power;
  unsigned extvbus:1;
  +   void(*set_phy_power) (u8 on);
  +   void(*clear_irq) (void);
  +   void(*set_mode) (u8 mode);
 
 Should be no spaces between ) and (. scripts/checkpatch.pl used to
 complain
 about such things, now it's silent though...
Yes, I tried with ./scripts/checkpatch and didn't get any error/warning.

 
  @@ -364,37 +324,21 @@ eoi:
 
   int musb_platform_set_mode(struct musb *musb, u8 musb_mode)
   {
  -   u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
  +   struct device *dev = musb-controller;
  +   struct musb_hdrc_platform_data *plat = dev-platform_data;
  +   struct omap_musb_board_data *data = plat-board_data;
 
  -   devconf2 = ~CONF2_OTGMODE;
  -   switch (musb_mode) {
  -#ifdef CONFIG_USB_MUSB_HDRC_HCD
  -   case MUSB_HOST: /* Force VBUS valid, ID = 0 */
  -   devconf2 |= CONF2_FORCE_HOST;
  -   break;
  -#endif
  -#ifdef CONFIG_USB_GADGET_MUSB_HDRC
  -   case MUSB_PERIPHERAL:   /* Force VBUS valid, ID = 1 */
  -   devconf2 |= CONF2_FORCE_DEVICE;
  -   break;
  -#endif
  -#ifdef CONFIG_USB_MUSB_OTG
  -   case MUSB_OTG:  /* Don't override the VBUS/ID comparators */
  -   devconf2 |= CONF2_NO_OVERRIDE;
  -   break;
  -#endif
  -   default:
  -   DBG(2, Trying to set unsupported mode %u\n, musb_mode);
  -   }
  +   if (data-set_mode)
  +   data-set_mode(musb_mode);
 
 You should return -EIO if data-set_mode is NULL.
Ok fine...

Ajay
 
 WBR, Sergei

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Patches to make multi-soc handling in entry-armv.S easier

2010-12-04 Thread Tony Lindgren
* Nicolas Pitre n...@fluxnic.net [101203 21:39]:
 On Fri, 3 Dec 2010, Tony Lindgren wrote:
 
  Hi all,
  
  I've got some patches almost ready to go to merge the omap1
  configs into a single omap1_defconfig. While working on getting
  that done, I had to come up with a better solution for entry-armv.S
  macros to detect the soc we're running on.
  
  I suggest we add asm_irq_base and asm_irq_flags as in the first
  patch in this series does. This way we can do the soc based detection
  in init_irq or similar place. This might help also the multi-arm
  work too.
 
 Did you see Eric Miao's patch series that introduces runtime IRQ demux 
 handler support?
 
 http://www.spinics.net/linux/lists/arm-kernel/msg92836.html
 
 That is likely to be a better solution.

Yeah that works too, although is a bit heavier for simple cases.

In the omap case just the irq base is different between omap2 vs omap3.
And only level2 interrupt bit is different omap7xx vs omap16xx.

Handling the difference between omap2/3 and omap4 would be the use
case for handle_arch_irq. Currently that too can be handled
without handle_arch_irq, but from multi-arm point of view
handle_arch_irq is needed in the long run.

I can do things either way quite easily for sure. But my preference
would be to have both options available. This is because asm_irq_base
and asm_irq_flags can be used to reduce 15 omap1 defconfigs into one
defconfig with quite minimal changes. And for omap2+, these patches
allow getting rid of the SoC detection code in entry-macro.S. Also,
after these patches, moving to use handle_arch_irq can be done a bit
easier later on.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 00/11] OMAP: GPIO: Implement GPIO as platform device

2010-12-04 Thread Tony Lindgren
* Varadarajan, Charulatha ch...@ti.com [101202 06:08]:
 On Thu, Dec 2, 2010 at 15:28, Kevin Hilman khil...@deeprootsystems.com 
 wrote:
 
 
  Tony, you can also add
 
  Acked-by: Kevin Hilman khil...@deeprootsystems.com

OK, updated. Also made one more GPIO patch to allow us to deal
with the 7xx vs 15xx/16xx MPUIO registers.

Regards,

Tony
From: Tony Lindgren t...@atomide.com
Date: Sat, 4 Dec 2010 12:39:43 -0800
Subject: [PATCH] omap1: Fix gpio mpuio bank to work for multi-omap for 7xx/15xx/16xx

We need to multiply the 7xx offset by 2 for 15xx/16xx. Use bank-stride
for that. This allows us to get rid of the duplicate defines for the
MPUIO registers.

Signed-off-by: Tony Lindgren t...@atomide.com

--- a/arch/arm/mach-omap1/gpio15xx.c
+++ b/arch/arm/mach-omap1/gpio15xx.c
@@ -38,6 +38,7 @@ static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = {
 	.virtual_irq_start	= IH_MPUIO_BASE,
 	.bank_type		= METHOD_MPUIO,
 	.bank_width		= 16,
+	.bank_stride		= 2,
 };
 
 static struct __initdata platform_device omap15xx_mpu_gpio = {
--- a/arch/arm/mach-omap1/gpio16xx.c
+++ b/arch/arm/mach-omap1/gpio16xx.c
@@ -41,6 +41,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = {
 	.virtual_irq_start	= IH_MPUIO_BASE,
 	.bank_type		= METHOD_MPUIO,
 	.bank_width		= 16,
+	.bank_stride		= 2,
 };
 
 static struct __initdata platform_device omap16xx_mpu_gpio = {
--- a/arch/arm/mach-omap1/gpio7xx.c
+++ b/arch/arm/mach-omap1/gpio7xx.c
@@ -43,6 +43,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = {
 	.virtual_irq_start	= IH_MPUIO_BASE,
 	.bank_type		= METHOD_MPUIO,
 	.bank_width		= 32,
+	.bank_stride		= 1,
 };
 
 static struct __initdata platform_device omap7xx_mpu_gpio = {
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -159,6 +159,7 @@ struct gpio_bank {
 	u32 dbck_enable_mask;
 	struct device *dev;
 	bool dbck_flag;
+	int stride;
 };
 
 #ifdef CONFIG_ARCH_OMAP3
@@ -267,7 +268,7 @@ static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input)
 	switch (bank-method) {
 #ifdef CONFIG_ARCH_OMAP1
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_IO_CNTL;
+		reg += OMAP_MPUIO_IO_CNTL * bank-stride;
 		break;
 #endif
 #ifdef CONFIG_ARCH_OMAP15XX
@@ -315,7 +316,7 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
 	switch (bank-method) {
 #ifdef CONFIG_ARCH_OMAP1
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_OUTPUT;
+		reg += OMAP_MPUIO_OUTPUT * bank-stride;
 		l = __raw_readl(reg);
 		if (enable)
 			l |= 1  gpio;
@@ -387,7 +388,7 @@ static int _get_gpio_datain(struct gpio_bank *bank, int gpio)
 	switch (bank-method) {
 #ifdef CONFIG_ARCH_OMAP1
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_INPUT_LATCH;
+		reg += OMAP_MPUIO_INPUT_LATCH * bank-stride;
 		break;
 #endif
 #ifdef CONFIG_ARCH_OMAP15XX
@@ -433,7 +434,7 @@ static int _get_gpio_dataout(struct gpio_bank *bank, int gpio)
 	switch (bank-method) {
 #ifdef CONFIG_ARCH_OMAP1
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_OUTPUT;
+		reg += OMAP_MPUIO_OUTPUT * bank-stride;
 		break;
 #endif
 #ifdef CONFIG_ARCH_OMAP15XX
@@ -620,7 +621,7 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio)
 
 	switch (bank-method) {
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_GPIO_INT_EDGE;
+		reg += OMAP_MPUIO_GPIO_INT_EDGE * bank-stride;
 		break;
 #ifdef CONFIG_ARCH_OMAP15XX
 	case METHOD_GPIO_1510:
@@ -654,7 +655,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
 	switch (bank-method) {
 #ifdef CONFIG_ARCH_OMAP1
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_GPIO_INT_EDGE;
+		reg += OMAP_MPUIO_GPIO_INT_EDGE * bank-stride;
 		l = __raw_readl(reg);
 		if ((trigger  IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH)
 			bank-toggle_mask |= 1  gpio;
@@ -840,7 +841,7 @@ static u32 _get_gpio_irqbank_mask(struct gpio_bank *bank)
 	switch (bank-method) {
 #ifdef CONFIG_ARCH_OMAP1
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_GPIO_MASKIT;
+		reg += OMAP_MPUIO_GPIO_MASKIT * bank-stride;
 		mask = 0x;
 		inv = 1;
 		break;
@@ -897,7 +898,7 @@ static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enab
 	switch (bank-method) {
 #ifdef CONFIG_ARCH_OMAP1
 	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_GPIO_MASKIT;
+		reg += OMAP_MPUIO_GPIO_MASKIT * bank-stride;
 		l = __raw_readl(reg);
 		if (enable)
 			l = ~(gpio_mask);
@@ -1147,7 +1148,8 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 	bank = get_irq_data(irq);
 #ifdef CONFIG_ARCH_OMAP1
 	if (bank-method == METHOD_MPUIO)
-		isr_reg = bank-base + OMAP_MPUIO_GPIO_INT;
+		isr_reg = bank-base +
+OMAP_MPUIO_GPIO_INT * bank-stride;
 #endif
 #ifdef CONFIG_ARCH_OMAP15XX
 	if (bank-method == METHOD_GPIO_1510)
@@ -1340,7 +1342,8 @@ static int omap_mpuio_suspend_noirq(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct gpio_bank	*bank = platform_get_drvdata(pdev);
-	void __iomem		*mask_reg = bank-base + OMAP_MPUIO_GPIO_MASKIT;

[PATCH 0/5] Few misc patches for v2.6.38 merge window

2010-12-04 Thread Tony Lindgren
Hi,

Here are some misc patches for review.

Regards,

Tony

---

Evgeny Kuznetsov (1):
  omap: Ptr isr_reg tracked as NULL was dereferenced

Jarkko Nikula (1):
  omap: McBSP: Fix potential memory leak in omap_mcbsp_remove

Shubhrajyoti D (1):
  omap: McBSP: Make the free variable update more readable

Tony Lindgren (2):
  Fix undefined reference to omap2_i2c_mux_pins
  omap: Don't select mux by default for each board


 arch/arm/mach-omap2/Kconfig |4 
 arch/arm/plat-omap/gpio.c   |5 +
 arch/arm/plat-omap/i2c.c|7 +++
 arch/arm/plat-omap/mcbsp.c  |   16 +---
 4 files changed, 17 insertions(+), 15 deletions(-)

-- 
Signature
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/5] Fix undefined reference to omap2_i2c_mux_pins

2010-12-04 Thread Tony Lindgren
In some cases we can get error function `omap2_i2c_add_bus':
arch/arm/plat-omap/i2c.c:136: undefined reference to `omap2_i2c_mux_pins'
arch/arm/plat-omap/i2c.c:141: undefined reference to `omap_hwmod_lookup'
arch/arm/plat-omap/i2c.c:157: undefined reference to `omap_device_build'

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/i2c.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index a5bff9c..21fc937 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -125,6 +125,7 @@ static struct omap_device_pm_latency omap_i2c_latency[] = {
},
 };
 
+#ifdef CONFIG_ARCH_OMAP2PLUS
 static inline int omap2_i2c_add_bus(int bus_id)
 {
int l;
@@ -161,6 +162,12 @@ static inline int omap2_i2c_add_bus(int bus_id)
 
return PTR_ERR(od);
 }
+#else
+static inline int omap2_i2c_add_bus(int bus_id)
+{
+   return 0;
+}
+#endif
 
 static int __init omap_i2c_add_bus(int bus_id)
 {

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] omap: Ptr isr_reg tracked as NULL was dereferenced

2010-12-04 Thread Tony Lindgren
From: Evgeny Kuznetsov ext-eugeny.kuznet...@nokia.com

Value of isr_reg pointer is depend on configuration and GPIO method.
Potentially it may have NULL value and it is dereferenced later
in code. Warning and exit from function are added in this case.

Signed-off-by: Evgeny Kuznetsov ext-eugeny.kuznet...@nokia.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/gpio.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 28d28e4..28106b4 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1171,6 +1171,10 @@ static void gpio_irq_handler(unsigned int irq, struct 
irq_desc *desc)
if (bank-method == METHOD_GPIO_44XX)
isr_reg = bank-base + OMAP4_GPIO_IRQSTATUS0;
 #endif
+
+   if (WARN_ON(!isr_reg))
+   goto exit;
+
while(1) {
u32 isr_saved, level_mask = 0;
u32 enabled;
@@ -1230,6 +1234,7 @@ static void gpio_irq_handler(unsigned int irq, struct 
irq_desc *desc)
configured, we must unmask the bank interrupt only after
handler(s) are executed in order to avoid spurious bank
interrupt */
+exit:
if (!unmasked)
desc-chip-unmask(irq);
 

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/5] omap: McBSP: Fix potential memory leak in omap_mcbsp_remove

2010-12-04 Thread Tony Lindgren
From: Jarkko Nikula jhnik...@gmail.com

Function omap_mcbsp_probe allocates struct omap_mcbsp *mcbsp but it is not
freed in omap_mcbsp_remove. Fix this, remove unneeded structure cleanups
and clk_disable calls since they are not needed here.

This is not problem currently but becomes if the mcbsp driver is ever
modularized.

Signed-off-by: Jarkko Nikula jhnik...@gmail.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/mcbsp.c |8 +---
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index eac4b97..f79090c 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -1836,17 +1836,11 @@ static int __devexit omap_mcbsp_remove(struct 
platform_device *pdev)
 
omap34xx_device_exit(mcbsp);
 
-   clk_disable(mcbsp-fclk);
-   clk_disable(mcbsp-iclk);
clk_put(mcbsp-fclk);
clk_put(mcbsp-iclk);
 
iounmap(mcbsp-io_base);
-
-   mcbsp-fclk = NULL;
-   mcbsp-iclk = NULL;
-   mcbsp-free = 0;
-   mcbsp-dev = NULL;
+   kfree(mcbsp);
}
 
return 0;

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/5] omap: McBSP: Make the free variable update more readable

2010-12-04 Thread Tony Lindgren
From: Shubhrajyoti D shubhrajy...@ti.com

Using true/false instead of 1/0 to update the free variable.

Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
Acked-by: Jarkko Nikula jhnik...@gmail.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/mcbsp.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index f79090c..fdecd33 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -755,7 +755,7 @@ int omap_mcbsp_request(unsigned int id)
goto err_kfree;
}
 
-   mcbsp-free = 0;
+   mcbsp-free = false;
mcbsp-reg_cache = reg_cache;
spin_unlock(mcbsp-lock);
 
@@ -815,7 +815,7 @@ err_clk_disable:
clk_disable(mcbsp-iclk);
 
spin_lock(mcbsp-lock);
-   mcbsp-free = 1;
+   mcbsp-free = true;
mcbsp-reg_cache = NULL;
 err_kfree:
spin_unlock(mcbsp-lock);
@@ -858,7 +858,7 @@ void omap_mcbsp_free(unsigned int id)
if (mcbsp-free)
dev_err(mcbsp-dev, McBSP%d was not reserved\n, mcbsp-id);
else
-   mcbsp-free = 1;
+   mcbsp-free = true;
mcbsp-reg_cache = NULL;
spin_unlock(mcbsp-lock);
 
@@ -1771,7 +1771,7 @@ static int __devinit omap_mcbsp_probe(struct 
platform_device *pdev)
 
spin_lock_init(mcbsp-lock);
mcbsp-id = id + 1;
-   mcbsp-free = 1;
+   mcbsp-free = true;
mcbsp-dma_tx_lch = -1;
mcbsp-dma_rx_lch = -1;
 

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] omap: Don't select mux by default for each board

2010-12-04 Thread Tony Lindgren
This should be only selected in CONFIG_ARCH_OMAP2PLUS_TYPICAL
to make it easy to disable.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/Kconfig |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fc3a181..144e7bb 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -134,7 +134,6 @@ config MACH_DEVKIT8000
depends on ARCH_OMAP3
default y
select OMAP_PACKAGE_CUS
-   select OMAP_MUX
 
 config MACH_OMAP_LDP
bool OMAP3 LDP board
@@ -250,14 +249,12 @@ config MACH_CM_T35
depends on ARCH_OMAP3
default y
select OMAP_PACKAGE_CUS
-   select OMAP_MUX
 
 config MACH_CM_T3517
bool CompuLab CM-T3517 module
depends on ARCH_OMAP3
default y
select OMAP_PACKAGE_CBB
-   select OMAP_MUX
 
 config MACH_IGEP0020
bool IGEP v2 board
@@ -276,7 +273,6 @@ config MACH_SBC3530
depends on ARCH_OMAP3
default y
select OMAP_PACKAGE_CUS
-   select OMAP_MUX
 
 config MACH_OMAP_3630SDP
bool OMAP3630 SDP board

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] Create omap1_defconfig, remove other omap1 configs

2010-12-04 Thread Tony Lindgren
Hi all,

This series allows us to get rid of 15 omap1 defconfigs
for various boards.

Based on the recent GPIO patches and depends on the asm_irq
patches posted earlier. For testing, it's probably easiest
to use the devel-omap1 branch in the linux-omap git tree.

Regards,

Tony

---

Tony Lindgren (4):
  omap: Disable omap_read/write functions for omap2+
  omap1: Add initcall checks for omap1 and booted board
  omap1: Add omap1_defconfig
  omap1: Delete old defconfigs


 arch/arm/configs/ams_delta_defconfig   |  121 --
 arch/arm/configs/htcherald_defconfig   |   73 --
 arch/arm/configs/n770_defconfig|  138 
 arch/arm/configs/omap1_defconfig   |  286 
 arch/arm/configs/omap_generic_1510_defconfig   |   84 ---
 arch/arm/configs/omap_generic_1610_defconfig   |   87 ---
 arch/arm/configs/omap_generic_1710_defconfig   |   75 --
 arch/arm/configs/omap_h2_1610_defconfig|  109 -
 arch/arm/configs/omap_innovator_1510_defconfig |  102 -
 arch/arm/configs/omap_innovator_1610_defconfig |   58 -
 arch/arm/configs/omap_osk_5912_defconfig   |   87 ---
 arch/arm/configs/omap_perseus2_730_defconfig   |   65 -
 arch/arm/configs/palmte_defconfig  |   48 
 arch/arm/configs/palmtt_defconfig  |   56 -
 arch/arm/configs/palmz71_defconfig |   53 
 arch/arm/configs/sx1_defconfig |  110 -
 arch/arm/mach-omap1/board-ams-delta.c  |3 
 arch/arm/mach-omap1/board-voiceblue.c  |6 +
 arch/arm/mach-omap1/devices.c  |3 
 arch/arm/mach-omap1/lcd_dma.c  |3 
 arch/arm/mach-omap1/leds.c |3 
 arch/arm/mach-omap1/mcbsp.c|3 
 arch/arm/mach-omap1/pm.c   |3 
 arch/arm/mach-omap1/pm_bus.c   |3 
 arch/arm/mach-omap1/serial.c   |3 
 arch/arm/plat-omap/include/plat/io.h   |   45 
 arch/arm/plat-omap/io.c|   36 +--
 27 files changed, 372 insertions(+), 1291 deletions(-)
 delete mode 100644 arch/arm/configs/ams_delta_defconfig
 delete mode 100644 arch/arm/configs/htcherald_defconfig
 delete mode 100644 arch/arm/configs/n770_defconfig
 create mode 100644 arch/arm/configs/omap1_defconfig
 delete mode 100644 arch/arm/configs/omap_generic_1510_defconfig
 delete mode 100644 arch/arm/configs/omap_generic_1610_defconfig
 delete mode 100644 arch/arm/configs/omap_generic_1710_defconfig
 delete mode 100644 arch/arm/configs/omap_h2_1610_defconfig
 delete mode 100644 arch/arm/configs/omap_innovator_1510_defconfig
 delete mode 100644 arch/arm/configs/omap_innovator_1610_defconfig
 delete mode 100644 arch/arm/configs/omap_osk_5912_defconfig
 delete mode 100644 arch/arm/configs/omap_perseus2_730_defconfig
 delete mode 100644 arch/arm/configs/palmte_defconfig
 delete mode 100644 arch/arm/configs/palmtt_defconfig
 delete mode 100644 arch/arm/configs/palmz71_defconfig
 delete mode 100644 arch/arm/configs/sx1_defconfig

-- 
Signature
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] omap: Disable omap_read/write functions for omap2+

2010-12-04 Thread Tony Lindgren
These should be now long gone and break multi-omap support for omap1
as the cpu_class_is_omap1() won't work until the SOC is detected.

So just disable and warn for omap2+ in case somebody still attampts
to use these.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/include/plat/io.h |   45 ++
 arch/arm/plat-omap/io.c  |   36 ---
 2 files changed, 56 insertions(+), 25 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/io.h 
b/arch/arm/plat-omap/include/plat/io.h
index 128b549..af20a9e 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -247,6 +247,8 @@
  * NOTE: Please use ioremap + __raw_read/write where possible instead of these
  */
 
+#ifdef CONFIG_ARCH_OMAP1
+
 extern u8 omap_readb(u32 pa);
 extern u16 omap_readw(u32 pa);
 extern u32 omap_readl(u32 pa);
@@ -254,6 +256,49 @@ extern void omap_writeb(u8 v, u32 pa);
 extern void omap_writew(u16 v, u32 pa);
 extern void omap_writel(u32 v, u32 pa);
 
+#else
+
+static inline void _bad_access(u32 pa)
+{
+   pr_err(Bad register access at pa 0x%08x\n, pa);
+   WARN_ON(1);
+}
+
+static inline u8 omap_readb(u32 pa)
+{
+   _bad_access(pa);
+   return 0;
+}
+
+static inline u16 omap_readw(u32 pa)
+{
+   _bad_access(pa);
+   return 0;
+}
+
+static inline u16 omap_readl(u32 pa)
+{
+   _bad_access(pa);
+   return 0;
+}
+
+static inline void omap_writeb(u8 v, u32 pa)
+{
+   _bad_access(pa);
+}
+
+static inline void omap_writew(u8 v, u32 pa)
+{
+   _bad_access(pa);
+}
+
+static inline void omap_writel(u8 v, u32 pa)
+{
+   _bad_access(pa);
+}
+
+#endif
+
 struct omap_sdrc_params;
 
 extern void omap1_map_common_io(void);
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index b0078cf..b89182b 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -138,59 +138,45 @@ void omap_iounmap(volatile void __iomem *addr)
 EXPORT_SYMBOL(omap_iounmap);
 
 /*
- * NOTE: Please use ioremap + __raw_read/write where possible instead of these
+ * NOTE: Please use ioremap + __raw_read/write where possible instead of these.
+ * These are only working for omap1 and will disappear eventually.
  */
+#ifdef CONFIG_ARCH_OMAP1
 
 u8 omap_readb(u32 pa)
 {
-   if (cpu_class_is_omap1())
-   return __raw_readb(OMAP1_IO_ADDRESS(pa));
-   else
-   return __raw_readb(OMAP2_L4_IO_ADDRESS(pa));
+   return __raw_readb(OMAP1_IO_ADDRESS(pa));
 }
 EXPORT_SYMBOL(omap_readb);
 
 u16 omap_readw(u32 pa)
 {
-   if (cpu_class_is_omap1())
-   return __raw_readw(OMAP1_IO_ADDRESS(pa));
-   else
-   return __raw_readw(OMAP2_L4_IO_ADDRESS(pa));
+   return __raw_readw(OMAP1_IO_ADDRESS(pa));
 }
 EXPORT_SYMBOL(omap_readw);
 
 u32 omap_readl(u32 pa)
 {
-   if (cpu_class_is_omap1())
-   return __raw_readl(OMAP1_IO_ADDRESS(pa));
-   else
-   return __raw_readl(OMAP2_L4_IO_ADDRESS(pa));
+   return __raw_readl(OMAP1_IO_ADDRESS(pa));
 }
 EXPORT_SYMBOL(omap_readl);
 
 void omap_writeb(u8 v, u32 pa)
 {
-   if (cpu_class_is_omap1())
-   __raw_writeb(v, OMAP1_IO_ADDRESS(pa));
-   else
-   __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa));
+   __raw_writeb(v, OMAP1_IO_ADDRESS(pa));
 }
 EXPORT_SYMBOL(omap_writeb);
 
 void omap_writew(u16 v, u32 pa)
 {
-   if (cpu_class_is_omap1())
-   __raw_writew(v, OMAP1_IO_ADDRESS(pa));
-   else
-   __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa));
+   __raw_writew(v, OMAP1_IO_ADDRESS(pa));
 }
 EXPORT_SYMBOL(omap_writew);
 
 void omap_writel(u32 v, u32 pa)
 {
-   if (cpu_class_is_omap1())
-   __raw_writel(v, OMAP1_IO_ADDRESS(pa));
-   else
-   __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa));
+   __raw_writel(v, OMAP1_IO_ADDRESS(pa));
 }
 EXPORT_SYMBOL(omap_writel);
+
+#endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] omap1: Add initcall checks for omap1 and booted board

2010-12-04 Thread Tony Lindgren
Otherwise multi-omap1 configurations will fail.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/board-ams-delta.c |3 +++
 arch/arm/mach-omap1/board-voiceblue.c |6 ++
 arch/arm/mach-omap1/devices.c |3 +++
 arch/arm/mach-omap1/lcd_dma.c |3 +++
 arch/arm/mach-omap1/leds.c|3 +++
 arch/arm/mach-omap1/mcbsp.c   |3 +++
 arch/arm/mach-omap1/pm.c  |3 +++
 arch/arm/mach-omap1/pm_bus.c  |3 +++
 arch/arm/mach-omap1/serial.c  |3 +++
 9 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap1/board-ams-delta.c 
b/arch/arm/mach-omap1/board-ams-delta.c
index ce4d69c..e143950 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -338,6 +338,9 @@ static int __init ams_delta_modem_init(void)
 {
int err;
 
+   if (!machine_is_ams_delta())
+   return -ENODEV;
+
omap_cfg_reg(M14_1510_GPIO2);
ams_delta_modem_ports[0].irq =
gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
diff --git a/arch/arm/mach-omap1/board-voiceblue.c 
b/arch/arm/mach-omap1/board-voiceblue.c
index 789f5ba..815a69c 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -83,6 +83,9 @@ static struct platform_device serial_device = {
 
 static int __init ext_uart_init(void)
 {
+   if (!machine_is_voiceblue())
+   return -ENODEV;
+
return platform_device_register(serial_device);
 }
 arch_initcall(ext_uart_init);
@@ -235,6 +238,9 @@ static struct notifier_block panic_block = {
 
 static int __init voiceblue_setup(void)
 {
+   if (!machine_is_voiceblue())
+   return -ENODEV;
+
/* Setup panic notifier */
atomic_notifier_chain_register(panic_notifier_list, panic_block);
 
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 86ad38a..b0f4c23 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -288,6 +288,9 @@ static inline void omap_init_audio(void) {}
  */
 static int __init omap1_init_devices(void)
 {
+   if (!cpu_class_is_omap1())
+   return -ENODEV;
+
/* please keep these calls, and their implementations above,
 * in alphabetical order so they're easier to sort through.
 */
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 3be11af..c9088d8 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -424,6 +424,9 @@ static int __init omap_init_lcd_dma(void)
 {
int r;
 
+   if (!cpu_class_is_omap1())
+   return -ENODEV;
+
if (cpu_is_omap16xx()) {
u16 w;
 
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c
index 277f356..22eb11d 100644
--- a/arch/arm/mach-omap1/leds.c
+++ b/arch/arm/mach-omap1/leds.c
@@ -17,6 +17,9 @@
 static int __init
 omap_leds_init(void)
 {
+   if (!cpu_class_is_omap1())
+   return -ENODEV;
+
if (machine_is_omap_innovator())
leds_event = innovator_leds_event;
 
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index 372ea71..8209736 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -176,6 +176,9 @@ static struct omap_mcbsp_platform_data 
omap16xx_mcbsp_pdata[] = {
 
 static int __init omap1_mcbsp_init(void)
 {
+   if (!cpu_class_is_omap1())
+   return -ENODEV;
+
if (cpu_is_omap7xx()) {
omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16);
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index b1d3f9f..0cca23a 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -661,6 +661,9 @@ static int __init omap_pm_init(void)
int error;
 #endif
 
+   if (!cpu_class_is_omap1())
+   return -ENODEV;
+
printk(Power Management for TI OMAP.\n);
 
/*
diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c
index 8b66392..3266447 100644
--- a/arch/arm/mach-omap1/pm_bus.c
+++ b/arch/arm/mach-omap1/pm_bus.c
@@ -73,6 +73,9 @@ static int __init omap1_pm_runtime_init(void)
const struct dev_pm_ops *pm;
struct dev_pm_ops *omap_pm;
 
+   if (!cpu_class_is_omap1())
+   return -ENODEV;
+
pm = platform_bus_get_pm_ops();
if (!pm) {
pr_err(%s: unable to get dev_pm_ops from platform_bus\n,
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 9e1c4d4..550ca9d 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -258,6 +258,9 @@ late_initcall(omap_serial_wakeup_init);
 
 static int __init omap_init(void)
 {
+   if (!cpu_class_is_omap1())
+   return -ENODEV;
+
return 

[PATCH 3/4] omap1: Add omap1_defconfig

2010-12-04 Thread Tony Lindgren
The omap1_defconfig this should be eventually usable for booting
all omap1 machines. Generated based on:

$ grep ARCH_OMAP1=y arch/arm/configs/* | cut -d: -f1 | xargs cat | \
 sort | uniq  arch/arm/configs/omap1_defconfig

Then change few things manually, like use Nokia 770 CONFIG_CMDLINE
as it does not allow setting it in the bootloader.

After make oldconfig, ran reduce_defconfig python script on it
as posted by Uwe Kleine-König u.kleine-koe...@pengutronix.de:

http://lkml.org/lkml/2010/7/13/134

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/omap1_defconfig |  286 ++
 1 files changed, 286 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap1_defconfig

diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
new file mode 100644
index 000..217d7dd
--- /dev/null
+++ b/arch/arm/configs/omap1_defconfig
@@ -0,0 +1,286 @@
+CONFIG_EXPERIMENTAL=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_IKCONFIG=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_EMBEDDED=y
+# CONFIG_KALLSYMS is not set
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+# CONFIG_SHMEM is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_SLOB=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_LBDAF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP1=y
+CONFIG_OMAP_RESET_CLOCKS=y
+# CONFIG_OMAP_MUX is not set
+CONFIG_OMAP_MBOX_FWK=y
+CONFIG_OMAP_32K_TIMER=y
+CONFIG_OMAP_DM_TIMER=y
+CONFIG_ARCH_OMAP730=y
+CONFIG_ARCH_OMAP850=y
+CONFIG_ARCH_OMAP16XX=y
+CONFIG_MACH_OMAP_INNOVATOR=y
+CONFIG_MACH_OMAP_H2=y
+CONFIG_MACH_OMAP_H3=y
+CONFIG_MACH_OMAP_HTCWIZARD=y
+CONFIG_MACH_HERALD=y
+CONFIG_MACH_OMAP_OSK=y
+CONFIG_MACH_OMAP_PERSEUS2=y
+CONFIG_MACH_OMAP_FSAMPLE=y
+CONFIG_MACH_VOICEBLUE=y
+CONFIG_MACH_OMAP_PALMTE=y
+CONFIG_MACH_OMAP_PALMZ71=y
+CONFIG_MACH_OMAP_PALMTT=y
+CONFIG_MACH_SX1=y
+CONFIG_MACH_NOKIA770=y
+CONFIG_MACH_AMS_DELTA=y
+CONFIG_MACH_OMAP_GENERIC=y
+CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER=y
+CONFIG_OMAP_ARM_216MHZ=y
+CONFIG_OMAP_ARM_195MHZ=y
+CONFIG_OMAP_ARM_192MHZ=y
+CONFIG_OMAP_ARM_182MHZ=y
+CONFIG_OMAP_ARM_168MHZ=y
+# CONFIG_OMAP_ARM_60MHZ is not set
+# CONFIG_ARM_THUMB is not set
+CONFIG_PCCARD=y
+CONFIG_OMAP_CF=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_LEDS=y
+CONFIG_LEDS_CPU=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=root=1f03 rootfstype=jffs2
+CONFIG_FPE_NWFPE=y
+CONFIG_BINFMT_MISC=y
+CONFIG_PM=y
+# CONFIG_SUSPEND is not set
+CONFIG_PM_RUNTIME=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_NET_KEY=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_IPV6=y
+CONFIG_NETFILTER=y
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_HIDP=y
+CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_DEBUG_DRIVER=y
+CONFIG_CONNECTOR=y
+# CONFIG_PROC_EVENTS is not set
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=3
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_NAND=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=2
+CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_IDE=m
+CONFIG_BLK_DEV_IDECS=m
+CONFIG_SCSI=y
+# CONFIG_SCSI_PROC_FS is not set
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_NETDEVICES=y
+CONFIG_TUN=y
+CONFIG_PHYLIB=y
+CONFIG_NET_ETHERNET=y
+CONFIG_SMC91X=y
+CONFIG_USB_CATC=y
+CONFIG_USB_KAWETH=y
+CONFIG_USB_PEGASUS=y
+CONFIG_USB_RTL8150=y
+CONFIG_USB_USBNET=y
+# CONFIG_USB_NET_AX8817X is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_PPP=y
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=y
+CONFIG_PPP_DEFLATE=y
+CONFIG_PPP_BSDCOMP=y
+CONFIG_SLIP=y
+CONFIG_SLIP_COMPRESSED=y
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=y
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=y
+# CONFIG_SERIO is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=3
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_HW_RANDOM=y
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_SPI=y
+CONFIG_SPI_OMAP_UWIRE=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y

[PATCH 4/4] omap1: Delete old defconfigs

2010-12-04 Thread Tony Lindgren
Please use omap1_defconfig instead, or search online
for a more optimized defconfig for your omap1 board.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/ams_delta_defconfig   |  121 -
 arch/arm/configs/htcherald_defconfig   |   73 -
 arch/arm/configs/n770_defconfig|  138 
 arch/arm/configs/omap_generic_1510_defconfig   |   84 ---
 arch/arm/configs/omap_generic_1610_defconfig   |   87 ---
 arch/arm/configs/omap_generic_1710_defconfig   |   75 -
 arch/arm/configs/omap_h2_1610_defconfig|  109 ---
 arch/arm/configs/omap_innovator_1510_defconfig |  102 --
 arch/arm/configs/omap_innovator_1610_defconfig |   58 --
 arch/arm/configs/omap_osk_5912_defconfig   |   87 ---
 arch/arm/configs/omap_perseus2_730_defconfig   |   65 ---
 arch/arm/configs/palmte_defconfig  |   48 
 arch/arm/configs/palmtt_defconfig  |   56 --
 arch/arm/configs/palmz71_defconfig |   53 -
 arch/arm/configs/sx1_defconfig |  110 ---
 15 files changed, 0 insertions(+), 1266 deletions(-)
 delete mode 100644 arch/arm/configs/ams_delta_defconfig
 delete mode 100644 arch/arm/configs/htcherald_defconfig
 delete mode 100644 arch/arm/configs/n770_defconfig
 delete mode 100644 arch/arm/configs/omap_generic_1510_defconfig
 delete mode 100644 arch/arm/configs/omap_generic_1610_defconfig
 delete mode 100644 arch/arm/configs/omap_generic_1710_defconfig
 delete mode 100644 arch/arm/configs/omap_h2_1610_defconfig
 delete mode 100644 arch/arm/configs/omap_innovator_1510_defconfig
 delete mode 100644 arch/arm/configs/omap_innovator_1610_defconfig
 delete mode 100644 arch/arm/configs/omap_osk_5912_defconfig
 delete mode 100644 arch/arm/configs/omap_perseus2_730_defconfig
 delete mode 100644 arch/arm/configs/palmte_defconfig
 delete mode 100644 arch/arm/configs/palmtt_defconfig
 delete mode 100644 arch/arm/configs/palmz71_defconfig
 delete mode 100644 arch/arm/configs/sx1_defconfig

diff --git a/arch/arm/configs/ams_delta_defconfig 
b/arch/arm/configs/ams_delta_defconfig
deleted file mode 100644
index 75de45e..000
--- a/arch/arm/configs/ams_delta_defconfig
+++ /dev/null
@@ -1,121 +0,0 @@
-CONFIG_EXPERIMENTAL=y
-# CONFIG_SWAP is not set
-CONFIG_SYSVIPC=y
-CONFIG_TREE_PREEMPT_RCU=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_EMBEDDED=y
-# CONFIG_KALLSYMS is not set
-CONFIG_SLAB=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_LBDAF is not set
-CONFIG_ARCH_OMAP=y
-CONFIG_ARCH_OMAP1=y
-CONFIG_OMAP_MBOX_FWK=m
-CONFIG_MACH_AMS_DELTA=y
-CONFIG_OMAP_ARM_150MHZ=y
-# CONFIG_OMAP_ARM_60MHZ is not set
-CONFIG_PREEMPT=y
-CONFIG_AEABI=y
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE=mem=32M console=ttyS0,115200n8 root=/dev/ram0 
initrd=0x11c0,4M
-CONFIG_FPE_NWFPE=y
-CONFIG_PM=y
-# CONFIG_SUSPEND is not set
-CONFIG_PM_RUNTIME=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IPV6=y
-# CONFIG_FW_LOADER is not set
-CONFIG_MTD=y
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_AMS_DELTA=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_SCSI=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_NETDEVICES=y
-CONFIG_NET_ETHERNET=y
-CONFIG_USB_CATC=y
-CONFIG_USB_KAWETH=y
-CONFIG_USB_PEGASUS=y
-CONFIG_USB_RTL8150=y
-CONFIG_USB_USBNET=y
-CONFIG_PPP=y
-CONFIG_PPP_MULTILINK=y
-CONFIG_INPUT_EVDEV=y
-CONFIG_KEYBOARD_OMAP=y
-# CONFIG_INPUT_MOUSE is not set
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_HW_RANDOM=y
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_OMAP=y
-CONFIG_GPIO_SYSFS=y
-# CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FIRMWARE_EDID=y
-CONFIG_FB_OMAP=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_LCD_CLASS_DEVICE=y
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FONTS=y
-CONFIG_FONT_6x11=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_MIXER_OSS=y
-CONFIG_SND_PCM_OSS=y
-CONFIG_SND_SOC=y
-CONFIG_SND_OMAP_SOC=y
-CONFIG_SND_OMAP_SOC_AMS_DELTA=y
-CONFIG_USB=y
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_DEVICE_CLASS is not set
-CONFIG_USB_MON=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_STORAGE=y
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-CONFIG_LEDS_AMS_DELTA=y
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_OMAP=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT3_FS=y
-CONFIG_INOTIFY=y
-CONFIG_AUTOFS_FS=y
-CONFIG_AUTOFS4_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_TMPFS=y
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_SUMMARY=y
-CONFIG_NFS_FS=y
-CONFIG_PARTITION_ADVANCED=y

Re: [PATCH 0/4] Patches to make multi-soc handling in entry-armv.S easier

2010-12-04 Thread Nicolas Pitre
On Sat, 4 Dec 2010, Tony Lindgren wrote:

 * Nicolas Pitre n...@fluxnic.net [101203 21:39]:
  On Fri, 3 Dec 2010, Tony Lindgren wrote:
  
   Hi all,
   
   I've got some patches almost ready to go to merge the omap1
   configs into a single omap1_defconfig. While working on getting
   that done, I had to come up with a better solution for entry-armv.S
   macros to detect the soc we're running on.
   
   I suggest we add asm_irq_base and asm_irq_flags as in the first
   patch in this series does. This way we can do the soc based detection
   in init_irq or similar place. This might help also the multi-arm
   work too.
  
  Did you see Eric Miao's patch series that introduces runtime IRQ demux 
  handler support?
  
  http://www.spinics.net/linux/lists/arm-kernel/msg92836.html
  
  That is likely to be a better solution.
 
 Yeah that works too, although is a bit heavier for simple cases.
 
 In the omap case just the irq base is different between omap2 vs omap3.
 And only level2 interrupt bit is different omap7xx vs omap16xx.
 
 Handling the difference between omap2/3 and omap4 would be the use
 case for handle_arch_irq. Currently that too can be handled
 without handle_arch_irq, but from multi-arm point of view
 handle_arch_irq is needed in the long run.
 
 I can do things either way quite easily for sure. But my preference
 would be to have both options available. This is because asm_irq_base
 and asm_irq_flags can be used to reduce 15 omap1 defconfigs into one
 defconfig with quite minimal changes. And for omap2+, these patches
 allow getting rid of the SoC detection code in entry-macro.S. Also,
 after these patches, moving to use handle_arch_irq can be done a bit
 easier later on.

My only problem with your approach is the global addition of 
asm_irq_base and asm_irq_flags in generic code which might not be useful 
and/or appropriate for all targets.  If you were confining them to some 
OMAP specific file then I wouldn't mind as much.  Looking at the patch I 
see that you had omap_irq_base before.  Why wasn't that sufficient?  
Only omap_irq_flags would be missing.


Nicolas
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Patches to make multi-soc handling in entry-armv.S easier

2010-12-04 Thread Tony Lindgren
* Nicolas Pitre n...@fluxnic.net [101204 18:26]:
 On Sat, 4 Dec 2010, Tony Lindgren wrote:
 
 My only problem with your approach is the global addition of 
 asm_irq_base and asm_irq_flags in generic code which might not be useful 
 and/or appropriate for all targets.  If you were confining them to some 
 OMAP specific file then I wouldn't mind as much.  Looking at the patch I 
 see that you had omap_irq_base before.  Why wasn't that sufficient?  
 Only omap_irq_flags would be missing.

I guess I was thinking this is something that might help others
to build more machines into one defconfig. If that's not the case,
sure these can be kept omap specific.

After a quick browsing of the entry-macro.S files, looks like
there's some similar ifdeffery for get_irqnr_* macros that just might
be possible to clear out with asm_irq_base and asm_irq_flags:

arch/arm/mach-davinci/include/mach/entry-macro.S
arch/arm/mach-s5p64x0/include/mach/entry-macro.S
arch/arm/mach-ixp4xx/include/mach/entry-macro.S
arch/arm/mach-h720x/include/mach/entry-macro.S
arch/arm/plat-mxc/include/mach/entry-macro.S

Maybe let's wait a while to see if there are other use cases,
if not, I'll make them omap specific.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html