~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/soc/fsl/qe/ucc.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * Copyright (C) 2006 Freescale Semiconductor, Inc. All rights reserved.
  4  *
  5  * Authors:     Shlomi Gridish <gridish@freescale.com>
  6  *              Li Yang <leoli@freescale.com>
  7  *
  8  * Description:
  9  * Internal header file for UCC unit routines.
 10  */
 11 #ifndef __UCC_H__
 12 #define __UCC_H__
 13 
 14 #include <soc/fsl/qe/immap_qe.h>
 15 #include <soc/fsl/qe/qe.h>
 16 
 17 #define STATISTICS
 18 
 19 #define UCC_MAX_NUM     8
 20 
 21 /* Slow or fast type for UCCs.
 22 */
 23 enum ucc_speed_type {
 24         UCC_SPEED_TYPE_FAST = UCC_GUEMR_MODE_FAST_RX | UCC_GUEMR_MODE_FAST_TX,
 25         UCC_SPEED_TYPE_SLOW = UCC_GUEMR_MODE_SLOW_RX | UCC_GUEMR_MODE_SLOW_TX
 26 };
 27 
 28 /* ucc_set_type
 29  * Sets UCC to slow or fast mode.
 30  *
 31  * ucc_num - (In) number of UCC (0-7).
 32  * speed   - (In) slow or fast mode for UCC.
 33  */
 34 int ucc_set_type(unsigned int ucc_num, enum ucc_speed_type speed);
 35 
 36 int ucc_set_qe_mux_mii_mng(unsigned int ucc_num);
 37 
 38 int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock,
 39         enum comm_dir mode);
 40 int ucc_set_tdm_rxtx_clk(unsigned int tdm_num, enum qe_clock clock,
 41                          enum comm_dir mode);
 42 int ucc_set_tdm_rxtx_sync(unsigned int tdm_num, enum qe_clock clock,
 43                           enum comm_dir mode);
 44 
 45 int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask);
 46 
 47 /* QE MUX clock routing for UCC
 48 */
 49 static inline int ucc_set_qe_mux_grant(unsigned int ucc_num, int set)
 50 {
 51         return ucc_mux_set_grant_tsa_bkpt(ucc_num, set, QE_CMXUCR_GRANT);
 52 }
 53 
 54 static inline int ucc_set_qe_mux_tsa(unsigned int ucc_num, int set)
 55 {
 56         return ucc_mux_set_grant_tsa_bkpt(ucc_num, set, QE_CMXUCR_TSA);
 57 }
 58 
 59 static inline int ucc_set_qe_mux_bkpt(unsigned int ucc_num, int set)
 60 {
 61         return ucc_mux_set_grant_tsa_bkpt(ucc_num, set, QE_CMXUCR_BKPT);
 62 }
 63 
 64 #endif                          /* __UCC_H__ */
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php