mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
soc: fsl: cpm1: Add support for TSA
The TSA (Time Slot Assigner) purpose is to route some TDM time-slots to other internal serial controllers. It is available in some PowerQUICC SoC such as the MPC885 or MPC866. It is also available on some Quicc Engine SoCs. This current version support CPM1 SoCs only and some enhancement are needed to support Quicc Engine SoCs. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Acked-by: Li Yang <leoyang.li@nxp.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Link: https://lore.kernel.org/r/20230217145645.1768659-3-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -33,6 +33,17 @@ config UCC
|
||||
bool
|
||||
default y if UCC_FAST || UCC_SLOW
|
||||
|
||||
config CPM_TSA
|
||||
tristate "CPM TSA support"
|
||||
depends on OF && HAS_IOMEM
|
||||
depends on CPM1 || COMPILE_TEST
|
||||
help
|
||||
Freescale CPM Time Slot Assigner (TSA)
|
||||
controller.
|
||||
|
||||
This option enables support for this
|
||||
controller
|
||||
|
||||
config QE_TDM
|
||||
bool
|
||||
default y if FSL_UCC_HDLC
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_common.o qe_ic.o qe_io.o
|
||||
obj-$(CONFIG_CPM) += qe_common.o
|
||||
obj-$(CONFIG_CPM_TSA) += tsa.o
|
||||
obj-$(CONFIG_UCC) += ucc.o
|
||||
obj-$(CONFIG_UCC_SLOW) += ucc_slow.o
|
||||
obj-$(CONFIG_UCC_FAST) += ucc_fast.o
|
||||
|
||||
846
drivers/soc/fsl/qe/tsa.c
Normal file
846
drivers/soc/fsl/qe/tsa.c
Normal file
File diff suppressed because it is too large
Load Diff
42
drivers/soc/fsl/qe/tsa.h
Normal file
42
drivers/soc/fsl/qe/tsa.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* TSA management
|
||||
*
|
||||
* Copyright 2022 CS GROUP France
|
||||
*
|
||||
* Author: Herve Codina <herve.codina@bootlin.com>
|
||||
*/
|
||||
#ifndef __SOC_FSL_TSA_H__
|
||||
#define __SOC_FSL_TSA_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct device_node;
|
||||
struct device;
|
||||
struct tsa_serial;
|
||||
|
||||
struct tsa_serial *tsa_serial_get_byphandle(struct device_node *np,
|
||||
const char *phandle_name);
|
||||
void tsa_serial_put(struct tsa_serial *tsa_serial);
|
||||
struct tsa_serial *devm_tsa_serial_get_byphandle(struct device *dev,
|
||||
struct device_node *np,
|
||||
const char *phandle_name);
|
||||
|
||||
/* Connect and disconnect the TSA serial */
|
||||
int tsa_serial_connect(struct tsa_serial *tsa_serial);
|
||||
int tsa_serial_disconnect(struct tsa_serial *tsa_serial);
|
||||
|
||||
/* Cell information */
|
||||
struct tsa_serial_info {
|
||||
unsigned long rx_fs_rate;
|
||||
unsigned long rx_bit_rate;
|
||||
u8 nb_rx_ts;
|
||||
unsigned long tx_fs_rate;
|
||||
unsigned long tx_bit_rate;
|
||||
u8 nb_tx_ts;
|
||||
};
|
||||
|
||||
/* Get information */
|
||||
int tsa_serial_get_info(struct tsa_serial *tsa_serial, struct tsa_serial_info *info);
|
||||
|
||||
#endif /* __SOC_FSL_TSA_H__ */
|
||||
Reference in New Issue
Block a user