Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38896
b: refs/heads/master
c: 73e2798
h: refs/heads/master
v: v3
  • Loading branch information
Haavard Skinnemoen authored and Linus Torvalds committed Oct 4, 2006
1 parent 256abab commit 7bc027e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e8ea80219564c3433dbca7afe075ced9eb8117c
refs/heads/master: 73e2798b0f3f4fa8ff7d3e8138027a8352359bb5
22 changes: 11 additions & 11 deletions trunk/arch/arm/mach-at91rm9200/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};
Expand Down Expand Up @@ -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,
};
Expand Down Expand Up @@ -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,
};
Expand Down Expand Up @@ -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,
};
Expand Down Expand Up @@ -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,
};
Expand All @@ -733,8 +733,8 @@ static inline void configure_usart3_pins(void)
at91_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)
{
Expand Down Expand Up @@ -775,17 +775,17 @@ void __init at91_init_serial(struct at91_uart_config *config)
}

/* 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");
}

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]);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/avr32/mach-at32ap/at32ap7000.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,11 @@ struct platform_device *__init at32_add_device_usart(unsigned int id)
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);
}

/* --------------------------------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -834,9 +834,9 @@ static struct console at91_console = {
*/
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);
}

Expand All @@ -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;
Expand All @@ -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,
};

Expand Down
4 changes: 2 additions & 2 deletions trunk/include/asm-arm/arch-at91rm9200/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -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? */
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-arm/arch-at91rm9200/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91RM9200_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 */
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/asm-avr32/arch-at32ap/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
/* 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);

Expand Down

0 comments on commit 7bc027e

Please sign in to comment.