aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/cpc925_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/cpc925_edac.c')
-rw-r--r--drivers/edac/cpc925_edac.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c
index 534491d67159..fa39a7840e28 100644
--- a/drivers/edac/cpc925_edac.c
+++ b/drivers/edac/cpc925_edac.c
@@ -316,13 +316,12 @@ static void get_total_mem(struct cpc925_mc_pdata *pdata)
316 reg += aw; 316 reg += aw;
317 size = of_read_number(reg, sw); 317 size = of_read_number(reg, sw);
318 reg += sw; 318 reg += sw;
319 debugf1("%s: start 0x%lx, size 0x%lx\n", __func__, 319 debugf1("start 0x%lx, size 0x%lx\n", start, size);
320 start, size);
321 pdata->total_mem += size; 320 pdata->total_mem += size;
322 } while (reg < reg_end); 321 } while (reg < reg_end);
323 322
324 of_node_put(np); 323 of_node_put(np);
325 debugf0("%s: total_mem 0x%lx\n", __func__, pdata->total_mem); 324 debugf0("total_mem 0x%lx\n", pdata->total_mem);
326} 325}
327 326
328static void cpc925_init_csrows(struct mem_ctl_info *mci) 327static void cpc925_init_csrows(struct mem_ctl_info *mci)
@@ -512,7 +511,7 @@ static void cpc925_mc_get_pfn(struct mem_ctl_info *mci, u32 mear,
512 *offset = pa & (PAGE_SIZE - 1); 511 *offset = pa & (PAGE_SIZE - 1);
513 *pfn = pa >> PAGE_SHIFT; 512 *pfn = pa >> PAGE_SHIFT;
514 513
515 debugf0("%s: ECC physical address 0x%lx\n", __func__, pa); 514 debugf0("ECC physical address 0x%lx\n", pa);
516} 515}
517 516
518static int cpc925_mc_find_channel(struct mem_ctl_info *mci, u16 syndrome) 517static int cpc925_mc_find_channel(struct mem_ctl_info *mci, u16 syndrome)
@@ -852,8 +851,8 @@ static void cpc925_add_edac_devices(void __iomem *vbase)
852 goto err2; 851 goto err2;
853 } 852 }
854 853
855 debugf0("%s: Successfully added edac device for %s\n", 854 debugf0("Successfully added edac device for %s\n",
856 __func__, dev_info->ctl_name); 855 dev_info->ctl_name);
857 856
858 continue; 857 continue;
859 858
@@ -884,8 +883,8 @@ static void cpc925_del_edac_devices(void)
884 if (dev_info->exit) 883 if (dev_info->exit)
885 dev_info->exit(dev_info); 884 dev_info->exit(dev_info);
886 885
887 debugf0("%s: Successfully deleted edac device for %s\n", 886 debugf0("Successfully deleted edac device for %s\n",
888 __func__, dev_info->ctl_name); 887 dev_info->ctl_name);
889 } 888 }
890} 889}
891 890
@@ -900,7 +899,7 @@ static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci)
900 mscr = __raw_readl(pdata->vbase + REG_MSCR_OFFSET); 899 mscr = __raw_readl(pdata->vbase + REG_MSCR_OFFSET);
901 si = (mscr & MSCR_SI_MASK) >> MSCR_SI_SHIFT; 900 si = (mscr & MSCR_SI_MASK) >> MSCR_SI_SHIFT;
902 901
903 debugf0("%s, Mem Scrub Ctrl Register 0x%x\n", __func__, mscr); 902 debugf0("Mem Scrub Ctrl Register 0x%x\n", mscr);
904 903
905 if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) || 904 if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) ||
906 (si == 0)) { 905 (si == 0)) {
@@ -928,8 +927,7 @@ static int cpc925_mc_get_channels(void __iomem *vbase)
928 ((mbcr & MBCR_64BITBUS_MASK) == 0)) 927 ((mbcr & MBCR_64BITBUS_MASK) == 0))
929 dual = 1; 928 dual = 1;
930 929
931 debugf0("%s: %s channel\n", __func__, 930 debugf0("%s channel\n", (dual > 0) ? "Dual" : "Single");
932 (dual > 0) ? "Dual" : "Single");
933 931
934 return dual; 932 return dual;
935} 933}
@@ -944,7 +942,7 @@ static int __devinit cpc925_probe(struct platform_device *pdev)
944 struct resource *r; 942 struct resource *r;
945 int res = 0, nr_channels; 943 int res = 0, nr_channels;
946 944
947 debugf0("%s: %s platform device found!\n", __func__, pdev->name); 945 debugf0("%s platform device found!\n", pdev->name);
948 946
949 if (!devres_open_group(&pdev->dev, cpc925_probe, GFP_KERNEL)) { 947 if (!devres_open_group(&pdev->dev, cpc925_probe, GFP_KERNEL)) {
950 res = -ENOMEM; 948 res = -ENOMEM;
@@ -1026,7 +1024,7 @@ static int __devinit cpc925_probe(struct platform_device *pdev)
1026 cpc925_add_edac_devices(vbase); 1024 cpc925_add_edac_devices(vbase);
1027 1025
1028 /* get this far and it's successful */ 1026 /* get this far and it's successful */
1029 debugf0("%s: success\n", __func__); 1027 debugf0("success\n");
1030 1028
1031 res = 0; 1029 res = 0;
1032 goto out; 1030 goto out;