Commit 0987862149575e557d50b2fc0cce21e2c04a257b
1 parent
fb646cdbca
Exists in
master
arm:omap:cpsw: fix module build support for Ethernet
export api used by cpsw driver so that the cpsw driver can be built as module. Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Showing 2 changed files with 27 additions and 0 deletions Side-by-side Diff
drivers/net/cpsw_ale.c
... | ... | @@ -351,6 +351,7 @@ |
351 | 351 | cpsw_ale_write(ale, idx, ale_entry); |
352 | 352 | return 0; |
353 | 353 | } |
354 | +EXPORT_SYMBOL_GPL(cpsw_ale_add_ucast); | |
354 | 355 | |
355 | 356 | int cpsw_ale_del_ucast(struct cpsw_ale *ale, u8 *addr, int port) |
356 | 357 | { |
... | ... | @@ -365,6 +366,7 @@ |
365 | 366 | cpsw_ale_write(ale, idx, ale_entry); |
366 | 367 | return 0; |
367 | 368 | } |
369 | +EXPORT_SYMBOL_GPL(cpsw_ale_del_ucast); | |
368 | 370 | |
369 | 371 | int cpsw_ale_add_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask) |
370 | 372 | { |
... | ... | @@ -393,6 +395,7 @@ |
393 | 395 | cpsw_ale_write(ale, idx, ale_entry); |
394 | 396 | return 0; |
395 | 397 | } |
398 | +EXPORT_SYMBOL_GPL(cpsw_ale_add_mcast); | |
396 | 399 | |
397 | 400 | int cpsw_ale_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask) |
398 | 401 | { |
... | ... | @@ -487,6 +490,7 @@ |
487 | 490 | } |
488 | 491 | return 0; |
489 | 492 | } |
493 | +EXPORT_SYMBOL_GPL(cpsw_ale_control_set); | |
490 | 494 | |
491 | 495 | int cpsw_ale_control_get(struct cpsw_ale *ale, int port, int control) |
492 | 496 | { |
... | ... | @@ -649,6 +653,7 @@ |
649 | 653 | add_timer(&ale->timer); |
650 | 654 | } |
651 | 655 | } |
656 | +EXPORT_SYMBOL_GPL(cpsw_ale_start); | |
652 | 657 | |
653 | 658 | void cpsw_ale_stop(struct cpsw_ale *ale) |
654 | 659 | { |
... | ... | @@ -656,6 +661,7 @@ |
656 | 661 | device_remove_file(ale->params.dev, &ale->ale_table_attr); |
657 | 662 | device_remove_file(ale->params.dev, &ale->ale_control_attr); |
658 | 663 | } |
664 | +EXPORT_SYMBOL_GPL(cpsw_ale_stop); | |
659 | 665 | |
660 | 666 | struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params) |
661 | 667 | { |
... | ... | @@ -672,6 +678,7 @@ |
672 | 678 | |
673 | 679 | return ale; |
674 | 680 | } |
681 | +EXPORT_SYMBOL_GPL(cpsw_ale_create); | |
675 | 682 | |
676 | 683 | int cpsw_ale_destroy(struct cpsw_ale *ale) |
677 | 684 | { |
... | ... | @@ -682,4 +689,9 @@ |
682 | 689 | kfree(ale); |
683 | 690 | return 0; |
684 | 691 | } |
692 | +EXPORT_SYMBOL_GPL(cpsw_ale_destroy); | |
693 | + | |
694 | +MODULE_DESCRIPTION("Ethernet Switch Address Lookup Engine driver"); | |
695 | +MODULE_AUTHOR("Chandan Nath <chandan.nath@ti.com>"); | |
696 | +MODULE_LICENSE("GPL"); |
drivers/net/davinci_cpdma.c
... | ... | @@ -276,6 +276,7 @@ |
276 | 276 | ctlr->num_chan = CPDMA_MAX_CHANNELS; |
277 | 277 | return ctlr; |
278 | 278 | } |
279 | +EXPORT_SYMBOL_GPL(cpdma_ctlr_create); | |
279 | 280 | |
280 | 281 | int cpdma_ctlr_start(struct cpdma_ctlr *ctlr) |
281 | 282 | { |
... | ... | @@ -321,6 +322,7 @@ |
321 | 322 | spin_unlock_irqrestore(&ctlr->lock, flags); |
322 | 323 | return 0; |
323 | 324 | } |
325 | +EXPORT_SYMBOL_GPL(cpdma_ctlr_start); | |
324 | 326 | |
325 | 327 | int cpdma_ctlr_stop(struct cpdma_ctlr *ctlr) |
326 | 328 | { |
... | ... | @@ -351,6 +353,7 @@ |
351 | 353 | spin_unlock_irqrestore(&ctlr->lock, flags); |
352 | 354 | return 0; |
353 | 355 | } |
356 | +EXPORT_SYMBOL_GPL(cpdma_ctlr_stop); | |
354 | 357 | |
355 | 358 | int cpdma_ctlr_dump(struct cpdma_ctlr *ctlr) |
356 | 359 | { |
... | ... | @@ -444,6 +447,7 @@ |
444 | 447 | kfree(ctlr); |
445 | 448 | return ret; |
446 | 449 | } |
450 | +EXPORT_SYMBOL_GPL(cpdma_ctlr_destroy); | |
447 | 451 | |
448 | 452 | int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable) |
449 | 453 | { |
... | ... | @@ -467,6 +471,7 @@ |
467 | 471 | spin_unlock_irqrestore(&ctlr->lock, flags); |
468 | 472 | return 0; |
469 | 473 | } |
474 | +EXPORT_SYMBOL_GPL(cpdma_ctlr_int_ctrl); | |
470 | 475 | |
471 | 476 | void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr) |
472 | 477 | { |
... | ... | @@ -474,6 +479,7 @@ |
474 | 479 | dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, 1); |
475 | 480 | dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, 2); |
476 | 481 | } |
482 | +EXPORT_SYMBOL_GPL(cpdma_ctlr_eoi); | |
477 | 483 | |
478 | 484 | struct cpdma_chan *cpdma_chan_create(struct cpdma_ctlr *ctlr, int chan_num, |
479 | 485 | cpdma_handler_fn handler) |
... | ... | @@ -530,6 +536,7 @@ |
530 | 536 | err_chan_alloc: |
531 | 537 | return ERR_PTR(ret); |
532 | 538 | } |
539 | +EXPORT_SYMBOL_GPL(cpdma_chan_create); | |
533 | 540 | |
534 | 541 | int cpdma_chan_destroy(struct cpdma_chan *chan) |
535 | 542 | { |
... | ... | @@ -547,6 +554,7 @@ |
547 | 554 | kfree(chan); |
548 | 555 | return 0; |
549 | 556 | } |
557 | +EXPORT_SYMBOL_GPL(cpdma_chan_destroy); | |
550 | 558 | |
551 | 559 | int cpdma_chan_get_stats(struct cpdma_chan *chan, |
552 | 560 | struct cpdma_chan_stats *stats) |
... | ... | @@ -559,6 +567,7 @@ |
559 | 567 | spin_unlock_irqrestore(&chan->lock, flags); |
560 | 568 | return 0; |
561 | 569 | } |
570 | +EXPORT_SYMBOL_GPL(cpdma_chan_get_stats); | |
562 | 571 | |
563 | 572 | int cpdma_chan_dump(struct cpdma_chan *chan) |
564 | 573 | { |
... | ... | @@ -695,6 +704,7 @@ |
695 | 704 | spin_unlock_irqrestore(&chan->lock, flags); |
696 | 705 | return ret; |
697 | 706 | } |
707 | +EXPORT_SYMBOL_GPL(cpdma_chan_submit); | |
698 | 708 | |
699 | 709 | static void __cpdma_chan_free(struct cpdma_chan *chan, |
700 | 710 | struct cpdma_desc __iomem *desc, |
... | ... | @@ -772,6 +782,7 @@ |
772 | 782 | } |
773 | 783 | return used; |
774 | 784 | } |
785 | +EXPORT_SYMBOL_GPL(cpdma_chan_process); | |
775 | 786 | |
776 | 787 | int cpdma_chan_start(struct cpdma_chan *chan) |
777 | 788 | { |
... | ... | @@ -799,6 +810,7 @@ |
799 | 810 | spin_unlock_irqrestore(&chan->lock, flags); |
800 | 811 | return 0; |
801 | 812 | } |
813 | +EXPORT_SYMBOL_GPL(cpdma_chan_start); | |
802 | 814 | |
803 | 815 | int cpdma_chan_stop(struct cpdma_chan *chan) |
804 | 816 | { |
... | ... | @@ -857,6 +869,7 @@ |
857 | 869 | spin_unlock_irqrestore(&chan->lock, flags); |
858 | 870 | return 0; |
859 | 871 | } |
872 | +EXPORT_SYMBOL_GPL(cpdma_chan_stop); | |
860 | 873 | |
861 | 874 | int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable) |
862 | 875 | { |
... | ... | @@ -964,4 +977,5 @@ |
964 | 977 | spin_unlock_irqrestore(&ctlr->lock, flags); |
965 | 978 | return ret; |
966 | 979 | } |
980 | +EXPORT_SYMBOL_GPL(cpdma_control_set); |