From: Felipe Balbi <felipe.balbi@nokia.com>
To: "ext Varadarajan, Charulatha" <charu@ti.com>
Cc: "Balbi Felipe (Nokia-D/Helsinki)" <felipe.balbi@nokia.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Nayak, Rajendra" <rnayak@ti.com>,
"paul@pwsan.com" <paul@pwsan.com>,
"tony@atomide.com" <tony@atomide.com>
Subject: Re: [PATCH 1/8] OMAP:GPIO:Move architecture specific macros to specific header
Date: Thu, 1 Apr 2010 12:00:37 +0300 [thread overview]
Message-ID: <20100401090037.GG16297@nokia.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02C4B8F28D@dbde02.ent.ti.com>
On Thu, Apr 01, 2010 at 10:52:42AM +0200, ext Varadarajan, Charulatha wrote:
>
>
>> -----Original Message-----
>> From: Felipe Balbi [mailto:felipe.balbi@nokia.com]
>> Sent: Thursday, April 01, 2010 12:47 PM
>> To: Varadarajan, Charulatha
>> Cc: linux-omap@vger.kernel.org; Nayak, Rajendra; paul@pwsan.com; tony@atomide.com
>> Subject: Re: [PATCH 1/8] OMAP:GPIO:Move architecture specific macros to specific
>> header
>>
>> Hi,
>>
>> On Wed, Mar 31, 2010 at 02:23:52PM +0200, ext Charulatha V wrote:
>> >diff --git a/arch/arm/mach-omap1/include/mach/gpio.h b/arch/arm/mach-
>> omap1/include/mach/gpio.h
>> >index e737706..c4945d7 100644
>> >--- a/arch/arm/mach-omap1/include/mach/gpio.h
>> >+++ b/arch/arm/mach-omap1/include/mach/gpio.h
>> >@@ -3,3 +3,91 @@
>> > */
>> >
>> > #include <plat/gpio.h>
>> >+
>> >+/*
>> >+ * OMAP1510 GPIO registers
>> >+ */
>> >+#define OMAP1510_GPIO_BASE 0xfffce000
>> >+#define OMAP1510_GPIO_DATA_INPUT 0x00
>> >+#define OMAP1510_GPIO_DATA_OUTPUT 0x04
>> >+#define OMAP1510_GPIO_DIR_CONTROL 0x08
>> >+#define OMAP1510_GPIO_INT_CONTROL 0x0c
>> >+#define OMAP1510_GPIO_INT_MASK 0x10
>> >+#define OMAP1510_GPIO_INT_STATUS 0x14
>> >+#define OMAP1510_GPIO_PIN_CONTROL 0x18
>> >+
>> >+#define OMAP1510_IH_GPIO_BASE 64
>> >+
>> >+/*
>> >+ * OMAP1610 specific GPIO registers
>> >+ */
>> >+#define OMAP1610_GPIO1_BASE 0xfffbe400
>> >+#define OMAP1610_GPIO2_BASE 0xfffbec00
>> >+#define OMAP1610_GPIO3_BASE 0xfffbb400
>> >+#define OMAP1610_GPIO4_BASE 0xfffbbc00
>> >+#define OMAP1610_GPIO_REVISION 0x0000
>> >+#define OMAP1610_GPIO_SYSCONFIG 0x0010
>> >+#define OMAP1610_GPIO_SYSSTATUS 0x0014
>> >+#define OMAP1610_GPIO_IRQSTATUS1 0x0018
>> >+#define OMAP1610_GPIO_IRQENABLE1 0x001c
>> >+#define OMAP1610_GPIO_WAKEUPENABLE 0x0028
>> >+#define OMAP1610_GPIO_DATAIN 0x002c
>> >+#define OMAP1610_GPIO_DATAOUT 0x0030
>> >+#define OMAP1610_GPIO_DIRECTION 0x0034
>> >+#define OMAP1610_GPIO_EDGE_CTRL1 0x0038
>> >+#define OMAP1610_GPIO_EDGE_CTRL2 0x003c
>> >+#define OMAP1610_GPIO_CLEAR_IRQENABLE1 0x009c
>> >+#define OMAP1610_GPIO_CLEAR_WAKEUPENA 0x00a8
>> >+#define OMAP1610_GPIO_CLEAR_DATAOUT 0x00b0
>> >+#define OMAP1610_GPIO_SET_IRQENABLE1 0x00dc
>> >+#define OMAP1610_GPIO_SET_WAKEUPENA 0x00e8
>> >+#define OMAP1610_GPIO_SET_DATAOUT 0x00f0
>> >+
>> >+/*
>> >+ * OMAP7XX specific GPIO registers
>> >+ */
>> >+#define OMAP7XX_GPIO1_BASE 0xfffbc000
>> >+#define OMAP7XX_GPIO2_BASE 0xfffbc800
>> >+#define OMAP7XX_GPIO3_BASE 0xfffbd000
>> >+#define OMAP7XX_GPIO4_BASE 0xfffbd800
>> >+#define OMAP7XX_GPIO5_BASE 0xfffbe000
>> >+#define OMAP7XX_GPIO6_BASE 0xfffbe800
>> >+#define OMAP7XX_GPIO_DATA_INPUT 0x00
>> >+#define OMAP7XX_GPIO_DATA_OUTPUT 0x04
>> >+#define OMAP7XX_GPIO_DIR_CONTROL 0x08
>> >+#define OMAP7XX_GPIO_INT_CONTROL 0x0c
>> >+#define OMAP7XX_GPIO_INT_MASK 0x10
>> >+#define OMAP7XX_GPIO_INT_STATUS 0x14
>> >+
>> >+#define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE
>> >+#define OMAP1_MPUIO_BASE 0xfffb5000
>> >+
>> >+#if (defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850))
>> >+#define OMAP_MPUIO_INPUT_LATCH 0x00
>> >+#define OMAP_MPUIO_OUTPUT 0x02
>> >+#define OMAP_MPUIO_IO_CNTL 0x04
>> >+#define OMAP_MPUIO_KBR_LATCH 0x08
>> >+#define OMAP_MPUIO_KBC 0x0a
>> >+#define OMAP_MPUIO_GPIO_EVENT_MODE 0x0c
>> >+#define OMAP_MPUIO_GPIO_INT_EDGE 0x0e
>> >+#define OMAP_MPUIO_KBD_INT 0x10
>> >+#define OMAP_MPUIO_GPIO_INT 0x12
>> >+#define OMAP_MPUIO_KBD_MASKIT 0x14
>> >+#define OMAP_MPUIO_GPIO_MASKIT 0x16
>> >+#define OMAP_MPUIO_GPIO_DEBOUNCING 0x18
>> >+#define OMAP_MPUIO_LATCH 0x1a
>> >+#else
>> >+#define OMAP_MPUIO_INPUT_LATCH 0x00
>> >+#define OMAP_MPUIO_OUTPUT 0x04
>> >+#define OMAP_MPUIO_IO_CNTL 0x08
>> >+#define OMAP_MPUIO_KBR_LATCH 0x10
>> >+#define OMAP_MPUIO_KBC 0x14
>> >+#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
>> >+#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
>> >+#define OMAP_MPUIO_KBD_INT 0x20
>> >+#define OMAP_MPUIO_GPIO_INT 0x24
>> >+#define OMAP_MPUIO_KBD_MASKIT 0x28
>> >+#define OMAP_MPUIO_GPIO_MASKIT 0x2c
>> >+#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
>> >+#define OMAP_MPUIO_LATCH 0x34
>> >+#endif
>>
>> Add prefixes to these defines and remove the ifdefs.
>> This breaks multi-omap builds.
>
>AFAIK multi-omap build not applicable for OMAP1
yes, and we should try to fix that.
>> >-struct gpio_bank {
>> >- unsigned long pbase;
>> >- void __iomem *base;
>> >- u16 irq;
>> >- u16 virtual_irq_start;
>> >- int method;
>> >-#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
>> >- u32 suspend_wakeup;
>> >- u32 saved_wakeup;
>> >-#endif
>> >-#ifdef CONFIG_ARCH_OMAP2PLUS
>> >- u32 non_wakeup_gpios;
>> >- u32 enabled_non_wakeup_gpios;
>> >-
>> >- u32 saved_datain;
>> >- u32 saved_fallingdetect;
>> >- u32 saved_risingdetect;
>> >-#endif
>> >- u32 level_mask;
>> >- u32 toggle_mask;
>> >- spinlock_t lock;
>> >- struct gpio_chip chip;
>> >- struct clk *dbck;
>> >- u32 mod_usage;
>> >-};
>>
>> defines are fine, but this structure belongs to this driver. Nobody else
>> should need to poke on it. Keep it here.
>
>This would get used in mach-omap layers in the later patches.
>Hence moving it to gpio.h
it shouldn't need to be there. The gpio driver should be only one. from
mach-omap1/2 directories should come enough data to allow the driver to
work correctly on any omap processor.
--
balbi
next prev parent reply other threads:[~2010-04-01 9:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 12:23 [PATCH 0/8 RFC] OMAP: GPIO: Split OMAP1 and OMAP2PLUS Charulatha V
2010-03-31 12:23 ` [PATCH 1/8] OMAP:GPIO:Move architecture specific macros to specific header Charulatha V
2010-03-31 12:23 ` [PATCH 2/8] OMAP3:GPIO:Add support for early platform gpio device Charulatha V
2010-03-31 12:23 ` [PATCH 3/8] OMAP2:GPIO:Add " Charulatha V
2010-03-31 12:23 ` [PATCH 4/8] OMAP4:GPIO:Add " Charulatha V
2010-03-31 12:23 ` [PATCH 5/8] OMAP2PLUS:GPIO:Add OMAP2PLUS specific gpio support Charulatha V
2010-03-31 12:23 ` [PATCH 6/8] OMAP1:GPIO:Support for OMAP1 specific gpio Charulatha V
2010-03-31 12:23 ` [PATCH 7/8] OMAP2PLUS:GPIO:Move gpio_init from board files to init_common_hw Charulatha V
2010-03-31 12:23 ` [PATCH 8/8] OMAP:GPIO:Common platform code for all OMAPs Charulatha V
2010-04-01 9:34 ` Tony Lindgren
2010-04-01 9:32 ` [PATCH 7/8] OMAP2PLUS:GPIO:Move gpio_init from board files to init_common_hw Tony Lindgren
2010-04-01 10:50 ` Varadarajan, Charulatha
2010-04-06 22:13 ` Kevin Hilman
2010-04-01 9:30 ` [PATCH 5/8] OMAP2PLUS:GPIO:Add OMAP2PLUS specific gpio support Tony Lindgren
2010-04-06 22:08 ` Kevin Hilman
2010-04-01 7:26 ` [PATCH 3/8] OMAP2:GPIO:Add support for early platform gpio device Felipe Balbi
2010-04-01 8:53 ` Varadarajan, Charulatha
2010-04-01 8:58 ` Felipe Balbi
2010-04-01 9:16 ` Varadarajan, Charulatha
2010-04-01 7:23 ` [PATCH 2/8] OMAP3:GPIO:Add " Felipe Balbi
2010-04-01 8:58 ` Varadarajan, Charulatha
2010-04-01 9:12 ` Tony Lindgren
2010-04-01 9:19 ` Varadarajan, Charulatha
2010-04-01 9:13 ` Tony Lindgren
2010-04-01 10:49 ` Varadarajan, Charulatha
2010-04-01 9:31 ` Tony Lindgren
2010-04-01 10:50 ` Varadarajan, Charulatha
2010-04-01 7:17 ` [PATCH 1/8] OMAP:GPIO:Move architecture specific macros to specific header Felipe Balbi
2010-04-01 8:52 ` Varadarajan, Charulatha
2010-04-01 9:00 ` Felipe Balbi [this message]
2010-04-01 9:41 ` Tony Lindgren
2010-04-01 10:50 ` Varadarajan, Charulatha
2010-04-06 22:31 ` [PATCH 0/8 RFC] OMAP: GPIO: Split OMAP1 and OMAP2PLUS Kevin Hilman
2010-04-12 12:16 ` Varadarajan, Charulatha
2010-04-19 14:31 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100401090037.GG16297@nokia.com \
--to=felipe.balbi@nokia.com \
--cc=charu@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox