#define IFX_PMU_MODULE_AHBS BIT(13)
#define IFX_PMU_MODULE_DSL_DFE BIT(9)
-static inline void vr9_reset_ppe(struct platform_device *pdev)
+static inline int vr9_reset_ppe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct reset_control *dsp;
struct reset_control *tc;
dsp = devm_reset_control_get(dev, "dsp");
- if (IS_ERR(dsp)) {
- if (PTR_ERR(dsp) != -EPROBE_DEFER)
- dev_err(dev, "Failed to lookup dsp reset\n");
-// return PTR_ERR(dsp);
- }
+ if (IS_ERR(dsp))
+ return dev_err_probe(dev, PTR_ERR(dsp), "Failed to lookup dsp reset");
dfe = devm_reset_control_get(dev, "dfe");
- if (IS_ERR(dfe)) {
- if (PTR_ERR(dfe) != -EPROBE_DEFER)
- dev_err(dev, "Failed to lookup dfe reset\n");
-// return PTR_ERR(dfe);
- }
+ if (IS_ERR(dfe))
+ return dev_err_probe(dev, PTR_ERR(dfe), "Failed to lookup dfe reset");
tc = devm_reset_control_get(dev, "tc");
- if (IS_ERR(tc)) {
- if (PTR_ERR(tc) != -EPROBE_DEFER)
- dev_err(dev, "Failed to lookup tc reset\n");
-// return PTR_ERR(tc);
- }
+ if (IS_ERR(tc))
+ return dev_err_probe(dev, PTR_ERR(tc), "Failed to lookup tc reset");
reset_control_assert(dsp);
udelay(1000);
udelay(1000);
*PP32_SRST |= 0x000303CF;
udelay(1000);
+
+ return 0;
}
static inline int vr9_pp32_download_code(int pp32, u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
*minor = FW_VER_ID->minor;
}
-static void vr9_init(struct platform_device *pdev)
+static int vr9_init(struct platform_device *pdev)
{
volatile u32 *p;
unsigned int i;
+ int ret;
/* setup pmu */
ltq_pmu_enable(IFX_PMU_MODULE_PPE_SLL01 |
IFX_PMU_MODULE_AHBS |
IFX_PMU_MODULE_DSL_DFE);
- vr9_reset_ppe(pdev);
+ ret = vr9_reset_ppe(pdev);
+ if (ret)
+ return ret;
/* pdma init */
IFX_REG_W32(0x08, PDMA_CFG);
p = SB_RAM6_ADDR(0);
for ( i = 0; i < SB_RAM6_DWLEN; i++ )
IFX_REG_W32(0, p++);
+
+ return 0;
}
static void vr9_shutdown(void)