- volatile immap_t *immap = (immap_t *)CFG_IMMR;
- immap->im_cpm.cp_pbdat &= ~(0x0000200);
- immap->im_cpm.cp_pbdir |= 0x00000300;
-}
-
-#elif defined(CONFIG_VIRTLAB2)
-
-#define power_config(slot) do {} while (0)
-static inline void power_off(int slot)
-{
- volatile unsigned char *powerctl =
- (volatile unsigned char *)PCMCIA_CTRL;
- *powerctl = 0;
-}
-
-static inline void power_on_5_0(int slot)
-{
- volatile unsigned char *powerctl =
- (volatile unsigned char *)PCMCIA_CTRL;
- *powerctl = 2; /* Enable 5V Vccout */
-}
-
-static inline void power_on_3_3(int slot)
-{
- volatile unsigned char *powerctl =
- (volatile unsigned char *)PCMCIA_CTRL;
- *powerctl = 1; /* Enable 3.3V Vccout */
-}
-
-#else
-
-static inline void power_config(int slot)
-{
- volatile immap_t *immap = (immap_t *)CFG_IMMR;
- /*
- * Configure Port C pins for
- * 5 Volts Enable and 3 Volts enable
- */
- immap->im_ioport.iop_pcpar &= ~(0x0002 | 0x0004);
- immap->im_ioport.iop_pcso &= ~(0x0002 | 0x0004);
-}
-
-static inline void power_off(int slot)
-{
- volatile immap_t *immap = (immap_t *)CFG_IMMR;
- immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
+ setbits_be16(&immap->im_ioport.iop_pcdat, 0x0002);
+ setbits_be16(&immap->im_ioport.iop_pcdir, 0x0002 | 0x0004);