Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / edac / edac_core.h
index 3493c6b..efca934 100644 (file)
@@ -74,6 +74,7 @@
 
 #ifdef CONFIG_EDAC_DEBUG
 extern int edac_debug_level;
+extern const char *edac_mem_types[];
 
 #ifndef CONFIG_EDAC_DEBUG_VERBOSE
 #define edac_debug_printk(level, fmt, arg...)                           \
@@ -150,6 +151,8 @@ enum mem_type {
        MEM_FB_DDR2,            /* fully buffered DDR2 */
        MEM_RDDR2,              /* Registered DDR2 RAM */
        MEM_XDR,                /* Rambus XDR */
+       MEM_DDR3,               /* DDR3 RAM */
+       MEM_RDDR3,              /* Registered DDR3 RAM */
 };
 
 #define MEM_FLAG_EMPTY         BIT(MEM_EMPTY)
@@ -167,6 +170,8 @@ enum mem_type {
 #define MEM_FLAG_FB_DDR2        BIT(MEM_FB_DDR2)
 #define MEM_FLAG_RDDR2          BIT(MEM_RDDR2)
 #define MEM_FLAG_XDR            BIT(MEM_XDR)
+#define MEM_FLAG_DDR3           BIT(MEM_DDR3)
+#define MEM_FLAG_RDDR3          BIT(MEM_RDDR3)
 
 /* chipset Error Detection and Correction capabilities and mode */
 enum edac_type {
@@ -282,7 +287,7 @@ enum scrub_type {
  *                     is irrespective of the memory devices being mounted
  *                     on both sides of the memory stick.
  *
- * Socket set:         All of the memory sticks that are required for for
+ * Socket set:         All of the memory sticks that are required for
  *                     a single memory access or all of the memory sticks
  *                     spanned by a chip-select row.  A single socket set
  *                     has two chip-select rows and if double-sided sticks
@@ -336,12 +341,30 @@ struct csrow_info {
        struct channel_info *channels;
 };
 
+struct mcidev_sysfs_group {
+       const char *name;                               /* group name */
+       struct mcidev_sysfs_attribute *mcidev_attr;     /* group attributes */
+};
+
+struct mcidev_sysfs_group_kobj {
+       struct list_head list;          /* list for all instances within a mc */
+
+       struct kobject kobj;            /* kobj for the group */
+
+       struct mcidev_sysfs_group *grp; /* group description table */
+       struct mem_ctl_info *mci;       /* the parent */
+};
+
 /* mcidev_sysfs_attribute structure
  *     used for driver sysfs attributes and in mem_ctl_info
  *     sysfs top level entries
  */
 struct mcidev_sysfs_attribute {
-        struct attribute attr;
+       /* It should use either attr or grp */
+       struct attribute attr;
+       struct mcidev_sysfs_group *grp; /* Points to a group of attributes */
+
+       /* Ops for show/store values at the attribute - not used on group */
         ssize_t (*show)(struct mem_ctl_info *,char *);
         ssize_t (*store)(struct mem_ctl_info *, const char *,size_t);
 };
@@ -419,6 +442,9 @@ struct mem_ctl_info {
        /* edac sysfs device control */
        struct kobject edac_mci_kobj;
 
+       /* list for all grp instances within a mc */
+       struct list_head grp_kobj_list;
+
        /* Additional top controller level attributes, but specified
         * by the low level driver.
         *