RE: [PATCH RESEND] Input: omap-keypad: dynamically handle register offsets

2012-04-10 Thread H Hartley Sweeten
On Tuesday, April 10, 2012 9:24 AM, Dmitry Torokhov wrote:
 On Tue, Apr 03, 2012 at 10:52:26AM +0530, Sourav Poddar wrote:
 From: G, Manjunath Kondaiah manj...@ti.com
 
 Keypad controller register offsets are different for omap4
 and omap5. Handle these offsets through static mapping and
 assign these mappings during run time.
 

 In addition to Felipe's comments.

 @@ -76,11 +81,66 @@ struct omap4_keypad {
  
  unsigned int rows;
  unsigned int cols;
 +unsigned int revision;
 +u32 irqstatus;
 +u32 irqenable;

   u32 reg_offset;

 and you probably won't need revision field.

  unsigned int row_shift;
  unsigned char key_state[8];
  unsigned short keymap[];
  };
  
 +static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset)
 +{
 +if (keypad_data-revision == KBD_REVISION_OMAP4)
 +return __raw_readl(keypad_data-base + offset);

keypad_data-base is an ioremap'ed address. Shouldn't all the 
__raw_{read,write}l be
{read,write}l instead?

Regards,
Hartley

--
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/5] mtd: plat_nand: Add default partition parser and use it

2012-03-28 Thread H Hartley Sweeten
This patch series adds cmdlinepart as the default partition parser for the
plat_nand driver and updates all the arch setup code to use it.

Arch setup code that requires other partition parsers can still pass that
information as chip.part_probe_types.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
  mtd: plat_nand: Add default partition parser to driver
  arm: Use the plat_nand default partition parser
  blackfin: Use the plat_nand default partition parser
  mips: Use the plat_nand default partition parser
  sh: Use the plat_nand default partition parser

 arch/arm/mach-ep93xx/snappercl15.c|3 ---
 arch/arm/mach-ep93xx/ts72xx.c |3 ---
 arch/arm/mach-ixp4xx/ixdp425-setup.c  |3 ---
 arch/arm/mach-omap1/board-fsample.c   |3 ---
 arch/arm/mach-omap1/board-h2.c|3 ---
 arch/arm/mach-omap1/board-h3.c|3 ---
 arch/arm/mach-omap1/board-perseus2.c  |3 ---
 arch/arm/mach-orion5x/ts78xx-setup.c  |3 ---
 arch/arm/mach-pxa/balloon3.c  |3 ---
 arch/arm/mach-pxa/em-x270.c   |3 ---
 arch/arm/mach-pxa/palmtx.c|3 ---
 arch/blackfin/mach-bf561/boards/acvilon.c |3 ---
 arch/mips/alchemy/devboards/db1200.c  |3 ---
 arch/mips/alchemy/devboards/db1300.c  |3 ---
 arch/mips/alchemy/devboards/db1550.c  |3 ---
 arch/mips/pnx833x/common/platform.c   |6 --
 arch/sh/boards/mach-migor/setup.c |1 -
 drivers/mtd/nand/plat_nand.c  |8 ++--
 18 files changed, 6 insertions(+), 54 deletions(-)
--
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] arm: Use the plat_nand default partition parser

2012-03-28 Thread H Hartley Sweeten
Use the default partition parser, cmdlinepart, provided by the plat_nand driver.

Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ryan Mallon rmal...@gmail.com
Cc: Imre Kaloz ka...@openwrt.org
Cc: Krzysztof Halasa k...@pm.waw.pl
Cc: Tony Lindgren t...@atomide.com
Cc: Alexander Clouter a...@digriz.org.uk
Cc: Nicolas Pitre n...@fluxnic.net
Cc: Eric Miao eric.y.m...@gmail.com
Cc: Haojian Zhuang haojian.zhu...@gmail.com
Cc: Marek Vasut marek.va...@gmail.com

---

diff --git a/arch/arm/mach-ep93xx/snappercl15.c 
b/arch/arm/mach-ep93xx/snappercl15.c
index 0c00852..5df9092 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -82,8 +82,6 @@ static int snappercl15_nand_dev_ready(struct mtd_info *mtd)
return !!(__raw_readw(NAND_CTRL_ADDR(chip))  SNAPPERCL15_NAND_RDY);
 }
 
-static const char *snappercl15_nand_part_probes[] = {cmdlinepart, NULL};
-
 static struct mtd_partition snappercl15_nand_parts[] = {
{
.name   = Kernel,
@@ -100,7 +98,6 @@ static struct mtd_partition snappercl15_nand_parts[] = {
 static struct platform_nand_data snappercl15_nand_data = {
.chip = {
.nr_chips   = 1,
-   .part_probe_types   = snappercl15_nand_part_probes,
.partitions = snappercl15_nand_parts,
.nr_partitions  = ARRAY_SIZE(snappercl15_nand_parts),
.options= NAND_NO_AUTOINCR,
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 5ea7909..14d7121 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -105,8 +105,6 @@ static int ts72xx_nand_device_ready(struct mtd_info *mtd)
return !!(__raw_readb(addr)  0x20);
 }
 
-static const char *ts72xx_nand_part_probes[] = { cmdlinepart, NULL };
-
 #define TS72XX_BOOTROM_PART_SIZE   (SZ_16K)
 #define TS72XX_REDBOOT_PART_SIZE   (SZ_2M + SZ_1M)
 
@@ -134,7 +132,6 @@ static struct platform_nand_data ts72xx_nand_data = {
.nr_chips   = 1,
.chip_offset= 0,
.chip_delay = 15,
-   .part_probe_types = ts72xx_nand_part_probes,
.partitions = ts72xx_nand_parts,
.nr_partitions  = ARRAY_SIZE(ts72xx_nand_parts),
},
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c 
b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 3d742ae..fccfc73 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -60,8 +60,6 @@ static struct platform_device ixdp425_flash = {
 #if defined(CONFIG_MTD_NAND_PLATFORM) || \
 defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
 
-const char *part_probes[] = { cmdlinepart, NULL };
-
 static struct mtd_partition ixdp425_partitions[] = {
{
.name   = ixp400 NAND FS 0,
@@ -101,7 +99,6 @@ static struct platform_nand_data ixdp425_flash_nand_data = {
.nr_chips   = 1,
.chip_delay = 30,
.options= NAND_NO_AUTOINCR,
-   .part_probe_types   = part_probes,
.partitions = ixdp425_partitions,
.nr_partitions  = ARRAY_SIZE(ixdp425_partitions),
},
diff --git a/arch/arm/mach-omap1/board-fsample.c 
b/arch/arm/mach-omap1/board-fsample.c
index 80bd43c..62a1e11 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -206,14 +206,11 @@ static int nand_dev_ready(struct mtd_info *mtd)
return gpio_get_value(FSAMPLE_NAND_RB_GPIO_PIN);
 }
 
-static const char *part_probes[] = { cmdlinepart, NULL };
-
 static struct platform_nand_data nand_data = {
.chip   = {
.nr_chips   = 1,
.chip_offset= 0,
.options= NAND_SAMSUNG_LP_OPTIONS,
-   .part_probe_types   = part_probes,
},
.ctrl   = {
.cmd_ctrl   = nand_cmd_ctl,
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index c306862..a914a7d 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -200,8 +200,6 @@ static int h2_nand_dev_ready(struct mtd_info *mtd)
return gpio_get_value(H2_NAND_RB_GPIO_PIN);
 }
 
-static const char *h2_part_probes[] = { cmdlinepart, NULL };
-
 static struct platform_nand_data h2_nand_platdata = {
.chip   = {
.nr_chips   = 1,
@@ -209,7 +207,6 @@ static struct platform_nand_data h2_nand_platdata = {
.nr_partitions  = ARRAY_SIZE(h2_nand_partitions),
.partitions = h2_nand_partitions,
.options= NAND_SAMSUNG_LP_OPTIONS,
-   .part_probe_types   = h2_part_probes,
},
.ctrl   = {
.cmd_ctrl   = h2_nand_cmd_ctl,
diff --git

RE: [PATCH 24/31] ARM: amba: ep93xx: use common amba device initializers

2012-01-20 Thread H Hartley Sweeten
On Friday, January 20, 2012 2:31 AM, Russell King wrote:

 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 ---
  arch/arm/mach-ep93xx/core.c |   46 +-
  1 files changed, 6 insertions(+), 40 deletions(-)

Acked-by: H Hartley Sweeten hswee...@visionengravers.com

--
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 18/31] ARM: amba: provide common initializers for static amba devices

2012-01-20 Thread H Hartley Sweeten
On Friday, January 20, 2012 2:29 AM, Russell King wrote:

 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 ---
  include/linux/amba/bus.h |   33 +
  1 files changed, 33 insertions(+), 0 deletions(-)

Acked-by: H Hartley Sweeten hswee...@visionengravers.com

--
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 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-09 Thread H Hartley Sweeten
On Tuesday, August 09, 2011 1:08 AM, Russell King wrote:

 Consolidate 24 trivial gpiolib implementions out of mach/gpio.h
 into asm/gpio.h.  This is basically the include of asm-generic/gpio.h
 and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep
 as described in Documentation/gpio.txt

 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 ---
  arch/arm/include/asm/gpio.h |   10 ++
  arch/arm/mach-ep93xx/include/mach/gpio.h|7 +--

 diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
 index 166a7a3..15e8970 100644
 --- a/arch/arm/include/asm/gpio.h
 +++ b/arch/arm/include/asm/gpio.h
 @@ -4,4 +4,14 @@
  /* not all ARM platforms necessarily support this API ... */
  #include mach/gpio.h
  
 +#ifdef __ARM_GPIOLIB_TRIVIAL
 +/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
 +#include asm-generic/gpio.h
 +
 +/* The trivial gpiolib dispatchers */
 +#define gpio_get_value  __gpio_get_value
 +#define gpio_set_value  __gpio_set_value
 +#define gpio_cansleep   __gpio_cansleep
 +#endif
 +
  #endif /* _ARCH_ARM_GPIO_H */
 diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h 
 b/arch/arm/mach-ep93xx/include/mach/gpio.h
 index c57152c..fbc770e 100644
 --- a/arch/arm/mach-ep93xx/include/mach/gpio.h
 +++ b/arch/arm/mach-ep93xx/include/mach/gpio.h
 @@ -100,12 +100,7 @@
  #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
  
  /* new generic GPIO API - see Documentation/gpio.txt */
 -
 -#include asm-generic/gpio.h
 -
 -#define gpio_get_value   __gpio_get_value
 -#define gpio_set_value   __gpio_set_value
 -#define gpio_cansleep__gpio_cansleep
 +#define __ARM_GPIOLIB_TRIVIAL
  
  /*
   * Map GPIO A0..A7  (0..7)  to irq 64..71,

For ep93xx:

Acked-by: H Hartley Sweeten hswee...@visionengravers.com

Thanks!
--
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 13/13] ARM: gpio: make trivial GPIOLIB implementation the default

2011-08-09 Thread H Hartley Sweeten
On Tuesday, August 09, 2011 1:09 AM, Russell King wrote:

 Rather than marking the mach/gpio.h header files which want to use the
 trivial GPIOLIB implementation, mark those which do not want to use it
 instead.  This means that by default, you get the trivial implementation
 and only have to do something extra if you need to.  This should
 encourage the use of the trivial default implementation.
 
 As an additional bonus, several gpio.h header files become empty.
 
 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 ---
  arch/arm/include/asm/gpio.h |2 +-
  arch/arm/include/asm/hardware/iop3xx-gpio.h |2 ++
 
 diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
 index 5032224..11ad0bf 100644
 --- a/arch/arm/include/asm/gpio.h
 +++ b/arch/arm/include/asm/gpio.h
 @@ -4,7 +4,7 @@
  /* not all ARM platforms necessarily support this API ... */
  #include mach/gpio.h
  
 -#ifdef __ARM_GPIOLIB_TRIVIAL
 +#ifndef __ARM_GPIOLIB_COMPLEX
  /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
  #include asm-generic/gpio.h
  
 diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h 
 b/arch/arm/mach-ep93xx/include/mach/gpio.h
 index fbc770e..071f676 100644
 --- a/arch/arm/mach-ep93xx/include/mach/gpio.h
 +++ b/arch/arm/mach-ep93xx/include/mach/gpio.h
 @@ -99,9 +99,6 @@
  /* maximum value for irq capable line identifiers */
  #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
  
 -/* new generic GPIO API - see Documentation/gpio.txt */
 -#define __ARM_GPIOLIB_TRIVIAL
 -
  /*
   * Map GPIO A0..A7  (0..7)  to irq 64..71,
   *  B0..B7  (7..15) to irq 72..79, and

For ep93xx:

Acked-by: H Hartley Sweeten hswee...@visionengravers.com

Thanks!
--
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