-diff -urN sangam_atm-07.02.01.00/cppi_cpaal5.c sangam_atm-07.02.01.00/cppi_cpaal5.c
---- sangam_atm-07.02.01.00/cppi_cpaal5.c 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/cppi_cpaal5.c 2007-08-06 18:58:42.000000000 +0200
+diff -urN sangam_atm-D7.03.01.00.orig/cppi_cpaal5.c sangam_atm-D7.03.01.00/cppi_cpaal5.c
+--- sangam_atm-D7.03.01.00.orig/cppi_cpaal5.c 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/cppi_cpaal5.c 2008-03-11 02:12:00.000000000 +0100
@@ -352,7 +352,7 @@
{
/* malloc failed, add this RCB to Needs Buffer List */
if(HalDev->NeedsCount < MAX_NEEDS) /* +MJH 030410 */
{ /* +MJH 030410 */
-diff -urN sangam_atm-07.02.01.00/dsl_hal_api.c sangam_atm-07.02.01.00/dsl_hal_api.c
---- sangam_atm-07.02.01.00/dsl_hal_api.c 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/dsl_hal_api.c 2007-08-06 18:58:42.000000000 +0200
-@@ -241,15 +241,15 @@
- * UR8_MERGE_START_END CQ11247_TR69_DS_LATN_SATN YW
- * 12/18/06 Yan Wang CQ11247: TR069 range and precision changes for LATNds, SATNds
+diff -urN sangam_atm-D7.03.01.00.orig/dsl_hal_api.c sangam_atm-D7.03.01.00/dsl_hal_api.c
+--- sangam_atm-D7.03.01.00.orig/dsl_hal_api.c 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/dsl_hal_api.c 2008-03-11 02:12:00.000000000 +0100
+@@ -254,15 +254,15 @@
+ * of phyEnableDisableWord & phyControlWord to avoid changing API struct
+ * which may cause change required to application data structure.
******************************************************************************/
-#include <dev_host_interface.h>
-#include <dsl_hal_register.h>
// UR8_MERGE_START CQ11054 Jack Zhang
static unsigned int highprecision_selected = 0; //By default we use low precision for backward compt.
-diff -urN sangam_atm-07.02.01.00/dsl_hal_support.c sangam_atm-07.02.01.00/dsl_hal_support.c
---- sangam_atm-07.02.01.00/dsl_hal_support.c 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/dsl_hal_support.c 2007-08-06 18:58:42.000000000 +0200
+diff -urN sangam_atm-D7.03.01.00.orig/dsl_hal_support.c sangam_atm-D7.03.01.00/dsl_hal_support.c
+--- sangam_atm-D7.03.01.00.orig/dsl_hal_support.c 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/dsl_hal_support.c 2008-03-11 02:12:00.000000000 +0100
@@ -140,9 +140,9 @@
* oamFeature are overriden
// UR8_MERGE_END CQ10774 Ram
#define NUM_READ_RETRIES 3
static unsigned int dslhal_support_adsl2ByteSwap32(unsigned int in32Bits);
-diff -urN sangam_atm-07.02.01.00/dsl_hal_support.h sangam_atm-07.02.01.00/dsl_hal_support.h
---- sangam_atm-07.02.01.00/dsl_hal_support.h 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/dsl_hal_support.h 2007-08-06 18:58:42.000000000 +0200
+diff -urN sangam_atm-D7.03.01.00.orig/dsl_hal_support.h sangam_atm-D7.03.01.00/dsl_hal_support.h
+--- sangam_atm-D7.03.01.00.orig/dsl_hal_support.h 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/dsl_hal_support.h 2008-03-11 02:12:00.000000000 +0100
@@ -49,7 +49,7 @@
* 04Nov05 0.11.00 CPH Fixed T1413 mode got Zero DS/US rate when DSL_BIT_TMODE is set.
*******************************************************************************/
#define virtual2Physical(a) (((int)a)&~0xe0000000)
/* External Function Prototype Declarations */
-diff -urN sangam_atm-07.02.01.00/Makefile sangam_atm-07.02.01.00/Makefile
---- sangam_atm-07.02.01.00/Makefile 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/Makefile 2007-08-06 18:58:42.000000000 +0200
+diff -urN sangam_atm-D7.03.01.00.orig/Makefile sangam_atm-D7.03.01.00/Makefile
+--- sangam_atm-D7.03.01.00.orig/Makefile 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/Makefile 2008-03-11 02:12:00.000000000 +0100
@@ -1,18 +1,9 @@
-# File: drivers/atm/ti_evm3/Makefile
#
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
+obj-$(CONFIG_SANGAM_ATM) := tiatm.o
+tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o
-diff -urN sangam_atm-07.02.01.00/tn7atm.c sangam_atm-07.02.01.00/tn7atm.c
---- sangam_atm-07.02.01.00/tn7atm.c 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/tn7atm.c 2007-08-06 18:58:42.000000000 +0200
+diff -urN sangam_atm-D7.03.01.00.orig/tn7atm.c sangam_atm-D7.03.01.00/tn7atm.c
+--- sangam_atm-D7.03.01.00.orig/tn7atm.c 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/tn7atm.c 2008-03-11 02:12:00.000000000 +0100
@@ -61,7 +61,6 @@
* UR8_MERGE_END CQ11057*
*********************************************************************************************/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
-@@ -70,7 +69,7 @@
+@@ -69,11 +68,14 @@
+ #include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
- #include <asm/io.h>
+-#include <asm/io.h>
-#include <asm/mips-boards/prom.h>
-+#include <asm/ar7/ar7.h>
#include <linux/proc_fs.h>
#include <linux/string.h>
#include <linux/ctype.h>
-@@ -82,6 +81,7 @@
++
++#include <asm/io.h>
++#include <asm/ar7/ar7.h>
++#include <asm/ar7/prom.h>
++
+ #include "dsl_hal_api.h"
+ #include "tn7atm.h"
+ #include "tn7api.h"
+@@ -82,6 +84,7 @@
#include "dsl_hal_register.h"
#ifdef MODULE
MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
MODULE_AUTHOR ("Zhicheng Tang");
#endif
-@@ -100,9 +100,9 @@
+@@ -100,9 +103,9 @@
/*end of externs */
#define tn7atm_kfree_skb(x) dev_kfree_skb(x)
-@@ -114,7 +114,7 @@
+@@ -114,7 +117,7 @@
/* prototypes */
static int tn7atm_set_can_support_adsl2 (int can);
static void tn7atm_close (struct atm_vcc *vcc);
-@@ -257,13 +257,12 @@
+@@ -257,13 +260,12 @@
getsockopt: NULL,
setsockopt: NULL,
send: tn7atm_send,
static struct proc_dir_entry *root_proc_dir_entry = NULL;
#define DRV_PROC_MODE 0644
static int proc_root_already_exists = TRUE;
-@@ -564,56 +563,6 @@
+@@ -559,56 +561,6 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* Function: int tn7atm_sar_irq(void)
*
* Description: tnetd73xx SAR interrupt.
-@@ -709,8 +658,8 @@
+@@ -693,7 +645,7 @@
+ * Register SAR interrupt
+ */
+ priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */
+- if (request_irq (priv->sar_irq, tn7atm_sar_irq, SA_INTERRUPT, "SAR ", dev))
++ if (request_irq (priv->sar_irq, tn7atm_sar_irq, IRQF_DISABLED, "SAR ", dev))
+ printk ("Could not register tn7atm_sar_irq\n");
+
+ /*
+@@ -704,14 +656,14 @@
{
def_sar_inter_pace = os_atoi (ptr);
}
/*
* Reigster Receive interrupt A
-@@ -880,11 +829,15 @@
+ */
+ priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */
+- if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, SA_INTERRUPT, "DSL ", dev))
++ if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, IRQF_DISABLED, "DSL ", dev))
+ printk ("Could not register tn7atm_dsl_irq\n");
+
+ /***** VRB Tasklet Mode ****/
+@@ -875,11 +827,15 @@
#define ATM_VBR_RT 5
#endif
dgprintf(1, "tn7atm_open()\n");
-@@ -896,24 +849,18 @@
+@@ -891,24 +847,18 @@
return -1;
}
- MOD_INC_USE_COUNT;
--
-- /* find a free VPI/VCI */
-- tn7atm_walk_vccs(vcc, &vpi, &vci);
+// MOD_INC_USE_COUNT;
+- /* find a free VPI/VCI */
+- tn7atm_walk_vccs(vcc, &vpi, &vci);
+-
- vcc->vpi = vpi;
- vcc->vci = vci;
-
{
/* always use (max_dma_chan+1) for clear eoc */
tn7atm_activate_vc_parm.chan = EOC_DMA_CHAN;
-@@ -921,7 +868,7 @@
+@@ -916,7 +866,7 @@
/* check to see whether clear eoc is opened or not */
if (tn7atm_activate_vc_parm.priv->lut[tn7atm_activate_vc_parm.chan].inuse)
{
printk("tn7atm_open: Clear EOC channel (dmachan=%d) already in use.\n", tn7atm_activate_vc_parm.chan);
return -EBUSY;
}
-@@ -930,7 +877,7 @@
+@@ -925,7 +875,7 @@
if (rc)
{
printk("tn7atm_open: failed to setup clear_eoc\n");
return -EBUSY;
}
tn7atm_set_lut(tn7atm_activate_vc_parm.priv,vcc, tn7atm_activate_vc_parm.chan);
-@@ -939,17 +886,17 @@
+@@ -934,17 +884,17 @@
}
else /* PVC channel setup */
{
printk("PVC already opened. dmachan = %d\n", rc);
return -EBUSY;
}
-@@ -981,6 +928,7 @@
+@@ -976,6 +926,7 @@
tn7atm_activate_vc_parm.priority = 2;
break;
case ATM_VBR: /* Variable Bit Rate-Non RealTime*/
tn7atm_activate_vc_parm.qos = 1;
tn7atm_activate_vc_parm.priority = 1;
-@@ -1002,6 +950,7 @@
+@@ -997,6 +948,7 @@
tn7atm_activate_vc_parm.mbs = vcc->qos.txtp.max_pcr;
tn7atm_activate_vc_parm.cdvt = vcc->qos.txtp.max_cdv;
break;
default:
tn7atm_activate_vc_parm.qos = 2;
-@@ -1029,7 +978,7 @@
+@@ -1024,7 +976,7 @@
if (rc < 0)
{
printk("failed to activate hw channel\n");
tn7atm_lut_clear(vcc, tn7atm_activate_vc_parm.chan);
//spin_unlock_irqrestore(&chan_init_lock, flags);
return -EBUSY;
-@@ -1119,7 +1068,7 @@
+@@ -1114,7 +1066,7 @@
tn7atm_lut_clear (vcc, dmachan);
//spin_unlock_irqrestore (&closeLock, closeFlag);
dgprintf (1, "Leave tn7atm_close\n");
}
-@@ -1533,8 +1482,7 @@
+@@ -1528,8 +1480,7 @@
* firewall is on */
dgprintf (3, "pushing the skb...\n");
xdump ((unsigned char *) skb->data, skb->len, 5);
-@@ -1730,8 +1678,7 @@
+@@ -1725,8 +1676,7 @@
kfree (dev->dev_data);
/*
* remove proc entries
-@@ -1890,9 +1837,6 @@
+@@ -1885,9 +1835,6 @@
/*
* Set up proc entry for atm stats
*/
printk ("Creating new root folder %s in the proc for the driver stats \n",
drv_proc_root_folder);
root_proc_dir_entry = proc_mkdir (drv_proc_root_folder, NULL);
-@@ -1902,7 +1846,6 @@
+@@ -1897,7 +1844,6 @@
return -ENOMEM;
}
proc_root_already_exists = FALSE;
/*
* AV: Clean-up. Moved all the definitions to the data structure.
-@@ -2484,7 +2427,5 @@
+@@ -2479,7 +2425,5 @@
return count;
}
module_init (tn7atm_detect);
module_exit (tn7atm_exit);
-#endif /* MODULE */
-diff -urN sangam_atm-07.02.01.00/tn7atm.h sangam_atm-07.02.01.00/tn7atm.h
---- sangam_atm-07.02.01.00/tn7atm.h 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/tn7atm.h 2007-08-06 18:58:42.000000000 +0200
+diff -urN sangam_atm-D7.03.01.00.orig/tn7atm.h sangam_atm-D7.03.01.00/tn7atm.h
+--- sangam_atm-D7.03.01.00.orig/tn7atm.h 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/tn7atm.h 2008-03-11 02:12:00.000000000 +0100
@@ -19,7 +19,8 @@
//#include "mips_support.h"
#include <linux/list.h>
#ifdef CONFIG_MODVERSIONS
#include <linux/modversions.h>
-diff -urN sangam_atm-07.02.01.00/tn7dsl.c sangam_atm-07.02.01.00/tn7dsl.c
---- sangam_atm-07.02.01.00/tn7dsl.c 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/tn7dsl.c 2007-08-06 18:58:42.000000000 +0200
+diff -urN sangam_atm-D7.03.01.00.orig/tn7dsl.c sangam_atm-D7.03.01.00/tn7dsl.c
+--- sangam_atm-D7.03.01.00.orig/tn7dsl.c 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/tn7dsl.c 2008-03-11 02:12:41.000000000 +0100
@@ -94,7 +94,6 @@
* 1/02/07 JZ CQ11054: Data Precision and Range Changes for TR-069 Conformance
* UR8_MERGE_END CQ11054*
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
-@@ -103,7 +102,7 @@
+@@ -102,8 +101,6 @@
+ #include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
- #include <asm/io.h>
+-#include <asm/io.h>
-#include <asm/mips-boards/prom.h>
-+#include <asm/ar7/ar7.h>
#include <linux/proc_fs.h>
#include <linux/string.h>
#include <linux/ctype.h>
-@@ -111,6 +110,8 @@
+@@ -111,6 +108,12 @@
#include <linux/timer.h>
#include <linux/vmalloc.h>
#include <linux/file.h>
+#include <linux/firmware.h>
++
++#include <asm/io.h>
++#include <asm/ar7/ar7.h>
++#include <asm/ar7/prom.h>
+
/* Modules specific header files */
#include "tn7atm.h"
#include "tn7api.h"
-@@ -323,6 +324,14 @@
+@@ -173,7 +176,7 @@
+ static struct led_funcs ledreg[2];
+ #endif
+
+-#define DEV_DSLMOD 1
++#define DEV_DSLMOD CTL_UNNUMBERED
+ #define MAX_STR_SIZE 256
+ #define DSL_MOD_SIZE 256
+
+@@ -299,7 +302,7 @@
+ static volatile int bshutdown;
+ static char info[MAX_STR_SIZE];
+ /* Used for DSL Polling enable */
+-static DECLARE_MUTEX_LOCKED (adsl_sem_overlay);
++static struct semaphore adsl_sem_overlay;
+
+ //kthread_t overlay_thread;
+ /* end of module wide declars */
+@@ -323,6 +326,14 @@
#define gDot1(a) ((a>0)?(a%10):((-a)%10))
// UR8_MERGE_END CQ11054*
int os_atoi(const char *pStr)
{
int MulNeg = (*pStr == '-' ? -1 : 1);
-@@ -359,39 +368,6 @@
+@@ -359,39 +370,6 @@
#endif
}
// * UR8_MERGE_START CQ10640 Jack Zhang
int tn7dsl_dump_dsp_memory(char *input_str) //cph99
{
-@@ -441,101 +417,74 @@
+@@ -441,101 +419,74 @@
return CpuFrequency;
}
-
- dgprintf(4,"shim_read_overlay_page\n");
- //dgprintf(4,"sec offset=%d, sec length =%d\n", secOffset, secLength);
--
++ const struct firmware *fw_entry;
++ size_t size;
+
- filp=filp_open(DSP_FIRMWARE_PATH,00,O_RDONLY);
- if(filp ==NULL)
- {
- set_fs(KERNEL_DS);
- filp->f_pos = secOffset;
- bytesRead = filp->f_op->read(filp,ptr,secLength,&filp->f_pos);
-+ const struct firmware *fw_entry;
-+ size_t size;
-
+-
- set_fs(oldfs);
- /*
- * Close the file
}
int shim_osLoadDebugFWImage(unsigned char *ptr)
-@@ -3442,7 +3391,7 @@
+@@ -3064,6 +3015,7 @@
+ int high_precision_selected = 0;
+ // UR8_MERGE_END CQ11054*
+
++ sema_init(&adsl_sem_overlay, 0);
+ /*
+ * start dsl
+ */
+@@ -3442,7 +3394,7 @@
*/
if(write)
{
switch (ctl->ctl_name)
{
-@@ -3528,7 +3477,7 @@
+@@ -3528,14 +3480,14 @@
else
{
len += sprintf(info+len, mod_req);
}
return ret;
}
-@@ -3558,8 +3507,7 @@
+
+
+ ctl_table dslmod_table[] = {
+- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, &dslmod_sysctl}
++ {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
+ ,
+ {0}
+ };
+@@ -3558,8 +3510,7 @@
if (initialized == 1)
return;
/*
* set the defaults
-diff -urN sangam_atm-07.02.01.00/tn7sar.c sangam_atm-07.02.01.00/tn7sar.c
---- sangam_atm-07.02.01.00/tn7sar.c 2007-08-06 18:15:52.000000000 +0200
-+++ sangam_atm-07.02.01.00/tn7sar.c 2007-08-06 18:58:42.000000000 +0200
+@@ -4821,4 +4772,4 @@
+ }
+ #endif //NO_ADV_STATS
+ #endif //TR69_PMD_IN
+-// * UR8_MERGE_END CQ11057 *
+\ Nessun a capo alla fine del file
++// * UR8_MERGE_END CQ11057 *
+diff -urN sangam_atm-D7.03.01.00.orig/tn7sar.c sangam_atm-D7.03.01.00/tn7sar.c
+--- sangam_atm-D7.03.01.00.orig/tn7sar.c 2008-03-11 02:11:02.000000000 +0100
++++ sangam_atm-D7.03.01.00/tn7sar.c 2008-03-11 02:12:00.000000000 +0100
@@ -42,7 +42,6 @@
* UR8_MERGE_END CQ10700
*******************************************************************************/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
-@@ -51,7 +50,7 @@
+@@ -50,12 +49,13 @@
+ #include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
- #include <asm/io.h>
+-#include <asm/io.h>
-#include <asm/mips-boards/prom.h>
-+#include <asm/ar7/ar7.h>
#include <linux/proc_fs.h>
#include <linux/string.h>
#include <linux/ctype.h>
+
++#include <asm/io.h>
++#include <asm/ar7/ar7.h>
++#include <asm/ar7/prom.h>
+
+ #define _CPHAL_AAL5
+ #define _CPHAL_SAR