mirror of https://gitee.com/openkylin/linux.git
Blackfin: move on-chip UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a mess of Kconfig options, declare all the desired pin resources in the boards file. This lets people easily select the specific pins/ports for the normal UART as well as GPIOs for CTS/RTS. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
57d54889cd
commit
6bd1fbea2e
|
@ -382,30 +382,93 @@ static struct platform_device bfin_spi1_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -593,7 +656,12 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -603,30 +603,105 @@ static struct platform_device cm_flash_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
{ /* CTS pin */
|
||||
.start = GPIO_PF9,
|
||||
.end = GPIO_PF9,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin */
|
||||
.start = GPIO_PF10,
|
||||
.end = GPIO_PF10,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -829,7 +904,12 @@ static struct platform_device *cmbf527_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -439,30 +439,105 @@ static struct platform_device bfin_spi0_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
{ /* CTS pin */
|
||||
.start = GPIO_PG0,
|
||||
.end = GPIO_PG0,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin */
|
||||
.start = GPIO_PF10,
|
||||
.end = GPIO_PF10,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -665,7 +740,12 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
|
||||
|
|
|
@ -647,30 +647,105 @@ static struct platform_device bfin_spi0_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
{ /* CTS pin */
|
||||
.start = GPIO_PF9,
|
||||
.end = GPIO_PF9,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin */
|
||||
.start = GPIO_PF10,
|
||||
.end = GPIO_PF10,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -910,7 +985,12 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -257,20 +257,49 @@ static struct platform_device bfin_spi0_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX + 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -394,7 +423,9 @@ static struct platform_device *h8606_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
||||
|
|
|
@ -195,20 +195,49 @@ static struct platform_device bfin_spi0_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX + 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -344,7 +373,9 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -242,20 +242,49 @@ static struct platform_device smsc911x_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX + 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -432,7 +461,9 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
|
|||
&bfin_dpmc,
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -320,20 +320,49 @@ static struct platform_device bfin_spi0_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX + 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -471,7 +500,9 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/usb/isp1362.h>
|
||||
#endif
|
||||
#include <asm/irq.h>
|
||||
#include <asm/dma.h>
|
||||
#include <asm/bfin5xx_spi.h>
|
||||
#include <asm/portmux.h>
|
||||
|
||||
|
@ -143,20 +144,49 @@ static struct platform_device spi_bfin_master_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX + 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -241,7 +271,9 @@ static struct platform_device *ip0x_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -322,20 +322,49 @@ static struct platform_device bfin_spi0_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX + 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -495,7 +524,9 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -329,8 +329,8 @@ static struct platform_device cm_flash_device = {
|
|||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
|
@ -373,18 +373,25 @@ static struct resource bfin_uart0_resources[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
|
@ -427,11 +434,18 @@ static struct resource bfin_uart1_resources[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -327,25 +327,93 @@ static struct platform_device cm_flash_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -522,7 +590,12 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -211,25 +211,93 @@ static struct platform_device bfin_spi0_device = {
|
|||
#endif /* spi master and devices */
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -343,7 +411,12 @@ static struct platform_device *minotaur_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -362,25 +362,93 @@ static struct platform_device bfin_fb_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -472,7 +540,12 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -1157,30 +1157,105 @@ static struct platform_device bfin_lq035q1_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART0_CTSRTS
|
||||
{ /* CTS pin */
|
||||
.start = GPIO_PG7,
|
||||
.end = GPIO_PG7,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin */
|
||||
.start = GPIO_PG6,
|
||||
.end = GPIO_PG6,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -1771,7 +1846,12 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -327,25 +327,93 @@ static struct platform_device cm_flash_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -524,7 +592,12 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -41,37 +41,148 @@ static struct platform_device rtc_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_THR,
|
||||
.end = UART0_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
{
|
||||
.start = 0xFFC02100,
|
||||
.end = 0xFFC021FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART0_CTSRTS
|
||||
{ /* CTS pin */
|
||||
.start = GPIO_PG7,
|
||||
.end = GPIO_PG7,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin */
|
||||
.start = GPIO_PG6,
|
||||
.end = GPIO_PG6,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = UART1_THR,
|
||||
.end = UART1_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
static struct resource bfin_uart2_resources[] = {
|
||||
{
|
||||
.start = UART2_THR,
|
||||
.end = UART2_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART2_RX,
|
||||
.end = IRQ_UART2_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART2_ERROR,
|
||||
.end = IRQ_UART2_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART2_TX,
|
||||
.end = CH_UART2_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART2_RX,
|
||||
.end = CH_UART2_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart2_peripherals[] = {
|
||||
P_UART2_TX, P_UART2_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart2_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart2_resources),
|
||||
.resource = bfin_uart2_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart2_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -622,7 +733,15 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
&bfin_uart2_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
|
||||
|
|
|
@ -127,44 +127,211 @@ static struct platform_device rtc_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_DLL,
|
||||
.end = UART0_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART1_DLL,
|
||||
.end = UART1_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
{
|
||||
.start = 0xFFC02100,
|
||||
.end = 0xFFC021FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
{
|
||||
.start = 0xFFC03100,
|
||||
.end = 0xFFC031FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
{ /* CTS pin -- 0 means not supported */
|
||||
.start = GPIO_PE10,
|
||||
.end = GPIO_PE10,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin -- 0 means not supported */
|
||||
.start = GPIO_PE9,
|
||||
.end = GPIO_PE9,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX,
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
P_UART1_RTS, P_UART1_CTS,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
static struct resource bfin_uart2_resources[] = {
|
||||
{
|
||||
.start = UART2_DLL,
|
||||
.end = UART2_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART2_RX,
|
||||
.end = IRQ_UART2_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART2_ERROR,
|
||||
.end = IRQ_UART2_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART2_TX,
|
||||
.end = CH_UART2_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART2_RX,
|
||||
.end = CH_UART2_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart2_peripherals[] = {
|
||||
P_UART2_TX, P_UART2_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart2_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart2_resources),
|
||||
.resource = bfin_uart2_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart2_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
static struct resource bfin_uart3_resources[] = {
|
||||
{
|
||||
.start = UART3_DLL,
|
||||
.end = UART3_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART3_RX,
|
||||
.end = IRQ_UART3_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART3_ERROR,
|
||||
.end = IRQ_UART3_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART3_TX,
|
||||
.end = CH_UART3_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART3_RX,
|
||||
.end = CH_UART3_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART3_CTSRTS
|
||||
{ /* CTS pin -- 0 means not supported */
|
||||
.start = GPIO_PB3,
|
||||
.end = GPIO_PB3,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin -- 0 means not supported */
|
||||
.start = GPIO_PB2,
|
||||
.end = GPIO_PB2,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
unsigned short bfin_uart3_peripherals[] = {
|
||||
P_UART3_TX, P_UART3_RX,
|
||||
#ifdef CONFIG_BFIN_UART3_CTSRTS
|
||||
P_UART3_RTS, P_UART3_CTS,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart3_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 3,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart3_resources),
|
||||
.resource = bfin_uart3_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart3_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -752,7 +919,18 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
&bfin_uart2_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
&bfin_uart3_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -232,44 +232,211 @@ static struct platform_device rtc_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = UART0_DLL,
|
||||
.end = UART0_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_RX,
|
||||
.end = IRQ_UART0_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART0_ERROR,
|
||||
.end = IRQ_UART0_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_TX,
|
||||
.end = CH_UART0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART0_RX,
|
||||
.end = CH_UART0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
static struct resource bfin_uart1_resources[] = {
|
||||
{
|
||||
.start = 0xFFC02000,
|
||||
.end = 0xFFC020FF,
|
||||
.start = UART1_DLL,
|
||||
.end = UART1_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
{
|
||||
.start = 0xFFC02100,
|
||||
.end = 0xFFC021FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART1_RX,
|
||||
.end = IRQ_UART1_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
{
|
||||
.start = 0xFFC03100,
|
||||
.end = 0xFFC031FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.start = IRQ_UART1_ERROR,
|
||||
.end = IRQ_UART1_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_TX,
|
||||
.end = CH_UART1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART1_RX,
|
||||
.end = CH_UART1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
{ /* CTS pin -- 0 means not supported */
|
||||
.start = GPIO_PE10,
|
||||
.end = GPIO_PE10,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin -- 0 means not supported */
|
||||
.start = GPIO_PE9,
|
||||
.end = GPIO_PE9,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
unsigned short bfin_uart1_peripherals[] = {
|
||||
P_UART1_TX, P_UART1_RX,
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
P_UART1_RTS, P_UART1_CTS,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart1_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
||||
.resource = bfin_uart1_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
static struct resource bfin_uart2_resources[] = {
|
||||
{
|
||||
.start = UART2_DLL,
|
||||
.end = UART2_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART2_RX,
|
||||
.end = IRQ_UART2_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART2_ERROR,
|
||||
.end = IRQ_UART2_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART2_TX,
|
||||
.end = CH_UART2_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART2_RX,
|
||||
.end = CH_UART2_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart2_peripherals[] = {
|
||||
P_UART2_TX, P_UART2_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart2_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart2_resources),
|
||||
.resource = bfin_uart2_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart2_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
static struct resource bfin_uart3_resources[] = {
|
||||
{
|
||||
.start = UART3_DLL,
|
||||
.end = UART3_RBR+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART3_RX,
|
||||
.end = IRQ_UART3_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART3_ERROR,
|
||||
.end = IRQ_UART3_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART3_TX,
|
||||
.end = CH_UART3_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART3_RX,
|
||||
.end = CH_UART3_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
#ifdef CONFIG_BFIN_UART3_CTSRTS
|
||||
{ /* CTS pin -- 0 means not supported */
|
||||
.start = GPIO_PB3,
|
||||
.end = GPIO_PB3,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
{ /* RTS pin -- 0 means not supported */
|
||||
.start = GPIO_PB2,
|
||||
.end = GPIO_PB2,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
unsigned short bfin_uart3_peripherals[] = {
|
||||
P_UART3_TX, P_UART3_RX,
|
||||
#ifdef CONFIG_BFIN_UART3_CTSRTS
|
||||
P_UART3_RTS, P_UART3_CTS,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart3_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 3,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart3_resources),
|
||||
.resource = bfin_uart3_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart3_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
|
@ -960,7 +1127,18 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
&bfin_uart1_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
&bfin_uart2_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
&bfin_uart3_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -305,20 +305,49 @@ static struct platform_device isp1362_hcd_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART_RX,
|
||||
.end = IRQ_UART_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART_ERROR,
|
||||
.end = IRQ_UART_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART_TX,
|
||||
.end = CH_UART_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART_RX,
|
||||
.end = CH_UART_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -463,7 +492,9 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -160,20 +160,49 @@ static struct platform_device smc91x_device = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
static struct resource bfin_uart_resources[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = 0xFFC00400,
|
||||
.end = 0xFFC004FF,
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART_RX,
|
||||
.end = IRQ_UART_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART_ERROR,
|
||||
.end = IRQ_UART_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART_TX,
|
||||
.end = CH_UART_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART_RX,
|
||||
.end = CH_UART_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart_resources),
|
||||
.resource = bfin_uart_resources,
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
@ -412,7 +441,9 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
&bfin_uart_device,
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
|
|
|
@ -42,6 +42,52 @@ static struct platform_device smc91x_device = {
|
|||
.resource = smc91x_resources,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
static struct resource bfin_uart0_resources[] = {
|
||||
{
|
||||
.start = BFIN_UART_THR,
|
||||
.end = BFIN_UART_GCTL+2,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART_RX,
|
||||
.end = IRQ_UART_RX+1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = IRQ_UART_ERROR,
|
||||
.end = IRQ_UART_ERROR,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = CH_UART_TX,
|
||||
.end = CH_UART_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = CH_UART_RX,
|
||||
.end = CH_UART_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned short bfin_uart0_peripherals[] = {
|
||||
P_UART0_TX, P_UART0_RX, 0
|
||||
};
|
||||
|
||||
static struct platform_device bfin_uart0_device = {
|
||||
.name = "bfin-uart",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
||||
.resource = bfin_uart0_resources,
|
||||
.dev = {
|
||||
.platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
static struct resource bfin_sir0_resources[] = {
|
||||
|
@ -73,6 +119,13 @@ static struct platform_device bfin_sir0_device = {
|
|||
|
||||
static struct platform_device *tepla_devices[] __initdata = {
|
||||
&smc91x_device,
|
||||
|
||||
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
&bfin_uart0_device,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
&bfin_sir0_device,
|
||||
|
|
Loading…
Reference in New Issue