Common serial driver for Atmel AT32 and AT91 chips
PATCH 5/6 Common serial driver for Atmel AT32 and AT91 chips
This is a first attempt at creating a common serial driver for Atmel chips. For now, it supports the AT32AP7000 AVR32 chip, but it should be possible to support AT91RM9200 and other ARM-based chips with some minor modifications.
There's nothing fundamentally AVR32-specific in this driver, but it does use some features which are currently only defined for the AT32AP CPU port:
* pm_get_clock_freq: Obtain the clock frequency of a given domain
* gd->console_uart: A "struct device" containing information about register mappings, gpio resources and clocks associated with the UART device.
For more information about these features, please see the "AT32AP CPU" patch.
Although it might not seem like a huge win to consolidate the serial driver, which is quite small and trivial, there are some general issues we need to resolve before we can consolidate other more complex drivers, like the ethernet and mmc drivers.
Comments are welcome.
Haavard
---
CHANGELOG:
Add Atmel USART serial driver
drivers/Makefile | 2 drivers/atmel_usart.c | 88 ++++++++++++++ drivers/atmel_usart.h | 314 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 403 insertions(+), 1 deletion(-)
drivers/Makefile +1 -1
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)libdrivers.a -COBJS = 3c589.o 5701rls.o ali512x.o \ +COBJS = 3c589.o 5701rls.o ali512x.o atmel_usart.o \ bcm570x.o bcm570x_autoneg.o cfb_console.o cfi_flash.o \ cs8900.o ct69000.o dataflash.o dc2114x.o dm9000x.o \ e1000.o eepro100.o \
drivers/atmel_usart.c new file +88 -0
88 lines not on this page · raw message
drivers/atmel_usart.h new file +314 -0
314 lines not on this page · raw message
Wolfgang Denk
AppliedPATCH 5/6 Common serial driver for Atmel AT32 and AT91 chips
Quoted 13 lines · In message <[email protected]> you wrote:
This is a first attempt at creating a common serial driver for Atmel chips. For now, it supports the AT32AP7000 AVR32 chip, but it should be possible to support AT91RM9200 and other ARM-based chips with some minor modifications.
There's nothing fundamentally AVR32-specific in this driver, but it does use some features which are currently only defined for the AT32AP CPU port:
*pm_get_clock_freq: Obtain the clock frequency of a given domain
*gd->console_uart: A "struct device" containing information about register mappings, gpio resources and clocks associated with the UART device.
Quoted 2 lines
For more information about these features, please see the "AT32AP CPU" patch.
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de On a clear disk you can seek forever.