diff options
Diffstat (limited to 'drivers/edac/ppc4xx_edac.c')
-rw-r--r-- | drivers/edac/ppc4xx_edac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c index ec5e529e33f6..95cfc0f8d46d 100644 --- a/drivers/edac/ppc4xx_edac.c +++ b/drivers/edac/ppc4xx_edac.c | |||
@@ -896,7 +896,7 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) | |||
896 | enum dev_type dtype; | 896 | enum dev_type dtype; |
897 | enum edac_type edac_mode; | 897 | enum edac_type edac_mode; |
898 | int row, j; | 898 | int row, j; |
899 | u32 mbxcf, size; | 899 | u32 mbxcf, size, nr_pages; |
900 | 900 | ||
901 | /* Establish the memory type and width */ | 901 | /* Establish the memory type and width */ |
902 | 902 | ||
@@ -947,7 +947,7 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) | |||
947 | case SDRAM_MBCF_SZ_2GB: | 947 | case SDRAM_MBCF_SZ_2GB: |
948 | case SDRAM_MBCF_SZ_4GB: | 948 | case SDRAM_MBCF_SZ_4GB: |
949 | case SDRAM_MBCF_SZ_8GB: | 949 | case SDRAM_MBCF_SZ_8GB: |
950 | csi->nr_pages = SDRAM_MBCF_SZ_TO_PAGES(size); | 950 | nr_pages = SDRAM_MBCF_SZ_TO_PAGES(size); |
951 | break; | 951 | break; |
952 | default: | 952 | default: |
953 | ppc4xx_edac_mc_printk(KERN_ERR, mci, | 953 | ppc4xx_edac_mc_printk(KERN_ERR, mci, |
@@ -973,6 +973,7 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) | |||
973 | for (j = 0; j < csi->nr_channels; j++) { | 973 | for (j = 0; j < csi->nr_channels; j++) { |
974 | struct dimm_info *dimm = csi->channels[j].dimm; | 974 | struct dimm_info *dimm = csi->channels[j].dimm; |
975 | 975 | ||
976 | dimm->nr_pages = nr_pages / csi->nr_channels; | ||
976 | dimm->grain = 1; | 977 | dimm->grain = 1; |
977 | 978 | ||
978 | dimm->mtype = mtype; | 979 | dimm->mtype = mtype; |