Advertisement
Guest User

Untitled

a guest
Jul 16th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.91 KB | None | 0 0
  1. diff --git a/arch/arm/mach-mx6/board-mx6_nitrogen6x.c b/arch/arm/mach-mx6/board-mx6_nitrogen6x.c
  2. index d589afa..376b78a 100644
  3. --- a/arch/arm/mach-mx6/board-mx6_nitrogen6x.c
  4. +++ b/arch/arm/mach-mx6/board-mx6_nitrogen6x.c
  5. @@ -864,6 +864,16 @@ static struct imx_ipuv3_platform_data ipu_data[] = {
  6.         },
  7.  };
  8.  
  9. +struct imx_vout_mem {
  10. +       resource_size_t res_mbase;
  11. +       resource_size_t res_msize;
  12. +};
  13. +
  14. +static struct imx_vout_mem vout_mem __initdata = {
  15. +       .res_msize = SZ_128M,
  16. +};
  17. +
  18. +
  19.  static struct fsl_mxc_capture_platform_data capture_data[] = {
  20.  #if defined(CONFIG_MXC_CAMERA_OV5642) || defined(CONFIG_MXC_CAMERA_OV5642_MODULE)
  21.         {
  22. @@ -1206,6 +1216,8 @@ static void __init board_init(void)
  23.         struct clk *new_parent;
  24.         int rate;
  25.         int isn6 ;
  26. +       struct platform_device *voutdev;
  27. +
  28.  
  29.         IOMUX_SETUP(common_pads);
  30.  
  31. @@ -1265,6 +1277,15 @@ static void __init board_init(void)
  32.         imx6q_add_ldb(&ldb_data);
  33.         imx6q_add_bt656(&bt656_data);
  34.  
  35. +       voutdev = imx6q_add_v4l2_output(0);
  36. +       if (vout_mem.res_msize && voutdev) {
  37. +               dma_declare_coherent_memory(&voutdev->dev,
  38. +                       vout_mem.res_mbase,
  39. +                       vout_mem.res_mbase,
  40. +                       vout_mem.res_msize,
  41. +                       DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
  42. +       }
  43. +
  44.         for (i = 0; i < ARRAY_SIZE(capture_data); i++) {
  45.                 if (!cpu_is_mx6q())
  46.                         capture_data[i].ipu = 0;
  47. @@ -1425,6 +1446,13 @@ static void __init reserve(void)
  48.                 imx6_gpu_pdata.reserved_mem_base = phys;
  49.         }
  50.  #endif
  51. +
  52. +       if (vout_mem.res_msize) {
  53. +               phys = memblock_alloc_base(vout_mem.res_msize,
  54. +                               SZ_4K, SZ_1G);
  55. +               memblock_remove(phys, vout_mem.res_msize);
  56. +               vout_mem.res_mbase = phys;
  57. +       }
  58.  }
  59.  
  60.  /*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement