Juergen Schindele wrote:
> Am Donnerstag, 8. Juni 2006 14:06 schrieb Iordan (Danny) Ignatov:
>   
>> Hi,
>>
>> I have the isp116x running fine on my ixp425 platform under kernel
>> 2.4.27-uc1, where it maps to IXP425_EXP_BUS_CS4_BASE_VIRT = 0xf4000000
>> (the 2.4.27 driver does not perform ioremap). However with kernel -
>> 2.6.12, (same platform and settings as in the 2.4.27 case) I provide the
>> physical address IXP425_EXP_BUS_CS4_BASE_PHYS  = 0x54000000 which is
>> then ioremap'd  (togther with 0x54000002 for addr) after which I am
>> unable to read/write from/to the chip (all registers when read come with
>> the same value of 0x1000)? Is it a mem mapping problem or is it maybe an
>> issue with the read/write procedures (or maybe something else that I
>> hvent thought about)?
>>     
> Hi Danny,
> i had the same problem and solved it.
> the problems are the readw / writew calls in data and register acces functions
> defined in isp116x.h. For a BIG_ENDIAN kernel readw / writew swaps bytes.
> when writing 0x0027 the value 0x2700 is driven on the expansion bus.
>
> i replaced the readw / writew lines like this :
>
> #if (defined CONFIG_ARCH_IXP4XX) && (defined CONFIG_ARCH_SUPPORTS_BIG_ENDIAN)
>         val = (u32) __raw_readw(isp116x->data_reg);
> #else
>         val = (u32) readw(isp116x->data_reg);
> #endif
>
> #if (defined CONFIG_ARCH_IXP4XX) && (defined CONFIG_ARCH_SUPPORTS_BIG_ENDIAN)
>         __raw_writew(reg, isp116x->addr_reg);
> #else
>         writew(reg, isp116x->addr_reg);
> #endif
>
> I am using moooore recent kernel 2.6.14 but this should work for 2.4.x too.
> Check it out.
> --------------------------------------------------------------
> Jürgen Schindele            NENTEC Netzwerktechnologie GmbH
> Entwicklung                 Greschbachstrasse 12
>                             76229 Karlsruhe/Germany
> eMail:[EMAIL PROTECTED]   Phone: +49(0)721 94249-<51>
> Web:   www.nentec.de        Fax:   +49(0)721 94249-10
> --------------------------------------------------------------
>
>
>   
Hi Juergen,

Thanks for the help!!! The change form readw/writew to 
__raw_readw/writew fixed the problem. Perhaps the #ifdefined should 
become a permanent fixture in the driver for all BIG_ENDIAN users.
Now the driver seems to load properly however when i plug my usb mouse i 
get the following errors :

 usb 1-1: new low speed USB device using isp116x-hcd and address 7
usb 1-1: device not accepting address 7, error -32
usb 1-1: new low speed USB device using isp116x-hcd and address 8
usb 1-1: device not accepting address 8, error -32
usb 1-1: new low speed USB device using isp116x-hcd and address 9
usb 1-1: device not accepting address 9, error -32
usb 1-1: new low speed USB device using isp116x-hcd and address 10
usb 1-1: device not accepting address 10, error -32

As i mentioned i am using kernel 2.6.12 for which the usb core driver 
apparently comes with a new  device initialization scheme. Just to be on 
the safe side I have switched back to the old scheme (it is an option in 
usb.c) which didn't help as i am getting the errors displayed above. Any 
ideas what is going wrong ?

Regards,
Danny




_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to