1 // SPDX-License-Identifier: GPL-2.0
3 * linux/drivers/pcmcia/sa1100_neponset.c
5 * Neponset PCMCIA specific routines
7 #include <linux/module.h>
8 #include <linux/kernel.h>
9 #include <linux/device.h>
10 #include <linux/errno.h>
11 #include <linux/init.h>
13 #include <asm/mach-types.h>
15 #include "sa1111_generic.h"
19 * Neponset uses the Maxim MAX1600, with the following connections:
23 * A0VCC SA-1111 GPIO A<1>
24 * A1VCC SA-1111 GPIO A<0>
25 * A0VPP CPLD NCR A0VPP
26 * A1VPP CPLD NCR A1VPP
27 * B0VCC SA-1111 GPIO A<2>
28 * B1VCC SA-1111 GPIO A<3>
29 * B0VPP ground (slot B is CF)
30 * B1VPP ground (slot B is CF)
35 * 12INB ground (slot B is CF)
37 * The MAX1600 CODE pin is tied to ground, placing the device in
38 * "Standard Intel code" mode. Refer to the Maxim data sheet for
39 * the corresponding truth table.
41 static int neponset_pcmcia_hw_init(struct soc_pcmcia_socket
*skt
)
46 ret
= max1600_init(skt
->socket
.dev
.parent
, &m
,
47 skt
->nr
? MAX1600_CHAN_B
: MAX1600_CHAN_A
,
56 neponset_pcmcia_configure_socket(struct soc_pcmcia_socket
*skt
, const socket_state_t
*state
)
58 struct max1600
*m
= skt
->driver_data
;
61 ret
= sa1111_pcmcia_configure_socket(skt
, state
);
63 ret
= max1600_configure(m
, state
->Vcc
, state
->Vpp
);
68 static struct pcmcia_low_level neponset_pcmcia_ops
= {
70 .hw_init
= neponset_pcmcia_hw_init
,
71 .configure_socket
= neponset_pcmcia_configure_socket
,
76 int pcmcia_neponset_init(struct sa1111_dev
*sadev
)
78 sa11xx_drv_pcmcia_ops(&neponset_pcmcia_ops
);
79 return sa1111_pcmcia_add(sadev
, &neponset_pcmcia_ops
,
80 sa11xx_drv_pcmcia_add_one
);