On Wed, 4 Feb 2009, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 17:59 Wed 04 Feb , Guennadi Liakhovetski wrote: > > + > > +/* > > + * Each transfer is performed as: > > + * 1. chip-select active > > + * 2. send 8-bit start code > > + * 3. send 16-bit data > > + * 4. chip-select inactive > > + */ > > +static int send_word(struct spi_slave *spi, u8 rs, u16 data) > > +{ > > + u32 buf8 = 0x70 | ID | (rs & 2); > why?
That's how the start byte looks like: 01110<ID><RS><R/W> rs is 0 for index or 1 for data, and R/W is 0 for write. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot