commit: http://blackfin.uclinux.org/git/?p=u-boot;a=commitdiff;h=37683317c86c6eec27e52ee871122f83bed037e1 branch: http://blackfin.uclinux.org/git/?p=u-boot;a=shortlog;h=refs/heads/trunk
Signed-off-by: Sonic Zhang <sonic.zh...@analog.com> --- arch/blackfin/include/asm/soft_switch.h | 18 +++++++++++++++++ board/bf609-ezkit/bf609-ezkit.c | 2 +- board/bf609-ezkit/soft_switch.c | 8 +------ .../mach-bf609 => board/bf609-ezkit}/soft_switch.h | 21 +++++++++++-------- common/cmd_softswitch.c | 2 +- 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/arch/blackfin/include/asm/soft_switch.h b/arch/blackfin/include/asm/soft_switch.h new file mode 100644 index 0000000..ff8e44d --- /dev/null +++ b/arch/blackfin/include/asm/soft_switch.h @@ -0,0 +1,18 @@ +/* + * U-boot - main board file + * + * Copyright (c) 2008-2012 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ + +#ifndef __SOFT_SWITCH_H__ +#define __SOFT_SWITCH_H__ + +#define IO_PORT_A 0 +#define IO_PORT_B 1 +#define IO_PORT_INPUT 0 +#define IO_PORT_OUTPUT 1 + +int config_switch_bit(int num, int port, int bit, int dir, uchar value); +#endif diff --git a/board/bf609-ezkit/bf609-ezkit.c b/board/bf609-ezkit/bf609-ezkit.c index b164af0..7446209 100644 --- a/board/bf609-ezkit/bf609-ezkit.c +++ b/board/bf609-ezkit/bf609-ezkit.c @@ -11,7 +11,7 @@ #include <asm/blackfin.h> #include <asm/io.h> #include <asm/portmux.h> -#include <asm/mach-bf609/soft_switch.h> +#include "soft_switch.h" int checkboard(void) { diff --git a/board/bf609-ezkit/soft_switch.c b/board/bf609-ezkit/soft_switch.c index e5998b8..22f59de 100644 --- a/board/bf609-ezkit/soft_switch.c +++ b/board/bf609-ezkit/soft_switch.c @@ -10,13 +10,7 @@ #include <asm/blackfin.h> #include <asm/io.h> #include <i2c.h> -#include <asm/mach-bf609/soft_switch.h> - -#define NUM_SWITCH 3 -#define IODIRA 0x0 -#define IODIRB 0x1 -#define OLATA 0x14 -#define OLATB 0x15 +#include "soft_switch.h" struct switch_config { uchar dir0; /* IODIRA */ diff --git a/arch/blackfin/include/asm/mach-bf609/soft_switch.h b/board/bf609-ezkit/soft_switch.h similarity index 87% rename from arch/blackfin/include/asm/mach-bf609/soft_switch.h rename to board/bf609-ezkit/soft_switch.h index 975ce79..d147fe1 100644 --- a/arch/blackfin/include/asm/mach-bf609/soft_switch.h +++ b/board/bf609-ezkit/soft_switch.h @@ -6,8 +6,10 @@ * Licensed under the GPL-2 or later. */ -#ifndef __SOFT_SWITCH_H__ -#define __SOFT_SWITCH_H__ +#ifndef __BOARD_SOFT_SWITCH_H__ +#define __BOARD_SOFT_SWITCH_H__ + +#include <asm/soft_switch.h> /* switch 0 port A */ #define CAN_EN 0x1 @@ -61,17 +63,18 @@ #define PD3_SPI0MOSI_EN 0x1 #define PD4_SPI0CK_EN 0x2 -#define IO_PORT_A 0 -#define IO_PORT_B 1 -#define IO_PORT_INPUT 0 -#define IO_PORT_OUTPUT 1 - #ifdef CONFIG_BFIN_BOARD_VERSION_1_0 #define SWITCH_ADDR 0x21 #else #define SWITCH_ADDR 0x20 #endif -int config_switch_bit(int num, int port, int bit, int dir, uchar value); +#define NUM_SWITCH 3 +#define IODIRA 0x0 +#define IODIRB 0x1 +#define OLATA 0x14 +#define OLATB 0x15 + int setup_board_switches(void); -#endif + +#endif /* __BOARD_SOFT_SWITCH_H__ */ diff --git a/common/cmd_softswitch.c b/common/cmd_softswitch.c index 88588cb..93cf422 100644 --- a/common/cmd_softswitch.c +++ b/common/cmd_softswitch.c @@ -9,7 +9,7 @@ #include <common.h> #include <command.h> #include <asm/blackfin.h> -#include <asm/mach-bf609/soft_switch.h> +#include <asm/soft_switch.h> int do_softswitch(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
_______________________________________________ U-Boot-commits mailing list U-Boot-commits@blackfin.uclinux.org https://blackfin.uclinux.org/mailman/listinfo/u-boot-commits