I82365 driver question
"Sanjay Jain" <[email protected]> Mon, 8 Apr 2002 17:10:30 -0700
| Newsgroups | gmane.linux.pcmcia.devel |
|---|---|
| Message-ID | <[email protected]> |
hi,
I am trying to port pcmcia-cs-3.1.33 to MIPS platform. I have
a question regarding code i365_set_mem_map() routine in i82365.c.
Following code sets the card offset register.
...
...
i365_set_pair(s, base+I365_W_STOP, i);
i = ((mem->card_start - mem->sys_start) >> 12) & 0x3fff;
if (mem->flags & MAP_WRPROT) i |= I365_MEM_WRPROT;
if (mem->flags & MAP_ATTRIB) i |= I365_MEM_REG;
i365_set_pair(s, base+I365_W_OFF, i);
.....
......
Why mem->sys_start is being subtracted from card_start? As per
the spec these registers should contain mem->card_start.
With this code in place, I was not able to read CIS.
I had to change it to
i = (mem->card_start >> 12) & 0x3fff;
Now I can see card CIS.
Can someone please tell me why original code is required?
Thanks
Sanjay
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of dhinds
Sent: Saturday, March 30, 2002 6:59 PM
To: Marcel Holtmann
Cc: [email protected]
Subject: Re: [Pcmcia-cs-devel]Getting the socket number from within the
driver
On Sat, Mar 30, 2002 at 11:59:12PM +0100, Marcel Holtmann wrote:
> I have the 3Com Bluetooth card and this card needs a firmware download.
> This download must be done before we can register this device to the
> BlueZ HCI layer. As I can't distribute the firmware within the driver
> for legal reasons it should be loaded trough a user space program on
> card init. I want to call this program as a kernel thread and only give
> the socket as a parameter. The user program reads the iobase and the
> manfid from the socket and performs the firmware download. With the
> completation of the user program the device is fully initialized and can
> be registered to the HCI layer. I don't want to have a firmware loader
> that I have to call with the iobase. Are there any other possibilities
> to solve my problem?
What's the reason for not wanting to pass the iobase to the firmware
loader? That seems convenient enough to me, and saves the loader from
having to do the lookup.
-- Dave
_______________________________________________
Pcmcia-cs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pcmcia-cs-devel
_______________________________________________
Pcmcia-cs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pcmcia-cs-devel
Sponsored by http://www.ThinkGeek.com/