* rename voice package * sync with lantiqs release * make it work on lantiq kernel
SVN-Revision: 25275
This commit is contained in:
parent
79b3d8f69a
commit
fd551c1fa7
21 changed files with 244 additions and 880 deletions
|
@ -1,69 +0,0 @@
|
|||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -149,7 +149,7 @@ if KERNEL_2_6
|
||||
drv_tapi_OBJS = "$(subst .c,.o, $(drv_tapi_SOURCES))"
|
||||
|
||||
drv_tapi.ko: $(drv_tapi_SOURCES) $(EXTRA_DIST)
|
||||
- @echo -e "Making Linux 2.6.x kernel object"
|
||||
+ @echo "Making Linux 2.6.x kernel object"
|
||||
@for f in $(drv_tapi_SOURCES) ; do \
|
||||
if test ! -e $(PWD)/$$f; then \
|
||||
echo " LN $$f" ; \
|
||||
@@ -157,10 +157,10 @@ drv_tapi.ko: $(drv_tapi_SOURCES) $(EXTRA
|
||||
ln -s @abs_srcdir@/$$f $(PWD)/$$f; \
|
||||
fi; \
|
||||
done;
|
||||
- @echo -e "# drv_tapi: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
|
||||
- @echo -e "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
|
||||
- @echo -e "$(subst .ko,,$@)-y := $(drv_tapi_OBJS)" >> $(PWD)/Kbuild
|
||||
- @echo -e "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_tapi_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild
|
||||
+ @echo "# drv_tapi: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
|
||||
+ @echo "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
|
||||
+ @echo "$(subst .ko,,$@)-y := $(drv_tapi_OBJS)" >> $(PWD)/Kbuild
|
||||
+ @echo "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_tapi_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild
|
||||
$(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules
|
||||
|
||||
clean-generic:
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -128,7 +128,7 @@ dnl Set kernel build path
|
||||
AC_ARG_ENABLE(kernelbuild,
|
||||
AS_HELP_STRING(--enable-kernelbuild=x,Set the target kernel build path),
|
||||
[
|
||||
- if test -r $enableval/include/linux/autoconf.h; then
|
||||
+ if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then
|
||||
AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
|
||||
else
|
||||
AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
|
||||
--- a/src/drv_tapi_linux.h
|
||||
+++ b/src/drv_tapi_linux.h
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/version.h>
|
||||
#include <linux/interrupt.h> /* in_interrupt() */
|
||||
#include <linux/delay.h> /* mdelay - udelay */
|
||||
+#include <linux/workqueue.h> /* work_struct */
|
||||
#include <asm/poll.h> /* POLLIN, POLLOUT */
|
||||
|
||||
#include "ifx_types.h" /* ifx type definitions */
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <linux/errno.h>
|
||||
#include <asm/uaccess.h> /* copy_from_user(), ... */
|
||||
#include <asm/byteorder.h>
|
||||
+#include <linux/smp_lock.h> /* lock_kernel() */
|
||||
#include <asm/io.h>
|
||||
|
||||
#ifdef LINUX_2_6
|
||||
@@ -3600,7 +3600,11 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
|
||||
flag and released after the down() call. */
|
||||
lock_kernel();
|
||||
mb();
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
kill_proc(pThrCntrl->tid, SIGKILL, 1);
|
||||
+#else
|
||||
+ kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1);
|
||||
+#endif
|
||||
/* release the big kernel lock */
|
||||
unlock_kernel();
|
||||
wait_for_completion (&pThrCntrl->thrCompletion);
|
|
@ -1,96 +0,0 @@
|
|||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -544,7 +544,7 @@ static ssize_t ifx_tapi_write (struct fi
|
||||
IFX_uint8_t *pData;
|
||||
IFX_size_t buf_size;
|
||||
#endif /* TAPI_PACKET */
|
||||
- IFX_ssize_t size = 0;
|
||||
+ ssize_t size = 0;
|
||||
|
||||
#ifdef TAPI_PACKET
|
||||
if (pTapiDev->bInitialized == IFX_FALSE)
|
||||
--- a/src/drv_tapi_osmap.h
|
||||
+++ b/src/drv_tapi_osmap.h
|
||||
@@ -17,39 +17,6 @@
|
||||
*/
|
||||
|
||||
#include "ifx_types.h" /* ifx type definitions */
|
||||
-
|
||||
-#ifndef HAVE_IFX_ULONG_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_ulong_t
|
||||
- /* unsigned long type - valid for 32bit systems only */
|
||||
- typedef unsigned long IFX_ulong_t;
|
||||
- #define HAVE_IFX_ULONG_T
|
||||
-#endif /* HAVE_IFX_ULONG_T */
|
||||
-
|
||||
-#ifndef HAVE_IFX_LONG_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_long_t
|
||||
- /* long type - valid for 32bit systems only */
|
||||
- typedef long IFX_long_t;
|
||||
- #define HAVE_IFX_LONG_T
|
||||
-#endif /* HAVE_IFX_LONG_T */
|
||||
-
|
||||
-#ifndef HAVE_IFX_INTPTR_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_intptr_t
|
||||
- typedef IFX_long_t IFX_intptr_t;
|
||||
- #define HAVE_IFX_INTPTR_T
|
||||
-#endif /* HAVE_IFX_INTPTR_T */
|
||||
-
|
||||
-#ifndef HAVE_IFX_SIZE_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_size_t
|
||||
- typedef IFX_ulong_t IFX_size_t;
|
||||
- #define HAVE_IFX_SIZE_T
|
||||
-#endif /* HAVE_IFX_SIZE_T */
|
||||
-
|
||||
-#ifndef HAVE_IFX_SSIZE_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_ssize_t
|
||||
- typedef IFX_long_t IFX_ssize_t;
|
||||
- #define HAVE_IFX_SSIZE_T
|
||||
-#endif /* HAVE_IFX_SSIZE_T */
|
||||
-
|
||||
#include "ifxos_interrupt.h"
|
||||
#include "ifxos_memory_alloc.h"
|
||||
#include "ifxos_copy_user_space.h"
|
||||
--- a/include/drv_tapi_ll_interface.h
|
||||
+++ b/include/drv_tapi_ll_interface.h
|
||||
@@ -40,13 +40,6 @@
|
||||
#include "ifxos_select.h"
|
||||
#endif /* TAPI_PACKET */
|
||||
|
||||
-#ifndef HAVE_IFX_ULONG_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_ulong_t
|
||||
- /* unsigned long type - valid for 32bit systems only */
|
||||
- typedef unsigned long IFX_ulong_t;
|
||||
- #define HAVE_IFX_ULONG_T
|
||||
-#endif /* HAVE_IFX_ULONG_T */
|
||||
-
|
||||
/* ============================= */
|
||||
/* Local Macros Definitions */
|
||||
/* ============================= */
|
||||
--- a/src/lib/lib_bufferpool/lib_bufferpool.c
|
||||
+++ b/src/lib/lib_bufferpool/lib_bufferpool.c
|
||||
@@ -80,24 +80,6 @@
|
||||
#include <linux/slab.h>
|
||||
#endif /* LINUX */
|
||||
|
||||
-
|
||||
-/* ============================= */
|
||||
-/* Extra type definitions */
|
||||
-/* ============================= */
|
||||
-#ifndef HAVE_IFX_ULONG_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_ulong_t
|
||||
- /* unsigned long type - valid for 32bit systems only */
|
||||
- typedef unsigned long IFX_ulong_t;
|
||||
- #define HAVE_IFX_ULONG_T
|
||||
-#endif /* HAVE_IFX_ULONG_T */
|
||||
-
|
||||
-#ifndef HAVE_IFX_UINTPTR_T
|
||||
- #warning please update your ifx_types.h, using local definition of IFX_uintptr_t
|
||||
- typedef IFX_ulong_t IFX_uintptr_t;
|
||||
- #define HAVE_IFX_UINTPTR_T
|
||||
-#endif /* HAVE_IFX_UINTPTR_T */
|
||||
-
|
||||
-
|
||||
/* ============================= */
|
||||
/* Local Macros & Definitions */
|
||||
/* ============================= */
|
|
@ -1,36 +0,0 @@
|
|||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -227,7 +227,7 @@ drv_vmmc_CFLAGS += -fno-common
|
||||
drv_vmmc_OBJS = "$(subst .c,.o, $(drv_vmmc_SOURCES) $(nodist_drv_vmmc_SOURCES))"
|
||||
|
||||
drv_vmmc.ko: $(drv_vmmc_SOURCES) $(EXTRA_DIST)
|
||||
- @echo -e "Making Linux 2.6.x kernel object"
|
||||
+ @echo "Making Linux 2.6.x kernel object"
|
||||
@for f in $(drv_vmmc_SOURCES) $(nodist_drv_vmmc_SOURCES) ; do \
|
||||
if test ! -e $(PWD)/$$f; then \
|
||||
echo " LN $$f" ; \
|
||||
@@ -235,10 +235,10 @@ drv_vmmc.ko: $(drv_vmmc_SOURCES) $(EXTRA
|
||||
ln -s @abs_srcdir@/$$f $(PWD)/$$f; \
|
||||
fi; \
|
||||
done;
|
||||
- @echo -e "# drv_vmmc: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
|
||||
- @echo -e "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
|
||||
- @echo -e "$(subst .ko,,$@)-y := $(drv_vmmc_OBJS)" >> $(PWD)/Kbuild
|
||||
- @echo -e "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_vmmc_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild
|
||||
+ @echo "# drv_vmmc: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
|
||||
+ @echo "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
|
||||
+ @echo "$(subst .ko,,$@)-y := $(drv_vmmc_OBJS)" >> $(PWD)/Kbuild
|
||||
+ @echo "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_vmmc_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild
|
||||
$(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules
|
||||
|
||||
clean-generic:
|
||||
--- a/src/drv_vmmc_linux.c
|
||||
+++ b/src/drv_vmmc_linux.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/vmalloc.h>
|
||||
+#include <linux/sched.h>
|
||||
|
||||
#ifdef LINUX_2_6
|
||||
#include <linux/version.h>
|
|
@ -1,491 +0,0 @@
|
|||
--- a/src/drv_vmmc_access.h
|
||||
+++ b/src/drv_vmmc_access.h
|
||||
@@ -24,6 +24,10 @@
|
||||
#include "drv_mps_vmmc.h"
|
||||
#endif
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# define IFX_MPS IFXMIPS_MPS_BASE_ADDR
|
||||
+#endif
|
||||
+
|
||||
/* ============================= */
|
||||
/* Global Defines */
|
||||
/* ============================= */
|
||||
--- a/src/drv_vmmc_bbd.c
|
||||
+++ b/src/drv_vmmc_bbd.c
|
||||
@@ -939,7 +939,11 @@ static IFX_int32_t vmmc_BBD_DownloadChCr
|
||||
IFX_uint8_t padBytes = 0;
|
||||
#endif
|
||||
IFX_uint16_t cram_offset, cram_crc,
|
||||
- pCmd [MAX_CMD_WORD] = {0};
|
||||
+ pCmd [MAX_CMD_WORD]
|
||||
+#if defined (__GNUC__) || defined (__GNUG__)
|
||||
+ __attribute__ ((aligned(4)))
|
||||
+#endif
|
||||
+ = {0};
|
||||
|
||||
/* read offset */
|
||||
cpb2w (&cram_offset, &bbd_cram->pData[0], sizeof (IFX_uint16_t));
|
||||
--- a/src/drv_vmmc_danube.h
|
||||
+++ b/src/drv_vmmc_danube.h
|
||||
@@ -15,12 +15,59 @@
|
||||
*/
|
||||
|
||||
#if defined SYSTEM_DANUBE
|
||||
-#include <asm/ifx/ifx_gpio.h>
|
||||
+# if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips_gpio.h>
|
||||
+
|
||||
+# define IFX_GPIO_PIN_NUMBER_PER_PORT 16
|
||||
+# define IFX_GPIO_PIN_ID(port, pin) ((port) \
|
||||
+ * IFX_GPIO_PIN_NUMBER_PER_PORT \
|
||||
+ + (pin))
|
||||
+# define IFX_GPIO_PIN_ID_TO_PORT(pin_id) (pin_id >> 4)
|
||||
+# define IFX_GPIO_PIN_ID_TO_PIN(pin_id) (pin_id & 0x0F)
|
||||
+
|
||||
+# define IFX_GPIO_MODULE_TAPI_VMMC 0 /* not used */
|
||||
+
|
||||
+# define ifx_gpio_pin_reserve(a,b) 0 /* obsolete */
|
||||
+
|
||||
+# define ifx_gpio_open_drain_set(a,b) ifxmips_port_set_open_drain( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel0_set(a,b) ifxmips_port_set_altsel0( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel1_set(a,b) ifxmips_port_set_altsel1( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel0_clear(a,b) ifxmips_port_clear_altsel0( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel1_clear(a,b) ifxmips_port_clear_altsel1( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_dir_in_set(a,b) ifxmips_port_set_dir_in( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_dir_out_set(a,b) ifxmips_port_set_dir_out( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_pin_free(a,b) ifxmips_port_free_pin( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+# else
|
||||
+# include <asm/ifx/ifx_gpio.h>
|
||||
+# endif
|
||||
#else
|
||||
#error no system selected
|
||||
#endif
|
||||
|
||||
-#define VMMC_TAPI_GPIO_MODULE_ID IFX_GPIO_MODULE_TAPI_VMMC
|
||||
+#define VMMC_TAPI_GPIO_MODULE_ID IFX_GPIO_MODULE_TAPI_VMMC
|
||||
/**
|
||||
|
||||
*/
|
||||
--- a/src/drv_vmmc_init.c
|
||||
+++ b/src/drv_vmmc_init.c
|
||||
@@ -48,6 +48,14 @@
|
||||
#include "drv_vmmc_pmc.h"
|
||||
#endif /* PMC_SUPPORTED */
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
|
||||
+# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR
|
||||
+# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR
|
||||
+# define IFX_MPS_CVC1SR IFXMIPS_MPS_CVC1SR
|
||||
+# define IFX_MPS_CVC2SR IFXMIPS_MPS_CVC2SR
|
||||
+# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR
|
||||
+#endif
|
||||
|
||||
/* ============================= */
|
||||
/* Local Macros & Definitions */
|
||||
--- a/src/drv_vmmc_init_cap.c
|
||||
+++ b/src/drv_vmmc_init_cap.c
|
||||
@@ -22,6 +22,11 @@
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_device.h"
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# define IFX_MPS_CHIPID_VERSION_GET IFXMIPS_MPS_CHIPID_VERSION_GET
|
||||
+# define IFX_MPS_CHIPID IFXMIPS_MPS_CHIPID
|
||||
+#endif
|
||||
+
|
||||
/* ============================= */
|
||||
/* Configuration defintions */
|
||||
/* ============================= */
|
||||
--- a/src/mps/drv_mps_vmmc_common.c
|
||||
+++ b/src/mps/drv_mps_vmmc_common.c
|
||||
@@ -35,8 +35,35 @@
|
||||
#include "ifxos_interrupt.h"
|
||||
#include "ifxos_time.h"
|
||||
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx/ifx_gptu.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_gptu.h>
|
||||
+
|
||||
+# define ifx_gptu_timer_request ifxmips_request_timer
|
||||
+# define ifx_gptu_timer_start ifxmips_start_timer
|
||||
+# define ifx_gptu_countvalue_get ifxmips_get_count_value
|
||||
+# define ifx_gptu_timer_free ifxmips_free_timer
|
||||
+
|
||||
+# define IFX_MPS_SRAM IFXMIPS_MPS_SRAM
|
||||
+# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR
|
||||
+# define IFX_MPS_AD1ENR IFXMIPS_MPS_AD1ENR
|
||||
+# define IFX_MPS_VC0ENR IFXMIPS_MPS_VC0ENR
|
||||
+# define IFX_MPS_SAD0SR IFXMIPS_MPS_SAD0SR
|
||||
+# define IFX_MPS_RAD0SR IFXMIPS_MPS_RAD0SR
|
||||
+# define IFX_MPS_RAD1SR IFXMIPS_MPS_RAD1SR
|
||||
+# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
|
||||
+# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR
|
||||
+# define IFX_MPS_RVC0SR IFXMIPS_MPS_RVC0SR
|
||||
+# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR
|
||||
+
|
||||
+# define INT_NUM_IM4_IRL14 (INT_NUM_IM4_IRL0 + 14)
|
||||
+
|
||||
+# define bsp_mask_and_ack_irq ifxmips_mask_and_ack_irq
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx/ifx_gptu.h>
|
||||
+#endif
|
||||
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_dbg.h"
|
||||
@@ -193,7 +220,8 @@ IFX_boolean_t ifx_mps_ext_bufman ()
|
||||
*/
|
||||
IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority)
|
||||
{
|
||||
- IFX_uint32_t ptr, flags;
|
||||
+ unsigned long flags;
|
||||
+ IFX_uint32_t ptr;
|
||||
IFX_int32_t index = fastbuf_index;
|
||||
|
||||
if (fastbuf_initialized == 0)
|
||||
@@ -219,11 +247,11 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_
|
||||
if ((volatile IFX_uint32_t) fastbuf_pool[index] & FASTBUF_USED)
|
||||
continue;
|
||||
ptr = fastbuf_pool[index];
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] |= FASTBUF_USED;
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] | FASTBUF_USED;
|
||||
if ((priority == FASTBUF_FW_OWNED) || (priority == FASTBUF_CMD_OWNED) ||
|
||||
(priority == FASTBUF_EVENT_OWNED) ||
|
||||
(priority == FASTBUF_WRITE_OWNED))
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] |= priority;
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] | priority;
|
||||
fastbuf_index = index;
|
||||
IFXOS_UNLOCKINT (flags);
|
||||
return (IFX_void_t *) ptr;
|
||||
@@ -247,7 +275,7 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_
|
||||
*/
|
||||
IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr)
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
IFX_int32_t index = fastbuf_index;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -261,8 +289,9 @@ IFX_void_t ifx_mps_fastbuf_free (const I
|
||||
FASTBUF_EVENT_OWNED | FASTBUF_WRITE_OWNED))
|
||||
== ((IFX_uint32_t) ptr | FASTBUF_USED))
|
||||
{
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] &= ~FASTBUF_USED;
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] &=
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] & ~FASTBUF_USED;
|
||||
+
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] &
|
||||
~(FASTBUF_FW_OWNED | FASTBUF_CMD_OWNED | FASTBUF_EVENT_OWNED |
|
||||
FASTBUF_WRITE_OWNED);
|
||||
IFXOS_UNLOCKINT (flags);
|
||||
@@ -444,7 +473,7 @@ static mps_buffer_state_e ifx_mps_bufman
|
||||
*/
|
||||
static IFX_int32_t ifx_mps_bufman_inc_level (IFX_uint32_t value)
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
if (mps_buffer.buf_level + value > MPS_BUFFER_MAX_LEVEL)
|
||||
{
|
||||
@@ -471,7 +500,7 @@ static IFX_int32_t ifx_mps_bufman_inc_le
|
||||
*/
|
||||
static IFX_int32_t ifx_mps_bufman_dec_level (IFX_uint32_t value)
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
if (mps_buffer.buf_level < value)
|
||||
{
|
||||
@@ -932,7 +961,7 @@ IFX_int32_t ifx_mps_common_open (mps_com
|
||||
mps_mbx_dev * pMBDev, IFX_int32_t bcommand,
|
||||
IFX_boolean_t from_kernel)
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -1048,7 +1077,7 @@ IFX_int32_t ifx_mps_common_close (mps_mb
|
||||
IFX_void_t ifx_mps_release_structures (mps_comm_dev * pDev)
|
||||
{
|
||||
IFX_int32_t count;
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
IFXOS_BlockFree (pFW_img_data);
|
||||
@@ -1544,7 +1573,7 @@ IFX_int32_t ifx_mps_mbx_read_message (mp
|
||||
IFX_uint32_t * bytes)
|
||||
{
|
||||
IFX_int32_t i, ret;
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -1751,7 +1780,7 @@ IFX_int32_t ifx_mps_mbx_write_message (m
|
||||
{
|
||||
mps_fifo *mbx;
|
||||
IFX_uint32_t i;
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
IFX_int32_t retval = -EAGAIN;
|
||||
IFX_int32_t retries = 0;
|
||||
IFX_uint32_t word = 0;
|
||||
@@ -2138,6 +2167,7 @@ IFX_int32_t ifx_mps_mbx_write_cmd (mps_m
|
||||
TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
("%s(): Invalid device ID %d !\n", __FUNCTION__, pMBDev->devID));
|
||||
}
|
||||
+
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2161,7 +2191,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
mps_mbx_dev *mbx_dev;
|
||||
MbxMsg_s msg;
|
||||
IFX_uint32_t bytes_read = 0;
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
IFX_int32_t ret;
|
||||
|
||||
/* set pointer to data upstream mailbox, no matter if 0,1,2 or 3 because
|
||||
@@ -2252,7 +2282,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
{
|
||||
ifx_mps_bufman_dec_level (1);
|
||||
if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
|
||||
- (atomic_read (&pMPSDev->provide_buffer->object.count) == 0))
|
||||
+ ((volatile unsigned int)pMPSDev->provide_buffer->object.count == 0))
|
||||
{
|
||||
IFXOS_LockRelease (pMPSDev->provide_buffer);
|
||||
}
|
||||
@@ -2295,7 +2325,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
ifx_mps_bufman_dec_level (1);
|
||||
if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
|
||||
- (atomic_read (&pMPSDev->provide_buffer->object.count) == 0))
|
||||
+ ((volatile unsigned int)pMPSDev->provide_buffer->object.count == 0))
|
||||
{
|
||||
IFXOS_LockRelease (pMPSDev->provide_buffer);
|
||||
}
|
||||
@@ -2325,7 +2355,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
IFX_void_t ifx_mps_mbx_cmd_upstream (IFX_ulong_t dummy)
|
||||
{
|
||||
mps_fifo *mbx;
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
/* set pointer to upstream command mailbox */
|
||||
mbx = &(pMPSDev->cmd_upstrm_fifo);
|
||||
@@ -2373,7 +2403,7 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
|
||||
mps_event_msg msg;
|
||||
IFX_int32_t length = 0;
|
||||
IFX_int32_t read_length = 0;
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
/* set pointer to upstream event mailbox */
|
||||
mbx = &(pMPSDev->event_upstrm_fifo);
|
||||
@@ -2616,7 +2646,7 @@ IFX_void_t ifx_mps_disable_mailbox_int (
|
||||
*/
|
||||
IFX_void_t ifx_mps_dd_mbx_int_enable (IFX_void_t)
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
MPS_Ad0Reg_u Ad0Reg;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -2642,7 +2672,7 @@ IFX_void_t ifx_mps_dd_mbx_int_enable (IF
|
||||
*/
|
||||
IFX_void_t ifx_mps_dd_mbx_int_disable (IFX_void_t)
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
MPS_Ad0Reg_u Ad0Reg;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -2769,6 +2799,7 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
if (MPS_Ad0StatusReg.fld.du_mbx)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
@@ -3062,7 +3093,8 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_
|
||||
*/
|
||||
IFX_return_t ifx_mps_init_gpt ()
|
||||
{
|
||||
- IFX_uint32_t flags, timer_flags, timer, loops = 0;
|
||||
+ unsigned long flags;
|
||||
+ IFX_uint32_t timer_flags, timer, loops = 0;
|
||||
IFX_ulong_t count;
|
||||
#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
|
||||
timer = TIMER1A;
|
||||
--- a/src/mps/drv_mps_vmmc_danube.c
|
||||
+++ b/src/mps/drv_mps_vmmc_danube.c
|
||||
@@ -32,9 +32,22 @@
|
||||
#include "ifxos_select.h"
|
||||
#include "ifxos_interrupt.h"
|
||||
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx/ifx_gpio.h>
|
||||
-#include <asm/ifx/common_routines.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_gptu.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_prom.h>
|
||||
+
|
||||
+# define IFX_RCU_RST_REQ IFXMIPS_RCU_RST
|
||||
+# define IFX_RCU_RST_REQ_CPU1 IFXMIPS_RCU_RST_CPU1
|
||||
+
|
||||
+# define ifx_get_cp1_base prom_get_cp1_base
|
||||
+# define ifx_get_cp1_size prom_get_cp1_size
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx_vpe.h>
|
||||
+# include <asm/ifx/ifx_gpio.h>
|
||||
+#endif
|
||||
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_dbg.h"
|
||||
@@ -119,6 +132,15 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
}
|
||||
|
||||
/* check if FW image fits in available memory space */
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+ if (mem > ifx_get_cp1_size()<<20)
|
||||
+ {
|
||||
+ TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
+ ("[%s %s %d]: error, firmware memory exceeds reserved space (%i > %i)!\n",
|
||||
+ __FILE__, __func__, __LINE__, mem, ifx_get_cp1_size()<<20));
|
||||
+ return IFX_ERROR;
|
||||
+ }
|
||||
+#else
|
||||
if (mem > ifx_get_cp1_size())
|
||||
{
|
||||
TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
@@ -126,6 +148,7 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
__FILE__, __func__, __LINE__, mem, ifx_get_cp1_size()));
|
||||
return IFX_ERROR;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* reset the driver */
|
||||
ifx_mps_reset ();
|
||||
@@ -337,7 +360,7 @@ IFX_void_t ifx_mps_release (IFX_void_t)
|
||||
*/
|
||||
IFX_void_t ifx_mps_wdog_expiry()
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
/* recalculate and compare the firmware checksum */
|
||||
--- a/src/mps/drv_mps_vmmc_device.h
|
||||
+++ b/src/mps/drv_mps_vmmc_device.h
|
||||
@@ -16,8 +16,15 @@
|
||||
declarations.
|
||||
*******************************************************************************/
|
||||
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx_vpe.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_gpio.h>
|
||||
+# include <gpio.h>
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx_vpe.h>
|
||||
+#endif
|
||||
|
||||
/* ============================= */
|
||||
/* MPS Common defines */
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -40,10 +40,26 @@
|
||||
#include <linux/moduleparam.h>
|
||||
#endif /* */
|
||||
|
||||
-
|
||||
-#include <asm/ifx/irq.h>
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx_vpe.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+
|
||||
+# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR
|
||||
+# define IFX_MPS_AD1ENR IFXMIPS_MPS_AD1ENR
|
||||
+# define IFX_MPS_RAD0SR IFXMIPS_MPS_RAD0SR
|
||||
+# define IFX_MPS_RAD1SR IFXMIPS_MPS_RAD1SR
|
||||
+# define IFX_MPS_VC0ENR IFXMIPS_MPS_VC0ENR
|
||||
+# define IFX_MPS_RVC0SR IFXMIPS_MPS_RVC0SR
|
||||
+
|
||||
+# define INT_NUM_IM4_IRL14 (INT_NUM_IM4_IRL0 + 14)
|
||||
+# define INT_NUM_IM4_IRL18 (INT_NUM_IM4_IRL0 + 18)
|
||||
+# define INT_NUM_IM4_IRL19 (INT_NUM_IM4_IRL0 + 19)
|
||||
+# define IFX_ICU_IM4_IER IFXMIPS_ICU_IM4_IER
|
||||
+#else
|
||||
+# include <asm/ifx/irq.h>
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx_vpe.h>
|
||||
+#endif
|
||||
|
||||
/* lib_ifxos headers */
|
||||
#include "ifx_types.h"
|
||||
@@ -914,7 +930,7 @@ IFX_int32_t ifx_mps_ioctl (struct inode
|
||||
#endif /* MPS_FIFO_BLOCKING_WRITE */
|
||||
case FIO_MPS_GET_STATUS:
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -949,7 +965,7 @@ IFX_int32_t ifx_mps_ioctl (struct inode
|
||||
#if CONFIG_MPS_HISTORY_SIZE > 0
|
||||
case FIO_MPS_GET_CMD_HISTORY:
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
if (from_kernel)
|
||||
{
|
||||
@@ -1637,6 +1653,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX
|
||||
sprintf (buf + len, " minLv: \t %8d\n",
|
||||
ifx_mps_dev.voice_mb[i].upstrm_fifo->min_space);
|
||||
}
|
||||
+
|
||||
return len;
|
||||
}
|
||||
|
|
@ -17,12 +17,12 @@ PKG_MD5SUM:=ba775356bdd5e1b73b3e11a152710ed6
|
|||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/ifxos
|
||||
SUBMENU:=Other modules
|
||||
define KernelPackage/ltq-ifxos
|
||||
SUBMENU:=Voice over IP
|
||||
TITLE:=Lantiq OS abstraction library
|
||||
URL:=http://www.lantiq.com/
|
||||
MAINTAINER:=Lantiq
|
||||
DEPENDS:=@TARGET_ifxmips @BROKEN
|
||||
DEPENDS:=@TARGET_lantiq
|
||||
FILES:=$(PKG_BUILD_DIR)/src/drv_ifxos.ko
|
||||
AUTOLOAD:=$(call AutoLoad,10,drv_ifxos)
|
||||
endef
|
||||
|
@ -46,4 +46,4 @@ define Build/InstallDev
|
|||
$(CP) $(PKG_BUILD_DIR)/src/libifxos.a $(1)/usr/lib/libifxos.a
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ifxos))
|
||||
$(eval $(call KernelPackage,ltq-ifxos))
|
|
@ -1,8 +1,6 @@
|
|||
menu "Configuration"
|
||||
depends on PACKAGE_kmod-ifx-tapi
|
||||
|
||||
config VOICE_CPE_TAPI_FAX
|
||||
bool "fax relay and modem support"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default n
|
||||
help
|
||||
Option to enable fax/modem support in TAPI.
|
||||
|
@ -12,24 +10,28 @@ config VOICE_CPE_TAPI_FAX
|
|||
|
||||
config VOICE_CPE_TAPI_CID
|
||||
bool "CID support"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
help
|
||||
Option to enable Caller ID support.
|
||||
|
||||
config VOICE_CPE_TAPI_LT_GR909
|
||||
bool "Linetesting GR-909 support"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
help
|
||||
Option to enable linetesting GR-909.
|
||||
|
||||
config VOICE_CPE_TAPI_DECT
|
||||
bool "DECT encoding for COSIC modem"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default n
|
||||
help
|
||||
Option to enable DECT encoding for COSIC modem.
|
||||
|
||||
config VOICE_CPE_TAPI_KPI
|
||||
bool "KPI (Kernel Packet Interface)"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
help
|
||||
Option to enable the generic kernel level packet interface
|
||||
|
@ -40,6 +42,7 @@ config VOICE_CPE_TAPI_KPI
|
|||
|
||||
config VOICE_CPE_TAPI_QOS
|
||||
bool "QOS for accelerated RTP packet handling"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
help
|
||||
Option to enable an accelerated RTP packet transfer inside
|
||||
|
@ -49,18 +52,21 @@ config VOICE_CPE_TAPI_QOS
|
|||
|
||||
config VOICE_CPE_TAPI_STATISTICS
|
||||
bool "TAPI statistics via /proc fs"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
help
|
||||
Option to enable /proc fs statistics for packet counts etc.
|
||||
|
||||
config VOICE_CPE_TAPI_METERING
|
||||
bool "Metering (TTX) support"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default n
|
||||
help
|
||||
Option to enable metering (TTX) support.
|
||||
|
||||
config VOICE_CPE_TAPI_HDLC
|
||||
bool "PCM HDLC support, evaluation"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default n
|
||||
help
|
||||
Option to enable PCM HDLC framing inside the firmware, e.g. for
|
||||
|
@ -68,9 +74,15 @@ config VOICE_CPE_TAPI_HDLC
|
|||
|
||||
config VOICE_CPE_TAPI_TRACES
|
||||
bool "enable driver traces"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
help
|
||||
enable driver traces with different trace levels to be
|
||||
configured dynamically from the application or during insmod
|
||||
|
||||
endmenu
|
||||
config VOICE_CPE_TAPI_LINUX_HOTPLUG
|
||||
bool "enable driver Linux hotplug events"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
help
|
||||
enable driver Linux hotplug events generation
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2008-2010 OpenWrt.org
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
@ -9,33 +9,30 @@ include $(TOPDIR)/rules.mk
|
|||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=drv_tapi
|
||||
PKG_VERSION:=3.11.0
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=3.13.0
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=drv_tapi-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=drv_tapi-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
PKG_MD5SUM:=1ffee83ce69f55915468c309d8ae2138
|
||||
|
||||
PATCH_DIR ?= ./patches$(if $(wildcard ./patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
|
||||
PKG_MD5SUM:=edb43b494832c540cc035493d18db58f
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/ifx-tapi
|
||||
define KernelPackage/ltq-tapi
|
||||
SUBMENU:=Voice over IP
|
||||
TITLE:=Lantiq TAPI subsystem
|
||||
URL:=http://www.lantiq.com/
|
||||
MAINTAINER:=Lantiq
|
||||
DEPENDS:=+kmod-ifxos @BROKEN
|
||||
DEPENDS:=+kmod-ltq-ifxos @TARGET_lantiq
|
||||
FILES:=$(PKG_BUILD_DIR)/src/drv_tapi.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,drv_tapi)
|
||||
MENU:=1
|
||||
MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||
endef
|
||||
|
||||
define KernelPackage/ifx-tapi/description
|
||||
define KernelPackage/ltq-tapi/description
|
||||
Voice Subsystem Telephony API High Level Driver
|
||||
endef
|
||||
|
||||
define KernelPackage/ifx-tapi/config
|
||||
define KernelPackage/ltq-tapi/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
|
@ -55,7 +52,8 @@ CONFIGURE_ARGS += \
|
|||
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_STATISTICS,statistics) \
|
||||
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_METERING,metering) \
|
||||
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_HDLC,hdlc) \
|
||||
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_TRACES,trace)
|
||||
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_TRACES,trace) \
|
||||
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_LINUX_HOTPLUG,hotplug)
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); aclocal && autoconf && automake)
|
||||
|
@ -68,4 +66,4 @@ define Build/InstallDev
|
|||
(cd $(1)/usr/include/drv_tapi && ln -s . include && ln -s ../ifxos/ifx_types.h .)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ifx-tapi))
|
||||
$(eval $(call KernelPackage,ltq-tapi))
|
|
@ -1,7 +1,8 @@
|
|||
menu "Configuration"
|
||||
depends on PACKAGE_ifx-tapidemo
|
||||
#menu "Configuration"
|
||||
# depends on PACKAGE_ltq-tapidemo
|
||||
choice
|
||||
prompt "board selection"
|
||||
depends on PACKAGE_ltq-tapidemo
|
||||
default VOICE_CPE_TAPIDEMO_BOARD_EASY50712_V3 if TARGET_ifxmips_platform_danube
|
||||
default VOICE_CPE_TAPIDEMO_BOARD_EASY508xx if TARGET_ifxmips_platform_ar9
|
||||
default VOICE_CPE_TAPIDEMO_BOARD_EASY80910 if TARGET_ifxmips_platform_vr9
|
||||
|
@ -24,6 +25,7 @@ endchoice
|
|||
|
||||
config VOICE_CPE_TAPIDEMO_QOS
|
||||
bool "enable QOS support"
|
||||
depends on PACKAGE_ltq-tapidemo
|
||||
default n
|
||||
help
|
||||
Option to enable the KPI2UDP RTP packet acceleration path
|
||||
|
@ -31,9 +33,9 @@ config VOICE_CPE_TAPIDEMO_QOS
|
|||
|
||||
config VOICE_CPE_TAPIDEMO_FAX_T.38_FW
|
||||
bool "enable T.38 fax relay"
|
||||
depends on (TARGET_ifxmips_platform_ar9 || TARGET_ifxmips_platform_vr9)
|
||||
depends on (TARGET_ifxmips_platform_ar9 || TARGET_ifxmips_platform_vr9) && PACKAGE_ltq
|
||||
default n
|
||||
help
|
||||
enable T.38 fax relay demo.
|
||||
|
||||
endmenu
|
||||
#endmenu
|
|
@ -18,21 +18,21 @@ PKG_MD5SUM:=a38a7bf3242aad607f50f57b988bc87c
|
|||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ifx-tapidemo
|
||||
define Package/ltq-tapidemo
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=TAPIdemo application for Lantiq boards
|
||||
URL:=http://www.lantiq.com/
|
||||
MAINTAINER:=Lantiq
|
||||
DEPENDS:=+kmod-ifx-tapi +kmod-ifx-vmmc @BROKEN
|
||||
DEPENDS:=+kmod-ltq-tapi +kmod-ltq-vmmc
|
||||
MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/ifx-tapidemo/description
|
||||
define Package/ltq-tapidemo/description
|
||||
Voice Access mini-PBX Demo Application
|
||||
endef
|
||||
|
||||
define Package/ifx-tapidemo/config
|
||||
define Package/ltq-tapidemo/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
|
@ -59,10 +59,10 @@ ifeq ($(CONFIG_VOICE_CPE_TAPIDEMO_BOARD_EASY80910),y)
|
|||
CONFIGURE_ARGS += --enable-boardname=EASY508XX
|
||||
endif
|
||||
|
||||
define Package/ifx-tapidemo/install
|
||||
define Package/ltq-tapidemo/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tapidemo $(1)/usr/sbin
|
||||
$(INSTALL_BIN) ./files/bringup_tapidemo $(1)/etc/init.d/tapidemo
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ifx-tapidemo))
|
||||
$(eval $(call BuildPackage,ltq-tapidemo))
|
|
@ -1,7 +1,6 @@
|
|||
menu "Configuration"
|
||||
depends on PACKAGE_kmod-ifx-vmmc
|
||||
choice
|
||||
prompt "device selection"
|
||||
depends on PACKAGE_kmod-ltq-vmmc
|
||||
default VOICE_CPE_VMMC_WITH_DEVICE_DANUBE_extract
|
||||
help
|
||||
Select the target device.
|
||||
|
@ -29,6 +28,7 @@ config VOICE_CPE_VMMC_PMC
|
|||
|
||||
config VOICE_CPE_VMMC_DISABLE_DECT_NIBBLE_SWAP
|
||||
bool "Disable DECT nibble swap"
|
||||
depends on PACKAGE_kmod-ltq-vmmc
|
||||
default n
|
||||
help
|
||||
Option to disable DECT nibble swap for COSIC modem (for backward compatibility only).
|
||||
|
@ -36,6 +36,7 @@ config VOICE_CPE_VMMC_DISABLE_DECT_NIBBLE_SWAP
|
|||
config VOICE_CPE_VMMC_EVENT_LOGGER
|
||||
depends on BROKEN
|
||||
bool "Event logger support"
|
||||
depends on PACKAGE_kmod-ltq-vmmc
|
||||
default n
|
||||
help
|
||||
Option to enable details traces between drv_vmmc and the voice FW
|
||||
|
@ -44,10 +45,10 @@ config VOICE_CPE_VMMC_EVENT_LOGGER
|
|||
|
||||
config VOICE_CPE_VMMC_MPS_HISTORY_SIZE
|
||||
int "MPS history buffer in words (0<=size<=512)"
|
||||
depends on PACKAGE_kmod-ltq-vmmc
|
||||
default "128"
|
||||
help
|
||||
MPS history buffer (default=128 words, maximum=512 words, 0=disable)
|
||||
To opimize the memory footprint in RAM, you might want to set the
|
||||
buffer size to 0.
|
||||
|
||||
endmenu
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2008-2010 OpenWrt.org
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
@ -9,33 +9,30 @@ include $(TOPDIR)/rules.mk
|
|||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=drv_vmmc
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_VERSION:=1.9.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_MD5SUM:=3f1b44e79408a3320aa9f8b21a260fd0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_MD5SUM:=d8eee8cba0edb28974cc1f8532e3bd18
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
|
||||
PATCH_DIR ?= ./patches$(if $(wildcard ./patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/ifx-vmmc
|
||||
define KernelPackage/ltq-vmmc
|
||||
SUBMENU:=Voice over IP
|
||||
TITLE:=TAPI LL driver for Voice Macro
|
||||
URL:=http://www.lantiq.com/
|
||||
MAINTAINER:=Lantiq
|
||||
DEPENDS:=+kmod-ifx-tapi @BROKEN
|
||||
DEPENDS:=+kmod-ltq-tapi @TARGET_lantiq
|
||||
FILES:=$(PKG_BUILD_DIR)/src/drv_vmmc.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,drv_vmmc)
|
||||
MENU:=1
|
||||
MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||
endef
|
||||
|
||||
define KernelPackage/ifx-vmmc/description
|
||||
define KernelPackage/ltq-vmmc/description
|
||||
Voice Subsystem Low Level Driver for Danube, AR9, VR9 device families
|
||||
endef
|
||||
|
||||
define KernelPackage/ifx-vmmc/config
|
||||
define KernelPackage/ltq-vmmc/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
|
@ -151,11 +148,11 @@ define Build/InstallDev
|
|||
(cd $(1)/usr/include/drv_vmmc && ln -snf . include)
|
||||
endef
|
||||
|
||||
define KernelPackage/ifx-vmmc/install
|
||||
define KernelPackage/ltq-vmmc/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/$(FW_DIR)
|
||||
$(INSTALL_BIN) ./files/vmmc.init $(1)/etc/init.d/vmmc
|
||||
$(CP) $(PKG_BUILD_DIR)/firmware/$(FW_SOURCE) $(1)/$(FW_DIR)/$(FW_TARGET)
|
||||
$(CP) $(PKG_BUILD_DIR)/coef/$(COEF_TARGET) $(1)/$(FW_DIR)/$(COEF_TARGET)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ifx-vmmc))
|
||||
$(eval $(call KernelPackage,ltq-vmmc))
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -227,7 +227,7 @@ drv_vmmc_CFLAGS += -fno-common
|
||||
@@ -228,7 +228,7 @@
|
||||
drv_vmmc_OBJS = "$(subst .c,.o, $(drv_vmmc_SOURCES) $(nodist_drv_vmmc_SOURCES))"
|
||||
|
||||
drv_vmmc.ko: $(drv_vmmc_SOURCES) $(EXTRA_DIST)
|
||||
|
@ -9,7 +9,7 @@
|
|||
@for f in $(drv_vmmc_SOURCES) $(nodist_drv_vmmc_SOURCES) ; do \
|
||||
if test ! -e $(PWD)/$$f; then \
|
||||
echo " LN $$f" ; \
|
||||
@@ -235,10 +235,10 @@ drv_vmmc.ko: $(drv_vmmc_SOURCES) $(EXTRA
|
||||
@@ -236,10 +236,10 @@
|
||||
ln -s @abs_srcdir@/$$f $(PWD)/$$f; \
|
||||
fi; \
|
||||
done;
|
||||
|
@ -84,7 +84,7 @@
|
|||
#include "ifx_types.h"
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -112,7 +112,7 @@ dnl Set kernel build path
|
||||
@@ -112,7 +112,7 @@
|
||||
AC_ARG_ENABLE(kernelbuild,
|
||||
AS_HELP_STRING(--enable-kernelbuild=x,Set the target kernel build path),
|
||||
[
|
|
@ -13,7 +13,7 @@
|
|||
/* ============================= */
|
||||
--- a/src/drv_vmmc_bbd.c
|
||||
+++ b/src/drv_vmmc_bbd.c
|
||||
@@ -939,7 +939,11 @@ static IFX_int32_t vmmc_BBD_DownloadChCr
|
||||
@@ -1072,7 +1072,11 @@
|
||||
IFX_uint8_t padBytes = 0;
|
||||
#endif
|
||||
IFX_uint16_t cram_offset, cram_crc,
|
||||
|
@ -28,59 +28,13 @@
|
|||
cpb2w (&cram_offset, &bbd_cram->pData[0], sizeof (IFX_uint16_t));
|
||||
--- a/src/drv_vmmc_danube.h
|
||||
+++ b/src/drv_vmmc_danube.h
|
||||
@@ -15,12 +15,59 @@
|
||||
@@ -15,56 +15,18 @@
|
||||
*/
|
||||
|
||||
#if defined SYSTEM_DANUBE
|
||||
-#include <asm/ifx/ifx_gpio.h>
|
||||
+# if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips_gpio.h>
|
||||
+#include <xway/xway.h>
|
||||
+
|
||||
+# define IFX_GPIO_PIN_NUMBER_PER_PORT 16
|
||||
+# define IFX_GPIO_PIN_ID(port, pin) ((port) \
|
||||
+ * IFX_GPIO_PIN_NUMBER_PER_PORT \
|
||||
+ + (pin))
|
||||
+# define IFX_GPIO_PIN_ID_TO_PORT(pin_id) (pin_id >> 4)
|
||||
+# define IFX_GPIO_PIN_ID_TO_PIN(pin_id) (pin_id & 0x0F)
|
||||
+
|
||||
+# define IFX_GPIO_MODULE_TAPI_VMMC 0 /* not used */
|
||||
+
|
||||
+# define ifx_gpio_pin_reserve(a,b) 0 /* obsolete */
|
||||
+
|
||||
+# define ifx_gpio_open_drain_set(a,b) ifxmips_port_set_open_drain( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel0_set(a,b) ifxmips_port_set_altsel0( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel1_set(a,b) ifxmips_port_set_altsel1( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel0_clear(a,b) ifxmips_port_clear_altsel0( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_altsel1_clear(a,b) ifxmips_port_clear_altsel1( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_dir_in_set(a,b) ifxmips_port_set_dir_in( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_dir_out_set(a,b) ifxmips_port_set_dir_out( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+
|
||||
+# define ifx_gpio_pin_free(a,b) ifxmips_port_free_pin( \
|
||||
+ IFX_GPIO_PIN_ID_TO_PORT(a), \
|
||||
+ IFX_GPIO_PIN_ID_TO_PIN(a))
|
||||
+# else
|
||||
+# include <asm/ifx/ifx_gpio.h>
|
||||
+# endif
|
||||
#else
|
||||
#error no system selected
|
||||
#endif
|
||||
|
@ -90,11 +44,67 @@
|
|||
/**
|
||||
|
||||
*/
|
||||
#define VMMC_PCM_IF_CFG_HOOK(mode, GPIOreserved, ret) \
|
||||
do { \
|
||||
- ret = VMMC_statusOk; \
|
||||
- /* Reserve P0.0 as TDM/FSC */ \
|
||||
- if (!GPIOreserved) \
|
||||
- ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel0_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel1_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_open_drain_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID);\
|
||||
- \
|
||||
- /* Reserve P1.9 as TDM/DO */ \
|
||||
- if (!GPIOreserved) \
|
||||
- ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel0_set(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel1_clear(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_dir_out_set(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_open_drain_set(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- \
|
||||
- /* Reserve P1.10 as TDM/DI */ \
|
||||
- if (!GPIOreserved) \
|
||||
- ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel0_clear(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel1_set(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID);\
|
||||
- ret |= ifx_gpio_dir_in_set(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- \
|
||||
- /* Reserve P1.11 as TDM/DCL */ \
|
||||
- if (!GPIOreserved) \
|
||||
- ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel0_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_altsel1_clear(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_open_drain_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- \
|
||||
- if (mode == 2) { \
|
||||
- /* TDM/FSC+DCL Master */ \
|
||||
- ret |= ifx_gpio_dir_out_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_dir_out_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- } else { \
|
||||
- /* TDM/FSC+DCL Slave */ \
|
||||
- ret |= ifx_gpio_dir_in_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_dir_in_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- } \
|
||||
} while(0);
|
||||
|
||||
/**
|
||||
@@ -72,11 +34,6 @@
|
||||
*/
|
||||
#define VMMC_DRIVER_UNLOAD_HOOK(ret) \
|
||||
do { \
|
||||
- ret = VMMC_statusOk; \
|
||||
- ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
- ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
|
||||
} while (0)
|
||||
|
||||
#endif /* _DRV_VMMC_AMAZON_S_H */
|
||||
--- a/src/drv_vmmc_init.c
|
||||
+++ b/src/drv_vmmc_init.c
|
||||
@@ -48,6 +48,14 @@
|
||||
#include "drv_vmmc_pmc.h"
|
||||
#endif /* PMC_SUPPORTED */
|
||||
@@ -52,6 +52,14 @@
|
||||
#include "ifx_pmu.h"
|
||||
#endif /* PMU_SUPPORTED */
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
|
||||
|
@ -123,21 +133,29 @@
|
|||
/* ============================= */
|
||||
--- a/src/mps/drv_mps_vmmc_common.c
|
||||
+++ b/src/mps/drv_mps_vmmc_common.c
|
||||
@@ -35,8 +35,35 @@
|
||||
@@ -17,6 +17,7 @@
|
||||
/* Includes */
|
||||
/* ============================= */
|
||||
#include "drv_config.h"
|
||||
+#include "drv_vmmc_init.h"
|
||||
|
||||
#undef USE_PLAIN_VOICE_FIRMWARE
|
||||
#undef PRINT_ON_ERR_INTERRUPT
|
||||
@@ -35,8 +36,35 @@
|
||||
#include "ifxos_interrupt.h"
|
||||
#include "ifxos_time.h"
|
||||
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx/ifx_gptu.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_gptu.h>
|
||||
+# include <lantiq.h>
|
||||
+# include <irq.h>
|
||||
+# include <lantiq_timer.h>
|
||||
+
|
||||
+# define ifx_gptu_timer_request ifxmips_request_timer
|
||||
+# define ifx_gptu_timer_start ifxmips_start_timer
|
||||
+# define ifx_gptu_countvalue_get ifxmips_get_count_value
|
||||
+# define ifx_gptu_timer_free ifxmips_free_timer
|
||||
+# define ifx_gptu_timer_request lq_request_timer
|
||||
+# define ifx_gptu_timer_start lq_start_timer
|
||||
+# define ifx_gptu_countvalue_get lq_get_count_value
|
||||
+# define ifx_gptu_timer_free lq_free_timer
|
||||
+
|
||||
+# define IFX_MPS_SRAM IFXMIPS_MPS_SRAM
|
||||
+# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR
|
||||
|
@ -153,7 +171,7 @@
|
|||
+
|
||||
+# define INT_NUM_IM4_IRL14 (INT_NUM_IM4_IRL0 + 14)
|
||||
+
|
||||
+# define bsp_mask_and_ack_irq ifxmips_mask_and_ack_irq
|
||||
+# define bsp_mask_and_ack_irq lq_mask_and_ack_irq
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx/ifx_gptu.h>
|
||||
|
@ -161,7 +179,7 @@
|
|||
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_dbg.h"
|
||||
@@ -193,7 +220,8 @@ IFX_boolean_t ifx_mps_ext_bufman ()
|
||||
@@ -201,7 +229,8 @@
|
||||
*/
|
||||
IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority)
|
||||
{
|
||||
|
@ -171,21 +189,7 @@
|
|||
IFX_int32_t index = fastbuf_index;
|
||||
|
||||
if (fastbuf_initialized == 0)
|
||||
@@ -219,11 +247,11 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_
|
||||
if ((volatile IFX_uint32_t) fastbuf_pool[index] & FASTBUF_USED)
|
||||
continue;
|
||||
ptr = fastbuf_pool[index];
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] |= FASTBUF_USED;
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] | FASTBUF_USED;
|
||||
if ((priority == FASTBUF_FW_OWNED) || (priority == FASTBUF_CMD_OWNED) ||
|
||||
(priority == FASTBUF_EVENT_OWNED) ||
|
||||
(priority == FASTBUF_WRITE_OWNED))
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] |= priority;
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] | priority;
|
||||
fastbuf_index = index;
|
||||
IFXOS_UNLOCKINT (flags);
|
||||
return (IFX_void_t *) ptr;
|
||||
@@ -247,7 +275,7 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_
|
||||
@@ -255,7 +284,7 @@
|
||||
*/
|
||||
IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr)
|
||||
{
|
||||
|
@ -194,19 +198,7 @@
|
|||
IFX_int32_t index = fastbuf_index;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -261,8 +289,9 @@ IFX_void_t ifx_mps_fastbuf_free (const I
|
||||
FASTBUF_EVENT_OWNED | FASTBUF_WRITE_OWNED))
|
||||
== ((IFX_uint32_t) ptr | FASTBUF_USED))
|
||||
{
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] &= ~FASTBUF_USED;
|
||||
- (volatile IFX_uint32_t) fastbuf_pool[index] &=
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] & ~FASTBUF_USED;
|
||||
+
|
||||
+ fastbuf_pool[index] = (volatile IFX_uint32_t) fastbuf_pool[index] &
|
||||
~(FASTBUF_FW_OWNED | FASTBUF_CMD_OWNED | FASTBUF_EVENT_OWNED |
|
||||
FASTBUF_WRITE_OWNED);
|
||||
IFXOS_UNLOCKINT (flags);
|
||||
@@ -444,7 +473,7 @@ static mps_buffer_state_e ifx_mps_bufman
|
||||
@@ -451,7 +480,7 @@
|
||||
*/
|
||||
static IFX_int32_t ifx_mps_bufman_inc_level (IFX_uint32_t value)
|
||||
{
|
||||
|
@ -215,7 +207,7 @@
|
|||
|
||||
if (mps_buffer.buf_level + value > MPS_BUFFER_MAX_LEVEL)
|
||||
{
|
||||
@@ -471,7 +500,7 @@ static IFX_int32_t ifx_mps_bufman_inc_le
|
||||
@@ -478,7 +507,7 @@
|
||||
*/
|
||||
static IFX_int32_t ifx_mps_bufman_dec_level (IFX_uint32_t value)
|
||||
{
|
||||
|
@ -224,7 +216,7 @@
|
|||
|
||||
if (mps_buffer.buf_level < value)
|
||||
{
|
||||
@@ -932,7 +961,7 @@ IFX_int32_t ifx_mps_common_open (mps_com
|
||||
@@ -946,7 +975,7 @@
|
||||
mps_mbx_dev * pMBDev, IFX_int32_t bcommand,
|
||||
IFX_boolean_t from_kernel)
|
||||
{
|
||||
|
@ -233,7 +225,7 @@
|
|||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -1048,7 +1077,7 @@ IFX_int32_t ifx_mps_common_close (mps_mb
|
||||
@@ -1062,7 +1091,7 @@
|
||||
IFX_void_t ifx_mps_release_structures (mps_comm_dev * pDev)
|
||||
{
|
||||
IFX_int32_t count;
|
||||
|
@ -242,7 +234,7 @@
|
|||
|
||||
IFXOS_LOCKINT (flags);
|
||||
IFXOS_BlockFree (pFW_img_data);
|
||||
@@ -1544,7 +1573,7 @@ IFX_int32_t ifx_mps_mbx_read_message (mp
|
||||
@@ -1558,7 +1587,7 @@
|
||||
IFX_uint32_t * bytes)
|
||||
{
|
||||
IFX_int32_t i, ret;
|
||||
|
@ -251,7 +243,7 @@
|
|||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -1751,7 +1780,7 @@ IFX_int32_t ifx_mps_mbx_write_message (m
|
||||
@@ -1768,7 +1797,7 @@
|
||||
{
|
||||
mps_fifo *mbx;
|
||||
IFX_uint32_t i;
|
||||
|
@ -260,7 +252,7 @@
|
|||
IFX_int32_t retval = -EAGAIN;
|
||||
IFX_int32_t retries = 0;
|
||||
IFX_uint32_t word = 0;
|
||||
@@ -2138,6 +2167,7 @@ IFX_int32_t ifx_mps_mbx_write_cmd (mps_m
|
||||
@@ -2163,6 +2192,7 @@
|
||||
TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
("%s(): Invalid device ID %d !\n", __FUNCTION__, pMBDev->devID));
|
||||
}
|
||||
|
@ -268,7 +260,7 @@
|
|||
return retval;
|
||||
}
|
||||
|
||||
@@ -2161,7 +2191,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2186,7 +2216,7 @@
|
||||
mps_mbx_dev *mbx_dev;
|
||||
MbxMsg_s msg;
|
||||
IFX_uint32_t bytes_read = 0;
|
||||
|
@ -277,7 +269,7 @@
|
|||
IFX_int32_t ret;
|
||||
|
||||
/* set pointer to data upstream mailbox, no matter if 0,1,2 or 3 because
|
||||
@@ -2252,7 +2282,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2277,7 +2307,7 @@
|
||||
{
|
||||
ifx_mps_bufman_dec_level (1);
|
||||
if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
|
||||
|
@ -286,7 +278,7 @@
|
|||
{
|
||||
IFXOS_LockRelease (pMPSDev->provide_buffer);
|
||||
}
|
||||
@@ -2295,7 +2325,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2320,7 +2350,7 @@
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
ifx_mps_bufman_dec_level (1);
|
||||
if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
|
||||
|
@ -295,7 +287,7 @@
|
|||
{
|
||||
IFXOS_LockRelease (pMPSDev->provide_buffer);
|
||||
}
|
||||
@@ -2325,7 +2355,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2350,7 +2380,7 @@
|
||||
IFX_void_t ifx_mps_mbx_cmd_upstream (IFX_ulong_t dummy)
|
||||
{
|
||||
mps_fifo *mbx;
|
||||
|
@ -304,7 +296,7 @@
|
|||
|
||||
/* set pointer to upstream command mailbox */
|
||||
mbx = &(pMPSDev->cmd_upstrm_fifo);
|
||||
@@ -2373,7 +2403,7 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
|
||||
@@ -2398,7 +2428,7 @@
|
||||
mps_event_msg msg;
|
||||
IFX_int32_t length = 0;
|
||||
IFX_int32_t read_length = 0;
|
||||
|
@ -313,7 +305,7 @@
|
|||
|
||||
/* set pointer to upstream event mailbox */
|
||||
mbx = &(pMPSDev->event_upstrm_fifo);
|
||||
@@ -2616,7 +2646,7 @@ IFX_void_t ifx_mps_disable_mailbox_int (
|
||||
@@ -2641,7 +2671,7 @@
|
||||
*/
|
||||
IFX_void_t ifx_mps_dd_mbx_int_enable (IFX_void_t)
|
||||
{
|
||||
|
@ -322,7 +314,7 @@
|
|||
MPS_Ad0Reg_u Ad0Reg;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -2642,7 +2672,7 @@ IFX_void_t ifx_mps_dd_mbx_int_enable (IF
|
||||
@@ -2667,7 +2697,7 @@
|
||||
*/
|
||||
IFX_void_t ifx_mps_dd_mbx_int_disable (IFX_void_t)
|
||||
{
|
||||
|
@ -331,7 +323,7 @@
|
|||
MPS_Ad0Reg_u Ad0Reg;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -2769,6 +2799,7 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
@@ -2794,6 +2824,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -339,7 +331,7 @@
|
|||
if (MPS_Ad0StatusReg.fld.du_mbx)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
@@ -3062,7 +3093,8 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_
|
||||
@@ -3087,7 +3118,8 @@
|
||||
*/
|
||||
IFX_return_t ifx_mps_init_gpt ()
|
||||
{
|
||||
|
@ -351,7 +343,7 @@
|
|||
timer = TIMER1A;
|
||||
--- a/src/mps/drv_mps_vmmc_danube.c
|
||||
+++ b/src/mps/drv_mps_vmmc_danube.c
|
||||
@@ -32,9 +32,20 @@
|
||||
@@ -32,9 +32,21 @@
|
||||
#include "ifxos_select.h"
|
||||
#include "ifxos_interrupt.h"
|
||||
|
||||
|
@ -359,14 +351,15 @@
|
|||
-#include <asm/ifx/ifx_gpio.h>
|
||||
-#include <asm/ifx/common_routines.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_gptu.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_prom.h>
|
||||
+# include <lantiq.h>
|
||||
+# include <irq.h>
|
||||
+# include <lantiq_timer.h>
|
||||
+# include <linux/dma-mapping.h>
|
||||
+
|
||||
+# define IFX_RCU_RST_REQ IFXMIPS_RCU_RST
|
||||
+# define IFX_RCU_RST_REQ_CPU1 IFXMIPS_RCU_RST_CPU1
|
||||
+
|
||||
+# define LQ_RCU_RST ((u32 *)(LQ_RCU_BASE_ADDR + 0x0010))
|
||||
+#define IFX_RCU_RST_REQ_CPU1 (1 << 3)
|
||||
+# define IFX_RCU_RST_REQ LQ_RCU_RST
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx_vpe.h>
|
||||
|
@ -375,7 +368,7 @@
|
|||
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_dbg.h"
|
||||
@@ -72,6 +71,23 @@ volatile IFX_uint32_t *danube_cp1_base;
|
||||
@@ -71,6 +83,20 @@
|
||||
/* Local function definition */
|
||||
/* ============================= */
|
||||
|
||||
|
@ -385,21 +378,18 @@
|
|||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+unsigned int *lq_get_cp1_base(void);
|
||||
+
|
||||
+IFX_uint32_t *ifx_get_cp1_base(IFX_void_t)
|
||||
+{
|
||||
+ if (!danube_cp1_base) {
|
||||
+ dma_addr_t dma;
|
||||
+ danube_cp1_base = dma_alloc_coherent(NULL, ifx_get_cp1_size()<<20, &dma, GFP_ATOMIC);
|
||||
+ }
|
||||
+
|
||||
+ return (IFX_uint32_t*)danube_cp1_base;
|
||||
+ return lq_get_cp1_base();
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/******************************************************************************
|
||||
* DANUBE Specific Routines
|
||||
******************************************************************************/
|
||||
@@ -119,6 +132,15 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
@@ -130,6 +156,15 @@
|
||||
}
|
||||
|
||||
/* check if FW image fits in available memory space */
|
||||
|
@ -415,7 +405,7 @@
|
|||
if (mem > ifx_get_cp1_size())
|
||||
{
|
||||
TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
@@ -126,6 +148,7 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
@@ -137,6 +172,7 @@
|
||||
__FILE__, __func__, __LINE__, mem, ifx_get_cp1_size()));
|
||||
return IFX_ERROR;
|
||||
}
|
||||
|
@ -423,7 +413,7 @@
|
|||
|
||||
/* reset the driver */
|
||||
ifx_mps_reset ();
|
||||
@@ -337,7 +360,7 @@ IFX_void_t ifx_mps_release (IFX_void_t)
|
||||
@@ -357,7 +393,7 @@
|
||||
*/
|
||||
IFX_void_t ifx_mps_wdog_expiry()
|
||||
{
|
||||
|
@ -441,9 +431,9 @@
|
|||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx_vpe.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_gpio.h>
|
||||
+# include <lantiq.h>
|
||||
+# include <irq.h>
|
||||
+# include <xway/xway.h>
|
||||
+# include <gpio.h>
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
|
@ -454,7 +444,7 @@
|
|||
/* MPS Common defines */
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -40,10 +40,26 @@
|
||||
@@ -40,10 +40,28 @@
|
||||
#include <linux/moduleparam.h>
|
||||
#endif /* */
|
||||
|
||||
|
@ -463,8 +453,9 @@
|
|||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx_vpe.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <asm/mach-ifxmips/ifxmips.h>
|
||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||
+#include "drv_vmmc_init.h"
|
||||
+# include <lantiq.h>
|
||||
+# include <irq.h>
|
||||
+
|
||||
+# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR
|
||||
+# define IFX_MPS_AD1ENR IFXMIPS_MPS_AD1ENR
|
||||
|
@ -476,7 +467,8 @@
|
|||
+# define INT_NUM_IM4_IRL14 (INT_NUM_IM4_IRL0 + 14)
|
||||
+# define INT_NUM_IM4_IRL18 (INT_NUM_IM4_IRL0 + 18)
|
||||
+# define INT_NUM_IM4_IRL19 (INT_NUM_IM4_IRL0 + 19)
|
||||
+# define IFX_ICU_IM4_IER IFXMIPS_ICU_IM4_IER
|
||||
+#define LQ_ICU_BASE_ADDR (KSEG1 | 0x1F880200)
|
||||
+# define IFX_ICU_IM4_IER (LQ_ICU_BASE_ADDR + 0x00A8)
|
||||
+#else
|
||||
+# include <asm/ifx/irq.h>
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
|
@ -485,16 +477,16 @@
|
|||
|
||||
/* lib_ifxos headers */
|
||||
#include "ifx_types.h"
|
||||
@@ -914,7 +930,7 @@ IFX_int32_t ifx_mps_ioctl (struct inode
|
||||
@@ -915,7 +933,7 @@
|
||||
#endif /* MPS_FIFO_BLOCKING_WRITE */
|
||||
case FIO_MPS_GET_STATUS:
|
||||
{
|
||||
- IFX_uint32_t flags;
|
||||
+ unsigned long flags;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -949,7 +965,7 @@ IFX_int32_t ifx_mps_ioctl (struct inode
|
||||
/* get the status of the channel */
|
||||
if (!from_kernel)
|
||||
@@ -949,7 +967,7 @@
|
||||
#if CONFIG_MPS_HISTORY_SIZE > 0
|
||||
case FIO_MPS_GET_CMD_HISTORY:
|
||||
{
|
||||
|
@ -503,7 +495,7 @@
|
|||
|
||||
if (from_kernel)
|
||||
{
|
||||
@@ -1637,6 +1653,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX
|
||||
@@ -1641,6 +1659,7 @@
|
||||
sprintf (buf + len, " minLv: \t %8d\n",
|
||||
ifx_mps_dev.voice_mb[i].upstrm_fifo->min_space);
|
||||
}
|
||||
|
@ -511,3 +503,57 @@
|
|||
return len;
|
||||
}
|
||||
|
||||
--- a/src/drv_vmmc_init.h
|
||||
+++ b/src/drv_vmmc_init.h
|
||||
@@ -53,4 +53,41 @@
|
||||
extern IFX_int32_t VMMC_DeviceDriverStart(IFX_void_t);
|
||||
extern IFX_void_t VMMC_DeviceDriverStop(IFX_void_t);
|
||||
|
||||
+
|
||||
+#define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1F107000)
|
||||
+#define IFXMIPS_MPS_SRAM ((u32 *)(KSEG1 + 0x1F200000))
|
||||
+
|
||||
+#define IFXMIPS_MPS_CHIPID ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344))
|
||||
+#define IFXMIPS_MPS_VC0ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0000))
|
||||
+#define IFXMIPS_MPS_VC1ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0004))
|
||||
+#define IFXMIPS_MPS_VC2ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0008))
|
||||
+#define IFXMIPS_MPS_VC3ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x000C))
|
||||
+#define IFXMIPS_MPS_RVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0010))
|
||||
+#define IFXMIPS_MPS_RVC1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0014))
|
||||
+#define IFXMIPS_MPS_RVC2SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0018))
|
||||
+#define IFXMIPS_MPS_RVC3SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x001C))
|
||||
+#define IFXMIPS_MPS_SVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0020))
|
||||
+#define IFXMIPS_MPS_SVC1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0024))
|
||||
+#define IFXMIPS_MPS_SVC2SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0028))
|
||||
+#define IFXMIPS_MPS_SVC3SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x002C))
|
||||
+#define IFXMIPS_MPS_CVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0030))
|
||||
+#define IFXMIPS_MPS_CVC1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0034))
|
||||
+#define IFXMIPS_MPS_CVC2SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0038))
|
||||
+#define IFXMIPS_MPS_CVC3SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x003C))
|
||||
+#define IFXMIPS_MPS_RAD0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0040))
|
||||
+#define IFXMIPS_MPS_RAD1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0044))
|
||||
+#define IFXMIPS_MPS_SAD0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0048))
|
||||
+#define IFXMIPS_MPS_SAD1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x004C))
|
||||
+#define IFXMIPS_MPS_CAD0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0050))
|
||||
+#define IFXMIPS_MPS_CAD1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0054))
|
||||
+#define IFXMIPS_MPS_AD0ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0058))
|
||||
+#define IFXMIPS_MPS_AD1ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x005C))
|
||||
+
|
||||
+#define IFXMIPS_MPS_CHIPID_VERSION_GET(value) (((value) >> 28) & ((1 << 4) - 1))
|
||||
+#define IFXMIPS_MPS_CHIPID_VERSION_SET(value) ((((1 << 4) - 1) & (value)) << 28)
|
||||
+#define IFXMIPS_MPS_CHIPID_PARTNUM_GET(value) (((value) >> 12) & ((1 << 16) - 1))
|
||||
+#define IFXMIPS_MPS_CHIPID_PARTNUM_SET(value) ((((1 << 16) - 1) & (value)) << 12)
|
||||
+#define IFXMIPS_MPS_CHIPID_MANID_GET(value) (((value) >> 1) & ((1 << 10) - 1))
|
||||
+#define IFXMIPS_MPS_CHIPID_MANID_SET(value) ((((1 << 10) - 1) & (value)) << 1)
|
||||
+
|
||||
#endif /* _DRV_VMMC_INIT_H */
|
||||
--- a/src/drv_vmmc_ioctl.c
|
||||
+++ b/src/drv_vmmc_ioctl.c
|
||||
@@ -18,6 +18,7 @@
|
||||
/* Includes */
|
||||
/* ============================= */
|
||||
#include "drv_api.h"
|
||||
+#include "drv_vmmc_init.h"
|
||||
#include "drv_vmmc_api.h"
|
||||
#include "drv_vmmc_bbd.h"
|
||||
|
Loading…
Reference in a new issue