diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2010-11-26 09:54:49 +0100 |
---|---|---|
committer | H. Nikolaus Schaller <hns@goldelico.com> | 2010-11-26 09:55:45 +0100 |
commit | 5f2d7cda0c5a973673dceb2671ac5dc50fe0f704 (patch) | |
tree | 3155bcb2e4e1de6f04a4ea9d94d64d76aacff3a6 | |
parent | babba299845ac1153af7a760c426944a84a90625 (diff) | |
download | bootable_bootloader_goldelico_gta04-5f2d7cda0c5a973673dceb2671ac5dc50fe0f704.zip bootable_bootloader_goldelico_gta04-5f2d7cda0c5a973673dceb2671ac5dc50fe0f704.tar.gz bootable_bootloader_goldelico_gta04-5f2d7cda0c5a973673dceb2671ac5dc50fe0f704.tar.bz2 |
fixed compilation for target omap3_beaglehyb
-rw-r--r-- | board/goldelico/beagle-hybrid/Makefile | 8 | ||||
-rw-r--r-- | board/goldelico/gta04/Makefile | 8 | ||||
-rw-r--r-- | board/goldelico/gta04/commands.c | 16 | ||||
-rw-r--r-- | board/goldelico/gta04/gps.c | 3 | ||||
-rw-r--r-- | board/goldelico/gta04/shutdown.c | 17 | ||||
-rw-r--r-- | board/goldelico/gta04/shutdown.h | 25 | ||||
-rw-r--r-- | board/ti/beagle/beagle.c | 2 | ||||
-rw-r--r-- | board/ti/beagle/beagle.h | 2 | ||||
-rw-r--r-- | boards.cfg | 4 | ||||
-rw-r--r-- | include/configs/omap3_beaglehyb.h (renamed from include/configs/omap3_beagle-hybrid.h) | 9 | ||||
-rw-r--r-- | include/configs/omap3_gta04.h | 10 |
11 files changed, 66 insertions, 38 deletions
diff --git a/board/goldelico/beagle-hybrid/Makefile b/board/goldelico/beagle-hybrid/Makefile index 50650bf..ef59f12 100644 --- a/board/goldelico/beagle-hybrid/Makefile +++ b/board/goldelico/beagle-hybrid/Makefile @@ -25,13 +25,13 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS := beagle.o -COBJS-y := $(BOARD).o ../gta04/TD028TTEC1.o ../gta04/jbt6k74.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/commands.o +COBJS := beagle.o ../gta04/TD028TTEC1.o ../gta04/jbt6k74.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/shutdown.o ../gta04/commands.o -COBJS := $(sort $(COBJS-y)) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) +#$(LIB): $(obj).depend $(OBJS) +# $(call cmd_link_o_target, $(OBJS)) $(LIB): $(obj).depend $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) @@ -48,4 +48,4 @@ include $(SRCTREE)/rules.mk sinclude $(obj).depend -######################################################################### +#########################################################################
\ No newline at end of file diff --git a/board/goldelico/gta04/Makefile b/board/goldelico/gta04/Makefile index 7459add..b65f04a 100644 --- a/board/goldelico/gta04/Makefile +++ b/board/goldelico/gta04/Makefile @@ -25,13 +25,13 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS := gta04.0 -COBJS-y := $(BOARD).o TD028TTEC1.o jbt6k74.o backlight.o status.o tsc2007.o dssfb.o gps.o commands.o +COBJS := gta04.o ../gta04/TD028TTEC1.o ../gta04/jbt6k74.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/shutdown.o ../gta04/commands.o -COBJS := $(sort $(COBJS-y)) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) +#$(LIB): $(obj).depend $(OBJS) +# $(call cmd_link_o_target, $(OBJS)) $(LIB): $(obj).depend $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) @@ -48,4 +48,4 @@ include $(SRCTREE)/rules.mk sinclude $(obj).depend -######################################################################### +#########################################################################
\ No newline at end of file diff --git a/board/goldelico/gta04/commands.c b/board/goldelico/gta04/commands.c index f73ec66..b91c241 100644 --- a/board/goldelico/gta04/commands.c +++ b/board/goldelico/gta04/commands.c @@ -35,6 +35,7 @@ #include "status.h" #include "gps.h" #include "tsc2007.h" +#include "shutdown.h" /* LCM commands */ @@ -485,14 +486,6 @@ static int do_systest(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) U_BOOT_CMD(systest, 2, 0, do_systest, "System Test", ""); -#ifndef CONFIG_OMAP3_GTA04 -static void shutdown(void) - { - printf("please switch off power supply\n"); - while(1) - ; - } -#endif static int do_halt(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { @@ -511,7 +504,6 @@ static int do_mux(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int cols=0; char *addr=(char *) 0x48002030; - printf("%08x", (unsigned int) addr); while(addr <= (char *) 0x480025F8) { unsigned mux=*(unsigned *) addr; int i; @@ -522,15 +514,17 @@ static int do_mux(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) mux >>= 16; } if(addr == (char *) 0x48002264) { - addr= (char *) 0x480025DC; if(cols != 0) printf("\n"); cols=0; + addr= (char *) 0x480025DC; } else { addr+=4; - if(++cols == 8) + if(++cols == 8) { + printf("\n"); cols=0; + } } } if(cols != 0) diff --git a/board/goldelico/gta04/gps.c b/board/goldelico/gta04/gps.c index d511d50..e9ad5dd 100644 --- a/board/goldelico/gta04/gps.c +++ b/board/goldelico/gta04/gps.c @@ -66,7 +66,7 @@ void gps_echo(void) while (1) { // echo in both directions int ant=omap_get_gpio_datain(GPIO_GPSEXT); - static lastant=-1; + static int lastant=-1; if(ant != lastant) { // changed if(ant) @@ -83,6 +83,5 @@ void gps_echo(void) } getc(); printf("\n"); - return 0; } diff --git a/board/goldelico/gta04/shutdown.c b/board/goldelico/gta04/shutdown.c index 653787b..4348b60 100644 --- a/board/goldelico/gta04/shutdown.c +++ b/board/goldelico/gta04/shutdown.c @@ -28,10 +28,25 @@ #include <asm/arch/sys_proto.h> #include <asm/arch/gpio.h> #include <asm/mach-types.h> +#include <twl4030.h> #include "shutdown.h" void shutdown(void) { + u8 val = 0; printf("shutting down by writing DEVOFF register of TPS65950\n"); - // write DEVOFF register + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val, + TWL4030_PM_MASTER_P1_SW_EVENTS)) { + printf("Error:TWL4030: failed to read the power register\n"); + printf("Could not initialize hardware reset\n"); + } else { + val |= TWL4030_PM_MASTER_SW_EVENTS_DEVOFF; + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val, + TWL4030_PM_MASTER_P1_SW_EVENTS)) { + printf("Error:TWL4030: failed to write the power register\n"); + printf("Could not initialize hardware reset\n"); + } + } + // CHECKME: do we have to write PM_MASTER_P2 and _P3? } + diff --git a/board/goldelico/gta04/shutdown.h b/board/goldelico/gta04/shutdown.h index af94d60..a14695c 100644 --- a/board/goldelico/gta04/shutdown.h +++ b/board/goldelico/gta04/shutdown.h @@ -1,6 +1,29 @@ +/* u-boot extended commands for GTA04 + * + * Copyright (C) 2010 by Golden Delicious Computers GmbH&Co. KG + * Author: H. Nikolaus Schaller <hns@goldelico.com> + * All rights reserved. + * + * 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 + * + */ + #ifndef _SHUTDOWN_H #define _SHUTDOWN_H -void shutdown(void) +void shutdown(void); #endif diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index cd6fa6c..4eabe27 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -272,4 +272,4 @@ int board_mmc_init(bd_t *bis) omap_mmc_init(0); return 0; } -#endif
\ No newline at end of file +#endif diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h index 469cea4..10853d8 100644 --- a/board/ti/beagle/beagle.h +++ b/board/ti/beagle/beagle.h @@ -457,4 +457,4 @@ MUX_VAL(CP(MCBSP1_DX), (IDIS | PTU | DIS | M1)) /*MCSPI4_SIMO*/\ MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | EN | M1)) /*MCSPI4_SOMI*/\ MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTU | DIS | M1)) /*MCSPI4_CS0*/ -#endif
\ No newline at end of file +#endif @@ -386,7 +386,7 @@ omap3_pandora arm armv7 pandora - omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 omap3_zoom2 arm armv7 zoom2 logicpd omap3 omap3_beagle arm armv7 beagle ti omap3 -omap3_ombbhyb arm armv7 beagle-hybrid goldelico omap3 +omap3_beaglehyb arm armv7 beagle-hybrid goldelico omap3 omap3_gta04 arm armv7 gta04 goldelico omap3 omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3 @@ -395,7 +395,7 @@ igep0030 arm armv7 igep0030 isee omap3 am3517_evm arm armv7 am3517evm logicpd omap3 devkit8000 arm armv7 devkit8000 timll omap3 omap4_panda arm armv7 panda ti omap4 -omap4_ompbhyb arm armv7 panda-hybrid goldelico omap4 +omap4_pandahyb arm armv7 panda-hybrid goldelico omap4 omap4_sdp4430 arm armv7 sdp4430 ti omap4 s5p_goni arm armv7 goni samsung s5pc1xx smdkc100 arm armv7 smdkc100 samsung s5pc1xx diff --git a/include/configs/omap3_beagle-hybrid.h b/include/configs/omap3_beaglehyb.h index b438c8e..993f577 100644 --- a/include/configs/omap3_beagle-hybrid.h +++ b/include/configs/omap3_beaglehyb.h @@ -1,10 +1,9 @@ /* - * (C) Copyright 2006-2008 - * Texas Instruments. - * Richard Woodruff <r-woodruff2@ti.com> - * Syed Mohammed Khasim <x0khasim@ti.com> + * (C) Copyright 2010 + * Nikolaus Schaller <hns@goldelico.com> * - * Configuration settings for the TI OMAP3530 Beagle board. + * Configuration settings for the TI OMAP3530 Beagle board with + * Openmoko Hybrid Display extension. * * See file CREDITS for list of people who contributed to this * project. diff --git a/include/configs/omap3_gta04.h b/include/configs/omap3_gta04.h index 4b2b00c..033ed68 100644 --- a/include/configs/omap3_gta04.h +++ b/include/configs/omap3_gta04.h @@ -1,10 +1,8 @@ /* - * (C) Copyright 2006-2008 - * Texas Instruments. - * Richard Woodruff <r-woodruff2@ti.com> - * Syed Mohammed Khasim <x0khasim@ti.com> + * (C) Copyright 2010 + * Nikolaus Schaller <hns@goldelico.com> * - * Configuration settings for the TI OMAP3530 Beagle board. + * Configuration settings for the GTA04. * * See file CREDITS for list of people who contributed to this * project. @@ -30,6 +28,6 @@ #include "omap3_beagle-hybrid.h" /* share config */ #undef CONFIG_SYS_PROMPT -#define CONFIG_SYS_PROMPT "Openmoko Beagle Hybrid # " +#define CONFIG_SYS_PROMPT "GTA04 # " /* __CONFIG_H */ |