static inline void init_pmu(void);
static inline void uninit_pmu(void);
-static inline void reset_ppe(struct platform_device *pdev);
+static inline int reset_ppe(struct platform_device *pdev);
static inline void init_pdma(void);
static inline void init_mailbox(void);
static inline void init_atm_tc(void);
{
}
-static inline void reset_ppe(struct platform_device *pdev)
+static inline int 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 void init_pdma(void)
}
}
-void ifx_ptm_init_chip(struct platform_device *pdev)
+int ifx_ptm_init_chip(struct platform_device *pdev)
{
+ int r;
+
init_pmu();
- reset_ppe(pdev);
+ r = reset_ppe(pdev);
+ if (r)
+ return r;
init_pdma();
init_atm_tc();
clear_share_buffer();
+
+ return 0;
}
void ifx_ptm_uninit_chip(void)