Dear Fabio, In message <caomzo5befs10xvztnigmejmvjylvv+jqdlzyom9k8-g+zi1...@mail.gmail.com> you wrote: > > > I'm sorry, but I fail to understand how writew() can be better than > > another I/O accessor. Neither of these has the capability to detect > > the endianess of this specific register interface ? > > It's not that writew() is better. The problem is that we cannot use > clrsetbits_le16() for a big endian controller.
On ARM (a LE architecture), clrsetbits_le16() maps down into: clrsetbits_le16 -> out_le16 / in_le16 -> out_arch, w,le16 / in_arch, w,le16 -> __raw_writew(cpu_to_le16()) / le16__to_cpu(__raw_readw()) -> __raw_writew() / __raw_readw() while writew() -> __raw_writew(cpu_to_le16(v),__mem_pci(c)) __raw_writew() Both map into __raw_writew() [which then boild down into __arch_putw() which is just a volatile unsigned short write access. So both clrsetbits_le16() and writew() are little endian accessors. In which way would one write other data to the device than the other? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The human race has one really effective weapon, and that is laughter. - Mark Twain _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot