Loading drivers/platform/msm/sps/sps.c +30 −6 Original line number Diff line number Diff line Loading @@ -664,6 +664,11 @@ int sps_get_bam_debug_info(u32 dev, u32 option, u32 para, return SPS_ERROR; } if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } mutex_lock(&sps->lock); /* Search for the target BAM device */ bam = sps_h2bam(dev); Loading Loading @@ -1100,6 +1105,11 @@ int sps_phy2h(u32 phys_addr, u32 *handle) SPS_DBG("sps:%s.", __func__); if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } if (handle == NULL) { SPS_ERR("sps:%s:handle is NULL.\n", __func__); return SPS_ERROR; Loading Loading @@ -1142,6 +1152,11 @@ int sps_setup_bam2bam_fifo(struct sps_mem_buffer *mem_buffer, return SPS_ERROR; } if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } if (use_offset) { if ((addr + size) <= sps->pipemem_size) mem_buffer->phys_base = sps->pipemem_phys_base + addr; Loading Loading @@ -1752,6 +1767,11 @@ int sps_device_reset(u32 dev) return SPS_ERROR; } if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } mutex_lock(&sps->lock); /* Search for the target BAM device */ bam = sps_h2bam(dev); Loading Loading @@ -1997,8 +2017,10 @@ int sps_ctrl_bam_dma_clk(bool clk_on) SPS_DBG("sps:%s.", __func__); if (!sps->is_ready) if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } if (clk_on == true) { SPS_DBG("sps:vote for bam dma clk.\n"); Loading Loading @@ -2039,8 +2061,10 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props, return SPS_ERROR; } if (sps == NULL) return SPS_ERROR; if (sps == NULL) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } /* BAM-DMA is registered internally during power-up */ if ((!sps->is_ready) && !(bam_props->options & SPS_BAM_OPT_BAMDMA)) { Loading Loading @@ -2507,7 +2531,7 @@ static int msm_sps_probe(struct platform_device *pdev) sps->dfab_clk = clk_get(sps->dev, "dfab_clk"); if (IS_ERR(sps->dfab_clk)) { if (IS_ERR(sps->dfab_clk) == -EPROBE_DEFER) if (PTR_ERR(sps->dfab_clk) == -EPROBE_DEFER) ret = -EPROBE_DEFER; else SPS_ERR("sps:fail to get dfab_clk."); Loading @@ -2524,7 +2548,7 @@ static int msm_sps_probe(struct platform_device *pdev) if (!d_type) { sps->pmem_clk = clk_get(sps->dev, "mem_clk"); if (IS_ERR(sps->pmem_clk)) { if (IS_ERR(sps->pmem_clk) == -EPROBE_DEFER) if (PTR_ERR(sps->pmem_clk) == -EPROBE_DEFER) ret = -EPROBE_DEFER; else SPS_ERR("sps:fail to get pmem_clk."); Loading @@ -2541,7 +2565,7 @@ static int msm_sps_probe(struct platform_device *pdev) #ifdef CONFIG_SPS_SUPPORT_BAMDMA sps->bamdma_clk = clk_get(sps->dev, "dma_bam_pclk"); if (IS_ERR(sps->bamdma_clk)) { if (IS_ERR(sps->bamdma_clk) == -EPROBE_DEFER) if (PTR_ERR(sps->bamdma_clk) == -EPROBE_DEFER) ret = -EPROBE_DEFER; else SPS_ERR("sps:fail to get bamdma_clk."); Loading Loading
drivers/platform/msm/sps/sps.c +30 −6 Original line number Diff line number Diff line Loading @@ -664,6 +664,11 @@ int sps_get_bam_debug_info(u32 dev, u32 option, u32 para, return SPS_ERROR; } if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } mutex_lock(&sps->lock); /* Search for the target BAM device */ bam = sps_h2bam(dev); Loading Loading @@ -1100,6 +1105,11 @@ int sps_phy2h(u32 phys_addr, u32 *handle) SPS_DBG("sps:%s.", __func__); if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } if (handle == NULL) { SPS_ERR("sps:%s:handle is NULL.\n", __func__); return SPS_ERROR; Loading Loading @@ -1142,6 +1152,11 @@ int sps_setup_bam2bam_fifo(struct sps_mem_buffer *mem_buffer, return SPS_ERROR; } if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } if (use_offset) { if ((addr + size) <= sps->pipemem_size) mem_buffer->phys_base = sps->pipemem_phys_base + addr; Loading Loading @@ -1752,6 +1767,11 @@ int sps_device_reset(u32 dev) return SPS_ERROR; } if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } mutex_lock(&sps->lock); /* Search for the target BAM device */ bam = sps_h2bam(dev); Loading Loading @@ -1997,8 +2017,10 @@ int sps_ctrl_bam_dma_clk(bool clk_on) SPS_DBG("sps:%s.", __func__); if (!sps->is_ready) if (sps == NULL || !sps->is_ready) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } if (clk_on == true) { SPS_DBG("sps:vote for bam dma clk.\n"); Loading Loading @@ -2039,8 +2061,10 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props, return SPS_ERROR; } if (sps == NULL) return SPS_ERROR; if (sps == NULL) { SPS_DBG2("sps:%s:sps driver is not ready.\n", __func__); return -EPROBE_DEFER; } /* BAM-DMA is registered internally during power-up */ if ((!sps->is_ready) && !(bam_props->options & SPS_BAM_OPT_BAMDMA)) { Loading Loading @@ -2507,7 +2531,7 @@ static int msm_sps_probe(struct platform_device *pdev) sps->dfab_clk = clk_get(sps->dev, "dfab_clk"); if (IS_ERR(sps->dfab_clk)) { if (IS_ERR(sps->dfab_clk) == -EPROBE_DEFER) if (PTR_ERR(sps->dfab_clk) == -EPROBE_DEFER) ret = -EPROBE_DEFER; else SPS_ERR("sps:fail to get dfab_clk."); Loading @@ -2524,7 +2548,7 @@ static int msm_sps_probe(struct platform_device *pdev) if (!d_type) { sps->pmem_clk = clk_get(sps->dev, "mem_clk"); if (IS_ERR(sps->pmem_clk)) { if (IS_ERR(sps->pmem_clk) == -EPROBE_DEFER) if (PTR_ERR(sps->pmem_clk) == -EPROBE_DEFER) ret = -EPROBE_DEFER; else SPS_ERR("sps:fail to get pmem_clk."); Loading @@ -2541,7 +2565,7 @@ static int msm_sps_probe(struct platform_device *pdev) #ifdef CONFIG_SPS_SUPPORT_BAMDMA sps->bamdma_clk = clk_get(sps->dev, "dma_bam_pclk"); if (IS_ERR(sps->bamdma_clk)) { if (IS_ERR(sps->bamdma_clk) == -EPROBE_DEFER) if (PTR_ERR(sps->bamdma_clk) == -EPROBE_DEFER) ret = -EPROBE_DEFER; else SPS_ERR("sps:fail to get bamdma_clk."); Loading