static u_int m8xx_get_speed(u_int ns, u_int is_io);
#endif
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
/* look up table for pgcrx registers */
const char *indent = "\t ";
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
}
#endif /* CFG_CMD_PCMCIA */
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_LWMON)
# define CFG_PCMCIA_TIMING (PCMCIA_SHT(9) | PCMCIA_SST(3) | PCMCIA_SL(12))
break;
}
case 6:
- case 2: { /* map I/O window for command/ctrl reg block */
+ case 2: { /* map I/O window for cmd/ctrl reg block */
win->or = ( PCMCIA_BSIZE_1K
| PCMCIA_PPS_8
| PCMCIA_PRS_IO
++win;
}
- for (i = 0, rc = 0, slot = _slot_; i < PCMCIA_SOCKETS_NO; i++, slot = !slot) {
+ for (i=0, rc=0, slot=_slot_; i<PCMCIA_SOCKETS_NO; i++, slot = !slot) {
/* turn off voltage */
if ((rc = voltage_set(slot, 0, 0)))
continue;
-
+
/* Enable external hardware */
if ((rc = hardware_enable(slot)))
continue;
-
+
#ifdef CONFIG_IDE_8xx_PCCARD
if ((rc = check_ide_device(i)))
continue;
return (rc);
}
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
#endif /* CFG_CMD_PCMCIA */
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#ifdef CONFIG_IDE_8xx_PCCARD
int found = 0;
int i;
- addr = (volatile uchar *)(CFG_PCMCIA_MEM_ADDR +
- CFG_PCMCIA_MEM_SIZE * (slot * 4));
+ addr = (volatile uchar *)(CFG_PCMCIA_MEM_ADDR +
+ CFG_PCMCIA_MEM_SIZE * (slot * 4));
debug ("PCMCIA MEM: %08X\n", addr);
start = p = (volatile uchar *) addr;
}
#endif /* CONFIG_IDE_8xx_PCCARD */
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
-/* ---------------------------------------------------------------------------- */
-/* board specific stuff: */
-/* voltage_set(), hardware_enable() and hardware_disable() */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* board specific stuff: */
+/* voltage_set(), hardware_enable() and hardware_disable() */
+/* -------------------------------------------------------------------- */
-/* ---------------------------------------------------------------------------- */
-/* RPX Boards from Embedded Planet */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* RPX Boards from Embedded Planet */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_RPXCLASSIC) || defined(CONFIG_RPXLITE)
#endif /* CFG_CMD_PCMCIA */
#endif /* CONFIG_RPXCLASSIC */
-/* ---------------------------------------------------------------------------- */
-/* (F)ADS Boards from Motorola */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* (F)ADS Boards from Motorola */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_ADS) || defined(CONFIG_FADS)
#endif /* (F)ADS */
-/* ---------------------------------------------------------------------------- */
-/* TQM8xxL Boards by TQ Components */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* TQM8xxL Boards by TQ Components */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_TQM8xxL)
pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
- /* disable interrupts & DMA */
- PCMCIA_PGCRX(_slot_) = 0;
-
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = 0;
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
immap->im_ioport.iop_pcdat |= 0x0002;
puts (" 3.3V card found: ");
}
- immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
+ immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
#if 0
/* VCC switch error flag, PCMCIA slot INPACK_ pin */
cp->cp_pbdir &= ~(0x0020 | 0x0010);
/* remove all power */
immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
- /* Configure PCMCIA General Control Register */
- PCMCIA_PGCRX(_slot_) = 0;
-
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
+ reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
* and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
(pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
immap->im_ioport.iop_pcdat |= reg;
- immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
+ immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
if (reg) {
debug ("PCMCIA powered at %sV\n",
(reg&0x0004) ? "5.0" : "3.3");
#endif /* TQM8xxL */
-/* ---------------------------------------------------------------------------- */
-/* LWMON Board */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* LWMON Board */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_LWMON)
reg = pic_read (0x60);
debug ("[%d] PIC read: reg_60 = 0x%02x\n", __LINE__, reg);
reg &= ~0x10;
- /* reg |= 0x08; Vpp not needed */
+ /* reg |= 0x08; Vpp not needed */
pic_write (0x60, reg);
#ifdef DEBUG
reg = pic_read (0x60);
pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
- /* disable interrupts & DMA */
- PCMCIA_PGCRX(_slot_) = 0;
-
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = 0;
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
}
/* switch VCC on */
- val |= MAX1604_OP_SUS | MAX1604_VCCBON;
+ val |= MAX1604_OP_SUS | MAX1604_VCCBON;
i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
i2c_write (CFG_I2C_POWER_A_ADDR, 0, 0, &val, 1);
i2c_write (CFG_I2C_POWER_A_ADDR, 0, 0, &val, 1);
/* Configure PCMCIA General Control Register */
- PCMCIA_PGCRX(_slot_) = 0;
-
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
+ reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
* and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
#endif /* LWMON */
-/* ---------------------------------------------------------------------------- */
-/* GTH board by Corelatus AB */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* GTH board by Corelatus AB */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_GTH)
#define PCMCIA_BOARD_MSG "GTH COMPACT FLASH"
-static int voltage_set(int slot, int vcc, int vpp)
-{ /* Do nothing */
- return 0;
+static int voltage_set (int slot, int vcc, int vpp)
+{ /* Do nothing */
+ return 0;
}
static int hardware_enable (int slot)
{
- volatile immap_t *immap;
- volatile cpm8xx_t *cp;
- volatile pcmconf8xx_t *pcmp;
- volatile sysconf8xx_t *sysp;
- uint reg, mask;
-
- debug ("hardware_enable: GTH Slot %c\n", 'A'+slot);
-
- immap = (immap_t *)CFG_IMMR;
- sysp = (sysconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_siu_conf));
- pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
- cp = (cpm8xx_t *)(&(((immap_t *)CFG_IMMR)->im_cpm));
-
- /* clear interrupt state, and disable interrupts */
- pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
- pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
-
- /* disable interrupts & DMA */
- PCMCIA_PGCRX(_slot_) = 0;
-
- /*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
- */
- debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
- PCMCIA_PGCRX(_slot_) = reg;
- udelay(500);
-
- /*
- * Make sure there is a card in the slot, then configure the interface.
- */
- udelay(10000);
- debug ("[%d] %s: PIPR(%p)=0x%x\n",
- __LINE__,__FUNCTION__,
- &(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
- if (pcmp->pcmc_pipr & 0x98000000) {
- printf (" No Card found\n");
- return (1);
- }
-
- mask = PCMCIA_VS1(slot) | PCMCIA_VS2(slot);
- reg = pcmp->pcmc_pipr;
- debug ("PIPR: 0x%x ==> VS1=o%s, VS2=o%s\n",
- reg,
- (reg&PCMCIA_VS1(slot))?"n":"ff",
- (reg&PCMCIA_VS2(slot))?"n":"ff");
+ volatile immap_t *immap;
+ volatile cpm8xx_t *cp;
+ volatile pcmconf8xx_t *pcmp;
+ volatile sysconf8xx_t *sysp;
+ uint reg, mask;
- debug ("Enable PCMCIA buffers and stop RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
- PCMCIA_PGCRX(_slot_) = reg;
+ debug ("hardware_enable: GTH Slot %c\n", 'A' + slot);
- udelay(250000); /* some cards need >150 ms to come up :-( */
+ immap = (immap_t *) CFG_IMMR;
+ sysp = (sysconf8xx_t *) (&(((immap_t *) CFG_IMMR)->im_siu_conf));
+ pcmp = (pcmconf8xx_t *) (&(((immap_t *) CFG_IMMR)->im_pcmcia));
+ cp = (cpm8xx_t *) (&(((immap_t *) CFG_IMMR)->im_cpm));
- debug ("# hardware_enable done\n");
+ /* clear interrupt state, and disable interrupts */
+ pcmp->pcmc_pscr = PCMCIA_MASK (_slot_);
+ pcmp->pcmc_per &= ~PCMCIA_MASK (_slot_);
- return 0;
+ /*
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
+ */
+ debug ("Disable PCMCIA buffers and assert RESET\n");
+ reg = 0;
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ PCMCIA_PGCRX (_slot_) = reg;
+ udelay (500);
+
+ /*
+ * Make sure there is a card in the slot,
+ * then configure the interface.
+ */
+ udelay (10000);
+ debug ("[%d] %s: PIPR(%p)=0x%x\n",
+ __LINE__, __FUNCTION__,
+ &(pcmp->pcmc_pipr), pcmp->pcmc_pipr);
+ if (pcmp->pcmc_pipr & 0x98000000) {
+ printf (" No Card found\n");
+ return (1);
+ }
+
+ mask = PCMCIA_VS1 (slot) | PCMCIA_VS2 (slot);
+ reg = pcmp->pcmc_pipr;
+ debug ("PIPR: 0x%x ==> VS1=o%s, VS2=o%s\n",
+ reg,
+ (reg & PCMCIA_VS1 (slot)) ? "n" : "ff",
+ (reg & PCMCIA_VS2 (slot)) ? "n" : "ff");
+
+ debug ("Enable PCMCIA buffers and stop RESET\n");
+ reg = PCMCIA_PGCRX (_slot_);
+ reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
+ PCMCIA_PGCRX (_slot_) = reg;
+
+ udelay (250000); /* some cards need >150 ms to come up :-( */
+
+ debug ("# hardware_enable done\n");
+
+ return 0;
}
#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
static int hardware_disable(int slot)
#endif /* CFG_CMD_PCMCIA */
#endif /* CONFIG_GTH */
-/* ---------------------------------------------------------------------------- */
-/* ICU862 Boards by Cambridge Broadband Ltd. */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* ICU862 Boards by Cambridge Broadband Ltd. */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_ICU862)
pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
- /* disable interrupts & DMA */
- PCMCIA_PGCRX(_slot_) = 0;
-
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = 0;
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
reg = cp->cp_pbdat;
if ((pipr & mask) == mask) {
- reg |= (TPS2205_VPP_PGM | TPS2205_VPP_VCC | /* VAVPP => Hi-Z */
- TPS2205_VCC3); /* 3V off */
+ reg |= (TPS2205_VPP_PGM | TPS2205_VPP_VCC | /* VAVPP => Hi-Z */
+ TPS2205_VCC3); /* 3V off */
reg &= ~(TPS2205_VCC5); /* 5V on */
puts (" 5.0V card found: ");
} else {
- reg |= (TPS2205_VPP_PGM | TPS2205_VPP_VCC | /* VAVPP => Hi-Z */
- TPS2205_VCC5); /* 5V off */
+ reg |= (TPS2205_VPP_PGM | TPS2205_VPP_VCC | /* VAVPP => Hi-Z */
+ TPS2205_VCC5); /* 5V off */
reg &= ~(TPS2205_VCC3); /* 3V on */
puts (" 3.3V card found: ");
}
cp->cp_pbdat &= ~(TPS2205_SHDN);
/* Configure PCMCIA General Control Register */
- PCMCIA_PGCRX(_slot_) = 0;
-
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
+ reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
* and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
* Switch off all voltages, assert shutdown
*/
reg = cp->cp_pbdat;
- reg |= (TPS2205_VPP_PGM | TPS2205_VPP_VCC | /* VAVPP => Hi-Z */
- TPS2205_VCC3 | TPS2205_VCC5 | /* VAVCC => Hi-Z */
- TPS2205_SHDN); /* enable switch */
+ reg |= (TPS2205_VPP_PGM | TPS2205_VPP_VCC | /* VAVPP => Hi-Z */
+ TPS2205_VCC3 | TPS2205_VCC5 | /* VAVCC => Hi-Z */
+ TPS2205_SHDN); /* enable switch */
cp->cp_pbdat = reg;
cp->cp_pbpar &= ~(TPS2205_INPUTS | TPS2205_OUTPUTS);
#endif /* ICU862 */
-/* ---------------------------------------------------------------------------- */
-/* C2MON Boards by TTTech Computertechnik AG */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* C2MON Boards by TTTech Computertechnik AG */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_C2MON)
pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
- /* disable interrupts & DMA */
- PCMCIA_PGCRX(_slot_) = 0;
-
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = 0;
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
/* Configure PCMCIA General Control Register */
- PCMCIA_PGCRX(_slot_) = 0;
-
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
+ reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
* and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
#endif /* C2MON */
-/* ----------------------------------------------------------------------------
- MBX board from Morotola
- ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* MBX board from Morotola */
+/* -------------------------------------------------------------------- */
#if defined( CONFIG_MBX )
#include <../board/mbx8xx/csr.h>
pcmp->pcmc_pscr = PCMCIA_MASK (_slot_);
pcmp->pcmc_per &= ~PCMCIA_MASK (_slot_);
- /* disable interrupts & DMA */
- PCMCIA_PGCRX (_slot_) = 0;
-
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX (_slot_);
+ reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX (_slot_) = reg;
}
#endif /* CFG_CMD_PCMCIA */
#endif /* CONFIG_MBX */
-/* ---------------------------------------------------------------------------- */
-/* R360MPI Board */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* R360MPI Board */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_R360MPI)
pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
- /* disable interrupts & DMA */
- PCMCIA_PGCRX(_slot_) = 0;
-
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = 0;
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
immap->im_ioport.iop_padat |= 0x0200;
/* Configure PCMCIA General Control Register */
- PCMCIA_PGCRX(_slot_) = 0;
-
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
+ reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
* and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(_slot_);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
immap->im_ioport.iop_pcdat &= !reg;
if (reg & 0x0400)
immap->im_ioport.iop_padat &= !reg;
- immap->im_ioport.iop_pcdir |= 0x0200;
- immap->im_ioport.iop_padir |= 0x0400;
+ immap->im_ioport.iop_pcdir |= 0x0200;
+ immap->im_ioport.iop_padir |= 0x0400;
if (reg) {
debug ("PCMCIA powered at %sV\n",
(reg&0x0400) ? "5.0" : "3.3");
#endif /* R360MPI */
-/* ---------------------------------------------------------------------------- */
-/* KUP4K Board */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* KUP4K Board */
+/* -------------------------------------------------------------------- */
#if defined(CONFIG_KUP4K)
#define PCMCIA_BOARD_MSG "KUP4K"
pcmp->pcmc_pscr = PCMCIA_MASK(slot);
pcmp->pcmc_per &= ~PCMCIA_MASK(slot);
- /* disable interrupts & DMA */
- PCMCIA_PGCRX(slot) = 0;
-
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(slot);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = 0;
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(slot) = reg;
udelay(2500);
immap = (immap_t *)CFG_IMMR;
pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
cp = (cpm8xx_t *)(&(((immap_t *)CFG_IMMR)->im_cpm));
-
+
/* remove all power */
if (slot)
cp->cp_pbdat |= KUP4K_PCMCIA_B_3V3;
/* Configure PCMCIA General Control Register */
- PCMCIA_PGCRX(slot) = 0;
-
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(slot);
+ reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(slot) = reg;
* and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
- reg = PCMCIA_PGCRX(slot);
- reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
- reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ reg = PCMCIA_PGCRX(slot);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(slot) = reg;
udelay(500);
-/* ---------------------------------------------------------------------------- */
-/* End of Board Specific Stuff */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* End of Board Specific Stuff */
+/* -------------------------------------------------------------------- */
-/* ---------------------------------------------------------------------------- */
-/* MPC8xx Specific Stuff - should go to MPC8xx directory */
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
+/* MPC8xx Specific Stuff - should go to MPC8xx directory */
+/* -------------------------------------------------------------------- */
/*
* Search this table to see if the windowsize is
0x00800000, 0x00400000, 0x00100000, 0x00200000 };
-/* ---------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
static u_int m8xx_get_graycode(u_int size)
{
return k;
}
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#if 0
static u_int m8xx_get_speed(u_int ns, u_int is_io)
}
#endif
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#ifdef CONFIG_IDE_8xx_PCCARD
static void print_funcid (int func)
}
#endif /* CONFIG_IDE_8xx_PCCARD */
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#ifdef CONFIG_IDE_8xx_PCCARD
static void print_fixed (volatile uchar *p)
}
#endif /* CONFIG_IDE_8xx_PCCARD */
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#ifdef CONFIG_IDE_8xx_PCCARD
}
#endif /* CONFIG_IDE_8xx_PCCARD */
-/* ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------- */
#endif /* CFG_CMD_PCMCIA || (CFG_CMD_IDE && CONFIG_IDE_8xx_PCCARD) */