From owner-freebsd-current@FreeBSD.ORG Tue Mar 22 06:02:30 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E4D1065675 for ; Tue, 22 Mar 2011 06:02:29 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web39305.mail.mud.yahoo.com (web39305.mail.mud.yahoo.com [66.94.238.172]) by mx1.freebsd.org (Postfix) with SMTP id 90A3A8FC12 for ; Tue, 22 Mar 2011 06:02:29 +0000 (UTC) Received: (qmail 22884 invoked by uid 60001); 22 Mar 2011 05:35:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1300772149; bh=InWgYwVelpbRCnjfb0iOkFYO/vQ6emZyZ8609HFmDOA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=YDYnj97UZPRyH6IpT+dqx7DRXGZSAccXgKDFug/X1a1XyBSKP/wMnVtc1kyPL2HfmhZ35lFhuRYXqhC0KDaaros50N2SA0F7VNh0cSSicFhzqD8YxPtGrljPbVDEGyWHW6Qf4H9D3SOOWWjgK1Snjl0t0CfRVQvNDONp53SoutE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=vjZgW0hn/eTNKpBadq/jorVzh49LBGYa73EpXDWqboDLEOP9JyfCCRQ5Iy12rQUq1aGbLYvovLXr6+83AiAczbndVrwvnBMQzAC7KGRaWAGv9gRHis7B6vQUeEnAlrl372sg0zlUGIHFArI7Db2GGJa21ZavY2ZmHWojjpMrvoo=; Message-ID: <642459.13494.qm@web39305.mail.mud.yahoo.com> X-YMail-OSG: QDyMzgIVM1lqjF411n9qrSnviuatfASPRWRvTTqVEQF1Gsh hbm.sxbqDhKtMjEqglLqvynks5lCZnWZC.wF111zzC8o.opdSUdkm848RijU Pzdx1BfxUfAtP_U8vjGFNTbFGxrtolZMRgZAYpzGG.KDJDKAtY_GBgjA0BVw yjwvnuN0tJQlC0lxDsucPfKB_sEHdFSpd8ijgXL11BQKhttfjk1uudQKRQKN d7mU4q2u4CABcBhyEucQf8XJEwAeJM.nUwTW.Bi8mVdJCxFNuAJLUGAiff5l ZUNBGP2H3OKmmYH_cdLg2EWKZRz_kqmSiMk2dZFw_Sb1liyjESvpUFE8EKZJ 4CRcTgiVqcuCo9H_vvet6qhnX9HwZbKg.XgRtIwqSe4iBWOZhSHM0cgE9wjj 2_C0bEBGbK.xX2isjbA-- Received: from [199.126.192.176] by web39305.mail.mud.yahoo.com via HTTP; Mon, 21 Mar 2011 22:35:49 PDT X-Mailer: YahooMailRC/559 YahooMailWebService/0.8.109.295617 References: <20110321120024.943B31065686@hub.freebsd.org> Date: Mon, 21 Mar 2011 22:35:49 -0700 (PDT) From: PseudoCylon To: Aleksandr Rybalko In-Reply-To: <20110321120024.943B31065686@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-current@freebsd.org, Bernhard Schmidt Subject: Re: [CFR]RT305xF support, w/o attachment X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 06:02:30 -0000 > >> > >> I urge you to have a closer look at ral(4) and it's way of handling > >> RT2500 and RT2600 specific differences. In it's simplest form you can > >> copy the OpenBSD code 1:1 without any functional changes, heck, it's > >> the source of this driver anyway. > >> > >> -- > >> Bernhard > > I've look on difference between RT2[56]00 and RT2860 some time ago, but done >it again, and found that we can only place > RT2860/RT3090 support under same name (ral), but hardware have too big >difference. And in case I do this patch for RT3052F SoC, > when I placing RT2860 into ral, i get completely different driver (because SoC >don't use PCI interface). > > > So can You (or someone else) hint me, how to done this? > > switch (what to do) { > case 'Remake run to support PCI and SoC interface': > Much work to make driver bus independent; > case 'Port OpenBSD one': > driver do not support SoC (SoC device don't have MCU); > break; > case 'Place my RT2860 under dev/ral': > different device in same driver; > break; > } > I'd say porting OpenBSD's is smarter move than remaking run(4). OpenBSD's ral(4) supports RT2800/RT3090, http://www.openbsd.org/cgi-bin/man.cgi?apropos=0&sektion=4&query=ral&manpath=OpenBSD+Current&arch=i386&format=html so ported code should nicely fit into FreeBSD's sys/dev/ral/ folder. It seems pci related code is separated, http://fxr.watson.org/fxr/source/dev/ral/ driver - pci code might nicely fit SoC code too. FreeBSD's if_runreg.h is the same as OpenBSD's if_rt2860reg.h. (Though, I have been ignoring syncing changes related to RT3090. run(4) doesn't supports it.) In fact, OpenBSD doesn't have if_runreg.h, instead they share if_rt2860reg.h. We can separate, but >90% of them would be identical. I don't have h/w but I might be able help you out non-SoC portion of code. AK