15 #include <linux/module.h>
16 #include <linux/kernel.h>
17 #include <linux/device.h>
18 #include <linux/errno.h>
21 #include <mach/hardware.h>
59 static int badge4_pcmvcc = 50;
60 static int badge4_pcmvpp = 50;
61 static int badge4_cfvcc = 33;
63 static void complain_about_jumpering(
const char *whom,
68 "%s: %s %d.%dV wanted but board is jumpered for %s %d.%dV operation"
69 "; re-jumper the board and/or use pcmv=xx,xx,xx\n",
71 wanted / 10, wanted % 10,
73 given / 10, given % 10);
83 if ((state->
Vcc != 0) &&
84 (state->
Vcc != badge4_pcmvcc)) {
85 complain_about_jumpering(__func__,
"pcmvcc",
86 badge4_pcmvcc, state->
Vcc);
90 if ((state->
Vpp != 0) &&
91 (state->
Vpp != badge4_pcmvpp)) {
92 complain_about_jumpering(__func__,
"pcmvpp",
93 badge4_pcmvpp, state->
Vpp);
99 if ((state->
Vcc != 0) &&
100 (state->
Vcc != badge4_cfvcc)) {
101 complain_about_jumpering(__func__,
"cfvcc",
102 badge4_cfvcc, state->
Vcc);
118 need5V = ((state->
Vcc == 50) || (state->
Vpp == 50));
130 .configure_socket = badge4_pcmcia_configure_socket,
139 if (machine_is_badge4()) {
141 "%s: badge4_pcmvcc=%d, badge4_pcmvpp=%d, badge4_cfvcc=%d\n",
143 badge4_pcmvcc, badge4_pcmvpp, badge4_cfvcc);
153 static int __init pcmv_setup(
char *
s)
159 if (v[0] >= 1) badge4_pcmvcc = v[1];
160 if (v[0] >= 2) badge4_pcmvpp = v[2];
161 if (v[0] >= 3) badge4_cfvcc = v[3];