[U-Boot] [PATCH 1/4] gpio: Adds GPIO driver support for Armada100

Prafulla Wadaskar prafulla at marvell.com
Wed Jul 20 05:49:38 CEST 2011



> -----Original Message-----
> From: Ajay Bhargav [mailto:ajay.bhargav at einfochips.com]
> Sent: Tuesday, July 19, 2011 9:44 AM
> To: Lei Wen
> Cc: u-boot at lists.denx.de; Ashish Karkare; Prabhanjan Sarnaik; Prafulla
> Wadaskar
> Subject: Re: [U-Boot] [PATCH 1/4] gpio: Adds GPIO driver support for
> Armada100
> 
> 
> ----- "Lei Wen" <adrian.wenl at gmail.com> wrote:
> 
> > Hi Ajay,
> >
> > On Tue, Jul 19, 2011 at 12:01 PM, Ajay Bhargav
> > <ajay.bhargav at einfochips.com> wrote:
> > >
> > >> How about merge this into current mvmfp.c? Just add some function
> > >> into
> > >> it, then no need another c file.
> > > According to current ongoing development there is generic GPIO
> > framework being introduced. Its good if we keep gpio separate though
> > they are connected to MFP too, It makes more sense if they are kept in
> > different file. lets see what Prafulla has to say about this.

I think mvgpio.c will address gpio driver, it can be used by Kirkwood, Orion arch too where as MFP is totally different on this core than armada.

To me it makes more sense to call mvgpio.c as gpio driver and mvmfp.c as Multi Function Pin driver.

> > >
> > Ok.
> > BTW, I also have some comments towards your patch.
> > You define a huge structure in
> > arch/arm/include/asm/arch-armada100/gpio.h, which don't looks so good
> > to me.
> >
> 
> Comments are welcome. I know its huge.. I just followed what is
> suggested by Wolfgang.
> He told not to use BASE+OFFSET thing. I am bit confused here whom to
> follow :)

You have to follow all :-), more reviewers more better code output.
BASE+OFFSET strictly not recommended.

> 
> >
> > Macro here save a lot space, and keep the code clean.
> >
> > Best regards,
> > Lei
> >
> 
> Prafulla is suggesting something.. Let me ask him how he want this.

I think lei and me are suggesting similar things, macros should be used precisely, the code should be small and smarter.

Regards..
Prafulla . .


More information about the U-Boot mailing list