2015-09-14 20:09:22 +00:00
|
|
|
--- a/src/drv_mei_cpe_common.c
|
|
|
|
+++ b/src/drv_mei_cpe_common.c
|
|
|
|
@@ -19,7 +19,6 @@
|
2013-03-14 18:43:23 +00:00
|
|
|
/* get at first the driver configuration */
|
|
|
|
#include "drv_mei_cpe_config.h"
|
|
|
|
|
|
|
|
-#include "ifx_types.h"
|
|
|
|
#include "drv_mei_cpe_os.h"
|
|
|
|
#include "drv_mei_cpe_dbg.h"
|
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
--- a/src/drv_mei_cpe_linux.h
|
|
|
|
+++ b/src/drv_mei_cpe_linux.h
|
2017-11-13 21:18:00 +00:00
|
|
|
@@ -60,12 +60,6 @@
|
2013-03-14 18:43:23 +00:00
|
|
|
#include <linux/poll.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
|
|
|
|
- #include <asm/ifx/ifx_types.h>
|
|
|
|
-#else
|
|
|
|
- #include <ifx_types.h>
|
|
|
|
-#endif
|
2013-03-14 18:43:23 +00:00
|
|
|
-
|
|
|
|
#endif /* #if (MEI_DRV_IFXOS_ENABLE == 0)*/
|
|
|
|
|
2016-08-26 22:06:21 +00:00
|
|
|
#include <linux/dma-mapping.h>
|
2015-09-14 20:09:22 +00:00
|
|
|
--- a/src/drv_mei_cpe_linux.c
|
|
|
|
+++ b/src/drv_mei_cpe_linux.c
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -114,6 +114,8 @@
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
#include "drv_mei_cpe_api_atm_ptm_intern.h"
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
+#include <lantiq_soc.h>
|
|
|
|
+
|
|
|
|
/* ===================================
|
|
|
|
extern function declarations
|
|
|
|
=================================== */
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -220,6 +222,8 @@ static void MEI_NlSendMsg(IFX_char_t* pM
|
2015-11-24 20:40:49 +00:00
|
|
|
/* Local variables (LINUX) */
|
|
|
|
/* =================================== */
|
|
|
|
static IFX_uint8_t major_number = 0;
|
|
|
|
+static struct class *mei_class;
|
|
|
|
+static dev_t mei_devt;
|
|
|
|
#ifdef MODULE
|
|
|
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
|
|
|
|
MODULE_PARM(major_number, "b");
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -1256,7 +1260,9 @@ static long MEI_Ioctl( struct file *filp
|
|
|
|
MEI_IOCTL_RETURN:
|
|
|
|
|
|
|
|
local_args.drv_ioctl.retCode = ret;
|
|
|
|
- copy_to_user( ((IOCTL_MEI_arg_t *)nArgument), &local_args, retSize);
|
|
|
|
+ if ( ret == IFX_SUCCESS &&
|
|
|
|
+ copy_to_user( ((IOCTL_MEI_arg_t *)nArgument), &local_args, retSize) )
|
|
|
|
+ ret = -e_MEI_ERR_RETURN_ARG;
|
|
|
|
|
|
|
|
return (ret < 0) ? -1 : 0;
|
|
|
|
}
|
|
|
|
@@ -1479,7 +1485,11 @@ struct proc_entry {
|
2020-12-27 13:55:43 +00:00
|
|
|
char name[32];
|
|
|
|
proc_rd_callback_t rd;
|
|
|
|
proc_wr_callback_t wr;
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
|
|
|
|
struct file_operations ops;
|
|
|
|
+#else
|
|
|
|
+ struct proc_ops ops;
|
|
|
|
+#endif
|
|
|
|
int entity;
|
|
|
|
};
|
|
|
|
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -1869,6 +1879,7 @@ static int mei_proc_single_open(struct i
|
2020-12-27 13:55:43 +00:00
|
|
|
static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
|
|
|
|
struct proc_entry *proc_entry)
|
|
|
|
{
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
|
|
|
|
memset(&proc_entry->ops, 0, sizeof(struct file_operations));
|
|
|
|
proc_entry->ops.owner = THIS_MODULE;
|
|
|
|
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -1879,6 +1890,17 @@ static void mei_proc_entry_create(struct
|
2020-12-27 13:55:43 +00:00
|
|
|
proc_entry->ops.llseek = seq_lseek;
|
|
|
|
if (proc_entry->wr)
|
|
|
|
proc_entry->ops.write = proc_entry->wr;
|
|
|
|
+#else
|
|
|
|
+ memset(&proc_entry->ops, 0, sizeof(struct proc_ops));
|
|
|
|
+
|
|
|
|
+ proc_entry->ops.proc_open = mei_proc_single_open;
|
|
|
|
+ proc_entry->ops.proc_release = single_release;
|
|
|
|
+
|
|
|
|
+ proc_entry->ops.proc_read = seq_read;
|
|
|
|
+ proc_entry->ops.proc_lseek = seq_lseek;
|
|
|
|
+ if (proc_entry->wr)
|
|
|
|
+ proc_entry->ops.proc_write = proc_entry->wr;
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
proc_create_data(proc_entry->name,
|
|
|
|
(S_IFREG | S_IRUGO),
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -2174,9 +2196,11 @@ static int MEI_module_init (void)
|
2015-09-14 20:09:22 +00:00
|
|
|
return (result);
|
|
|
|
}
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
+#if 0
|
2016-08-26 22:06:21 +00:00
|
|
|
#if (MEI_DRV_ATM_PTM_INTERFACE_ENABLE == 1)
|
|
|
|
ppa_callback_set(LTQ_MEI_SHOWTIME_CHECK, (void *)ltq_mei_showtime_check);
|
|
|
|
#endif /* #if (MEI_DRV_ATM_PTM_INTERFACE_ENABLE == 1) */
|
2015-09-14 20:09:22 +00:00
|
|
|
+#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -2304,6 +2328,10 @@ static void MEI_module_exit (void)
|
2015-11-24 20:40:49 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
unregister_chrdev ( major_number , DRV_MEI_NAME );
|
|
|
|
+ device_destroy(mei_class, mei_devt);
|
|
|
|
+ mei_devt = 0;
|
|
|
|
+ class_destroy(mei_class);
|
|
|
|
+ mei_class = NULL;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_PROC_FS
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -2388,9 +2416,11 @@ static void MEI_module_exit (void)
|
2015-09-14 20:09:22 +00:00
|
|
|
("MEI_DRV: Chipset Basic Exit failed" MEI_DRV_CRLF));
|
|
|
|
}
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
+#if 0
|
2016-08-26 22:06:21 +00:00
|
|
|
#if (MEI_DRV_ATM_PTM_INTERFACE_ENABLE == 1)
|
2015-09-14 20:09:22 +00:00
|
|
|
ppa_callback_set(LTQ_MEI_SHOWTIME_CHECK, (void *)NULL);
|
2016-08-26 22:06:21 +00:00
|
|
|
#endif /* #if (MEI_DRV_ATM_PTM_INTERFACE_ENABLE == 1) */
|
2015-09-14 20:09:22 +00:00
|
|
|
+#endif
|
2013-09-17 21:46:10 +00:00
|
|
|
|
2016-08-26 22:06:21 +00:00
|
|
|
#if (MEI_SUPPORT_DEBUG_LOGGER == 1)
|
|
|
|
if (nl_debug_sock)
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -2514,6 +2544,10 @@ static int MEI_InitModuleRegCharDev(cons
|
2015-11-24 20:40:49 +00:00
|
|
|
("Using major number %d" MEI_DRV_CRLF, major_number));
|
|
|
|
}
|
|
|
|
|
|
|
|
+ mei_class = class_create(THIS_MODULE, devName);
|
|
|
|
+ mei_devt = MKDEV(major_number, 0);
|
|
|
|
+ device_create(mei_class, NULL, mei_devt, NULL, "%s/%i", devName, 0);
|
|
|
|
+
|
|
|
|
return 0;
|
|
|
|
#endif /* CONFIG_DEVFS_FS */
|
|
|
|
}
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -2563,21 +2597,32 @@ static int MEI_InitModuleBasics(void)
|
2015-09-14 20:09:22 +00:00
|
|
|
}
|
2013-09-17 21:46:10 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
|
|
|
|
+
|
|
|
|
+#define PMU_DFE BIT(9)
|
2013-09-17 21:46:10 +00:00
|
|
|
+
|
2015-09-14 20:09:22 +00:00
|
|
|
static int MEI_SysClkEnable(struct clk *clk)
|
|
|
|
{
|
|
|
|
+#if 0
|
|
|
|
if (IS_ERR(clk))
|
|
|
|
return -1;
|
|
|
|
clk_enable(clk);
|
|
|
|
+#else
|
|
|
|
+ ltq_pmu_enable(PMU_DFE);
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int MEI_SysClkDisable(struct clk *clk)
|
|
|
|
{
|
|
|
|
+#if 0
|
|
|
|
if (IS_ERR(clk))
|
|
|
|
return -1;
|
|
|
|
clk_disable(clk);
|
|
|
|
clk_put(clk);
|
|
|
|
+#else
|
|
|
|
+ ltq_pmu_disable(PMU_DFE);
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -2905,11 +2950,15 @@ IFX_int32_t MEI_IoctlInitDevice(
|
2015-09-14 20:09:22 +00:00
|
|
|
pMeiDev->eModePoll = e_MEI_DEV_ACCESS_MODE_IRQ;
|
|
|
|
pMeiDev->intMask = ME_ARC2ME_INTERRUPT_UNMASK_ALL;
|
|
|
|
|
|
|
|
+#if 1
|
|
|
|
+ virq = (IFX_uint32_t)pInitDev->usedIRQ;
|
|
|
|
+#else
|
|
|
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
|
|
|
|
virq = (IFX_uint32_t)pInitDev->usedIRQ;
|
|
|
|
#else
|
|
|
|
virq = irq_create_mapping(NULL, (IFX_uint32_t)pInitDev->usedIRQ);
|
2013-03-14 18:43:23 +00:00
|
|
|
#endif
|
2015-09-14 20:09:22 +00:00
|
|
|
+#endif
|
|
|
|
|
|
|
|
pTmpXCntrl = MEI_VrxXDevToIrqListAdd(
|
|
|
|
MEI_DRV_LINENUM_GET(pMeiDev),
|
2022-03-21 19:21:04 +00:00
|
|
|
@@ -3249,9 +3298,11 @@ static int MEI_IoctlMeiDbgAccessWr_Wrap(
|
|
|
|
ret = MEI_IoctlMeiDbgAccessWr( pMeiDynCntrl, pLocalArgument);
|
|
|
|
|
|
|
|
/* return arguments - count */
|
|
|
|
- copy_to_user( (void *)&pUserArgument->count,
|
|
|
|
- (void *)&pLocalArgument->count,
|
|
|
|
- sizeof(pUserArgument->count) ) ;
|
|
|
|
+ if ( ret == IFX_SUCCESS &&
|
|
|
|
+ copy_to_user( (void *)&pUserArgument->count,
|
|
|
|
+ (void *)&pLocalArgument->count,
|
|
|
|
+ sizeof(pUserArgument->count) ) )
|
|
|
|
+ ret = -e_MEI_ERR_RETURN_ARG;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
@@ -3278,16 +3329,18 @@ static int MEI_IoctlMeiDbgAccessRd_Wrap(
|
|
|
|
if ( pLocalArgument->count )
|
|
|
|
{
|
|
|
|
/* return the buffer */
|
|
|
|
- copy_to_user( pUserBuf,
|
|
|
|
- pLocalArgument->pData_32,
|
|
|
|
- pLocalArgument->count * sizeof(IFX_uint32_t) ) ;
|
|
|
|
+ if ( copy_to_user( pUserBuf,
|
|
|
|
+ pLocalArgument->pData_32,
|
|
|
|
+ pLocalArgument->count * sizeof(IFX_uint32_t) ) )
|
|
|
|
+ ret = -e_MEI_ERR_RETURN_ARG;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* return count argument */
|
|
|
|
- copy_to_user( (void *)&pUserArgument->count,
|
|
|
|
- (void *)&pLocalArgument->count,
|
|
|
|
- sizeof(pUserArgument->count) ) ;
|
|
|
|
+ if ( copy_to_user( (void *)&pUserArgument->count,
|
|
|
|
+ (void *)&pLocalArgument->count,
|
|
|
|
+ sizeof(pUserArgument->count) ) )
|
|
|
|
+ ret = -e_MEI_ERR_RETURN_ARG;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2015-09-14 20:09:22 +00:00
|
|
|
--- a/src/drv_mei_cpe_api_atm_ptm_intern.c
|
|
|
|
+++ b/src/drv_mei_cpe_api_atm_ptm_intern.c
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -147,6 +147,7 @@ IFX_int32_t MEI_InternalXtmSwhowtimeExit
|
|
|
|
return retVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
+#if 0
|
|
|
|
IFX_int32_t MEI_InternalTcRequest(
|
|
|
|
MEI_DYN_CNTRL_T *pMeiDynCntrl,
|
|
|
|
MEI_TC_Request_t *pArgTcRequest)
|
|
|
|
@@ -232,6 +233,7 @@ IFX_int32_t MEI_InternalTcReset(
|
|
|
|
|
|
|
|
return retVal;
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
Function that is used by the PP subsystem to get some showtime relevant data
|
|
|
|
@@ -311,10 +313,57 @@ int ifx_mei_atm_led_blink(void)
|
2015-09-14 20:09:22 +00:00
|
|
|
return IFX_SUCCESS;
|
|
|
|
}
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
+#if MEI_MAX_DFE_CHAN_DEVICES > 1
|
|
|
|
+#error "Compat functions do not support MEI_MAX_DFE_CHAN_DEVICES > 1 yet"
|
|
|
|
+#else
|
|
|
|
+int (*ifx_mei_atm_showtime_enter)(struct port_cell_info *, void *) = NULL;
|
|
|
|
+int (*ifx_mei_atm_showtime_exit)(void) = NULL;
|
2013-03-14 18:43:23 +00:00
|
|
|
+
|
2015-11-24 20:40:59 +00:00
|
|
|
+int ltq_ifx_mei_atm_showtime_enter_compat(IFX_uint8_t dslLineNum,
|
2015-09-14 20:09:22 +00:00
|
|
|
+ struct port_cell_info *cellInfo,
|
|
|
|
+ void *xdata) {
|
|
|
|
+ if (ifx_mei_atm_showtime_enter)
|
|
|
|
+ return ifx_mei_atm_showtime_enter(cellInfo, xdata);
|
|
|
|
+
|
|
|
|
+ return -e_MEI_ERR_OP_FAILED;
|
|
|
|
+}
|
|
|
|
+
|
2015-11-24 20:40:59 +00:00
|
|
|
+int ltq_ifx_mei_atm_showtime_exit_compat(IFX_uint8_t dslLineNum) {
|
2015-09-14 20:09:22 +00:00
|
|
|
+ if (ifx_mei_atm_showtime_exit)
|
|
|
|
+ return ifx_mei_atm_showtime_exit();
|
|
|
|
+
|
|
|
|
+ return -e_MEI_ERR_OP_FAILED;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void* ppa_callback_get(e_ltq_mei_cb_type type) {
|
|
|
|
+ switch (type) {
|
|
|
|
+ case LTQ_MEI_SHOWTIME_ENTER:
|
|
|
|
+ return <q_ifx_mei_atm_showtime_enter_compat;
|
|
|
|
+ case LTQ_MEI_SHOWTIME_EXIT:
|
|
|
|
+ return <q_ifx_mei_atm_showtime_exit_compat;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BUG();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+int ifx_mei_atm_showtime_check(int *is_showtime,
|
|
|
|
+ struct port_cell_info *port_cell,
|
|
|
|
+ void **xdata_addr) {
|
2016-08-26 22:06:21 +00:00
|
|
|
+ return ltq_mei_showtime_check(0, is_showtime, port_cell, xdata_addr);
|
2015-09-14 20:09:22 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+EXPORT_SYMBOL(ifx_mei_atm_showtime_enter);
|
|
|
|
+EXPORT_SYMBOL(ifx_mei_atm_showtime_exit);
|
|
|
|
+EXPORT_SYMBOL(ifx_mei_atm_showtime_check);
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
EXPORT_SYMBOL (MEI_InternalXtmSwhowtimeEntrySignal);
|
|
|
|
EXPORT_SYMBOL (MEI_InternalXtmSwhowtimeExitSignal);
|
2016-08-26 22:06:21 +00:00
|
|
|
+#if 0
|
|
|
|
EXPORT_SYMBOL (MEI_InternalTcRequest);
|
|
|
|
EXPORT_SYMBOL (MEI_InternalTcReset);
|
|
|
|
+#endif
|
2015-09-14 20:09:22 +00:00
|
|
|
EXPORT_SYMBOL(ifx_mei_atm_led_blink);
|
2016-08-26 22:06:21 +00:00
|
|
|
|
|
|
|
#endif /* #if (MEI_EXPORT_INTERNAL_API == 1) && (MEI_DRV_ATM_PTM_INTERFACE_ENABLE == 1) */
|
2015-09-14 20:09:22 +00:00
|
|
|
--- a/src/drv_mei_cpe_api_atm_ptm_intern.h
|
|
|
|
+++ b/src/drv_mei_cpe_api_atm_ptm_intern.h
|
|
|
|
@@ -21,7 +21,6 @@
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
#include "drv_mei_cpe_config.h"
|
|
|
|
#include "drv_mei_cpe_interface.h"
|
|
|
|
-#include <net/ppa_stack_al.h>
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
#if (MEI_EXPORT_INTERNAL_API == 1) && (MEI_DRV_ATM_PTM_INTERFACE_ENABLE == 1)
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -59,8 +58,21 @@ extern IFX_int32_t MEI_InternalTcReset(
|
2015-09-14 20:09:22 +00:00
|
|
|
MEI_DYN_CNTRL_T *pMeiDynCntrl,
|
2016-08-26 22:06:21 +00:00
|
|
|
MEI_TC_Reset_t *pArgTcReset);
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
+#if 1
|
2015-11-24 20:40:59 +00:00
|
|
|
+#include <lantiq_atm.h>
|
2015-09-14 20:09:22 +00:00
|
|
|
+typedef enum {
|
|
|
|
+ LTQ_MEI_SHOWTIME_ENTER,
|
|
|
|
+ LTQ_MEI_SHOWTIME_EXIT
|
|
|
|
+} e_ltq_mei_cb_type;
|
2013-03-14 18:43:23 +00:00
|
|
|
+
|
2015-09-14 20:09:22 +00:00
|
|
|
+typedef void (*ltq_mei_atm_showtime_enter_t)(IFX_uint8_t, struct port_cell_info *, void *);
|
|
|
|
+typedef void (*ltq_mei_atm_showtime_exit_t)(IFX_uint8_t);
|
|
|
|
+
|
|
|
|
+void* ppa_callback_get(e_ltq_mei_cb_type type);
|
|
|
|
+#else
|
|
|
|
extern int ppa_callback_set(e_ltq_mei_cb_type type, void *func);
|
|
|
|
extern void* ppa_callback_get(e_ltq_mei_cb_type type);
|
|
|
|
+#endif
|
|
|
|
|
2016-08-26 22:06:21 +00:00
|
|
|
int ltq_mei_showtime_check(
|
2015-09-14 20:09:22 +00:00
|
|
|
const unsigned char line_idx,
|
|
|
|
--- a/src/drv_mei_cpe_device_vrx.c
|
|
|
|
+++ b/src/drv_mei_cpe_device_vrx.c
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -28,17 +28,6 @@
|
2015-09-14 20:09:22 +00:00
|
|
|
#include "drv_mei_cpe_api.h"
|
2015-11-24 20:40:59 +00:00
|
|
|
#include "drv_mei_cpe_mei_vrx.h"
|
2015-09-14 20:09:22 +00:00
|
|
|
|
|
|
|
-#if defined(LINUX)
|
|
|
|
-# if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
|
2016-08-26 22:06:21 +00:00
|
|
|
-# if (MEI_SUPPORT_DEVICE_VR10_320 != 1)
|
|
|
|
-# include "ifx_pcie.h"
|
|
|
|
-# else
|
|
|
|
-# include "../drivers/net/ethernet/lantiq/lantiq_pcie.h"
|
|
|
|
-# endif
|
2015-09-14 20:09:22 +00:00
|
|
|
-# else
|
|
|
|
-# include "lantiq_pcie.h"
|
|
|
|
-# endif
|
|
|
|
-#endif /* #if defined(LINUX)*/
|
|
|
|
|
|
|
|
IFX_int32_t MEI_GPIntProcess(MEI_MeiRegVal_t processInt, MEI_DEV_T *pMeiDev)
|
2013-03-14 18:43:23 +00:00
|
|
|
{
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -86,6 +75,7 @@ IFX_int32_t MEI_GetChipInfo(MEI_DEV_T *p
|
2013-03-14 18:43:23 +00:00
|
|
|
*/
|
2015-09-14 20:09:22 +00:00
|
|
|
IFX_int32_t MEI_VR10_PcieEntitiesCheck(IFX_uint8_t nEntityNum)
|
2013-03-14 18:43:23 +00:00
|
|
|
{
|
2015-09-14 20:09:22 +00:00
|
|
|
+#if 0
|
|
|
|
IFX_uint32_t pcie_entitiesNum;
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
/* get information from pcie driver */
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -110,6 +100,9 @@ IFX_int32_t MEI_VR10_PcieEntitiesCheck(I
|
2013-03-14 18:43:23 +00:00
|
|
|
}
|
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
return IFX_SUCCESS;
|
|
|
|
+#else
|
|
|
|
+ return IFX_ERROR;
|
|
|
|
+#endif
|
2013-03-14 18:43:23 +00:00
|
|
|
}
|
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
/**
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -124,6 +117,7 @@ IFX_int32_t MEI_VR10_PcieEntitiesCheck(I
|
2015-09-14 20:09:22 +00:00
|
|
|
*/
|
|
|
|
IFX_int32_t MEI_VR10_PcieEntityInit(MEI_MEI_DRV_CNTRL_T *pMeiDrvCntrl)
|
|
|
|
{
|
|
|
|
+#if 0
|
|
|
|
IFX_uint8_t entityNum;
|
2016-08-26 22:06:21 +00:00
|
|
|
#if (MEI_SUPPORT_DEVICE_VR10_320 != 1)
|
2015-09-14 20:09:22 +00:00
|
|
|
ifx_pcie_ep_dev_t MEI_pcie_ep_dev;
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -156,6 +150,9 @@ IFX_int32_t MEI_VR10_PcieEntityInit(MEI_
|
|
|
|
pMeiDrvCntrl->MEI_pcie_irq = 99;
|
2013-03-14 18:43:23 +00:00
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
return IFX_SUCCESS;
|
|
|
|
+#else
|
|
|
|
+ return IFX_ERROR;
|
|
|
|
+#endif
|
2013-03-14 18:43:23 +00:00
|
|
|
}
|
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
/**
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -170,6 +167,7 @@ IFX_int32_t MEI_VR10_PcieEntityInit(MEI_
|
2015-09-14 20:09:22 +00:00
|
|
|
*/
|
|
|
|
IFX_int32_t MEI_VR10_PcieEntityFree(IFX_uint8_t entityNum)
|
2013-03-14 18:43:23 +00:00
|
|
|
{
|
2015-09-14 20:09:22 +00:00
|
|
|
+#if 0
|
2016-08-26 22:06:21 +00:00
|
|
|
#if (MEI_SUPPORT_DEVICE_VR10_320 != 1)
|
2015-09-14 20:09:22 +00:00
|
|
|
if (ifx_pcie_ep_dev_info_release(entityNum))
|
2016-08-26 22:06:21 +00:00
|
|
|
#else
|
|
|
|
@@ -183,6 +181,9 @@ IFX_int32_t MEI_VR10_PcieEntityFree(IFX_
|
2015-09-14 20:09:22 +00:00
|
|
|
}
|
2013-03-14 18:43:23 +00:00
|
|
|
|
|
|
|
return IFX_SUCCESS;
|
2015-09-14 20:09:22 +00:00
|
|
|
+#else
|
|
|
|
+ return IFX_ERROR;
|
|
|
|
+#endif
|
2013-03-14 18:43:23 +00:00
|
|
|
}
|
|
|
|
|
2015-09-14 20:09:22 +00:00
|
|
|
/**
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -197,6 +198,7 @@ IFX_int32_t MEI_VR10_PcieEntityFree(IFX_
|
2015-09-14 20:09:22 +00:00
|
|
|
*/
|
|
|
|
IFX_int32_t MEI_VR10_InternalInitDevice(MEI_DYN_CNTRL_T *pMeiDynCntrl)
|
2013-03-14 18:43:23 +00:00
|
|
|
{
|
2015-09-14 20:09:22 +00:00
|
|
|
+#if 0
|
|
|
|
IFX_int32_t retVal;
|
|
|
|
IOCTL_MEI_devInit_t InitDev;
|
|
|
|
MEI_DEV_T *pMeiDev = pMeiDynCntrl->pMeiDev;
|
2016-08-26 22:06:21 +00:00
|
|
|
@@ -221,6 +223,9 @@ IFX_int32_t MEI_VR10_InternalInitDevice(
|
2015-09-14 20:09:22 +00:00
|
|
|
*MEI_GPIO_U32REG(GPIO_P0_ALSEL1) &= ~((1 << 0) | (1 << 3) | (1 << 8));
|
2013-03-14 18:43:23 +00:00
|
|
|
|
|
|
|
return IFX_SUCCESS;
|
2015-09-14 20:09:22 +00:00
|
|
|
+#else
|
|
|
|
+ return IFX_ERROR;
|
|
|
|
+#endif
|
2013-03-14 18:43:23 +00:00
|
|
|
}
|
2015-09-14 20:09:22 +00:00
|
|
|
|
2015-11-24 20:40:59 +00:00
|
|
|
IFX_int32_t MEI_PLL_ConfigInit(MEI_DEV_T *pMeiDev)
|
2016-08-26 22:06:21 +00:00
|
|
|
--- a/src/drv_mei_cpe_download_vrx.c
|
|
|
|
+++ b/src/drv_mei_cpe_download_vrx.c
|
|
|
|
@@ -3281,12 +3281,14 @@ IFX_int32_t MEI_DEV_IoctlFirmwareDownloa
|
|
|
|
/* reset TC layer */
|
|
|
|
if (ret == 0)
|
|
|
|
{
|
|
|
|
+#if 0
|
|
|
|
if (MEI_InternalTcReset(pMeiDynCntrl, &tc_reset) != 0)
|
|
|
|
{
|
|
|
|
PRN_ERR_USR_NL( MEI_DRV, MEI_DRV_PRN_LEVEL_WRN,
|
|
|
|
("MEI_DRV[%02d]: Could not perform reset of TC-Layer!"
|
|
|
|
MEI_DRV_CRLF, MEI_DRV_LINENUM_GET(pMeiDev)));
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2020-12-27 13:55:43 +00:00
|
|
|
--- a/src/drv_mei_cpe_linux_proc_config.c
|
|
|
|
+++ b/src/drv_mei_cpe_linux_proc_config.c
|
|
|
|
@@ -1039,6 +1039,7 @@ static int mei_proc_single_open(struct i
|
|
|
|
return single_open(file, mei_seq_single_show, PDE_DATA(inode));
|
|
|
|
}
|
|
|
|
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
|
|
|
|
static struct file_operations proc_ops = {
|
|
|
|
.owner = THIS_MODULE,
|
|
|
|
.open = mei_proc_single_open,
|
|
|
|
@@ -1047,6 +1048,15 @@ static struct file_operations proc_ops =
|
|
|
|
.llseek = seq_lseek,
|
|
|
|
.write = MEI_ProcWriteConfig
|
|
|
|
};
|
|
|
|
+#else
|
|
|
|
+static struct proc_ops proc_ops = {
|
|
|
|
+ .proc_open = mei_proc_single_open,
|
|
|
|
+ .proc_release = single_release,
|
|
|
|
+ .proc_read = seq_read,
|
|
|
|
+ .proc_lseek = seq_lseek,
|
|
|
|
+ .proc_write = MEI_ProcWriteConfig
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
Create an read/write proc entry for configuration.
|