Rename at91_serial driver as atmel_serial
Subsystems (4)
cover Rename at91_serial driver as atmel_serial
Hi,
Here's the big at91_serial rename I've been talking about before. It turned out to be quite big on its own, so I'm sending it as a separate series. I have a few more patches for the atmel_serial driver (or at91_serial driver, depending on whether you'll accept this series) which I'll send you tomorrow. Please give me a hint about whether this series is acceptable or not so that I can rework the other patches as appropriate.
Patch #6 turned out to be too big to send inline, so I'm sending a link to it instead. I can send it to you in private if you want.
Also, the patches have been made with git-format-patch -M, so they won't work with patch, only with git. This reduced the size of the first two patches a lot.
Shortlog, diffstat and summary of the full series follows.
Haavard
Haavard Skinnemoen:
at91_serial -> atmel_serial: at91rm9200_usart.h
at91_serial -> atmel_serial: at91_serial.c
at91_serial -> atmel_serial: Kconfig symbols
at91_serial -> atmel_serial: Platform device name
at91_serial -> atmel_serial: Public definitions
at91_serial -> atmel_serial: Internal names
serial: Rename PORT_AT91 -> PORT_ATMEL
atmel_serial: Kill at91_register_uart_fnsarch/arm/configs/at91rm9200dk_defconfig | 6 arch/arm/configs/at91rm9200ek_defconfig | 6 arch/arm/configs/ateb9200_defconfig | 6 arch/arm/configs/carmeva_defconfig | 4 arch/arm/configs/csb337_defconfig | 6 arch/arm/configs/csb637_defconfig | 6 arch/arm/configs/kafa_defconfig | 6 arch/arm/configs/kb9202_defconfig | 4 arch/arm/configs/onearm_defconfig | 6 arch/arm/mach-at91rm9200/devices.c | 34 - arch/avr32/configs/atstk1002_defconfig | 6 arch/avr32/mach-at32ap/at32ap7000.c | 46 - drivers/serial/Kconfig | 14 drivers/serial/Makefile | 2 drivers/serial/at91_serial.c | 980 -------------------- drivers/serial/atmel_serial.c | 940 +++++++++++++++++++ drivers/serial/atmel_serial.h | 123 +++ include/asm-arm/arch-at91rm9200/at91rm9200_usart.h | 123 --- include/asm-arm/arch-at91rm9200/board.h | 4 include/asm-arm/arch-at91rm9200/hardware.h | 2 include/asm-arm/mach/serial_at91.h | 33 - include/asm-avr32/arch-at32ap/at91rm9200_usart.h | 123 --- include/asm-avr32/arch-at32ap/board.h | 4 include/asm-avr32/mach/serial_at91.h | 33 - include/linux/serial_core.h | 4 25 files changed, 1146 insertions(+), 1375 deletions(-) delete mode 100644 drivers/serial/at91_serial.c create mode 100644 drivers/serial/atmel_serial.c create mode 100644 drivers/serial/atmel_serial.h delete mode 100644 include/asm-arm/arch-at91rm9200/at91rm9200_usart.h delete mode 100644 include/asm-arm/mach/serial_at91.h delete mode 100644 include/asm-avr32/arch-at32ap/at91rm9200_usart.h delete mode 100644 include/asm-avr32/mach/serial_at91.h
PATCH 1/8 at91_serial -> atmel_serial: at91rm9200_usart.h
Move include/asm/arch/at91rm9200_usart.h into drivers/serial and rename it atmel_usart.h. Also delete AVR32's version of this file.
--- drivers/serial/at91_serial.c | 3 .../serial/atmel_serial.h | 2 include/asm-avr32/arch-at32ap/at91rm9200_usart.h | 123 -------------------- 3 files changed, 3 insertions(+), 125 deletions(-)
drivers/serial/at91_serial.c +2 -1
@@ -36,13 +36,14 @@ #include <linux/platform_device.h>#include <asm/io.h> -#include <asm/arch/at91rm9200_usart.h> #include <asm/arch/at91rm9200_pdc.h> #include <asm/mach/serial_at91.h> #include <asm/arch/board.h> #include <asm/arch/system.h> #include <asm/arch/gpio.h> +#include "atmel_serial.h" +#if defined(CONFIG_SERIAL_AT91_CONSOLE ) && defined(CONFIG_MAGIC_SYSRQ )#define SUPPORT_SYSRQ #endif
drivers/serial/atmel_serial.h renamed from include/asm-arm/arch-at91rm9200/at91rm9200_usart.h +1 -1
@@ -1,5 +1,5 @@/* -* include/asm-arm/arch-at91rm9200/at91rm9200_usart.h +* drivers/serial/atmel_serial.h * * Copyright (C) 2005 Ivan Kokshaysky * Copyright (C) SAN People
include/asm-avr32/arch-at32ap/at91rm9200_usart.h deleted +0 -123
123 lines not on this page · raw message
Signature · 1 line
1.4.1.1
PATCH 2/8 at91_serial -> atmel_serial: at91_serial.c
Rename at91_serial.c atmel_serial.c
---
drivers/serial/Makefile | 2 +-
drivers/serial/{at91_serial.c => atmel_serial.c} | 0
2 files changed, 1 insertions(+), 1 deletions(-)drivers/serial/Makefile +1 -1
@@ -54,5 +54,5 @@ obj-$(CONFIG_SERIAL_TXX9) += serial_txx9 obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o -obj-$(CONFIG_SERIAL_AT91) += at91_serial.o +obj-$(CONFIG_SERIAL_AT91) += atmel_serial.o obj-$(CONFIG_SERIAL_NETX) += netx-serial.o
drivers/serial/atmel_serial.c renamed from drivers/serial/at91_serial.c +0 -0
Signature · 1 line
1.4.1.1
PATCH 3/8 at91_serial -> atmel_serial: Kconfig symbols
Rename the following Kconfig symbols:
* CONFIG_SERIAL_AT91 -> CONFIG_SERIAL_ATMEL
* CONFIG_SERIAL_AT91_CONSOLE -> CONFIG_SERIAL_ATMEL_CONSOLE
* CONFIG_SERIAL_AT91_TTYAT -> CONFIG_SERIAL_ATMEL_TTYAT
--- arch/arm/configs/at91rm9200dk_defconfig | 6 +++--- arch/arm/configs/at91rm9200ek_defconfig | 6 +++--- arch/arm/configs/ateb9200_defconfig | 6 +++--- arch/arm/configs/carmeva_defconfig | 4 ++-- arch/arm/configs/csb337_defconfig | 6 +++--- arch/arm/configs/csb637_defconfig | 6 +++--- arch/arm/configs/kafa_defconfig | 6 +++--- arch/arm/configs/kb9202_defconfig | 4 ++-- arch/arm/configs/onearm_defconfig | 6 +++--- arch/arm/mach-at91rm9200/devices.c | 2 +- arch/avr32/configs/atstk1002_defconfig | 6 +++--- drivers/serial/Kconfig | 14 +++++++------- drivers/serial/Makefile | 2 +- drivers/serial/atmel_serial.c | 6 +++--- include/asm-arm/mach/serial_at91.h | 2 +- include/asm-avr32/mach/serial_at91.h | 2 +- 16 files changed, 42 insertions(+), 42 deletions(-)
arch/arm/configs/at91rm9200dk_defconfig +3 -3
@@ -553,9 +553,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/at91rm9200ek_defconfig +3 -3
@@ -534,9 +534,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/ateb9200_defconfig +3 -3
@@ -656,9 +656,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/carmeva_defconfig +2 -2
@@ -455,8 +455,8 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/csb337_defconfig +3 -3
@@ -591,9 +591,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/csb637_defconfig +3 -3
@@ -591,9 +591,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/kafa_defconfig +3 -3
@@ -536,9 +536,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/kb9202_defconfig +2 -2
@@ -418,8 +418,8 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/configs/onearm_defconfig +3 -3
@@ -583,9 +583,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
arch/arm/mach-at91rm9200/devices.c +1 -1
@@ -544,7 +544,7 @@ #endif* UART * -------------------------------------------------------------------- */ -#if defined(CONFIG_SERIAL_AT91) +#if defined(CONFIG_SERIAL_ATMEL) static struct resource dbgu_resources[] = { [0] = { .start = AT91_VA_BASE_SYS + AT91_DBGU,
arch/avr32/configs/atstk1002_defconfig +3 -3
@@ -385,9 +385,9 @@ # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y
drivers/serial/Kconfig +7 -7
@@ -299,17 +299,17 @@ config SERIAL_AMBA_PL011_CONSOLE your boot loader (lilo or loadlin) about how to pass options to the kernel at boot time.) -config SERIAL_AT91 - bool "AT91RM9200 / AT91SAM9261 serial port support" +config SERIAL_ATMEL + bool "AT91 / AT32 on-chip serial port support" depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261) select SERIAL_CORE help This enables the driver for the on-chip UARTs of the Atmel AT91RM9200 and AT91SAM926 processor. -config SERIAL_AT91_CONSOLE - bool "Support for console on AT91RM9200 / AT91SAM9261 serial port" - depends on SERIAL_AT91=y +config SERIAL_ATMEL_CONSOLE + bool "Support for console on AT91 / AT32 serial port" + depends on SERIAL_ATMEL=y select SERIAL_CORE_CONSOLE help Say Y here if you wish to use a UART on the Atmel AT91RM9200 or
@@ -317,9 +317,9 @@ config SERIAL_AT91_CONSOLE which receives all kernel messages and warnings and which allows logins in single user mode). -config SERIAL_AT91_TTYAT +config SERIAL_ATMEL_TTYAT bool "Install as device ttyAT0-4 instead of ttyS0-4" - depends on SERIAL_AT91=y + depends on SERIAL_ATMEL=y help Say Y here if you wish to have the five internal AT91RM9200 UARTs appear as /dev/ttyAT0-4 (major 204, minor 154-158) instead of the
drivers/serial/Makefile +1 -1
@@ -54,5 +54,5 @@ obj-$(CONFIG_SERIAL_TXX9) += serial_txx9 obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o -obj-$(CONFIG_SERIAL_AT91) += atmel_serial.o +obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o obj-$(CONFIG_SERIAL_NETX) += netx-serial.o
drivers/serial/atmel_serial.c +3 -3
@@ -44,13 +44,13 @@ #include <asm/arch/gpio.h>#include "atmel_serial.h" -#if defined(CONFIG_SERIAL_AT91_CONSOLE ) && defined(CONFIG_MAGIC_SYSRQ ) +#if defined(CONFIG_SERIAL_ATMEL_CONSOLE ) && defined(CONFIG_MAGIC_SYSRQ )#define SUPPORT_SYSRQ #endif #include <linux/serial_core.h> -#ifdef CONFIG_SERIAL_AT91_TTYAT +#ifdef CONFIG_SERIAL_ATMEL_TTYAT /* Use device name ttyAT, major 204 and minor 154-169. This is necessary if we * should coexist with the 8250 driver, such as if we have an external 16C550
@@ -726,7 +726,7 @@ void __init at91_register_uart_fns(struc } -#ifdef CONFIG_SERIAL_AT91_CONSOLE +#ifdef CONFIG_SERIAL_ATMEL_CONSOLE static void at91_console_putchar (struct uart_port *port,int ch) {while (!(UART_GET_CSR (port) &AT91_US_TXRDY ))
include/asm-arm/mach/serial_at91.h +1 -1
@@ -24,7 +24,7 @@ struct at91_port_fns {void (*close)(struct uart_port *); }; -#if defined(CONFIG_SERIAL_AT91 ) +#if defined(CONFIG_SERIAL_ATMEL )void at91_register_uart_fns (struct at91_port_fns *fns);#else #define at91_register_uart_fns (fns) do { } while (0)
include/asm-avr32/mach/serial_at91.h +1 -1
@@ -24,7 +24,7 @@ struct at91_port_fns {void (*close)(struct uart_port *); }; -#if defined(CONFIG_SERIAL_AT91 ) +#if defined(CONFIG_SERIAL_ATMEL )void at91_register_uart_fns (struct at91_port_fns *fns);#else #define at91_register_uart_fns (fns) do { } while (0)
Signature · 1 line
1.4.1.1
PATCH 4/8 at91_serial -> atmel_serial: Platform device name
Rename the "at91_usart" platform driver "atmel_usart" and update platform devices accordingly.
--- arch/arm/mach-at91rm9200/devices.c | 10 ++++---- arch/avr32/mach-at32ap/at32ap7000.c | 42 ++++++++++++++++++----------------- drivers/serial/atmel_serial.c | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-)
arch/arm/mach-at91rm9200/devices.c +5 -5
@@ -564,7 +564,7 @@ static struct at91_uart_data dbgu_data = };static struct platform_device at91rm9200_dbgu_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =0 , .dev = { .platform_data = &dbgu_data,
@@ -599,7 +599,7 @@ static struct at91_uart_data uart0_data };static struct platform_device at91rm9200_uart0_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =1 , .dev = { .platform_data = &uart0_data,
@@ -641,7 +641,7 @@ static struct at91_uart_data uart1_data };static struct platform_device at91rm9200_uart1_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =2 , .dev = { .platform_data = &uart1_data,
@@ -682,7 +682,7 @@ static struct at91_uart_data uart2_data };static struct platform_device at91rm9200_uart2_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =3 , .dev = { .platform_data = &uart2_data,
@@ -717,7 +717,7 @@ static struct at91_uart_data uart3_data };static struct platform_device at91rm9200_uart3_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =4 , .dev = { .platform_data = &uart3_data,
arch/avr32/mach-at32ap/at32ap7000.c +21 -21
85 lines not on this page · raw message
drivers/serial/atmel_serial.c +1 -1
@@ -947,7 +947,7 @@ static struct platform_driver at91_seria .suspend = at91_serial_suspend, .resume = at91_serial_resume, .driver = { - .name = "at91_usart", + .name = "atmel_usart", .owner = THIS_MODULE, }, };
Signature · 1 line
1.4.1.1
PATCH 5/8 at91_serial -> atmel_serial: Public definitions
Rename the following public definitions:
* AT91_NR_UART -> ATMEL_NR_UART
* struct at91_uart_data -> struct atmel_uart_data
* at91_default_console_device -> atmel_default_console_device
--- arch/arm/mach-at91rm9200/devices.c | 22 +++++++++++----------- arch/avr32/mach-at32ap/at32ap7000.c | 4 ++-- drivers/serial/atmel_serial.c | 14 +++++++------- include/asm-arm/arch-at91rm9200/board.h | 4 ++-- include/asm-arm/arch-at91rm9200/hardware.h | 2 +- include/asm-avr32/arch-at32ap/board.h | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-)
arch/arm/mach-at91rm9200/devices.c +11 -11
@@ -558,7 +558,7 @@ static struct resource dbgu_resources[] }, }; -static struct at91_uart_data dbgu_data = { +static struct atmel_uart_data dbgu_data = { .use_dma_tx =0 , .use_dma_rx =0 ,/* DBGU not capable of receive DMA */ };
@@ -593,7 +593,7 @@ static struct resource uart0_resources[] }, }; -static struct at91_uart_data uart0_data = { +static struct atmel_uart_data uart0_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -635,7 +635,7 @@ static struct resource uart1_resources[] }, }; -static struct at91_uart_data uart1_data = { +static struct atmel_uart_data uart1_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -676,7 +676,7 @@ static struct resource uart2_resources[] }, }; -static struct at91_uart_data uart2_data = { +static struct atmel_uart_data uart2_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -711,7 +711,7 @@ static struct resource uart3_resources[] }, }; -static struct at91_uart_data uart3_data = { +static struct atmel_uart_data uart3_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -733,8 +733,8 @@ static inline void configure_usart3_pinsat91_set_B_periph (AT91_PIN_PA6 ,0 );/* RXD3 */ } -struct platform_device *at91_uarts[AT91_NR_UART ];/* the UARTs to use */ -struct platform_device *at91_default_console_device;/* the serial console device */ +struct platform_device *at91_uarts[ATMEL_NR_UART ];/* the UARTs to use */ +struct platform_device *atmel_default_console_device;/* the serial console device */ void __init at91_init_serial (struct at91_uart_config *config) {
@@ -775,9 +775,9 @@ void __init at91_init_serial(struct at91 }/* Set serial console device */ -if (config->console_tty <AT91_NR_UART ) - at91_default_console_device = at91_uarts[config->console_tty]; -if (!at91_default_console_device) +if (config->console_tty <ATMEL_NR_UART ) + atmel_default_console_device = at91_uarts[config->console_tty]; +if (!atmel_default_console_device)printk (KERN_INFO "AT91: No default serial console defined.\n" ); }
@@ -785,7 +785,7 @@ void __init at91_add_device_serial(void) {int i; -for (i =0 ; i <AT91_NR_UART ; i++) { +for (i =0 ; i <ATMEL_NR_UART ; i++) {if (at91_uarts[i])platform_device_register (at91_uarts[i]); }
arch/avr32/mach-at32ap/at32ap7000.c +2 -2
@@ -615,11 +615,11 @@ struct platform_device *__init at32_add_return pdev; } -struct platform_device *at91_default_console_device; +struct platform_device *atmel_default_console_device;void __init at32_setup_serial_console (unsigned int usart_id) { - at91_default_console_device =setup_usart (usart_id); + atmel_default_console_device =setup_usart (usart_id); }/* --------------------------------------------------------------------
drivers/serial/atmel_serial.c +7 -7
@@ -113,7 +113,7 @@ struct at91_uart_port {unsigned short suspended;/* is port suspended? */ }; -static struct at91_uart_port at91_ports[AT91_NR_UART ]; +static struct at91_uart_port at91_ports[ATMEL_NR_UART ];#ifdef SUPPORT_SYSRQ static struct console at91_console;
@@ -682,7 +682,7 @@ static struct uart_ops at91_pops = {static void __devinit at91_init_port (struct at91_uart_port *at91_port,struct platform_device *pdev) {struct uart_port *port = &at91_port->uart; -struct at91_uart_data *data = pdev->dev.platform_data; +struct atmel_uart_data *data = pdev->dev.platform_data; port->iotype =UPIO_MEM ; port->flags =UPF_BOOT_AUTOCONF ;
@@ -834,9 +834,9 @@ #define AT91_CONSOLE_DEVICE &at91_consol*/ static int __init at91_console_init (void ) { -if (at91_default_console_device) { -add_preferred_console (AT91_DEVICENAME , at91_default_console_device->id,NULL ); -at91_init_port (&(at91_ports[at91_default_console_device->id]), at91_default_console_device); +if (atmel_default_console_device) { +add_preferred_console (AT91_DEVICENAME , atmel_default_console_device->id,NULL ); +at91_init_port (&(at91_ports[atmel_default_console_device->id]), atmel_default_console_device);register_console (&at91_console); }
@@ -849,7 +849,7 @@ console_initcall(at91_console_init);*/ static int __init at91_late_console_init (void ) { -if (at91_default_console_device && !(at91_console.flags &CON_ENABLED )) +if (atmel_default_console_device && !(at91_console.flags &CON_ENABLED ))register_console (&at91_console);return 0 ;
@@ -866,7 +866,7 @@ static struct uart_driver at91_uart = { .dev_name = AT91_DEVICENAME, .major = SERIAL_AT91_MAJOR, .minor = MINOR_START, - .nr = AT91_NR_UART, + .nr = ATMEL_NR_UART, .cons = AT91_CONSOLE_DEVICE, };
include/asm-arm/arch-at91rm9200/board.h +2 -2
@@ -97,10 +97,10 @@ struct at91_uart_config {unsigned short nr_tty;/* number of serial tty's */ short tty_map[];/* map UART to tty number */ }; -extern struct platform_device *at91_default_console_device; +extern struct platform_device *atmel_default_console_device;extern void __init at91_init_serial (struct at91_uart_config *config); -struct at91_uart_data { +struct atmel_uart_data {short use_dma_tx;/* use transmit DMA? */ short use_dma_rx;/* use receive DMA? */ };
include/asm-arm/arch-at91rm9200/hardware.h +1 -1
@@ -57,7 +57,7 @@ #define AT91_SRAM_SIZE 0x00004000 /* In#define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_SIZE)/* Serial ports */ -#define AT91_NR_UART 5/* 4 USART3's and one DBGU port */ +#define ATMEL_NR_UART 5/* 4 USART3's and one DBGU port */ /* FLASH */ #define AT91_FLASH_BASE 0x10000000/* NCS0: Flash physical base address */
include/asm-avr32/arch-at32ap/board.h +2 -2
@@ -9,8 +9,8 @@ #include <linux/types.h>/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ void at32_add_system_devices (void ); -#define AT91_NR_UART 4 -extern struct platform_device *at91_default_console_device; +#define ATMEL_NR_UART 4 +extern struct platform_device *atmel_default_console_device;struct platform_device *at32_add_device_usart (unsigned int id);
Signature · 1 line
1.4.1.1
PATCH 6/8 at91_serial -> atmel_serial: Internal names
Prefix all internal functions and variables with atmel_ instead of at91_.
The at91_register_uart_fns() stuff is left as is since I can't find any actual users of it.
--- drivers/serial/atmel_serial.c | 496 +++++++++++++++++++++-------------------- drivers/serial/atmel_serial.h | 196 ++++++++-------- 2 files changed, 346 insertions(+), 346 deletions(-)
The patch weighs in at 47K, so I put it at
instead of including it here.
Haavard
PATCH 7/8 serial: Rename PORT_AT91 -> PORT_ATMEL
The at91_serial driver can be used with both AT32 and AT91 devices from Atmel and has therefore been renamed atmel_serial. The only thing left is to rename PORT_AT91 PORT_ATMEL.
--- drivers/serial/atmel_serial.c | 6 +++--- include/linux/serial_core.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/serial/atmel_serial.c +3 -3
@@ -581,7 +581,7 @@ static void atmel_set_termios(struct uar*/ static const char *atmel_type (struct uart_port *port) { -return (port->type ==PORT_AT91 ) ?"ATMEL_SERIAL" :NULL ; +return (port->type ==PORT_ATMEL ) ?"ATMEL_SERIAL" :NULL ; }/*
@@ -628,7 +628,7 @@ static int atmel_request_port(struct uarstatic void atmel_config_port (struct uart_port *port,int flags) {if (flags &UART_CONFIG_TYPE ) { - port->type =PORT_AT91 ; + port->type =PORT_ATMEL ;atmel_request_port (port); } }
@@ -639,7 +639,7 @@ static void atmel_config_port(struct uarstatic int atmel_verify_port (struct uart_port *port,struct serial_struct *ser) {int ret =0 ; -if (ser->type !=PORT_UNKNOWN && ser->type !=PORT_AT91 ) +if (ser->type !=PORT_UNKNOWN && ser->type !=PORT_ATMEL ) ret = -EINVAL ;if (port->irq != ser->irq) ret = -EINVAL ;
include/linux/serial_core.h +2 -2
@@ -67,8 +67,8 @@ #define PORT_DZ 47/* Parisc type numbers. */ #define PORT_MUX 48 -/* Atmel AT91xxx SoC */ -#define PORT_AT91 49 +/* Atmel AT91 / AT32 SoC */ +#define PORT_ATMEL 49/* Macintosh Zilog type numbers */ #define PORT_MAC_ZILOG 50/* m68k : not yet implemented */
Signature · 1 line
1.4.1.1
PATCH 8/8 atmel_serial: Kill at91_register_uart_fns
at91_register_uart_fns has no users as far as I can see. Let's get rid of it.
--- drivers/serial/atmel_serial.c | 41 ---------------------------------- include/asm-arm/mach/serial_at91.h | 33 --------------------------- include/asm-avr32/mach/serial_at91.h | 33 --------------------------- 3 files changed, 0 insertions(+), 107 deletions(-)
drivers/serial/atmel_serial.c +0 -41
@@ -37,7 +37,6 @@ #include <linux/platform_device.h>#include <asm/io.h> #include <asm/arch/at91rm9200_pdc.h> -#include <asm/mach/serial_at91.h> #include <asm/arch/board.h> #include <asm/arch/system.h> #include <asm/arch/gpio.h>
@@ -101,9 +100,6 @@ #define UART_PUT_TCR(port,v) writel(v, (//#define UART_PUT_TNPR(port,v) writel(v, (port)->membase + ATMEL_PDC_TNPR) //#define UART_PUT_TNCR(port,v) writel(v, (port)->membase + ATMEL_PDC_TNCR) -static int (*at91_open)(struct uart_port *); -static void (*at91_close)(struct uart_port *); -/* * We wrap our port structure around the generic uart_port. */
@@ -396,18 +392,6 @@ static int atmel_startup(struct uart_por }/* -* If there is a specific "open" function (to register -* control line interrupts) -*/ -if (at91_open) { - retval =at91_open (port); -if (retval) { -free_irq (port->irq, port); -return retval; - } - } - -/* * Finally, enable the serial port */ UART_PUT_CR (port,ATMEL_US_RSTSTA |ATMEL_US_RSTRX );
@@ -435,13 +419,6 @@ static void atmel_shutdown(struct uart_p* Free the interrupt */ free_irq (port->irq, port); - -/* -* If there is a specific "close" function (to unregister -* control line interrupts) -*/ -if (at91_close) -at91_close (port); }/*
@@ -708,24 +685,6 @@ static void __devinit atmel_init_port(st } } -/* -* Register board-specific modem-control line handlers. -*/ -void __init at91_register_uart_fns (struct at91_port_fns *fns) -{ -if (fns->enable_ms) - atmel_pops.enable_ms = fns->enable_ms; -if (fns->get_mctrl) - atmel_pops.get_mctrl = fns->get_mctrl; -if (fns->set_mctrl) - atmel_pops.set_mctrl = fns->set_mctrl; - at91_open = fns->open; - at91_close = fns->close; - atmel_pops.pm = fns->pm; - atmel_pops.set_wake = fns->set_wake; -} - -#ifdef CONFIG_SERIAL_ATMEL_CONSOLE static void atmel_console_putchar (struct uart_port *port,int ch) {
include/asm-arm/mach/serial_at91.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* linux/include/asm-arm/mach/serial_at91.h -* -* Based on serial_sa1100.h by Nicolas Pitre -* -* Copyright (C) 2002 ATMEL Rousset -* -* Low level machine dependent UART functions. -*/ - -struct uart_port ; - -/* -* This is a temporary structure for registering these -* functions; it is intended to be discarded after boot. -*/ -struct at91_port_fns { -void (*set_mctrl)(struct uart_port *,u_int ); -u_int (*get_mctrl)(struct uart_port *); -void (*enable_ms)(struct uart_port *); -void (*pm)(struct uart_port *,u_int ,u_int ); -int (*set_wake)(struct uart_port *,u_int ); -int (*open)(struct uart_port *); -void (*close)(struct uart_port *); -}; - -#if defined(CONFIG_SERIAL_ATMEL ) -void at91_register_uart_fns (struct at91_port_fns *fns); -#else -#define at91_register_uart_fns (fns) do { } while (0) -#endif - -
include/asm-avr32/mach/serial_at91.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* linux/include/asm-arm/mach/serial_at91.h -* -* Based on serial_sa1100.h by Nicolas Pitre -* -* Copyright (C) 2002 ATMEL Rousset -* -* Low level machine dependent UART functions. -*/ - -struct uart_port ; - -/* -* This is a temporary structure for registering these -* functions; it is intended to be discarded after boot. -*/ -struct at91_port_fns { -void (*set_mctrl)(struct uart_port *,u_int ); -u_int (*get_mctrl)(struct uart_port *); -void (*enable_ms)(struct uart_port *); -void (*pm)(struct uart_port *,u_int ,u_int ); -int (*set_wake)(struct uart_port *,u_int ); -int (*open)(struct uart_port *); -void (*close)(struct uart_port *); -}; - -#if defined(CONFIG_SERIAL_ATMEL ) -void at91_register_uart_fns (struct at91_port_fns *fns); -#else -#define at91_register_uart_fns (fns) do { } while (0) -#endif - -
Signature · 1 line
1.4.1.1
Re: [PATCH 8/8] atmel_serial: Kill at91_register_uart_fns
hi Haavard,
Quoted 2 lines
at91_register_uart_fnshas no users as far as I can see. Let's get rid of it.
No. It is being used.
This interface is used to register board-specific functions that can be use to control the serial port modem-control lines.
For example, the AT91RM9200 only provides the full modem-control signals on USART1. If you need the modem-control signals for any of the other ports you need to drive some of the GPIO pins manually. So you need this hook back into your board-specific file to do that.
Regards,
Andrew Victor
Re: [PATCH 8/8] atmel_serial: Kill at91_register_uart_fns
Quoted 7 lines · On 28 Sep 2006 11:21:55 +0200 Andrew Victor <[email protected]> wrote:
hi Haavard,
Quoted 2 lines
at91_register_uart_fnshas no users as far as I can see. Let's get rid of it.No. It is being used.
Quoted 7 lines
This interface is used to register board-specific functions that can be use to control the serial port modem-control lines.
For example, the AT91RM9200 only provides the full modem-control signals on USART1. If you need the modem-control signals for any of the other ports you need to drive some of the GPIO pins manually. So you need this hook back into your board-specific file to do that.
Ok, I sort of suspected that. But I can't see any users in the kernel tree, so perhaps we should leave the name of the function alone too? (i.e. just drop the patch)
Haavard
Re: [PATCH 8/8] atmel_serial: Kill at91_register_uart_fns
hi Haavard,
Quoted 3 lines
Ok, I sort of suspected that. But I can't see any users in the kernel tree, so perhaps we should leave the name of the function alone too? (i.e. just drop the patch)
For consistency, the function name should be renamed (at91 -> atmel). I'm not up-to-date with the features of the AVR32-based boards, but this functionality might also be useful there.
Out-of-mainline users will just have to update their patches. :)
Regards,
Andrew Victor
Re: [PATCH 8/8] atmel_serial: Kill at91_register_uart_fns
Quoted 11 lines · On 28 Sep 2006 13:14:09 +0200 Andrew Victor <[email protected]> wrote:
hi Haavard,
Quoted 3 lines
Ok, I sort of suspected that. But I can't see any users in the kernel tree, so perhaps we should leave the name of the function alone too? (i.e. just drop the patch)
For consistency, the function name should be renamed (at91 -> atmel). I'm not up-to-date with the features of the AVR32-based boards, but this functionality might also be useful there.
Out-of-mainline users will just have to update their patches. :)
Ok, here's a patch that does that. I've renamed at91_open and at91_close to atmel_open_hook and atmel_close_hook as well to make it more clear what they really are.
Haavard
---
From: Haavard Skinnemoen <[email protected]>
Subject: [PATCH] atmel_serial: Rename at91_register_uart_fns
Rename at91_register_uart_fns and associated structs and variables to make it consistent with the atmel_ prefix used by the rest of the driver.
--- drivers/serial/atmel_serial.c | 18 +++++++++--------- include/asm-arm/mach/serial_at91.h | 6 +++--- include/asm-avr32/mach/serial_at91.h | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-)
drivers/serial/atmel_serial.c +9 -9
@@ -101,8 +101,8 @@ #define UART_PUT_TCR(port,v) writel(v, (//#define UART_PUT_TNPR(port,v) writel(v, (port)->membase + ATMEL_PDC_TNPR) //#define UART_PUT_TNCR(port,v) writel(v, (port)->membase + ATMEL_PDC_TNCR) -static int (*at91_open)(struct uart_port *); -static void (*at91_close)(struct uart_port *); +static int (*atmel_open_hook)(struct uart_port *); +static void (*atmel_close_hook)(struct uart_port *);/* * We wrap our port structure around the generic uart_port.
@@ -399,8 +399,8 @@ static int atmel_startup(struct uart_por* If there is a specific "open" function (to register * control line interrupts) */ -if (at91_open) { - retval =at91_open (port); +if (atmel_open_hook) { + retval =atmel_open_hook (port);if (retval) {free_irq (port->irq, port);return retval;
@@ -440,8 +440,8 @@ static void atmel_shutdown(struct uart_p* If there is a specific "close" function (to unregister * control line interrupts) */ -if (at91_close) -at91_close (port); +if (atmel_close_hook) +atmel_close_hook (port); }/*
@@ -711,7 +711,7 @@ static void __devinit atmel_init_port(st/* * Register board-specific modem-control line handlers. */ -void __init at91_register_uart_fns (struct at91_port_fns *fns) +void __init atmel_register_uart_fns (struct atmel_port_fns *fns) {if (fns->enable_ms) atmel_pops.enable_ms = fns->enable_ms;
@@ -719,8 +719,8 @@ void __init at91_register_uart_fns(struc atmel_pops.get_mctrl = fns->get_mctrl;if (fns->set_mctrl) atmel_pops.set_mctrl = fns->set_mctrl; - at91_open = fns->open; - at91_close = fns->close; + atmel_open_hook = fns->open; + atmel_close_hook = fns->close; atmel_pops.pm = fns->pm; atmel_pops.set_wake = fns->set_wake; }
include/asm-arm/mach/serial_at91.h +3 -3
@@ -14,7 +14,7 @@ struct uart_port;* This is a temporary structure for registering these * functions; it is intended to be discarded after boot. */ -struct at91_port_fns { +struct atmel_port_fns {void (*set_mctrl)(struct uart_port *,u_int );u_int (*get_mctrl)(struct uart_port *);void (*enable_ms)(struct uart_port *);
@@ -25,9 +25,9 @@ struct at91_port_fns { };#if defined(CONFIG_SERIAL_ATMEL ) -void at91_register_uart_fns (struct at91_port_fns *fns); +void atmel_register_uart_fns (struct atmel_port_fns *fns);#else -#define at91_register_uart_fns (fns) do { } while (0) +#define atmel_register_uart_fns (fns) do { } while (0)#endif
include/asm-avr32/mach/serial_at91.h +3 -3
@@ -14,7 +14,7 @@ struct uart_port;* This is a temporary structure for registering these * functions; it is intended to be discarded after boot. */ -struct at91_port_fns { +struct atmel_port_fns {void (*set_mctrl)(struct uart_port *,u_int );u_int (*get_mctrl)(struct uart_port *);void (*enable_ms)(struct uart_port *);
@@ -25,9 +25,9 @@ struct at91_port_fns { };#if defined(CONFIG_SERIAL_ATMEL ) -void at91_register_uart_fns (struct at91_port_fns *fns); +void atmel_register_uart_fns (struct atmel_port_fns *fns);#else -#define at91_register_uart_fns (fns) do { } while (0) +#define atmel_register_uart_fns (fns) do { } while (0)#endif
Signature · 1 line
1.4.1.1
Re: [PATCH 8/8] atmel_serial: Kill at91_register_uart_fns
Quoted 6 lines
Rename
at91_register_uart_fnsand associated structs and variables to make it consistent with theatmel_prefix used by the rest of the driver.Signed-off-by Haavard Skinnemoen <[email protected]>
Re: [PATCH 8/8] atmel_serial: Kill at91_register_uart_fns
Quoted 8 lines · Andrew Victor
Quoted 6 lines
Rename
at91_register_uart_fnsand associated structs and variables to make it consistent with theatmel_prefix used by the rest of the driver.Signed-off-by Haavard Skinnemoen <[email protected]>Signed-off-by Andrew Victor <[email protected]>
You Sign-off a path when it passes through your hands. You acknowledge a path by Acked-by: xxx when you acknowledge a path.
You are no the only one that get this wrong...
Sam
Re: [PATCH 7/8] serial: Rename PORT_AT91 -> PORT_ATMEL
In reply to Haavard SkinnemoenQuoted 6 lines
The
at91_serialdriver can be used with both AT32 and AT91 devices from Atmel and has therefore been renamedatmel_serial. The only thing left is to renamePORT_AT91PORT_ATMEL.Signed-off-by Haavard Skinnemoen <[email protected]>
Re: [PATCH 6/8] at91_serial -> atmel_serial: Internal names
In reply to Haavard SkinnemoenQuoted 8 lines
Prefix all internal functions and variables with
atmel_instead ofat91_.The
at91_register_uart_fns()stuff is left as is since I can't find any actual users of it.Signed-off-by Haavard Skinnemoen <[email protected]>
Re: [PATCH 5/8] at91_serial -> atmel_serial: Public definitions
In reply to Haavard Skinnemoenhi Haavard,
Quoted 2 lines
Rename the following public definitions:
*AT91_NR_UART->ATMEL_NR_UART
Can you possible rather rename it to ATMEL_MAX_UART ?
Since most AT91 board don't use all the UART's I've had a few reports of people trying to limit the number of UART's "detected" by changing this value - which of course can break things. (They should be changing the number of UARTs in their board-support files).
Regards,
Andrew Victor
Re: [PATCH 5/8] at91_serial -> atmel_serial: Public definitions
Quoted 11 lines · On 28 Sep 2006 10:54:04 +0200 Andrew Victor <[email protected]> wrote:
hi Haavard,
Quoted 2 lines
Rename the following public definitions:
*AT91_NR_UART->ATMEL_NR_UARTCan you possible rather rename it to
ATMEL_MAX_UART?Since most AT91 board don't use all the UART's I've had a few reports of people trying to limit the number of UART's "detected" by changing this value - which of course can break things. (They should be changing the number of UARTs in their board-support files).
Sure. Here's an updated patch. This causes trivial rejects in a couple of the other patches.
Haavard
From: Haavard Skinnemoen <[email protected]>
Subject: [PATCH] at91_serial -> atmel_serial: Public definitions
Rename the following public definitions:
* AT91_NR_UART -> ATMEL_MAX_UART
* struct at91_uart_data -> struct atmel_uart_data
* at91_default_console_device -> atmel_default_console_device
--- arch/arm/mach-at91rm9200/devices.c | 22 +++++++++++----------- arch/avr32/mach-at32ap/at32ap7000.c | 4 ++-- drivers/serial/atmel_serial.c | 14 +++++++------- include/asm-arm/arch-at91rm9200/board.h | 4 ++-- include/asm-arm/arch-at91rm9200/hardware.h | 2 +- include/asm-avr32/arch-at32ap/board.h | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-)
arch/arm/mach-at91rm9200/devices.c +11 -11
@@ -558,7 +558,7 @@ static struct resource dbgu_resources[] }, }; -static struct at91_uart_data dbgu_data = { +static struct atmel_uart_data dbgu_data = { .use_dma_tx =0 , .use_dma_rx =0 ,/* DBGU not capable of receive DMA */ };
@@ -593,7 +593,7 @@ static struct resource uart0_resources[] }, }; -static struct at91_uart_data uart0_data = { +static struct atmel_uart_data uart0_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -635,7 +635,7 @@ static struct resource uart1_resources[] }, }; -static struct at91_uart_data uart1_data = { +static struct atmel_uart_data uart1_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -676,7 +676,7 @@ static struct resource uart2_resources[] }, }; -static struct at91_uart_data uart2_data = { +static struct atmel_uart_data uart2_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -711,7 +711,7 @@ static struct resource uart3_resources[] }, }; -static struct at91_uart_data uart3_data = { +static struct atmel_uart_data uart3_data = { .use_dma_tx =1 , .use_dma_rx =1 , };
@@ -733,8 +733,8 @@ static inline void configure_usart3_pinsat91_set_B_periph (AT91_PIN_PA6 ,0 );/* RXD3 */ } -struct platform_device *at91_uarts[AT91_NR_UART ];/* the UARTs to use */ -struct platform_device *at91_default_console_device;/* the serial console device */ +struct platform_device *at91_uarts[ATMEL_MAX_UART ];/* the UARTs to use */ +struct platform_device *atmel_default_console_device;/* the serial console device */ void __init at91_init_serial (struct at91_uart_config *config) {
@@ -775,9 +775,9 @@ void __init at91_init_serial(struct at91 }/* Set serial console device */ -if (config->console_tty <AT91_NR_UART ) - at91_default_console_device = at91_uarts[config->console_tty]; -if (!at91_default_console_device) +if (config->console_tty <ATMEL_MAX_UART ) + atmel_default_console_device = at91_uarts[config->console_tty]; +if (!atmel_default_console_device)printk (KERN_INFO "AT91: No default serial console defined.\n" ); }
@@ -785,7 +785,7 @@ void __init at91_add_device_serial(void) {int i; -for (i =0 ; i <AT91_NR_UART ; i++) { +for (i =0 ; i <ATMEL_MAX_UART ; i++) {if (at91_uarts[i])platform_device_register (at91_uarts[i]); }
arch/avr32/mach-at32ap/at32ap7000.c +2 -2
@@ -615,11 +615,11 @@ struct platform_device *__init at32_add_return pdev; } -struct platform_device *at91_default_console_device; +struct platform_device *atmel_default_console_device;void __init at32_setup_serial_console (unsigned int usart_id) { - at91_default_console_device =setup_usart (usart_id); + atmel_default_console_device =setup_usart (usart_id); }/* --------------------------------------------------------------------
drivers/serial/atmel_serial.c +7 -7
@@ -113,7 +113,7 @@ struct at91_uart_port {unsigned short suspended;/* is port suspended? */ }; -static struct at91_uart_port at91_ports[AT91_NR_UART ]; +static struct at91_uart_port at91_ports[ATMEL_MAX_UART ];#ifdef SUPPORT_SYSRQ static struct console at91_console;
@@ -682,7 +682,7 @@ static struct uart_ops at91_pops = {static void __devinit at91_init_port (struct at91_uart_port *at91_port,struct platform_device *pdev) {struct uart_port *port = &at91_port->uart; -struct at91_uart_data *data = pdev->dev.platform_data; +struct atmel_uart_data *data = pdev->dev.platform_data; port->iotype =UPIO_MEM ; port->flags =UPF_BOOT_AUTOCONF ;
@@ -834,9 +834,9 @@ #define AT91_CONSOLE_DEVICE &at91_consol*/ static int __init at91_console_init (void ) { -if (at91_default_console_device) { -add_preferred_console (AT91_DEVICENAME , at91_default_console_device->id,NULL ); -at91_init_port (&(at91_ports[at91_default_console_device->id]), at91_default_console_device); +if (atmel_default_console_device) { +add_preferred_console (AT91_DEVICENAME , atmel_default_console_device->id,NULL ); +at91_init_port (&(at91_ports[atmel_default_console_device->id]), atmel_default_console_device);register_console (&at91_console); }
@@ -849,7 +849,7 @@ console_initcall(at91_console_init);*/ static int __init at91_late_console_init (void ) { -if (at91_default_console_device && !(at91_console.flags &CON_ENABLED )) +if (atmel_default_console_device && !(at91_console.flags &CON_ENABLED ))register_console (&at91_console);return 0 ;
@@ -866,7 +866,7 @@ static struct uart_driver at91_uart = { .dev_name = AT91_DEVICENAME, .major = SERIAL_AT91_MAJOR, .minor = MINOR_START, - .nr = AT91_NR_UART, + .nr = ATMEL_MAX_UART, .cons = AT91_CONSOLE_DEVICE, };
include/asm-arm/arch-at91rm9200/board.h +2 -2
@@ -97,10 +97,10 @@ struct at91_uart_config {unsigned short nr_tty;/* number of serial tty's */ short tty_map[];/* map UART to tty number */ }; -extern struct platform_device *at91_default_console_device; +extern struct platform_device *atmel_default_console_device;extern void __init at91_init_serial (struct at91_uart_config *config); -struct at91_uart_data { +struct atmel_uart_data {short use_dma_tx;/* use transmit DMA? */ short use_dma_rx;/* use receive DMA? */ };
include/asm-arm/arch-at91rm9200/hardware.h +1 -1
@@ -57,7 +57,7 @@ #define AT91_SRAM_SIZE 0x00004000 /* In#define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_SIZE)/* Serial ports */ -#define AT91_NR_UART 5/* 4 USART3's and one DBGU port */ +#define ATMEL_MAX_UART 5/* 4 USART3's and one DBGU port */ /* FLASH */ #define AT91_FLASH_BASE 0x10000000/* NCS0: Flash physical base address */
include/asm-avr32/arch-at32ap/board.h +2 -2
@@ -9,8 +9,8 @@ #include <linux/types.h>/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ void at32_add_system_devices (void ); -#define AT91_NR_UART 4 -extern struct platform_device *at91_default_console_device; +#define ATMEL_MAX_UART 4 +extern struct platform_device *atmel_default_console_device;struct platform_device *at32_add_device_usart (unsigned int id);
Signature · 1 line
1.4.1.1
Re: [PATCH 5/8] at91_serial -> atmel_serial: Public definitions
Quoted 7 lines
Rename the following public definitions:
*AT91_NR_UART->ATMEL_MAX_UART
* structat91_uart_data-> structatmel_uart_data
*at91_default_console_device->atmel_default_console_deviceSigned-off-by Haavard Skinnemoen <[email protected]>
Re: [PATCH 4/8] at91_serial -> atmel_serial: Platform device name
In reply to Haavard SkinnemoenQuoted 5 lines
Rename the "
at91_usart" platform driver "atmel_usart" and update platform devices accordingly.Signed-off-by Haavard Skinnemoen <[email protected]>
Re: [PATCH 4/8] at91_serial -> atmel_serial: Platform device name
In reply to Haavard SkinnemoenQuoted 2 lines · On Wed, 27 Sep 2006 18:58:01 +0200 Haavard Skinnemoen <[email protected]>…
Rename the "
at91_usart" platform driver "atmel_usart" and update platform devices accordingly.
Hmm...seems like I've been too busy testing things on ARM, because this one breaks AVR32 ;-)
Updated patch below. No ARM- or at91_serial-related stuff is changed.
Haavard
---
From: Haavard Skinnemoen <[email protected]>
Subject: [PATCH] at91_serial -> atmel_serial: Platform device name
Rename the "at91_usart" platform driver "atmel_usart" and update platform devices accordingly.
--- arch/arm/mach-at91rm9200/devices.c | 10 ++++----- arch/avr32/mach-at32ap/at32ap7000.c | 40 ++++++++++++++++++----------------- drivers/serial/atmel_serial.c | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-)
arch/arm/mach-at91rm9200/devices.c +5 -5
@@ -564,7 +564,7 @@ static struct at91_uart_data dbgu_data = };static struct platform_device at91rm9200_dbgu_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =0 , .dev = { .platform_data = &dbgu_data,
@@ -599,7 +599,7 @@ static struct at91_uart_data uart0_data };static struct platform_device at91rm9200_uart0_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =1 , .dev = { .platform_data = &uart0_data,
@@ -641,7 +641,7 @@ static struct at91_uart_data uart1_data };static struct platform_device at91rm9200_uart1_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =2 , .dev = { .platform_data = &uart1_data,
@@ -682,7 +682,7 @@ static struct at91_uart_data uart2_data };static struct platform_device at91rm9200_uart2_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =3 , .dev = { .platform_data = &uart2_data,
@@ -717,7 +717,7 @@ static struct at91_uart_data uart3_data };static struct platform_device at91rm9200_uart3_device = { - .name ="at91_usart" , + .name ="atmel_usart" , .id =4 , .dev = { .platform_data = &uart3_data,
arch/avr32/mach-at32ap/at32ap7000.c +20 -20
@@ -523,33 +523,33 @@ void __init at32_add_system_devices(void* USART * -------------------------------------------------------------------- */ -static struct resource usart0_resource[] = { +static struct resource atmel_usart0_resource[] = {PBMEM (0xffe00c00 ),IRQ (7 ), }; -DEFINE_DEV (usart,0 ); -DEV_CLK (usart, usart0, pba,4 ); +DEFINE_DEV (atmel_usart,0 ); +DEV_CLK (usart, atmel_usart0, pba,4 ); -static struct resource usart1_resource[] = { +static struct resource atmel_usart1_resource[] = {PBMEM (0xffe01000 ),IRQ (7 ), }; -DEFINE_DEV (usart,1 ); -DEV_CLK (usart, usart1, pba,4 ); +DEFINE_DEV (atmel_usart,1 ); +DEV_CLK (usart, atmel_usart1, pba,4 ); -static struct resource usart2_resource[] = { +static struct resource atmel_usart2_resource[] = {PBMEM (0xffe01400 ),IRQ (8 ), }; -DEFINE_DEV (usart,2 ); -DEV_CLK (usart, usart2, pba,5 ); +DEFINE_DEV (atmel_usart,2 ); +DEV_CLK (usart, atmel_usart2, pba,5 ); -static struct resource usart3_resource[] = { +static struct resource atmel_usart3_resource[] = {PBMEM (0xffe01800 ),IRQ (9 ), }; -DEFINE_DEV (usart,3 ); -DEV_CLK (usart, usart3, pba,6 ); +DEFINE_DEV (atmel_usart,3 ); +DEV_CLK (usart, atmel_usart3, pba,6 );static inline void configure_usart0_pins (void ) {
@@ -581,19 +581,19 @@ static struct platform_device *setup_usaswitch (id) {case 0 : - pdev = &usart0_device; + pdev = &atmel_usart0_device;configure_usart0_pins ();break ;case 1 : - pdev = &usart1_device; + pdev = &atmel_usart1_device;configure_usart1_pins ();break ;case 2 : - pdev = &usart2_device; + pdev = &atmel_usart2_device;configure_usart2_pins ();break ;case 3 : - pdev = &usart3_device; + pdev = &atmel_usart3_device;configure_usart3_pins ();break ;default :
@@ -813,10 +813,10 @@ struct clk *at32_clock_list[] = { &pio1_mck, &pio2_mck, &pio3_mck, - &usart0_usart, - &usart1_usart, - &usart2_usart, - &usart3_usart, + &atmel_usart0_usart, + &atmel_usart1_usart, + &atmel_usart2_usart, + &atmel_usart3_usart, &macb0_hclk, &macb0_pclk, &spi0_mck,
drivers/serial/atmel_serial.c +1 -1
@@ -947,7 +947,7 @@ static struct platform_driver at91_seria .suspend = at91_serial_suspend, .resume = at91_serial_resume, .driver = { - .name = "at91_usart", + .name = "atmel_usart", .owner = THIS_MODULE, }, };
Signature · 1 line
1.4.1.1
Re: [PATCH 3/8] at91_serial -> atmel_serial: Kconfig symbols
In reply to Haavard Skinnemoenhi Haavard,
Quoted 6 lines
Rename the following
Kconfigsymbols:
*CONFIG_SERIAL_AT91->CONFIG_SERIAL_ATMEL
*CONFIG_SERIAL_AT91_CONSOLE->CONFIG_SERIAL_ATMEL_CONSOLE
*CONFIG_SERIAL_AT91_TTYAT->CONFIG_SERIAL_ATMEL_TTYAT
drivers/serial/Kconfig config SERIAL_AMBA_PL011_CONSOLE · line 308
Quoted 9 lines
drivers/serial/Kconfig +2
-2-config SERIAL_AT91 - bool "AT91RM9200 / AT91SAM9261 serial port support" +config SERIAL_ATMEL + bool "AT91 / AT32 on-chip serial port support" depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261) select SERIAL_CORE help This enables the driver for the on-chip UARTs of the Atmel AT91RM9200 and AT91SAM926 processor.
Shouldn't this dependency be:
depends on (ARM && ARCH_AT91) || AVR32
(The "ARCH_AT91RM9200 || ARCH_AT91SAM9261" can be replaced with ARCH_AT91 since the driver should usable on the RM9200, SAM9261 and SAM9260)
The help text should probably also be updated for these 3 options so that it mentions the AVR32.
Regards,
Andrew Victor
Re: [PATCH 3/8] at91_serial -> atmel_serial: Kconfig symbols
Quoted 19 lines · On 28 Sep 2006 10:34:49 +0200 Andrew Victor <[email protected]> wrote:
hi Haavard,
Quoted 14 lines
Rename the following
Kconfigsymbols:
*CONFIG_SERIAL_AT91->CONFIG_SERIAL_ATMEL
*CONFIG_SERIAL_AT91_CONSOLE->CONFIG_SERIAL_ATMEL_CONSOLE
*CONFIG_SERIAL_AT91_TTYAT->CONFIG_SERIAL_ATMEL_TTYATdrivers/serial/Kconfig +2
-2-config SERIAL_AT91 - bool "AT91RM9200 / AT91SAM9261 serial port support" +config SERIAL_ATMEL + bool "AT91 / AT32 on-chip serial port support" depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261) select SERIAL_CORE help This enables the driver for the on-chip UARTs of theQuoted 1 line
Atmel AT91RM9200 and AT91SAM926 processor.
Shouldn't this dependency be:
Quoted 5 lines
depends on (ARM && ARCH_AT91) || AVR32(The "
ARCH_AT91RM9200||ARCH_AT91SAM9261" can be replaced withARCH_AT91since the driver should usable on the RM9200, SAM9261 and SAM9260)
Oh, I didn't know that symbol existed. I just looked at the serial Kconfig, not arch/arm/Kconfig. You're right of course.
Quoted 2 lines
The help text should probably also be updated for these 3 options so that it mentions the AVR32.
Right. Probably shouldn't have changed the prompt -- I have a different patch that actually adds AVR32 support (I don't want to do that before it actually compiles on AVR32, in case some crazy person comes along and tries out allyesconfig ;)
Is it OK if I keep the patch as it is and change the dependency and help text in a later patch?
Haavard
Re: [PATCH 3/8] at91_serial -> atmel_serial: Kconfig symbols
hi Haavard,
Quoted 7 lines
Right. Probably shouldn't have changed the prompt -- I have a different patch that actually adds AVR32 support (I don't want to do that before it actually compiles on AVR32, in case some crazy person comes along and tries out allyesconfig ;)
Is it OK if I keep the patch as it is and change the dependency and help text in a later patch?
That's would be fine - the current patch won't affect the AT91 support.
Regards,
Andrew Victor
Re: [PATCH 2/8] at91_serial -> atmel_serial: at91_serial.c
In reply to Haavard SkinnemoenQuoted 4 lines
Rename
at91_serial.catmel_serial.cSigned-off-by Haavard Skinnemoen <[email protected]>
Re: [PATCH 1/8] at91_serial -> atmel_serial: at91rm9200_usart.h
In reply to Haavard SkinnemoenQuoted 5 lines
Move
include/asm/arch/at91rm9200_usart.hintodrivers/serialand rename itatmel_usart.h. Also delete AVR32's version of this file.Signed-off-by Haavard Skinnemoen <[email protected]>