Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-16 Thread Stefano Babic
On 16/01/2012 18:29, Eric Nelson wrote: >> > Good catch guys. > > The mxc_spi driver already has support for the ECSPI on i.MX6, > and just needs a small amount of glue to function. Right - and we already discussed in the past how to avoid to put specific SOC code inside the driver. In fact, the

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-16 Thread Eric Nelson
On 01/13/2012 04:45 AM, Dirk Behme wrote: On 13.01.2012 11:48, Stefano Babic wrote: On 12/01/2012 16:27, Dirk Behme wrote: From: Eric Nelson Signed-off-by: Eric Nelson CC: Jason Liu CC: Stefano Babic --- I see no specific i.MX6 code here, and the function is not very different as spi_xc

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-14 Thread Mike Frysinger
On Thursday 12 January 2012 10:27:13 Dirk Behme wrote: > +struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, > + unsigned int max_hz, unsigned int mode) > +{ > + struct imx_spi_dev_t *imx_spi_slave = NULL; setting to NULL is kind of pointless when you init it imme

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-13 Thread Marek Vasut
> On 12.01.2012 16:37, Marek Vasut wrote: > >> From: Eric Nelson > >> > >> Signed-off-by: Eric Nelson > >> CC: Jason Liu > >> CC: Stefano Babic > >> --- > > ... > > >> + if (max_hz < imx_spi_slave->freq) > >> + imx_spi_slave->freq = max_hz ; > > > > " ;" <-- fix globally ...

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-13 Thread Dirk Behme
On 13.01.2012 11:48, Stefano Babic wrote: On 12/01/2012 16:27, Dirk Behme wrote: From: Eric Nelson Signed-off-by: Eric Nelson CC: Jason Liu CC: Stefano Babic --- drivers/spi/Makefile|1 + drivers/spi/imx_ecspi.c | 334 +++ include/imx_sp

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-13 Thread Stefano Babic
On 12/01/2012 16:27, Dirk Behme wrote: > From: Eric Nelson > > Signed-off-by: Eric Nelson > CC: Jason Liu > CC: Stefano Babic > --- > drivers/spi/Makefile|1 + > drivers/spi/imx_ecspi.c | 334 > +++ > include/imx_spi.h | 97 +++

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-12 Thread Dirk Behme
On 12.01.2012 16:37, Marek Vasut wrote: From: Eric Nelson Signed-off-by: Eric Nelson CC: Jason Liu CC: Stefano Babic --- ... + if (max_hz < imx_spi_slave->freq) + imx_spi_slave->freq = max_hz ; " ;" <-- fix globally ... run tools/checkpatch.pl before submitting First, m

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-12 Thread Fabio Estevam
On Thu, Jan 12, 2012 at 1:27 PM, Dirk Behme wrote: > +static s32 spi_reset(struct spi_slave *slave) > +{ > +       u32 clk_src = mxc_get_clock(MXC_CSPI_CLK); > +       u32 pre_div = 0, post_div = 0, reg_ctrl, reg_config; > +       struct imx_spi_dev_t *dev = to_imx_spi_slave(slave); > +       str

Re: [U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-12 Thread Marek Vasut
> From: Eric Nelson > > Signed-off-by: Eric Nelson > CC: Jason Liu > CC: Stefano Babic > --- > drivers/spi/Makefile|1 + > drivers/spi/imx_ecspi.c | 334 > +++ include/imx_spi.h | > 97 ++ > 3 files changed, 432 insertion

[U-Boot] [PATCH 1/2] SPI: Add i.MX ECSPI driver

2012-01-12 Thread Dirk Behme
From: Eric Nelson Signed-off-by: Eric Nelson CC: Jason Liu CC: Stefano Babic --- drivers/spi/Makefile|1 + drivers/spi/imx_ecspi.c | 334 +++ include/imx_spi.h | 97 ++ 3 files changed, 432 insertions(+), 0 deletions(-)