Release 4.11 drivers/pcmcia/sa1100_simpad.c
/*
* drivers/pcmcia/sa1100_simpad.c
*
* PCMCIA implementation routines for simpad
*
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/init.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <mach/simpad.h>
#include "sa1100_generic.h"
static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
skt->stat[SOC_STAT_CD].gpio = GPIO_CF_CD;
skt->stat[SOC_STAT_CD].name = "CF_CD";
skt->stat[SOC_STAT_RDY].gpio = GPIO_CF_IRQ;
skt->stat[SOC_STAT_RDY].name = "CF_RDY";
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 46 | 66.67% | 4 | 50.00% |
Linus Torvalds | 21 | 30.43% | 2 | 25.00% |
Nico Pitre | 1 | 1.45% | 1 | 12.50% |
Jochen Friedrich | 1 | 1.45% | 1 | 12.50% |
Total | 69 | 100.00% | 8 | 100.00% |
static void simpad_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
{
/* Disable CF bus: */
/*simpad_set_cs3_bit(PCMCIA_BUFF_DIS);*/
simpad_clear_cs3_bit(PCMCIA_RESET);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds | 10 | 55.56% | 1 | 25.00% |
Russell King | 5 | 27.78% | 1 | 25.00% |
Jochen Friedrich | 2 | 11.11% | 1 | 25.00% |
Nico Pitre | 1 | 5.56% | 1 | 25.00% |
Total | 18 | 100.00% | 4 | 100.00% |
static void
simpad_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
struct pcmcia_state *state)
{
long cs3reg = simpad_get_cs3_ro();
/* the detect signal is inverted - fix that up here */
state->detect = !state->detect;
state->bvd1 = 1; /* Might be cs3reg & PCMCIA_BVD1 */
state->bvd2 = 1; /* Might be cs3reg & PCMCIA_BVD2 */
if ((cs3reg & (PCMCIA_VS1|PCMCIA_VS2)) ==
(PCMCIA_VS1|PCMCIA_VS2)) {
state->vs_3v=0;
state->vs_Xv=0;
} else {
state->vs_3v=1;
state->vs_Xv=0;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds | 60 | 64.52% | 2 | 25.00% |
Russell King | 18 | 19.35% | 3 | 37.50% |
Jochen Friedrich | 13 | 13.98% | 1 | 12.50% |
Nico Pitre | 1 | 1.08% | 1 | 12.50% |
Holger Hans Peter Freyther | 1 | 1.08% | 1 | 12.50% |
Total | 93 | 100.00% | 8 | 100.00% |
static int
simpad_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
const socket_state_t *state)
{
unsigned long flags;
local_irq_save(flags);
/* Murphy: see table of MIC2562a-1 */
switch (state->Vcc) {
case 0:
simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
break;
case 33:
simpad_clear_cs3_bit(VCC_3V_EN|EN1);
simpad_set_cs3_bit(VCC_5V_EN|EN0);
break;
case 50:
simpad_clear_cs3_bit(VCC_5V_EN|EN1);
simpad_set_cs3_bit(VCC_3V_EN|EN0);
break;
default:
printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
__func__, state->Vcc);
simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
local_irq_restore(flags);
return -1;
}
local_irq_restore(flags);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds | 103 | 81.75% | 2 | 22.22% |
Russell King | 13 | 10.32% | 3 | 33.33% |
Jochen Friedrich | 6 | 4.76% | 1 | 11.11% |
Holger Hans Peter Freyther | 2 | 1.59% | 1 | 11.11% |
Nico Pitre | 1 | 0.79% | 1 | 11.11% |
Harvey Harrison | 1 | 0.79% | 1 | 11.11% |
Total | 126 | 100.00% | 9 | 100.00% |
static void simpad_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
{
simpad_set_cs3_bit(PCMCIA_RESET);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 10 | 62.50% | 2 | 40.00% |
Holger Hans Peter Freyther | 4 | 25.00% | 1 | 20.00% |
Jochen Friedrich | 1 | 6.25% | 1 | 20.00% |
Nico Pitre | 1 | 6.25% | 1 | 20.00% |
Total | 16 | 100.00% | 5 | 100.00% |
static struct pcmcia_low_level simpad_pcmcia_ops = {
.owner = THIS_MODULE,
.hw_init = simpad_pcmcia_hw_init,
.hw_shutdown = simpad_pcmcia_hw_shutdown,
.socket_state = simpad_pcmcia_socket_state,
.configure_socket = simpad_pcmcia_configure_socket,
.socket_suspend = simpad_pcmcia_socket_suspend,
};
int pcmcia_simpad_init(struct device *dev)
{
int ret = -ENODEV;
if (machine_is_simpad())
ret = sa11xx_drv_pcmcia_probe(dev, &simpad_pcmcia_ops, 1, 1);
return ret;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 38 | 100.00% | 3 | 100.00% |
Total | 38 | 100.00% | 3 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds | 216 | 50.82% | 2 | 11.11% |
Russell King | 171 | 40.24% | 11 | 61.11% |
Jochen Friedrich | 23 | 5.41% | 1 | 5.56% |
Holger Hans Peter Freyther | 9 | 2.12% | 2 | 11.11% |
Nico Pitre | 5 | 1.18% | 1 | 5.56% |
Harvey Harrison | 1 | 0.24% | 1 | 5.56% |
Total | 425 | 100.00% | 18 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.