OpenCores
URL https://opencores.org/ocsvn/test_project/test_project/trunk

Subversion Repositories test_project

[/] [test_project/] [trunk/] [linux_sd_driver/] [drivers/] [mmc/] [host/] [mmc_ocores.c] - Blame information for rev 75

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 65 AlbertVeli
/* -*- linux-c -*-
2
 *
3
 * OpenCores MMC Controller driver
4
 *
5
 * Copyright (C) 2009 ORSoC, All Rights Reserved.
6
 *
7
 * This program is free software; you can redistribute it and/or modify it
8
 * under the terms of the GNU General Public License as published
9
 * by the Free Software Foundation; version 2 of the License.
10
 *
11
 * This program is distributed in the hope that it will be useful, but
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License along
17
 * with this program; if not, write to the Free Software Foundation, Inc.,
18
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
 */
20
#include <linux/module.h>
21
#include <linux/init.h>
22
#include <linux/ioport.h>
23
#include <linux/platform_device.h>
24
#include <linux/delay.h>
25
#include <linux/interrupt.h>
26
#include <linux/err.h>
27
#include <linux/mmc/host.h>
28
 
29
#include <asm/board.h>
30
#include <asm/io.h>
31
#include <asm/mmc.h>
32 68 tac2
#include <asm/system.h>
33 65 AlbertVeli
#include "mmc_ocores.h"
34
 
35
#define DRIVER_NAME "mmc-ocores"
36
 
37
#define NR_SG   1
38
 
39 66 tac2
 
40 70 tac2
 
41 65 AlbertVeli
struct ocores_host {
42
        struct mmc_host         *mmc;
43
        spinlock_t              lock;
44
        struct resource         *res;
45
        void __iomem            *base;
46
        unsigned int            cmdat;
47
        unsigned int            power_mode;
48
        struct ocores_platform_data *pdata;
49 69 AlbertVeli
        unsigned int            word_cnt;
50 65 AlbertVeli
        struct mmc_request      *mrq;
51
        struct mmc_command      *cmd;
52
        struct mmc_data         *data;
53 66 tac2
        int irq_cmd;
54
        int irq_dat;
55
        unsigned int flags;
56
        struct tasklet_struct finish_cmd;
57 68 tac2
        struct {
58 69 AlbertVeli
                unsigned int normal_int_status;
59
                unsigned int error_int_status;
60
        } registers;
61 65 AlbertVeli
};
62
 
63 66 tac2
struct ocores_host *oc_host;
64
 
65
static void ocores_tasklet_finish_cmd(unsigned long param);
66
static inline void CMD_IRQ_ON(struct ocores_host *host, u32 mask)
67 65 AlbertVeli
{
68 66 tac2
        u32 val = readl(host->base  + SD_NOMAL_INT_SIGNAL_ENABLE);
69
        printk(KERN_ALERT "Int mask = %08x\n", val);
70
        val |= mask;
71
        writel (val, host->base  + SD_NOMAL_INT_SIGNAL_ENABLE);
72
        printk(KERN_ALERT "Int mask = %08x\n", val);
73
}
74
 
75
static inline void CMD_IRQ_OFF(struct ocores_host *host, u32 mask)
76 69 AlbertVeli
{
77 66 tac2
        u32 val = readl(host->base  + SD_NOMAL_INT_SIGNAL_ENABLE);
78
        val  &= ~mask;
79
        writel (val, host->base  + SD_NOMAL_INT_SIGNAL_ENABLE);
80
}
81 69 AlbertVeli
 
82 66 tac2
static void ocores_start_cmd(struct ocores_host *host, struct mmc_command *cmd)
83
{
84 69 AlbertVeli
        unsigned int cmd_arg, cmd_command=0;
85 66 tac2
 
86 69 AlbertVeli
        //struct mmc_data *data = cmd->data;
87 68 tac2
        //WARN_ON(host->cmd != NULL);
88 65 AlbertVeli
        host->cmd = cmd;
89 69 AlbertVeli
 
90
        //Set up command
91 66 tac2
        cmd_arg = cmd->arg;
92
        cmd_command |= cmd->opcode << 8;
93 71 AlbertVeli
        cmd_command |= host->word_cnt << 6;
94
 
95
        if ( mmc_resp_type(cmd) == MMC_RSP_CRC  )
96 70 tac2
                cmd_command |= CRCE;
97
        if ( mmc_resp_type(cmd) == MMC_RSP_OPCODE  )
98
                cmd_command |= CICE;
99 71 AlbertVeli
 
100 66 tac2
        switch (mmc_resp_type(cmd)) {
101 71 AlbertVeli
        case MMC_RSP_NONE:
102
                cmd_command |= MMCOC_RSP_NONE;
103 66 tac2
                break;
104 71 AlbertVeli
        case MMC_RSP_R1:
105
                cmd_command |= MMCOC_RSP_48;
106 66 tac2
                break;
107 71 AlbertVeli
        case MMC_RSP_R1B:
108
                cmd_command |= MMCOC_RSP_48;
109 66 tac2
                break;
110 71 AlbertVeli
        case MMC_RSP_R2:
111
                cmd_command |= MMCOC_RSP_136;
112 66 tac2
                break;
113 71 AlbertVeli
        case MMC_RSP_R3:
114
                cmd_command |= MMCOC_RSP_48;
115 66 tac2
                break;
116 71 AlbertVeli
        default:
117 66 tac2
                printk(KERN_INFO "mmc_ocores: unhandled response type %02x\n",
118 71 AlbertVeli
                       mmc_resp_type(cmd));
119 66 tac2
        }
120 72 tac2
 
121
     /*If data
122
    //  if ( data->blksz & 0x3 ) {
123
                        pr_debug("Unsupported block size\n");
124
                        cmd->error = -EINVAL;
125
                        mmc_request_done(host->mmc, host->request);
126
                        return;
127
                } */
128
 
129 68 tac2
        printk(KERN_ALERT "%s: cmd_arg = %08x\n", __FUNCTION__, cmd_arg);
130 66 tac2
        printk(KERN_ALERT "%s: cmd_command   = %08x\n", __FUNCTION__, cmd_command);
131 71 AlbertVeli
        oc_host=host;
132 72 tac2
 
133
        //XXX:Remove after uppdated bitfil with Timeout
134 75 tac2
        /*if (cmd->opcode == 8  || cmd->opcode ==  5 )
135 72 tac2
        {
136
                host->mrq->cmd->error = -ETIMEDOUT;
137
                mmc_request_done(host->mmc, host->mrq);
138
        }
139
        else
140
        {
141
                CMD_IRQ_ON (host,(ECC|EEI));
142
                writel(cmd_command, host->base + SD_COMMAND);
143
                wmb();
144
                writel(cmd_arg, host->base + SD_ARG);
145 75 tac2
        }*/
146
        CMD_IRQ_ON (host,(ECC|EEI));
147
        writel(cmd_command, host->base + SD_COMMAND);
148
        wmb();
149
        writel(cmd_arg, host->base + SD_ARG);
150 65 AlbertVeli
}
151 69 AlbertVeli
 
152 66 tac2
static void ocores_process_next(struct ocores_host *host)
153 71 AlbertVeli
{
154
        host->word_cnt=0;
155 66 tac2
        if (!(host->flags & FL_SENT_COMMAND)) {
156
                host->flags |= FL_SENT_COMMAND;
157 69 AlbertVeli
                ocores_start_cmd(host, host->mrq->cmd);
158 66 tac2
        }
159
        else if ((!(host->flags & FL_SENT_STOP)) && host->mrq->stop) {
160
                host->flags |= FL_SENT_STOP;
161
                ocores_start_cmd(host, host->mrq->stop);
162
        }
163
}
164 69 AlbertVeli
 
165 65 AlbertVeli
static void ocores_request(struct mmc_host *mmc, struct mmc_request *mrq)
166
{
167
        struct ocores_host *host = mmc_priv(mmc);
168 69 AlbertVeli
 
169
        //unsigned int cmdr, mr;
170
 
171 65 AlbertVeli
        printk(KERN_ALERT "%s: mrq->cmd->opcode = %08x\n", __FUNCTION__, mrq->cmd->opcode);
172
        printk(KERN_ALERT "%s: mrq->cmd->arg    = %08x\n", __FUNCTION__, mrq->cmd->arg);
173
 
174 66 tac2
        //WARN_ON(host->mrq != NULL);
175 65 AlbertVeli
 
176
        host->mrq = mrq;
177 66 tac2
        host->flags = 0;
178 65 AlbertVeli
 
179 69 AlbertVeli
        ocores_process_next(host);
180
 
181
 
182 66 tac2
        printk(KERN_ALERT "%s: exit\n", __FUNCTION__);
183
}
184 65 AlbertVeli
 
185
 
186
 
187
static int ocores_get_ro(struct mmc_host *mmc)
188
{
189
        /* struct ocores_host *host = mmc_priv(mmc); */
190
 
191
        printk(KERN_ALERT "%s: enter\n", __FUNCTION__);
192
 
193
        /* if (host->pdata && host->pdata->get_ro) */
194
        /*      return host->pdata->get_ro(mmc_dev(mmc)); */
195
        /* /\* Host doesn't support read only detection so assume writeable *\/ */
196
        return 0;
197
}
198
 
199
static void ocores_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
200 69 AlbertVeli
{
201
        struct ocores_host *host = mmc_priv(mmc);
202 66 tac2
        int clk_div, cmd_timeout;
203 65 AlbertVeli
        /* struct ocores_host *host = mmc_priv(mmc); */
204 69 AlbertVeli
 
205 65 AlbertVeli
        printk(KERN_ALERT "%s: clock = 0x%08x\n", __FUNCTION__, ios->clock);
206
        printk(KERN_ALERT "%s: vdd = 0x%04x\n", __FUNCTION__, ios->vdd);
207
        printk(KERN_ALERT "%s: bus_mode = 0x%02x\n", __FUNCTION__, ios->bus_mode);
208
        printk(KERN_ALERT "%s: power_mode = 0x%02x\n", __FUNCTION__, ios->power_mode);
209
        printk(KERN_ALERT "%s: bus_width = 0x%02x\n", __FUNCTION__, ios->bus_width);
210
        printk(KERN_ALERT "%s: timing = 0x%02x\n", __FUNCTION__, ios->timing);
211 69 AlbertVeli
 
212 66 tac2
        //Set clock divider and timeout registers
213 69 AlbertVeli
        printk(KERN_ALERT "%s: host->base = %p\n", __FUNCTION__, host->base);
214 66 tac2
        if (ios->clock == 0) {
215 69 AlbertVeli
                //ocores_mci_write (host, SD_SOFTWARE_RST, SD_DISABLE);
216 66 tac2
        }
217
        else
218 69 AlbertVeli
        {
219 66 tac2
                writel(SD_DISABLE, host->base + SD_SOFTWARE_RST);
220
                clk_div = ((SYS_CLK / ios->clock)-2 )/ 2;
221 68 tac2
                cmd_timeout = ((SYS_CLK/ios->clock) * 512);
222 69 AlbertVeli
 
223 66 tac2
                printk(KERN_ALERT " clk_div = 0x%02x\n", clk_div);
224
                printk(KERN_ALERT " cmd_timeout = 0x%02x\n", cmd_timeout);
225 69 AlbertVeli
 
226 66 tac2
                writel (clk_div, host->base  + SD_CLOCK_DIVIDER);
227
                writel (cmd_timeout, host->base  + SD_TIMEOUT);
228 69 AlbertVeli
 
229
 
230 66 tac2
                writel(SD_ENABLE, host->base + SD_SOFTWARE_RST);
231
        }
232
 
233 65 AlbertVeli
}
234
 
235 66 tac2
 
236
 
237
static irqreturn_t ocores_irq_cmd(int irq, void *devid)
238
{
239 73 tac2
         struct ocores_host *host = (struct ocores_host *) devid;
240 71 AlbertVeli
 
241 70 tac2
         disable_irq(host->irq_cmd);
242 71 AlbertVeli
 
243 70 tac2
                //printk(KERN_ALERT "%s: IRQ START***** Normal In  = %08x\n", __FUNCTION__, readl(host->base + SD_NORMAL_INT_STATUS));
244 71 AlbertVeli
 
245 70 tac2
         host->registers.normal_int_status  = readl(host->base + SD_NORMAL_INT_STATUS);
246
         rmb();
247
         host->registers.error_int_status  = readl(host->base + SD_ERROR_INT_STATUS);
248 71 AlbertVeli
 
249 70 tac2
         writel(0,host->base + SD_NORMAL_INT_STATUS);
250
         writel(0,host->base + SD_ERROR_INT_STATUS);
251 71 AlbertVeli
 
252
         //printk(KERN_ALERT "%s: IRQ END***** Error In  = %08x\n", __FUNCTION__, readl(host->base + SD_ERROR_INT_STATUS));
253
         tasklet_schedule(&host->finish_cmd);
254
         CMD_IRQ_OFF (host,(ECC|EEI));
255
         enable_irq(host->irq_cmd);
256
 
257
         return IRQ_HANDLED;
258 66 tac2
}
259
 
260
static irqreturn_t ocores_irq_dat(int irq, void *dev_id)
261
{
262
 
263
}
264 69 AlbertVeli
 
265 65 AlbertVeli
static const struct mmc_host_ops ocores_ops = {
266
        .request                = ocores_request,
267
        .get_ro                 = ocores_get_ro,
268
        .set_ios                = ocores_set_ios,
269
        /* .enable_sdio_irq     = ocores_enable_sdio_irq, */
270
};
271
 
272
static int ocores_probe(struct platform_device *pdev)
273
{
274
        struct mmc_host *mmc;
275
        struct ocores_host *host = NULL;
276
        struct resource *r;
277
        int ret;
278
 
279
        printk(KERN_ALERT "%s: enter\n", __FUNCTION__);
280
 
281
        r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
282
 
283
        printk(KERN_ALERT "%s: resource %x, %x\n", __FUNCTION__, r->start, r->end);
284
 
285
        r = request_mem_region(r->start, r->end - r->start, DRIVER_NAME);
286
        if (!r) {
287
                return -EBUSY;
288
        }
289
 
290
        mmc = mmc_alloc_host(sizeof(struct ocores_host), &pdev->dev);
291
        if (!mmc) {
292
                ret = -ENOMEM;
293
                goto out;
294
        }
295
 
296 69 AlbertVeli
 
297 65 AlbertVeli
        mmc->ops = &ocores_ops;
298 69 AlbertVeli
 
299 65 AlbertVeli
        mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
300
        mmc->caps = MMC_CAP_4_BIT_DATA;
301 66 tac2
        mmc->f_min = 700000;  //SYS_CLK  60; 0.7 Mhz
302 69 AlbertVeli
        mmc->f_max = 4166666;  //SYS_CLK;   4.166 666 mhz
303 65 AlbertVeli
 
304
        mmc->max_blk_count = 8;
305
        mmc->max_hw_segs = mmc->max_blk_count;
306
        mmc->max_blk_size = MMCOC_MAX_BLOCK_SIZE;
307
        mmc->max_seg_size = mmc->max_blk_count * mmc->max_blk_size;
308
        mmc->max_req_size = mmc->max_seg_size;
309
        mmc->max_phys_segs = mmc->max_hw_segs;
310
 
311
        host = mmc_priv(mmc);
312
        host->mmc = mmc;
313
        host->cmdat = 0;
314 69 AlbertVeli
        host->registers.normal_int_status =0;
315 65 AlbertVeli
 
316 66 tac2
 
317 69 AlbertVeli
        tasklet_init(&host->finish_cmd, ocores_tasklet_finish_cmd,
318
                     (unsigned long) host);
319
 
320 65 AlbertVeli
        spin_lock_init(&host->lock);
321
        host->res = r;
322
 
323 66 tac2
        host->base = ioremap(r->start, r->end - r->start +1);
324 65 AlbertVeli
        /* host->base = (void *)r->start; */
325
        if (!host->base) {
326
                ret = -ENOMEM;
327
                goto out;
328
        }
329
        host->pdata = pdev->dev.platform_data;
330
        mmc->ocr_avail = host->pdata->ocr_mask;
331 69 AlbertVeli
 
332
        host->irq_cmd = platform_get_irq_byname(pdev, "cmd_irq");
333 66 tac2
        ret = request_irq(host->irq_cmd, ocores_irq_cmd, IRQF_DISABLED, DRIVER_NAME, host);
334 69 AlbertVeli
        printk(KERN_ALERT "%s: IRQ dat resource  %x\n", __FUNCTION__, host->irq_cmd );
335
        printk(KERN_ALERT "%s: RET cmd irq %x\n", __FUNCTION__, ret);
336
        if (ret)
337 66 tac2
                goto out;
338
        disable_irq(host->irq_cmd);
339 69 AlbertVeli
 
340 66 tac2
        host->irq_dat = platform_get_irq_byname(pdev, "dat_irq");
341
        ret = request_irq(host->irq_dat, ocores_irq_dat, IRQF_DISABLED, DRIVER_NAME, host);
342 69 AlbertVeli
        printk(KERN_ALERT "%s: IRQ dat resource  %x\n", __FUNCTION__, host->irq_dat );
343
        printk(KERN_ALERT "%s: RET Dat irq  %x\n", __FUNCTION__, ret);
344
        if (ret)
345 66 tac2
                goto out;
346 69 AlbertVeli
        disable_irq(host->irq_dat);
347 65 AlbertVeli
 
348 66 tac2
 
349
 
350 69 AlbertVeli
        enable_irq(host->irq_cmd);
351 66 tac2
        enable_irq(host->irq_dat);
352 65 AlbertVeli
        printk(KERN_ALERT "%s: host->base = %p\n", __FUNCTION__, host->base);
353
        printk(KERN_ALERT "%s: SD_BLOCK = %08x\n", __FUNCTION__, readl(host->base + SD_BLOCK));
354
        printk(KERN_ALERT "%s: host->pdata->ocr_mask = %08x\n", __FUNCTION__, host->pdata->ocr_mask);
355 69 AlbertVeli
        oc_host=host;
356 65 AlbertVeli
        mmc_add_host(mmc);
357
 
358
        printk(KERN_ALERT "%s: exit\n", __FUNCTION__);
359
 
360
        return 0;
361
 
362
 out:
363 66 tac2
        printk(KERN_ALERT "%s: ERROR REQUESTINING RESOURCES\n", __FUNCTION__);
364 65 AlbertVeli
        if (mmc) {
365
                mmc_free_host(mmc);
366
        }
367
        release_resource(r);
368
 
369
        return ret;
370
}
371
 
372 69 AlbertVeli
static void ocores_tasklet_finish_cmd(unsigned long param)
373
{
374
        struct ocores_host *host = (struct ocores_host *) param;
375
 
376
        printk(KERN_ALERT " TASKLET RUNNS************\n");
377
 
378
        printk(KERN_ALERT "%s: TASKLET RUNNS****** Normal INT = %08x\n", __FUNCTION__,  host->registers.normal_int_status);
379
        printk(KERN_ALERT "%s: TASKLET RUNNS****** Error INT = %08x\n", __FUNCTION__,  host->registers.error_int_status);
380
 
381
        //Check For Transmissions errors
382
        if ((host->registers.normal_int_status & EI) == EI)
383
        {
384
                printk(KERN_ALERT "TRANSMISSION ERROR DETECTED");
385
                switch ( host->registers.error_int_status )
386
                {
387
                case (CTE):
388
                        pr_debug("Card took too long to respond\n");
389
                        host->mrq->cmd->error = -ETIMEDOUT ;
390
                        break;
391
                case (CCRC  ):
392
                        pr_debug(" CRC  problem with the received or sent data\n");
393
                        host->mrq->cmd->error = -EILSEQ;
394
                        break;
395
                case (CIE  ):
396
                        pr_debug("Index problem with the received or sent data\n");
397
                        host->mrq->cmd->error = -EILSEQ;
398
                        break;
399
                }
400
        }
401
        else
402 73 tac2
        {
403 74 tac2
                if ( mmc_resp_type(host->mrq->cmd) == MMC_RSP_R2      )   //Long response
404 71 AlbertVeli
                {
405 75 tac2
                        printk(KERN_ALERT "Long Response, Word Cnt %d, RESP  * = %08x\n ",host->word_cnt,readl(host->base + SD_RESP1));
406
 
407
                        if  (host->mrq->cmd->opcode == 2){
408
                        host->mrq->cmd->resp[3]  =  readl(host->base + SD_RESP1);
409
                        host->mrq->cmd->resp[2]  =  0xaaaaaaaa;
410
                        host->mrq->cmd->resp[1]  =  0xbbbbbbbb;
411
                        host->mrq->cmd->resp[0]  =  0;
412
                        mmc_request_done(host->mmc, host->mrq);
413
 
414 70 tac2
                        }
415 75 tac2
                        else {
416
                                host->word_cnt+=1;
417
                                switch(host->word_cnt-1)
418
                                {
419
                                case (0):
420
                                        host->mrq->cmd->resp[3]  =  readl(host->base + SD_RESP1);
421
                                        ocores_start_cmd(host, host->mrq->cmd);
422
                                        break;
423
                                case (1):
424
                                        host->mrq->cmd->resp[2]  =  readl(host->base + SD_RESP1);
425
                                        ocores_start_cmd(host, host->mrq->cmd);
426
                                        break;
427
                                case (2):
428
                                        host->mrq->cmd->resp[1]  =  readl(host->base + SD_RESP1);
429
                                        ocores_start_cmd(host, host->mrq->cmd);
430
                                        break;
431
                                case (3):
432
                                        host->mrq->cmd->resp[0]  =  readl(host->base + SD_RESP1);
433
                                        mmc_request_done(host->mmc, host->mrq);
434
                                        break;
435
                                }
436
                        }
437 71 AlbertVeli
                }
438
                else  //Short response
439
                {
440
                        host->mrq->cmd->error = 0 ;
441
                        host->mrq->cmd->resp[0] = readl(host->base + SD_RESP1);
442
                        printk(KERN_ALERT "Short Response CMD RSP * = %08x\n", host->mrq->cmd->resp[0]);
443
                        mmc_request_done(host->mmc, host->mrq);
444
                }
445 69 AlbertVeli
        }
446 72 tac2
 
447 69 AlbertVeli
}
448
 
449 65 AlbertVeli
static int ocores_remove(struct platform_device *pdev)
450
{
451
        struct mmc_host *mmc = platform_get_drvdata(pdev);
452
 
453
        printk(KERN_ALERT "%s: enter\n", __FUNCTION__);
454
 
455
        platform_set_drvdata(pdev, NULL);
456
 
457
        if (mmc) {
458
                struct ocores_host *host = mmc_priv(mmc);
459
 
460
                mmc_remove_host(mmc);
461
 
462
                release_resource(host->res);
463
 
464
                mmc_free_host(mmc);
465
        }
466
 
467
        printk(KERN_ALERT "%s: exit\n", __FUNCTION__);
468
 
469
        return 0;
470
}
471
 
472
#ifdef CONFIG_PM
473
static int ocores_suspend(struct platform_device *dev, pm_message_t state)
474
{
475
        struct mmc_host *mmc = platform_get_drvdata(dev);
476
        int ret = 0;
477
 
478
        printk(KERN_ALERT "%s: enter\n", __FUNCTION__);
479
 
480
        if (mmc) {
481
                ret = mmc_suspend_host(mmc, state);
482
        }
483
 
484
        printk(KERN_ALERT "%s: exit\n", __FUNCTION__);
485
 
486
        return ret;
487
}
488
 
489
static int ocores_resume(struct platform_device *dev)
490
{
491
        struct mmc_host *mmc = platform_get_drvdata(dev);
492
        int ret = 0;
493
 
494
        printk(KERN_ALERT "%s: enter\n", __FUNCTION__);
495
 
496
        if (mmc) {
497
                ret = mmc_resume_host(mmc);
498
        }
499
 
500
        printk(KERN_ALERT "%s: exit\n", __FUNCTION__);
501
 
502
        return ret;
503
}
504
#else
505
#define ocores_suspend  NULL
506
#define ocores_resume   NULL
507
#endif
508
 
509
static struct platform_driver ocores_driver = {
510
        .probe          = ocores_probe,
511
        .remove         = ocores_remove,
512
        .suspend        = ocores_suspend,
513
        .resume         = ocores_resume,
514
        .driver         = {
515
                .name   = DRIVER_NAME,
516
        },
517
};
518
 
519
static int __init ocores_init(void)
520
{
521
        printk(KERN_ALERT "%s: registering ocores platform_driver\n", __FUNCTION__);
522
 
523
        return platform_driver_register(&ocores_driver);
524
}
525
 
526
static void __exit ocores_exit(void)
527
{
528
        printk(KERN_ALERT "%s: unregistering ocores platform_driver\n", __FUNCTION__);
529
 
530
        platform_driver_unregister(&ocores_driver);
531
}
532
 
533
module_init(ocores_init);
534
module_exit(ocores_exit);
535
 
536
MODULE_DESCRIPTION("OpenCores Multimedia Card Interface Driver");
537
MODULE_LICENSE("GPL");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.