summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h7
-rw-r--r--include/filetype.h1
-rw-r--r--include/linux/mtd/nand.h20
-rw-r--r--include/of.h10
-rw-r--r--include/pinctrl.h35
-rw-r--r--include/usb/usb.h1
6 files changed, 60 insertions, 14 deletions
diff --git a/include/common.h b/include/common.h
index e559b94a71..59fcd35ac1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -219,7 +219,12 @@ int run_shell(void);
#define PAGE_ALIGN(s) (((s) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
#define PAGE_ALIGN_DOWN(x) ((x) & ~(PAGE_SIZE - 1))
-int memory_display(char *addr, loff_t offs, ulong nbytes, int size, int swab);
+int memory_display(char *addr, loff_t offs, unsigned nbytes, int size, int swab);
+
+int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
+ char **sourcefile, char **destfile, int *swab);
+int open_and_lseek(const char *filename, int mode, loff_t pos);
+#define RW_BUF_SIZE (unsigned)4096
extern const char version_string[];
#ifdef CONFIG_BANNER
diff --git a/include/filetype.h b/include/filetype.h
index 78ca5d2043..ee777acf99 100644
--- a/include/filetype.h
+++ b/include/filetype.h
@@ -31,6 +31,7 @@ enum filetype {
const char *file_type_to_string(enum filetype f);
const char *file_type_to_short_string(enum filetype f);
+enum filetype file_detect_partition_table(const void *_buf, size_t bufsize);
enum filetype file_detect_type(const void *_buf, size_t bufsize);
enum filetype file_name_detect_type(const char *filename);
enum filetype is_fat_or_mbr(const unsigned char *sector, unsigned long *bootsec);
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index dc141a5186..25bae631e5 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -500,15 +500,17 @@ struct nand_chip {
/*
* NAND Flash Manufacturer ID Codes
*/
-#define NAND_MFR_TOSHIBA 0x98
-#define NAND_MFR_SAMSUNG 0xec
-#define NAND_MFR_FUJITSU 0x04
-#define NAND_MFR_NATIONAL 0x8f
-#define NAND_MFR_RENESAS 0x07
-#define NAND_MFR_STMICRO 0x20
-#define NAND_MFR_HYNIX 0xad
-#define NAND_MFR_MICRON 0x2c
-#define NAND_MFR_AMD 0x01
+#define NAND_MFR_TOSHIBA 0x98
+#define NAND_MFR_SAMSUNG 0xec
+#define NAND_MFR_FUJITSU 0x04
+#define NAND_MFR_NATIONAL 0x8f
+#define NAND_MFR_RENESAS 0x07
+#define NAND_MFR_STMICRO 0x20
+#define NAND_MFR_HYNIX 0xad
+#define NAND_MFR_MICRON 0x2c
+#define NAND_MFR_AMD 0x01
+#define NAND_MFR_MACRONIX 0xc2
+#define NAND_MFR_EON 0x92
/**
* struct nand_flash_dev - NAND Flash Device ID Structure
diff --git a/include/of.h b/include/of.h
index 94ccfd8739..4dcf37e140 100644
--- a/include/of.h
+++ b/include/of.h
@@ -26,6 +26,7 @@ struct device_node {
struct list_head parent_list;
struct list_head list;
struct resource *resource;
+ int num_resource;
struct device_d *device;
struct list_head phandles;
phandle phandle;
@@ -160,6 +161,8 @@ void of_delete_property(struct property *pp);
int of_property_read_string(struct device_node *np, const char *propname,
const char **out_string);
+int of_property_read_string_index(struct device_node *np, const char *propname,
+ int index, const char **output);
int of_set_property(struct device_node *node, const char *p, const void *val, int len,
int create);
struct device_node *of_create_node(struct device_node *root, const char *path);
@@ -167,9 +170,10 @@ struct device_node *of_create_node(struct device_node *root, const char *path);
struct device_node *of_get_root_node(void);
int of_set_root_node(struct device_node *);
+struct cdev;
+
#ifdef CONFIG_OFTREE
-int of_parse_partitions(const char *cdevname,
- struct device_node *node);
+int of_parse_partitions(struct cdev *cdev, struct device_node *node);
int of_alias_get_id(struct device_node *np, const char *stem);
int of_device_is_stdout_path(struct device_d *dev);
@@ -177,7 +181,7 @@ const char *of_get_model(void);
void *of_flatten_dtb(struct device_node *node);
int of_add_memory(struct device_node *node, bool dump);
#else
-static inline int of_parse_partitions(const char *cdevname,
+static inline int of_parse_partitions(struct cdev *cdev,
struct device_node *node)
{
return -EINVAL;
diff --git a/include/pinctrl.h b/include/pinctrl.h
new file mode 100644
index 0000000000..7323f8b2f2
--- /dev/null
+++ b/include/pinctrl.h
@@ -0,0 +1,35 @@
+#ifndef PINCTRL_H
+#define PINCTRL_H
+
+struct pinctrl_device;
+
+struct pinctrl_ops {
+ int (*set_state)(struct pinctrl_device *, struct device_node *);
+};
+
+struct pinctrl_device {
+ struct device_d *dev;
+ struct pinctrl_ops *ops;
+ struct list_head list;
+ struct device_node *node;
+};
+
+int pinctrl_register(struct pinctrl_device *pdev);
+void pinctrl_unregister(struct pinctrl_device *pdev);
+
+#ifdef CONFIG_PINCTRL
+int pinctrl_select_state(struct device_d *dev, const char *state);
+int pinctrl_select_state_default(struct device_d *dev);
+#else
+static inline int pinctrl_select_state(struct device_d *dev, const char *state)
+{
+ return -ENODEV;
+}
+
+static inline int pinctrl_select_state_default(struct device_d *dev)
+{
+ return -ENODEV;
+}
+#endif
+
+#endif /* PINCTRL_H */
diff --git a/include/usb/usb.h b/include/usb/usb.h
index afccf706d7..b2700127f3 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -196,7 +196,6 @@ struct usb_driver {
extern struct bus_type usb_bus_type;
int usb_driver_register(struct usb_driver *);
-int usb_driver_unregister(struct usb_driver *);
struct usb_host {
int (*init)(struct usb_host *);