From owner-freebsd-arm@FreeBSD.ORG Sun May 24 19:31:18 2009 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 18FF71065692 for ; Sun, 24 May 2009 19:31:18 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: from mail-gx0-f179.google.com (mail-gx0-f179.google.com [209.85.217.179]) by mx1.freebsd.org (Postfix) with ESMTP id CA3538FC1D for ; Sun, 24 May 2009 19:31:17 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by gxk27 with SMTP id 27so1106427gxk.19 for ; Sun, 24 May 2009 12:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=1CFmA19k4qxwmQNZ+37exgmQLv/aRgQRO4ln+C0pyRE=; b=qGd6ntzGYR3q23c3q+qtaTdHtrdiKCoUQsxtrvGUFiD4Znl0rbaGOlzyJYqssHFG7W jXFWgCDkTaJNrVWE9aaEpr0UHEp9NKm2HAsYKR49/zCL2q3dz0nNfZQO4vuBAsTOBttX 1Taxx6qcocKNaTKSVgmxyA1HzGwaoPqctUH5k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=tdStOa5UWs2HFg0WO7NU6YJUm7H8BdXhBpkCT2wNndi1/TW+OtJNJL12SMEwwMht0f B+g9au9ALhKiwxxWjKNVPYMzxZ0BQ5QNb9mNTs3RgIFycbHsxUpTz3S8arV4rByntt7W PyfAsxKUfRqRBTZ4c3xXnNQ2PJheiPj5+CvnU= MIME-Version: 1.0 Received: by 10.231.15.7 with SMTP id i7mr1223399iba.43.1243192010448; Sun, 24 May 2009 12:06:50 -0700 (PDT) From: Sylvestre Gallon Date: Sun, 24 May 2009 19:06:30 +0000 Message-ID: <164b4c9c0905241206s570a15b1ob6214e9505329ae@mail.gmail.com> To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: at91 SoC separation 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: Sun, 24 May 2009 19:31:19 -0000 Hi, I am currently working on the at91sam9261ek port for the Google Summer Of Code 2009. Currently I work on how I could implement the at91sam9261ek most efficiently. I notice that all the at91 code could be at91 System On Chip independent with some few changes. The big work is to extract the SoC specific code in a separate file by SoC. It's what I tried to do on my perforce : perforce repo : http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/soc2009/syl_usb/src/sys/arm/at91&HIDEDEL=NO Changes that I've done : http://perforce.freebsd.org/changeList.cgi?FSPC=%2F%2Fdepot%2Fprojects%2Fsoc2009%2Fsyl_usb%2Fsrc%2Fsys%2Farm%2Fat91%2F...&USERS=syl&GROUPS=soc2009&ignore=GO! One thing that continues to disturb me : On At91 SoC, the IPs and their registers are quite the same. The only big change that exists between these SoC are the base addresses for each IPs. The different SoC generic drivers may need IPs base addresses to perform the mapping of registers. For the moment to not have some ugly #ifdef like : #ifdef __AT91RM9200__ #include #elif __AT91SAM9261__ #include #elfi __ANOTHER_SOC__ #include #endif I have created base address accessors in the SoC file. But I'm not sure I like that... Do you have some ideas to handle it in a better way ? When All the code of at91 will be SoC independents It will be very easy to port any other at91 board (1 or 2 days of work by cpu). I have also access to a lot of atmel board, I live near Atmel French R&D and know some people who work there who are ready to lend me boards with these SoC : - at91sam9260 - at91sam9261 - at91sam9263 - at91sam9rl - at91sam9m10 (not officially out, and not yet in Linux ;) ) - at91cap9 - .. I'am open to all suggestions, it is important for me to implement the at91sam9261ek (and perhaps other) port the best way I can to have a chance to see it in current after the Google Summer Of Code :) Cheers, -- Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org)