All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <mike@compulab.co.il>
To: tglx@linutronix.de
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] CM-x2xx NAND flash support
Date: Tue, 11 Jul 2006 14:36:45 +0200	[thread overview]
Message-ID: <44B39B5D.3070302@compulab.co.il> (raw)
In-Reply-To: <1152606233.32107.98.camel@localhost.localdomain>

Thomas Gleixner wrote:

>On Tue, 2006-07-11 at 10:46 +0200, Mike Rapoport wrote:
>  
>
>>>>+       unsigned int nandaddr = (unsigned int)this->IO_ADDR_W;
>>>>   
>>>>
>>>>        
>>>>
>>>what the hell is this type cast for ?
>>>
>>>	void __iomem *nandaddr = 
>>> 
>>>
>>>      
>>>
>>you can't do |= and &= with void __iomem*
>>    
>>
>
>Err, why not ?
>  
>
I have this function:
static void cmx270_hwcontrol(struct mtd_info *mtd, int dat,
			     unsigned int ctrl)
{
	struct nand_chip* this = (struct nand_chip *) (mtd->priv);
	void __iomem *nandaddr = this->IO_ADDR_W;

	if (ctrl & NAND_CTRL_CHANGE) {
		if ( ctrl & NAND_ALE )
			nandaddr |=  (1 << 3);
		else
			nandaddr &= ~(1 << 3);
		if ( ctrl & NAND_CLE )
			nandaddr |=  (1 << 2);
		else
			nandaddr &= ~(1 << 2);
		if ( ctrl & NAND_NCE )
			nand_cs_on();
		else
			nand_cs_off();
	}
	this->IO_ADDR_W = (void*)nandaddr;
	if (dat != NAND_CMD_NONE)
		cmx270_write_byte(mtd, dat);
}

And these errors:
drivers/mtd/nand/cmx270-nand.c: In function 'cmx270_hwcontrol':
drivers/mtd/nand/cmx270-nand.c:137: error: invalid operands to binary |
drivers/mtd/nand/cmx270-nand.c:139: error: invalid operands to binary &
drivers/mtd/nand/cmx270-nand.c:141: error: invalid operands to binary |
drivers/mtd/nand/cmx270-nand.c:143: error: invalid operands to binary &

> gcc -v
arm-xscale-linux-gnu-gcc -v
Using built-in specs.
Target: arm-xscale-linux-gnu
...
Thread model: posix
gcc version 4.1.0



>  
>
>>>Can you please combine both drivers into one and make it a platform
>>>device. There is no need to keep lots of duplicate functionality around.
>>>
>>>      
>>>
>>I'm dropping cm-x255 support (management decision) so there's only one 
>>platform that can use this driver. What's the point then?
>>    
>>
>
>Sorry man, you submitted _two_ drivers in the first place and I did the
>review on those. I'm not good at witchcrafting the decisions of your
>management.
>  
>
You're right, and I agree that for two drivers it makes sence creating 
platform device and combining the drivers. But now I'm going to submit 
only _one_ driver. Do you still think platfrom device would be necessary?

>	tglx
>
>
>
>______________________________________________________
>Linux MTD discussion mailing list
>http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
>
>
>  
>


-- 
Sincerely yours,
Mike Rapoport

  reply	other threads:[~2006-07-11 11:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-06 12:48 [PATCH] CM-x2xx NAND flash support Mike Rapoport
2006-07-09  9:26 ` Thomas Gleixner
2006-07-11  8:46   ` Mike Rapoport
2006-07-11  8:10     ` Wolfgang Mües
2006-07-11 11:32       ` Mike Rapoport
2006-07-11  8:23     ` Thomas Gleixner
2006-07-11 12:36       ` Mike Rapoport [this message]
2006-07-12 13:21   ` Mike Rapoport

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=44B39B5D.3070302@compulab.co.il \
    --to=mike@compulab.co.il \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tglx@linutronix.de \
    /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.