linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: cgagneraud@techworks.ie (Christian Gagneraud)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1.0 3/4] EP93XX: Add more register definition
Date: Mon, 05 Oct 2009 13:06:16 +0100	[thread overview]
Message-ID: <4AC9E138.1040309@techworks.ie> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901DB75AC@mi8nycmail19.Mi8.com>

H Hartley Sweeten wrote:
> On Saturday, October 03, 2009 6:14 PM, Christian Gagneraud wrote:
>> Add register definition for GPIO A,B,C and D data and data direction,
>> Security, Chip ID, ...
>>
>> Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>
>> Signed-off-by: Christian Gagneraud <cgagneraud@techworks.ie>
>> ---
>>
>>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   15 +++++++++++++++
>>  1 files changed, 15 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
>> index c5216fc..a5f721e 100644
>> --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
>> +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
>> @@ -111,28 +111,42 @@
>>  #define EP93XX_I2S_BASE			EP93XX_APB_IOMEM(0x00020000)
>>  
>>  #define EP93XX_SECURITY_BASE		EP93XX_APB_IOMEM(0x00030000)
>> +#define EP93XX_SECURITY_REG(x)		(EP93XX_SECURITY_BASE + (x))
>> +#define EP93XX_SECURITY_UNIQID		EP93XX_SECURITY_REG(0x2440)
>>  
>>  #define EP93XX_GPIO_BASE		EP93XX_APB_IOMEM(0x00040000)
>>  #define EP93XX_GPIO_REG(x)		(EP93XX_GPIO_BASE + (x))
>> +#define EP93XX_GPIO_A_DATA		EP93XX_GPIO_REG(0x00)
>> +#define EP93XX_GPIO_B_DATA		EP93XX_GPIO_REG(0x04)
>> +#define EP93XX_GPIO_C_DATA		EP93XX_GPIO_REG(0x08)
>> +#define EP93XX_GPIO_D_DATA		EP93XX_GPIO_REG(0x0C)
>> +#define EP93XX_GPIO_A_DIR		EP93XX_GPIO_REG(0x10)
>> +#define EP93XX_GPIO_B_DIR		EP93XX_GPIO_REG(0x14)
>> +#define EP93XX_GPIO_C_DIR		EP93XX_GPIO_REG(0x18)
>> +#define EP93XX_GPIO_D_DIR		EP93XX_GPIO_REG(0x1C)
>>  #define EP93XX_GPIO_F_INT_TYPE1		EP93XX_GPIO_REG(0x4c)
>>  #define EP93XX_GPIO_F_INT_TYPE2		EP93XX_GPIO_REG(0x50)
>>  #define EP93XX_GPIO_F_INT_ACK		EP93XX_GPIO_REG(0x54)
>>  #define EP93XX_GPIO_F_INT_ENABLE	EP93XX_GPIO_REG(0x58)
>>  #define EP93XX_GPIO_F_INT_STATUS	EP93XX_GPIO_REG(0x5c)
>> +#define EP93XX_GPIO_F_INT_DEBOUNCE	EP93XX_GPIO_REG(0x64)
>>  #define EP93XX_GPIO_A_INT_TYPE1		EP93XX_GPIO_REG(0x90)
>>  #define EP93XX_GPIO_A_INT_TYPE2		EP93XX_GPIO_REG(0x94)
>>  #define EP93XX_GPIO_A_INT_ACK		EP93XX_GPIO_REG(0x98)
>>  #define EP93XX_GPIO_A_INT_ENABLE	EP93XX_GPIO_REG(0x9c)
>> +#define EP93XX_GPIO_A_INT_DEBOUNCE	EP93XX_GPIO_REG(0xa8)
>>  #define EP93XX_GPIO_A_INT_STATUS	EP93XX_GPIO_REG(0xa0)
>>  #define EP93XX_GPIO_B_INT_TYPE1		EP93XX_GPIO_REG(0xac)
>>  #define EP93XX_GPIO_B_INT_TYPE2		EP93XX_GPIO_REG(0xb0)
>>  #define EP93XX_GPIO_B_INT_ACK		EP93XX_GPIO_REG(0xb4)
>>  #define EP93XX_GPIO_B_INT_ENABLE	EP93XX_GPIO_REG(0xb8)
>>  #define EP93XX_GPIO_B_INT_STATUS	EP93XX_GPIO_REG(0xbc)
>> +#define EP93XX_GPIO_B_INT_DEBOUNCE	EP93XX_GPIO_REG(0xc4)
>>  #define EP93XX_GPIO_EEDRIVE		EP93XX_GPIO_REG(0xc8)
> 
> The ep93xx has been converted to full gpiolib support.  There
> is no need for the GPIO register defines.  Also, it's a bad
> idea to have them since anything using these will be "breaking"
> the gpiolib API.
> 
> If you need to use the gpio debounce the ep93xx core already has
> support for this.  Please see ep93xx_gpio_int_debounce() in
> arch/arm/mach-ep93xx/core.c.

This was needed for a GPIO based keypad. I will have a look on how to 
convert it to use GPIO lib.

> 
> On a side note.  What tree did you base this patch on?  The
> EP93XX_GPIO_EEDRIVE is not currently in mainline.

Linus tree + a couple of pending patches from this ML.

> 
>>  #define EP93XX_AAC_BASE			EP93XX_APB_IOMEM(0x00080000)
>>  
>> +#define EP93XX_SPI_PHYS_BASE		EP93XX_APB_PHYS(0x000a0000)
>>  #define EP93XX_SPI_BASE			EP93XX_APB_IOMEM(0x000a0000)
>>  
>>  #define EP93XX_IRDA_BASE		EP93XX_APB_IOMEM(0x000b0000)
>> @@ -221,6 +235,7 @@
>>  #define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV	(1<<16)
>>  #define EP93XX_SYSCON_KEYTCHCLKDIV_KEN	(1<<15)
>>  #define EP93XX_SYSCON_KEYTCHCLKDIV_KDIV	(1<<0)
>> +#define EP93XX_SYSCON_CHIPID		EP93XX_SYSCON_REG(0x94)
>>  #define EP93XX_SYSCON_SWLOCK		EP93XX_SYSCON_REG(0xc0)
>>  
>>  #define EP93XX_WATCHDOG_BASE		EP93XX_APB_IOMEM(0x00140000)
> 
> NAK.

OK for GPIO and SPI, but what about the SECURITY and SYSCON_CHIPID 
stuff? The idea behind that is to extend in some way board/cpu 
specific information.
For example the TS-7XXX boards comes with some options, there is 
currently a patch that add a /proc entry to display cpu and board 
information (CPU version, CPLD/FPGA firmware version, state of 
configuration jumpers, HW options installed, ...)


Regards,
Chris

> 
> Regards,
> Hartley
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2009-10-05 12:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-04  1:14 [RFC][PATCH v1.0] Update and enhance TS-7XXX support Christian Gagneraud
2009-10-04  1:14 ` [PATCH v1.0 1/4] EP93XX: Allow to force nF bit in control reg Christian Gagneraud
2009-10-04  1:14 ` [PATCH v1.0 2/4] TS72XX: Allow to override machine ID Christian Gagneraud
2009-10-04 11:05   ` Matthieu Crapet
2009-10-04 11:13   ` Alexander Clouter
2009-10-04 18:34     ` Bill Gatliff
2009-10-04 18:35     ` Bill Gatliff
2009-10-04 11:21   ` Russell King - ARM Linux
2009-10-04 11:55     ` Christian Gagneraud
2009-10-04 23:03   ` H Hartley Sweeten
2009-10-05 12:17     ` Christian Gagneraud
2009-10-05 14:10       ` Alexander Clouter
2009-10-05 15:15       ` Mikael Pettersson
2009-10-05 16:01         ` Marek Vasut
2009-10-05 18:34           ` Christian Gagneraud
2009-10-04  1:14 ` [PATCH v1.0 3/4] EP93XX: Add more register definition Christian Gagneraud
2009-10-04 19:33   ` Ryan Mallon
2009-10-04 23:09   ` H Hartley Sweeten
2009-10-05 12:06     ` Christian Gagneraud [this message]
2009-10-05 16:51       ` H Hartley Sweeten
2009-10-05 18:30         ` Christian Gagneraud
2009-10-04  1:14 ` [PATCH v1.0 4/4] MM: Switch TS72XX to use sparemem Christian Gagneraud
2009-10-05 12:21   ` Christian Gagneraud
2009-10-05 17:06     ` H Hartley Sweeten
2009-10-05 18:16       ` Christian Gagneraud
2009-10-05 18:52         ` H Hartley Sweeten
2009-10-06 21:21           ` Christian Gagneraud
2009-10-06 21:26             ` Christian Gagneraud

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=4AC9E138.1040309@techworks.ie \
    --to=cgagneraud@techworks.ie \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).