Re: MediaQ Problems --> SOLVED

From: Pattrick Hueper <pattyh_at_gmx.net>
Date: Sat, 21 Feb 2004 21:17:55 +0100

Hi,

Andrew, thanks for the tip! i found the problem:

in h2200.c the GPIO registers are inited like this:

GPSR0 = GPSRx_InitValue;
GPCR0 = ~GPSRx_InitValue;

but GPSRx_InitValue is #defined without braces, thus the negated value
is wrong. I braced all the xxx_InitValue's in h2200-init.h, and afterwards:

...
MediaQ 1188 chip detected, base IRQ 104
...

Great!

Greetings, Patty

Here is the output from cvs diff:

Index: include/asm-arm/arch-pxa/h2200-init.h
===================================================================
RCS file: /cvs/linux/kernel26/include/asm-arm/arch-pxa/h2200-init.h,v
retrieving revision 1.3
diff -r1.3 h2200-init.h
352c352
< #define GPDRx_InitValue
GPDRx_i0+GPDRx_i1+GPDRx_i2+GPDRx_i3+GPDRx_i4+GPDRx_i5+GPDRx_i6+GPDRx_i7

---
 > #define GPDRx_InitValue        
(GPDRx_i0+GPDRx_i1+GPDRx_i2+GPDRx_i3+GPDRx_i4+GPDRx_i5+GPDRx_i6+GPDRx_i7)
362c362
< #define GPDRy_InitValue        
GPDRy_i0+GPDRy_i1+GPDRy_i2+GPDRy_i3+GPDRy_i4+GPDRy_i5+GPDRy_i6+GPDRy_i7
---
 > #define GPDRy_InitValue        
(GPDRy_i0+GPDRy_i1+GPDRy_i2+GPDRy_i3+GPDRy_i4+GPDRy_i5+GPDRy_i6+GPDRy_i7)
369c369
< #define GPDRz_InitValue        
GPDRz_i0+GPDRz_i1+GPDRz_i2+GPDRz_i3+GPDRz_i4
---
 > #define GPDRz_InitValue        
(GPDRz_i0+GPDRz_i1+GPDRz_i2+GPDRz_i3+GPDRz_i4)
381c381
< #define GAFR1x_InitValue        GAFR1x_i0+GAFR1x_i1+GAFR1x_i2+GAFR1x_i3
---
 > #define GAFR1x_InitValue        (GAFR1x_i0+GAFR1x_i1+GAFR1x_i2+GAFR1x_i3)
387c387
< #define GAFR0y_InitValue        GAFR0y_i0+GAFR0y_i1+GAFR0y_i2+GAFR0y_i3
---
 > #define GAFR0y_InitValue        (GAFR0y_i0+GAFR0y_i1+GAFR0y_i2+GAFR0y_i3)
393c393
< #define GAFR1y_InitValue        GAFR1y_i0+GAFR1y_i1+GAFR1y_i2+GAFR1y_i3
---
 > #define GAFR1y_InitValue        (GAFR1y_i0+GAFR1y_i1+GAFR1y_i2+GAFR1y_i3)
399c399
< #define GAFR0z_InitValue        GAFR0z_i0+GAFR0z_i1+GAFR0z_i2+GAFR0z_i3
---
 > #define GAFR0z_InitValue        (GAFR0z_i0+GAFR0z_i1+GAFR0z_i2+GAFR0z_i3)
411c411
< #define GPSRx_InitValue        
GPSRx_i0+GPSRx_i1+GPSRx_i2+GPSRx_i3+GPSRx_i4+GPSRx_i5+GPSRx_i6+GPSRx_i7
---
 > #define GPSRx_InitValue        
(GPSRx_i0+GPSRx_i1+GPSRx_i2+GPSRx_i3+GPSRx_i4+GPSRx_i5+GPSRx_i6+GPSRx_i7)
421c421
< #define GPSRy_InitValue        
GPSRy_i0+GPSRy_i1+GPSRy_i2+GPSRy_i3+GPSRy_i4+GPSRy_i5+GPSRy_i6+GPSRy_i7
---
 > #define GPSRy_InitValue        
(GPSRy_i0+GPSRy_i1+GPSRy_i2+GPSRy_i3+GPSRy_i4+GPSRy_i5+GPSRy_i6+GPSRy_i7)
428c428
< #define GPSRz_InitValue        
GPSRz_i0+GPSRz_i1+GPSRz_i2+GPSRz_i3+GPSRz_i4
---
 > #define GPSRz_InitValue        
(GPSRz_i0+GPSRz_i1+GPSRz_i2+GPSRz_i3+GPSRz_i4)
441c441
< #define GPSRx_SleepValue        
GPSRx_si0+GPSRx_si1+GPSRx_si2+GPSRx_si3+GPSRx_si4+GPSRx_si5+GPSRx_si6+GPSRx_si7
---
 > #define GPSRx_SleepValue        
(GPSRx_si0+GPSRx_si1+GPSRx_si2+GPSRx_si3+GPSRx_si4+GPSRx_si5+GPSRx_si6+GPSRx_si7)
451c451
< #define GPSRy_SleepValue        
GPSRy_si0+GPSRy_si1+GPSRy_si2+GPSRy_si3+GPSRy_si4+GPSRy_si5+GPSRy_si6+GPSRy_si7
---
 > #define GPSRy_SleepValue        
(GPSRy_si0+GPSRy_si1+GPSRy_si2+GPSRy_si3+GPSRy_si4+GPSRy_si5+GPSRy_si6+GPSRy_si7)
458c458
< #define GPSRz_SleepValue        
GPSRz_si0+GPSRz_si1+GPSRz_si2+GPSRz_si3+GPSRz_si4
---
 > #define GPSRz_SleepValue        
(GPSRz_si0+GPSRz_si1+GPSRz_si2+GPSRz_si3+GPSRz_si4)
   
Andrew Zabolotny wrote:
>On Fri, 20 Feb 2004 16:44:14 +0100
>Pattrick Hueper <pattyh_at_gmx.net> wrote:
>
>  
>
>>However, when i try to initialize it i get this:
>>drivers/misc/soc/mq11xx_base.c:426 Unknown device ID (5338:5338)
>>    
>>
>5338:5338 is just plain garbage.
>
>  
>
>>MediaQ device initialization failed!
>>    
>>
>This just means MediaQ is either not present at the shown physical
>addresses, or the MediaQ chip was powered off. A friend had the same
>problem on Rover PC P5+ because of the line "GPCR0=0xffffffff" in
>machine initialization. One of the first 32 GPIOs somehow powered off
>MediaQ or something like that.
>
>  
>
>>Strange: the IDs change with every access, is the MediaQ device not 
>>enabled?? what do i need to do to enable it?
>>    
>>
>It's strange because it must be enabled from WinCE. It means either you
>use an old CVS with that GPCR0 line, or MediaQ is somehow powered off
>during machine initialization. Alas, I don't know how to get it to work
>since I don't have any datasheets on mq1178. From register dumps I can
>see just that it is very similar to mediaQ 1132, but I also see there
>are differences.
>
>--
>Greetings,
>   Andrew
>_______________________________________________
>H2200-port mailing list
>H2200-port_at_handhelds.org
>https://handhelds.org/mailman/listinfo/h2200-port
>
>
>  
>
Received on Sat Feb 21 2004 - 20:18:24 EST

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:25 EDT