sl811_cs.c (7feabb6412ea23edd298c0fa90e5aa6733eb4a42) sl811_cs.c (1ac71e5a35eebee60cdcf15b3980bd94498f037b)
1/*
2 * PCMCIA driver for SL811HS (as found in REX-CFU1U)
3 * Filename: sl811_cs.c
4 * Author: Yukio Yamamoto
5 *
6 * Port to sl811-hcd and 2.6.x by
7 * Botond Botyanszki <boti@rocketmail.com>
8 * Simon Pickering

--- 6 unchanged lines hidden (view full) ---

15#include <linux/init.h>
16#include <linux/ptrace.h>
17#include <linux/slab.h>
18#include <linux/string.h>
19#include <linux/timer.h>
20#include <linux/ioport.h>
21#include <linux/platform_device.h>
22
1/*
2 * PCMCIA driver for SL811HS (as found in REX-CFU1U)
3 * Filename: sl811_cs.c
4 * Author: Yukio Yamamoto
5 *
6 * Port to sl811-hcd and 2.6.x by
7 * Botond Botyanszki <boti@rocketmail.com>
8 * Simon Pickering

--- 6 unchanged lines hidden (view full) ---

15#include <linux/init.h>
16#include <linux/ptrace.h>
17#include <linux/slab.h>
18#include <linux/string.h>
19#include <linux/timer.h>
20#include <linux/ioport.h>
21#include <linux/platform_device.h>
22
23#include <pcmcia/cs.h>
24#include <pcmcia/cistpl.h>
25#include <pcmcia/cisreg.h>
26#include <pcmcia/ds.h>
27
28#include <linux/usb/sl811.h>
29
30MODULE_AUTHOR("Botond Botyanszki");
31MODULE_DESCRIPTION("REX-CFU1U PCMCIA driver for 2.6");

--- 122 unchanged lines hidden (view full) ---

154 if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
155 p_dev->vpp =
156 cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
157 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
158 p_dev->vpp =
159 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
160
161 /* we need an interrupt */
23#include <pcmcia/cistpl.h>
24#include <pcmcia/cisreg.h>
25#include <pcmcia/ds.h>
26
27#include <linux/usb/sl811.h>
28
29MODULE_AUTHOR("Botond Botyanszki");
30MODULE_DESCRIPTION("REX-CFU1U PCMCIA driver for 2.6");

--- 122 unchanged lines hidden (view full) ---

153 if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
154 p_dev->vpp =
155 cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
156 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
157 p_dev->vpp =
158 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
159
160 /* we need an interrupt */
162 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
161 p_dev->config_flags |= CONF_ENABLE_IRQ;
163
164 /* IO window settings */
165 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
166 if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
167 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
168 p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK;
169
170 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;

--- 19 unchanged lines hidden (view full) ---

190
191 /* require an IRQ and two registers */
192 if (resource_size(link->resource[0]) < 2)
193 goto failed;
194
195 if (!link->irq)
196 goto failed;
197
162
163 /* IO window settings */
164 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
165 if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
166 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
167 p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK;
168
169 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;

--- 19 unchanged lines hidden (view full) ---

189
190 /* require an IRQ and two registers */
191 if (resource_size(link->resource[0]) < 2)
192 goto failed;
193
194 if (!link->irq)
195 goto failed;
196
198 ret = pcmcia_request_configuration(link, &link->conf);
197 ret = pcmcia_enable_device(link);
199 if (ret)
200 goto failed;
201
202 dev_info(&link->dev, "index 0x%02x: ",
203 link->config_index);
204 if (link->vpp)
205 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10);
206 printk(", irq %d", link->irq);

--- 15 unchanged lines hidden (view full) ---

222 local_info_t *local;
223
224 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
225 if (!local)
226 return -ENOMEM;
227 local->p_dev = link;
228 link->priv = local;
229
198 if (ret)
199 goto failed;
200
201 dev_info(&link->dev, "index 0x%02x: ",
202 link->config_index);
203 if (link->vpp)
204 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10);
205 printk(", irq %d", link->irq);

--- 15 unchanged lines hidden (view full) ---

221 local_info_t *local;
222
223 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
224 if (!local)
225 return -ENOMEM;
226 local->p_dev = link;
227 link->priv = local;
228
230 link->conf.Attributes = 0;
231
232 return sl811_cs_config(link);
233}
234
235static struct pcmcia_device_id sl811_ids[] = {
236 PCMCIA_DEVICE_MANF_CARD(0xc015, 0x0001), /* RATOC USB HOST CF+ Card */
237 PCMCIA_DEVICE_NULL,
238};
239MODULE_DEVICE_TABLE(pcmcia, sl811_ids);

--- 24 unchanged lines hidden ---
229 return sl811_cs_config(link);
230}
231
232static struct pcmcia_device_id sl811_ids[] = {
233 PCMCIA_DEVICE_MANF_CARD(0xc015, 0x0001), /* RATOC USB HOST CF+ Card */
234 PCMCIA_DEVICE_NULL,
235};
236MODULE_DEVICE_TABLE(pcmcia, sl811_ids);

--- 24 unchanged lines hidden ---