Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130569
b: refs/heads/master
c: 1452fc7
h: refs/heads/master
i:
  130567: 57ca582
v: v3
  • Loading branch information
Phil Sutter authored and Ralf Baechle committed Jan 30, 2009
1 parent 366c711 commit 71a3baf
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 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: 84c2c562c101bd84ea0f796b9838296da1bf859e
refs/heads/master: 1452fc7d178c37c6463c95c5cc6858c7b7f478c8
26 changes: 26 additions & 0 deletions trunk/arch/mips/rb532/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/mtd/partitions.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/serial_8250.h>

#include <asm/bootinfo.h>

Expand All @@ -39,6 +40,8 @@
#define ETH0_RX_DMA_ADDR (DMA0_BASE_ADDR + 0 * DMA_CHAN_OFFSET)
#define ETH0_TX_DMA_ADDR (DMA0_BASE_ADDR + 1 * DMA_CHAN_OFFSET)

extern unsigned int idt_cpu_freq;

static struct resource korina_dev0_res[] = {
{
.name = "korina_regs",
Expand Down Expand Up @@ -214,12 +217,32 @@ static struct platform_device rb532_wdt = {
.num_resources = ARRAY_SIZE(rb532_wdt_res),
};

static struct plat_serial8250_port rb532_uart_res[] = {
{
.membase = (char *)KSEG1ADDR(REGBASE + UART0BASE),
.irq = UART0_IRQ,
.regshift = 2,
.iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF,
},
{
.flags = 0,
}
};

static struct platform_device rb532_uart = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev.platform_data = &rb532_uart_res,
};

static struct platform_device *rb532_devs[] = {
&korina_dev0,
&nand_slot0,
&cf_slot0,
&rb532_led,
&rb532_button,
&rb532_uart,
&rb532_wdt
};

Expand Down Expand Up @@ -294,6 +317,9 @@ static int __init plat_setup_devices(void)
/* Initialise the NAND device */
rb532_nand_setup();

/* set the uart clock to the current cpu frequency */
rb532_uart_res[0].uartclk = idt_cpu_freq;

return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs));
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/rb532/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
extern unsigned int idt_cpu_freq;

static struct uart_port rb532_uart = {
.type = PORT_16550A,
.flags = UPF_BOOT_AUTOCONF,
.line = 0,
.irq = UART0_IRQ,
.iotype = UPIO_MEM,
Expand Down

0 comments on commit 71a3baf

Please sign in to comment.