linux/drivers/soc/fsl/qe/ucc.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * arch/powerpc/sysdev/qe_lib/ucc.c
 *
 * QE UCC API Set - UCC specific routines implementations.
 *
 * Copyright (C) 2006 Freescale Semiconductor, Inc. All rights reserved.
 *
 * Authors: 	Shlomi Gridish <[email protected]>
 * 		Li Yang <[email protected]>
 */
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/stddef.h>
#include <linux/spinlock.h>
#include <linux/export.h>

#include <asm/io.h>
#include <soc/fsl/qe/immap_qe.h>
#include <soc/fsl/qe/qe.h>
#include <soc/fsl/qe/ucc.h>

#define UCC_TDM_NUM
#define RX_SYNC_SHIFT_BASE
#define TX_SYNC_SHIFT_BASE
#define RX_CLK_SHIFT_BASE
#define TX_CLK_SHIFT_BASE

int ucc_set_qe_mux_mii_mng(unsigned int ucc_num)
{}
EXPORT_SYMBOL();

/* Configure the UCC to either Slow or Fast.
 *
 * A given UCC can be figured to support either "slow" devices (e.g. UART)
 * or "fast" devices (e.g. Ethernet).
 *
 * 'ucc_num' is the UCC number, from 0 - 7.
 *
 * This function also sets the UCC_GUEMR_SET_RESERVED3 bit because that bit
 * must always be set to 1.
 */
int ucc_set_type(unsigned int ucc_num, enum ucc_speed_type speed)
{}

static void get_cmxucr_reg(unsigned int ucc_num, __be32 __iomem **cmxucr,
	unsigned int *reg_num, unsigned int *shift)
{}

int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask)
{}

int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock,
	enum comm_dir mode)
{}

static int ucc_get_tdm_common_clk(u32 tdm_num, enum qe_clock clock)
{}

static int ucc_get_tdm_rx_clk(u32 tdm_num, enum qe_clock clock)
{}

static int ucc_get_tdm_tx_clk(u32 tdm_num, enum qe_clock clock)
{}

/* tdm_num: TDM A-H port num is 0-7 */
static int ucc_get_tdm_rxtx_clk(enum comm_dir mode, u32 tdm_num,
				enum qe_clock clock)
{}

static u32 ucc_get_tdm_clk_shift(enum comm_dir mode, u32 tdm_num)
{}

int ucc_set_tdm_rxtx_clk(u32 tdm_num, enum qe_clock clock,
			 enum comm_dir mode)
{}

static int ucc_get_tdm_sync_source(u32 tdm_num, enum qe_clock clock,
				   enum comm_dir mode)
{}

static u32 ucc_get_tdm_sync_shift(enum comm_dir mode, u32 tdm_num)
{}

int ucc_set_tdm_rxtx_sync(u32 tdm_num, enum qe_clock clock,
			  enum comm_dir mode)
{}