From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 26 Oct 2008 18:18:04 +0100 Subject: [U-Boot] [PATCH 11/13 v4] ARM: OMAP3: Add BeagleBoard In-Reply-To: <48f8e7bb.095c5e0a.5c51.5409@mx.google.com> References: <48f8e7a2.1c215e0a.05c0.5982@mx.google.com> <48f8e7bb.095c5e0a.5c51.5409@mx.google.com> Message-ID: <20081026171804.GF4780@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 21:30 Fri 17 Oct , dirk.behme at googlemail.com wrote: > Subject: [PATCH 11/13 v4] ARM: OMAP3: Add BeagleBoard > > From: Dirk Behme > > Add BeagleBoard > > Signed-off-by: Dirk Behme > > --- > Changes in version v2: > > - Rebase against u-boot-arm.git next (CFG vs. CONFIG changes) > > Makefile | 7 > board/omap3/beagle/Makefile | 46 ++++++ > board/omap3/beagle/beagle.c | 113 +++++++++++++++ > board/omap3/beagle/config.mk | 17 ++ > board/omap3/beagle/u-boot.lds | 63 ++++++++ > include/configs/omap3_beagle.h | 293 +++++++++++++++++++++++++++++++++++++++++ please add the board to the MAINTAINER and MAKEALL > 6 files changed, 539 insertions(+) > > Index: u-boot-arm/board/omap3/beagle/Makefile > =================================================================== > --- /dev/null > +++ u-boot-arm/board/omap3/beagle/Makefile > @@ -0,0 +1,46 @@ > +# > +# (C) Copyright 2000, 2001, 2002 > +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. > +# > +# 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 > + > +LIB = lib$(BOARD).a > + > +OBJS := beagle.o > + > +$(LIB): $(OBJS) > + $(AR) crv $@ $^ > + > +clean: > + rm -f $(OBJS) > + > +distclean: clean > + rm -f $(LIB) core *.bak .depend please use current Makefile style > + > +######################################################################### > + > +.depend: Makefile $(OBJS:.o=.c) > + $(CC) -M $(CPPFLAGS) $(OBJS:.o=.c) > $@ > + > +-include .depend > + > +######################################################################### > Index: u-boot-arm/board/omap3/beagle/beagle.c > =================================================================== > --- /dev/null > +++ u-boot-arm/board/omap3/beagle/beagle.c > @@ -0,0 +1,113 @@ > +/* > + * (C) Copyright 2004-2008 > + * Texas Instruments, > + * > + * Author : > + * Sunil Kumar > + * Shashi Ranjan > + * > + * Derived from Beagle Board and 3430 SDP code by > + * Richard Woodruff > + * Syed Mohammed Khasim > + * > + * > + * 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 > +#include > +#include > +#include > +#include > +#include > + > +const omap3_sysinfo sysinfo = { > + SDP_3430_V1, > + SDP_3430_V2, > + "3530", > + "OMAP3 Beagle board", > +}; > + > +/****************************************************************************** > + * Routine: board_init > + * Description: Early hardware init. > + *****************************************************************************/ > +int board_init(void) > +{ > + DECLARE_GLOBAL_DATA_PTR; > + > + gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ > + /* board id for Linux */ > + gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE; > + /* boot param addr */ > + gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); > + > + return 0; > +} > + > +/****************************************************************************** > + * Routine: misc_init_r > + * Description: Init ethernet (done here so udelay works) > + *****************************************************************************/ > +int misc_init_r(void) > +{ > + > + unsigned char byte; > + > +#ifdef CONFIG_DRIVER_OMAP34XX_I2C > + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); > +#endif please use MACRO instead of value > + /* set vaux3 to 2.8V */ > + byte = 0x20; > + i2c_write(0x4B, 0x7A, 1, &byte, 1); > + byte = 0x03; > + i2c_write(0x4B, 0x7D, 1, &byte, 1); > + > + /* set vpll2 to 1.8V */ > + byte = 0xE0; > + i2c_write(0x4B, 0x8E, 1, &byte, 1); > + byte = 0x05; > + i2c_write(0x4B, 0x91, 1, &byte, 1); > + > + /* set VDAC to 1.8V */ > + byte = 0x20; > + i2c_write(0x4B, 0x96, 1, &byte, 1); > + byte = 0x03; > + i2c_write(0x4B, 0x99, 1, &byte, 1); > + > + byte = 0x33; > + i2c_write(0x4A, 0xEE, 1, &byte, 1); please use Macro instead of value add maybe add a comment and by raw_write > + > + *((uint *) 0x49058034) = 0xFFFFFAF9; > + *((uint *) 0x49056034) = 0x0F9F0FFF; > + *((uint *) 0x49058094) = 0x00000506; > + *((uint *) 0x49056094) = 0xF060F000; > + > + return 0; > +} > + > +/****************************************************************************** > + * Routine: set_muxconf_regs > + * Description: Setting up the configuration Mux registers specific to the > + * hardware. Many pins need to be moved from protect to primary > + * mode. > + *****************************************************************************/ > +void set_muxconf_regs(void) > +{ > + MUX_DEFAULT_ES2(); > +} Best Regards, J.