Esempio n. 1
0
static void e750_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *state)
{
//      unsigned long gplr0 = GPLR0;   FIXME - this really ought to be atomic
//      unsigned long gplr1 = GPLR1;

	state->detect = GPLR_BIT(GPIO_E740_PCMCIA_CD0) ? 0 : 1;
	state->ready  = GPLR_BIT(GPIO_E740_PCMCIA_RDY0) ? 1 : 0;

	state->vs_3v  = 1; //FIXME - is it right?

        state->bvd1   = 1;
        state->bvd2   = 1;
        state->wrprot = 0;
        state->vs_Xv  = 0;
}
Esempio n. 2
0
static void hx2750_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
				    struct pcmcia_state *state)
{
	if(skt->nr == 0){
		state->detect = GPLR_BIT(HX2750_GPIO_CF_DETECT) ? 0 : 1;
		state->ready  = GPLR_BIT(HX2750_GPIO_CF_IRQ) ? 1 : 0;
	}
	else{
		state->detect = 1;
		state->ready  = GPLR_BIT(HX2750_GPIO_CF_WIFIIRQ) ? 1 : 0;
	}

	state->bvd1   = 1;  /* not available */
	state->bvd2   = 1;  /* not available */
	state->vs_3v  = 1;  /* not available */
	state->vs_Xv  = 0;  /* not available */
	state->wrprot = 0;  /* not available */
}