Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-11-07 Thread Haavard Skinnemoen
Ben Nizette wrote: > On Tue, 2009-11-03 at 15:30 +1300, Ryan Mallon wrote: > > > > > IIRC, we can't mark static inline functions as weak, and we don't want > > to turn gpio_is_valid into an actual function call. We could do some > > preprocessor magic, but that gets a bit messy. > > Messy bu

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-11-02 Thread Ben Nizette
On Tue, 2009-11-03 at 15:30 +1300, Ryan Mallon wrote: > > > IIRC, we can't mark static inline functions as weak, and we don't want > to turn gpio_is_valid into an actual function call. We could do some > preprocessor magic, but that gets a bit messy. Messy but generally accepted. Have a grep for

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-11-02 Thread Ryan Mallon
Nicolas Ferre wrote: > Ben Nizette : > >> On Wed, 2009-10-28 at 21:53 +0200, Andrew Victor wrote: >> >>> hi, >>> >>> Then I think it would be best to use GPIO_PIN_NONE. Makes it clear what is expected and avoids confusion on what should be the proper value. I hope

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-11-02 Thread Ben Nizette
[apologies for the MTA fart causing that weird, rouge blank email :-) ] On Mon, 2009-11-02 at 18:11 +0100, Nicolas Ferre wrote: > Ben Nizette : > > > > static inline int gpio_is_valid(int number) > > { > > /* only some non-negative numbers are valid */ > > return ((unsigned)number) < ARC

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-11-02 Thread Ben Nizette
On Mon, 2009-11-02 at 18:11 +0100, Nicolas Ferre wrote: > Ben Nizette : > > > > static inline int gpio_is_valid(int number) > > { > > /* only some non-negative numbers are valid */ > > return ((unsigned)number) < ARCH_NR_GPIOS; > > } > > I understand that the better way to solve this issu

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-11-02 Thread Nicolas Ferre
Yegor Yefremov : > Nicolas Ferre wrote: >> This adds the support of atmel-mci sd/mmc driver in at91sam9g45 devices and >> board files. This also configures the DMA controller slave interface for >> at_hdmac dmaengine driver. >> >> Signed-off-by: Nicolas Ferre [..] >> +/* DMA slave channel co

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-11-02 Thread Nicolas Ferre
Ben Nizette : > On Wed, 2009-10-28 at 21:53 +0200, Andrew Victor wrote: >> hi, >> >>> Then I think it would be best to use GPIO_PIN_NONE. Makes it clear >>> what is expected and avoids confusion on what should be the proper >>> value. >>> I hope I'm not saying non-sense, but even if I am, I guess y

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-28 Thread Ben Nizette
On Wed, 2009-10-28 at 21:53 +0200, Andrew Victor wrote: > hi, > > > Then I think it would be best to use GPIO_PIN_NONE. Makes it clear > > what is expected and avoids confusion on what should be the proper > > value. > > I hope I'm not saying non-sense, but even if I am, I guess you can see > > th

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-28 Thread Andrew Victor
hi, > Then I think it would be best to use GPIO_PIN_NONE. Makes it clear > what is expected and avoids confusion on what should be the proper > value. > I hope I'm not saying non-sense, but even if I am, I guess you can see > that I'm advocating against the magic numbers :) What magic numbers ?

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-27 Thread Haavard Skinnemoen
Thiago A. Corrêa wrote: > >> Causes at91_set_gpio_input() to be called for pin -1.  Which shouldn't be > >> valid. > >> AT91 platforms use 0 to indicate an un-connected GPIO pin, so the > >> assignment of "wp_pin" should probably just be removed. > > > > The mci driver expects non-existent pins

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-27 Thread Thiago A . Corrêa
On Tue, Oct 27, 2009 at 10:35 PM, Haavard Skinnemoen wrote: > Andrew Victor wrote: >> > +static struct mci_platform_data __initdata mci0_data = { >> > +       .slot[0] = { >> > +               .bus_width      = 4, >> > +               .detect_pin     = AT91_PIN_PD10, >> > +               .wp_pin

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-27 Thread Haavard Skinnemoen
Andrew Victor wrote: > > +static struct mci_platform_data __initdata mci0_data = { > > +       .slot[0] = { > > +               .bus_width      = 4, > > +               .detect_pin     = AT91_PIN_PD10, > > +               .wp_pin         = -1, > > +       }, > > Causes at91_set_gpio_input() to

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-27 Thread Andrew Victor
hi Nicolas, > +       if (data->slot[0].wp_pin) > +               at91_set_gpio_input(data->slot[0].wp_pin, 1); > +static struct mci_platform_data __initdata mci0_data = { > +       .slot[0] = { > +               .bus_width      = 4, > +               .detect_pin     = AT91_PIN_PD10, > +        

Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-26 Thread Yegor Yefremov
Nicolas Ferre wrote: > This adds the support of atmel-mci sd/mmc driver in at91sam9g45 devices and > board files. This also configures the DMA controller slave interface for > at_hdmac dmaengine driver. > > Signed-off-by: Nicolas Ferre > --- > arch/arm/mach-at91/at91sam9g45_devices.c | 164 > +

[PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

2009-10-23 Thread Nicolas Ferre
This adds the support of atmel-mci sd/mmc driver in at91sam9g45 devices and board files. This also configures the DMA controller slave interface for at_hdmac dmaengine driver. Signed-off-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam9g45_devices.c | 164 ++ arch/ar