From owner-freebsd-arm@FreeBSD.ORG Tue Jun 1 04:17:00 2010 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 008761065678 for ; Tue, 1 Jun 2010 04:17:00 +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 99AA18FC1F for ; Tue, 1 Jun 2010 04:16:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o514Ebqx018912; Mon, 31 May 2010 22:14:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 31 May 2010 22:14:46 -0600 (MDT) Message-Id: <20100531.221446.770914110756584248.imp@bsdimp.com> To: yohanes@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: at91sam9g20 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, 01 Jun 2010 04:17:00 -0000 In message: Yohanes Nugroho writes: : I have started AT91SAM9G20 FreeBSD-arm port several months ago with : the Hot-e (HL201 donated by John Nicholls). It mostly works now, but : the code organization is still very messy (I added many #ifdefs), I : need advice on this. : : What works: I can boot to single/multi user mode using USB disk, and : networking (it works well, 100 mbps). What doesn't work yet: NAND, : Audio, Video (John said, his team is working on this, so I am not : touching this). : : I have few questions: : : - What is the best way to merge AT91RM9200 code with AT91SAM9G20, some : code. I know there are several people that started to work on other : Atmel Chips, but the code never gets commited, for example: : : http://bsdimp.blogspot.com/2007/03/followup-atmel-at91-family-work.html : http://marc.info/?l=freebsd-arm&m=123783989612142&w=2 Yes. There's a lot of ideas, but I never had time to implement them. The best part would be to convert the atmel port to use FDT and that would nicely solve most of the problems. : it has been talked about: : : http://lists.freebsd.org/pipermail/freebsd-arm/2009-May/001742.html : http://lists.freebsd.org/pipermail/freebsd-arm/2009-May/001743.html : : But Sylvestre Gallon didn't continue his work (and didn't reply my : email), so should I just try to implement what Warner Losh suggested? : I will need someone with RM9200 board to help me test if my : refactoring still works on the RM9200 board (or someone care to donate : one to me?). I can try the board I have... : - From the state of the freebsd NAND http://wiki.freebsd.org/NAND, if : I want to write the NAND driver, I should go with FreeBSD NAND Flash : Framework (http://p4db.freebsd.org/branchView.cgi?BRANCH=nand2) right? : (I hope the code is quite stable now). Yes. None of my gear has NAND hardware though. Just NOR memory. : - I've got the SPI code to work, and modify the hardcoded value in : at45d for the dataflash. I can get the JEDEC ID and status. But how : do i test reading from the /dev/flash/spi0 from userspace? dd if=/dev/flash/spi0 bs=block-size : In case anyone wants to have a look at my (still) messy code or wants : to play around with it: : : - Audio: I don't have a clue where to start writing the device driver : for this. Can anyone points me to some documents/source code to study? : : http://gitorious.org/freebsd-arm I wish I had the time to review this, but I'm somewhat swamped for the next few weeks.... Warner