recovery: move usb related codes to driver/usb
authorMinkyu Kang <mk7.kang@samsung.com>
Thu, 22 Apr 2010 05:27:23 +0000 (14:27 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 22 Apr 2010 05:27:23 +0000 (14:27 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
recovery/Makefile
recovery/board/samsung/universal/Makefile
recovery/drivers/usb/Makefile [new file with mode: 0644]
recovery/drivers/usb/s5p_usb_downloader.c [moved from recovery/board/samsung/universal/usb_downloader.c with 98% similarity]
recovery/drivers/usb/s5p_usb_hs_otg.c [moved from recovery/board/samsung/universal/usb-hs-otg.c with 99% similarity]
recovery/drivers/usb/s5p_usb_hs_otg.h [moved from recovery/board/samsung/universal/usb-hs-otg.h with 100% similarity]

index 233dbeb..4c813dd 100644 (file)
@@ -30,6 +30,7 @@ SRCS := $(OBJS:.o=.c)
 OBJS := $(addprefix $(obj),$(OBJS))
 
 LIBS = drivers/onenand/libonenand.a
+LIBS += drivers/usb/libusb.a
 LIBS := $(addprefix $(recoveryobj),$(LIBS))
 
 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
index 59b8f10..dde6ad0 100644 (file)
@@ -20,7 +20,6 @@ LIB   := $(obj)lib$(BOARD).a
 
 SOBJS = start.o reset.o _memcpy32.o
 COBJS = string.o dlmalloc.o
-COBJS += usb_downloader.o usb-hs-otg.o
 COBJS += gpio.o
 COBJS += universal.o
 
diff --git a/recovery/drivers/usb/Makefile b/recovery/drivers/usb/Makefile
new file mode 100644 (file)
index 0000000..68c1c9f
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2010 Samsung Electronics.
+# Minkyu Kang <mk7.kang@samsung.com>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+recoveryobj := $(OBJTREE)/recovery/
+RECOVERYCFG := $(recoveryobj)board/$(BOARDDIR)/config.mk
+include $(RECOVERYCFG)
+
+LIB := $(obj)libusb.a
+
+COBJS-$(CONFIG_S5PC1XX) += s5p_usb_hs_otg.o s5p_usb_downloader.o
+
+SRCS := $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
+
+all:   $(LIB)
+
+$(LIB): $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
@@ -21,7 +21,7 @@
 
 #include <common.h>
 #include "usbd.h"
-#include "usb-hs-otg.h"
+#include "s5p_usb_hs_otg.h"
 
 #define TX_DATA_LEN    4
 #define RX_DATA_LEN    64
similarity index 99%
rename from recovery/board/samsung/universal/usb-hs-otg.c
rename to recovery/drivers/usb/s5p_usb_hs_otg.c
index 62ff55d..900af30 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #include <common.h>
-#include "usb-hs-otg.h"
+#include "s5p_usb_hs_otg.h"
 
 u32 remode_wakeup;
 u16 config_value;