1 --- a/src/mei/ifxmips_atm_core.c
2 +++ b/src/mei/ifxmips_atm_core.c
5 * Chip Specific Head File
7 -#include <asm/ifx/ifx_types.h>
8 -#include <asm/ifx/ifx_regs.h>
9 -#include <asm/ifx/common_routines.h>
11 +#include <ifxmips_cgu.h>
12 #include "ifxmips_atm_core.h"
15 @@ -1146,7 +1145,7 @@ static INLINE void mailbox_signal(unsign
17 static void set_qsb(struct atm_vcc *vcc, struct atm_qos *qos, unsigned int queue)
19 - unsigned int qsb_clk = ifx_get_fpi_hz();
20 + unsigned int qsb_clk = ifxmips_get_fpi_hz();
21 unsigned int qsb_qid = queue + FIRST_QSB_QID;
22 union qsb_queue_parameter_table qsb_queue_parameter_table = {{0}};
23 union qsb_queue_vbr_parameter_table qsb_queue_vbr_parameter_table = {{0}};
24 @@ -1318,7 +1317,7 @@ static void set_qsb(struct atm_vcc *vcc,
26 static void qsb_global_set(void)
28 - unsigned int qsb_clk = ifx_get_fpi_hz();
29 + unsigned int qsb_clk = ifxmips_get_fpi_hz();
31 unsigned int tmp1, tmp2, tmp3;
33 @@ -2505,3 +2504,4 @@ static void __exit ifx_atm_exit(void)
35 module_init(ifx_atm_init);
36 module_exit(ifx_atm_exit);
37 +MODULE_LICENSE("Dual BSD/GPL");
38 --- a/src/mei/ifxmips_atm_ppe_common.h
39 +++ b/src/mei/ifxmips_atm_ppe_common.h
41 #ifndef IFXMIPS_ATM_PPE_COMMON_H
42 #define IFXMIPS_ATM_PPE_COMMON_H
46 -#if defined(CONFIG_DANUBE)
47 +#if defined(CONFIG_IFXMIPS)
48 + #include "ifxmips_atm_ppe_danube.h"
49 + #define CONFIG_DANUBE
50 +#elif defined(CONFIG_DANUBE)
51 #include "ifxmips_atm_ppe_danube.h"
52 #elif defined(CONFIG_AMAZON_SE)
53 #include "ifxmips_atm_ppe_amazon_se.h"
60 * Code/Data Memory (CDM) Interface Configuration Register
62 --- a/src/mei/ifxmips_atm_core.h
63 +++ b/src/mei/ifxmips_atm_core.h
65 #define IFXMIPS_ATM_CORE_H
69 -#include <asm/ifx/ifx_atm.h>
70 +#include "ifxmips_compat.h"
72 #include "ifxmips_atm_ppe_common.h"
73 #include "ifxmips_atm_fw_regs_common.h"
76 +++ b/src/mei/ifxmips_compat.h
78 +#ifndef _IFXMIPS_COMPAT_H__
79 +#define _IFXMIPS_COMPAT_H__
81 +#define IFX_SUCCESS 0
82 +#define IFX_ERROR (-1)
84 +#define ATM_VBR_NRT ATM_VBR
86 +#define ATM_UBR_PLUS 7
89 +#define NUM_ENTITY(x) (sizeof(x) / sizeof(*(x)))
91 +#define SET_BITS(x, msb, lsb, value) \
92 + (((x) & ~(((1 << ((msb) + 1)) - 1) ^ ((1 << (lsb)) - 1))) | (((value) & ((1 << (1 + (msb) - (lsb))) - 1)) << (lsb)))
95 +#define IFX_PMU_ENABLE 1
96 +#define IFX_PMU_DISABLE 0
98 +#define IFX_PMU_MODULE_DSL_DFE (1 << 9)
99 +#define IFX_PMU_MODULE_AHBS (1 << 13)
100 +#define IFX_PMU_MODULE_PPE_QSB (1 << 18)
101 +#define IFX_PMU_MODULE_PPE_SLL01 (1 << 19)
102 +#define IFX_PMU_MODULE_PPE_TC (1 << 21)
103 +#define IFX_PMU_MODULE_PPE_EMA (1 << 22)
104 +#define IFX_PMU_MODULE_PPE_TOP (1 << 29)
106 +#define ifx_pmu_set(a,b) {if(a == IFX_PMU_ENABLE) ifxmips_pmu_enable(b); else ifxmips_pmu_disable(b);}
108 +#define PPE_TOP_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_PPE_TOP, (__x))
109 +#define PPE_SLL01_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_PPE_SLL01, (__x))
110 +#define PPE_TC_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_PPE_TC, (__x))
111 +#define PPE_EMA_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_PPE_EMA, (__x))
112 +#define PPE_QSB_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_PPE_QSB, (__x))
113 +#define PPE_TPE_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_AHBS, (__x))
114 +#define DSL_DFE_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_DSL_DFE, (__x))
116 +#define IFX_REG_W32(_v, _r) __raw_writel((_v), (_r))
118 +#define CONFIG_IFXMIPS_DSL_CPE_MEI y
121 --- a/src/mei/ifxmips_atm_ppe_danube.h
122 +++ b/src/mei/ifxmips_atm_ppe_danube.h
124 #ifndef IFXMIPS_ATM_PPE_DANUBE_H
125 #define IFXMIPS_ATM_PPE_DANUBE_H
128 +#include <ifxmips_irq.h>
131 * FPI Configuration Bus Register and Memory Address Mapping
134 * Mailbox IGU1 Interrupt
136 -#define PPE_MAILBOX_IGU1_INT INT_NUM_IM2_IRL24
137 +#define PPE_MAILBOX_IGU1_INT IFXMIPS_PPE_MBOX_INT
141 --- a/src/mei/ifxmips_atm_danube.c
142 +++ b/src/mei/ifxmips_atm_danube.c
145 * Chip Specific Head File
147 -#include <asm/ifx/ifx_types.h>
148 -#include <asm/ifx/ifx_regs.h>
149 -#include <asm/ifx/common_routines.h>
150 -#include <asm/ifx/ifx_pmu.h>
151 +#include <ifxmips.h>
152 +#include <ifxmips_pmu.h>
153 +#include "ifxmips_compat.h"
154 #include "ifxmips_atm_core.h"
155 #include "ifxmips_atm_fw_danube.h"