From owner-freebsd-arm@FreeBSD.ORG Wed Jun 30 03:00:44 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 058DD1065672 for ; Wed, 30 Jun 2010 03:00:44 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id C3BF78FC22 for ; Wed, 30 Jun 2010 03:00:43 +0000 (UTC) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 2457E109B07; Tue, 29 Jun 2010 23:00:43 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 29 Jun 2010 23:00:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=date:from:to:cc:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=smtpout; bh=eI5lYt80eHT4pXEQd8qVd8EcDdM=; b=uFI3LEt8iTahJsuWj1NN3PgVdi+emULnnnGH+d5Rr0gnE27wPVXMui8K+9fL2AWYSn0jAFxm0YERzvIZUoHyvdqIjUE0RVzx6Ka0GrBO3X/RVnHMUQlYigoUlgyTu2Y0n9dht+zR0BecmPFeucBfH/Cuq1XC8Xma5mkI4pptQ2M= X-Sasl-enc: Vv/UyTLxWubg0uhiGE+If0/h5tCyvUcDL6vMrmwPP9ZH 1277866842 Received: from bender (unknown [202.6.116.238]) by mail.messagingengine.com (Postfix) with ESMTPA id F36506ACCF; Tue, 29 Jun 2010 23:00:41 -0400 (EDT) Date: Wed, 30 Jun 2010 15:01:00 +1200 From: Andrew Turner To: Ho Van Than Message-ID: <20100630150100.5a62ac48@bender> In-Reply-To: References: <20100629.140202.177810546962018279.imp@bsdimp.com> <20100630115257.597789bb@bender> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; i386-portbld-freebsd8.0) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Porting FreeBSD-S3c2410 - Root file system 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: Wed, 30 Jun 2010 03:00:44 -0000 On Wed, 30 Jun 2010 07:40:58 +0700 Ho Van Than 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, , 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