From: Sonic Zhang Date: Sun, 7 Apr 2013 11:04:14 +0000 (+0800) Subject: blackfin: Move blackfin serial driver out of blackfin arch folder. X-Git-Tag: v2013.07-rc1~1^2~53^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d803fc8125a3528f700da9064d1bfa3fbc56b13;p=platform%2Fkernel%2Fu-boot.git blackfin: Move blackfin serial driver out of blackfin arch folder. - Move blackfin serial driver to the generic driver folder. - Move blackfin serial headers to blackfin arch head folder. - Update the include path to blackfin serial header in start up code. Signed-off-by: Sonic Zhang --- diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile index 145f63e..929fc8b 100644 --- a/arch/blackfin/cpu/Makefile +++ b/arch/blackfin/cpu/Makefile @@ -23,7 +23,6 @@ COBJS-y += interrupts.o COBJS-$(CONFIG_JTAG_CONSOLE) += jtag-console.o COBJS-y += os_log.o COBJS-y += reset.o -COBJS-y += serial.o COBJS-y += traps.o SRCS := $(SEXTRA:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c) diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c index d841f64..218f57e 100644 --- a/arch/blackfin/cpu/cpu.c +++ b/arch/blackfin/cpu/cpu.c @@ -16,9 +16,9 @@ #include #include #include +#include #include "cpu.h" -#include "serial.h" #include "initcode.h" ulong bfin_poweron_retx; diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c index 078209f..5fc06e1 100644 --- a/arch/blackfin/cpu/initcode.c +++ b/arch/blackfin/cpu/initcode.c @@ -16,10 +16,9 @@ #include #include #include +#include -#define BUG() while (1) { asm volatile("emuexcpt;"); } - -#include "serial.h" +#define BUG() while (1) asm volatile("emuexcpt;"); #ifndef __ADSPBF60x__ #include diff --git a/arch/blackfin/cpu/start.S b/arch/blackfin/cpu/start.S index 1c6ae35..da084a8 100644 --- a/arch/blackfin/cpu/start.S +++ b/arch/blackfin/cpu/start.S @@ -35,8 +35,7 @@ #include #include #include - -#include "serial.h" +#include /* It may seem odd that we make calls to functions even though we haven't * relocated ourselves yet out of {flash,ram,wherever}. This is OK because diff --git a/arch/blackfin/cpu/serial.h b/arch/blackfin/include/asm/serial.h similarity index 100% rename from arch/blackfin/cpu/serial.h rename to arch/blackfin/include/asm/serial.h diff --git a/arch/blackfin/cpu/serial1.h b/arch/blackfin/include/asm/serial1.h similarity index 100% rename from arch/blackfin/cpu/serial1.h rename to arch/blackfin/include/asm/serial1.h diff --git a/arch/blackfin/cpu/serial4.h b/arch/blackfin/include/asm/serial4.h similarity index 100% rename from arch/blackfin/cpu/serial4.h rename to arch/blackfin/include/asm/serial4.h diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index fbc4e97..442b7ea 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -52,6 +52,7 @@ COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o COBJS-$(CONFIG_SANDBOX_SERIAL) += sandbox.o COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o COBJS-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o +COBJS-$(CONFIG_BFIN_SERIAL) += serial_bfin.o ifndef CONFIG_SPL_BUILD COBJS-$(CONFIG_USB_TTY) += usbtty.o diff --git a/arch/blackfin/cpu/serial.c b/drivers/serial/serial_bfin.c similarity index 99% rename from arch/blackfin/cpu/serial.c rename to drivers/serial/serial_bfin.c index c453a03..0443b84 100644 --- a/arch/blackfin/cpu/serial.c +++ b/drivers/serial/serial_bfin.c @@ -43,13 +43,12 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_UART_CONSOLE -#include "serial.h" - #ifdef CONFIG_DEBUG_SERIAL static uart_lsr_t cached_lsr[256]; static uart_lsr_t cached_rbr[256]; diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 0bcccf8..c751dd7 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -111,6 +111,9 @@ #ifndef CONFIG_BAUDRATE # define CONFIG_BAUDRATE 57600 #endif +#ifdef CONFIG_UART_CONSOLE +# define CONFIG_BFIN_SERIAL +#endif /* * Debug Settings