summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-11-07 08:31:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-11-07 08:31:47 +0100
commitded25480d8c5e56d9dcbf53a88d05f023b9740c4 (patch)
tree8691bdf7f0fc801b08b114204c83d25007eb8fba /include
parentb3055b0f6b1687089b914eb8cde5bbb73cfca7a1 (diff)
parent97607e85cdc44824e9617c74325bc9bc6405c383 (diff)
downloadbarebox-ded25480d8c5e56d9dcbf53a88d05f023b9740c4.tar.gz
barebox-ded25480d8c5e56d9dcbf53a88d05f023b9740c4.tar.xz
Merge branch 'for-next/rpi'
Diffstat (limited to 'include')
-rw-r--r--include/common.h11
-rw-r--r--include/fb.h8
-rw-r--r--include/of.h2
3 files changed, 20 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h
index 0f0ba08c44..00f1642cd5 100644
--- a/include/common.h
+++ b/include/common.h
@@ -192,6 +192,17 @@ int run_shell(void);
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
+/*
+ * The STACK_ALIGN_ARRAY macro is used to allocate a buffer on the stack that
+ * meets a minimum alignment requirement.
+ *
+ * Note that the size parameter is the number of array elements to allocate,
+ * not the number of bytes.
+ */
+#define STACK_ALIGN_ARRAY(type, name, size, align) \
+ char __##name[sizeof(type) * (size) + (align) - 1]; \
+ type *name = (type *)ALIGN((uintptr_t)__##name, align)
+
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
diff --git a/include/fb.h b/include/fb.h
index df4ba8ebe7..98d5a0382b 100644
--- a/include/fb.h
+++ b/include/fb.h
@@ -94,6 +94,7 @@ struct fb_info {
u32 xres; /* visible resolution */
u32 yres;
u32 bits_per_pixel; /* guess what */
+ u32 line_length; /* length of a line in bytes */
u32 grayscale; /* != 0 Graylevels instead of colors */
@@ -104,6 +105,9 @@ struct fb_info {
int enabled;
int p_enable;
+ int register_simplefb; /* If true a simplefb device node will
+ * be created.
+ */
};
int register_framebuffer(struct fb_info *info);
@@ -114,5 +118,9 @@ int register_framebuffer(struct fb_info *info);
extern struct bus_type fb_bus;
+/* fb internal functions */
+
+int fb_register_simplefb(struct fb_info *info);
+
#endif /* __FB_H */
diff --git a/include/of.h b/include/of.h
index 3381e69147..31834284c4 100644
--- a/include/of.h
+++ b/include/of.h
@@ -61,7 +61,7 @@ struct device_d;
struct driver_d;
int of_fix_tree(struct device_node *);
-int of_register_fixup(int (*fixup)(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);