PCMCIA breakage

Francois-Rene Rideau fare@tunes.org
Sun May 2 12:13:04 CEST 2004


Dear Oleg,

by restoring in sa1100_jornada820.c the voltage to its normal setting,
I get my network card to work correctly once again.
If you really need to invert this setting, then things are more tricky
than just systematically inverting the voltage setting.
I have no potentio-meter and proficiency as to use one,
so as to check what happens at the electrical level.

Below is my patch to
	bootimage/linux/kernel/drivers/pcmcia/sa1100_jornada820.c
I didn't commit this patch to CVS,
since you are the one who knows about PCMCIA hacking.
I invite other hackers to try with and without my patch,
and see what makes their vaious cards and combinations work at all.

Cheers!

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
[  TUNES project for a Free Reflective Computing System  | http://tunes.org  ]
Don't worry about what anybody else is going to do. The best way to predict
the future is to invent it. Really smart people with reasonable funding can
do just about anything that doesn't violate too many of Newton's Laws!
	-- Alan Kay, 1971
------>8------>8------>8------>8------>8------>8------>8------>8------>8------
diff -u sa1100_jornada820.c.oleg  sa1100_jornada820.c 
--- sa1100_jornada820.c.oleg    2004-05-02 11:56:28.000000000 +0200
+++ sa1100_jornada820.c 2004-05-02 11:58:49.000000000 +0200
@@ -29,16 +29,26 @@
   
   state->state[0].detect = (status & PCSR_S0_detected)     ? 0 : 1;
   state->state[0].ready  = (status & PCSR_S0_ready)        ? 1 : 0;
+#ifdef JORNADA820_PCMCIA_INVERT_VOLTAGE
   state->state[0].vs_3v  = (status & PCSR_S0_VS1)          ? 0 : 1;
   state->state[0].vs_Xv  = (status & PCSR_S0_VS2)          ? 0 : 1;
-  state->state[0].bvd1   = (status & PCSR_S0_BVD1_nSTSCHG) ? 1 : 0 ;
+#else
+  state->state[0].vs_3v  = (status & PCSR_S0_VS1)          ? 1 : 0;
+  state->state[0].vs_Xv  = (status & PCSR_S0_VS2)          ? 1 : 0;
+#endif
+  state->state[0].bvd1   = (status & PCSR_S0_BVD1_nSTSCHG) ? 1 : 0;
   state->state[0].bvd2   = (status & PCSR_S0_BVD2_nSPKR)   ? 1 : 0;
   state->state[0].wrprot = (status & PCSR_S0_WP)           ? 1 : 0;
   
   state->state[1].detect = (status & PCSR_S1_detected)     ? 0 : 1;
   state->state[1].ready  = (status & PCSR_S1_ready)        ? 1 : 0;
+#ifdef JORNADA820_PCMCIA_INVERT_VOLTAGE
   state->state[1].vs_3v  = (status & PCSR_S1_VS1)          ? 0 : 1;
   state->state[1].vs_Xv  = (status & PCSR_S1_VS2)          ? 0 : 1;
+#else
+  state->state[1].vs_3v  = (status & PCSR_S1_VS1)          ? 1 : 0;
+  state->state[1].vs_Xv  = (status & PCSR_S1_VS2)          ? 1 : 0;
+#endif
   state->state[1].bvd1   = (status & PCSR_S1_BVD1_nSTSCHG) ? 1 : 0;
   state->state[1].bvd2   = (status & PCSR_S1_BVD2_nSPKR)   ? 1 : 0;
   state->state[1].wrprot = (status & PCSR_S1_WP)           ? 1 : 0;

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
[  TUNES project for a Free Reflective Computing System  | http://tunes.org  ]
Amateurs talk strategy. Professionals talk logistics. - old military saying


More information about the Jornada820 mailing list