Merge branch 'master' into for_paulus
[linux-drm-fsl-dcu.git] / drivers / edac / edac_mc.h
index 342979677d2fd5e8727f5a97d18e332350b59356..713444cc41053fae35bcbac5c9e48bf0e22ee499 100644 (file)
@@ -18,7 +18,6 @@
 #ifndef _EDAC_MC_H_
 #define _EDAC_MC_H_
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/module.h>
@@ -30,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
@@ -79,10 +79,6 @@ extern int edac_debug_level;
 
 #endif  /* !CONFIG_EDAC_DEBUG */
 
-#define edac_xstr(s) edac_str(s)
-#define edac_str(s) #s
-#define EDAC_MOD_STR edac_xstr(KBUILD_BASENAME)
-
 #define BIT(x) (1 << (x))
 
 #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \
@@ -127,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)
@@ -141,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 {
@@ -319,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.
@@ -445,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.