From owner-p4-projects@FreeBSD.ORG Wed Nov 8 00:54:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7AE7216A417; Wed, 8 Nov 2006 00:54:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D96416A47E for ; Wed, 8 Nov 2006 00:54:49 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA2C643D68 for ; Wed, 8 Nov 2006 00:54:39 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kA80scUj004090 for ; Wed, 8 Nov 2006 00:54:38 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kA80scNJ004087 for perforce@freebsd.org; Wed, 8 Nov 2006 00:54:38 GMT (envelope-from imp@freebsd.org) Date: Wed, 8 Nov 2006 00:54:38 GMT Message-Id: <200611080054.kA80scNJ004087@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109500 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2006 00:54:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=109500 Change 109500 by imp@imp_lighthouse on 2006/11/08 00:54:16 Add perliminary support for KB9202{,A} to boot2. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#24 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#11 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#36 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#15 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac_init.c#8 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#24 (text+ko) ==== @@ -5,6 +5,9 @@ __at91_boot_Makefile.inc__: +# tsc, kb920x are the supported flavors +BOOT_FLAVOR=kb920x + CFLAGS=-Os -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ -I${.CURDIR}/../../../.. \ @@ -18,8 +21,7 @@ # -Wmissing-declarations # -Wstrict-prototypes -CFLAGS+=-DBOOT_TSC -#CFLAGS+=-DBOOT_KB9202 +CFLAGS+=-DBOOT_${BOOT_FLAVOR:U} LIBAT91=${.OBJDIR}/../libat91/libat91.a ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#8 (text+ko) ==== @@ -4,7 +4,7 @@ P=boot2 FILES=${P} -SRCS=arm_init.S boot2.c tsc_board.c ee.c +SRCS=arm_init.S boot2.c ${BOOT_FLAVOR}_board.c ee.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#11 (text) ==== @@ -100,7 +100,7 @@ while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MCKRDY)) continue; -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X // setup flash access (allow ample margin) // 9 wait states, 1 setup, 1 hold, 1 float for 8-bit device ((AT91PS_SMC2)AT91C_BASE_SMC2)->SMC2_CSR[0] = ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#8 (text) ==== @@ -31,7 +31,7 @@ #define SDRAM_BASE 0x20000000 -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X /* The following divisor sets PLLA frequency: e.g. 10/5 * 90 = 180MHz */ #define OSC_MAIN_FREQ_DIV 5 /* for 10MHz osc */ #define SDRAM_WIDTH AT91C_SDRC_DBW_16_BITS ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#36 (text+ko) ==== @@ -384,7 +384,7 @@ unsigned sec; int i; #endif -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); if (!(stat2 & MII_STS2_LINK)) return ; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#15 (text+ko) ==== @@ -114,7 +114,7 @@ /* MII registers definition */ #define MII_STS_REG 0x01 #define MII_STS_LINK_STAT 0x04 -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X #define MII_STS2_REG 0x11 #define MII_STS2_LINK 0x400 #define MII_STS2_100TX 0x4000 ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac_init.c#8 (text+ko) ==== @@ -94,7 +94,7 @@ AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | AT91C_PA7_ETXCK_EREFCK; -#ifdef BOOT_KB9202 /* Really !RMII */ +#ifdef BOOT_KB920X /* Really !RMII */ AT91C_BASE_PIOB->PIO_BSR = AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV |