Date: Mon, 21 Mar 2011 22:35:49 -0700 (PDT) From: PseudoCylon <moonlightakkiy@yahoo.ca> To: Aleksandr Rybalko <ray@dlink.ua> Cc: freebsd-current@freebsd.org, Bernhard Schmidt <bschmidt@freebsd.org> Subject: Re: [CFR]RT305xF support, w/o attachment Message-ID: <642459.13494.qm@web39305.mail.mud.yahoo.com> In-Reply-To: <20110321120024.943B31065686@hub.freebsd.org> References: <20110321120024.943B31065686@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> >> > >> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?642459.13494.qm>