All of lore.kernel.org
 help / color / mirror / Atom feed
From: ryan@bluewatersys.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] SPEAR3xx: Rename register/irq defines to remove naming conflicts
Date: Wed, 11 Aug 2010 08:50:13 +1200	[thread overview]
Message-ID: <4C61BB85.5050406@bluewatersys.com> (raw)
In-Reply-To: <4C60DFB8.20608@st.com>

On 08/10/2010 05:12 PM, viresh kumar wrote:
> 
> Ryan,
> 
> Sorry for testing this set of patches so late. Patch is working fine.
> I have few comments:

Thanks for looking at this.

> 
>> -#define SPEAR_GPIO_INT_END			(SPEAR_GPIO1_INT_BASE + 8)
>> +//#define SPEAR_GPIO_INT_END			(SPEAR_GPIO1_INT_BASE + 8)
> 
> wrong comment sytle. Also we can move above definition with rest of GPIO
> virtual irq no.s.

Oops, that looks like it should have been removed. Moving the definition
is fine.

>>  
> 
> [snip...]
> 
>>  
>> +/*
>> + * GPIO pins virtual irqs
>> + * Use the lowest number for the GPIO virtual IRQs base on which subarchs
>> + * we have compiled in
>> + */
>> +#if defined(CONFIG_MACH_SPEAR310)
>> +#define SPEAR_GPIO_INT_BASE			(SPEAR3XX_VIRQ_START + 18)
>> +#elif defined(CONFIG_MACH_SPEAR320)
>> +#define SPEAR_GPIO_INT_BASE			(SPEAR3XX_VIRQ_START + 17)
>> +#else
>> +#define SPEAR_GPIO_INT_BASE			(SPEAR3XX_VIRQ_START + 9)
>>  #endif
> 
> If we have all three machines enabled, then SPEAR_GPIO_INT_BASE will start from
> VIRQ_START + 18, which will work for spear310 and spear320, but will not be
> correct as we will skip 9 irq no.s.

Do the virtual irqs map directly to the hardware in some way? I thought
that since they were virtual there offset would be somewhat arbitrary?

> It would be better to have three different base addresses
> SPEAR300_GPIO_INT_BASE, etc.

This is possible. We can either do this by making SPEAR3XX_GPIO_INT_BASE
a variable, or by having some ifdef/machine_is code in the board
initialisation.

~Ryan

-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

  reply	other threads:[~2010-08-10 20:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-05  6:05 [PATCH 0/5] SPEAr3xx: Unify build of SPEAr3xx platforms Ryan Mallon
2010-06-05  6:05 ` [PATCH 1/5] SPEAr3xx: Make local structres static Ryan Mallon
2010-06-14  5:16   ` Viresh KUMAR
2010-06-14  5:31     ` Ryan Mallon
2010-06-14  5:41       ` Viresh KUMAR
2010-06-05  6:05 ` [PATCH 2/5] SPEAR3xx: Rename register/irq defines to remove naming conflicts Ryan Mallon
2010-06-14  5:18   ` Viresh KUMAR
2010-06-14  5:36     ` Ryan Mallon
2010-06-14  5:46       ` Viresh KUMAR
2010-06-14 10:17         ` Ryan Mallon
2010-08-10  5:12   ` viresh kumar
2010-08-10 20:50     ` Ryan Mallon [this message]
2010-08-11  9:14       ` viresh kumar
2010-08-11 20:43         ` Ryan Mallon
2010-08-12  4:40           ` viresh kumar
2010-06-05  6:05 ` [PATCH 3/5] SPEAr3xx: Rework pmx_dev code to remove conflicts Ryan Mallon
2010-06-14  5:21   ` Viresh KUMAR
2010-06-05  6:05 ` [PATCH 4/5] SPEAr3xx: Rework KConfig to allow all boards to be compiled in Ryan Mallon
2010-06-05  6:05 ` [PATCH 5/5] SPEAr3xx: Replace defconfigs with single unfied defconfig Ryan Mallon
2010-06-13 22:51 ` [PATCH 0/5] SPEAr3xx: Unify build of SPEAr3xx platforms Ryan Mallon
2010-06-15  5:32 ` Viresh KUMAR
2010-06-15  6:49   ` Ryan Mallon

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=4C61BB85.5050406@bluewatersys.com \
    --to=ryan@bluewatersys.com \
    --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 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.