Blame view

drivers/ata/pata_at91.c 12.2 KB
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
1
2
3
4
5
  /*
   * PATA driver for AT91SAM9260 Static Memory Controller
   * with CompactFlash interface in True IDE mode
   *
   * Copyright (C) 2009 Matyukevich Sergey
0144261fa   Igor Plyatov   pata_at91: SMC se...
6
   *               2011 Igor Plyatov
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
   *
   * Based on:
   *      * generic platform driver by Paul Mundt: drivers/ata/pata_platform.c
   *      * pata_at32 driver by Kristoffer Nyborg Gregertsen
   *      * at91_ide driver by Stanislaw Gruszka
   *
   * This program is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2
   * as published by the Free Software Foundation.
   *
   */
  
  #include <linux/kernel.h>
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/blkdev.h>
5a0e3ad6a   Tejun Heo   include cleanup: ...
23
  #include <linux/gfp.h>
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
24
25
26
27
28
29
  #include <scsi/scsi_host.h>
  #include <linux/ata.h>
  #include <linux/clk.h>
  #include <linux/libata.h>
  #include <linux/platform_device.h>
  #include <linux/ata_platform.h>
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
30
  #include <mach/at91sam9_smc.h>
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
31
  #include <mach/board.h>
60e8972dc   Russell King   ARM: gpio: at91: ...
32
  #include <asm/gpio.h>
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
33

0144261fa   Igor Plyatov   pata_at91: SMC se...
34
35
  #define DRV_NAME		"pata_at91"
  #define DRV_VERSION		"0.3"
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
36

0144261fa   Igor Plyatov   pata_at91: SMC se...
37
38
39
40
41
42
  #define CF_IDE_OFFSET		0x00c00000
  #define CF_ALT_IDE_OFFSET	0x00e00000
  #define CF_IDE_RES_SIZE		0x08
  #define CS_PULSE_MAXIMUM	319
  #define ER_SMC_CALC		1
  #define ER_SMC_RECALC		2
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
43
44
45
46
  
  struct at91_ide_info {
  	unsigned long mode;
  	unsigned int cs;
7d084d96f   Sergey Matyukevich   libata: Updates a...
47
  	struct clk *mck;
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
48
49
50
  	void __iomem *ide_addr;
  	void __iomem *alt_addr;
  };
0144261fa   Igor Plyatov   pata_at91: SMC se...
51
52
53
54
55
56
  /**
   * struct smc_range - range of valid values for SMC register.
   */
  struct smc_range {
  	int min;
  	int max;
792d37af3   Igor Plyatov   ata: pata_at91.c ...
57
  };
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
58

0144261fa   Igor Plyatov   pata_at91: SMC se...
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
  /**
   * adjust_smc_value - adjust value for one of SMC registers.
   * @value: adjusted value
   * @range: array of SMC ranges with valid values
   * @size: SMC ranges array size
   *
   * This returns the difference between input and output value or negative
   * in case of invalid input value.
   * If negative returned, then output value = maximal possible from ranges.
   */
  static int adjust_smc_value(int *value, struct smc_range *range, int size)
  {
  	int maximum = (range + size - 1)->max;
  	int remainder;
  
  	do {
  		if (*value < range->min) {
  			remainder = range->min - *value;
  			*value = range->min; /* nearest valid value */
  			return remainder;
  		} else if ((range->min <= *value) && (*value <= range->max))
  			return 0;
  
  		range++;
  	} while (--size);
  	*value = maximum;
  
  	return -1; /* invalid value */
  }
  
  /**
   * calc_smc_vals - calculate SMC register values
   * @dev: ATA device
   * @setup: SMC_SETUP register value
   * @pulse: SMC_PULSE register value
   * @cycle: SMC_CYCLE register value
   *
   * This returns negative in case of invalid values for SMC registers:
   * -ER_SMC_RECALC - recalculation required for SMC values,
   * -ER_SMC_CALC - calculation failed (invalid input values).
   *
   * SMC use special coding scheme, see "Coding and Range of Timing
   * Parameters" table from AT91SAM9 datasheets.
   *
   *	SMC_SETUP = 128*setup[5] + setup[4:0]
   *	SMC_PULSE = 256*pulse[6] + pulse[5:0]
   *	SMC_CYCLE = 256*cycle[8:7] + cycle[6:0]
   */
  static int calc_smc_vals(struct device *dev,
  		int *setup, int *pulse, int *cycle, int *cs_pulse)
  {
  	int ret_val;
  	int err = 0;
  	struct smc_range range_setup[] = {	/* SMC_SETUP valid values */
  		{.min = 0,	.max = 31},	/* first  range */
  		{.min = 128,	.max = 159}	/* second range */
  	};
  	struct smc_range range_pulse[] = {	/* SMC_PULSE valid values */
  		{.min = 0,	.max = 63},	/* first  range */
  		{.min = 256,	.max = 319}	/* second range */
  	};
  	struct smc_range range_cycle[] = {	/* SMC_CYCLE valid values */
  		{.min = 0,	.max = 127},	/* first  range */
  		{.min = 256,	.max = 383},	/* second range */
  		{.min = 512,	.max = 639},	/* third  range */
  		{.min = 768,	.max = 895}	/* fourth range */
  	};
  
  	ret_val = adjust_smc_value(setup, range_setup, ARRAY_SIZE(range_setup));
  	if (ret_val < 0)
  		dev_warn(dev, "maximal SMC Setup value
  ");
  	else
  		*cycle += ret_val;
  
  	ret_val = adjust_smc_value(pulse, range_pulse, ARRAY_SIZE(range_pulse));
  	if (ret_val < 0)
  		dev_warn(dev, "maximal SMC Pulse value
  ");
  	else
  		*cycle += ret_val;
  
  	ret_val = adjust_smc_value(cycle, range_cycle, ARRAY_SIZE(range_cycle));
  	if (ret_val < 0)
  		dev_warn(dev, "maximal SMC Cycle value
  ");
  
  	*cs_pulse = *cycle;
  	if (*cs_pulse > CS_PULSE_MAXIMUM) {
  		dev_err(dev, "unable to calculate valid SMC settings
  ");
  		return -ER_SMC_CALC;
  	}
  
  	ret_val = adjust_smc_value(cs_pulse, range_pulse,
  					ARRAY_SIZE(range_pulse));
  	if (ret_val < 0) {
  		dev_warn(dev, "maximal SMC CS Pulse value
  ");
  	} else if (ret_val != 0) {
  		*cycle = *cs_pulse;
  		dev_warn(dev, "SMC Cycle extended
  ");
  		err = -ER_SMC_RECALC;
  	}
  
  	return err;
  }
  
  /**
   * to_smc_format - convert values into SMC format
   * @setup: SETUP value of SMC Setup Register
   * @pulse: PULSE value of SMC Pulse Register
   * @cycle: CYCLE value of SMC Cycle Register
   * @cs_pulse: NCS_PULSE value of SMC Pulse Register
   */
  static void to_smc_format(int *setup, int *pulse, int *cycle, int *cs_pulse)
  {
  	*setup = (*setup & 0x1f) | ((*setup & 0x80) >> 2);
  	*pulse = (*pulse & 0x3f) | ((*pulse & 0x100) >> 2);
  	*cycle = (*cycle & 0x7f) | ((*cycle & 0x300) >> 1);
  	*cs_pulse = (*cs_pulse & 0x3f) | ((*cs_pulse & 0x100) >> 2);
  }
7d084d96f   Sergey Matyukevich   libata: Updates a...
182
  static unsigned long calc_mck_cycles(unsigned long ns, unsigned long mck_hz)
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
183
184
  {
  	unsigned long mul;
7d084d96f   Sergey Matyukevich   libata: Updates a...
185
186
187
188
189
190
  	/*
  	* cycles = x [nsec] * f [Hz] / 10^9 [ns in sec] =
  	*     x * (f / 1_000_000_000) =
  	*     x * ((f * 65536) / 1_000_000_000) / 65536 =
  	*     x * (((f / 10_000) * 65536) / 100_000) / 65536 =
  	*/
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
191

7d084d96f   Sergey Matyukevich   libata: Updates a...
192
193
  	mul = (mck_hz / 10000) << 16;
  	mul /= 100000;
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
194

7d084d96f   Sergey Matyukevich   libata: Updates a...
195
  	return (ns * mul + 65536) >> 16;    /* rounding */
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
196
  }
0144261fa   Igor Plyatov   pata_at91: SMC se...
197
198
199
200
201
202
203
204
205
206
  /**
   * set_smc_timing - SMC timings setup.
   * @dev: device
   * @info: AT91 IDE info
   * @ata: ATA timings
   *
   * Its assumed that write timings are same as read timings,
   * cs_setup = 0 and cs_pulse = cycle.
   */
  static void set_smc_timing(struct device *dev, struct ata_device *adev,
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
207
208
  		struct at91_ide_info *info, const struct ata_timing *ata)
  {
0144261fa   Igor Plyatov   pata_at91: SMC se...
209
210
211
212
213
214
215
216
217
218
219
220
  	int ret = 0;
  	int use_iordy;
  	unsigned int t6z;         /* data tristate time in ns */
  	unsigned int cycle;       /* SMC Cycle width in MCK ticks */
  	unsigned int setup;       /* SMC Setup width in MCK ticks */
  	unsigned int pulse;       /* CFIOR and CFIOW pulse width in MCK ticks */
  	unsigned int cs_setup = 0;/* CS4 or CS5 setup width in MCK ticks */
  	unsigned int cs_pulse;    /* CS4 or CS5 pulse width in MCK ticks*/
  	unsigned int tdf_cycles;  /* SMC TDF MCK ticks */
  	unsigned long mck_hz;     /* MCK frequency in Hz */
  
  	t6z = (ata->mode < XFER_PIO_5) ? 30 : 20;
7d084d96f   Sergey Matyukevich   libata: Updates a...
221
  	mck_hz = clk_get_rate(info->mck);
0144261fa   Igor Plyatov   pata_at91: SMC se...
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
  	cycle = calc_mck_cycles(ata->cyc8b, mck_hz);
  	setup = calc_mck_cycles(ata->setup, mck_hz);
  	pulse = calc_mck_cycles(ata->act8b, mck_hz);
  	tdf_cycles = calc_mck_cycles(t6z, mck_hz);
  
  	do {
  		ret = calc_smc_vals(dev, &setup, &pulse, &cycle, &cs_pulse);
  	} while (ret == -ER_SMC_RECALC);
  
  	if (ret == -ER_SMC_CALC)
  		dev_err(dev, "Interface may not operate correctly
  ");
  
  	dev_dbg(dev, "SMC Setup=%u, Pulse=%u, Cycle=%u, CS Pulse=%u
  ",
  		setup, pulse, cycle, cs_pulse);
  	to_smc_format(&setup, &pulse, &cycle, &cs_pulse);
  	/* disable or enable waiting for IORDY signal */
  	use_iordy = ata_pio_need_iordy(adev);
  	if (use_iordy)
  		info->mode |= AT91_SMC_EXNWMODE_READY;
  
  	if (tdf_cycles > 15) {
  		tdf_cycles = 15;
  		dev_warn(dev, "maximal SMC TDF Cycles value
  ");
9719b8f5b   Igor Plyatov   ata: pata_at91.c ...
248
  	}
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
249

0144261fa   Igor Plyatov   pata_at91: SMC se...
250
251
252
  	dev_dbg(dev, "Use IORDY=%u, TDF Cycles=%u
  ", use_iordy, tdf_cycles);
  	info->mode |= AT91_SMC_TDF_(tdf_cycles);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
253

0144261fa   Igor Plyatov   pata_at91: SMC se...
254
  	/* write SMC Setup Register */
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
255
  	at91_sys_write(AT91_SMC_SETUP(info->cs),
0144261fa   Igor Plyatov   pata_at91: SMC se...
256
257
258
259
260
  			AT91_SMC_NWESETUP_(setup) |
  			AT91_SMC_NRDSETUP_(setup) |
  			AT91_SMC_NCS_WRSETUP_(cs_setup) |
  			AT91_SMC_NCS_RDSETUP_(cs_setup));
  	/* write SMC Pulse Register */
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
261
  	at91_sys_write(AT91_SMC_PULSE(info->cs),
0144261fa   Igor Plyatov   pata_at91: SMC se...
262
263
264
265
266
  			AT91_SMC_NWEPULSE_(pulse) |
  			AT91_SMC_NRDPULSE_(pulse) |
  			AT91_SMC_NCS_WRPULSE_(cs_pulse) |
  			AT91_SMC_NCS_RDPULSE_(cs_pulse));
  	/* write SMC Cycle Register */
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
267
  	at91_sys_write(AT91_SMC_CYCLE(info->cs),
0144261fa   Igor Plyatov   pata_at91: SMC se...
268
269
270
271
  			AT91_SMC_NWECYCLE_(cycle) |
  			AT91_SMC_NRDCYCLE_(cycle));
  	/* write SMC Mode Register*/
  	at91_sys_write(AT91_SMC_MODE(info->cs), info->mode);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
272
273
274
275
276
277
278
279
280
281
282
  }
  
  static void pata_at91_set_piomode(struct ata_port *ap, struct ata_device *adev)
  {
  	struct at91_ide_info *info = ap->host->private_data;
  	struct ata_timing timing;
  	int ret;
  
  	/* Compute ATA timing and set it to SMC */
  	ret = ata_timing_compute(adev, adev->pio_mode, &timing, 1000, 0);
  	if (ret) {
429e3861f   Jeff Garzik   [libata] pata_at9...
283
284
285
  		dev_warn(ap->dev, "Failed to compute ATA timing %d, "
  			 "set PIO_0 timing
  ", ret);
0144261fa   Igor Plyatov   pata_at91: SMC se...
286
  		timing = *ata_timing_find_mode(XFER_PIO_0);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
287
  	}
0144261fa   Igor Plyatov   pata_at91: SMC se...
288
  	set_smc_timing(ap->dev, adev, info, &timing);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
  }
  
  static unsigned int pata_at91_data_xfer_noirq(struct ata_device *dev,
  		unsigned char *buf, unsigned int buflen, int rw)
  {
  	struct at91_ide_info *info = dev->link->ap->host->private_data;
  	unsigned int consumed;
  	unsigned long flags;
  	unsigned int mode;
  
  	local_irq_save(flags);
  	mode = at91_sys_read(AT91_SMC_MODE(info->cs));
  
  	/* set 16bit mode before writing data */
  	at91_sys_write(AT91_SMC_MODE(info->cs),
  			(mode & ~AT91_SMC_DBW) | AT91_SMC_DBW_16);
  
  	consumed = ata_sff_data_xfer(dev, buf, buflen, rw);
  
  	/* restore 8bit mode after data is written */
  	at91_sys_write(AT91_SMC_MODE(info->cs),
  			(mode & ~AT91_SMC_DBW) | AT91_SMC_DBW_8);
  
  	local_irq_restore(flags);
  	return consumed;
  }
  
  static struct scsi_host_template pata_at91_sht = {
  	ATA_PIO_SHT(DRV_NAME),
  };
  
  static struct ata_port_operations pata_at91_port_ops = {
  	.inherits	= &ata_sff_port_ops,
  
  	.sff_data_xfer	= pata_at91_data_xfer_noirq,
  	.set_piomode	= pata_at91_set_piomode,
  	.cable_detect	= ata_cable_40wire,
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
326
327
328
329
330
331
332
333
334
335
  };
  
  static int __devinit pata_at91_probe(struct platform_device *pdev)
  {
  	struct at91_cf_data *board = pdev->dev.platform_data;
  	struct device *dev = &pdev->dev;
  	struct at91_ide_info *info;
  	struct resource *mem_res;
  	struct ata_host *host;
  	struct ata_port *ap;
7d084d96f   Sergey Matyukevich   libata: Updates a...
336

918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
  	int irq_flags = 0;
  	int irq = 0;
  	int ret;
  
  	/*  get platform resources: IO/CTL memories and irq/rst pins */
  
  	if (pdev->num_resources != 1) {
  		dev_err(&pdev->dev, "invalid number of resources
  ");
  		return -EINVAL;
  	}
  
  	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  
  	if (!mem_res) {
  		dev_err(dev, "failed to get mem resource
  ");
  		return -EINVAL;
  	}
  
  	irq = board->irq_pin;
  
  	/* init ata host */
  
  	host = ata_host_alloc(dev, 1);
  
  	if (!host)
  		return -ENOMEM;
  
  	ap = host->ports[0];
  	ap->ops = &pata_at91_port_ops;
  	ap->flags |= ATA_FLAG_SLAVE_POSS;
  	ap->pio_mask = ATA_PIO4;
477c87e90   Jean-Christophe PLAGNIOL-VILLARD   ARM: at91/pata: u...
370
  	if (!gpio_is_valid(irq)) {
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
371
372
373
  		ap->flags |= ATA_FLAG_PIO_POLLING;
  		ata_port_desc(ap, "no IRQ, using PIO polling");
  	}
df9eba8c9   Tejun Heo   pata_at91: fix re...
374
  	info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
375
376
377
378
379
380
  
  	if (!info) {
  		dev_err(dev, "failed to allocate memory for private data
  ");
  		return -ENOMEM;
  	}
7d084d96f   Sergey Matyukevich   libata: Updates a...
381
382
383
384
385
386
387
  	info->mck = clk_get(NULL, "mck");
  
  	if (IS_ERR(info->mck)) {
  		dev_err(dev, "failed to get access to mck clock
  ");
  		return -ENODEV;
  	}
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
388
389
390
391
392
393
394
395
396
397
398
399
  	info->cs    = board->chipselect;
  	info->mode  = AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
  		AT91_SMC_EXNWMODE_READY | AT91_SMC_BAT_SELECT |
  		AT91_SMC_DBW_8 | AT91_SMC_TDF_(0);
  
  	info->ide_addr = devm_ioremap(dev,
  			mem_res->start + CF_IDE_OFFSET, CF_IDE_RES_SIZE);
  
  	if (!info->ide_addr) {
  		dev_err(dev, "failed to map IO base
  ");
  		ret = -ENOMEM;
df9eba8c9   Tejun Heo   pata_at91: fix re...
400
  		goto err_put;
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
401
402
403
404
405
406
407
408
409
  	}
  
  	info->alt_addr = devm_ioremap(dev,
  			mem_res->start + CF_ALT_IDE_OFFSET, CF_IDE_RES_SIZE);
  
  	if (!info->alt_addr) {
  		dev_err(dev, "failed to map CTL base
  ");
  		ret = -ENOMEM;
df9eba8c9   Tejun Heo   pata_at91: fix re...
410
  		goto err_put;
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
411
412
413
414
415
416
417
418
419
420
421
422
423
  	}
  
  	ap->ioaddr.cmd_addr = info->ide_addr;
  	ap->ioaddr.ctl_addr = info->alt_addr + 0x06;
  	ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
  
  	ata_sff_std_ports(&ap->ioaddr);
  
  	ata_port_desc(ap, "mmio cmd 0x%llx ctl 0x%llx",
  			(unsigned long long)mem_res->start + CF_IDE_OFFSET,
  			(unsigned long long)mem_res->start + CF_ALT_IDE_OFFSET);
  
  	host->private_data = info;
477c87e90   Jean-Christophe PLAGNIOL-VILLARD   ARM: at91/pata: u...
424
425
  	return ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0,
  			gpio_is_valid(irq) ? ata_sff_interrupt : NULL,
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
426
  			irq_flags, &pata_at91_sht);
8e3bfdb95   Sergei Shtylyov   pata_at91: call c...
427
428
  	if (!ret)
  		return 0;
df9eba8c9   Tejun Heo   pata_at91: fix re...
429
  err_put:
7d084d96f   Sergey Matyukevich   libata: Updates a...
430
  	clk_put(info->mck);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
431
432
433
434
435
436
  	return ret;
  }
  
  static int __devexit pata_at91_remove(struct platform_device *pdev)
  {
  	struct ata_host *host = dev_get_drvdata(&pdev->dev);
1e1f421a8   Julia Lawall   drivers/ata: Move...
437
  	struct at91_ide_info *info;
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
438
439
440
  
  	if (!host)
  		return 0;
1e1f421a8   Julia Lawall   drivers/ata: Move...
441
  	info = host->private_data;
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
442
443
444
445
446
  
  	ata_host_detach(host);
  
  	if (!info)
  		return 0;
7d084d96f   Sergey Matyukevich   libata: Updates a...
447
  	clk_put(info->mck);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
448

918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
449
450
451
452
453
454
  	return 0;
  }
  
  static struct platform_driver pata_at91_driver = {
  	.probe		= pata_at91_probe,
  	.remove		= __devexit_p(pata_at91_remove),
0144261fa   Igor Plyatov   pata_at91: SMC se...
455
  	.driver		= {
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
456
457
458
459
  		.name		= DRV_NAME,
  		.owner		= THIS_MODULE,
  	},
  };
99c8ea3e5   Axel Lin   SATA/PATA: conver...
460
  module_platform_driver(pata_at91_driver);
918d7b7c3   Sergey Matyukevich   [libata] PATA dri...
461
462
463
464
465
  
  MODULE_LICENSE("GPL");
  MODULE_DESCRIPTION("Driver for CF in True IDE mode on AT91SAM9260 SoC");
  MODULE_AUTHOR("Matyukevich Sergey");
  MODULE_VERSION(DRV_VERSION);