Merge branch 'master' into for_paulus
[linux-drm-fsl-dcu.git] / drivers / edac / edac_mc.h
index bf6ab8a8d5ed8700dce391de101a03b60ee72987..713444cc41053fae35bcbac5c9e48bf0e22ee499 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/rcupdate.h>
 #include <linux/completion.h>
 #include <linux/kobject.h>
+#include <linux/platform_device.h>
 
 #define EDAC_MC_LABEL_LEN      31
 #define MC_PROC_NAME_MAX_LEN 7
@@ -122,7 +123,9 @@ enum mem_type {
        MEM_RDR,                /* Registered single data rate SDRAM */
        MEM_DDR,                /* Double data rate SDRAM */
        MEM_RDDR,               /* Registered Double data rate SDRAM */
-       MEM_RMBS                /* Rambus DRAM */
+       MEM_RMBS,               /* Rambus DRAM */
+       MEM_DDR2,               /* DDR2 RAM */
+       MEM_FB_DDR2,            /* fully buffered DDR2 */
 };
 
 #define MEM_FLAG_EMPTY         BIT(MEM_EMPTY)
@@ -136,6 +139,8 @@ enum mem_type {
 #define MEM_FLAG_DDR           BIT(MEM_DDR)
 #define MEM_FLAG_RDDR          BIT(MEM_RDDR)
 #define MEM_FLAG_RMBS          BIT(MEM_RMBS)
+#define MEM_FLAG_DDR2           BIT(MEM_DDR2)
+#define MEM_FLAG_FB_DDR2        BIT(MEM_FB_DDR2)
 
 /* chipset Error Detection and Correction capabilities and mode */
 enum edac_type {
@@ -314,8 +319,21 @@ struct mem_ctl_info {
        unsigned long scrub_cap;        /* chipset scrub capabilities */
        enum scrub_type scrub_mode;     /* current scrub mode */
 
+       /* Translates sdram memory scrub rate given in bytes/sec to the
+          internal representation and configures whatever else needs
+          to be configured.
+       */
+       int (*set_sdram_scrub_rate) (struct mem_ctl_info *mci, u32 *bw);
+
+       /* Get the current sdram memory scrub rate from the internal
+          representation and converts it to the closest matching
+          bandwith in bytes/sec.
+       */
+       int (*get_sdram_scrub_rate) (struct mem_ctl_info *mci, u32 *bw);
+
        /* pointer to edac checking routine */
        void (*edac_check) (struct mem_ctl_info * mci);
+
        /*
         * Remaps memory pages: controller pages to physical pages.
         * For most MC's, this will be NULL.
@@ -440,6 +458,15 @@ extern void edac_mc_handle_ue(struct mem_ctl_info *mci,
                int row, const char *msg);
 extern void edac_mc_handle_ue_no_info(struct mem_ctl_info *mci,
                const char *msg);
+extern void edac_mc_handle_fbd_ue(struct mem_ctl_info *mci,
+               unsigned int csrow,
+               unsigned int channel0,
+               unsigned int channel1,
+               char *msg);
+extern void edac_mc_handle_fbd_ce(struct mem_ctl_info *mci,
+               unsigned int csrow,
+               unsigned int channel,
+               char *msg);
 
 /*
  * This kmalloc's and initializes all the structures.