From f086f23435bf42f700296f1be3878f6aa6e9b7dd Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Tue, 20 May 2008 16:42:39 +0800 Subject: Blackfin arch: Cleanup no functional changes Singed-off-by: Michael Hennerich Signed-off-by: Bryan Wu --- arch/blackfin/mach-bf548/boards/cm_bf548.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/blackfin/mach-bf548') diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index 3b74f96d3590..4f4ae8787edf 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c @@ -684,7 +684,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = { static int __init cm_bf548_init(void) { - printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); + printk(KERN_INFO "%s(): registering device resources\n", __func__); platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -- cgit v1.2.3 From b06dcee9c8d24ef903dc0d192af22b8e179eef4b Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Sat, 31 May 2008 15:35:40 +0800 Subject: Blackfin arch: Remove bad and usless code Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu --- arch/blackfin/mach-bf548/boards/Makefile | 2 +- arch/blackfin/mach-bf548/boards/led.S | 172 ------------------------------- 2 files changed, 1 insertion(+), 173 deletions(-) delete mode 100644 arch/blackfin/mach-bf548/boards/led.S (limited to 'arch/blackfin/mach-bf548') diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile index eed161dd7845..319ef54c4221 100644 --- a/arch/blackfin/mach-bf548/boards/Makefile +++ b/arch/blackfin/mach-bf548/boards/Makefile @@ -2,5 +2,5 @@ # arch/blackfin/mach-bf548/boards/Makefile # -obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o +obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o diff --git a/arch/blackfin/mach-bf548/boards/led.S b/arch/blackfin/mach-bf548/boards/led.S deleted file mode 100644 index f47daf3770d0..000000000000 --- a/arch/blackfin/mach-bf548/boards/led.S +++ /dev/null @@ -1,172 +0,0 @@ -/**************************************************** - * LED1 ---- PG6 LED2 ---- PG7 * - * LED3 ---- PG8 LED4 ---- PG9 * - * LED5 ---- PG10 LED6 ---- PG11 * - ****************************************************/ - -#include -#include - -/* All functions in this file save the registers they uses. - So there is no need to save any registers before calling them. */ - - .text; - -/* Initialize LEDs. */ - -ENTRY(_led_init) - LINK 0; - [--SP] = P0; - [--SP] = R0; - [--SP] = R1; - [--SP] = R2; - R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z); - R2 = ~R1; - - P0.H = hi(PORTG_FER); - P0.L = lo(PORTG_FER); - R0 = W[P0](Z); - SSYNC; - R0 = R0 & R2; - W[P0] = R0.L; - SSYNC; - - P0.H = hi(PORTG_DIR_SET); - P0.L = lo(PORTG_DIR_SET); - W[P0] = R1.L; - SSYNC; - - P0.H = hi(PORTG_INEN); - P0.L = lo(PORTG_INEN); - R0 = W[P0](Z); - SSYNC; - R0 = R0 & R2; - W[P0] = R0.L; - SSYNC; - - R2 = [SP++]; - R1 = [SP++]; - R0 = [SP++]; - P0 = [SP++]; - RTS; - .size _led_init, .-_led_init - -/* Set one LED on. Leave other LEDs unchanged. - It expects the LED number passed through R0. */ - -ENTRY(_led_on) - LINK 0; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTG_SET); - P0.L = lo(PORTG_SET); - W[P0] = R1.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_on, .-_led_on - -/* Set one LED off. Leave other LEDs unchanged. */ - -ENTRY(_led_off) - LINK 0; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTG_CLEAR); - P0.L = lo(PORTG_CLEAR); - W[P0] = R1.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_off, .-_led_off - -/* Toggle one LED. Leave other LEDs unchanged. */ - -ENTRY(_led_toggle) - LINK 0; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTG); - P0.L = lo(PORTG); - R0 = W[P0](Z); - SSYNC; - R0 = R0 ^ R1; - W[P0] = R0.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_toggle, .-_led_toggle - -/* Display the number using LEDs in binary format. */ - -ENTRY(_led_disp_num) - LINK 0; - [--SP] = P0; - [--SP] = R1; - [--SP] = R2; - CALL _led_init; - R1 = 0x3f(X); - R0 = R0 & R1; - R2 = 6(X); - R0 <<= R2; - R1 <<= R2; - P0.H = hi(PORTG); - P0.L = lo(PORTG); - R2 = W[P0](Z); - SSYNC; - R1 = ~R1; - R2 = R2 & R1; - R2 = R2 | R0; - W[P0] = R2.L; - SSYNC; - R2 = [SP++]; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_disp_num, .-_led_disp_num - -/* Toggle the number using LEDs in binary format. */ - -ENTRY(_led_toggle_num) - LINK 0; - [--SP] = P0; - [--SP] = R1; - [--SP] = R2; - CALL _led_init; - R1 = 0x3f(X); - R0 = R0 & R1; - R1 = 6(X); - R0 <<= R1; - P0.H = hi(PORTG); - P0.L = lo(PORTG); - R1 = W[P0](Z); - SSYNC; - R1 = R1 ^ R0; - W[P0] = R1.L; - SSYNC; - R2 = [SP++]; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_toggle_num, .-_led_toggle_num - -- cgit v1.2.3 From 5bda27235b24146cf870de663141ee4fbfa8a70b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 7 Jun 2008 15:03:01 +0800 Subject: Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- arch/blackfin/mach-bf548/boards/ezkit.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'arch/blackfin/mach-bf548') diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index d1682bb37509..af7c211a580e 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c @@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = { }; #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -/* all SPI peripherals info goes here */ #if defined(CONFIG_MTD_M25P80) \ || defined(CONFIG_MTD_M25P80_MODULE) /* SPI flash chip (m25p16) */ @@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = { }; #endif -static struct spi_board_info bf54x_spi_board_info[] __initdata = { +static struct spi_board_info bfin_spi_board_info[] __initdata = { #if defined(CONFIG_MTD_M25P80) \ || defined(CONFIG_MTD_M25P80_MODULE) { @@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { #endif }; +#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) /* SPI (0) */ static struct resource bfin_spi0_resource[] = { [0] = { @@ -800,10 +799,7 @@ static int __init ezkit_init(void) platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) - spi_register_board_info(bf54x_spi_board_info, - ARRAY_SIZE(bf54x_spi_board_info)); -#endif + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); return 0; } -- cgit v1.2.3