From bc96ab36f062ea0d200b1e047e84cd72735fbf0d Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Thu, 22 Apr 2010 14:27:23 +0900 Subject: [PATCH] recovery: move usb related codes to driver/usb Signed-off-by: Minkyu Kang --- recovery/Makefile | 1 + recovery/board/samsung/universal/Makefile | 1 - recovery/drivers/usb/Makefile | 48 ++++++++++++++++++++++ .../usb/s5p_usb_downloader.c} | 2 +- .../usb-hs-otg.c => drivers/usb/s5p_usb_hs_otg.c} | 2 +- .../usb-hs-otg.h => drivers/usb/s5p_usb_hs_otg.h} | 0 6 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 recovery/drivers/usb/Makefile rename recovery/{board/samsung/universal/usb_downloader.c => drivers/usb/s5p_usb_downloader.c} (98%) rename recovery/{board/samsung/universal/usb-hs-otg.c => drivers/usb/s5p_usb_hs_otg.c} (99%) rename recovery/{board/samsung/universal/usb-hs-otg.h => drivers/usb/s5p_usb_hs_otg.h} (100%) diff --git a/recovery/Makefile b/recovery/Makefile index 233dbeb..4c813dd 100644 --- a/recovery/Makefile +++ b/recovery/Makefile @@ -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 diff --git a/recovery/board/samsung/universal/Makefile b/recovery/board/samsung/universal/Makefile index 59b8f10..dde6ad0 100644 --- a/recovery/board/samsung/universal/Makefile +++ b/recovery/board/samsung/universal/Makefile @@ -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 index 0000000..68c1c9f --- /dev/null +++ b/recovery/drivers/usb/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2010 Samsung Electronics. +# Minkyu Kang +# +# 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 + +######################################################################### diff --git a/recovery/board/samsung/universal/usb_downloader.c b/recovery/drivers/usb/s5p_usb_downloader.c similarity index 98% rename from recovery/board/samsung/universal/usb_downloader.c rename to recovery/drivers/usb/s5p_usb_downloader.c index a6e69ee..56a3d18 100644 --- a/recovery/board/samsung/universal/usb_downloader.c +++ b/recovery/drivers/usb/s5p_usb_downloader.c @@ -21,7 +21,7 @@ #include #include "usbd.h" -#include "usb-hs-otg.h" +#include "s5p_usb_hs_otg.h" #define TX_DATA_LEN 4 #define RX_DATA_LEN 64 diff --git a/recovery/board/samsung/universal/usb-hs-otg.c b/recovery/drivers/usb/s5p_usb_hs_otg.c 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 --- a/recovery/board/samsung/universal/usb-hs-otg.c +++ b/recovery/drivers/usb/s5p_usb_hs_otg.c @@ -19,7 +19,7 @@ */ #include -#include "usb-hs-otg.h" +#include "s5p_usb_hs_otg.h" u32 remode_wakeup; u16 config_value; diff --git a/recovery/board/samsung/universal/usb-hs-otg.h b/recovery/drivers/usb/s5p_usb_hs_otg.h similarity index 100% rename from recovery/board/samsung/universal/usb-hs-otg.h rename to recovery/drivers/usb/s5p_usb_hs_otg.h -- 2.7.4