]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/prom.h
[PATCH] splice: fix pipe_to_file() ->prepare_write() error path
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / prom.h
index 7a457bd462a27312dff6b2c53fc8b23d657818be..5246297693369d677ca698ca3e2cc795e2f1faf4 100644 (file)
@@ -197,7 +197,7 @@ extern int release_OF_resource(struct device_node* node, int index);
  */
 
 
-/* Helper to read a big number */
+/* Helper to read a big number; size is in cells (not bytes) */
 static inline u64 of_read_number(const u32 *cell, int size)
 {
        u64 r = 0;
@@ -206,6 +206,16 @@ static inline u64 of_read_number(const u32 *cell, int size)
        return r;
 }
 
+/* Like of_read_number, but we want an unsigned long result */
+#ifdef CONFIG_PPC32
+static inline unsigned long of_read_ulong(const u32 *cell, int size)
+{
+       return cell[size-1];
+}
+#else
+#define of_read_ulong(cell, size)      of_read_number(cell, size)
+#endif
+
 /* Translate an OF address block into a CPU physical address
  */
 #define OF_BAD_ADDR    ((u64)-1)
@@ -276,6 +286,7 @@ extern void of_irq_map_init(unsigned int flags);
  * of_irq_map_raw - Low level interrupt tree parsing
  * @parent:    the device interrupt parent
  * @intspec:   interrupt specifier ("interrupts" property of the device)
+ * @ointsize:   size of the passed in interrupt specifier
  * @addr:      address specifier (start of "reg" property of the device)
  * @out_irq:   structure of_irq filled by this function
  *
@@ -289,7 +300,8 @@ extern void of_irq_map_init(unsigned int flags);
  */
 
 extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec,
-                         const u32 *addr, struct of_irq *out_irq);
+                         u32 ointsize, const u32 *addr,
+                         struct of_irq *out_irq);
 
 
 /**