200-mei_compat.patch 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. Index: drv_dsl_cpe_api-3.24.4.4/src/mei/ifxmips_mei.c
  2. ===================================================================
  3. --- drv_dsl_cpe_api-3.24.4.4.orig/src/mei/ifxmips_mei.c 2009-10-31 23:30:20.000000000 +0100
  4. +++ drv_dsl_cpe_api-3.24.4.4/src/mei/ifxmips_mei.c 2009-11-01 04:41:58.000000000 +0100
  5. @@ -41,18 +41,19 @@
  6. #include <linux/init.h>
  7. #include <linux/ioport.h>
  8. #include <linux/delay.h>
  9. +#include <linux/device.h>
  10. #include <asm/uaccess.h>
  11. #include <asm/hardirq.h>
  12. -#include <asm/ifx/ifx_regs.h>
  13. -#include <asm/ifx/irq.h>
  14. -#include <asm/ifx/ifx_gpio.h>
  15. -//#include <asm/ifx/ifx_led.h>
  16. -#include <asm/ifx/ifx_pmu.h>
  17. -#include <asm/ifx/ifx_atm.h>
  18. +
  19. +#include <ifxmips.h>
  20. +#include <ifxmips_irq.h>
  21. +#include <ifxmips_gpio.h>
  22. +#include <ifxmips_pmu.h>
  23. +#include "ifxmips_atm.h"
  24. #define IFX_MEI_BSP
  25. #include "ifxmips_mei_interface.h"
  26. -#define IFXMIPS_RCU_RST IFX_RCU_RST_REQ
  27. +/*#define IFXMIPS_RCU_RST IFX_RCU_RST_REQ
  28. #define IFXMIPS_RCU_RST_REQ_ARC_JTAG IFX_RCU_RST_REQ_ARC_JTAG
  29. #define IFXMIPS_RCU_RST_REQ_DFE IFX_RCU_RST_REQ_DFE
  30. #define IFXMIPS_RCU_RST_REQ_AFE IFX_RCU_RST_REQ_AFE
  31. @@ -76,7 +77,7 @@
  32. #define ifxmips_r32(reg) __raw_readl(reg)
  33. #define ifxmips_w32(val, reg) __raw_writel(val, reg)
  34. #define ifxmips_w32_mask(clear, set, reg) ifxmips_w32((ifxmips_r32(reg) & ~clear) | set, reg)
  35. -
  36. +*/
  37. #define IFX_MEI_EMSG(fmt, args...) printk(KERN_ERR "[%s %d]: " fmt,__FUNCTION__, __LINE__, ## args)
  38. #define IFX_MEI_DMSG(fmt, args...) printk(KERN_INFO "[%s %d]: " fmt,__FUNCTION__, __LINE__, ## args)
  39. @@ -173,7 +174,8 @@
  40. extern void ifxmips_mask_and_ack_irq(unsigned int irq_nr);
  41. #define MEI_MASK_AND_ACK_IRQ ifxmips_mask_and_ack_irq
  42. -static int dev_major = 105;
  43. +#define MEI_MAJOR 105
  44. +static int dev_major = MEI_MAJOR;
  45. static struct file_operations bsp_mei_operations = {
  46. owner:THIS_MODULE,
  47. @@ -2294,10 +2296,10 @@
  48. IFX_MEI_EMSG ("request_irq %d failed!\n", pDev->nIrq[IFX_DFEIR]);
  49. return -1;
  50. }
  51. - if (request_irq (pDev->nIrq[IFX_DYING_GASP], IFX_MEI_Dying_Gasp_IrqHandle, 0, "DYING_GASP", pDev) != 0) {
  52. + /*if (request_irq (pDev->nIrq[IFX_DYING_GASP], IFX_MEI_Dying_Gasp_IrqHandle, 0, "DYING_GASP", pDev) != 0) {
  53. IFX_MEI_EMSG ("request_irq %d failed!\n", pDev->nIrq[IFX_DYING_GASP]);
  54. return -1;
  55. - }
  56. + }*/
  57. // IFX_MEI_DMSG("Device %d initialized. IER %#x\n", num, bsp_get_irq_ier(pDev->nIrq[IFX_DYING_GASP]));
  58. return 0;
  59. }
  60. @@ -2922,6 +2924,7 @@
  61. IFX_MEI_ModuleInit (void)
  62. {
  63. int i = 0;
  64. + static struct class *dsl_class;
  65. printk ("IFX MEI Version %ld.%02ld.%02ld", bsp_mei_version.major, bsp_mei_version.minor, bsp_mei_version.revision);
  66. @@ -2935,14 +2938,15 @@
  67. IFX_MEI_InitProcFS (i);
  68. #endif
  69. }
  70. - for (i = 0; i <= DSL_BSP_CB_LAST ; i++)
  71. + for (i = 0; i <= DSL_BSP_CB_LAST ; i++)
  72. dsl_bsp_event_callback[i].function = NULL;
  73. #ifdef CONFIG_IFXMIPS_MEI_FW_LOOPBACK
  74. printk(KERN_INFO "[%s %s %d]: Start loopback test...\n", __FILE__, __func__, __LINE__);
  75. DFE_Loopback_Test ();
  76. #endif
  77. -
  78. + dsl_class = class_create(THIS_MODULE, "ifx_mei");
  79. + device_create(dsl_class, NULL, MKDEV(MEI_MAJOR, 0), NULL, "ifx_mei");
  80. return 0;
  81. }
  82. @@ -2996,3 +3000,5 @@
  83. module_init (IFX_MEI_ModuleInit);
  84. module_exit (IFX_MEI_ModuleExit);
  85. +
  86. +MODULE_LICENSE("Dual BSD/GPL");