Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 May 2004 23:34:55 +0200
From:      Thomas Moestl <t.moestl@tu-bs.de>
To:        Joerg Wunsch <joerg_wunsch@interface-systems.de>
Cc:        sparc64@freebsd.org
Subject:   Re: ebus resource allocation error?
Message-ID:  <20040509213455.GA744@timesink.dyndns.org>
In-Reply-To: <20040509171444.B63877@ida.interface-business.de>
References:  <20040509171444.B63877@ida.interface-business.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2004/05/09 at 17:14:44 +0200, Joerg Wunsch wrote:
> I'm currently investigating the chances of writing a driver for the
> SUNW,envctrl device of my E450.  Supposedly, this is an I²C bus, so
> it's my hope to eventually setup the driver as a glue interface
> between the Sun hardware and iicbus/smbus.
> 
> This hardware has the curious (for me at least) situation that it
> gets two IRQs assigned:
> 
> SUNW,envctrl0: <EBus SUNW,envctrl> addr 0x1400600000-0x1400600003 irq 2021,2024 on ebus0
> 
> However, when trying to bus_alloc_resource the second IRQ, I always
> get a resource allocation error.  Since the code used for resource
> allocation is basically the same as I've successfully been using to
> allocate multiple IO port ranges in my auxio driver, I rather suspect
> a problem in the ebus code itself.
> 
> Below are the current probe messages, attached is the source code.
> (Please do not redistribute by now, it's really only a stub driver.)
> 
> SUNW,envctrl0: <EBus SUNW,envctrl> addr 0x1400600000-0x1400600003 irq 2021,2024 on ebus0
> SUNW,envctrl0: Got IRQ rid 0, start 0x7e8, count 0x1
> SUNW,envctrl0: Got IRQ rid 1, start 0x7e5, count 0x1
> SUNW,envctrl0: could not allocate resources: 2nd IRQ
> device_probe_and_attach: SUNW,envctrl0 attach returned 6

>From e450 firmware property dumps I have lying around it seems likely
that 0x7e5 is the power failure notification interrupt of one of the
Psycho PCI bridges. The Psycho driver does not allocate it with
RF_SHAREABLE (and neither does your code), thus the error.

Would an envctrl driver actually need this interrupt, or does this
just indicate that envctrl is the device that really triggers power
failure interrupts?

	- Thomas

-- 
Thomas Moestl	<t.moestl@tu-bs.de>	http://www.tu-bs.de/~y0015675/
		<tmm@FreeBSD.org>	http://people.FreeBSD.org/~tmm/
"Where do we keep all our chainsaws, Mom?"	-- Calvin and Hobbes



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