ASoC: soc-core: move soc_probe_dai() next to soc_remove_dai()
[linux-2.6-microblaze.git] / include / linux / libnvdimm.h
index 03d5c3a..7a64b3d 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/types.h>
 #include <linux/uuid.h>
 #include <linux/spinlock.h>
+#include <linux/bio.h>
 
 struct badrange_entry {
        u64 start;
@@ -57,6 +58,9 @@ enum {
         */
        ND_REGION_PERSIST_MEMCTRL = 2,
 
+       /* Platform provides asynchronous flush mechanism */
+       ND_REGION_ASYNC = 3,
+
        /* mark newly adjusted resources as requiring a label update */
        DPA_RESOURCE_ADJUSTED = 1 << 0,
 };
@@ -113,6 +117,7 @@ struct nd_mapping_desc {
        int position;
 };
 
+struct nd_region;
 struct nd_region_desc {
        struct resource *res;
        struct nd_mapping_desc *mapping;
@@ -125,6 +130,7 @@ struct nd_region_desc {
        int target_node;
        unsigned long flags;
        struct device_node *of_node;
+       int (*flush)(struct nd_region *nd_region, struct bio *bio);
 };
 
 struct device;
@@ -252,10 +258,12 @@ unsigned long nd_blk_memremap_flags(struct nd_blk_region *ndbr);
 unsigned int nd_region_acquire_lane(struct nd_region *nd_region);
 void nd_region_release_lane(struct nd_region *nd_region, unsigned int lane);
 u64 nd_fletcher64(void *addr, size_t len, bool le);
-void nvdimm_flush(struct nd_region *nd_region);
+int nvdimm_flush(struct nd_region *nd_region, struct bio *bio);
+int generic_nvdimm_flush(struct nd_region *nd_region);
 int nvdimm_has_flush(struct nd_region *nd_region);
 int nvdimm_has_cache(struct nd_region *nd_region);
 int nvdimm_in_overwrite(struct nvdimm *nvdimm);
+bool is_nvdimm_sync(struct nd_region *nd_region);
 
 static inline int nvdimm_ctl(struct nvdimm *nvdimm, unsigned int cmd, void *buf,
                unsigned int buf_len, int *cmd_rc)