diff options
Diffstat (limited to 'arch/arm/plat-omap/dmtimer.c')
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index e4f0ce04ba92..bfd47570cc91 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/clk.h> | 33 | #include <linux/clk.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | #include <linux/module.h> | ||
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | #include <mach/dmtimer.h> | 38 | #include <mach/dmtimer.h> |
38 | #include <mach/irqs.h> | 39 | #include <mach/irqs.h> |
@@ -362,6 +363,7 @@ struct omap_dm_timer *omap_dm_timer_request(void) | |||
362 | 363 | ||
363 | return timer; | 364 | return timer; |
364 | } | 365 | } |
366 | EXPORT_SYMBOL_GPL(omap_dm_timer_request); | ||
365 | 367 | ||
366 | struct omap_dm_timer *omap_dm_timer_request_specific(int id) | 368 | struct omap_dm_timer *omap_dm_timer_request_specific(int id) |
367 | { | 369 | { |
@@ -385,6 +387,7 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id) | |||
385 | 387 | ||
386 | return timer; | 388 | return timer; |
387 | } | 389 | } |
390 | EXPORT_SYMBOL_GPL(omap_dm_timer_request_specific); | ||
388 | 391 | ||
389 | void omap_dm_timer_free(struct omap_dm_timer *timer) | 392 | void omap_dm_timer_free(struct omap_dm_timer *timer) |
390 | { | 393 | { |
@@ -395,6 +398,7 @@ void omap_dm_timer_free(struct omap_dm_timer *timer) | |||
395 | WARN_ON(!timer->reserved); | 398 | WARN_ON(!timer->reserved); |
396 | timer->reserved = 0; | 399 | timer->reserved = 0; |
397 | } | 400 | } |
401 | EXPORT_SYMBOL_GPL(omap_dm_timer_free); | ||
398 | 402 | ||
399 | void omap_dm_timer_enable(struct omap_dm_timer *timer) | 403 | void omap_dm_timer_enable(struct omap_dm_timer *timer) |
400 | { | 404 | { |
@@ -406,6 +410,7 @@ void omap_dm_timer_enable(struct omap_dm_timer *timer) | |||
406 | 410 | ||
407 | timer->enabled = 1; | 411 | timer->enabled = 1; |
408 | } | 412 | } |
413 | EXPORT_SYMBOL_GPL(omap_dm_timer_enable); | ||
409 | 414 | ||
410 | void omap_dm_timer_disable(struct omap_dm_timer *timer) | 415 | void omap_dm_timer_disable(struct omap_dm_timer *timer) |
411 | { | 416 | { |
@@ -417,11 +422,13 @@ void omap_dm_timer_disable(struct omap_dm_timer *timer) | |||
417 | 422 | ||
418 | timer->enabled = 0; | 423 | timer->enabled = 0; |
419 | } | 424 | } |
425 | EXPORT_SYMBOL_GPL(omap_dm_timer_disable); | ||
420 | 426 | ||
421 | int omap_dm_timer_get_irq(struct omap_dm_timer *timer) | 427 | int omap_dm_timer_get_irq(struct omap_dm_timer *timer) |
422 | { | 428 | { |
423 | return timer->irq; | 429 | return timer->irq; |
424 | } | 430 | } |
431 | EXPORT_SYMBOL_GPL(omap_dm_timer_get_irq); | ||
425 | 432 | ||
426 | #if defined(CONFIG_ARCH_OMAP1) | 433 | #if defined(CONFIG_ARCH_OMAP1) |
427 | 434 | ||
@@ -452,6 +459,7 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) | |||
452 | 459 | ||
453 | return inputmask; | 460 | return inputmask; |
454 | } | 461 | } |
462 | EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask); | ||
455 | 463 | ||
456 | #elif defined(CONFIG_ARCH_OMAP2) || defined (CONFIG_ARCH_OMAP3) | 464 | #elif defined(CONFIG_ARCH_OMAP2) || defined (CONFIG_ARCH_OMAP3) |
457 | 465 | ||
@@ -459,6 +467,7 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) | |||
459 | { | 467 | { |
460 | return timer->fclk; | 468 | return timer->fclk; |
461 | } | 469 | } |
470 | EXPORT_SYMBOL_GPL(omap_dm_timer_get_fclk); | ||
462 | 471 | ||
463 | __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) | 472 | __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) |
464 | { | 473 | { |
@@ -466,6 +475,7 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) | |||
466 | 475 | ||
467 | return 0; | 476 | return 0; |
468 | } | 477 | } |
478 | EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask); | ||
469 | 479 | ||
470 | #endif | 480 | #endif |
471 | 481 | ||
@@ -473,6 +483,7 @@ void omap_dm_timer_trigger(struct omap_dm_timer *timer) | |||
473 | { | 483 | { |
474 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); | 484 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); |
475 | } | 485 | } |
486 | EXPORT_SYMBOL_GPL(omap_dm_timer_trigger); | ||
476 | 487 | ||
477 | void omap_dm_timer_start(struct omap_dm_timer *timer) | 488 | void omap_dm_timer_start(struct omap_dm_timer *timer) |
478 | { | 489 | { |
@@ -484,6 +495,7 @@ void omap_dm_timer_start(struct omap_dm_timer *timer) | |||
484 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 495 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
485 | } | 496 | } |
486 | } | 497 | } |
498 | EXPORT_SYMBOL_GPL(omap_dm_timer_start); | ||
487 | 499 | ||
488 | void omap_dm_timer_stop(struct omap_dm_timer *timer) | 500 | void omap_dm_timer_stop(struct omap_dm_timer *timer) |
489 | { | 501 | { |
@@ -495,6 +507,7 @@ void omap_dm_timer_stop(struct omap_dm_timer *timer) | |||
495 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 507 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
496 | } | 508 | } |
497 | } | 509 | } |
510 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); | ||
498 | 511 | ||
499 | #ifdef CONFIG_ARCH_OMAP1 | 512 | #ifdef CONFIG_ARCH_OMAP1 |
500 | 513 | ||
@@ -507,6 +520,7 @@ void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | |||
507 | l |= source << n; | 520 | l |= source << n; |
508 | omap_writel(l, MOD_CONF_CTRL_1); | 521 | omap_writel(l, MOD_CONF_CTRL_1); |
509 | } | 522 | } |
523 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_source); | ||
510 | 524 | ||
511 | #else | 525 | #else |
512 | 526 | ||
@@ -523,6 +537,7 @@ void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | |||
523 | * cause an abort. */ | 537 | * cause an abort. */ |
524 | __delay(150000); | 538 | __delay(150000); |
525 | } | 539 | } |
540 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_source); | ||
526 | 541 | ||
527 | #endif | 542 | #endif |
528 | 543 | ||
@@ -541,6 +556,7 @@ void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, | |||
541 | 556 | ||
542 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); | 557 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); |
543 | } | 558 | } |
559 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_load); | ||
544 | 560 | ||
545 | /* Optimized set_load which removes costly spin wait in timer_start */ | 561 | /* Optimized set_load which removes costly spin wait in timer_start */ |
546 | void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, | 562 | void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, |
@@ -560,6 +576,7 @@ void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, | |||
560 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load); | 576 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load); |
561 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 577 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
562 | } | 578 | } |
579 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start); | ||
563 | 580 | ||
564 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, | 581 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, |
565 | unsigned int match) | 582 | unsigned int match) |
@@ -574,6 +591,7 @@ void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, | |||
574 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 591 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
575 | omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); | 592 | omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); |
576 | } | 593 | } |
594 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_match); | ||
577 | 595 | ||
578 | void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, | 596 | void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, |
579 | int toggle, int trigger) | 597 | int toggle, int trigger) |
@@ -590,6 +608,7 @@ void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, | |||
590 | l |= trigger << 10; | 608 | l |= trigger << 10; |
591 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 609 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
592 | } | 610 | } |
611 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_pwm); | ||
593 | 612 | ||
594 | void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler) | 613 | void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler) |
595 | { | 614 | { |
@@ -603,6 +622,7 @@ void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler) | |||
603 | } | 622 | } |
604 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 623 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
605 | } | 624 | } |
625 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler); | ||
606 | 626 | ||
607 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, | 627 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, |
608 | unsigned int value) | 628 | unsigned int value) |
@@ -610,6 +630,7 @@ void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, | |||
610 | omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); | 630 | omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); |
611 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value); | 631 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value); |
612 | } | 632 | } |
633 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable); | ||
613 | 634 | ||
614 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) | 635 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) |
615 | { | 636 | { |
@@ -619,11 +640,13 @@ unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) | |||
619 | 640 | ||
620 | return l; | 641 | return l; |
621 | } | 642 | } |
643 | EXPORT_SYMBOL_GPL(omap_dm_timer_read_status); | ||
622 | 644 | ||
623 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) | 645 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) |
624 | { | 646 | { |
625 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); | 647 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); |
626 | } | 648 | } |
649 | EXPORT_SYMBOL_GPL(omap_dm_timer_write_status); | ||
627 | 650 | ||
628 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) | 651 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) |
629 | { | 652 | { |
@@ -633,11 +656,13 @@ unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) | |||
633 | 656 | ||
634 | return l; | 657 | return l; |
635 | } | 658 | } |
659 | EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter); | ||
636 | 660 | ||
637 | void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value) | 661 | void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value) |
638 | { | 662 | { |
639 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, value); | 663 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, value); |
640 | } | 664 | } |
665 | EXPORT_SYMBOL_GPL(omap_dm_timer_write_counter); | ||
641 | 666 | ||
642 | int omap_dm_timers_active(void) | 667 | int omap_dm_timers_active(void) |
643 | { | 668 | { |
@@ -658,6 +683,7 @@ int omap_dm_timers_active(void) | |||
658 | } | 683 | } |
659 | return 0; | 684 | return 0; |
660 | } | 685 | } |
686 | EXPORT_SYMBOL_GPL(omap_dm_timers_active); | ||
661 | 687 | ||
662 | int __init omap_dm_timer_init(void) | 688 | int __init omap_dm_timer_init(void) |
663 | { | 689 | { |