分析解决android系统启动慢的一次经历

1.系统慢,分为启动慢、app运行慢及其它原因。
2.DDR频率不正常,系统慢,
3.这里主要分析系统启动慢
4.直接上修改记录吧
  这里为emmc的研究为主
  emmc的位数  bus_width
  emmc的传速速率

    np = host->parent->of_node;

#if 0 
    /* "bus-width" is translated to MMC_CAP_*_BIT_DATA flags */
    if (of_property_read_u32(np, "bus-width", &bus_width) < 0) {
        dev_dbg(host->parent,
            "\"bus-width\" property is missing, assuming 1 bit.\n");
        bus_width = 1;
    }

    switch (bus_width) {
    case 8:
        host->caps |= MMC_CAP_8_BIT_DATA;
        /* Hosts capable of 8-bit transfers can also do 4 bits */
    case 4:
        host->caps |= MMC_CAP_4_BIT_DATA;
        break;
    case 1:
        break;
    default:
        dev_err(host->parent,
            "Invalid \"bus-width\" value %u!\n", bus_width);
        return -EINVAL;
    }
#endif

    bus_width = stt_exparam_data.mSDDataBit;

            /* Hosts capable of 8-bit transfers can also do 4 bits */
        case 1:
            host->caps |= MMC_CAP_4_BIT_DATA;
            break;
        case 0:
            break;
        default:
            dev_err(host->parent,
                "Invalid \"bus-width\" value %u!\n", bus_width);
            return -EINVAL;
        }   
        
    }else   
    {
        /* "bus-width" is translated to MMC_CAP_*_BIT_DATA flags */
            if (of_property_read_u32(np, "bus-width", &bus_width) < 0) {
                        dev_dbg(host->parent,
                                            "\"bus-width\" property is missing, assuming 1 bit.\n");
                                bus_width = 1;
                                    }
                                    
                switch (bus_width) {
                        case 8:
                                host->caps |= MMC_CAP_8_BIT_DATA;
                                /* Hosts capable of 8-bit transfers can also do 4 bits */
                        case 4:
                                host->caps |= MMC_CAP_4_BIT_DATA;
                                break;
                        case 1:
                                break;
                        default:
                                dev_err(host->parent,"Invalid \"bus-width\" value %u!\n", bus_width);
                                return -EINVAL;
                }
    }
 

    /* f_max is obtained from the optional "max-frequency" property */
    of_property_read_u32(np, "max-frequency", &host->f_max);
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值