aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-07-16 18:22:01 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-10-03 21:36:36 -0400
commit663edbd2640447dc43840568cd5701e6c9878d63 (patch)
treea68f486d53e7d82c86b1fa2fe75ea87d1ea35b56 /include/asm-powerpc
parentfb533d0c5a9783ecafa9a177bace6384c47282a9 (diff)
[POWERPC] 8xx: Add pin and clock setting functions.
These let board code set up pins and clocks without having to put magic numbers directly into the registers. The clock function is mostly duplicated from the cpm2 version; hopefully this stuff can be merged at some point. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/commproc.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/asm-powerpc/commproc.h b/include/asm-powerpc/commproc.h
index 86fcf265c54a..5dec32404fa2 100644
--- a/include/asm-powerpc/commproc.h
+++ b/include/asm-powerpc/commproc.h
@@ -691,4 +691,53 @@ extern void cpm_free_handler(int vec);
691 691
692#define IMAP_ADDR (get_immrbase()) 692#define IMAP_ADDR (get_immrbase())
693 693
694#define CPM_PIN_INPUT 0
695#define CPM_PIN_OUTPUT 1
696#define CPM_PIN_PRIMARY 0
697#define CPM_PIN_SECONDARY 2
698#define CPM_PIN_GPIO 4
699#define CPM_PIN_OPENDRAIN 8
700
701enum cpm_port {
702 CPM_PORTA,
703 CPM_PORTB,
704 CPM_PORTC,
705 CPM_PORTD,
706 CPM_PORTE,
707};
708
709void cpm1_set_pin(enum cpm_port port, int pin, int flags);
710
711enum cpm_clk_dir {
712 CPM_CLK_RX,
713 CPM_CLK_TX,
714 CPM_CLK_RTX
715};
716
717enum cpm_clk_target {
718 CPM_CLK_SCC1,
719 CPM_CLK_SCC2,
720 CPM_CLK_SCC3,
721 CPM_CLK_SCC4,
722 CPM_CLK_SMC1,
723 CPM_CLK_SMC2,
724};
725
726enum cpm_clk {
727 CPM_BRG1, /* Baud Rate Generator 1 */
728 CPM_BRG2, /* Baud Rate Generator 2 */
729 CPM_BRG3, /* Baud Rate Generator 3 */
730 CPM_BRG4, /* Baud Rate Generator 4 */
731 CPM_CLK1, /* Clock 1 */
732 CPM_CLK2, /* Clock 2 */
733 CPM_CLK3, /* Clock 3 */
734 CPM_CLK4, /* Clock 4 */
735 CPM_CLK5, /* Clock 5 */
736 CPM_CLK6, /* Clock 6 */
737 CPM_CLK7, /* Clock 7 */
738 CPM_CLK8, /* Clock 8 */
739};
740
741int cpm1_clk_setup(enum cpm_clk_target target, int clock, int mode);
742
694#endif /* __CPM_8XX__ */ 743#endif /* __CPM_8XX__ */