From 775b46d1aa38f235f8ebfdbcc863b2dca88a3fdd Mon Sep 17 00:00:00 2001 From: ddl Date: Wed, 22 Dec 2010 10:36:00 +0800 Subject: [PATCH] camera:fix pmem_cam config not allocator and not cached --- arch/arm/mach-rk29/board-rk29sdk.c | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29sdk.c b/arch/arm/mach-rk29/board-rk29sdk.c index 08d911a7225c..962428ae40d4 100755 --- a/arch/arm/mach-rk29/board-rk29sdk.c +++ b/arch/arm/mach-rk29/board-rk29sdk.c @@ -211,7 +211,7 @@ static int rk29_fb_io_init(struct rk29_fb_setting_info *fb_setting) gpio_direction_output(FB_LCD_CABC_EN_PIN, 0); gpio_set_value(FB_LCD_CABC_EN_PIN, GPIO_LOW); } - + return ret; } @@ -281,8 +281,8 @@ static struct android_pmem_platform_data android_pmem_cam_pdata = { .name = "pmem_cam", .start = PMEM_CAM_BASE, .size = PMEM_CAM_SIZE, - .no_allocator = 0, - .cached = 1, + .no_allocator = 1, + .cached = 0, }; static struct platform_device android_pmem_cam_device = { @@ -468,7 +468,7 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = { .type = "stc3100", .addr = 0x70, .flags = 0, - }, + }, #endif #if defined (CONFIG_BATTERY_BQ27510) { @@ -864,8 +864,8 @@ static struct regulator_init_data rk29_pwm_regulator_data = { .name = "PWM2", .min_uV = 1200000, .max_uV = 1400000, - .apply_uV = 1, - .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE, + .apply_uV = 1, + .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE, }, .num_consumer_supplies = ARRAY_SIZE(pwm_consumers), .consumer_supplies = pwm_consumers, @@ -903,7 +903,7 @@ static int rk29_sdmmc0_cfg_gpio(void) rk29_mux_api_set(GPIO1D3_SDMMC0DATA1_NAME, GPIO1H_SDMMC0_DATA1); rk29_mux_api_set(GPIO1D4_SDMMC0DATA2_NAME, GPIO1H_SDMMC0_DATA2); rk29_mux_api_set(GPIO1D5_SDMMC0DATA3_NAME, GPIO1H_SDMMC0_DATA3); - rk29_mux_api_set(GPIO2A2_SDMMC0DETECTN_NAME, GPIO2L_SDMMC0_DETECT_N); + rk29_mux_api_set(GPIO2A2_SDMMC0DETECTN_NAME, GPIO2L_SDMMC0_DETECT_N); rk29_mux_api_set(GPIO5D5_SDMMC0PWREN_NAME, GPIO5H_GPIO5D5); ///GPIO5H_SDMMC0_PWR_EN); ///GPIO5H_GPIO5D5); gpio_request(RK29_PIN5_PD5,"sdmmc"); gpio_set_value(RK29_PIN5_PD5,GPIO_HIGH); @@ -941,7 +941,7 @@ static int rk29_sdmmc1_cfg_gpio(void) return 0; } -#ifdef CONFIG_WIFI_CONTROL_FUNC +#ifdef CONFIG_WIFI_CONTROL_FUNC static int rk29sdk_wifi_status(struct device *dev); static int rk29sdk_wifi_status_register(void (*callback)(int card_presend, void *dev_id), void *dev_id); #endif @@ -1000,27 +1000,27 @@ static int rk29sdk_wifi_bt_gpio_control_init(void) { if (gpio_request(RK29SDK_WIFI_BT_GPIO_POWER_N, "wifi_bt_power")) { pr_info("%s: request wifi_bt power gpio failed\n", __func__); - return -1; + return -1; } - + if (gpio_request(RK29SDK_WIFI_GPIO_RESET_N, "wifi reset")) { pr_info("%s: request wifi reset gpio failed\n", __func__); gpio_free(RK29SDK_WIFI_BT_GPIO_POWER_N); return -1; } - + if (gpio_request(RK29SDK_BT_GPIO_RESET_N, "bt reset")) { pr_info("%s: request bt reset gpio failed\n", __func__); gpio_free(RK29SDK_WIFI_GPIO_RESET_N); return -1; } - + gpio_direction_output(RK29SDK_WIFI_BT_GPIO_POWER_N, GPIO_LOW); gpio_direction_output(RK29SDK_WIFI_GPIO_RESET_N, GPIO_LOW); - gpio_direction_output(RK29SDK_BT_GPIO_RESET_N, GPIO_LOW); - + gpio_direction_output(RK29SDK_BT_GPIO_RESET_N, GPIO_LOW); + pr_info("%s: init finished\n",__func__); - + return 0; } @@ -1285,7 +1285,7 @@ static struct platform_device *devices[] __initdata = { *****************************************************************************************/ static int rk29_vmac_register_set(void) { - //config rk29 vmac as rmii, 100MHz + //config rk29 vmac as rmii, 100MHz u32 value= readl(RK29_GRF_BASE + 0xbc); value = (value & 0xfff7ff) | (0x400); writel(value, RK29_GRF_BASE + 0xbc); @@ -1314,10 +1314,10 @@ static int rk29_rmii_io_init(void) gpio_free(RK29_PIN2_PD3); printk("-------request RK29_PIN6_PB0 fail--------\n"); return -1; - } + } gpio_direction_output(RK29_PIN6_PB0, GPIO_HIGH); gpio_set_value(RK29_PIN6_PB0, GPIO_HIGH); - + return 0; } @@ -1331,7 +1331,7 @@ static int rk29_rmii_power_control(int enable) //enable rmii power gpio_direction_output(RK29_PIN6_PB0, GPIO_HIGH); gpio_set_value(RK29_PIN6_PB0, GPIO_HIGH); - + } else { gpio_direction_output(RK29_PIN6_PB0, GPIO_LOW); @@ -1556,7 +1556,7 @@ static void __init machine_rk29_init_irq(void) static void __init machine_rk29_board_init(void) { rk29_board_iomux_init(); - gpio_request(POWER_ON_PIN,"poweronpin"); + gpio_request(POWER_ON_PIN,"poweronpin"); gpio_set_value(POWER_ON_PIN, GPIO_HIGH); gpio_direction_output(POWER_ON_PIN, GPIO_HIGH); -- 2.34.1