blob: 7db0e9c74dfc5f02f185ffd4dd903423c6f4aa80 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Andrew Victor2c1f3b72006-02-21 12:56:52 +02002/*
3 * at91_cf.c -- AT91 CompactFlash controller driver
4 *
5 * Copyright (C) 2005 David Brownell
Andrew Victor2c1f3b72006-02-21 12:56:52 +02006 */
7
8#include <linux/module.h>
9#include <linux/kernel.h>
Andrew Victor2c1f3b72006-02-21 12:56:52 +020010#include <linux/platform_device.h>
11#include <linux/errno.h>
12#include <linux/init.h>
13#include <linux/interrupt.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090014#include <linux/slab.h>
Joachim Eastwood80af9e62012-01-10 02:37:25 +010015#include <linux/gpio.h>
Jean-Christophe PLAGNIOL-VILLARDbcd23602012-10-30 05:12:23 +080016#include <linux/platform_data/atmel.h>
Joachim Eastwooda8431682013-06-06 10:24:17 +020017#include <linux/io.h>
18#include <linux/sizes.h>
Alexandre Bellonieaa9a212015-03-16 14:17:50 +010019#include <linux/mfd/syscon.h>
20#include <linux/mfd/syscon/atmel-mc.h>
Joachim Eastwooded9084e2013-06-06 10:24:18 +020021#include <linux/of.h>
22#include <linux/of_device.h>
23#include <linux/of_gpio.h>
Alexandre Bellonieaa9a212015-03-16 14:17:50 +010024#include <linux/regmap.h>
Andrew Victor2c1f3b72006-02-21 12:56:52 +020025
26#include <pcmcia/ss.h>
27
Andrew Victor2c1f3b72006-02-21 12:56:52 +020028/*
29 * A0..A10 work in each range; A23 indicates I/O space; A25 is CFRNW;
30 * some other bit in {A24,A22..A11} is nREG to flag memory access
31 * (vs attributes). So more than 2KB/region would just be waste.
Andrew Victorebe5cfb2006-11-06 15:56:07 +020032 * Note: These are offsets from the physical base address.
Andrew Victor2c1f3b72006-02-21 12:56:52 +020033 */
Andrew Victorebe5cfb2006-11-06 15:56:07 +020034#define CF_ATTR_PHYS (0)
35#define CF_IO_PHYS (1 << 23)
36#define CF_MEM_PHYS (0x017ff800)
Andrew Victor2c1f3b72006-02-21 12:56:52 +020037
Alexandre Bellonieaa9a212015-03-16 14:17:50 +010038struct regmap *mc;
39
Andrew Victor2c1f3b72006-02-21 12:56:52 +020040/*--------------------------------------------------------------------------*/
41
Andrew Victor2c1f3b72006-02-21 12:56:52 +020042struct at91_cf_socket {
43 struct pcmcia_socket socket;
44
45 unsigned present:1;
46
47 struct platform_device *pdev;
48 struct at91_cf_data *board;
Andrew Victorebe5cfb2006-11-06 15:56:07 +020049
50 unsigned long phys_baseaddr;
Andrew Victor2c1f3b72006-02-21 12:56:52 +020051};
52
Andrew Victor2c1f3b72006-02-21 12:56:52 +020053static inline int at91_cf_present(struct at91_cf_socket *cf)
54{
David Brownell4c1fc442008-02-04 22:27:42 -080055 return !gpio_get_value(cf->board->det_pin);
Andrew Victor2c1f3b72006-02-21 12:56:52 +020056}
57
58/*--------------------------------------------------------------------------*/
59
60static int at91_cf_ss_init(struct pcmcia_socket *s)
61{
62 return 0;
63}
64
David Howells7d12e782006-10-05 14:55:46 +010065static irqreturn_t at91_cf_irq(int irq, void *_cf)
Andrew Victor2c1f3b72006-02-21 12:56:52 +020066{
Jeff Garzikc7bec5a2006-10-06 15:00:58 -040067 struct at91_cf_socket *cf = _cf;
Andrew Victor2c1f3b72006-02-21 12:56:52 +020068
Joachim Eastwood80af9e62012-01-10 02:37:25 +010069 if (irq == gpio_to_irq(cf->board->det_pin)) {
Andrew Victor2c1f3b72006-02-21 12:56:52 +020070 unsigned present = at91_cf_present(cf);
71
72 /* kick pccard as needed */
73 if (present != cf->present) {
74 cf->present = present;
Joachim Eastwood40ca0202013-06-06 10:24:15 +020075 dev_dbg(&cf->pdev->dev, "card %s\n",
David Brownell2c536202006-04-14 18:05:38 -070076 present ? "present" : "gone");
Andrew Victor2c1f3b72006-02-21 12:56:52 +020077 pcmcia_parse_events(&cf->socket, SS_DETECT);
78 }
79 }
80
81 return IRQ_HANDLED;
82}
83
84static int at91_cf_get_status(struct pcmcia_socket *s, u_int *sp)
85{
86 struct at91_cf_socket *cf;
87
88 if (!sp)
89 return -EINVAL;
90
91 cf = container_of(s, struct at91_cf_socket, socket);
92
David Brownell2c536202006-04-14 18:05:38 -070093 /* NOTE: CF is always 3VCARD */
Andrew Victor2c1f3b72006-02-21 12:56:52 +020094 if (at91_cf_present(cf)) {
Joachim Eastwood80af9e62012-01-10 02:37:25 +010095 int rdy = gpio_is_valid(cf->board->irq_pin); /* RDY/nIRQ */
96 int vcc = gpio_is_valid(cf->board->vcc_pin);
Andrew Victor2c1f3b72006-02-21 12:56:52 +020097
98 *sp = SS_DETECT | SS_3VCARD;
Joachim Eastwoode39506b2013-06-06 10:24:14 +020099 if (!rdy || gpio_get_value(cf->board->irq_pin))
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200100 *sp |= SS_READY;
Joachim Eastwoode39506b2013-06-06 10:24:14 +0200101 if (!vcc || gpio_get_value(cf->board->vcc_pin))
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200102 *sp |= SS_POWERON;
103 } else
104 *sp = 0;
105
106 return 0;
107}
108
David Brownell2c536202006-04-14 18:05:38 -0700109static int
110at91_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s)
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200111{
112 struct at91_cf_socket *cf;
113
114 cf = container_of(sock, struct at91_cf_socket, socket);
115
116 /* switch Vcc if needed and possible */
Joachim Eastwood80af9e62012-01-10 02:37:25 +0100117 if (gpio_is_valid(cf->board->vcc_pin)) {
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200118 switch (s->Vcc) {
Laurent Navetd652f702013-06-06 10:24:20 +0200119 case 0:
120 gpio_set_value(cf->board->vcc_pin, 0);
121 break;
122 case 33:
123 gpio_set_value(cf->board->vcc_pin, 1);
124 break;
125 default:
126 return -EINVAL;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200127 }
128 }
129
130 /* toggle reset if needed */
David Brownell4c1fc442008-02-04 22:27:42 -0800131 gpio_set_value(cf->board->rst_pin, s->flags & SS_RESET);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200132
Joachim Eastwood40ca0202013-06-06 10:24:15 +0200133 dev_dbg(&cf->pdev->dev, "Vcc %d, io_irq %d, flags %04x csc %04x\n",
134 s->Vcc, s->io_irq, s->flags, s->csc_mask);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200135
136 return 0;
137}
138
139static int at91_cf_ss_suspend(struct pcmcia_socket *s)
140{
141 return at91_cf_set_socket(s, &dead_socket);
142}
143
144/* we already mapped the I/O region */
145static int at91_cf_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
146{
147 struct at91_cf_socket *cf;
148 u32 csr;
149
150 cf = container_of(s, struct at91_cf_socket, socket);
151 io->flags &= (MAP_ACTIVE | MAP_16BIT | MAP_AUTOSZ);
152
153 /*
154 * Use 16 bit accesses unless/until we need 8-bit i/o space.
Alexandre Bellonieaa9a212015-03-16 14:17:50 +0100155 *
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200156 * NOTE: this CF controller ignores IOIS16, so we can't really do
157 * MAP_AUTOSZ. The 16bit mode allows single byte access on either
158 * D0-D7 (even addr) or D8-D15 (odd), so it's close enough for many
159 * purposes (and handles ide-cs).
160 *
161 * The 8bit mode is needed for odd byte access on D0-D7. It seems
162 * some cards only like that way to get at the odd byte, despite
163 * CF 3.0 spec table 35 also giving the D8-D15 option.
164 */
Andrew Victorebe5cfb2006-11-06 15:56:07 +0200165 if (!(io->flags & (MAP_16BIT | MAP_AUTOSZ))) {
Alexandre Bellonieaa9a212015-03-16 14:17:50 +0100166 csr = AT91_MC_SMC_DBW_8;
Joachim Eastwood40ca0202013-06-06 10:24:15 +0200167 dev_dbg(&cf->pdev->dev, "8bit i/o bus\n");
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200168 } else {
Alexandre Bellonieaa9a212015-03-16 14:17:50 +0100169 csr = AT91_MC_SMC_DBW_16;
Joachim Eastwood40ca0202013-06-06 10:24:15 +0200170 dev_dbg(&cf->pdev->dev, "16bit i/o bus\n");
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200171 }
Alexandre Bellonieaa9a212015-03-16 14:17:50 +0100172 regmap_update_bits(mc, AT91_MC_SMC_CSR(cf->board->chipselect),
173 AT91_MC_SMC_DBW, csr);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200174
175 io->start = cf->socket.io_offset;
176 io->stop = io->start + SZ_2K - 1;
177
178 return 0;
179}
180
181/* pcmcia layer maps/unmaps mem regions */
David Brownell2c536202006-04-14 18:05:38 -0700182static int
183at91_cf_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *map)
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200184{
185 struct at91_cf_socket *cf;
186
187 if (map->card_start)
188 return -EINVAL;
189
190 cf = container_of(s, struct at91_cf_socket, socket);
191
Andrew Victorebe5cfb2006-11-06 15:56:07 +0200192 map->flags &= (MAP_ACTIVE | MAP_ATTRIB | MAP_16BIT);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200193 if (map->flags & MAP_ATTRIB)
Andrew Victorebe5cfb2006-11-06 15:56:07 +0200194 map->static_start = cf->phys_baseaddr + CF_ATTR_PHYS;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200195 else
Andrew Victorebe5cfb2006-11-06 15:56:07 +0200196 map->static_start = cf->phys_baseaddr + CF_MEM_PHYS;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200197
198 return 0;
199}
200
201static struct pccard_operations at91_cf_ops = {
202 .init = at91_cf_ss_init,
203 .suspend = at91_cf_ss_suspend,
204 .get_status = at91_cf_get_status,
205 .set_socket = at91_cf_set_socket,
206 .set_io_map = at91_cf_set_io_map,
207 .set_mem_map = at91_cf_set_mem_map,
208};
209
210/*--------------------------------------------------------------------------*/
211
Joachim Eastwooded9084e2013-06-06 10:24:18 +0200212#if defined(CONFIG_OF)
213static const struct of_device_id at91_cf_dt_ids[] = {
214 { .compatible = "atmel,at91rm9200-cf" },
215 { /* sentinel */ }
216};
217MODULE_DEVICE_TABLE(of, at91_cf_dt_ids);
218
219static int at91_cf_dt_init(struct platform_device *pdev)
220{
221 struct at91_cf_data *board;
222
223 board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL);
224 if (!board)
225 return -ENOMEM;
226
227 board->irq_pin = of_get_gpio(pdev->dev.of_node, 0);
228 board->det_pin = of_get_gpio(pdev->dev.of_node, 1);
229 board->vcc_pin = of_get_gpio(pdev->dev.of_node, 2);
230 board->rst_pin = of_get_gpio(pdev->dev.of_node, 3);
231
232 pdev->dev.platform_data = board;
233
Alexandre Bellonieaa9a212015-03-16 14:17:50 +0100234 mc = syscon_regmap_lookup_by_compatible("atmel,at91rm9200-sdramc");
Alexandre Bellonieaa9a212015-03-16 14:17:50 +0100235
Vasyl Gomonovych12038392017-11-28 16:21:40 +0100236 return PTR_ERR_OR_ZERO(mc);
Joachim Eastwooded9084e2013-06-06 10:24:18 +0200237}
238#else
239static int at91_cf_dt_init(struct platform_device *pdev)
240{
241 return -ENODEV;
242}
243#endif
244
Johan Hovold16a7c7c2013-09-23 16:27:29 +0200245static int at91_cf_probe(struct platform_device *pdev)
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200246{
247 struct at91_cf_socket *cf;
David Brownell0db60952006-04-19 06:37:48 -0700248 struct at91_cf_data *board = pdev->dev.platform_data;
David Brownell2c536202006-04-14 18:05:38 -0700249 struct resource *io;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200250 int status;
251
Joachim Eastwooded9084e2013-06-06 10:24:18 +0200252 if (!board) {
253 status = at91_cf_dt_init(pdev);
254 if (status)
255 return status;
256
257 board = pdev->dev.platform_data;
258 }
259
260 if (!gpio_is_valid(board->det_pin) || !gpio_is_valid(board->rst_pin))
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200261 return -ENODEV;
262
David Brownell2c536202006-04-14 18:05:38 -0700263 io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
264 if (!io)
265 return -ENODEV;
266
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200267 cf = devm_kzalloc(&pdev->dev, sizeof(*cf), GFP_KERNEL);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200268 if (!cf)
269 return -ENOMEM;
270
271 cf->board = board;
272 cf->pdev = pdev;
Andrew Victorebe5cfb2006-11-06 15:56:07 +0200273 cf->phys_baseaddr = io->start;
David Brownell0db60952006-04-19 06:37:48 -0700274 platform_set_drvdata(pdev, cf);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200275
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200276 /* must be a GPIO; ergo must trigger on both edges */
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200277 status = devm_gpio_request(&pdev->dev, board->det_pin, "cf_det");
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200278 if (status < 0)
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200279 return status;
280
281 status = devm_request_irq(&pdev->dev, gpio_to_irq(board->det_pin),
282 at91_cf_irq, 0, "at91_cf detect", cf);
David Brownell4c1fc442008-02-04 22:27:42 -0800283 if (status < 0)
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200284 return status;
285
David Brownell0db60952006-04-19 06:37:48 -0700286 device_init_wakeup(&pdev->dev, 1);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200287
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200288 status = devm_gpio_request(&pdev->dev, board->rst_pin, "cf_rst");
David Brownell4c1fc442008-02-04 22:27:42 -0800289 if (status < 0)
290 goto fail0a;
291
Joachim Eastwood80af9e62012-01-10 02:37:25 +0100292 if (gpio_is_valid(board->vcc_pin)) {
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200293 status = devm_gpio_request(&pdev->dev, board->vcc_pin, "cf_vcc");
David Brownell4c1fc442008-02-04 22:27:42 -0800294 if (status < 0)
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200295 goto fail0a;
David Brownell4c1fc442008-02-04 22:27:42 -0800296 }
297
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200298 /*
299 * The card driver will request this irq later as needed.
300 * but it causes lots of "irqNN: nobody cared" messages
301 * unless we report that we handle everything (sigh).
302 * (Note: DK board doesn't wire the IRQ pin...)
303 */
Joachim Eastwood80af9e62012-01-10 02:37:25 +0100304 if (gpio_is_valid(board->irq_pin)) {
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200305 status = devm_gpio_request(&pdev->dev, board->irq_pin, "cf_irq");
David Brownell4c1fc442008-02-04 22:27:42 -0800306 if (status < 0)
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200307 goto fail0a;
308
309 status = devm_request_irq(&pdev->dev, gpio_to_irq(board->irq_pin),
310 at91_cf_irq, IRQF_SHARED, "at91_cf", cf);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200311 if (status < 0)
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200312 goto fail0a;
Joachim Eastwood80af9e62012-01-10 02:37:25 +0100313 cf->socket.pci_irq = gpio_to_irq(board->irq_pin);
David Brownell2c536202006-04-14 18:05:38 -0700314 } else
Yinghai Lu9130add2008-08-19 20:49:52 -0700315 cf->socket.pci_irq = nr_irqs + 1;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200316
Arnd Bergmann1be27c62015-03-12 15:54:23 +0100317 /*
318 * pcmcia layer only remaps "real" memory not iospace
319 * io_offset is set to 0x10000 to avoid the check in static_find_io().
320 * */
321 cf->socket.io_offset = 0x10000;
322 status = pci_ioremap_io(0x10000, cf->phys_baseaddr + CF_IO_PHYS);
323 if (status)
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200324 goto fail0a;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200325
Andrew Victor40a00172006-12-04 12:26:36 +0200326 /* reserve chip-select regions */
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200327 if (!devm_request_mem_region(&pdev->dev, io->start, resource_size(io), "at91_cf")) {
Andrew Victorebe5cfb2006-11-06 15:56:07 +0200328 status = -ENXIO;
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200329 goto fail0a;
Andrew Victorebe5cfb2006-11-06 15:56:07 +0200330 }
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200331
Joachim Eastwood40ca0202013-06-06 10:24:15 +0200332 dev_info(&pdev->dev, "irqs det #%d, io #%d\n",
Joachim Eastwood80af9e62012-01-10 02:37:25 +0100333 gpio_to_irq(board->det_pin), gpio_to_irq(board->irq_pin));
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200334
335 cf->socket.owner = THIS_MODULE;
Alexey Dobriyane4a3c3f2007-02-13 22:39:27 -0800336 cf->socket.dev.parent = &pdev->dev;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200337 cf->socket.ops = &at91_cf_ops;
338 cf->socket.resource_ops = &pccard_static_ops;
339 cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP
340 | SS_CAP_MEM_ALIGN;
341 cf->socket.map_size = SZ_2K;
David Brownell2c536202006-04-14 18:05:38 -0700342 cf->socket.io[0].res = io;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200343
344 status = pcmcia_register_socket(&cf->socket);
345 if (status < 0)
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200346 goto fail0a;
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200347
348 return 0;
349
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200350fail0a:
David Brownell1fbece12006-07-01 13:39:55 -0700351 device_init_wakeup(&pdev->dev, 0);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200352 return status;
353}
354
Johan Hovold16a7c7c2013-09-23 16:27:29 +0200355static int at91_cf_remove(struct platform_device *pdev)
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200356{
David Brownell0db60952006-04-19 06:37:48 -0700357 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200358
359 pcmcia_unregister_socket(&cf->socket);
David Brownell0db60952006-04-19 06:37:48 -0700360 device_init_wakeup(&pdev->dev, 0);
Joachim Eastwood54fe1592013-06-06 10:24:16 +0200361
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200362 return 0;
363}
364
David Brownell0db60952006-04-19 06:37:48 -0700365#ifdef CONFIG_PM
366
367static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg)
368{
369 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
370 struct at91_cf_data *board = cf->board;
371
David Brownell1fbece12006-07-01 13:39:55 -0700372 if (device_may_wakeup(&pdev->dev)) {
Joachim Eastwood80af9e62012-01-10 02:37:25 +0100373 enable_irq_wake(gpio_to_irq(board->det_pin));
374 if (gpio_is_valid(board->irq_pin))
375 enable_irq_wake(gpio_to_irq(board->irq_pin));
David Brownell0db60952006-04-19 06:37:48 -0700376 }
David Brownell0db60952006-04-19 06:37:48 -0700377 return 0;
378}
379
380static int at91_cf_resume(struct platform_device *pdev)
381{
Marc Pignat9af20372007-05-31 00:40:44 -0700382 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
383 struct at91_cf_data *board = cf->board;
384
385 if (device_may_wakeup(&pdev->dev)) {
Joachim Eastwood80af9e62012-01-10 02:37:25 +0100386 disable_irq_wake(gpio_to_irq(board->det_pin));
387 if (gpio_is_valid(board->irq_pin))
388 disable_irq_wake(gpio_to_irq(board->irq_pin));
Marc Pignat9af20372007-05-31 00:40:44 -0700389 }
390
David Brownell0db60952006-04-19 06:37:48 -0700391 return 0;
392}
393
394#else
395#define at91_cf_suspend NULL
396#define at91_cf_resume NULL
397#endif
398
399static struct platform_driver at91_cf_driver = {
400 .driver = {
Joachim Eastwood40ca0202013-06-06 10:24:15 +0200401 .name = "at91_cf",
Joachim Eastwooded9084e2013-06-06 10:24:18 +0200402 .of_match_table = of_match_ptr(at91_cf_dt_ids),
David Brownell0db60952006-04-19 06:37:48 -0700403 },
Johan Hovold16a7c7c2013-09-23 16:27:29 +0200404 .probe = at91_cf_probe,
405 .remove = at91_cf_remove,
David Brownell0db60952006-04-19 06:37:48 -0700406 .suspend = at91_cf_suspend,
407 .resume = at91_cf_resume,
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200408};
409
Johan Hovold16a7c7c2013-09-23 16:27:29 +0200410module_platform_driver(at91_cf_driver);
Andrew Victor2c1f3b72006-02-21 12:56:52 +0200411
412MODULE_DESCRIPTION("AT91 Compact Flash Driver");
413MODULE_AUTHOR("David Brownell");
414MODULE_LICENSE("GPL");
Kay Sievers12c2c012008-04-15 14:34:34 -0700415MODULE_ALIAS("platform:at91_cf");