From owner-freebsd-arm@FreeBSD.ORG Sat Feb 8 23:06:18 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31C25CD1 for ; Sat, 8 Feb 2014 23:06:18 +0000 (UTC) Received: from smtpauth2.wiscmail.wisc.edu (wmauth2.doit.wisc.edu [144.92.197.222]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2245172C for ; Sat, 8 Feb 2014 23:06:17 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0N0P009008LC7500@smtpauth2.wiscmail.wisc.edu> for freebsd-arm@freebsd.org; Sat, 08 Feb 2014 17:06:10 -0600 (CST) X-Spam-PmxInfo: Server=avs-2, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.2.8.225715, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from comporellon.tachypleus.net (adsl-76-208-68-77.dsl.mdsnwi.sbcglobal.net [76.208.68.77]) by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0N0P00D669I90S00@smtpauth2.wiscmail.wisc.edu> for freebsd-arm@freebsd.org; Sat, 08 Feb 2014 17:06:10 -0600 (CST) Message-id: <52F6B861.8010908@freebsd.org> Date: Sat, 08 Feb 2014 17:06:09 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 To: freebsd-arm@freebsd.org Subject: Re: i.MX6 on-die temperature sensor References: <1391893231-sup-6174@luwak.koffein.net> <1391897489.1196.60.camel@revolution.hippie.lan> In-reply-to: <1391897489.1196.60.camel@revolution.hippie.lan> X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Feb 2014 23:06:18 -0000 On 02/08/14 16:11, Ian Lepore wrote: > On Sat, 2014-02-08 at 22:32 +0100, Steven Lawrance wrote: >> Hi all, >> >> a Wandboard turned up on my desk yesterday and I thought I'd get >> started with something simple -- the on-chip temperature sensor. >> >> A patch is attached, but I've got a few questions, mostly about FDTs: >> >> The driver doesn't need to reserve any resources for itself but rather >> refer to two others, anatop and ocotp. How can that relationship be >> represented in the FDT? >> >> How is the sequence of device attachments determined? Just by the >> order in the FDT? The current scenario seems quite fragile if that's >> the case. >> >> For the OCOTP (on-chip one-time-programmable memory) side of things, I >> just followed the pattern in imx6_anatop.c, which is to provide public >> methods for accessing its memory space. But it feels a bit dirty -- I >> imagine there could be cases where you would have two similar blocks >> and things would fall apart. >> >> cheers, >> > Yeah, the devices are attached in the order listed in the fdt, which is > pretty horrible and affects us we get fdt data mostly from linux (the > source of standard fdt data for boards), and it isn't driven by the > order of things in the data. > This isn't true. They are only attached in FDT order if your driver does not specify an alternative. -Nathan