PCMCIA on MBX860

Paul Ruhland pruhland at rochester.rr.com
Mon Feb 5 06:27:50 EST 2001


On Sunday 04 February 2001 14:22, Paul Ruhland wrote:
> On Sunday 04 February 2001 13:49, Paul Ruhland wrote:
> > Steve,
> >
> > I will send you the changes for the MBX860 in another reply tomorrow (
> > 20010205 ).  All of that code is presently on my work machine.
>
> I managed to find an a patch for the pcmcia-cs-3.1.22 I made for the mbx...

I guess attaching the patch would have been a good idea...I need email
software that automatically attaches files I'm referring to...hahaha.

Don't forget to modify the config.in stuff to match your development layout.


-------------------------------
Paul Ruhland
Micrwave Data Systems Inc.
175 Science Parkway
Rochester, NY 14620
TEL: +1.716.242.8372
EMAIL: pruhland at microwavedata.com
-------------- next part --------------
Only in pcmcia-cs-3.1.22: .prereq.ok
diff -c --recursive tar/pcmcia-cs-3.1.22/Configure pcmcia-cs-3.1.22/Configure
*** tar/pcmcia-cs-3.1.22/Configure	Wed Nov  8 00:00:37 2000
--- pcmcia-cs-3.1.22/Configure	Fri Dec  8 14:24:37 2000
***************
*** 433,438 ****
--- 433,439 ----
      	printflag "MPC8xx architecture" CONFIG_8xx
      	printflag "Embedded Planet LITE platform" CONFIG_RPXLITE
      	printflag "Embedded Planet CLASSIC platfom" CONFIG_RPXCLASSIC
+         printflag "Motorola MBX platform" CONFIG_MBX
      	printflag "MPC823 processor" CONFIG_MPC823
      	printflag "MPC850 processor" CONFIG_MPC850
      	printflag "MPC860 processor" CONFIG_MPC860
***************
*** 573,578 ****
--- 574,580 ----
  	    configcheck CONFIG_8xx
  	    configcheck CONFIG_RPXLITE
  	    configcheck CONFIG_RPXCLASSIC
+             configcheck CONFIG_MBX
  	    configcheck CONFIG_MPC823
  	    configcheck CONFIG_MPC850
  	    configcheck CONFIG_MPC860

diff -c --recursive tar/pcmcia-cs-3.1.22/config.in pcmcia-cs-3.1.22/config.in
*** tar/pcmcia-cs-3.1.22/config.in	Thu Jun 15 23:23:48 2000
--- pcmcia-cs-3.1.22/config.in	Fri Dec  8 14:03:14 2000
***************
*** 1,17 ****
  #
  # config.in 1.16 2000/06/15 18:23:48 (David Hinds)
  #
! LINUX=/usr/src/linux
! PREFIX=
! MODDIR=
! CC=cc
! LD=ld
  PCDEBUG=
  KFLAGS=
  UFLAGS=
! ARCH=
  UNSAFE_TOOLS=n
! CONFIG_CARDBUS=y
  CONFIG_PNP=n
  USE_PM=y
  CONF_SRC=1
--- 1,17 ----
  #
  # config.in 1.16 2000/06/15 18:23:48 (David Hinds)
  #
! LINUX=/home/paulr/projects/nethop/linux
! PREFIX=/home/paulr/projects/nethop/target
! MODDIR=/lib/modules/2.2.14
! CC=ppc_8xx-gcc
! LD=ppc_8xx-ld
  PCDEBUG=
  KFLAGS=
  UFLAGS=
! ARCH=ppc
  UNSAFE_TOOLS=n
! CONFIG_CARDBUS=n
  CONFIG_PNP=n
  USE_PM=y
  CONF_SRC=1

diff -c --recursive tar/pcmcia-cs-3.1.22/modules/m8xx_pcmcia.c pcmcia-cs-3.1.22/modules/m8xx_pcmcia.c
*** tar/pcmcia-cs-3.1.22/modules/m8xx_pcmcia.c	Wed Oct 25 05:15:51 2000
--- pcmcia-cs-3.1.22/modules/m8xx_pcmcia.c	Mon Dec 11 10:44:36 2000
***************
*** 94,99 ****
--- 94,105 ----
  #endif
  #endif
  
+ /* The MBX uses SLOT_A */
+ #ifdef CONFIG_MBX
+ #define CONFIG_PCMCIA_SLOT_A
+ #define CONFIG_BD_IS_HZ
+ #endif
+ 
  #endif /* !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B) */
  
  /* ------------------------------------------------------------------------- */
***************
*** 138,146 ****
  #endif
  
  #ifdef CONFIG_BD_IS_MHZ
! #define M8XX_BUSFREQ ((mpc8xx_bdinfo->bi_busfreq) * 1000000)
  #else
! #define M8XX_BUSFREQ (mpc8xx_bdinfo->bi_busfreq)
  #endif
  
  static int pcmcia_schlvl = PCMCIA_SCHLVL;
--- 144,154 ----
  #endif
  
  #ifdef CONFIG_BD_IS_MHZ
! //#define M8XX_BUSFREQ ((mpc8xx_bdinfo->bi_busfreq) * 1000000)
! #define M8XX_BUSFREQ ((50) * 1000000)
  #else
! //#define M8XX_BUSFREQ (mpc8xx_bdinfo->bi_busfreq)
! #define M8XX_BUSFREQ ((50) * 1000000)
  #endif
  
  static int pcmcia_schlvl = PCMCIA_SCHLVL;
***************
*** 396,401 ****
--- 404,461 ----
  }
  
  #endif
+ 
+ /* --------------------------------------------------------------------------*/
+ /* MBX Boards from Motorola */
+ 
+ #if defined(CONFIG_MBX)
+ 
+ #define PCMCIA_BOARD_MSG "MBX860"
+ 
+ static int voltage_set(int slot, int vcc, int vpp)
+ {
+ 	unsigned char reg = 0;
+ 
+ 	switch(vcc) {
+ 	case 0: break;
+ 	case 33: reg |= 0x80; break;
+ 	case 50: reg |= 0x40; break;
+ 	default: return 1;
+ 	}
+ 
+ 	switch(vpp) {
+ 	case 0: break;
+ 	case 33: 
+ 	case 50:
+ 		if(vcc == vpp)
+ 			reg |= 0x20;
+ 		else
+ 			return 1;
+ 		break;
+ 	case 120: 
+ 		reg |= 0x10;
+ 	default: return 1;
+ 	}
+ 
+ 	if(!((vcc == 50) || (vcc == 0)))
+ 	   return 1;
+ 
+ 	/* first, turn off all power */
+ 
+ 	*((unsigned char*)(MBX_CSR_ADDR + 1)) &= ~(0x80 | 0x40 | 0x20 | 0x10 );
+ 
+ 	/* enable new powersettings */
+ 
+ 	*((unsigned char*)(MBX_CSR_ADDR + 1)) |= reg;
+ 
+ 	return 0;
+ }
+ 
+ #define socket_get(_slot_) PCMCIA_SOCKET_KEY_5V
+ #define hardware_enable(_slot_)  /* No hardware to enable */
+ #define hardware_disable(_slot_) /* No hardware to disable */
+ 
+ #endif /* CONFIG_MBX */
  
  /* ------------------------------------------------------------------------- */


More information about the Linuxppc-embedded mailing list