From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 12:25:27 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 E3EC616A419 for ; Tue, 7 Aug 2007 12:25:27 +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 3A71D13C45B for ; Tue, 7 Aug 2007 12:25:27 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 037F215A87 for ; Tue, 7 Aug 2007 15:03:20 +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 93912-04 for ; Tue, 7 Aug 2007 15:02:41 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 8DAF3166D7 for ; Tue, 7 Aug 2007 15:02:41 +0300 (EEST) Message-ID: <46B85F61.1050008@bulinfo.net> Date: Tue, 07 Aug 2007 15:02:41 +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: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Subject: Kernel panic on usb disconnect? 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: Tue, 07 Aug 2007 12:25:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This is on at91rm9200 with latest -current On connect: umass0: on uhub0 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s On disconnect: umass0: BBB reset failed, IOERROR umass0: at uhub0 port 1 (addr 2) disconnected vm_fault(0xc022a208, 0, 2, 0) -> 1 Fatal kernel mode data abort: 'Translation Fault (P)' trapframe: 0xc5606ad8 FSR=00000017, FAR=00000000, spsr=60000013 r0 =c088c400, r1 =c088c414, r2 =00000000, r3 =00000000 r4 =c088c400, r5 =c020b508, r6 =00000000, r7 =c088e840 r8 =c091c980, r9 =c091fa00, r10=00000039, r11=c5606b3c r12=c5606b40, ssp=c5606b24, slr=c0006184, pc =c0004b64 [thread pid 28 tid 100025 ] Stopped at xpt_done+0x4c: str r0, [r3] db> bt Tracing pid 28 tid 100025 td 0xc07f0880 db_trace_thread() at db_trace_thread+0x10 scp=0xc0193020 rlv=0xc00134b4 (db_skip_to_eol+0x43c) rsp=0xc56067f0 rfp=0xc5606810 r10=0xc02280f8 r9=0xc02280ec r8=0xc02280fc r7=0x00000000 r6=0x00000010 r5=0x00000000 r4=0xc07f0880 db_skip_to_eol() at db_skip_to_eol+0x3bc scp=0xc0013434 rlv=0xc0013698 (db_command_loop+0xf4) rsp=0xc5606814 rfp=0xc56068c4 r6=0xc5606898 r5=0xc560688c r4=0x00000000 db_command_loop() at db_command_loop+0x10 scp=0xc00135b4 rlv=0xc0015448 (X_db_sym_numargs+0x88) rsp=0xc56068c8 rfp=0xc56069e4 r10=0x00000017 r9=0xc022dda0 r8=0x00000000 r7=0xc5606ad8 r6=0xc022dd98 r5=0x000000c0 r4=0xc56068cc X_db_sym_numargs() at X_db_sym_numargs+0x18 scp=0xc00153d8 rlv=0xc00a3158 (kdb_trap+0xb0) rsp=0xc56069e8 rfp=0xc5606a10 r4=0x000000c0 kdb_trap() at kdb_trap+0x10 scp=0xc00a30b8 rlv=0xc019ee20 (badaddr_read+0x1f4) rsp=0xc5606a14 rfp=0xc5606a30 r10=0xc5606ad8 r9=0xc5606ef8 r8=0x00000002 r7=0xc07f0880 r6=0x00000000 r5=0x00000017 r4=0xc5606ad8 badaddr_read() at badaddr_read+0xe8 scp=0xc019ed14 rlv=0xc019f710 (data_abort_handler+0x494) rsp=0xc5606a34 rfp=0xc5606ad4 r6=0x00000000 r5=0x00000000 r4=0xc087c094 data_abort_handler() at data_abort_handler+0x10 scp=0xc019f28c rlv=0xc0194e88 (address_exception_entry+0x50) rsp=0xc5606ad8 rfp=0xc5606b3c r10=0x00000039 r9=0xc091fa00 r8=0xc091c980 r7=0xc088e840 r6=0x00000000 r5=0xe0000004 r4=0xc088c400 xpt_done() at xpt_done+0x10 scp=0xc0004b28 rlv=0xc0006184 (xpt_action+0x8d0) rsp=0xc5606b40 rfp=0xc5606b60 r6=0x00000005 r5=0xc088c400 r4=0xc088e840 xpt_action() at xpt_action+0x10 scp=0xc00058c4 rlv=0xc00098c4 (xpt_schedule+0x100) rsp=0xc5606b64 rfp=0xc5606b7c r8=0xc091c980 r7=0xc088e840 r6=0x00000005 r5=0xc091c980 r4=0xc088c400 xpt_schedule() at xpt_schedule+0x10 scp=0xc00097d4 rlv=0xc0009ce8 (xpt_schedule+0x524) rsp=0xc5606b80 rfp=0xc5606cb0 r6=0xc088bc00 r5=0xc084a800 r4=0x00000001 xpt_schedule() at xpt_schedule+0x208 scp=0xc00099cc rlv=0xc00066a8 (xpt_action+0xdf4) rsp=0xc5606cb4 rfp=0xc5606d48 r10=0xc089a894 r9=0xc5606d50 r8=0xc091ca94 r7=0x00000004 r6=0xc088fc00 r5=0xc084a800 r4=0xc091ca94 xpt_action() at xpt_action+0xc64 scp=0xc0006518 rlv=0xc000a74c (xpt_bus_deregister+0x164) rsp=0xc5606d4c rfp=0xc5606d88 r10=0xc089a894 r8=0xc089a880 r7=0x00000004 r6=0xc091ca80 r5=0xc091c580 r4=0xc091ca94 xpt_bus_deregister() at xpt_bus_deregister+0x10 scp=0xc000a5f8 rlv=0xc0032324 (ugenioctl+0x19a0) rsp=0xc5606d8c rfp=0xc5606d9c r10=0xc087baa0 r9=0xc0229a4c r8=0xc08705b0 r7=0x00000004 r6=0xc07e6c00 r5=0xc091c580 r4=0xc07e6c00 ugenioctl() at ugenioctl+0x198c scp=0xc0032310 rlv=0xc0032434 (ugenioctl+0x1ab0) rsp=0xc5606da0 rfp=0xc5606dbc r4=0xc089aa00 ugenioctl() at ugenioctl+0x19d8 scp=0xc003235c rlv=0xc009e02c (device_detach+0x74) rsp=0xc5606dc0 rfp=0xc5606de0 r7=0x00000004 r6=0x00000000 r5=0xc091c580 r4=0xc089aa00 device_detach() at device_detach+0x10 scp=0xc009dfc8 rlv=0xc0039384 (usb_disconnect_port+0x90) rsp=0xc5606de4 rfp=0xc5606e08 r7=0x00000004 r6=0x00000000 r5=0xc086f900 r4=0xc089aa00 usb_disconnect_port() at usb_disconnect_port+0x10 scp=0xc0039304 rlv=0xc0031f68 (ugenioctl+0x15e4) rsp=0xc5606e0c rfp=0xc5606e44 r10=0x00000014 r8=0x00000100 r7=0x00000001 r6=0xc0870800 r5=0xc08705b0 r4=0x00000003 ugenioctl() at ugenioctl+0x14c8 scp=0xc0031e4c rlv=0xc00373a0 (usb_schedsoftintr+0xb0) rsp=0xc5606e48 rfp=0xc5606e58 r10=0xc0037c2c r9=0x00000000 r8=0xc022df3c r7=0xc0229a70 r6=0xc0877840 r5=0x00000000 r4=0xc0877840 usb_schedsoftintr() at usb_schedsoftintr+0x54 scp=0xc0037344 rlv=0xc0037d48 (usb_needs_explore+0x930) rsp=0xc5606e5c rfp=0xc5606e80 r4=0xc0229a74 usb_needs_explore() at usb_needs_explore+0x824 scp=0xc0037c3c rlv=0xc0068a60 (fork_exit+0x64) rsp=0xc5606e84 rfp=0xc5606ea8 r8=0xc0877840 r7=0xc087c000 r6=0xc5606eac r5=0xc023d190 r4=0xc07f0880 fork_exit() at fork_exit+0x10 scp=0xc0068a0c rlv=0xc019eafc (fork_trampoline+0x14) rsp=0xc5606eac rfp=0x00000000 r10=0x00000000 r8=0x00000000 r7=0xc019eafc r6=0xc5606eac r5=0xc0877840 r4=0xc0037c2c db> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGuF9gxJBWvpalMpkRAsOQAKCtZ2L2Pv/T7XzSDVIQz1BCEhCbxACeL/Ja k9PpiRXGx7k1KcgW8NP0Kc0= =c/ki -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 13:01:55 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 44C6A16A417 for ; Tue, 7 Aug 2007 13:01:55 +0000 (UTC) (envelope-from xpahos@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.189]) by mx1.freebsd.org (Postfix) with ESMTP id 21F2813C4A8 for ; Tue, 7 Aug 2007 13:01:54 +0000 (UTC) (envelope-from xpahos@gmail.com) Received: by rv-out-0910.google.com with SMTP id f1so1168308rvb for ; Tue, 07 Aug 2007 06:01:54 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=AbadocE7mFuWK7a8X9K1RE1prIzcTbrhr0jE//QdYf3rupEYjpJ7PTzcNAzDihH3AmXaYSu5Ggd7p+yoDt1rINGiPZFNRDgmJcNMq4YcpmL/5OyJ7/nviwe1cod+UUFkyIdoHEWV5G9ptVrOPqDzkHURtDJDcmMkqGOrIRnfeSg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=G7vYufwWcOMJ6OO/Yzeus8IYzqJaH5q18hHy9nkWlSIPAyfVMTWR9h6RXIxIn3/3y/F4DwFE5I077XRzo2DpKnznyThtJFrxzW1a9pvGGftNyv2Zlz4QuCOjvc1dHy3+4uK6OBEzfduVD/0Rn6RkfWEFMG+DEBQm6Fxvh1WtXYE= Received: by 10.114.209.1 with SMTP id h1mr6710826wag.1186490161080; Tue, 07 Aug 2007 05:36:01 -0700 (PDT) Received: by 10.114.154.15 with HTTP; Tue, 7 Aug 2007 05:36:00 -0700 (PDT) Message-ID: <789c35740708070536s716991fbx59f939e8ca08d5b7@mail.gmail.com> Date: Tue, 7 Aug 2007 16:36:00 +0400 From: "Gryanko Alexandr" To: freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Intel PXA270 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: Tue, 07 Aug 2007 13:01:55 -0000 Hello. I've got HP HW6515 with Intel XScale PXA270 processor. Can FreeBSD works on it ? From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 13:04:42 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 7894516A46C for ; Tue, 7 Aug 2007 13:04:42 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 0C38613C468 for ; Tue, 7 Aug 2007 13:04:41 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l77D4cMI057294; Tue, 7 Aug 2007 15:04:38 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l77D4Ul4024035 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Aug 2007 15:04:31 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l77D4UOr051409; Tue, 7 Aug 2007 15:04:30 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l77D4U9n051408; Tue, 7 Aug 2007 15:04:30 +0200 (CEST) (envelope-from ticso) Date: Tue, 7 Aug 2007 15:04:30 +0200 From: Bernd Walter To: Krassimir Slavchev Message-ID: <20070807130429.GB41893@cicely12.cicely.de> References: <46B85F61.1050008@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B85F61.1050008@bulinfo.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: Kernel panic on usb disconnect? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2007 13:04:42 -0000 On Tue, Aug 07, 2007 at 03:02:41PM +0300, Krassimir Slavchev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This is on at91rm9200 with latest -current > > On connect: > > umass0: on uhub0 > umass0: SCSI over Bulk-Only; quirks = 0x0000 > umass0:0:0:-1: Attached to scbus0 > Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s > > On disconnect: > > umass0: BBB reset failed, IOERROR > umass0: at uhub0 port 1 (addr 2) disconnected This problem is not arm specific. You have to unmount umass devices befor you can disconnect them. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 13:18:41 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 C315016A420 for ; Tue, 7 Aug 2007 13:18:41 +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 8313A13C481 for ; Tue, 7 Aug 2007 13:18:41 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 4236316848; Tue, 7 Aug 2007 16:18:36 +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 99498-04; Tue, 7 Aug 2007 16:18:33 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 58E5E16837; Tue, 7 Aug 2007 16:18:33 +0300 (EEST) Message-ID: <46B87129.1060800@bulinfo.net> Date: Tue, 07 Aug 2007 16:18:33 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.5 (X11/20070724) MIME-Version: 1.0 To: ticso@cicely.de References: <46B85F61.1050008@bulinfo.net> <20070807130429.GB41893@cicely12.cicely.de> In-Reply-To: <20070807130429.GB41893@cicely12.cicely.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: Kernel panic on usb disconnect? 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: Tue, 07 Aug 2007 13:18:41 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bernd Walter wrote: > On Tue, Aug 07, 2007 at 03:02:41PM +0300, Krassimir Slavchev wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> This is on at91rm9200 with latest -current >> >> On connect: >> >> umass0: on uhub0 >> umass0: SCSI over Bulk-Only; quirks = 0x0000 >> umass0:0:0:-1: Attached to scbus0 >> Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s >> >> On disconnect: >> >> umass0: BBB reset failed, IOERROR >> umass0: at uhub0 port 1 (addr 2) disconnected > > This problem is not arm specific. > You have to unmount umass devices befor you can disconnect them. > Yes, I know, the device is not mounted. Unfortunately I can't reproduce this on i386. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGuHEoxJBWvpalMpkRArlvAKCHLlJOye93lrD06c7cxFdac3RIEwCfee88 cY02D4SJ3TLqVPwdasbXpWg= =/Ydn -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 14:16:27 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 4AC4416A41A for ; Tue, 7 Aug 2007 14:16:27 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0AAF013C442 for ; Tue, 7 Aug 2007 14:16:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l77EEG0K048552; Tue, 7 Aug 2007 08:14:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 07 Aug 2007 08:14:27 -0600 (MDT) Message-Id: <20070807.081427.84362992.imp@bsdimp.com> To: krassi@bulinfo.net From: "M. Warner Losh" In-Reply-To: <46B87129.1060800@bulinfo.net> References: <46B85F61.1050008@bulinfo.net> <20070807130429.GB41893@cicely12.cicely.de> <46B87129.1060800@bulinfo.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 07 Aug 2007 08:14:16 -0600 (MDT) Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: Kernel panic on usb disconnect? 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: Tue, 07 Aug 2007 14:16:27 -0000 In message: <46B87129.1060800@bulinfo.net> Krassimir Slavchev writes: : -----BEGIN PGP SIGNED MESSAGE----- : Hash: SHA1 : : Bernd Walter wrote: : > On Tue, Aug 07, 2007 at 03:02:41PM +0300, Krassimir Slavchev wrote: : >> -----BEGIN PGP SIGNED MESSAGE----- : >> Hash: SHA1 : >> : >> This is on at91rm9200 with latest -current : >> : >> On connect: : >> : >> umass0: on uhub0 : >> umass0: SCSI over Bulk-Only; quirks = 0x0000 : >> umass0:0:0:-1: Attached to scbus0 : >> Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s : >> : >> On disconnect: : >> : >> umass0: BBB reset failed, IOERROR : >> umass0: at uhub0 port 1 (addr 2) disconnected : > : > This problem is not arm specific. : > You have to unmount umass devices befor you can disconnect them. : > : : Yes, I know, the device is not mounted. Unfortunately I can't reproduce : this on i386. I've pulled usb tumbdrives on arm a few times and haven't seen this. How do you recreate it? Warner From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 14:45:35 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 DA18F16A417 for ; Tue, 7 Aug 2007 14:45:35 +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 7E21313C467 for ; Tue, 7 Aug 2007 14:45:35 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 6C8941E395; Tue, 7 Aug 2007 17:45:33 +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 05967-10; Tue, 7 Aug 2007 17:45:32 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 769091E38F; Tue, 7 Aug 2007 17:45:32 +0300 (EEST) Message-ID: <46B8858B.3050401@bulinfo.net> Date: Tue, 07 Aug 2007 17:45:31 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.5 (X11/20070724) MIME-Version: 1.0 To: "M. Warner Losh" References: <46B85F61.1050008@bulinfo.net> <20070807130429.GB41893@cicely12.cicely.de> <46B87129.1060800@bulinfo.net> <20070807.081427.84362992.imp@bsdimp.com> In-Reply-To: <20070807.081427.84362992.imp@bsdimp.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: Kernel panic on usb disconnect? 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: Tue, 07 Aug 2007 14:45:35 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 M. Warner Losh wrote: > In message: <46B87129.1060800@bulinfo.net> > Krassimir Slavchev writes: > : -----BEGIN PGP SIGNED MESSAGE----- > : Hash: SHA1 > : > : Bernd Walter wrote: > : > On Tue, Aug 07, 2007 at 03:02:41PM +0300, Krassimir Slavchev wrote: > : >> -----BEGIN PGP SIGNED MESSAGE----- > : >> Hash: SHA1 > : >> > : >> This is on at91rm9200 with latest -current > : >> > : >> On connect: > : >> > : >> umass0: on uhub0 > : >> umass0: SCSI over Bulk-Only; quirks = 0x0000 > : >> umass0:0:0:-1: Attached to scbus0 > : >> Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s > : >> > : >> On disconnect: > : >> > : >> umass0: BBB reset failed, IOERROR > : >> umass0: at uhub0 port 1 (addr 2) disconnected > : > > : > This problem is not arm specific. > : > You have to unmount umass devices befor you can disconnect them. > : > > : > : Yes, I know, the device is not mounted. Unfortunately I can't reproduce > : this on i386. > > I've pulled usb tumbdrives on arm a few times and haven't seen this. > How do you recreate it? > > Warner > This happens only with one of my memory sticks. I am not sure what is wrong with it. It works under 6.2: umass0: Corsair Flash Voyager, rev 2.00/11.00, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 967MB (1981440 512 byte sectors: 64H 32S/T 967C) umass0: at uhub3 port 2 (addr 2) disconnected (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry umass0: detached Also, when the kernel boots the usb devices are not detected: uhub0: 2 ports with 2 removable, self powered usbd_get_config_desc: confidx=0, bad desc len=9 type=32 uhub_explore: usb_new_device failed, error=INVAL uhub0: device problem (INVAL), disabling port 1 I am not sure whether this is a hardware problem of my board or something wrong with the bootloader (may be something remains uninitialized). With another memory stick: umass0: on uhub0 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 952MB (1950720 512 byte sectors: 64H 32S/T 952C) umass0: at uhub0 port 1 (addr 2) disconnected (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry umass0: detached Now I can read the raw device but can't mount anything: mount -t msdosfs /dev/da0s1 /mnt/ mount_msdosfs: /dev/da0s1: : Operation not supported by device 'fsck -t msdosfs /dev/da0s1' always reports errors. It looks like communication error. Any ideas? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGuIWLxJBWvpalMpkRAunQAJ0eNoUtv6j3UE/bYDA0s3fa2nEBnACgsS04 3km0HcIZFVAtjrMkWL5YyV0= =RCEb -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 14:52:50 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 24B5B16A41A for ; Tue, 7 Aug 2007 14:52:50 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 9966313C457 for ; Tue, 7 Aug 2007 14:52:49 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l77Eqk6l060331; Tue, 7 Aug 2007 16:52:46 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l77EqfFr024980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Aug 2007 16:52:42 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l77EqfS4051631; Tue, 7 Aug 2007 16:52:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l77EqfgH051630; Tue, 7 Aug 2007 16:52:41 +0200 (CEST) (envelope-from ticso) Date: Tue, 7 Aug 2007 16:52:41 +0200 From: Bernd Walter To: Krassimir Slavchev Message-ID: <20070807145240.GC41893@cicely12.cicely.de> References: <46B85F61.1050008@bulinfo.net> <20070807130429.GB41893@cicely12.cicely.de> <46B87129.1060800@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B87129.1060800@bulinfo.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: Kernel panic on usb disconnect? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2007 14:52:50 -0000 On Tue, Aug 07, 2007 at 04:18:33PM +0300, Krassimir Slavchev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Bernd Walter wrote: > > On Tue, Aug 07, 2007 at 03:02:41PM +0300, Krassimir Slavchev wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> This is on at91rm9200 with latest -current > >> > >> On connect: > >> > >> umass0: on uhub0 > >> umass0: SCSI over Bulk-Only; quirks = 0x0000 > >> umass0:0:0:-1: Attached to scbus0 > >> Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s > >> > >> On disconnect: > >> > >> umass0: BBB reset failed, IOERROR > >> umass0: at uhub0 port 1 (addr 2) disconnected > > > > This problem is not arm specific. > > You have to unmount umass devices befor you can disconnect them. > > > > Yes, I know, the device is not mounted. Unfortunately I can't reproduce > this on i386. My fault - I saw the XPT and assumed it was still mounted. But is it Ok that badaddr_read panics? I though it is there to tamper with possible dangerous addresses. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 14:58:50 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 EB42316A417 for ; Tue, 7 Aug 2007 14:58:50 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3494B13C442 for ; Tue, 7 Aug 2007 14:58:49 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l77FRUTc060177; Tue, 7 Aug 2007 17:27:30 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l77FRT0k060176; Tue, 7 Aug 2007 17:27:29 +0200 (CEST) (envelope-from mlfbsd) Date: Tue, 7 Aug 2007 17:27:29 +0200 From: Olivier Houchard To: ticso@cicely.de Message-ID: <20070807152729.GA60139@ci0.org> References: <46B85F61.1050008@bulinfo.net> <20070807130429.GB41893@cicely12.cicely.de> <46B87129.1060800@bulinfo.net> <20070807145240.GC41893@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070807145240.GC41893@cicely12.cicely.de> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: Re: Kernel panic on usb disconnect? 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: Tue, 07 Aug 2007 14:58:51 -0000 On Tue, Aug 07, 2007 at 04:52:41PM +0200, Bernd Walter wrote: > On Tue, Aug 07, 2007 at 04:18:33PM +0300, Krassimir Slavchev wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Bernd Walter wrote: > > > On Tue, Aug 07, 2007 at 03:02:41PM +0300, Krassimir Slavchev wrote: > > >> -----BEGIN PGP SIGNED MESSAGE----- > > >> Hash: SHA1 > > >> > > >> This is on at91rm9200 with latest -current > > >> > > >> On connect: > > >> > > >> umass0: on uhub0 > > >> umass0: SCSI over Bulk-Only; quirks = 0x0000 > > >> umass0:0:0:-1: Attached to scbus0 > > >> Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s > > >> > > >> On disconnect: > > >> > > >> umass0: BBB reset failed, IOERROR > > >> umass0: at uhub0 port 1 (addr 2) disconnected > > > > > > This problem is not arm specific. > > > You have to unmount umass devices befor you can disconnect them. > > > > > > > Yes, I know, the device is not mounted. Unfortunately I can't reproduce > > this on i386. > > My fault - I saw the XPT and assumed it was still mounted. > But is it Ok that badaddr_read panics? > I though it is there to tamper with possible dangerous addresses. > Actually the backtrace is not accurate, because the symbol table isn't loaded. You can still use gdb to know what badaddr_read+0x1f4 really is. Also, you'll note the badaddr_read call happens after the trap occurs (data_abort_handler). Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 15:01:42 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 CBF6016A41B for ; Tue, 7 Aug 2007 15:01:42 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 0E90F13C465 for ; Tue, 7 Aug 2007 15:01:41 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l77FUXlL060220; Tue, 7 Aug 2007 17:30:33 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l77FUXPV060219; Tue, 7 Aug 2007 17:30:33 +0200 (CEST) (envelope-from mlfbsd) Date: Tue, 7 Aug 2007 17:30:33 +0200 From: Olivier Houchard To: Gryanko Alexandr Message-ID: <20070807153033.GA60186@ci0.org> References: <789c35740708070536s716991fbx59f939e8ca08d5b7@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <789c35740708070536s716991fbx59f939e8ca08d5b7@mail.gmail.com> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: Re: Intel PXA270 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: Tue, 07 Aug 2007 15:01:42 -0000 On Tue, Aug 07, 2007 at 04:36:00PM +0400, Gryanko Alexandr wrote: > Hello. > > I've got HP HW6515 with Intel XScale PXA270 processor. Can FreeBSD works on it ? Hi, No we do not have PXA270 support yet. PXA255 support is underway, and getting PXA270 to work should be easy. However, getting an iPaq to work will require additional drivers. Regards, Olivier From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 15:45:04 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 5AEDD16A420 for ; Tue, 7 Aug 2007 15:45:04 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id CEAE813C461 for ; Tue, 7 Aug 2007 15:45:03 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l77Fj1kT061644; Tue, 7 Aug 2007 17:45:01 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l77Fitgl025428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Aug 2007 17:44:56 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l77Fitcb051759; Tue, 7 Aug 2007 17:44:55 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l77FitOB051758; Tue, 7 Aug 2007 17:44:55 +0200 (CEST) (envelope-from ticso) Date: Tue, 7 Aug 2007 17:44:55 +0200 From: Bernd Walter To: Olivier Houchard Message-ID: <20070807154454.GD41893@cicely12.cicely.de> References: <46B85F61.1050008@bulinfo.net> <20070807130429.GB41893@cicely12.cicely.de> <46B87129.1060800@bulinfo.net> <20070807145240.GC41893@cicely12.cicely.de> <20070807152729.GA60139@ci0.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070807152729.GA60139@ci0.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: Kernel panic on usb disconnect? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2007 15:45:04 -0000 On Tue, Aug 07, 2007 at 05:27:29PM +0200, Olivier Houchard wrote: > On Tue, Aug 07, 2007 at 04:52:41PM +0200, Bernd Walter wrote: > > On Tue, Aug 07, 2007 at 04:18:33PM +0300, Krassimir Slavchev wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > Bernd Walter wrote: > > > > On Tue, Aug 07, 2007 at 03:02:41PM +0300, Krassimir Slavchev wrote: > > > >> -----BEGIN PGP SIGNED MESSAGE----- > > > >> Hash: SHA1 > > > >> > > > >> This is on at91rm9200 with latest -current > > > >> > > > >> On connect: > > > >> > > > >> umass0: on uhub0 > > > >> umass0: SCSI over Bulk-Only; quirks = 0x0000 > > > >> umass0:0:0:-1: Attached to scbus0 > > > >> Expensive timeout(9) function: 0xc00357f0(0xc07e6c00) 0.002746582 s > > > >> > > > >> On disconnect: > > > >> > > > >> umass0: BBB reset failed, IOERROR > > > >> umass0: at uhub0 port 1 (addr 2) disconnected > > > > > > > > This problem is not arm specific. > > > > You have to unmount umass devices befor you can disconnect them. > > > > > > > > > > Yes, I know, the device is not mounted. Unfortunately I can't reproduce > > > this on i386. > > > > My fault - I saw the XPT and assumed it was still mounted. > > But is it Ok that badaddr_read panics? > > I though it is there to tamper with possible dangerous addresses. > > > > Actually the backtrace is not accurate, because the symbol table isn't loaded. > You can still use gdb to know what badaddr_read+0x1f4 really is. Also, you'll > note the badaddr_read call happens after the trap occurs (data_abort_handler). Ups - that's the second time I'd read the panic wrong. I should continue working after the first ETOSLEEPY... -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 16:04:07 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 DD21F16A41A for ; Tue, 7 Aug 2007 16:04:07 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 76FA713C461 for ; Tue, 7 Aug 2007 16:04:07 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so97380uge for ; Tue, 07 Aug 2007 09:04:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YJgBPZlOb5BGFYzAsXHWYwwNIkB9T0CEm32tng/p/BsWTwVDGMqu2YPJJtHdj45rsNmGKaHiHcwn2YY0LU112NJz0qXhOuHPZuNHrcvb4x/yeC3FiOfu4UnI2GmaXQoWXbWc7MVHwymmcIvEmE7GxEwtu4gHgnEZneC311E22hA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=O3Dfb69/Ne9+4Xm8eRpd+8GgWe/Qr9wRN/xh8LaNDRtiAv+v2E+fZZkcte+8TVTzgG4Ul/DyaF93s8xHH7iESvzlfVa6oKNL4OfHUbKlQbaBWDVc8LDouTXLE7zZR9LeH8I+Mjtx/lGjv4MmPV4EDW1sqQ9mlylSJbxLAsx9Des= Received: by 10.78.184.2 with SMTP id h2mr1827356huf.1186500962609; Tue, 07 Aug 2007 08:36:02 -0700 (PDT) Received: by 10.78.160.17 with HTTP; Tue, 7 Aug 2007 08:36:02 -0700 (PDT) Message-ID: Date: Tue, 7 Aug 2007 19:36:02 +0400 From: "Michael Zhilin" To: "Olivier Houchard" In-Reply-To: <20070807153033.GA60186@ci0.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <789c35740708070536s716991fbx59f939e8ca08d5b7@mail.gmail.com> <20070807153033.GA60186@ci0.org> Cc: freebsd-arm@freebsd.org Subject: Re: Intel PXA270 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: Tue, 07 Aug 2007 16:04:07 -0000 Thanks you, Olivier! But can we help for porting anyhow?! I've got Palm LD with same processor. On 8/7/07, Olivier Houchard wrote: > On Tue, Aug 07, 2007 at 04:36:00PM +0400, Gryanko Alexandr wrote: > > Hello. > > > > I've got HP HW6515 with Intel XScale PXA270 processor. Can FreeBSD works on it ? > > > Hi, > > No we do not have PXA270 support yet. PXA255 support is underway, and getting > PXA270 to work should be easy. However, getting an iPaq to work will require > additional drivers. > > Regards, > > Olivier > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > From owner-freebsd-arm@FreeBSD.ORG Tue Aug 7 16:13:15 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 DC7AE16A418 for ; Tue, 7 Aug 2007 16:13:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9E03213C442 for ; Tue, 7 Aug 2007 16:13:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l77GAil1049532; Tue, 7 Aug 2007 10:10:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 07 Aug 2007 10:10:53 -0600 (MDT) Message-Id: <20070807.101053.1649769051.imp@bsdimp.com> To: mizhka@gmail.com From: "M. Warner Losh" In-Reply-To: References: <789c35740708070536s716991fbx59f939e8ca08d5b7@mail.gmail.com> <20070807153033.GA60186@ci0.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 07 Aug 2007 10:10:45 -0600 (MDT) Cc: freebsd-arm@freebsd.org Subject: Re: Intel PXA270 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: Tue, 07 Aug 2007 16:13:15 -0000 In message: "Michael Zhilin" writes: : Thanks you, Olivier! : : But can we help for porting anyhow?! I've got Palm LD with same processor. Of course you can help! The more the marrier! There's also some work to get QEMU to support these devices, which may make the porting easier. I've been totally snowed under at work or I'd be playing with it already... Warner : On 8/7/07, Olivier Houchard wrote: : > On Tue, Aug 07, 2007 at 04:36:00PM +0400, Gryanko Alexandr wrote: : > > Hello. : > > : > > I've got HP HW6515 with Intel XScale PXA270 processor. Can FreeBSD works on it ? : > : > : > Hi, : > : > No we do not have PXA270 support yet. PXA255 support is underway, and getting : > PXA270 to work should be easy. However, getting an iPaq to work will require : > additional drivers. : > : > Regards, : > : > Olivier : > : > _______________________________________________ : > freebsd-arm@freebsd.org mailing list : > http://lists.freebsd.org/mailman/listinfo/freebsd-arm : > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" : > : _______________________________________________ : freebsd-arm@freebsd.org mailing list : http://lists.freebsd.org/mailman/listinfo/freebsd-arm : To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" : : From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 07:30:00 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 5BFDD16A417 for ; Wed, 8 Aug 2007 07:30:00 +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 0B98E13C428 for ; Wed, 8 Aug 2007 07:29:56 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 8C52A20D26 for ; Wed, 8 Aug 2007 10:29:52 +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 61283-05 for ; Wed, 8 Aug 2007 10:29:49 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 97BBE20D24 for ; Wed, 8 Aug 2007 10:29:49 +0300 (EEST) Message-ID: <46B970EB.3090204@bulinfo.net> Date: Wed, 08 Aug 2007 10:29:47 +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: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Subject: arm buildkernel error 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 07:30:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 With src/sys/arm/arm/swtch.S revision 1.20: cc -c -x assembler-with-cpp -DLOCORE -O2 -pipe -fno-strict-aliasing - -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes - -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef - -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I../../.. - -I../../../contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mcpu=arm9 - -ffreestanding ../../../arm/arm/swtch.S ../../../arm/arm/swtch.S: Assembler messages: ../../../arm/arm/swtch.S:396: Error: internal_relocation (type: OFFSET_IMM) not fixed up ../../../arm/arm/swtch.S:402: Error: internal_relocation (type: OFFSET_IMM) not fixed up *** Error code 1 reverting to 1.19 fixes this -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGuXDrxJBWvpalMpkRAtqkAJ4/8RAucPxeG/q3Go+Niudfs4JZzACglPJM Wh6XtorkFQNvyOHLqRzuy74= =oYMV -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 09:28:34 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 B87CB16A418 for ; Wed, 8 Aug 2007 09:28:34 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 01C0913C4B4 for ; Wed, 8 Aug 2007 09:28:33 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l789vR4S073946; Wed, 8 Aug 2007 11:57:27 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l789vQqq073945; Wed, 8 Aug 2007 11:57:26 +0200 (CEST) (envelope-from mlfbsd) Date: Wed, 8 Aug 2007 11:57:26 +0200 From: Olivier Houchard To: Krassimir Slavchev Message-ID: <20070808095726.GA73911@ci0.org> References: <46B970EB.3090204@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B970EB.3090204@bulinfo.net> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: Re: arm buildkernel error 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 09:28:34 -0000 On Wed, Aug 08, 2007 at 10:29:47AM +0300, Krassimir Slavchev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > With src/sys/arm/arm/swtch.S revision 1.20: > > cc -c -x assembler-with-cpp -DLOCORE -O2 -pipe -fno-strict-aliasing > - -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > - -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > - -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I../../.. > - -I../../../contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include > opt_global.h -fno-common -finline-limit=8000 --param > inline-unit-growth=100 --param large-function-growth=1000 -mcpu=arm9 > - -ffreestanding ../../../arm/arm/swtch.S > ../../../arm/arm/swtch.S: Assembler messages: > ../../../arm/arm/swtch.S:396: Error: internal_relocation (type: > OFFSET_IMM) not fixed up > ../../../arm/arm/swtch.S:402: Error: internal_relocation (type: > OFFSET_IMM) not fixed up > *** Error code 1 > > reverting to 1.19 fixes this Oops that's my fault sorry, I forgot to commit the bits in genassym.c It should be fixed now. Regards, Olivier 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-- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 13:43:27 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 2426216A41A for ; Wed, 8 Aug 2007 13:43:27 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BD84113C461 for ; Wed, 8 Aug 2007 13:43:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l78DeGtn063383; Wed, 8 Aug 2007 07:40:17 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 08 Aug 2007 07:40:28 -0600 (MDT) Message-Id: <20070808.074028.-749249084.imp@bsdimp.com> To: krassi@bulinfo.net From: "M. Warner Losh" In-Reply-To: <46B9C68E.2010000@bulinfo.net> References: <46B9C68E.2010000@bulinfo.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 08 Aug 2007 07:40:17 -0600 (MDT) Cc: freebsd-arm@freebsd.org Subject: Re: 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:43:27 -0000 can you resend them as a unified diff? Warner From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 13:53:38 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 D948D16A417 for ; Wed, 8 Aug 2007 13:53:38 +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 5BA9E13C442 for ; Wed, 8 Aug 2007 13:53:33 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id B70A83442B; Wed, 8 Aug 2007 16:53:31 +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 93565-08; Wed, 8 Aug 2007 16:53:28 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 99AC634405; Wed, 8 Aug 2007 16:53:28 +0300 (EEST) Message-ID: <46B9CAD8.4040103@bulinfo.net> Date: Wed, 08 Aug 2007 16:53:28 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.5 (X11/20070724) MIME-Version: 1.0 To: "M. Warner Losh" References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> In-Reply-To: <20070808.074028.-749249084.imp@bsdimp.com> X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------020401030906010503010909" X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: 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:53:38 -0000 This is a multi-part message in MIME format. --------------020401030906010503010909 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yes M. Warner Losh wrote: > can you resend them as a unified diff? > > Warner > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGucrYxJBWvpalMpkRAj4oAJwOYAKhGu2P20acoOPgrkEQSjyETwCgnvjq DNWbeBl9Wlk2oIVy6bwUJdY= =sEQp -----END PGP SIGNATURE----- --------------020401030906010503010909 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 -u -r1.5 main.c --- boot0spi/main.c 20 Dec 2006 17:50:02 -0000 1.5 +++ boot0spi/main.c 8 Aug 2007 13:49:19 -0000 @@ -47,10 +47,10 @@ continue; // Need extra copy at addr3 memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); - printf("Writing %u bytes to flash at %u\n", len, OFFSET); + printf("Writing %u bytes to flash at %u\n", len, LOADER_OFFSET); for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { for (j = 0; j < 10; j++) { - off = i + OFFSET; + off = i + LOADER_OFFSET; SPI_WriteFlash(off, addr + i, FLASH_PAGE_SIZE); SPI_ReadFlash(off, addr2 + i, FLASH_PAGE_SIZE); if (p_memcmp(addr3 + i, addr2 + i, FLASH_PAGE_SIZE) == 0) Index: bootspi/loader_prompt.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/loader_prompt.c,v retrieving revision 1.4 diff -u -r1.4 loader_prompt.c --- bootspi/loader_prompt.c 15 Mar 2007 03:31:48 -0000 1.4 +++ bootspi/loader_prompt.c 8 Aug 2007 13:49:21 -0000 @@ -29,7 +29,6 @@ #include "env_vars.h" #include "lib.h" #include "spi_flash.h" -#include "ee.h" /******************************* GLOBALS *************************************/ @@ -286,8 +285,9 @@ { char buf[25]; printf("Testing Config EEPROM\n"); - 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); printf("Found '%s'\n", buf); break; } Index: bootspi/main.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/main.c,v retrieving revision 1.3 diff -u -r1.3 main.c --- bootspi/main.c 21 Oct 2006 22:44:26 -0000 1.3 +++ bootspi/main.c 8 Aug 2007 13:49:21 -0000 @@ -41,18 +41,19 @@ #include "emac.h" #include "lib.h" #include "spi_flash.h" -#include "ee.h" +#include "sd-card.h" int main(void) { printf("\nBoot\n"); - EEInit(); + InitEEPROM(); SPI_InitFlash(); #ifdef TSC_FPGA fpga_load(); #endif EMAC_Init(); + sdcard_init(); LoadBootCommands(); if (getc(1) == -1) { start_wdog(30); Index: libat91/Makefile =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- libat91/Makefile 13 Jul 2007 14:27:04 -0000 1.9 +++ libat91/Makefile 8 Aug 2007 13:49:22 -0000 @@ -8,7 +8,7 @@ putchar.c printf.c reset.c spi_flash.c xmodem.c \ sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ memset.c memcmp.c -SRCS+=ashldi3.c divsi3.c +SRCS+=ashldi3.c divsi3.S NO_MAN= .if ${MK_TAG_LIST} != "no" Index: libat91/arm_init.S =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/arm_init.S,v retrieving revision 1.2 diff -u -r1.2 arm_init.S --- libat91/arm_init.S 20 Dec 2006 18:16:49 -0000 1.2 +++ libat91/arm_init.S 8 Aug 2007 13:49:22 -0000 @@ -61,7 +61,7 @@ #ifdef BOOT_IIC .long (TWI_EEPROM_SIZE >> 9) #else -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) .long ((528 << 17) | (13 << 13) | (12 * 2)) #else .long ((1056 << 17) | (13 << 13) | (12 * 2)) Index: libat91/eeprom.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/eeprom.c,v retrieving revision 1.3 diff -u -r1.3 eeprom.c --- libat91/eeprom.c 20 Dec 2006 18:19:52 -0000 1.3 +++ libat91/eeprom.c 8 Aug 2007 13:49:23 -0000 @@ -33,7 +33,11 @@ /* Use a macro to calculate the TWI clock generator value to save code space. */ #define AT91C_TWSI_CLOCK 100000 -#define TWSI_EEPROM_ADDRESS 0x50 +#ifdef BOOT_CENTIPAD +#define TWSI_EEPROM_ADDRESS 0x57 +#else +#define TWSI_EEPROM_ADDRESS 0x50 +#endif #define TWI_CLK_BASE_DIV ((AT91C_MASTER_CLOCK/(4*AT91C_TWSI_CLOCK)) - 2) #define SET_TWI_CLOCK ((0x00010000) | (TWI_CLK_BASE_DIV) | (TWI_CLK_BASE_DIV << 8)) Index: libat91/emac.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac.c,v retrieving revision 1.8 diff -u -r1.8 emac.c --- libat91/emac.c 13 Jul 2007 14:27:04 -0000 1.8 +++ libat91/emac.c 8 Aug 2007 13:49:25 -0000 @@ -321,7 +321,7 @@ if (serverPort != udpHdr->src_port) break; - TFTP_ACK_Data(tftpHdr->data, + TFTP_ACK_Data((char *)tftpHdr->data, SWAP16(tftpHdr->block_num), SWAP16(udpHdr->udp_len) - 12); } @@ -339,9 +339,9 @@ */ #ifndef BOOT_BWCT static unsigned short -AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) +AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char phyaddr, unsigned char addr) { - unsigned value = 0x60020000 | (addr << 18); + unsigned value = 0x60020000 | ((phyaddr & 0x1f) << 23) | (addr << 18); pEmac->EMAC_CTL |= AT91C_EMAC_MPE; pEmac->EMAC_MAN = value; @@ -359,9 +359,9 @@ */ #ifdef BOOT_TSC static unsigned short -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) { - unsigned value = 0x50020000 | (addr << 18) | s; + unsigned value = 0x50020000 | ((phyaddr & 0x1f) << 23) | (addr << 18) | s; pEmac->EMAC_CTL |= AT91C_EMAC_MPE; pEmac->EMAC_MAN = value; @@ -380,6 +380,7 @@ static void MII_GetLinkSpeed(AT91PS_EMAC pEmac) { + unsigned char phyaddr = 0; #if defined(BOOT_TSC) || defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) unsigned short stat2; #endif @@ -388,14 +389,18 @@ unsigned sec; int i; #endif -#ifdef BOOT_BWCT +#ifdef BOOT_CENTIPAD + phyaddr = 0x10; +#endif + +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) /* hardcoded link speed since we connect a switch via MII */ update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); update |= AT91C_EMAC_SPD; update |= AT91C_EMAC_FD; #endif #if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS2_REG); if (!(stat2 & MII_STS2_LINK)) return ; update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); @@ -407,7 +412,7 @@ #ifdef BOOT_TSC while (1) { for (i = 0; i < 10; i++) { - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG); + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS_REG); if (stat2 & MII_STS_LINK_STAT) break; printf("."); @@ -418,11 +423,11 @@ if (stat2 & MII_STS_LINK_STAT) break; printf("Resetting MII..."); - 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; } printf("emac: link"); - stat2 = AT91F_MII_ReadPhy(pEmac, MII_SPEC_STS_REG); + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_SPEC_STS_REG); update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); if (stat2 & (MII_SSTS_100FDX | MII_SSTS_100HDX)) { printf(" 100TX"); Index: libat91/emac_init.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac_init.c,v retrieving revision 1.4 diff -u -r1.4 emac_init.c --- libat91/emac_init.c 20 Dec 2006 18:26:37 -0000 1.4 +++ libat91/emac_init.c 8 Aug 2007 13:49:26 -0000 @@ -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; -#if defined(BOOT_KB920X) | defined(BOOT_BWCT) /* Really !RMII */ +#if defined(BOOT_KB920X) | defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) /* 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 | Index: libat91/spi_flash.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.c,v retrieving revision 1.4 diff -u -r1.4 spi_flash.c --- libat91/spi_flash.c 28 Mar 2007 22:38:01 -0000 1.4 +++ libat91/spi_flash.c 8 Aug 2007 13:49:26 -0000 @@ -119,7 +119,7 @@ byteAddress = flash_addr % FLASH_PAGE_SIZE; p_memset(tx_commandBuffer, 0, 8); -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) tx_commandBuffer[0] = 0xd2; tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | @@ -177,7 +177,7 @@ byteAddress = flash_addr % FLASH_PAGE_SIZE; p_memset(tx_commandBuffer, 0, 8); -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) tx_commandBuffer[0] = 0x82; tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | @@ -256,7 +256,7 @@ value = pSPI->SPI_RDR; value = pSPI->SPI_SR; -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) if (((value = GetFlashStatus()) & 0xFC) != 0xB4) printf(" Bad SPI status: 0x%x\n", value); #else Index: libat91/spi_flash.h =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.h,v retrieving revision 1.2 diff -u -r1.2 spi_flash.h --- libat91/spi_flash.h 20 Dec 2006 18:25:16 -0000 1.2 +++ libat91/spi_flash.h 8 Aug 2007 13:49:26 -0000 @@ -40,7 +40,7 @@ void SPI_GetId(unsigned *id); -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) #define FLASH_PAGE_SIZE 528 #else #define FLASH_PAGE_SIZE 1056 --------------020401030906010503010909-- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 14:42:09 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 D954316A468 for ; Wed, 8 Aug 2007 14:42:09 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 27E2313C45B for ; Wed, 8 Aug 2007 14:42:08 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l78Eg0Rw003078; Wed, 8 Aug 2007 16:42:00 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l78EfreA034957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 16:41:53 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l78EfrJr055143; Wed, 8 Aug 2007 16:41:53 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l78EfqGN055142; Wed, 8 Aug 2007 16:41:52 +0200 (CEST) (envelope-from ticso) Date: Wed, 8 Aug 2007 16:41:52 +0200 From: Bernd Walter To: Krassimir Slavchev Message-ID: <20070808144152.GM41893@cicely12.cicely.de> References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B9CAD8.4040103@bulinfo.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: CENTIPAD boot X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de 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 14:42:09 -0000 On Wed, Aug 08, 2007 at 04:53:28PM +0300, Krassimir Slavchev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Yes > > M. Warner Losh wrote: > > can you resend them as a unified diff? > > > > Warner > > Mmm - there are points, which look at least questionable. And there are a few, which are likely not related to support another board. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (FreeBSD) > > iD8DBQFGucrYxJBWvpalMpkRAj4oAJwOYAKhGu2P20acoOPgrkEQSjyETwCgnvjq > DNWbeBl9Wlk2oIVy6bwUJdY= > =sEQp > -----END PGP SIGNATURE----- > Index: boot0spi/main.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/boot0spi/main.c,v > retrieving revision 1.5 > diff -u -r1.5 main.c > --- boot0spi/main.c 20 Dec 2006 17:50:02 -0000 1.5 > +++ boot0spi/main.c 8 Aug 2007 13:49:19 -0000 > @@ -47,10 +47,10 @@ > continue; > // Need extra copy at addr3 > memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); > - printf("Writing %u bytes to flash at %u\n", len, OFFSET); > + printf("Writing %u bytes to flash at %u\n", len, LOADER_OFFSET); > for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { > for (j = 0; j < 10; j++) { > - off = i + OFFSET; > + off = i + LOADER_OFFSET; > SPI_WriteFlash(off, addr + i, FLASH_PAGE_SIZE); > SPI_ReadFlash(off, addr2 + i, FLASH_PAGE_SIZE); > if (p_memcmp(addr3 + i, addr2 + i, FLASH_PAGE_SIZE) == 0) This is unrelated, but important. > Index: bootspi/loader_prompt.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/loader_prompt.c,v > retrieving revision 1.4 > diff -u -r1.4 loader_prompt.c > --- bootspi/loader_prompt.c 15 Mar 2007 03:31:48 -0000 1.4 > +++ bootspi/loader_prompt.c 8 Aug 2007 13:49:21 -0000 > @@ -29,7 +29,6 @@ > #include "env_vars.h" > #include "lib.h" > #include "spi_flash.h" > -#include "ee.h" > > /******************************* GLOBALS *************************************/ > > @@ -286,8 +285,9 @@ > { > char buf[25]; > printf("Testing Config EEPROM\n"); > - 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); > printf("Found '%s'\n", buf); > break; > } Why remove ee.h and then access the eeprom? I never used the eeprom code, so I'm unshure about it. At least the following line should be added befor printing: buf[15] = '\0'; > Index: bootspi/main.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/main.c,v > retrieving revision 1.3 > diff -u -r1.3 main.c > --- bootspi/main.c 21 Oct 2006 22:44:26 -0000 1.3 > +++ bootspi/main.c 8 Aug 2007 13:49:21 -0000 > @@ -41,18 +41,19 @@ > #include "emac.h" > #include "lib.h" > #include "spi_flash.h" > -#include "ee.h" > +#include "sd-card.h" > > int > main(void) > { > printf("\nBoot\n"); > - EEInit(); > + InitEEPROM(); > SPI_InitFlash(); > #ifdef TSC_FPGA > fpga_load(); > #endif > EMAC_Init(); > + sdcard_init(); > LoadBootCommands(); > if (getc(1) == -1) { > start_wdog(30); The same as above - remove ee.h and then access the eeprom? I have the sdcard_init in my local changes as well. Although it might be better to just init the GPIO, because that's what we really want in case of spi booting. I typically need this to do a network boot and then access the SD card, which requires something like this. > Index: libat91/Makefile > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v > retrieving revision 1.9 > diff -u -r1.9 Makefile > --- libat91/Makefile 13 Jul 2007 14:27:04 -0000 1.9 > +++ libat91/Makefile 8 Aug 2007 13:49:22 -0000 > @@ -8,7 +8,7 @@ > putchar.c printf.c reset.c spi_flash.c xmodem.c \ > sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ > memset.c memcmp.c > -SRCS+=ashldi3.c divsi3.c > +SRCS+=ashldi3.c divsi3.S > NO_MAN= > > .if ${MK_TAG_LIST} != "no" Why is the filename change needed? This is obviously unrelated to the board support. Do we have a Makefile error in CVS? > Index: libat91/arm_init.S > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/arm_init.S,v > retrieving revision 1.2 > diff -u -r1.2 arm_init.S > --- libat91/arm_init.S 20 Dec 2006 18:16:49 -0000 1.2 > +++ libat91/arm_init.S 8 Aug 2007 13:49:22 -0000 > @@ -61,7 +61,7 @@ > #ifdef BOOT_IIC > .long (TWI_EEPROM_SIZE >> 9) > #else > -#ifdef BOOT_BWCT > +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) > .long ((528 << 17) | (13 << 13) | (12 * 2)) > #else > .long ((1056 << 17) | (13 << 13) | (12 * 2)) In the long run we should start defining those things to align with the SPI flash type and then just setup the type related to the board. > Index: libat91/eeprom.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/eeprom.c,v > retrieving revision 1.3 > diff -u -r1.3 eeprom.c > --- libat91/eeprom.c 20 Dec 2006 18:19:52 -0000 1.3 > +++ libat91/eeprom.c 8 Aug 2007 13:49:23 -0000 > @@ -33,7 +33,11 @@ > > /* Use a macro to calculate the TWI clock generator value to save code space. */ > #define AT91C_TWSI_CLOCK 100000 > -#define TWSI_EEPROM_ADDRESS 0x50 > +#ifdef BOOT_CENTIPAD > +#define TWSI_EEPROM_ADDRESS 0x57 > +#else > +#define TWSI_EEPROM_ADDRESS 0x50 > +#endif > > #define TWI_CLK_BASE_DIV ((AT91C_MASTER_CLOCK/(4*AT91C_TWSI_CLOCK)) - 2) > #define SET_TWI_CLOCK ((0x00010000) | (TWI_CLK_BASE_DIV) | (TWI_CLK_BASE_DIV << 8)) > Index: libat91/emac.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac.c,v > retrieving revision 1.8 > diff -u -r1.8 emac.c > --- libat91/emac.c 13 Jul 2007 14:27:04 -0000 1.8 > +++ libat91/emac.c 8 Aug 2007 13:49:25 -0000 > @@ -321,7 +321,7 @@ > if (serverPort != udpHdr->src_port) > break; > > - TFTP_ACK_Data(tftpHdr->data, > + TFTP_ACK_Data((char *)tftpHdr->data, > SWAP16(tftpHdr->block_num), > SWAP16(udpHdr->udp_len) - 12); > } This chunk seems to be unrelated to the board type as well. > @@ -339,9 +339,9 @@ > */ > #ifndef BOOT_BWCT > static unsigned short > -AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) > +AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char phyaddr, unsigned char addr) > { > - unsigned value = 0x60020000 | (addr << 18); > + unsigned value = 0x60020000 | ((phyaddr & 0x1f) << 23) | (addr << 18); > > pEmac->EMAC_CTL |= AT91C_EMAC_MPE; > pEmac->EMAC_MAN = value; > @@ -359,9 +359,9 @@ > */ > #ifdef BOOT_TSC > static unsigned short > -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) > { > - unsigned value = 0x50020000 | (addr << 18) | s; > + unsigned value = 0x50020000 | ((phyaddr & 0x1f) << 23) | (addr << 18) | s; > > pEmac->EMAC_CTL |= AT91C_EMAC_MPE; > pEmac->EMAC_MAN = value; > @@ -380,6 +380,7 @@ > static void > MII_GetLinkSpeed(AT91PS_EMAC pEmac) > { > + unsigned char phyaddr = 0; > #if defined(BOOT_TSC) || defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) > unsigned short stat2; > #endif > @@ -388,14 +389,18 @@ > unsigned sec; > int i; > #endif > -#ifdef BOOT_BWCT > +#ifdef BOOT_CENTIPAD > + phyaddr = 0x10; > +#endif > + > +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) > /* hardcoded link speed since we connect a switch via MII */ > update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); > update |= AT91C_EMAC_SPD; > update |= AT91C_EMAC_FD; > #endif > #if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) > - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); > + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS2_REG); > if (!(stat2 & MII_STS2_LINK)) > return ; > update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); > @@ -407,7 +412,7 @@ > #ifdef BOOT_TSC > while (1) { > for (i = 0; i < 10; i++) { > - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG); > + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS_REG); > if (stat2 & MII_STS_LINK_STAT) > break; > printf("."); > @@ -418,11 +423,11 @@ > if (stat2 & MII_STS_LINK_STAT) > break; > printf("Resetting MII..."); > - 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; > } > printf("emac: link"); > - stat2 = AT91F_MII_ReadPhy(pEmac, MII_SPEC_STS_REG); > + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_SPEC_STS_REG); > update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); > if (stat2 & (MII_SSTS_100FDX | MII_SSTS_100HDX)) { > printf(" 100TX"); Are you shure, that you want to nail the link speed too 100/full? It is only reasonable if you have a switch, but then it wouldn't make sense to set a hardcoded phyaddr for your board, since almost every switch I know uses multiple phy-addresses. On the other hand - I like the phyaddr change, because it will allow me to setup my switch from loader some day and not from kernel, as I do now. > Index: libat91/emac_init.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac_init.c,v > retrieving revision 1.4 > diff -u -r1.4 emac_init.c > --- libat91/emac_init.c 20 Dec 2006 18:26:37 -0000 1.4 > +++ libat91/emac_init.c 8 Aug 2007 13:49:26 -0000 > @@ -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; > -#if defined(BOOT_KB920X) | defined(BOOT_BWCT) /* Really !RMII */ > +#if defined(BOOT_KB920X) | defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) /* 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 | > Index: libat91/spi_flash.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.c,v > retrieving revision 1.4 > diff -u -r1.4 spi_flash.c > --- libat91/spi_flash.c 28 Mar 2007 22:38:01 -0000 1.4 > +++ libat91/spi_flash.c 8 Aug 2007 13:49:26 -0000 > @@ -119,7 +119,7 @@ > byteAddress = flash_addr % FLASH_PAGE_SIZE; > > p_memset(tx_commandBuffer, 0, 8); > -#ifdef BOOT_BWCT > +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) > tx_commandBuffer[0] = 0xd2; > tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); > tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | > @@ -177,7 +177,7 @@ > byteAddress = flash_addr % FLASH_PAGE_SIZE; > > p_memset(tx_commandBuffer, 0, 8); > -#ifdef BOOT_BWCT > +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) > tx_commandBuffer[0] = 0x82; > tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); > tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | > @@ -256,7 +256,7 @@ > value = pSPI->SPI_RDR; > value = pSPI->SPI_SR; > > -#ifdef BOOT_BWCT > +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) > if (((value = GetFlashStatus()) & 0xFC) != 0xB4) > printf(" Bad SPI status: 0x%x\n", value); > #else Although this is correct with our current code. Please split BOOT_BWCT and BOOT_CENTIPAD here, since I localy have 0xAC added as a valid status: #ifdef BOOT_BWCT value = GetFlashStatus(); if ((value & 0xFC) != 0xAC && (value & 0xFC) != 0xB4) printf(" Bad SPI status: 0x%x\n", value); #else This is because I use AT45DB161D chips in production. The 0xB4 is from the AT45DB321C, which I'd used in prototypes only. I might use other SPI types for special purspose as well. > Index: libat91/spi_flash.h > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.h,v > retrieving revision 1.2 > diff -u -r1.2 spi_flash.h > --- libat91/spi_flash.h 20 Dec 2006 18:25:16 -0000 1.2 > +++ libat91/spi_flash.h 8 Aug 2007 13:49:26 -0000 > @@ -40,7 +40,7 @@ > > void SPI_GetId(unsigned *id); > > -#ifdef BOOT_BWCT > +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) > #define FLASH_PAGE_SIZE 528 > #else > #define FLASH_PAGE_SIZE 1056 -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 15:11:42 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 680B516A420 for ; Wed, 8 Aug 2007 15:11:42 +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 A217613C4A5 for ; Wed, 8 Aug 2007 15:11:40 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 8FADA34525; Wed, 8 Aug 2007 18:11:35 +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 99780-03; Wed, 8 Aug 2007 18:11:34 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 464C33451F; Wed, 8 Aug 2007 18:11:34 +0300 (EEST) Message-ID: <46B9DD23.70608@bulinfo.net> Date: Wed, 08 Aug 2007 18:11:31 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.5 (X11/20070724) MIME-Version: 1.0 To: ticso@cicely.de References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> In-Reply-To: <20070808144152.GM41893@cicely12.cicely.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: 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 15:11:42 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bernd Walter wrote: > On Wed, Aug 08, 2007 at 04:53:28PM +0300, Krassimir Slavchev wrote: > Yes > > M. Warner Losh wrote: >>>> can you resend them as a unified diff? >>>> >>>> Warner >>>> > >> Mmm - there are points, which look at least questionable. >> And there are a few, which are likely not related to support another >> board. > Index: boot0spi/main.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/boot0spi/main.c,v retrieving revision 1.5 diff -u -r1.5 main.c - --- boot0spi/main.c 20 Dec 2006 17:50:02 -0000 1.5 +++ boot0spi/main.c 8 Aug 2007 13:49:19 -0000 @@ -47,10 +47,10 @@ continue; // Need extra copy at addr3 memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); - - printf("Writing %u bytes to flash at %u\n", len, OFFSET); + printf("Writing %u bytes to flash at %u\n", len, LOADER_OFFSET); for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { for (j = 0; j < 10; j++) { - - off = i + OFFSET; + off = i + LOADER_OFFSET; SPI_WriteFlash(off, addr + i, FLASH_PAGE_SIZE); SPI_ReadFlash(off, addr2 + i, FLASH_PAGE_SIZE); if (p_memcmp(addr3 + i, addr2 + i, FLASH_PAGE_SIZE) == 0) > This is unrelated, but important. Index: bootspi/loader_prompt.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/loader_prompt.c,v retrieving revision 1.4 diff -u -r1.4 loader_prompt.c - --- bootspi/loader_prompt.c 15 Mar 2007 03:31:48 -0000 1.4 +++ bootspi/loader_prompt.c 8 Aug 2007 13:49:21 -0000 @@ -29,7 +29,6 @@ #include "env_vars.h" #include "lib.h" #include "spi_flash.h" - -#include "ee.h" /******************************* GLOBALS *************************************/ @@ -286,8 +285,9 @@ { char buf[25]; printf("Testing Config EEPROM\n"); - - 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); printf("Found '%s'\n", buf); break; } > Why remove ee.h and then access the eeprom? > I never used the eeprom code, so I'm unshure about it. > At least the following line should be added befor printing: > buf[15] = '\0'; WriteEEPROM() and ReadEEPROM() functions are in libat91. May be ee.c should be removed too. Yes, The '!' char should be removed from the string. Index: bootspi/main.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/main.c,v retrieving revision 1.3 diff -u -r1.3 main.c - --- bootspi/main.c 21 Oct 2006 22:44:26 -0000 1.3 +++ bootspi/main.c 8 Aug 2007 13:49:21 -0000 @@ -41,18 +41,19 @@ #include "emac.h" #include "lib.h" #include "spi_flash.h" - -#include "ee.h" +#include "sd-card.h" int main(void) { printf("\nBoot\n"); - - EEInit(); + InitEEPROM(); SPI_InitFlash(); #ifdef TSC_FPGA fpga_load(); #endif EMAC_Init(); + sdcard_init(); LoadBootCommands(); if (getc(1) == -1) { start_wdog(30); > The same as above - remove ee.h and then access the eeprom? > I have the sdcard_init in my local changes as well. > Although it might be better to just init the GPIO, because that's > what we really want in case of spi booting. > I typically need this to do a network boot and then access the SD > card, which requires something like this. InitEEPROM() is in libat91 too. Index: libat91/Makefile =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile - --- libat91/Makefile 13 Jul 2007 14:27:04 -0000 1.9 +++ libat91/Makefile 8 Aug 2007 13:49:22 -0000 @@ -8,7 +8,7 @@ putchar.c printf.c reset.c spi_flash.c xmodem.c \ sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ memset.c memcmp.c - -SRCS+=ashldi3.c divsi3.c +SRCS+=ashldi3.c divsi3.S NO_MAN= .if ${MK_TAG_LIST} != "no" > Why is the filename change needed? > This is obviously unrelated to the board support. > Do we have a Makefile error in CVS? I can't find divsi3.c in the source tree. Yes it seems to be Makefile error. Index: libat91/arm_init.S =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/arm_init.S,v retrieving revision 1.2 diff -u -r1.2 arm_init.S - --- libat91/arm_init.S 20 Dec 2006 18:16:49 -0000 1.2 +++ libat91/arm_init.S 8 Aug 2007 13:49:22 -0000 @@ -61,7 +61,7 @@ #ifdef BOOT_IIC .long (TWI_EEPROM_SIZE >> 9) #else - -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) .long ((528 << 17) | (13 << 13) | (12 * 2)) #else .long ((1056 << 17) | (13 << 13) | (12 * 2)) > In the long run we should start defining those things to align with the > SPI flash type and then just setup the type related to the board. Yes, I agree. Index: libat91/eeprom.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/eeprom.c,v retrieving revision 1.3 diff -u -r1.3 eeprom.c - --- libat91/eeprom.c 20 Dec 2006 18:19:52 -0000 1.3 +++ libat91/eeprom.c 8 Aug 2007 13:49:23 -0000 @@ -33,7 +33,11 @@ /* Use a macro to calculate the TWI clock generator value to save code space. */ #define AT91C_TWSI_CLOCK 100000 - -#define TWSI_EEPROM_ADDRESS 0x50 +#ifdef BOOT_CENTIPAD +#define TWSI_EEPROM_ADDRESS 0x57 +#else +#define TWSI_EEPROM_ADDRESS 0x50 +#endif #define TWI_CLK_BASE_DIV ((AT91C_MASTER_CLOCK/(4*AT91C_TWSI_CLOCK)) - 2) #define SET_TWI_CLOCK ((0x00010000) | (TWI_CLK_BASE_DIV) | (TWI_CLK_BASE_DIV << 8)) Index: libat91/emac.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac.c,v retrieving revision 1.8 diff -u -r1.8 emac.c - --- libat91/emac.c 13 Jul 2007 14:27:04 -0000 1.8 +++ libat91/emac.c 8 Aug 2007 13:49:25 -0000 @@ -321,7 +321,7 @@ if (serverPort != udpHdr->src_port) break; - - TFTP_ACK_Data(tftpHdr->data, + TFTP_ACK_Data((char *)tftpHdr->data, SWAP16(tftpHdr->block_num), SWAP16(udpHdr->udp_len) - 12); } > This chunk seems to be unrelated to the board type as well. Yes, this was reported before but still uncommitted. @@ -339,9 +339,9 @@ */ #ifndef BOOT_BWCT static unsigned short - -AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) +AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char phyaddr, unsigned char addr) { - - unsigned value = 0x60020000 | (addr << 18); + unsigned value = 0x60020000 | ((phyaddr & 0x1f) << 23) | (addr << 18); pEmac->EMAC_CTL |= AT91C_EMAC_MPE; pEmac->EMAC_MAN = value; @@ -359,9 +359,9 @@ */ #ifdef BOOT_TSC static unsigned short - -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) { - - unsigned value = 0x50020000 | (addr << 18) | s; + unsigned value = 0x50020000 | ((phyaddr & 0x1f) << 23) | (addr << 18) | s; pEmac->EMAC_CTL |= AT91C_EMAC_MPE; pEmac->EMAC_MAN = value; @@ -380,6 +380,7 @@ static void MII_GetLinkSpeed(AT91PS_EMAC pEmac) { + unsigned char phyaddr = 0; #if defined(BOOT_TSC) || defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) unsigned short stat2; #endif @@ -388,14 +389,18 @@ unsigned sec; int i; #endif - -#ifdef BOOT_BWCT +#ifdef BOOT_CENTIPAD + phyaddr = 0x10; +#endif + +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) /* hardcoded link speed since we connect a switch via MII */ update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); update |= AT91C_EMAC_SPD; update |= AT91C_EMAC_FD; #endif #if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) - - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS2_REG); if (!(stat2 & MII_STS2_LINK)) return ; update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); @@ -407,7 +412,7 @@ #ifdef BOOT_TSC while (1) { for (i = 0; i < 10; i++) { - - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG); + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS_REG); if (stat2 & MII_STS_LINK_STAT) break; printf("."); @@ -418,11 +423,11 @@ if (stat2 & MII_STS_LINK_STAT) break; printf("Resetting MII..."); - - 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; } printf("emac: link"); - - stat2 = AT91F_MII_ReadPhy(pEmac, MII_SPEC_STS_REG); + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_SPEC_STS_REG); update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); if (stat2 & (MII_SSTS_100FDX | MII_SSTS_100HDX)) { printf(" 100TX"); > Are you shure, that you want to nail the link speed too 100/full? > It is only reasonable if you have a switch, but then it wouldn't make > sense to set a hardcoded phyaddr for your board, since almost every > switch I know uses multiple phy-addresses. > On the other hand - I like the phyaddr change, because it will allow > me to setup my switch from loader some day and not from kernel, as I do > now. Yes, I should do the link negotiation. Index: libat91/emac_init.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac_init.c,v retrieving revision 1.4 diff -u -r1.4 emac_init.c - --- libat91/emac_init.c 20 Dec 2006 18:26:37 -0000 1.4 +++ libat91/emac_init.c 8 Aug 2007 13:49:26 -0000 @@ -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; - -#if defined(BOOT_KB920X) | defined(BOOT_BWCT) /* Really !RMII */ +#if defined(BOOT_KB920X) | defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) /* 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 | Index: libat91/spi_flash.c =================================================================== RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.c,v retrieving revision 1.4 diff -u -r1.4 spi_flash.c - --- libat91/spi_flash.c 28 Mar 2007 22:38:01 -0000 1.4 +++ libat91/spi_flash.c 8 Aug 2007 13:49:26 -0000 @@ -119,7 +119,7 @@ byteAddress = flash_addr % FLASH_PAGE_SIZE; p_memset(tx_commandBuffer, 0, 8); - -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) tx_commandBuffer[0] = 0xd2; tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | @@ -177,7 +177,7 @@ byteAddress = flash_addr % FLASH_PAGE_SIZE; p_memset(tx_commandBuffer, 0, 8); - -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) tx_commandBuffer[0] = 0x82; tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | @@ -256,7 +256,7 @@ value = pSPI->SPI_RDR; value = pSPI->SPI_SR; - -#ifdef BOOT_BWCT +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) if (((value = GetFlashStatus()) & 0xFC) != 0xB4) printf(" Bad SPI status: 0x%x\n", value); #else > Although this is correct with our current code. > Please split BOOT_BWCT and BOOT_CENTIPAD here, since I localy have > 0xAC added as a valid status: > #ifdef BOOT_BWCT > value = GetFlashStatus(); > if ((value & 0xFC) != 0xAC > && (value & 0xFC) != 0xB4) > printf(" Bad SPI status: 0x%x\n", value); > #else > This is because I use AT45DB161D chips in production. > The 0xB4 is from the AT45DB321C, which I'd used in prototypes only. > I might use other SPI types for special purspose as well. Feel free to change anything you wish! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGud0jxJBWvpalMpkRApclAJsFbJ+LpZsY8U3s5vkhbLLc6AxYpQCgsI2a vxIfAgos76NNmgsA07yQUC0= =q0Z6 -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 15:41:05 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 8231616A417 for ; Wed, 8 Aug 2007 15:41:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E7BD113C481 for ; Wed, 8 Aug 2007 15:41:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l78FdAbd064197; Wed, 8 Aug 2007 09:39:10 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 08 Aug 2007 09:39:20 -0600 (MDT) Message-Id: <20070808.093920.-432838389.imp@bsdimp.com> To: krassi@bulinfo.net From: "M. Warner Losh" In-Reply-To: <46B9DD23.70608@bulinfo.net> References: <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 08 Aug 2007 09:39:11 -0600 (MDT) Cc: freebsd-arm@FreeBSD.ORG, ticso@cicely.de Subject: Re: 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 15:41:05 -0000 In message: <46B9DD23.70608@bulinfo.net> Krassimir Slavchev writes: : -----BEGIN PGP SIGNED MESSAGE----- : Hash: SHA1 : : Bernd Walter wrote: : > On Wed, Aug 08, 2007 at 04:53:28PM +0300, Krassimir Slavchev wrote: : > Yes : > : > M. Warner Losh wrote: : >>>> can you resend them as a unified diff? : >>>> : >>>> Warner : >>>> : > : >> Mmm - there are points, which look at least questionable. : >> And there are a few, which are likely not related to support another : >> board. : > : : Index: boot0spi/main.c : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/boot0spi/main.c,v : retrieving revision 1.5 : diff -u -r1.5 main.c : - --- boot0spi/main.c 20 Dec 2006 17:50:02 -0000 1.5 : +++ boot0spi/main.c 8 Aug 2007 13:49:19 -0000 : @@ -47,10 +47,10 @@ : continue; : // Need extra copy at addr3 : memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * : FLASH_PAGE_SIZE); : - - printf("Writing %u bytes to flash at %u\n", len, OFFSET); : + printf("Writing %u bytes to flash at %u\n", len, LOADER_OFFSET); : for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { : for (j = 0; j < 10; j++) { : - - off = i + OFFSET; : + off = i + LOADER_OFFSET; : SPI_WriteFlash(off, addr + i, FLASH_PAGE_SIZE); : SPI_ReadFlash(off, addr2 + i, FLASH_PAGE_SIZE); : if (p_memcmp(addr3 + i, addr2 + i, FLASH_PAGE_SIZE) == 0) : : > This is unrelated, but important. Agreed. : Index: bootspi/loader_prompt.c : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/loader_prompt.c,v : retrieving revision 1.4 : diff -u -r1.4 loader_prompt.c : - --- bootspi/loader_prompt.c 15 Mar 2007 03:31:48 -0000 1.4 : +++ bootspi/loader_prompt.c 8 Aug 2007 13:49:21 -0000 : @@ -29,7 +29,6 @@ : #include "env_vars.h" : #include "lib.h" : #include "spi_flash.h" : - -#include "ee.h" : : /******************************* GLOBALS : *************************************/ : : @@ -286,8 +285,9 @@ : { : char buf[25]; : printf("Testing Config EEPROM\n"); : - - 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); : printf("Found '%s'\n", buf); : break; : } : : > Why remove ee.h and then access the eeprom? : > I never used the eeprom code, so I'm unshure about it. : > At least the following line should be added befor printing: : > buf[15] = '\0'; : : WriteEEPROM() and ReadEEPROM() functions are in libat91. May be ee.c : should be removed too. : Yes, The '!' char should be removed from the string. There are two eeprom routines. One for 16-bit and one for 8-bit. That's not so good, but is kind of a pita to cope. I was planning on removing the read/write to the eeprom entirely from loader_prompt. : Index: bootspi/main.c : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/main.c,v : retrieving revision 1.3 : diff -u -r1.3 main.c : - --- bootspi/main.c 21 Oct 2006 22:44:26 -0000 1.3 : +++ bootspi/main.c 8 Aug 2007 13:49:21 -0000 : @@ -41,18 +41,19 @@ : #include "emac.h" : #include "lib.h" : #include "spi_flash.h" : - -#include "ee.h" : +#include "sd-card.h" : : int : main(void) : { : printf("\nBoot\n"); : - - EEInit(); : + InitEEPROM(); : SPI_InitFlash(); : #ifdef TSC_FPGA : fpga_load(); : #endif : EMAC_Init(); : + sdcard_init(); : LoadBootCommands(); : if (getc(1) == -1) { : start_wdog(30); : : > The same as above - remove ee.h and then access the eeprom? : > I have the sdcard_init in my local changes as well. : > Although it might be better to just init the GPIO, because that's : > what we really want in case of spi booting. : > I typically need this to do a network boot and then access the SD : > card, which requires something like this. : : InitEEPROM() is in libat91 too. We should likely go to a unified foo_board.c : Index: libat91/Makefile : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v : retrieving revision 1.9 : diff -u -r1.9 Makefile : - --- libat91/Makefile 13 Jul 2007 14:27:04 -0000 1.9 : +++ libat91/Makefile 8 Aug 2007 13:49:22 -0000 : @@ -8,7 +8,7 @@ : putchar.c printf.c reset.c spi_flash.c xmodem.c \ : sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ : memset.c memcmp.c : - -SRCS+=ashldi3.c divsi3.c : +SRCS+=ashldi3.c divsi3.S : NO_MAN= : : .if ${MK_TAG_LIST} != "no" : : > Why is the filename change needed? : > This is obviously unrelated to the board support. : > Do we have a Makefile error in CVS? : : I can't find divsi3.c in the source tree. Yes it seems to be Makefile error. I think I need to checkin divsi3.c. It is *MUCH* smaller code, even if it isn't optimal. : Index: libat91/arm_init.S : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/arm_init.S,v : retrieving revision 1.2 : diff -u -r1.2 arm_init.S : - --- libat91/arm_init.S 20 Dec 2006 18:16:49 -0000 1.2 : +++ libat91/arm_init.S 8 Aug 2007 13:49:22 -0000 : @@ -61,7 +61,7 @@ : #ifdef BOOT_IIC : .long (TWI_EEPROM_SIZE >> 9) : #else : - -#ifdef BOOT_BWCT : +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) : .long ((528 << 17) | (13 << 13) | (12 * 2)) : #else : .long ((1056 << 17) | (13 << 13) | (12 * 2)) : : > In the long run we should start defining those things to align with the : > SPI flash type and then just setup the type related to the board. : : Yes, I agree. Yes. We can actually look at the ID and know what the parameters are. However, we'd need to put a 'generic' image into the part and 'fix' it later. : Index: libat91/eeprom.c : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/eeprom.c,v : retrieving revision 1.3 : diff -u -r1.3 eeprom.c : - --- libat91/eeprom.c 20 Dec 2006 18:19:52 -0000 1.3 : +++ libat91/eeprom.c 8 Aug 2007 13:49:23 -0000 : @@ -33,7 +33,11 @@ : : /* Use a macro to calculate the TWI clock generator value to save code : space. */ : #define AT91C_TWSI_CLOCK 100000 : - -#define TWSI_EEPROM_ADDRESS 0x50 : +#ifdef BOOT_CENTIPAD : +#define TWSI_EEPROM_ADDRESS 0x57 : +#else : +#define TWSI_EEPROM_ADDRESS 0x50 : +#endif : : #define TWI_CLK_BASE_DIV ((AT91C_MASTER_CLOCK/(4*AT91C_TWSI_CLOCK)) - 2) : #define SET_TWI_CLOCK ((0x00010000) | (TWI_CLK_BASE_DIV) | : (TWI_CLK_BASE_DIV << 8)) : Index: libat91/emac.c : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac.c,v : retrieving revision 1.8 : diff -u -r1.8 emac.c : - --- libat91/emac.c 13 Jul 2007 14:27:04 -0000 1.8 : +++ libat91/emac.c 8 Aug 2007 13:49:25 -0000 : @@ -321,7 +321,7 @@ : if (serverPort != udpHdr->src_port) : break; : : - - TFTP_ACK_Data(tftpHdr->data, : + TFTP_ACK_Data((char *)tftpHdr->data, : SWAP16(tftpHdr->block_num), : SWAP16(udpHdr->udp_len) - 12); : } : : > This chunk seems to be unrelated to the board type as well. : Yes, this was reported before but still uncommitted. I need to merge that in. : @@ -339,9 +339,9 @@ : */ : #ifndef BOOT_BWCT : static unsigned short : - -AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char addr) : +AT91F_MII_ReadPhy (AT91PS_EMAC pEmac, unsigned char phyaddr, unsigned : char addr) : { : - - unsigned value = 0x60020000 | (addr << 18); : + unsigned value = 0x60020000 | ((phyaddr & 0x1f) << 23) | (addr << 18); : : pEmac->EMAC_CTL |= AT91C_EMAC_MPE; : pEmac->EMAC_MAN = value; : @@ -359,9 +359,9 @@ : */ : #ifdef BOOT_TSC : static unsigned short : - -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) : { : - - unsigned value = 0x50020000 | (addr << 18) | s; : + unsigned value = 0x50020000 | ((phyaddr & 0x1f) << 23) | (addr << 18) | s; : : pEmac->EMAC_CTL |= AT91C_EMAC_MPE; : pEmac->EMAC_MAN = value; : @@ -380,6 +380,7 @@ : static void : MII_GetLinkSpeed(AT91PS_EMAC pEmac) : { : + unsigned char phyaddr = 0; : #if defined(BOOT_TSC) || defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) : unsigned short stat2; : #endif : @@ -388,14 +389,18 @@ : unsigned sec; : int i; : #endif : - -#ifdef BOOT_BWCT : +#ifdef BOOT_CENTIPAD : + phyaddr = 0x10; : +#endif : + : +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) : /* hardcoded link speed since we connect a switch via MII */ : update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); : update |= AT91C_EMAC_SPD; : update |= AT91C_EMAC_FD; : #endif : #if defined(BOOT_KB920X) || defined(BOOT_CENTIPAD) : - - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); : + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS2_REG); : if (!(stat2 & MII_STS2_LINK)) : return ; : update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); : @@ -407,7 +412,7 @@ : #ifdef BOOT_TSC : while (1) { : for (i = 0; i < 10; i++) { : - - stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG); : + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_STS_REG); : if (stat2 & MII_STS_LINK_STAT) : break; : printf("."); : @@ -418,11 +423,11 @@ : if (stat2 & MII_STS_LINK_STAT) : break; : printf("Resetting MII..."); : - - 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; : } : printf("emac: link"); : - - stat2 = AT91F_MII_ReadPhy(pEmac, MII_SPEC_STS_REG); : + stat2 = AT91F_MII_ReadPhy(pEmac, phyaddr, MII_SPEC_STS_REG); : update = pEmac->EMAC_CFG & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD); : if (stat2 & (MII_SSTS_100FDX | MII_SSTS_100HDX)) { : printf(" 100TX"); : : > Are you shure, that you want to nail the link speed too 100/full? : > It is only reasonable if you have a switch, but then it wouldn't make : > sense to set a hardcoded phyaddr for your board, since almost every : > switch I know uses multiple phy-addresses. : > On the other hand - I like the phyaddr change, because it will allow : > me to setup my switch from loader some day and not from kernel, as I do : > now. : : Yes, I should do the link negotiation. Link negotiation is important here. : Index: libat91/emac_init.c : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/emac_init.c,v : retrieving revision 1.4 : diff -u -r1.4 emac_init.c : - --- libat91/emac_init.c 20 Dec 2006 18:26:37 -0000 1.4 : +++ libat91/emac_init.c 8 Aug 2007 13:49:26 -0000 : @@ -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; : - -#if defined(BOOT_KB920X) | defined(BOOT_BWCT) /* Really !RMII */ : +#if defined(BOOT_KB920X) | defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) : /* 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 | : Index: libat91/spi_flash.c : =================================================================== : RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/spi_flash.c,v : retrieving revision 1.4 : diff -u -r1.4 spi_flash.c : - --- libat91/spi_flash.c 28 Mar 2007 22:38:01 -0000 1.4 : +++ libat91/spi_flash.c 8 Aug 2007 13:49:26 -0000 : @@ -119,7 +119,7 @@ : byteAddress = flash_addr % FLASH_PAGE_SIZE; : : p_memset(tx_commandBuffer, 0, 8); : - -#ifdef BOOT_BWCT : +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) : tx_commandBuffer[0] = 0xd2; : tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); : tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | : @@ -177,7 +177,7 @@ : byteAddress = flash_addr % FLASH_PAGE_SIZE; : : p_memset(tx_commandBuffer, 0, 8); : - -#ifdef BOOT_BWCT : +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) : tx_commandBuffer[0] = 0x82; : tx_commandBuffer[1] = ((pageAddress >> 6) & 0xFF); : tx_commandBuffer[2] = ((pageAddress << 2) & 0xFC) | : @@ -256,7 +256,7 @@ : value = pSPI->SPI_RDR; : value = pSPI->SPI_SR; : : - -#ifdef BOOT_BWCT : +#if defined(BOOT_BWCT) | defined(BOOT_CENTIPAD) : if (((value = GetFlashStatus()) & 0xFC) != 0xB4) : printf(" Bad SPI status: 0x%x\n", value); : #else : : > Although this is correct with our current code. : > Please split BOOT_BWCT and BOOT_CENTIPAD here, since I localy have : > 0xAC added as a valid status: : > #ifdef BOOT_BWCT : > value = GetFlashStatus(); : > if ((value & 0xFC) != 0xAC : > && (value & 0xFC) != 0xB4) : > printf(" Bad SPI status: 0x%x\n", value); : > #else : > This is because I use AT45DB161D chips in production. : > The 0xB4 is from the AT45DB321C, which I'd used in prototypes only. : > I might use other SPI types for special purspose as well. : : Feel free to change anything you wish! I think we need just a little more smarts here. What this check is doing is making sure that the ID is sane, which doesn't make sense for a general solution. Warner From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 15:48:09 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 8A78A16A468 for ; Wed, 8 Aug 2007 15:48:09 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 2FE4713C48A for ; Wed, 8 Aug 2007 15:48:08 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l78Fm42Z005374; Wed, 8 Aug 2007 17:48:04 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l78FlvLf035574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 17:47:57 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l78FlvRx055298; Wed, 8 Aug 2007 17:47:57 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l78FlvJc055297; Wed, 8 Aug 2007 17:47:57 +0200 (CEST) (envelope-from ticso) Date: Wed, 8 Aug 2007 17:47:57 +0200 From: Bernd Walter To: Krassimir Slavchev Message-ID: <20070808154756.GN41893@cicely12.cicely.de> References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B9DD23.70608@bulinfo.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: CENTIPAD boot X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de 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 15:48:09 -0000 On Wed, Aug 08, 2007 at 06:11:31PM +0300, Krassimir Slavchev wrote: > Bernd Walter wrote: > > On Wed, Aug 08, 2007 at 04:53:28PM +0300, Krassimir Slavchev wrote: > Index: bootspi/loader_prompt.c > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/loader_prompt.c,v > retrieving revision 1.4 > diff -u -r1.4 loader_prompt.c > - --- bootspi/loader_prompt.c 15 Mar 2007 03:31:48 -0000 1.4 > +++ bootspi/loader_prompt.c 8 Aug 2007 13:49:21 -0000 > @@ -29,7 +29,6 @@ > #include "env_vars.h" > #include "lib.h" > #include "spi_flash.h" > - -#include "ee.h" > > /******************************* GLOBALS > *************************************/ > > @@ -286,8 +285,9 @@ > { > char buf[25]; > printf("Testing Config EEPROM\n"); > - - 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); > printf("Found '%s'\n", buf); > break; > } > > > Why remove ee.h and then access the eeprom? > > I never used the eeprom code, so I'm unshure about it. > > At least the following line should be added befor printing: > > buf[15] = '\0'; > > WriteEEPROM() and ReadEEPROM() functions are in libat91. May be ee.c > should be removed too. > Yes, The '!' char should be removed from the string. Oh - this wasn't abnout the '!' - it was just in case there is a problem with the eeprom to limit the output. But after rethinking it would be better to bzero the whole buf between write and read, since a failure to read the eeprom might leave the old content completely intact, without anyone to notice. > Index: libat91/Makefile > =================================================================== > RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v > retrieving revision 1.9 > diff -u -r1.9 Makefile > - --- libat91/Makefile 13 Jul 2007 14:27:04 -0000 1.9 > +++ libat91/Makefile 8 Aug 2007 13:49:22 -0000 > @@ -8,7 +8,7 @@ > putchar.c printf.c reset.c spi_flash.c xmodem.c \ > sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ > memset.c memcmp.c > - -SRCS+=ashldi3.c divsi3.c > +SRCS+=ashldi3.c divsi3.S > NO_MAN= > > .if ${MK_TAG_LIST} != "no" > > > Why is the filename change needed? > > This is obviously unrelated to the board support. > > Do we have a Makefile error in CVS? > > I can't find divsi3.c in the source tree. Yes it seems to be Makefile error. I guess these things happen because most of us use perforce code, at least when building bootcode. It is likely correct there. > Yes, I should do the link negotiation. What PHY do you have? The link/speed registers are always the same with a few exceptions, which are usually just integrated PHY. Even in my case with the switch I get sensible values with Warners code, but this is for the external port 0, which is unrelated to the speed between the MAC and the switch. > > Although this is correct with our current code. > > Please split BOOT_BWCT and BOOT_CENTIPAD here, since I localy have > > 0xAC added as a valid status: > > #ifdef BOOT_BWCT > > value = GetFlashStatus(); > > if ((value & 0xFC) != 0xAC > > && (value & 0xFC) != 0xB4) > > printf(" Bad SPI status: 0x%x\n", value); > > #else > > This is because I use AT45DB161D chips in production. > > The 0xB4 is from the AT45DB321C, which I'd used in prototypes only. > > I might use other SPI types for special purspose as well. > > Feel free to change anything you wish! Since we are in freeze and this is Warners code and he has a blanket approval, I leave it up to him. If I would ask RE he will likely have to review it anyway. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 15:58:05 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 5002616A418 for ; Wed, 8 Aug 2007 15:58:05 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id B970513C483 for ; Wed, 8 Aug 2007 15:58:04 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l78Fw0cE005681; Wed, 8 Aug 2007 17:58:00 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l78FvpPb035635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 17:57:52 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l78Fvpiw055326; Wed, 8 Aug 2007 17:57:51 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l78Fvp5B055325; Wed, 8 Aug 2007 17:57:51 +0200 (CEST) (envelope-from ticso) Date: Wed, 8 Aug 2007 17:57:51 +0200 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20070808155750.GO41893@cicely12.cicely.de> References: <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> <20070808.093920.-432838389.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070808.093920.-432838389.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: CENTIPAD boot X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de 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 15:58:05 -0000 On Wed, Aug 08, 2007 at 09:39:20AM -0600, M. Warner Losh wrote: > In message: <46B9DD23.70608@bulinfo.net> > Krassimir Slavchev writes: > : > Please split BOOT_BWCT and BOOT_CENTIPAD here, since I localy have > : > 0xAC added as a valid status: > : > #ifdef BOOT_BWCT > : > value = GetFlashStatus(); > : > if ((value & 0xFC) != 0xAC > : > && (value & 0xFC) != 0xB4) > : > printf(" Bad SPI status: 0x%x\n", value); > : > #else > : > This is because I use AT45DB161D chips in production. > : > The 0xB4 is from the AT45DB321C, which I'd used in prototypes only. > : > I might use other SPI types for special purspose as well. > : > : Feel free to change anything you wish! > > I think we need just a little more smarts here. What this check is > doing is making sure that the ID is sane, which doesn't make sense for > a general solution. It might not be important for the normal use. I locally use it for post production tests, but I've added memory tests as well, so I can quickly find out if there is a data or address line failure, which is active in boot0spi only and won't get shipped. But I know what I can expect from the SPI, so just printing the value will have the same effect. When we do the SPI autoprobing one day and print the result, this is likely to be even better. Patching the binary with the correct dataflash parameters should be easy. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 16:08:54 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 EA07816A418 for ; Wed, 8 Aug 2007 16:08:54 +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 3D2A213C4B4 for ; Wed, 8 Aug 2007 16:08:54 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id CD2BC3464F; Wed, 8 Aug 2007 19:08:51 +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 03551-06; Wed, 8 Aug 2007 19:08:51 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 373B134657; Wed, 8 Aug 2007 19:08:50 +0300 (EEST) Message-ID: <46B9EA90.3050508@bulinfo.net> Date: Wed, 08 Aug 2007 19:08:48 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.5 (X11/20070724) MIME-Version: 1.0 To: ticso@cicely.de References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> <20070808154756.GN41893@cicely12.cicely.de> In-Reply-To: <20070808154756.GN41893@cicely12.cicely.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: 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 16:08:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bernd Walter wrote: > On Wed, Aug 08, 2007 at 06:11:31PM +0300, Krassimir Slavchev wrote: >> Bernd Walter wrote: >>> On Wed, Aug 08, 2007 at 04:53:28PM +0300, Krassimir Slavchev wrote: >> Index: bootspi/loader_prompt.c >> =================================================================== >> RCS file: /home/ncvs/src/sys/boot/arm/at91/bootspi/loader_prompt.c,v >> retrieving revision 1.4 >> diff -u -r1.4 loader_prompt.c >> - --- bootspi/loader_prompt.c 15 Mar 2007 03:31:48 -0000 1.4 >> +++ bootspi/loader_prompt.c 8 Aug 2007 13:49:21 -0000 >> @@ -29,7 +29,6 @@ >> #include "env_vars.h" >> #include "lib.h" >> #include "spi_flash.h" >> - -#include "ee.h" >> >> /******************************* GLOBALS >> *************************************/ >> >> @@ -286,8 +285,9 @@ >> { >> char buf[25]; >> printf("Testing Config EEPROM\n"); >> - - 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); >> printf("Found '%s'\n", buf); >> break; >> } >> >>> Why remove ee.h and then access the eeprom? >>> I never used the eeprom code, so I'm unshure about it. >>> At least the following line should be added befor printing: >>> buf[15] = '\0'; >> WriteEEPROM() and ReadEEPROM() functions are in libat91. May be ee.c >> should be removed too. >> Yes, The '!' char should be removed from the string. > > Oh - this wasn't abnout the '!' - it was just in case there is > a problem with the eeprom to limit the output. > But after rethinking it would be better to bzero the whole buf > between write and read, since a failure to read the eeprom might > leave the old content completely intact, without anyone to notice. > I have had such problem. >> Index: libat91/Makefile >> =================================================================== >> RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v >> retrieving revision 1.9 >> diff -u -r1.9 Makefile >> - --- libat91/Makefile 13 Jul 2007 14:27:04 -0000 1.9 >> +++ libat91/Makefile 8 Aug 2007 13:49:22 -0000 >> @@ -8,7 +8,7 @@ >> putchar.c printf.c reset.c spi_flash.c xmodem.c \ >> sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ >> memset.c memcmp.c >> - -SRCS+=ashldi3.c divsi3.c >> +SRCS+=ashldi3.c divsi3.S >> NO_MAN= >> >> .if ${MK_TAG_LIST} != "no" >> >>> Why is the filename change needed? >>> This is obviously unrelated to the board support. >>> Do we have a Makefile error in CVS? >> I can't find divsi3.c in the source tree. Yes it seems to be Makefile error. > > I guess these things happen because most of us use perforce code, at > least when building bootcode. > It is likely correct there. > >> Yes, I should do the link negotiation. > > What PHY do you have? rlphy > The link/speed registers are always the same with a few exceptions, > which are usually just integrated PHY. > Even in my case with the switch I get sensible values with Warners > code, but this is for the external port 0, which is unrelated to the > speed between the MAC and the switch. I will add link negotiation here. > >>> Although this is correct with our current code. >>> Please split BOOT_BWCT and BOOT_CENTIPAD here, since I localy have >>> 0xAC added as a valid status: >>> #ifdef BOOT_BWCT >>> value = GetFlashStatus(); >>> if ((value & 0xFC) != 0xAC >>> && (value & 0xFC) != 0xB4) >>> printf(" Bad SPI status: 0x%x\n", value); >>> #else >>> This is because I use AT45DB161D chips in production. >>> The 0xB4 is from the AT45DB321C, which I'd used in prototypes only. >>> I might use other SPI types for special purspose as well. >> Feel free to change anything you wish! > > Since we are in freeze and this is Warners code and he has a blanket > approval, I leave it up to him. > If I would ask RE he will likely have to review it anyway. > Yes, but the the current arm boot code needs these changes at least more people to be able to test it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGueqQxJBWvpalMpkRAoLVAKCcBecAXRpOXHWEASqaXoEh3rPRJQCfTQ8e a9DzYBLsSVFnnmsgWEFGxww= =wQMs -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 16:20:19 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 C982716A41A for ; Wed, 8 Aug 2007 16:20:19 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 6FDB613C45D for ; Wed, 8 Aug 2007 16:20:19 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l78GKH9G006349; Wed, 8 Aug 2007 18:20:17 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l78GKCQB035795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 18:20:13 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l78GKCPc055380; Wed, 8 Aug 2007 18:20:12 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l78GKCnh055379; Wed, 8 Aug 2007 18:20:12 +0200 (CEST) (envelope-from ticso) Date: Wed, 8 Aug 2007 18:20:12 +0200 From: Bernd Walter To: Krassimir Slavchev Message-ID: <20070808162011.GP41893@cicely12.cicely.de> References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> <20070808154756.GN41893@cicely12.cicely.de> <46B9EA90.3050508@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B9EA90.3050508@bulinfo.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: CENTIPAD boot X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de 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 16:20:19 -0000 On Wed, Aug 08, 2007 at 07:08:48PM +0300, Krassimir Slavchev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Bernd Walter wrote: > > On Wed, Aug 08, 2007 at 06:11:31PM +0300, Krassimir Slavchev wrote: > >> Bernd Walter wrote: > >>> On Wed, Aug 08, 2007 at 04:53:28PM +0300, Krassimir Slavchev wrote: > >> Index: libat91/Makefile > >> =================================================================== > >> RCS file: /home/ncvs/src/sys/boot/arm/at91/libat91/Makefile,v > >> retrieving revision 1.9 > >> diff -u -r1.9 Makefile > >> - --- libat91/Makefile 13 Jul 2007 14:27:04 -0000 1.9 > >> +++ libat91/Makefile 8 Aug 2007 13:49:22 -0000 > >> @@ -8,7 +8,7 @@ > >> putchar.c printf.c reset.c spi_flash.c xmodem.c \ > >> sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ > >> memset.c memcmp.c > >> - -SRCS+=ashldi3.c divsi3.c > >> +SRCS+=ashldi3.c divsi3.S > >> NO_MAN= > >> > >> .if ${MK_TAG_LIST} != "no" > >> > >>> Why is the filename change needed? > >>> This is obviously unrelated to the board support. > >>> Do we have a Makefile error in CVS? > >> I can't find divsi3.c in the source tree. Yes it seems to be Makefile error. > > > > I guess these things happen because most of us use perforce code, at > > least when building bootcode. > > It is likely correct there. > > > >> Yes, I should do the link negotiation. > > > > What PHY do you have? > > rlphy I would assume a RTL8201BL or RTL8201C? I have code for the RTL8201BL, which I use with the AT91SAM7X256, but it is likely not correct, since I tried a 10BASET link once and it failed, but I just took the original code without modification though. Anyway - Realtek has datasheets available online. > >>> Although this is correct with our current code. > >>> Please split BOOT_BWCT and BOOT_CENTIPAD here, since I localy have > >>> 0xAC added as a valid status: > >>> #ifdef BOOT_BWCT > >>> value = GetFlashStatus(); > >>> if ((value & 0xFC) != 0xAC > >>> && (value & 0xFC) != 0xB4) > >>> printf(" Bad SPI status: 0x%x\n", value); > >>> #else > >>> This is because I use AT45DB161D chips in production. > >>> The 0xB4 is from the AT45DB321C, which I'd used in prototypes only. > >>> I might use other SPI types for special purspose as well. > >> Feel free to change anything you wish! > > > > Since we are in freeze and this is Warners code and he has a blanket > > approval, I leave it up to him. > > If I would ask RE he will likely have to review it anyway. > > > > Yes, but the the current arm boot code needs these changes at least more > people to be able to test it. I'm not against to seeing it fixed :) But as long as we are in freeze and Warner takes care about it... -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 18:24:09 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 9F43716A420 for ; Wed, 8 Aug 2007 18:24:09 +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 5AF0913C46C for ; Wed, 8 Aug 2007 18:24:09 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id A5F5234803; Wed, 8 Aug 2007 21:24:03 +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 10106-07; Wed, 8 Aug 2007 21:24:01 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id F235D34537; Wed, 8 Aug 2007 21:24:00 +0300 (EEST) Message-ID: <46BA0A40.8030208@bulinfo.net> Date: Wed, 08 Aug 2007 21:24:00 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.5 (X11/20070724) MIME-Version: 1.0 To: ticso@cicely.de References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> <20070808154756.GN41893@cicely12.cicely.de> <46B9EA90.3050508@bulinfo.net> <20070808162011.GP41893@cicely12.cicely.de> In-Reply-To: <20070808162011.GP41893@cicely12.cicely.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: 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 18:24:09 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > I would assume a RTL8201BL or RTL8201C? > I have code for the RTL8201BL, which I use with the AT91SAM7X256, but > it is likely not correct, since I tried a 10BASET link once and it > failed, but I just took the original code without modification though. > Anyway - Realtek has datasheets available online. RTL8201BL -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGugpAxJBWvpalMpkRArWkAKCiVaq8/ogrNH6BINOX2ShjJMBoqQCgkoWc /VR9OKaXNr/bZERoP18pfn0= =3BXb -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 21:06:17 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 9691116A46B for ; Wed, 8 Aug 2007 21:06:17 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id F010C13C4A6 for ; Wed, 8 Aug 2007 21:06:16 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l78L6DlX014809; Wed, 8 Aug 2007 23:06:13 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l78L68fR037764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 23:06:09 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l78L68vw055999; Wed, 8 Aug 2007 23:06:08 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l78L68d7055998; Wed, 8 Aug 2007 23:06:08 +0200 (CEST) (envelope-from ticso) Date: Wed, 8 Aug 2007 23:06:08 +0200 From: Bernd Walter To: Krassimir Slavchev Message-ID: <20070808210607.GR41893@cicely12.cicely.de> References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> <20070808154756.GN41893@cicely12.cicely.de> <46B9EA90.3050508@bulinfo.net> <20070808162011.GP41893@cicely12.cicely.de> <46BA0A40.8030208@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46BA0A40.8030208@bulinfo.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: CENTIPAD boot X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de 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 21:06:17 -0000 On Wed, Aug 08, 2007 at 09:24:00PM +0300, Krassimir Slavchev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > I would assume a RTL8201BL or RTL8201C? > > I have code for the RTL8201BL, which I use with the AT91SAM7X256, but > > it is likely not correct, since I tried a 10BASET link once and it > > failed, but I just took the original code without modification though. > > Anyway - Realtek has datasheets available online. > > RTL8201BL Realtek did something special it seems. You get the duplex state in the BMCR bit 8 (Register 0). 1 = full, 0 = half The speed is in the Test register (25). Bit 0: 1 = 100Mbit link Bit 1: 1 = 10MBit link Bit 0/1 both 0 no link You might want to loop over BMSR (Register 1) bit 3 as well, since a 1 means that auto negotiation has finished. But it might be Ok without it, because there should be enough delays already. In a real world scenario, e.g. in the kernel or running embedded, you'll have to poll the status regulary, to update the MAC accordingly. But it's not required in this case, since the link partner shouldn't change during booting. Let me know if you have success with this, since I'll have to update my AT91SAM7X256 code as well. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de