________________________________________ >From: Alan Cox [alan@xxxxxxxxxxxxxxxxxxx] >Sent: Friday, October 12, 2012 6:51 PM >To: Noam Camus >Cc: linux-serial@xxxxxxxxxxxxxxx >Subject: Re: 8250_early for big-endian > >> I am using 8250 console and wish to use the 8250_early as well. >> >> I encounter endianess problem while using this driver for mmio32. .>> >> The problem is since my serial peripheral like my cpu is in BIG endian. >> >> Driver through serial_in/serial_out uses readl/writel from asm-generic/io.h. >> >> These macros assume peripheral is always in LITTLE endian. >> >> Therefore all data needs a swab. >> >> In 8250 driver I can register replacement for default serial_in/serial_out and workaround the problem. >> In 8250_early I had no choice but to change code with additional swab to workaround the problem. >> >> I am looking for proper solution so it can be added to upstream. >> I got several ideas if interest arise. > >Given they are all byte registers so how can they need swapping ? They are >merely 3 further bytes offset. > >Alan Of course swapping is a waste of cpu cycles. Workaround can be 3 further bytes offset. Thanks Back to my problem. How can 8250_early be enhanced to support big endian registers. Is it configuation? Maybe command line flag? both? other? Noam-- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html