/* Check specific dependencies for the module */
if (drvdata->data->setup) {
- res = drvdata->data->setup(pdev, drvdata->base);
+ res = drvdata->data->setup(drvdata);
if (res)
goto fail1;
}
* Can't turn on ECC here because accessing un-initialized
* memory will cause CE/UE errors possibly causing an ABORT.
*/
-static int altr_ocram_check_deps(struct platform_device *pdev,
- void __iomem *base)
+static int altr_ocram_check_deps(struct altr_edac_device_dev *device)
{
+ void __iomem *base = device->base;
if (readl(base) & ALTR_OCR_ECC_EN)
return 0;
* Bail if ECC is not enabled.
* Note that L2 Cache Enable is forced at build time.
*/
-static int altr_l2_check_deps(struct platform_device *pdev,
- void __iomem *base)
+static int altr_l2_check_deps(struct altr_edac_device_dev *device)
{
+ void __iomem *base = device->base;
if (readl(base) & ALTR_L2_ECC_EN)
return 0;
#define ALTR_L2_ECC_INJS BIT(1)
#define ALTR_L2_ECC_INJD BIT(2)
+struct altr_edac_device_dev;
+
struct edac_device_prv_data {
- int (*setup)(struct platform_device *pdev, void __iomem *base);
+ int (*setup)(struct altr_edac_device_dev *device);
int ce_clear_mask;
int ue_clear_mask;
char dbgfs_name[20];