From owner-freebsd-arm@FreeBSD.ORG Mon Jul 26 15:57:03 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 C64DE106567D for ; Mon, 26 Jul 2010 15:57:03 +0000 (UTC) (envelope-from gja@ansley.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8A0C18FC1E for ; Mon, 26 Jul 2010 15:57:03 +0000 (UTC) Received: by gxk24 with SMTP id 24so1100061gxk.13 for ; Mon, 26 Jul 2010 08:57:00 -0700 (PDT) Received: by 10.101.170.3 with SMTP id x3mr7965225ano.142.1280159820205; Mon, 26 Jul 2010 08:57:00 -0700 (PDT) Received: from G5.internal.ansley.com (99-135-104-139.lightspeed.tukrga.sbcglobal.net [99.135.104.139]) by mx.google.com with ESMTPS id h5sm6805271anb.8.2010.07.26.08.56.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Jul 2010 08:56:58 -0700 (PDT) Sender: Greg Ansley Message-ID: <4C4DB049.5030701@ansley.com> Date: Mon, 26 Jul 2010 11:56:57 -0400 From: Greg Ansley User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 MIME-Version: 1.0 To: freebsd-arm@freebsd.org, "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: at91sam9g20: Patches 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: Mon, 26 Jul 2010 15:57:04 -0000 Here is the link to the promised patches (against this mornings head): http://idisk.mac.com/gansley//Public/sam9.diff.gz These patches have been tested on a KB9202C and an Atmel AT91SAM9G20EK Rev B. Adding the SAM926[01] chips should be trivial and only very slightly more effort for the SAM9263. Adding a new at91 cpu/chip should only require adding a new at91${cputype}.c and at91${cputype}reg.h files and possible small additions to at91_machdep.c for anything that has to happen *very* early in the boot process. The drivers now use their resource records to find the correct addresses for the hardware and no longer have hard coded offsets (at91_st.c is an exception since it is only on the RM9200 so I didn't touch it). at91_mci.c: * Compile and run time selection of "Slot B" of mci controller. * Compile and run time selection of 4 wire connection (4x bandwidth to slot). * No byte swapping on non-RM9200 targets. * Fix obscure segfault when bus_dma_load() fails in at91_mci_start_cmd(). at91_pit.c: * Support for full resolution timer counter. * Remove compile time address dependencies. at91_rst.c: (NEW) * Support SAM9 reset controller. * Implement shutdown() on NRST (reset button) and full reset if held for more the 5 seconds. at91_reset.c: (NEW) * SAM9G20 Errata: Reset During SDRAM Accesses at91_wdt.c: (NEW) * Support SAM9 watchdog timer using the watchdog(9) style interface. if_ate.c: * Add support for sam9 "EMAC" controller. * Support for rmii interface to phy. at91.c & at91sam9.c: * Eliminate separate at91sam9.c file. * Eliminate chip specific code. * Allow for automatic chip identification. at91_machdep.c & at at91sam9_machdep.c: * Automatic chip type determination. * Remove compile time chip dependencies. * Eliminate separate at91sam9_machdep.c file. at91_pmc.c: * Corrected support for all of the sam926? and sam9g20 chips. * Remove compile time chip dependencies. * Automatic generation of "peripheral" clocks references using device name/unit e.g. "spi0". at91_twireg.c: * Handle clocking differences for SAM9 family. at91_pio.c * remove unnecessary chip specfic addressing. at91rm9200.c (NEW) * Chip specific initialization. at91sam9g20.c (NEW) * Chip specific initialization. Greg Ansley