return 0;
}
+#if defined(CONFIG_MACH_RK2926_V86)
+int rk2926_v86_sd_vcc_reset(){
+ struct regulator *vcc;
+
+ vcc = regulator_get(NULL,"vmmc");
+ if (vcc == NULL || IS_ERR(vcc) ){
+ printk("%s get cif vaux33 ldo failed!\n",__func__);
+ return -1 ;
+ }
+
+
+ printk("hj---->rk29_sdmmc_hw_init get vmmc regulator successfully \n\n\n");
+ regulator_disable(vcc);
+ mdelay(2000);
+ regulator_enable(vcc);
+
+}
+#endif
+
#define CONFIG_SDMMC0_USE_DMA
struct rk29_sdmmc_platform_data default_sdmmc0_data = {
.host_ocr_avail =
#else
.write_prt = INVALID_GPIO,
#endif
+#if defined(CONFIG_MACH_RK2926_V86)
+ .sd_vcc_reset = rk2926_v86_sd_vcc_reset ,
+#endif
.det_pin_info = {
.io = RK29SDK_SD_CARD_DETECT_N, //INVALID_GPIO,
return 0;
}
+int rk2928_sd_vcc_reset(){
+ struct regulator *vcc;
+
+ vcc = regulator_get(NULL,"act_ldo4");
+ if (vcc == NULL || IS_ERR(vcc) ){
+ printk("%s get cif vaux33 ldo failed!\n",__func__);
+ return -1 ;
+ }
+
+ printk("hj---->rk29_sdmmc_hw_init get vmmc regulator successfully \n\n\n");
+ regulator_disable(vcc);
+ mdelay(2000);
+ regulator_enable(vcc);
+
+}
+
#define CONFIG_SDMMC0_USE_DMA
struct rk29_sdmmc_platform_data default_sdmmc0_data = {
.host_ocr_avail =
#else
.write_prt = INVALID_GPIO,
#endif
+ .sd_vcc_reset = rk2928_sd_vcc_reset ,
.det_pin_info = {
.io = RK29SDK_SD_CARD_DETECT_N, //INVALID_GPIO,
int write_prt_enalbe_level;
unsigned int sdio_INT_gpio;
struct rksdmmc_gpio det_pin_info;
+ int (*sd_vcc_reset)(void);
};
struct gsensor_platform_data {
error_type = "I/O";
break;
}
+#if 0
#if defined(CONFIG_SDMMC_RK29) && !defined(CONFIG_SDMMC_RK29_OLD) //Modifyed by xbw at 2011-21-14
printk(KERN_DEBUG "end_request: %s error, dev %s, sector %llu\n",
error_type, req->rq_disk ? req->rq_disk->disk_name : "?",
printk(KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
error_type, req->rq_disk ? req->rq_disk->disk_name : "?",
(unsigned long long)blk_rq_pos(req));
+#endif
#endif
}
int rk29_sdmmc_hw_init(void *data)
{
struct rk29_sdmmc *host = (struct rk29_sdmmc *)data;
+ struct rk29_sdmmc_platform_data *pdata = host->pdev->dev.platform_data;
//set the iomux
host->ctype = SDMMC_CTYPE_1BIT;
host->set_iomux(host->pdev->id, host->ctype);
+ if( pdata && pdata->sd_vcc_reset ){
+ int cdetect = gpio_get_value(host->det_pin.io) ;
+ if(host->det_pin.enable){
+ cdetect = cdetect?1:0;
+ }else{
+ cdetect = cdetect?0:1;
+ }
+
+ if( cdetect ){
+ pdata->sd_vcc_reset();
+ }
+ }
+
/* reset controller */
rk29_sdmmc_reset_controller(host);
int ret;
struct rk29_sdmmc *host = container_of(work, struct rk29_sdmmc, work.work);
+ rk29_sdmmc_hw_init(host);
+
rk28_send_wakeup_key();
rk29_sdmmc_detect_change(host);
}
*/
void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...)
{
+ #if 0
struct va_format vaf;
va_list args;
vaf.va = &args;
printk("%sFAT-fs (%s): %pV\n", level, sb->s_id, &vaf);
va_end(args);
+ #endif
}
/* Flushes the number of free clusters on FAT32 */