From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 13:35:22 2007 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3547716A419 for ; Wed, 8 Aug 2007 13:35:22 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id C52A313C4B7 for ; Wed, 8 Aug 2007 13:35:20 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 492DF343CD for ; Wed, 8 Aug 2007 16:35:16 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 92542-04 for ; Wed, 8 Aug 2007 16:35:14 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 2255E343CB for ; Wed, 8 Aug 2007 16:35:11 +0300 (EEST) Message-ID: <46B9C68E.2010000@bulinfo.net> Date: Wed, 08 Aug 2007 16:35:10 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.5 (X11/20070724) MIME-Version: 1.0 To: freebsd-arm@freebsd.org X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------080708090502050002030100" X-Virus-Scanned: amavisd-new at mx.bulinfo.net Subject: CENTIPAD boot X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 13:35:22 -0000 This is a multi-part message in MIME format. --------------080708090502050002030100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, These patches add support for CENTIPAD board to spi bootloader. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGucaOxJBWvpalMpkRArxXAKCHKEJS2CNPpBCewjCIKPUOJBDQ9ACdE1gW fnvGH+XU2uIqcXhGQfNq/xU= =MBHf -----END PGP SIGNATURE----- --------------080708090502050002030100 Content-Type: text/plain; name="centipad_bootloaders.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="centipad_bootloaders.diff" Index: boot0spi/main.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/boot0spi/main.c,v retrieving revision 1.5 diff -r1.5 main.c 50c50 < printf("Writing %u bytes to flash at %u\n", len, OFFSET); --- > printf("Writing %u bytes to flash at %u\n", len, LOADER_OFFSET); 53c53 < off = i + OFFSET; --- > off = i + LOADER_OFFSET; Index: bootspi/loader_prompt.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/loader_prompt.c,v retrieving revision 1.4 diff -r1.4 loader_prompt.c 32d31 < #include "ee.h" 289,290c288,290 < EEWrite(0, "This is a test", 15); < EERead(0, buf, 15); --- > strcpy(buf,"This is a test!"); > WriteEEPROM(0, buf, 15); > ReadEEPROM(0, buf, 15); Index: bootspi/main.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/main.c,v retrieving revision 1.3 diff -r1.3 main.c 44c44 < #include "ee.h" --- > #include "sd-card.h" 50c50 < EEInit(); --- > InitEEPROM(); 55a56 > sdcard_init(); Index: libat91/Makefile =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v retrieving revision 1.9 diff -r1.9 Makefile 11c11 < SRCS+=ashldi3.c divsi3.c --- > SRCS+=ashldi3.c divsi3.S Index: libat91/arm_init.S =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/arm_init.S,v retrieving revision 1.2 diff -r1.2 arm_init.S 64c64 < #ifdef BOOT_BWCT --- > #if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) Index: libat91/eeprom.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/eeprom.c,v retrieving revision 1.3 diff -r1.3 eeprom.c 36c36,40 < #define TWSI_EEPROM_ADDRESS 0x50 --- > #ifdef BOOT_CENTIPAD > #define TWSI_EEPROM_ADDRESS 0x57 > #else > #define TWSI_EEPROM_ADDRESS 0x50 > #endif Index: libat91/emac.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac.c,v retrieving revision 1.8 diff -r1.8 emac.c 324c324 < TFTP_ACK_Data(tftpHdr->data, --- > TFTP_ACK_Data((char *)tftpHdr->data, 342c342 < AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) --- > AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char phyaddr, unsigned char addr) 344c344 < unsigned value = 0x60020000 | (addr << 18); --- > unsigned value = 0x60020000 | ((phyaddr & 0x1f) << 23) | (addr << 18); 362c362 < AT91F_MII_WritePhy (AT91PS_EMAC pEmac, unsigned char addr, unsigned short s) --- > AT91F_MII_WritePhy (AT91PS_EMAC pEmac, unsigned char phyaddr, unsigned char addr, unsigned short s) 364c364 < unsigned value = 0x50020000 | (addr << 18) | s; --- > unsigned value = 0x50020000 | ((phyaddr & 0x1f) << 23) | (addr << 18) | s; 382a383 > unsigned char phyaddr = 0; 391c392,396 < #ifdef BOOT_BWCT --- > #ifdef BOOT_CENTIPAD > phyaddr = 0x10; > #endif > > #if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) 398c403 < stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); --- > stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS2_REG); 410c415 < stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG); --- > stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS_REG); 421,422c426,427 < AT91F_MII_WritePhy(pEmac, 0x0, 0x8000); < while (AT91F_MII_ReadPhy(pEmac, 0x0) & 0x8000) continue; --- > AT91F_MII_WritePhy(pEmac, phyaddr, 0x0, 0x8000); > while (AT91F_MII_ReadPhy(pEmac, phyaddr, 0x0) & 0x8000) continue; 425c430 < stat2 = AT91F_MII_ReadPhy(pEmac, MII_SPEC_STS_REG); --- > stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_SPEC_STS_REG); Index: libat91/emac_init.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac_init.c,v retrieving revision 1.4 diff -r1.4 emac_init.c 97c97 < #if defined(BOOT_KB920X) | defined(BOOT_BWCT) /* Really !RMII */ --- > #if defined(BOOT_KB920X) | defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) /* Really !RMII */ Index: libat91/spi_flash.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.c,v retrieving revision 1.4 diff -r1.4 spi_flash.c 122c122 < #ifdef BOOT_BWCT --- > #if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) 180c180 < #ifdef BOOT_BWCT --- > #if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) 259c259 < #ifdef BOOT_BWCT --- > #if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) Index: libat91/spi_flash.h =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.h,v retrieving revision 1.2 diff -r1.2 spi_flash.h 43c43 < #ifdef BOOT_BWCT --- > #if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) --------------080708090502050002030100--