> -----Original Message-----
> From: Kevin Hilman [mailto:[email protected]]
> Sent: Thursday, July 16, 2009 11:28 AM
> To: Paulraj, Sandeep
> Cc: [email protected]
> Subject: Re: [PATCH 2/6] Davinci: DM365: Adding support for SPI in DM365
> SOC
> 
> "Paulraj, Sandeep" <[email protected]> writes:
> 
> >> -----Original Message-----
> >> From: Kevin Hilman [mailto:[email protected]]
> >> Sent: Thursday, July 16, 2009 10:59 AM
> >> To: Paulraj, Sandeep
> >> Cc: [email protected]
> >> Subject: Re: [PATCH 2/6] Davinci: DM365: Adding support for SPI in
> DM365
> >> SOC
> >>
> >> [email protected] writes:
> >>
> >> > From: Sandeep Paulraj <[email protected]>
> >> >
> >> > The patch adds support for SPI in DM365 SOC.
> >> >
> >> > Signed-off-by: Sandeep Paulraj <[email protected]>
> >>
> >> [...]
> >>
> >> > +void __init dm365_init_spi0(unsigned chipselect_mask,
> >> > +                struct spi_board_info *info, unsigned len)
> >> > +{
> >> > +        davinci_cfg_reg(DM365_SPI0_SCLK);
> >> > +        davinci_cfg_reg(DM365_SPI0_SDI);
> >> > +        davinci_cfg_reg(DM365_SPI0_SDO);
> >> > +
> >> > +        /* not all slaves will be wired up */
> >> > +        if (chipselect_mask & BIT(0))
> >> > +                davinci_cfg_reg(DM365_SPI0_SDENA0);
> >> > +        if (chipselect_mask & BIT(1))
> >> > +                davinci_cfg_reg(DM365_SPI0_SDENA1);
> >> > +
> >> > +        spi_register_board_info(info, len);
> >> > +
> >> > +        platform_device_register(&dm365_spi0_device);
> >> > +}
> >>
> >> If a board has something wired to something other than SPI0, how will
> >> the board code communicate that it wants say SPI3 mux'd instead of
> >> SPI0.
> > [Sandeep] the way we are doing things at the moment, we will need a
> "dm365_init_spi3" in dm365.c along with the other structs/resources part
> of this patch.
> >
> > This function (dm365_init_spi3) should then be called from board
> specific code.
> >
> 
> ah, I see.  I didn't catch the zero at the end of this function name.
> 
> I think that's fine for now, but it might be worth considering
> a general function so board code can request any SPI.
[Sandeep] Yes, I will need to do that along with provision for GPIOs as chip 
selects.
I removed that yesterday in my SPI driver patch.
> 
> Kevin
> 

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to