Skip to content

Commit f7512e7

Browse files
PeterHuewegregkh
authored andcommitted
serial: fix rs485 for atmel_serial on avr32
This patch fixes a build failure [1-4] in the atmel_serial code introduced by patch the patch ARM: 6092/1: atmel_serial: support for RS485 communications (e8faff7) The build failure was caused by missing struct field and missing defines for the avr32 board - the patch fixes this. [1] http://kisskb.ellerman.id.au/kisskb/buildresult/2575242/ - first failure in linux-next, may 11th [2] http://kisskb.ellerman.id.au/kisskb/buildresult/2816418/ - still exists as of today [3] http://kisskb.ellerman.id.au/kisskb/buildresult/2617511/ - first failure in Linus' tree - May 20th - did really no one notice this?! [4] http://kisskb.ellerman.id.au/kisskb/buildresult/2813956/ - still exists in Linus' tree as of today Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent dbbe464 commit f7512e7

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎arch/avr32/include/asm/ioctls.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
5555
#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
5656

57+
#define TIOCGRS485 0x542E
58+
#define TIOCSRS485 0x542F
59+
5760
#define FIONCLEX 0x5450
5861
#define FIOCLEX 0x5451
5962
#define FIOASYNC 0x5452

‎arch/avr32/mach-at32ap/include/mach/board.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define __ASM_ARCH_BOARD_H
66

77
#include <linux/types.h>
8+
#include <linux/serial.h>
89

910
#define GPIO_PIN_NONE (-1)
1011

@@ -35,6 +36,7 @@ struct atmel_uart_data {
3536
short use_dma_tx; /* use transmit DMA? */
3637
short use_dma_rx; /* use receive DMA? */
3738
void __iomem *regs; /* virtual base address, if any */
39+
struct serial_rs485 rs485; /* rs485 settings */
3840
};
3941
void at32_map_usart(unsigned int hw_id, unsigned int line, int flags);
4042
struct platform_device *at32_add_device_usart(unsigned int id);

‎drivers/serial/atmel_serial.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <linux/uaccess.h>
4242

4343
#include <asm/io.h>
44+
#include <asm/ioctls.h>
4445

4546
#include <asm/mach/serial_at91.h>
4647
#include <mach/board.h>

0 commit comments

Comments
 (0)