Date: Wed, 30 Jun 2010 15:01:00 +1200 From: Andrew Turner <andrew@fubar.geek.nz> To: Ho Van Than <hvanthan@gmail.com> Cc: freebsd-arm@freebsd.org Subject: Re: Porting FreeBSD-S3c2410 - Root file system Message-ID: <20100630150100.5a62ac48@bender> In-Reply-To: <AANLkTimE4Yx7FMYSpfNQ6S4sAplYbHuKWnYD8wuEDICe@mail.gmail.com> References: <AANLkTinxWmMnw3FaFOc20QqPLGHnPiEQNDeZwbZ-2WLK@mail.gmail.com> <20100629.140202.177810546962018279.imp@bsdimp.com> <AANLkTilYghHyxJU7SrAosD3JZ-gDFhkc9DgdswaUJ1cY@mail.gmail.com> <20100630115257.597789bb@bender> <AANLkTimE4Yx7FMYSpfNQ6S4sAplYbHuKWnYD8wuEDICe@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 Jun 2010 07:40:58 +0700 Ho Van Than <hvanthan@gmail.com> wrote: > Hi, > > I patched dm9000 to source code and compiled ok but still not yet > success. I have a question at booting time "dm9000" auto run with > kernel or we have to manual run it. (sorry I am newbie in FreeBSD). The patch only provides the driver. It doesn't contain the changes required to attach the driver to the rest of the system as it depends on how the chip is attached to the micro. Assuming it is connected to the memory bus you should only need to (within sys/arm/s3c2xx0): * Edit s3c24x0_machdep.c to add an entry to s3c24x0_devmap. You should be able to copy one of the other entries and change the first three fields (virtual address, physical address and size). Set the virtual address to something free in the kernel space (above 0xc0000000). 0xe8000000 should work. The physical address is the address the DM9000 is attached to, this will depend on which chip select it is attached to. The size is the size of the register space on the DM9000, 0x100. * Edit s3c24x0.c and add to s3c24x0_attach a call bus_space_map. You will need to give it the physical address and size from above. You can create the handle for the last argument for this look in s3c2xx0var.h at the _ioh entries in struct s3c2xx0_softc. * In the same function add the following just before the call to bus_space_probe: child = s3c24x0_add_child(dev, 0, "dme", 0); bus_set_resource(child, SYS_RES_MEMORY, 0, <virtual address>, 0x100); Change the virtual address to what you set it to in the first step. I've been working on simplifying this process but haven't finished it yet. Andrew -- Andrew Turner WhiteQueue Consulting http://whitequeue.com/ Custom FreeBSD and Linux development
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100630150100.5a62ac48>