1 --- a/src/drv_vmmc_init.c
2 +++ b/src/drv_vmmc_init.c
4 dwld.fwDwld.length = IoInit.pram_size;
6 /* download firmware */
7 - ret = ifx_mps_ioctl((IFX_void_t *) command, IFX_NULL, FIO_MPS_DOWNLOAD,
8 + ret = ifx_mps_ioctl((IFX_void_t *) command, FIO_MPS_DOWNLOAD,
9 (IFX_uint32_t) &dwld.fwDwld);
13 #ifdef VMMC_DRIVER_UNLOAD_HOOK
14 if (VDevices[0].nDevState & DS_GPIO_RESERVED)
17 + IFX_int32_t ret = 0;
18 VMMC_DRIVER_UNLOAD_HOOK(ret);
19 if (!VMMC_SUCCESS(ret))
21 --- a/src/mps/drv_mps_vmmc_linux.c
22 +++ b/src/mps/drv_mps_vmmc_linux.c
25 IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p);
26 IFX_int32_t ifx_mps_close (struct inode *inode, struct file *file_p);
27 -IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
28 +long ifx_mps_ioctl (struct file *file_p,
29 IFX_uint32_t nCmd, IFX_ulong_t arg);
30 IFX_int32_t ifx_mps_read_mailbox (mps_devices type, mps_message * rw);
31 IFX_int32_t ifx_mps_write_mailbox (mps_devices type, mps_message * rw);
33 static struct file_operations ifx_mps_fops = {
36 - ioctl:ifx_mps_ioctl,
37 + unlocked_ioctl:ifx_mps_ioctl,
42 * \return -ENOIOCTLCMD Invalid command
45 -IFX_int32_t ifx_mps_ioctl (struct inode * inode, struct file * file_p,
46 +long ifx_mps_ioctl (struct file *file_p,
47 IFX_uint32_t nCmd, IFX_ulong_t arg)
49 IFX_int32_t retvalue = -EINVAL;
51 'mps_devices' enum type, which in fact is [0..8]; So, if inode value is
52 [0..NUM_VOICE_CHANNEL+1], then we make sure that we are calling from
54 - if (((IFX_int32_t) inode >= 0) &&
55 - ((IFX_int32_t) inode < NUM_VOICE_CHANNEL + 1))
56 + if (((IFX_int32_t) file_p >= 0) &&
57 + ((IFX_int32_t) file_p < NUM_VOICE_CHANNEL + 1))
61 /* Get corresponding mailbox device structure */
63 - ifx_mps_get_device ((mps_devices) ((IFX_int32_t) inode))) == 0)
64 + ifx_mps_get_device ((mps_devices) ((IFX_int32_t) file_p))) == 0)
72 --- a/src/drv_vmmc_ioctl.c
73 +++ b/src/drv_vmmc_ioctl.c
75 /* MPS driver will do the USR2KERN so just pass on the pointer. */
76 dwnld_struct.data = (IFX_void_t *)IoInit.pPRAMfw;
78 - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL,
79 + ret = ifx_mps_ioctl((IFX_void_t *)command,
80 FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct);
85 - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESET, 0);
86 + ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESET, 0);
91 - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESTART, 0);
92 + ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESTART, 0);
96 --- a/src/mps/drv_mps_vmmc.h
97 +++ b/src/mps/drv_mps_vmmc.h
100 IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p);
101 IFX_int32_t ifx_mps_close (struct inode *inode, struct file *filp);
102 -IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
103 +long ifx_mps_ioctl (struct file *filp,
104 IFX_uint32_t nCmd, unsigned long arg);
105 IFX_int32_t ifx_mps_register_data_callback (mps_devices type, IFX_uint32_t dir,
106 IFX_void_t (*callback) (mps_devices
107 --- a/src/drv_vmmc_linux.c
108 +++ b/src/drv_vmmc_linux.c
111 #include <linux/version.h>
113 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
114 +#include <linux/utsrelease.h>
116 #include <generated/utsrelease.h>
118 #endif /* UTC_RELEASE */
119 #undef CONFIG_DEVFS_FS
120 #endif /* LINUX_2_6 */
121 --- a/src/mps/drv_mps_vmmc_common.c
122 +++ b/src/mps/drv_mps_vmmc_common.c
124 #undef USE_PLAIN_VOICE_FIRMWARE
125 #undef PRINT_ON_ERR_INTERRUPT
126 #undef FAIL_ON_ERR_INTERRUPT
127 -#include <generated/autoconf.h>
128 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
129 +#include <linux/utsrelease.h>
131 +#include <generated/utsrelease.h>
133 #include <linux/interrupt.h>
134 #include <linux/delay.h>
137 # define ifx_gptu_timer_free lq_free_timer
140 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
141 # define bsp_mask_and_ack_irq ltq_mask_and_ack_irq
143 +extern void ltq_mask_and_ack_irq(struct irq_data *d);
144 +static void inline bsp_mask_and_ack_irq(int x)
148 + ltq_mask_and_ack_irq(&d);
153 # include <asm/ifx/ifx_regs.h>
154 # include <asm/ifx/ifx_gptu.h>
157 extern mps_mbx_dev *ifx_mps_get_device (mps_devices type);
160 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
161 extern IFX_void_t bsp_mask_and_ack_irq (IFX_uint32_t irq_nr);
165 extern IFX_void_t mask_and_ack_danube_irq (IFX_uint32_t irq_nr);
166 --- a/src/mps/drv_mps_vmmc_danube.c
167 +++ b/src/mps/drv_mps_vmmc_danube.c
169 /* ============================= */
171 /* ============================= */
172 +#include "linux/version.h"
173 #include "drv_config.h"
175 #ifdef SYSTEM_DANUBE /* defined in drv_mps_vmmc_config.h */
177 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
178 +#include <linux/autoconf.h>
180 #include <generated/autoconf.h>
183 /* lib_ifxos headers */
184 #include "ifx_types.h"
186 # include <linux/dma-mapping.h>
189 +#define LQ_RCU_BASE_ADDR (KSEG1 + LTQ_RCU_BASE_ADDR)
190 # define LQ_RCU_RST ((u32 *)(LQ_RCU_BASE_ADDR + 0x0010))
191 #define IFX_RCU_RST_REQ_CPU1 (1 << 3)
192 # define IFX_RCU_RST_REQ LQ_RCU_RST