From: Benoit Cousson <b-cousson@ti.com>
To: "Varadarajan, Charulatha" <charu@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Nayak, Rajendra" <rnayak@ti.com>,
"paul@pwsan.com" <paul@pwsan.com>,
"khilman@deeprootsystems.com" <khilman@deeprootsystems.com>
Subject: Re: [PATCH 01/11] OMAP: GPIO: Modify init() in preparation for platform device implementation
Date: Wed, 19 May 2010 10:01:45 +0200 [thread overview]
Message-ID: <4BF39AE9.1090107@ti.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02C5666364@dbde02.ent.ti.com>
On 5/19/2010 9:23 AM, Varadarajan, Charulatha wrote:
>
>> From: Tony Lindgren [mailto:tony@atomide.com]
>> Sent: Wednesday, May 19, 2010 5:11 AM
>>
>> * Charulatha V<charu@ti.com> [100518 07:44]:
>>> This is in prepartion for implementing GPIO as a platform device.
>>> gpio bank's base addresses are moved from gpio.c to plat/gpio.h.
>>>
>>> This patch also modifies omap_gpio_init() to make use of
>>> omap_gpio_chip_init() and omap_gpio_mod_init(). omap_gpio_mod_init() does
>>> the module init by clearing the status register and initializing the
>>> GPIO control register. omap_gpio_chip_init() initializes the chip request,
>>> free, get, set and other function pointers and sets the gpio irq handler.
>>
>> <snip>
>>
>>> diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-
>> omap/include/plat/gpio.h
>>> index de7c547..a06acb6 100644
>>> --- a/arch/arm/plat-omap/include/plat/gpio.h
>>> +++ b/arch/arm/plat-omap/include/plat/gpio.h
>>> @@ -29,7 +29,8 @@
>>> #include<linux/io.h>
>>> #include<mach/irqs.h>
>>>
>>> -#define OMAP1_MPUIO_BASE 0xfffb5000
>>> +#define OMAP1_MPUIO_BASE 0xfffb5000
>>> +#define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE
>>>
>>> #if (defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850))
>>>
>>> @@ -62,8 +63,73 @@
>>> #define OMAP_MPUIO_LATCH 0x34
>>> #endif
>>>
>>> +/*
>>> + * OMAP1510 GPIO base addresses
>>> + */
>>> +#define OMAP1510_GPIO_BASE 0xfffce000
>>> +#define OMAP1510_IH_GPIO_BASE 64
>>> +
>>> +/*
>>> + * OMAP1610 GPIO base addresses
>>> + */
>>> +#define OMAP1610_GPIO1_BASE 0xfffbe400
>>> +#define OMAP1610_GPIO2_BASE 0xfffbec00
>>> +#define OMAP1610_GPIO3_BASE 0xfffbb400
>>> +#define OMAP1610_GPIO4_BASE 0xfffbbc00
>>> +
>>> +/*
>>> + * OMAP7XX GPIO base addresses
>>> + */
>>> +#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
>>
>> Please move these into the mach-omap1/gpio1xxx.c instead,
>> they should not be needed anywhere else. We don't want
>> to have the GPIO registers available in the common headers
>> as otherwise we'll get tons of drivers that suddenly
>> start tinkering with these registers directly..
>>
>>> +/*
>>> + * omap24xx GPIO base addresses
>>> + */
>>> +#define OMAP242X_GPIO1_BASE 0x48018000
>>> +#define OMAP242X_GPIO2_BASE 0x4801a000
>>> +#define OMAP242X_GPIO3_BASE 0x4801c000
>>> +#define OMAP242X_GPIO4_BASE 0x4801e000
>>> +
>>> +#define OMAP243X_GPIO1_BASE 0x4900C000
>>> +#define OMAP243X_GPIO2_BASE 0x4900E000
>>> +#define OMAP243X_GPIO3_BASE 0x49010000
>>> +#define OMAP243X_GPIO4_BASE 0x49012000
>>> +#define OMAP243X_GPIO5_BASE 0x480B6000
>>
>> These should go into mach-omap2/gpioxxxx.c. The same
>> for the others.
>
> They are used in omap_hwmod_xxxx_data.c files. That is why they are
> moved to plat-omap/gpio.h files.
> 1. Instead of having them in common headers, I can move them to mach-omapx/gpio.h.
> 2. Else, hard code these addresses directly in hwmod data structures
and avoid
> moving these definitions to header files.
What was agreed on that is to eventually move all the SoC base address
in a single header file (omapXXXX.h) that should be used only by the
omap_hwmod_xxxx_data.c file.
Benoit
next prev parent reply other threads:[~2010-05-19 8:01 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 14:50 [PATCH 00/11] OMAP: GPIO: Implement GPIO in HWMOD way Charulatha V
2010-05-18 14:50 ` [PATCH 01/11] OMAP: GPIO: Modify init() in preparation for platform device implementation Charulatha V
2010-05-18 14:50 ` [PATCH 02/11] OMAP: GPIO: Include platform_data structure for GPIO Charulatha V
2010-05-18 14:50 ` [PATCH 03/11] OMAP: GPIO: Introduce support for OMAP15xx chip GPIO init Charulatha V
2010-05-18 14:50 ` [PATCH 04/11] OMAP: GPIO: Introduce support for OMAP16xx " Charulatha V
2010-05-18 14:50 ` [PATCH 05/11] OMAP: GPIO: Introduce support for OMAP7xx " Charulatha V
2010-05-18 14:50 ` [PATCH 06/11] OMAP: GPIO: add GPIO hwmods structures for OMAP3 Charulatha V
2010-05-18 14:50 ` [PATCH 07/11] OMAP: GPIO: add GPIO hwmods structures for OMAP242X Charulatha V
2010-05-18 14:50 ` [PATCH 08/11] OMAP: GPIO: add GPIO hwmods structures for OMAP243X Charulatha V
2010-05-18 14:50 ` [PATCH 09/11] OMAP: GPIO: Introduce support for OMAP2PLUS chip GPIO init Charulatha V
2010-05-18 14:50 ` [PATCH 10/11] OMAP: GPIO: Implement GPIO as a platform device Charulatha V
2010-05-18 14:51 ` [PATCH 11/11] OMAP: GPIO: Remove omap_gpio_init() Charulatha V
[not found] ` <4BF2CD67.3090208@ti.com>
[not found] ` <EAF47CD23C76F840A9E7FCE10091EFAB02C5666252@dbde02.ent.ti.com>
2010-05-19 7:50 ` [PATCH 10/11] OMAP: GPIO: Implement GPIO as a platform device Cousson, Benoit
2010-05-20 16:36 ` Kevin Hilman
2010-06-03 18:58 ` Kevin Hilman
2010-06-04 6:05 ` Felipe Balbi
2010-05-18 23:46 ` [PATCH 09/11] OMAP: GPIO: Introduce support for OMAP2PLUS chip GPIO init Tony Lindgren
2010-05-19 7:26 ` Varadarajan, Charulatha
2010-06-03 18:36 ` Kevin Hilman
2010-06-03 18:31 ` [PATCH 07/11] OMAP: GPIO: add GPIO hwmods structures for OMAP242X Kevin Hilman
2010-06-03 18:30 ` [PATCH 06/11] OMAP: GPIO: add GPIO hwmods structures for OMAP3 Kevin Hilman
2010-05-18 23:41 ` [PATCH 01/11] OMAP: GPIO: Modify init() in preparation for platform device implementation Tony Lindgren
2010-05-19 7:23 ` Varadarajan, Charulatha
2010-05-19 8:01 ` Benoit Cousson [this message]
2010-05-19 13:57 ` Varadarajan, Charulatha
2010-05-19 15:32 ` Benoit Cousson
2010-05-18 23:42 ` [PATCH 00/11] OMAP: GPIO: Implement GPIO in HWMOD way Tony Lindgren
2010-05-19 7:30 ` Varadarajan, Charulatha
2010-06-03 18:21 ` Kevin Hilman
2010-05-19 8:54 ` Benoit Cousson
2010-05-19 13:55 ` Varadarajan, Charulatha
2010-05-19 15:24 ` Benoit Cousson
2010-06-03 18:46 ` 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=4BF39AE9.1090107@ti.com \
--to=b-cousson@ti.com \
--cc=charu@ti.com \
--cc=khilman@deeprootsystems.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.