Lines Matching refs:dev_info

278 	void (*init)(struct cpc925_dev_info *dev_info);
279 void (*exit)(struct cpc925_dev_info *dev_info);
615 static void cpc925_cpu_init(struct cpc925_dev_info *dev_info) in cpc925_cpu_init() argument
620 apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET); in cpc925_cpu_init()
632 __raw_writel(apimask, dev_info->vbase + REG_APIMASK_OFFSET); in cpc925_cpu_init()
636 static void cpc925_cpu_exit(struct cpc925_dev_info *dev_info) in cpc925_cpu_exit() argument
655 struct cpc925_dev_info *dev_info = edac_dev->pvt_info; in cpc925_cpu_check() local
660 apiexcp = __raw_readl(dev_info->vbase + REG_APIEXCP_OFFSET); in cpc925_cpu_check()
667 apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET); in cpc925_cpu_check()
678 static void cpc925_htlink_init(struct cpc925_dev_info *dev_info) in cpc925_htlink_init() argument
682 ht_errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET); in cpc925_htlink_init()
685 __raw_writel(ht_errctrl, dev_info->vbase + REG_ERRCTRL_OFFSET); in cpc925_htlink_init()
690 static void cpc925_htlink_exit(struct cpc925_dev_info *dev_info) in cpc925_htlink_exit() argument
694 ht_errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET); in cpc925_htlink_exit()
696 __raw_writel(ht_errctrl, dev_info->vbase + REG_ERRCTRL_OFFSET); in cpc925_htlink_exit()
702 struct cpc925_dev_info *dev_info = edac_dev->pvt_info; in cpc925_htlink_check() local
703 u32 brgctrl = __raw_readl(dev_info->vbase + REG_BRGCTRL_OFFSET); in cpc925_htlink_check()
704 u32 linkctrl = __raw_readl(dev_info->vbase + REG_LINKCTRL_OFFSET); in cpc925_htlink_check()
705 u32 errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET); in cpc925_htlink_check()
706 u32 linkerr = __raw_readl(dev_info->vbase + REG_LINKERR_OFFSET); in cpc925_htlink_check()
728 dev_info->vbase + REG_BRGCTRL_OFFSET); in cpc925_htlink_check()
732 dev_info->vbase + REG_LINKCTRL_OFFSET); in cpc925_htlink_check()
737 dev_info->vbase + REG_BRGCTRL_OFFSET); in cpc925_htlink_check()
741 dev_info->vbase + REG_ERRCTRL_OFFSET); in cpc925_htlink_check()
745 dev_info->vbase + REG_LINKERR_OFFSET); in cpc925_htlink_check()
775 struct cpc925_dev_info *dev_info; in cpc925_add_edac_devices() local
782 for (dev_info = &cpc925_devs[0]; dev_info->init; dev_info++) { in cpc925_add_edac_devices()
783 dev_info->vbase = vbase; in cpc925_add_edac_devices()
784 dev_info->pdev = platform_device_register_simple( in cpc925_add_edac_devices()
785 dev_info->ctl_name, 0, NULL, 0); in cpc925_add_edac_devices()
786 if (IS_ERR(dev_info->pdev)) { in cpc925_add_edac_devices()
789 dev_info->ctl_name); in cpc925_add_edac_devices()
797 dev_info->edac_idx = edac_device_alloc_index(); in cpc925_add_edac_devices()
798 dev_info->edac_dev = in cpc925_add_edac_devices()
799 edac_device_alloc_ctl_info(0, dev_info->ctl_name, in cpc925_add_edac_devices()
800 1, NULL, 0, 0, NULL, 0, dev_info->edac_idx); in cpc925_add_edac_devices()
801 if (!dev_info->edac_dev) { in cpc925_add_edac_devices()
806 dev_info->edac_dev->pvt_info = dev_info; in cpc925_add_edac_devices()
807 dev_info->edac_dev->dev = &dev_info->pdev->dev; in cpc925_add_edac_devices()
808 dev_info->edac_dev->ctl_name = dev_info->ctl_name; in cpc925_add_edac_devices()
809 dev_info->edac_dev->mod_name = CPC925_EDAC_MOD_STR; in cpc925_add_edac_devices()
810 dev_info->edac_dev->dev_name = dev_name(&dev_info->pdev->dev); in cpc925_add_edac_devices()
813 dev_info->edac_dev->edac_check = dev_info->check; in cpc925_add_edac_devices()
815 if (dev_info->init) in cpc925_add_edac_devices()
816 dev_info->init(dev_info); in cpc925_add_edac_devices()
818 if (edac_device_add_device(dev_info->edac_dev) > 0) { in cpc925_add_edac_devices()
821 dev_info->ctl_name); in cpc925_add_edac_devices()
826 dev_info->ctl_name); in cpc925_add_edac_devices()
831 if (dev_info->exit) in cpc925_add_edac_devices()
832 dev_info->exit(dev_info); in cpc925_add_edac_devices()
833 edac_device_free_ctl_info(dev_info->edac_dev); in cpc925_add_edac_devices()
835 platform_device_unregister(dev_info->pdev); in cpc925_add_edac_devices()
845 struct cpc925_dev_info *dev_info; in cpc925_del_edac_devices() local
847 for (dev_info = &cpc925_devs[0]; dev_info->init; dev_info++) { in cpc925_del_edac_devices()
848 if (dev_info->edac_dev) { in cpc925_del_edac_devices()
849 edac_device_del_device(dev_info->edac_dev->dev); in cpc925_del_edac_devices()
850 edac_device_free_ctl_info(dev_info->edac_dev); in cpc925_del_edac_devices()
851 platform_device_unregister(dev_info->pdev); in cpc925_del_edac_devices()
854 if (dev_info->exit) in cpc925_del_edac_devices()
855 dev_info->exit(dev_info); in cpc925_del_edac_devices()
858 dev_info->ctl_name); in cpc925_del_edac_devices()