Working on the PCMCIA driver today. Doing a fair bit of code refactoring to make life easier.
Have two snippets:
a) au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<14))|(1<<30), GPIO2_OUTPUT);
b) au_writel((au_readl(GPIO2_PINSTATE) | (1<<14))|(1<<30), GPIO2_OUTPUT);
The 1<<14 indicates a specific location to set, and the 1<<30 says to enable output on that location.
In arch/mips/au1000/xxs1500/board_setup.c, snippet a is commented as 'turn off power'.
In drivers/pcmcia/au1000_xxs1500.c, snippet a is commented as 'turn on power', and snippet b is commented as 'turn off power'.
Which one do I trust? I don't have any wiring diagrams for the unit, so your guess is as good as mine. The CPU here uses a mix of negated and normal pins, so both options could work.
I guess it's just time for trial and error.
I'm still not sure which is right (If I can't solve it, I'll ask mycable), and I've got a few other PCMCIA glitches to deal with still, but it's mostly done. Patch up in the usual place, along with the latest console log.
Have two snippets:
a) au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<14))|(1<<30), GPIO2_OUTPUT);
b) au_writel((au_readl(GPIO2_PINSTATE) | (1<<14))|(1<<30), GPIO2_OUTPUT);
The 1<<14 indicates a specific location to set, and the 1<<30 says to enable output on that location.
In arch/mips/au1000/xxs1500/board_setup.c, snippet a is commented as 'turn off power'.
In drivers/pcmcia/au1000_xxs1500.c, snippet a is commented as 'turn on power', and snippet b is commented as 'turn off power'.
Which one do I trust? I don't have any wiring diagrams for the unit, so your guess is as good as mine. The CPU here uses a mix of negated and normal pins, so both options could work.
I guess it's just time for trial and error.
I'm still not sure which is right (If I can't solve it, I'll ask mycable), and I've got a few other PCMCIA glitches to deal with still, but it's mostly done. Patch up in the usual place, along with the latest console log.