Hi, Roman,
I got two questions regarding your patch on isp1161 driver.
1. What will happen if the length is 1 byte in the READ_REGn16 function?
2.As not much embedded device will use this kind of ISA card( hcport =
0x290), they may directly map those registers into memory and can do 1 step
reading with FPGA assistant, is that better to define some general macro like
GET_GRAME_NUMBER(hci) instead of calling READ_REG(hci, **) directly?
Thanks and Regards,
Li Yi
static inline void READ_REGn16 (hci_t * hci, int regindex, int length, __u8 *
buffer)
{
hcipriv_t * hp = &hci->hp;
int i;
int val = 0;
outw (regindex, hp->hcport + 2);
for (i = 0; i < length; i += 2) {
val = inw (hp->hcport);
buffer [i] = val;
buffer [i+1] = val >> 8;
}
if (length & 1) {
val = inw (hp->hcport);
buffer [length - 1] = val;
}
}
Roman Weissgaerber wrote:
> Hi,
>
> enclosed is an experimental version of a host
> controller driver for a Philips isp1161 HC.
> The patch is against Linux-2.4.8 but it
> should also work with other versions.
> (Just compile hc_isp1161.c; it includes the rest.
>
> It consists of a simple HCD frontend for
> embedded systems (hc_simple.[hc])
> and a backend for the isp1161
> (hc_isp1161.[hc] hc_isp1161_rh.c).
> The root-hub is OHCI compatible but the
> TD-handling is different (single list).
> ISO support is not finished yet. I have tested it
> on a isp1161 ISA card (ES1 chip version) with
> a HUB, a Keyboard and a pegasus-tongle.
>
> Regards
>
> Roman
>
> ------------------------------------------------------------------------
> Name: hc_isp1161-0.8.patch.gz
> hc_isp1161-0.8.patch.gz Type: application/x-gzip
> Encoding: base64
begin:vcard
n:Li;Yi
tel;fax:+65-481-6997
tel;work:+65-486-3796
x-mozilla-html:FALSE
org:Global Software Group, Embedded System ;<html> <img src="http://SL.sps.mot.com/images/MotLogo-rotating_sm.gif"> </html>
version:2.1
email;internet:[EMAIL PROTECTED]
title:Sotftware Engineer
adr;quoted-printable:;;Singapore Software Center=0D=0AMotorola Innovation Centre - Level 3A=0D=0A12 Ang Mo Kio Street 64=0D=0A;Singapore;;569088;Singapore
fn:Yi Li
end:vcard