Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2007 01:47:57 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 119952 for review
Message-ID:  <200705170147.l4H1lvgG011350@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=119952

Change 119952 by imp@imp_lighthouse on 2007/05/17 01:47:13

	Add support for the german centipad board.

Affected files ...

.. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#32 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#34 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/centipad_board.c#1 add
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/kb920x_board.c#8 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/tsc_board.c#10 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#16 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#13 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#43 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#17 edit

Differences ...

==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#32 (text+ko) ====

@@ -5,8 +5,8 @@
 
 __at91_boot_Makefile.inc__:
 
-# tsc, bwct, kb920x are the supported flavors
-BOOT_FLAVOR=kb920x
+# tsc, bwct, kb920x, centipad are the supported flavors
+BOOT_FLAVOR=centipad
 
 CFLAGS=-Os -mcpu=arm9 -ffreestanding \
 	-I${.CURDIR}/../libat91 \

==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#34 (text+ko) ====

@@ -142,8 +142,6 @@
     ino_t ino;
 
     board_init();
-    while (sdcard_init() == 0)
-	printf("Looking for SD card\n");
 
     dmadat = (void *)(0x20000000 + (16 << 20));
     /* Process configuration file */

==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/kb920x_board.c#8 (text+ko) ====

@@ -59,8 +59,9 @@
     InitEEPROM();
     MacFromEE();
     EMAC_Init();
-    sdcard_init();
     EMAC_SetMACAddress(mac);
+    while (sdcard_init() == 0)
+	printf("Looking for SD card\n");
 }
 
 int

==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/tsc_board.c#10 (text+ko) ====

@@ -131,9 +131,9 @@
     EEInit();
     MacFromEE();
     EMAC_Init();
-    sdcard_init();
     EMAC_SetMACAddress(mac);
-
+    while (sdcard_init() == 0)
+	printf("Looking for SD card\n");
 }
 
 #include "../bootspi/ee.c"

==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#16 (text) ====

@@ -62,7 +62,7 @@
 	AT91C_BASE_PIOC->PIO_CODR = AT91C_PIO_PC10;
 #endif
 
-#ifdef BOOT_KB920X
+#if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD)
 	AT91C_BASE_PIOC->PIO_PER = AT91C_PIO_PC18 | AT91C_PIO_PC19 |
 	  AT91C_PIO_PC20;
 	AT91C_BASE_PIOC->PIO_OER = AT91C_PIO_PC18 | AT91C_PIO_PC19 |

==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#13 (text) ====

@@ -39,6 +39,14 @@
 #define OSC_MAIN_MULT		90
 #endif
 
+#ifdef BOOT_CENTIPAD
+/* 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
+typedef unsigned short sdram_size_t;
+#define OSC_MAIN_MULT		90
+#endif
+
 #ifdef BOOT_BWCT
 /* The following divisor sets PLLA frequency: e.g. 16/4 * 45 = 180MHz */
 #define OSC_MAIN_FREQ_DIV	4	/* for 16MHz osc */

==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#43 (text+ko) ====

@@ -380,7 +380,7 @@
 static void
 MII_GetLinkSpeed(AT91PS_EMAC pEmac)
 {
-#if defined(BOOT_TSC) | defined(BOOT_KB920X)
+#if defined(BOOT_TSC) || defined(BOOT_KB920X) || defined(BOOT_CENTIPAD)
 	unsigned short stat2; 
 #endif
 	unsigned update;
@@ -394,7 +394,7 @@
 	update |= AT91C_EMAC_SPD;
 	update |= AT91C_EMAC_FD;
 #endif
-#ifdef BOOT_KB920X
+#if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD)
 	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#17 (text+ko) ====

@@ -114,7 +114,7 @@
 /* MII registers definition */
 #define MII_STS_REG	0x01
 #define MII_STS_LINK_STAT	0x04
-#ifdef BOOT_KB920X
+#if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD)
 #define MII_STS2_REG	0x11
 #define MII_STS2_LINK	0x400
 #define MII_STS2_100TX	0x4000



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705170147.l4H1lvgG011350>