summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/prom.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-20 06:56:35 +0200
committerDavid S. Miller <davem@davemloft.net>2008-08-25 05:33:55 +0200
commit2481d76615d5e15340ccfb0243fe8779766dfc6e (patch)
tree2d047756426224d741388b4c557151f9a7cb8335 /arch/sparc/include/asm/prom.h
parentsparc64: Add JBUS NUMA detection. (diff)
downloadlinux-2481d76615d5e15340ccfb0243fe8779766dfc6e.tar.xz
linux-2481d76615d5e15340ccfb0243fe8779766dfc6e.zip
sparc: Add mutex for set property calls.
On some platforms, the I2C controller is shared between the OS and OBP. OBP uses this I2C controller to access the EEPROM, and thus is programmed when the kernel calls prom_setprop(). Wrap such calls with the new of_set_property_mutex. Relevant I2C bus drivers can grab this mutex around top-level I2C operations to provide the proper protection. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/prom.h')
-rw-r--r--arch/sparc/include/asm/prom.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index fd55522481cd..b5efc4d85234 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -18,6 +18,7 @@
*/
#include <linux/types.h>
#include <linux/proc_fs.h>
+#include <linux/mutex.h>
#include <asm/atomic.h>
#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2
@@ -73,6 +74,7 @@ struct of_irq_controller {
extern struct device_node *of_find_node_by_cpuid(int cpuid);
extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
+extern struct mutex of_set_property_mutex;
extern int of_getintprop_default(struct device_node *np,
const char *name,
int def);