summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-03-06 08:33:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-06 08:33:50 +0100
commit6bcfcece08a68e57e01de4087f8fd036194744f3 (patch)
tree50f6c680f03da3f8f3523d8cd99972eac66b41e4 /include
parent0e055c254c3eab40b52b3ac5f845a889bd281e05 (diff)
parent7cb9af239bee8ce5015dbec02c19b024ea672ce4 (diff)
downloadbarebox-6bcfcece08a68e57e01de4087f8fd036194744f3.tar.gz
barebox-6bcfcece08a68e57e01de4087f8fd036194744f3.tar.xz
Merge branch 'for-next/sandbox-of'
Diffstat (limited to 'include')
-rw-r--r--include/driver.h2
-rw-r--r--include/fs.h4
-rw-r--r--include/of.h28
3 files changed, 25 insertions, 9 deletions
diff --git a/include/driver.h b/include/driver.h
index 76fd4b1720..0ee3b4554f 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -331,8 +331,6 @@ struct driver_d *get_driver_by_name(const char *name);
struct cdev;
-int dev_protect(struct device_d *dev, size_t count, unsigned long offset, int prot);
-
/* These are used by drivers which work with direct memory accesses */
ssize_t mem_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, ulong flags);
ssize_t mem_write(struct cdev *cdev, const void *buf, size_t count, loff_t offset, ulong flags);
diff --git a/include/fs.h b/include/fs.h
index 63e35ca815..b8a95a20a7 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -147,8 +147,8 @@ int mount (const char *device, const char *fsname, const char *path,
int umount(const char *pathname);
/* not-so-standard functions */
-int erase(int fd, size_t count, unsigned long offset);
-int protect(int fd, size_t count, unsigned long offset, int prot);
+int erase(int fd, size_t count, loff_t offset);
+int protect(int fd, size_t count, loff_t offset, int prot);
int protect_file(const char *file, int prot);
void *memmap(int fd, int flags);
diff --git a/include/of.h b/include/of.h
index 2ad941864f..764a2e5939 100644
--- a/include/of.h
+++ b/include/of.h
@@ -61,7 +61,6 @@ struct device_d;
struct driver_d;
int of_fix_tree(struct device_node *);
-int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context);
int of_match(struct device_d *dev, struct driver_d *drv);
@@ -240,6 +239,11 @@ void of_add_memory_bank(struct device_node *node, bool dump, int r,
u64 base, u64 size);
struct device_d *of_find_device_by_node_path(const char *path);
int of_find_path(struct device_node *node, const char *propname, char **outpath);
+int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context);
+struct device_node *of_find_node_by_alias(struct device_node *root,
+ const char *alias);
+struct device_node *of_find_node_by_path_or_alias(struct device_node *root,
+ const char *str);
#else
static inline int of_parse_partitions(struct cdev *cdev,
struct device_node *node)
@@ -596,6 +600,24 @@ static inline struct device_d *of_device_enable_and_register_by_name(
{
return NULL;
}
+
+static inline int of_register_fixup(int (*fixup)(struct device_node *, void *),
+ void *context)
+{
+ return -ENOSYS;
+}
+
+static inline struct device_node *of_find_node_by_alias(
+ struct device_node *root, const char *alias)
+{
+ return NULL;
+}
+
+static inline struct device_node *of_find_node_by_path_or_alias(
+ struct device_node *root, const char *str)
+{
+ return NULL;
+}
#endif
#define for_each_node_by_name(dn, name) \
@@ -731,10 +753,6 @@ int of_device_disable_path(const char *path);
phandle of_get_tree_max_phandle(struct device_node *root);
phandle of_node_create_phandle(struct device_node *node);
int of_set_property_to_child_phandle(struct device_node *node, char *prop_name);
-struct device_node *of_find_node_by_alias(struct device_node *root,
- const char *alias);
-struct device_node *of_find_node_by_path_or_alias(struct device_node *root,
- const char *str);
static inline struct device_node *of_find_root_node(struct device_node *node)
{