rk30:add ion support
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rk30 / board-rk30-sdk.c
index 7e7307175e7e6f34b02b6df310b72fd864ceedf2..28e997fcf6afd2d998c307bffae3dfbd969dd1f2 100755 (executable)
 #if defined(CONFIG_SPIM_RK29)
 #include "../../../drivers/spi/rk29_spim.h"
 #endif
+#if defined(CONFIG_ANDROID_TIMED_GPIO)
+#include "../../../drivers/staging/android/timed_gpio.h"
+#endif
 
 #define RK30_FB0_MEM_SIZE 8*SZ_1M
 
+#ifdef CONFIG_VIDEO_RK29
+/*---------------- Camera Sensor Macro Define Begin  ------------------------*/
+/*---------------- Camera Sensor Configuration Macro Begin ------------------------*/
+#define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2659//RK_CAM_SENSOR_OV5642                                           /* back camera sensor */
+#define CONFIG_SENSOR_IIC_ADDR_0               0x60//0x78
+#define CONFIG_SENSOR_IIC_ADAPTER_ID_0   1
+#define CONFIG_SENSOR_CIF_INDEX_0                    0
+#define CONFIG_SENSOR_ORIENTATION_0      90
+#define CONFIG_SENSOR_POWER_PIN_0                INVALID_GPIO
+#define CONFIG_SENSOR_RESET_PIN_0                INVALID_GPIO
+#define CONFIG_SENSOR_POWERDN_PIN_0      INVALID_GPIO
+#define CONFIG_SENSOR_FALSH_PIN_0                INVALID_GPIO
+#define CONFIG_SENSOR_POWERACTIVE_LEVEL_0 RK29_CAM_POWERACTIVE_L
+#define CONFIG_SENSOR_RESETACTIVE_LEVEL_0 RK29_CAM_RESETACTIVE_L
+#define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_0 RK29_CAM_POWERDNACTIVE_H
+#define CONFIG_SENSOR_FLASHACTIVE_LEVEL_0 RK29_CAM_FLASHACTIVE_L
+
+#define CONFIG_SENSOR_QCIF_FPS_FIXED_0         15000
+#define CONFIG_SENSOR_QVGA_FPS_FIXED_0         15000
+#define CONFIG_SENSOR_CIF_FPS_FIXED_0          15000
+#define CONFIG_SENSOR_VGA_FPS_FIXED_0          15000
+#define CONFIG_SENSOR_480P_FPS_FIXED_0         15000
+#define CONFIG_SENSOR_SVGA_FPS_FIXED_0         15000
+#define CONFIG_SENSOR_720P_FPS_FIXED_0         30000
+
+#define CONFIG_SENSOR_1 RK29_CAM_SENSOR_OV2659                                         /* front camera sensor */
+#define CONFIG_SENSOR_IIC_ADDR_1               0x60
+#define CONFIG_SENSOR_IIC_ADAPTER_ID_1   1
+#define CONFIG_SENSOR_CIF_INDEX_1                                1
+#define CONFIG_SENSOR_ORIENTATION_1      270
+#define CONFIG_SENSOR_POWER_PIN_1                INVALID_GPIO
+#define CONFIG_SENSOR_RESET_PIN_1                INVALID_GPIO
+#define CONFIG_SENSOR_POWERDN_PIN_1      INVALID_GPIO
+#define CONFIG_SENSOR_FALSH_PIN_1                INVALID_GPIO
+#define CONFIG_SENSOR_POWERACTIVE_LEVEL_1 RK29_CAM_POWERACTIVE_L
+#define CONFIG_SENSOR_RESETACTIVE_LEVEL_1 RK29_CAM_RESETACTIVE_L
+#define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_1 RK29_CAM_POWERDNACTIVE_H
+#define CONFIG_SENSOR_FLASHACTIVE_LEVEL_1 RK29_CAM_FLASHACTIVE_L
+
+#define CONFIG_SENSOR_QCIF_FPS_FIXED_1         15000
+#define CONFIG_SENSOR_QVGA_FPS_FIXED_1         15000
+#define CONFIG_SENSOR_CIF_FPS_FIXED_1          15000
+#define CONFIG_SENSOR_VGA_FPS_FIXED_1          15000
+#define CONFIG_SENSOR_480P_FPS_FIXED_1         15000
+#define CONFIG_SENSOR_SVGA_FPS_FIXED_1         15000
+#define CONFIG_SENSOR_720P_FPS_FIXED_1         30000
+
+#define CONFIG_USE_CIF_0       1
+#define CONFIG_USE_CIF_1      0
+#endif //#ifdef CONFIG_VIDEO_RK29
+/*---------------- Camera Sensor Configuration Macro End------------------------*/
+#include "../../../drivers/media/video/rk30_camera.c"
+/*---------------- Camera Sensor Macro Define End  ---------*/
+
+#define PMEM_CAM_SIZE          PMEM_CAM_NECESSARY
+#ifdef CONFIG_VIDEO_RK29_WORK_IPP
+#define MEM_CAMIPP_SIZE        PMEM_CAMIPP_NECESSARY
+#else
+#define MEM_CAMIPP_SIZE        0
+#endif
+/*****************************************************************************************
+ * camera  devices
+ * author: ddl@rock-chips.com
+ *****************************************************************************************/
+#ifdef CONFIG_VIDEO_RK29
+#define CONFIG_SENSOR_POWER_IOCTL_USR     0
+#define CONFIG_SENSOR_RESET_IOCTL_USR     0
+#define CONFIG_SENSOR_POWERDOWN_IOCTL_USR         0
+#define CONFIG_SENSOR_FLASH_IOCTL_USR     0
+
+#if CONFIG_SENSOR_POWER_IOCTL_USR
+static int sensor_power_usr_cb (struct rk29camera_gpio_res *res,int on)
+{
+       #error "CONFIG_SENSOR_POWER_IOCTL_USR is 1, sensor_power_usr_cb function must be writed!!";
+}
+#endif
+
+#if CONFIG_SENSOR_RESET_IOCTL_USR
+static int sensor_reset_usr_cb (struct rk29camera_gpio_res *res,int on)
+{
+       #error "CONFIG_SENSOR_RESET_IOCTL_USR is 1, sensor_reset_usr_cb function must be writed!!";
+}
+#endif
+
+#if CONFIG_SENSOR_POWERDOWN_IOCTL_USR
+static int sensor_powerdown_usr_cb (struct rk29camera_gpio_res *res,int on)
+{
+       #error "CONFIG_SENSOR_POWERDOWN_IOCTL_USR is 1, sensor_powerdown_usr_cb function must be writed!!";
+}
+#endif
+
+#if CONFIG_SENSOR_FLASH_IOCTL_USR
+static int sensor_flash_usr_cb (struct rk29camera_gpio_res *res,int on)
+{
+       #error "CONFIG_SENSOR_FLASH_IOCTL_USR is 1, sensor_flash_usr_cb function must be writed!!";
+}
+#endif
+
+static struct rk29camera_platform_ioctl_cb     sensor_ioctl_cb = {
+       #if CONFIG_SENSOR_POWER_IOCTL_USR
+       .sensor_power_cb = sensor_power_usr_cb,
+       #else
+       .sensor_power_cb = NULL,
+       #endif
+
+       #if CONFIG_SENSOR_RESET_IOCTL_USR
+       .sensor_reset_cb = sensor_reset_usr_cb,
+       #else
+       .sensor_reset_cb = NULL,
+       #endif
+
+       #if CONFIG_SENSOR_POWERDOWN_IOCTL_USR
+       .sensor_powerdown_cb = sensor_powerdown_usr_cb,
+       #else
+       .sensor_powerdown_cb = NULL,
+       #endif
+
+       #if CONFIG_SENSOR_FLASH_IOCTL_USR
+       .sensor_flash_cb = sensor_flash_usr_cb,
+       #else
+       .sensor_flash_cb = NULL,
+       #endif
+};
+static struct reginfo_t rk_init_data_sensor_reg_0[] =
+{
+               {0x0000, 0x00,0,0}
+       };
+static struct reginfo_t rk_init_data_sensor_winseqreg_0[] ={
+       {0x0000, 0x00,0,0}
+       };
+static rk_sensor_user_init_data_s rk_init_data_sensor_0 = 
+{      
+       .rk_sensor_init_width = INVALID_VALUE,
+       .rk_sensor_init_height = INVALID_VALUE,
+       .rk_sensor_init_bus_param = INVALID_VALUE,
+       .rk_sensor_init_pixelcode = INVALID_VALUE,
+       .rk_sensor_init_data = rk_init_data_sensor_reg_0,
+       .rk_sensor_init_winseq = NULL,//rk_init_data_sensor_winseqreg_0,
+       .rk_sensor_winseq_size = sizeof(rk_init_data_sensor_winseqreg_0) / sizeof(struct reginfo_t),
+       
+};
+static rk_sensor_user_init_data_s* rk_init_data_sensor_0_p = &rk_init_data_sensor_0;
+static rk_sensor_user_init_data_s* rk_init_data_sensor_1_p = NULL;
+#include "../../../drivers/media/video/rk30_camera.c"
+
+#endif
+
+#if defined(CONFIG_TOUCHSCREEN_GT8XX)
+#define TOUCH_RESET_PIN  RK30_PIN4_PD0
+#define TOUCH_PWR_PIN    INVALID_GPIO
+int goodix_init_platform_hw(void)
+{
+       int ret;
+       printk("goodix_init_platform_hw\n");
+       if(TOUCH_PWR_PIN != INVALID_GPIO)
+       {
+               ret = gpio_request(TOUCH_PWR_PIN, "goodix power pin");
+               if(ret != 0){
+                       gpio_free(TOUCH_PWR_PIN);
+                       printk("goodix power error\n");
+                       return -EIO;
+               }
+               gpio_direction_output(TOUCH_PWR_PIN, 0);
+               gpio_set_value(TOUCH_PWR_PIN,GPIO_LOW);
+               msleep(100);
+       }
+       
+       if(TOUCH_RESET_PIN != INVALID_GPIO)
+       {
+               ret = gpio_request(TOUCH_RESET_PIN, "goodix reset pin");
+               if(ret != 0){
+                       gpio_free(TOUCH_RESET_PIN);
+                       printk("goodix gpio_request error\n");
+                       return -EIO;
+               }
+               gpio_direction_output(TOUCH_RESET_PIN, 0);
+               gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
+               msleep(10);
+               gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
+               msleep(500);
+       }
+       return 0;
+}
+
+struct goodix_platform_data goodix_info = {
+         .model= 8105,
+         .irq_pin = RK30_PIN4_PC2,
+         .rest_pin  = TOUCH_RESET_PIN,
+         .init_platform_hw = goodix_init_platform_hw,
+};
+#endif
+
 
 /*****************************************************************************************
  * xpt2046 touch panel
@@ -185,7 +380,7 @@ static struct spi_board_info board_spi_devices[] = {
 //#define BL_EN_MUX_NAME    GPIOF34_UART3_SEL_NAME
 //#define BL_EN_MUX_MODE    IOMUXB_GPIO1_B34
 
-#define BL_EN_PIN         INVALID_GPIO //?
+#define BL_EN_PIN         RK30_PIN6_PB3
 #define BL_EN_VALUE       GPIO_HIGH
 #endif
 static int rk29_backlight_io_init(void)
@@ -245,7 +440,7 @@ static int rk29_backlight_pwm_resume(void)
        return 0;
 }
 
-struct rk29_bl_info rk29_bl_info = {
+static struct rk29_bl_info rk29_bl_info = {
     .pwm_id   = PWM_ID,
     .bl_ref   = PWM_EFFECT_VALUE,
     .io_init   = rk29_backlight_io_init,
@@ -255,7 +450,7 @@ struct rk29_bl_info rk29_bl_info = {
 };
 
 
-struct platform_device rk29_device_backlight = {
+static struct platform_device rk29_device_backlight = {
        .name   = "rk29_backlight",
        .id     = -1,
         .dev    = {
@@ -291,20 +486,138 @@ static struct mma8452_platform_data mma8452_info = {
        .orientation = { -1, 0, 0, 0, 0, 1, 0, -1, 0},
 };
 #endif
+#if defined (CONFIG_COMPASS_AK8975)
+static struct akm8975_platform_data akm8975_info =
+{
+       .m_layout = 
+       {
+               {
+                       {1, 0, 0 },
+                       {0, -1, 0 },
+                       {0,     0, -1 },
+               },
+
+               {
+                       {1, 0, 0 },
+                       {0, 1, 0 },
+                       {0,     0, 1 },
+               },
+
+               {
+                       {1, 0, 0 },
+                       {0, 1, 0 },
+                       {0,     0, 1 },
+               },
+
+               {
+                       {1, 0, 0 },
+                       {0, 1, 0 },
+                       {0,     0, 1 },
+               },
+       }
+
+};
+
+#endif
+
+#if defined(CONFIG_GYRO_L3G4200D)
+
+#include <linux/l3g4200d.h>
+#define L3G4200D_INT_PIN  RK30_PIN4_PC3
+
+static int l3g4200d_init_platform_hw(void)
+{
+       if (gpio_request(L3G4200D_INT_PIN, NULL) != 0) {
+               gpio_free(L3G4200D_INT_PIN);
+               printk("%s: request l3g4200d int pin error\n", __func__);
+               return -EIO;
+       }
+       gpio_pull_updown(L3G4200D_INT_PIN, 1);
+       return 0;
+}
+
+static struct l3g4200d_platform_data l3g4200d_info = {
+       .fs_range = 1,
+
+       .axis_map_x = 0,
+       .axis_map_y = 1,
+       .axis_map_z = 2,
+
+       .negate_x = 1,
+       .negate_y = 1,
+       .negate_z = 0,
+
+       .init = l3g4200d_init_platform_hw,
+};
+
+#endif
+
+#ifdef CONFIG_LS_CM3217
+
+#define CM3217_POWER_PIN       INVALID_GPIO
+#define CM3217_IRQ_PIN         INVALID_GPIO
+static int cm3217_init_hw(void)
+{
+#if 0
+       if (gpio_request(CM3217_POWER_PIN, NULL) != 0) {
+       gpio_free(CM3217_POWER_PIN);
+       printk("%s: request cm3217 power pin error\n", __func__);
+       return -EIO;
+       }
+       gpio_pull_updown(CM3217_POWER_PIN, PullDisable);
+
+       if (gpio_request(CM3217_IRQ_PIN, NULL) != 0) {
+       gpio_free(CM3217_IRQ_PIN);
+       printk("%s: request cm3217 int pin error\n", __func__);
+       return -EIO;
+       }
+       gpio_pull_updown(CM3217_IRQ_PIN, PullDisable);
+#endif
+       return 0;
+}
+
+static void cm3217_exit_hw(void)
+{
+#if 0
+       gpio_free(CM3217_POWER_PIN);
+       gpio_free(CM3217_IRQ_PIN);
+#endif
+       return;
+}
+
+struct cm3217_platform_data cm3217_info = {
+       .irq_pin = CM3217_IRQ_PIN,
+       .power_pin = CM3217_POWER_PIN,
+       .init_platform_hw = cm3217_init_hw,
+       .exit_platform_hw = cm3217_exit_hw,
+};
+#endif
+
+
 
 #ifdef CONFIG_FB_ROCKCHIP
-/* rk30 fb resource */
- static struct resource resource_fb[] = {
+static struct resource resource_fb[] = {
        [0] = {
                .name  = "fb0 buf",
                .start = 0,
                .end   = 0,//RK30_FB0_MEM_SIZE - 1,
                .flags = IORESOURCE_MEM,
        },
+       [1] = {
+               .name  = "ipp buf",  //for rotate
+               .start = 0,
+               .end   = 0,//RK30_FB0_MEM_SIZE - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [2] = {
+               .name  = "fb2 buf",
+               .start = 0,
+               .end   = 0,//RK30_FB0_MEM_SIZE - 1,
+               .flags = IORESOURCE_MEM,
+       },
 };
 
-/*platform_device*/
-struct platform_device device_fb = {
+static struct platform_device device_fb = {
        .name             = "rk-fb",
        .id               = -1,
        .num_resources    = ARRAY_SIZE(resource_fb),
@@ -312,7 +625,127 @@ struct platform_device device_fb = {
 };
 #endif
 
-extern struct platform_device rk30_device_lcdc;
+#ifdef CONFIG_ANDROID_TIMED_GPIO
+static struct timed_gpio timed_gpios[] = {
+       {
+               .name = "vibrator",
+               .gpio = RK30_PIN0_PA4,
+               .max_timeout = 1000,
+               .active_low = 0,
+               .adjust_time =20,      //adjust for diff product
+       },
+};
+
+struct timed_gpio_platform_data rk29_vibrator_info = {
+       .num_gpios = 1,
+       .gpios = timed_gpios,
+};
+
+struct platform_device rk29_device_vibrator ={
+       .name = "timed-gpio",
+       .id = -1,
+       .dev = {
+               .platform_data = &rk29_vibrator_info,
+               },
+
+};
+#endif 
+
+#ifdef CONFIG_LEDS_GPIO_PLATFORM
+struct gpio_led rk29_leds[] = {
+               {
+                       .name = "button-backlight",
+                       .gpio = RK30_PIN4_PD7,
+                       .default_trigger = "timer",
+                       .active_low = 0,
+                       .retain_state_suspended = 0,
+                       .default_state = LEDS_GPIO_DEFSTATE_OFF,
+               },
+};
+
+struct gpio_led_platform_data rk29_leds_pdata = {
+       .leds = &rk29_leds,
+       .num_leds       = ARRAY_SIZE(rk29_leds),
+};
+
+struct platform_device rk29_device_gpio_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+          .platform_data  = &rk29_leds_pdata,
+       },
+};
+#endif
+
+#ifdef CONFIG_RK_IRDA
+#define IRDA_IRQ_PIN           RK30_PIN6_PA1
+
+int irda_iomux_init(void)
+{
+       int ret = 0;
+
+       //irda irq pin
+       ret = gpio_request(IRDA_IRQ_PIN, NULL);
+       if(ret != 0)
+       {
+       gpio_free(IRDA_IRQ_PIN);
+       printk(">>>>>> IRDA_IRQ_PIN gpio_request err \n ");
+       }
+       gpio_pull_updown(IRDA_IRQ_PIN, PullDisable);
+       gpio_direction_input(IRDA_IRQ_PIN);
+
+       return 0;
+}
+
+int irda_iomux_deinit(void)
+{
+       gpio_free(IRDA_IRQ_PIN);
+       return 0;
+}
+
+static struct irda_info rk29_irda_info = {
+       .intr_pin = IRDA_IRQ_PIN,
+       .iomux_init = irda_iomux_init,
+       .iomux_deinit = irda_iomux_deinit,
+       //.irda_pwr_ctl = bu92747guw_power_ctl,
+};
+
+static struct platform_device irda_device = {
+#ifdef CONFIG_RK_IRDA_NET
+                       .name   = "rk_irda",
+#else
+                       .name = "bu92747_irda",
+#endif
+    .id                  = -1,
+       .dev            = {
+               .platform_data  = &rk29_irda_info,
+       }
+};
+#endif
+
+#ifdef CONFIG_ION
+#define ION_RESERVE_SIZE        (80 * SZ_1M)
+static struct ion_platform_data rk30_ion_pdata = {
+       .nr = 1,
+       .heaps = {
+               {
+                       .type = ION_HEAP_TYPE_CARVEOUT,
+                       .id = ION_NOR_HEAP_ID,
+                       .name = "norheap",
+                       .size = ION_RESERVE_SIZE,
+               }
+       },
+};
+
+static struct platform_device device_ion = {
+       .name = "ion-rockchip",
+       .id = 0,
+       .dev = {
+               .platform_data = &rk30_ion_pdata,
+       },
+};
+#endif
+
 static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_BACKLIGHT_RK29_BL
        &rk29_device_backlight,
@@ -320,10 +753,18 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_FB_ROCKCHIP
        &device_fb,
 #endif
-#ifdef CONFIG_LCDC_RK30
-       &rk30_device_lcdc,
+#ifdef CONFIG_ION
+       &device_ion,
+#endif
+#ifdef CONFIG_ANDROID_TIMED_GPIO
+       &rk29_device_vibrator,
+#endif
+#ifdef CONFIG_LEDS_GPIO_PLATFORM
+       &rk29_device_gpio_leds,
+#endif
+#ifdef CONFIG_RK_IRDA
+       &irda_device,
 #endif
-
 };
 
 // i2c
@@ -338,7 +779,37 @@ static struct i2c_board_info __initdata i2c0_info[] = {
              .platform_data  = &mma8452_info,
            },
 #endif
+#if defined (CONFIG_COMPASS_AK8975)
+       {
+               .type           = "ak8975",
+               .addr           = 0x0d,
+               .flags          = 0,
+               .irq            = RK30_PIN4_PC1,
+               .platform_data  = &akm8975_info,
+       },
+#endif
+#if defined (CONFIG_GYRO_L3G4200D)
+       {
+               .type           = "l3g4200d_gryo",
+               .addr           = 0x69,
+               .flags          = 0,
+               .irq            = L3G4200D_INT_PIN,
+               .platform_data  = &l3g4200d_info,
+       },
+#endif
 
+#if defined (CONFIG_SND_SOC_RK1000)
+       {
+               .type                   = "rk1000_i2c_codec",
+               .addr           = 0x60,
+               .flags                  = 0,
+       },
+       {
+               .type                   = "rk1000_control",
+               .addr                   = 0x40,
+               .flags                  = 0,
+       },      
+#endif
 };
 #endif
 
@@ -349,6 +820,25 @@ static struct i2c_board_info __initdata i2c1_info[] = {
 
 #ifdef CONFIG_I2C2_RK30
 static struct i2c_board_info __initdata i2c2_info[] = {
+#if defined (CONFIG_TOUCHSCREEN_GT8XX)
+                   {
+                               .type   = "Goodix-TS",
+                               .addr   = 0x55,
+                               .flags      =0,
+                               .irq            =RK30_PIN4_PC2,
+                               .platform_data = &goodix_info,
+                   },
+#endif
+#if defined (CONFIG_LS_CM3217)
+       {
+               .type           = "lightsensor",
+               .addr           = 0x20,
+               .flags          = 0,
+               .irq            = CM3217_IRQ_PIN,
+               .platform_data  = &cm3217_info,
+       },
+#endif
+
 };
 #endif
 
@@ -391,8 +881,36 @@ static void __init machine_rk30_board_init(void)
 
 static void __init rk30_reserve(void)
 {
+#ifdef CONFIG_ION
+        rk30_ion_pdata.heaps[0].base = board_mem_reserve_add("ion",ION_RESERVE_SIZE);
+#endif
+#ifdef CONFIG_FB_ROCKCHIP
        resource_fb[0].start = board_mem_reserve_add("fb0",RK30_FB0_MEM_SIZE);
-       resource_fb[0].end      = resource_fb[0].start + RK30_FB0_MEM_SIZE - 1;
+       resource_fb[0].end = resource_fb[0].start + RK30_FB0_MEM_SIZE - 1;
+       resource_fb[1].start = board_mem_reserve_add("ipp buf",RK30_FB0_MEM_SIZE);
+       resource_fb[1].end = resource_fb[1].start + RK30_FB0_MEM_SIZE - 1;
+       resource_fb[2].start = board_mem_reserve_add("fb2",RK30_FB0_MEM_SIZE);
+       resource_fb[2].end = resource_fb[2].start + RK30_FB0_MEM_SIZE - 1;      
+#endif
+
+#if (MEM_CAMIPP_SIZE != 0)
+       #if CONFIG_USE_CIF_0
+       rk_camera_platform_data.meminfo.name = "camera_ipp_mem_0";
+       rk_camera_platform_data.meminfo.start = board_mem_reserve_add("camera_ipp_mem_0",MEM_CAMIPP_SIZE);
+       rk_camera_platform_data.meminfo.size= MEM_CAMIPP_SIZE;
+       #endif
+       #if CONFIG_USE_CIF_1
+       rk_camera_platform_data.meminfo_cif1.name = "camera_ipp_mem_1";
+       rk_camera_platform_data.meminfo_cif1.start =board_mem_reserve_add("camera_ipp_mem_1",MEM_CAMIPP_SIZE);
+       rk_camera_platform_data.meminfo_cif1.size= MEM_CAMIPP_SIZE;
+       #endif
+#endif
+
+#if (PMEM_CAM_SIZE != 0)
+       android_pmem_cam_pdata.start = board_mem_reserve_add("camera_pmem",PMEM_CAM_SIZE);
+       android_pmem_cam_pdata.size = PMEM_CAM_SIZE;
+#endif
+
        board_mem_reserved();
 }