Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Feb 2014 15:11:29 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Steven Lawrance <stl@koffein.net>
Cc:        freebsd-arm <freebsd-arm@FreeBSD.org>
Subject:   Re: i.MX6 on-die temperature sensor
Message-ID:  <1391897489.1196.60.camel@revolution.hippie.lan>
In-Reply-To: <1391893231-sup-6174@luwak.koffein.net>
References:  <1391893231-sup-6174@luwak.koffein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

The thing I did with anatop was a quick hack to get things going because
I have no idea what services that conglomeration of hardware needs to
provide to other entities (yet).  ocotp is another thing I haven't
looked at much, but it might be easier to come up with a clean API it
can provide for other imx drivers.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1391897489.1196.60.camel>