From 6bd1fbea2e8bff9346a5afb44ca948b4e4ed74a5 Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Wed, 9 Sep 2009 10:46:19 +0000 Subject: 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 Signed-off-by: Mike Frysinger --- arch/blackfin/mach-bf561/boards/ezkit.c | 47 +++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) (limited to 'arch/blackfin/mach-bf561/boards/ezkit.c') diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index ffd3e6a..c59041c 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c @@ -160,21 +160,50 @@ 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, + }, +}; + +unsigned short bfin_uart0_peripherals[] = { + P_UART0_TX, P_UART0_RX, 0 }; -static struct platform_device bfin_uart_device = { +static struct platform_device bfin_uart0_device = { .name = "bfin-uart", - .id = 1, - .num_resources = ARRAY_SIZE(bfin_uart_resources), - .resource = bfin_uart_resources, + .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 @@ -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) -- cgit v1.1 From c13ce9fd26c3a0e32b3bf0b00929181e66114ed2 Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Wed, 23 Sep 2009 09:37:46 +0000 Subject: Blackfin: add UART/SPORT early platform resources This lets people easily select the UART/SPORT consoles for early printk while leveraging the pins declared in the boards file. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger --- arch/blackfin/mach-bf561/boards/ezkit.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/blackfin/mach-bf561/boards/ezkit.c') diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index c59041c..c7a5db7 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c @@ -489,3 +489,18 @@ static int __init ezkit_init(void) } arch_initcall(ezkit_init); + +static struct platform_device *ezkit_early_devices[] __initdata = { +#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) +#ifdef CONFIG_SERIAL_BFIN_UART0 + &bfin_uart0_device, +#endif +#endif +}; + +void __init native_machine_early_platform_add_devices(void) +{ + printk(KERN_INFO "register early platform devices\n"); + early_platform_add_devices(ezkit_early_devices, + ARRAY_SIZE(ezkit_early_devices)); +} -- cgit v1.1 From d40bd71f88e7be193ce4feb4b92572c70024b9c2 Mon Sep 17 00:00:00 2001 From: Barry Song Date: Mon, 22 Feb 2010 10:31:06 +0000 Subject: Blackfin: rename AD1836 to AD183X in board files The ASoC codec driver was generalized and renamed, so update the board resources accordingly. Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- arch/blackfin/mach-bf561/boards/ezkit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/blackfin/mach-bf561/boards/ezkit.c') diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index c7a5db7..9b93e2f 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c @@ -274,8 +274,8 @@ static struct platform_device ezkit_flash_device = { }; #endif -#if defined(CONFIG_SND_BLACKFIN_AD1836) \ - || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) +#if defined(CONFIG_SND_BLACKFIN_AD183X) \ + || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) static struct bfin5xx_spi_chip ad1836_spi_chip_info = { .enable_dma = 0, .bits_per_word = 16, @@ -328,8 +328,8 @@ static struct platform_device bfin_spi0_device = { #endif static struct spi_board_info bfin_spi_board_info[] __initdata = { -#if defined(CONFIG_SND_BLACKFIN_AD1836) \ - || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) +#if defined(CONFIG_SND_BLACKFIN_AD183X) \ + || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) { .modalias = "ad1836", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ -- cgit v1.1