[oe-commits] org.oe.dev packages/uboot/u-boot_1.1.2.bb : Add suport for Magicbox boards

ifaistos commit openembedded-commits at lists.openembedded.org
Sun Apr 29 16:04:46 UTC 2007


packages/uboot/u-boot_1.1.2.bb : Add suport for Magicbox boards

Author: ifaistos at openembedded.org
Branch: org.openembedded.dev
Revision: 2087be8072069ca04fed4f7641aed94abcddeabd
ViewMTN: http://monotone.openembedded.org/revision.psp?id=2087be8072069ca04fed4f7641aed94abcddeabd
Files:
1
packages/uboot/u-boot-1.1.2/u-boot-emetec.patch
packages/uboot/u-boot_1.1.2.bb
Diffs:

#
# mt diff -r4e27e897500d2cadb0d32d0b04cd940148a35ecb -r2087be8072069ca04fed4f7641aed94abcddeabd
#
# 
# 
# add_file "packages/uboot/u-boot-1.1.2/u-boot-emetec.patch"
#  content [7a374cd08fa78b1a90b563ee31674b809ecd2149]
# 
# patch "packages/uboot/u-boot_1.1.2.bb"
#  from [a3889377bb092548a1ccae47ac1eef61ed16b8dd]
#    to [16bfcf693d217b7d96a053df2b2eb514bbadc898]
# 
============================================================
--- packages/uboot/u-boot-1.1.2/u-boot-emetec.patch	7a374cd08fa78b1a90b563ee31674b809ecd2149
+++ packages/uboot/u-boot-1.1.2/u-boot-emetec.patch	7a374cd08fa78b1a90b563ee31674b809ecd2149
@@ -0,0 +1,2170 @@
+diff -uNr u-boot-1.1.2/.pc/.version u-boot-emetec-1.1.2/.pc/.version
+--- u-boot-1.1.2/.pc/.version	2007-04-20 00:01:06.000000000 +0300
++++ u-boot-emetec-1.1.2/.pc/.version	1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-2
+diff -uNr u-boot-1.1.2/.pc/applied-patches u-boot-emetec-1.1.2/.pc/applied-patches
+--- u-boot-1.1.2/.pc/applied-patches	2007-04-20 00:01:06.000000000 +0300
++++ u-boot-emetec-1.1.2/.pc/applied-patches	1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-arm_flags.patch
+diff -uNr u-boot-1.1.2/.pc/arm_flags.patch/cpu/pxa/config.mk u-boot-emetec-1.1.2/.pc/arm_flags.patch/cpu/pxa/config.mk
+--- u-boot-1.1.2/.pc/arm_flags.patch/cpu/pxa/config.mk	2003-05-23 15:36:21.000000000 +0300
++++ u-boot-emetec-1.1.2/.pc/arm_flags.patch/cpu/pxa/config.mk	1970-01-01 02:00:00.000000000 +0200
+@@ -1,28 +0,0 @@
+-#
+-# (C) Copyright 2002
+-# Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+-# Marius Groeger <mgroeger at sysgo.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
+-#
+-
+-PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 \
+-	-mshort-load-bytes -msoft-float
+-
+-PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100
+diff -uNr u-boot-1.1.2/MAKEALL u-boot-emetec-1.1.2/MAKEALL
+--- u-boot-1.1.2/MAKEALL	2004-12-31 11:32:48.000000000 +0200
++++ u-boot-emetec-1.1.2/MAKEALL	2005-03-11 22:23:47.000000000 +0200
+@@ -69,7 +69,7 @@
+ 	ml300		OCOTEA		OCRTC		ORSG		\
+ 	PCI405		PIP405		PLU405		PMC405		\
+ 	PPChameleonEVB	VOH405		W7OLMC		W7OLMG		\
+-	WALNUT405	WUH405          XPEDITE1K			\
++	WALNUT405	WUH405          XPEDITE1K	EMETEC405	\
+ "
+ 
+ #########################################################################
+diff -uNr u-boot-1.1.2/Makefile u-boot-emetec-1.1.2/Makefile
+--- u-boot-1.1.2/Makefile	2004-12-19 11:58:11.000000000 +0200
++++ u-boot-emetec-1.1.2/Makefile	2005-03-14 22:43:56.000000000 +0200
+@@ -54,7 +54,7 @@
+ CROSS_COMPILE =
+ else
+ ifeq ($(ARCH),ppc)
+-CROSS_COMPILE = ppc_8xx-
++CROSS_COMPILE = ppc_4xx-
+ endif
+ ifeq ($(ARCH),arm)
+ CROSS_COMPILE = arm-linux-
+@@ -127,7 +127,6 @@
+ # The "tools" are needed early, so put this first
+ # Don't include stuff already done in $(LIBS)
+ SUBDIRS	= tools \
+-	  examples \
+ 	  post \
+ 	  post/cpu
+ .PHONY : $(SUBDIRS)
+@@ -838,6 +837,9 @@
+ 
+ VOM405_config:	unconfig
+ 	@./mkconfig $(@:_config=) ppc ppc4xx vom405 esd
++	
++EMETEC405_config: unconfig
++	@./mkconfig $(@:_config=) ppc ppc4xx emetec405
+ 
+ W7OLMC_config	\
+ W7OLMG_config: unconfig
+diff -uNr u-boot-1.1.2/board/emetec405/Makefile u-boot-emetec-1.1.2/board/emetec405/Makefile
+--- u-boot-1.1.2/board/emetec405/Makefile	1970-01-01 02:00:00.000000000 +0200
++++ u-boot-emetec-1.1.2/board/emetec405/Makefile	2005-04-26 22:34:53.000000000 +0300
+@@ -0,0 +1,46 @@
++#
++# (C) Copyright 2000
++# 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	= $(BOARD).o flash.o
++
++$(LIB):	$(OBJS) $(SOBJS)
++	$(AR) crv $@ $(OBJS)
++
++clean:
++	rm -f $(SOBJS) $(OBJS)
++
++distclean:	clean
++	rm -f $(LIB) core *.bak .depend
++
++#########################################################################
++
++.depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
++		$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
++
++sinclude .depend
++
++#########################################################################
+diff -uNr u-boot-1.1.2/board/emetec405/config.mk u-boot-emetec-1.1.2/board/emetec405/config.mk
+--- u-boot-1.1.2/board/emetec405/config.mk	1970-01-01 02:00:00.000000000 +0200
++++ u-boot-emetec-1.1.2/board/emetec405/config.mk	2005-03-11 22:26:43.000000000 +0200
+@@ -0,0 +1,28 @@
++#
++# (C) Copyright 2000
++# 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
++#
++
++#
++# emetec EMETEC405 boards
++#
++
++TEXT_BASE = 0xFFFC0000
+diff -uNr u-boot-1.1.2/board/emetec405/emetec405.c u-boot-emetec-1.1.2/board/emetec405/emetec405.c
+--- u-boot-1.1.2/board/emetec405/emetec405.c	1970-01-01 02:00:00.000000000 +0200
++++ u-boot-emetec-1.1.2/board/emetec405/emetec405.c	2005-04-26 23:02:01.000000000 +0300
+@@ -0,0 +1,106 @@
++/*
++ * (C) Copyright 2001-2003
++ * Stefan Roese, esd gmbh germany, stefan.roese at esd-electronics.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 <common.h>
++#include <asm/processor.h>
++#include <command.h>
++#include <malloc.h>
++
++
++int board_early_init_f (void)
++{
++   /*-------------------------------------------------------------------------+
++   | Interrupt controller setup for the Walnut board.
++   | Note: IRQ 0-15  405GP internally generated; active high; level sensitive
++   |       IRQ 16    405GP internally generated; active low; level sensitive
++   |       IRQ 17-24 RESERVED
++   |       IRQ 25 (EXT IRQ 0) FPGA; active high; level sensitive
++   |       IRQ 26 (EXT IRQ 1) SMI; active high; level sensitive
++   |       IRQ 27 (EXT IRQ 2) Not Used
++   |       IRQ 28 (EXT IRQ 3) PCI SLOT 3; active low; level sensitive
++   |       IRQ 29 (EXT IRQ 4) PCI SLOT 2; active low; level sensitive
++   |       IRQ 30 (EXT IRQ 5) PCI SLOT 1; active low; level sensitive
++   |       IRQ 31 (EXT IRQ 6) PCI SLOT 0; active low; level sensitive
++   | Note for Walnut board:
++   |       An interrupt taken for the FPGA (IRQ 25) indicates that either
++   |       the Mouse, Keyboard, IRDA, or External Expansion caused the
++   |       interrupt. The FPGA must be read to determine which device
++   |       caused the interrupt. The default setting of the FPGA clears
++   |
++   +-------------------------------------------------------------------------*/
++
++	mtdcr (uicsr, 0xFFFFFFFF);	/* clear all ints */
++	mtdcr (uicer, 0x00000000);	/* disable all ints */
++	mtdcr (uiccr, 0x00000000);	/* set all to be non-critical */
++	mtdcr (uicpr, 0xFFFFFFE0);	/* set int polarities */
++	mtdcr (uictr, 0x10000000);	/* set int trigger levels */
++	mtdcr (uicvcr, 0x00000001);	/* set vect base=0,INT0 highest priority */
++	mtdcr (uicsr, 0xFFFFFFFF);	/* clear all ints */
++
++	return 0;
++}
++
++
++int misc_init_f (void)
++{
++	return 0;  /* dummy implementation */
++}
++
++
++int misc_init_r (void)
++{
++	return 0;  /* dummy implementation */
++}
++
++
++/*
++ * Check Board Identity:
++ */
++int checkboard (void)
++{
++	unsigned char str[64];
++
++	puts ("Board: MAGICBOX\n");
++
++	return 0;
++}
++
++
++long int initdram (int board_type)
++{
++	unsigned long val;
++
++	mtdcr(memcfga, mem_mb0cf);
++	val = mfdcr(memcfgd);
++	
++	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
++}
++
++
++int testdram (void)
++{
++	printf ("test: 32 MB - ok\n");
++
++	return (0);
++}
++
+diff -uNr u-boot-1.1.2/board/emetec405/flash.c u-boot-emetec-1.1.2/board/emetec405/flash.c
+--- u-boot-1.1.2/board/emetec405/flash.c	1970-01-01 02:00:00.000000000 +0200
++++ u-boot-emetec-1.1.2/board/emetec405/flash.c	2005-05-25 10:14:13.000000000 +0300
+@@ -0,0 +1,544 @@
++/*
++ * (C) Copyright 2000
++ * 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 <common.h>
++#include <ppc4xx.h>
++#include <asm/processor.h>
++
++flash_info_t	flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips	*/
++
++/*-----------------------------------------------------------------------
++ * Functions
++ */
++static ulong flash_get_size (vu_long * addr, flash_info_t * info);
++static void flash_get_offsets (ulong base, flash_info_t * info);
++
++/*-----------------------------------------------------------------------
++ */
++unsigned long flash_init (void)
++{
++	unsigned long size_b0;
++	int i;
++	uint pbcr;
++	unsigned long base_b0;
++	int size_val = 0;
++
++	/* Init: no FLASHes known */
++	for (i=0; i<CFG_MAX_FLASH_BANKS; ++i) {
++		flash_info[i].flash_id = FLASH_UNKNOWN;
++	}
++
++	/* Static FLASH Bank configuration here - FIXME XXX */
++
++	size_b0 = flash_get_size((vu_long *)FLASH_BASE0_PRELIM, &flash_info[0]);
++
++	if (flash_info[0].flash_id == FLASH_UNKNOWN) {
++		printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
++			size_b0, size_b0<<20);
++	}
++
++	/* Setup offsets */
++	flash_get_offsets (-size_b0, &flash_info[0]);
++
++	/* Re-do sizing to get full correct info */
++	mtdcr(ebccfga, pb0cr);
++	pbcr = mfdcr(ebccfgd);
++	mtdcr(ebccfga, pb0cr);
++	base_b0 = -size_b0;
++	switch (size_b0) {
++	case 1 << 20:
++		size_val = 0;
++		break;
++	case 2 << 20:
++		size_val = 1;
++		break;
++	case 4 << 20:
++		size_val = 2;
++		break;
++	case 8 << 20:
++		size_val = 3;
++		break;
++	case 16 << 20:
++		size_val = 4;
++		break;
++	}
++	pbcr = (pbcr & 0x0001ffff) | base_b0 | (size_val << 17);
++	mtdcr(ebccfgd, pbcr);
++
++	/* Monitor protection ON by default */
++	(void)flash_protect(FLAG_PROTECT_SET,
++			    -CFG_MONITOR_LEN,
++			    0xffffffff,
++			    &flash_info[0]);
++
++	flash_info[0].size = size_b0;
++
++	return (size_b0);
++}
++
++/*-----------------------------------------------------------------------
++ */
++static void flash_get_offsets (ulong base, flash_info_t *info)
++{
++	int i;
++	short n;
++	
++	base += info->size;
++	i = info->sector_count;
++	
++	switch (info->flash_id & FLASH_TYPEMASK) 
++	{	
++		case FLASH_STMW320DT :
++			/*  1 x 16k boot sector */
++			base -= 16 << 10;
++			--i;
++			info->start[i] = base;
++			/*  2 x 8k  boot sectors */
++			for (n=0; n<2; ++n) {
++				base -= 8 << 10;
++				--i;
++				info->start[i] = base;
++			}
++			/*  1 x 32k boot sector */
++			base -= 32 << 10;
++			--i;
++			info->start[i] = base;		
++			break;
++			
++		case FLASH_STMW640DT :
++			/*  8 x 8k  boot sectors */
++			for (n=0; n<8; ++n) {
++				base -= 8 << 10;
++				--i;
++				info->start[i] = base;
++			}
++			break;
++	};
++	/* 64k regular sectors	*/
++	while (i > 0) {
++		base -= 64 << 10;
++		--i;
++		info->start[i] = base;
++	}
++}
++
++/*-----------------------------------------------------------------------
++ */
++static ulong flash_get_size (vu_long *addr, flash_info_t *info)
++{
++	short i;
++	short n;
++	CFG_FLASH_WORD_SIZE value;
++	ulong base = (ulong)addr;
++	volatile CFG_FLASH_WORD_SIZE *addr2 = (CFG_FLASH_WORD_SIZE *)addr;
++
++	/* Write auto select command: read Manufacturer ID */
++	addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
++	addr2[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
++	addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00900090;
++
++	value = addr2[CFG_FLASH_READ0];
++
++	switch (value) {
++	case (CFG_FLASH_WORD_SIZE)SST_MANUFACT:
++		info->flash_id = FLASH_MAN_SST;
++		break;
++	case (CFG_FLASH_WORD_SIZE)STM_MANUFACT:
++		info->flash_id = FLASH_MAN_STM;
++		break;
++	default:
++		info->flash_id = FLASH_UNKNOWN;
++		info->sector_count = 0;
++		info->size = 0;
++		return (0);
++	}
++
++	value = addr2[CFG_FLASH_READ1];		/* device ID		*/
++
++	switch (value) {
++	case (CFG_FLASH_WORD_SIZE)STM_ID_29W320DT:
++		info->flash_id += FLASH_STMW320DT;
++		info->sector_count = 67;
++		info->size = 0x00400000;  
++		
++		/* set up sector start address table for FLASH_STMW320DT */
++		/* set sector offsets for top boot block type		*/
++		base += info->size;
++		i = info->sector_count;
++		/*  1 x 16k boot sector */
++		base -= 16 << 10;
++		--i;
++		info->start[i] = base;
++		/*  2 x 8k  boot sectors */
++		for (n=0; n<2; ++n) {
++			base -= 8 << 10;
++			--i;
++			info->start[i] = base;
++		};
++		/*  1 x 32k boot sector */
++		base -= 32 << 10;
++		--i;
++		info->start[i] = base;
++	
++		/* 64k regular sectors	*/
++		while (i > 0) 
++		{	
++			base -= 64 << 10;
++			--i;
++			info->start[i] = base;
++		};
++		break;	/* => 4 MB	*/
++		
++	case (CFG_FLASH_WORD_SIZE)STM_ID_29W640DT:
++		info->flash_id += FLASH_STMW640DT;
++		info->sector_count = 135;
++		info->size = 0x00800000;  
++		
++		/* set up sector start address table for FLASH_STMW640DT */
++		/* set sector offsets for top boot block type		*/
++		base += info->size;
++		i = info->se%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list