From 6d41c27d25d3ffa5caac76277298e51565446b47 Mon Sep 17 00:00:00 2001 From: Marcin Mielczarczyk Date: Wed, 8 Dec 2010 11:16:45 +0100 Subject: [PATCH] sciphone_g2: Vibrator control in SPL To inform user that SPL has successfully started, vibrator is turned on just before loading code from NAND. Vibrator is turned off when code loading is finished, thanks to which user knows that SPL has loaded code from NAND to SDRAM and didn't hang up. Signed-off-by: Marcin Mielczarczyk --- nand_spl/board/mtk/sciphone_g2/Makefile | 6 +++++- nand_spl/nand_boot_detect.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/nand_spl/board/mtk/sciphone_g2/Makefile b/nand_spl/board/mtk/sciphone_g2/Makefile index 6bc47a8b6..a2ea118c0 100644 --- a/nand_spl/board/mtk/sciphone_g2/Makefile +++ b/nand_spl/board/mtk/sciphone_g2/Makefile @@ -35,7 +35,7 @@ AFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL -DCONFIG_SYS_TEXT_BASE=$(CONFIG_S CFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) SOBJS = start.o lowlevel_init.o -COBJS = nand_boot_detect.o mt62xx_nand.o nand_ids.o +COBJS = nand_boot_detect.o mt62xx_nand.o nand_ids.o vibra.o SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) @@ -68,12 +68,16 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) $(obj)%.o: $(SRCTREE)/arch/arm/cpu/arm926ejs/%.S $(CC) $(AFLAGS) -c -o $@ $< +$(obj)%.o: $(SRCTREE)/arch/arm/cpu/arm926ejs/$(VENDOR)/%.c + $(CC) $(AFLAGS) -c -o $@ $< + $(obj)%.o: $(SRCTREE)/nand_spl/%.c $(CC) $(CFLAGS) -c -o $@ $< $(obj)%.o: $(SRCTREE)/drivers/mtd/nand/%.c $(CC) $(CFLAGS) -c -o $@ $< + # defines $(obj).depend target include $(SRCTREE)/rules.mk diff --git a/nand_spl/nand_boot_detect.c b/nand_spl/nand_boot_detect.c index 01f8e70f3..afa3df05b 100644 --- a/nand_spl/nand_boot_detect.c +++ b/nand_spl/nand_boot_detect.c @@ -24,6 +24,7 @@ #include #include #include +#include /* * SPL has no malloc availble and below are definitions of some temporary @@ -439,6 +440,8 @@ void nand_boot(void) nand_info_t *mtd = nand_info; __attribute__((noreturn)) void (*uboot)(void); + vibra_on(); + /* * Init board specific nand support */ @@ -476,6 +479,8 @@ void nand_boot(void) if (chip.select_chip) chip.select_chip(mtd, -1); + vibra_off(); + /* * Jump to U-Boot image */