Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 May 2000 14:31:27 -0600
From:      Warner Losh <imp@village.org>
To:        Duncan Barclay <dmlb@ragnet.demon.co.uk>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Getting an aligned IO port 
Message-ID:  <200005082031.OAA79569@harmony.village.org>
In-Reply-To: Your message of "Mon, 08 May 2000 18:31:32 BST." <XFMail.000508183132.dmlb@computer.my.domain> 
References:  <XFMail.000508183132.dmlb@computer.my.domain>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <XFMail.000508183132.dmlb@computer.my.domain> Duncan Barclay writes:
: How can get a 16byte aligned ISA IO port from the resource allocator? I need
: this to get if_xe working for Realport cards.
: 
: This aspect of the driver is nothing to do with Warner's changes to PCCard.

I'm going to have to commit the byte alignment stuff that was posted a
while ago committed.

Until then, you request 16 bytes from the system for the ioports.
Since this is pccard, you'll likely want to map it in the 0x100 -
0x3ff range:
	start = 0x100;
	end = 0x3ff;
	rid = 1;		/* 0 is managed by pccardd */
	do {
		res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, start,
			end, 16, RF_ACTIVE);
		if (res == 0)
			break;		/* we failed */
		if ((rman_get_start(res) & 0xf) == 0)
			break;		/* good */
		start = (rman_get_start(res) + 15) & ~0xf;
	} while (1);

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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