All of lore.kernel.org
 help / color / mirror / Atom feed
From: jochen@scram.de (Jochen Friedrich)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 2.6.40 2/4] ARM: simpad: Cleanup CS3 accessors.
Date: Fri, 29 Apr 2011 16:38:37 +0200	[thread overview]
Message-ID: <4DBACD6D.1070200@scram.de> (raw)
In-Reply-To: <20110428092327.GR17290@n2100.arm.linux.org.uk>

Hi Russell,

thanks for the review.

>> @@ -47,15 +43,15 @@ simpad_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
>>   			   struct pcmcia_state *state)
>>   {
>>   	unsigned long levels = GPLR;
>> -	long cs3reg = get_cs3_shadow();
>> +	long cs3reg = simpad_get_cs3_shadow();
>>
>>   	state->detect=((levels&  GPIO_CF_CD)==0)?1:0;
>>   	state->ready=(levels&  GPIO_CF_IRQ)?1:0;
>>   	state->bvd1=1; /* Not available on Simpad. */
>>   	state->bvd2=1; /* Not available on Simpad. */
>>   	state->wrprot=0; /* Not available on Simpad. */
>> -
>> -	if((cs3reg&  0x0c) == 0x0c) {
>> +
>> +	if ((cs3reg&  0x0c) == 0x0c) {
>
> Are there no definitions for the 0x0c magic value?

Unfortunately, this function has a bug as it currently accesses EN0|EN1, 
but then this test is never true as EN1 is never being set in this 
driver. Intended was the access to PCMCIA_VS1|PCMCIA_VS2, but then 
get_cs3_shadow() was wrong and should now be simpad_get_cs3_ro().

I'll fix this and hope someone can test this as I don't have a Simpad 
with PCMCIA.

Thanks,
Jochen

  reply	other threads:[~2011-04-29 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  9:18 [PATCHv3 2.6.40 0/4] ARM: simpad: Add support for GPIO attached hardware Jochen Friedrich
2011-04-21  9:19 ` [PATCHv3 2.6.40 1/4] ARM: simpad: Add ucb1x00 GPIO definitions and register GPIO Jochen Friedrich
2011-04-21  9:19 ` [PATCHv3 2.6.40 2/4] ARM: simpad: Cleanup CS3 accessors Jochen Friedrich
2011-04-28  9:23   ` Russell King - ARM Linux
2011-04-29 14:38     ` Jochen Friedrich [this message]
2011-04-21  9:19 ` [PATCHv3 2.6.40 3/4] ARM: simpad: add GPIO based device definitions Jochen Friedrich
2011-04-21  9:19 ` [PATCHv3 2.6.40 4/4] ARM: simpad: replace ARM specific LED code Jochen Friedrich
2011-04-28  9:24 ` [PATCHv3 2.6.40 0/4] ARM: simpad: Add support for GPIO attached hardware Russell King - ARM Linux

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=4DBACD6D.1070200@scram.de \
    --to=jochen@scram.de \
    --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.