aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2009-06-10 00:39:06 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-15 02:47:26 -0400
commita4e623fbc9b201930abcf78df6db5e49aa8e00cb (patch)
tree60017689df8260806cba7c007f9f9d85e3758b31 /arch/powerpc/include/asm
parent47cb996b059e0e5696b8daa1f62881a6462a251a (diff)
ps3: Replace direct file operations by callback
Currently the FLASH database is updated by the kernel using file operations, meant for userspace only. While this works for us because copy_{from,to}_user() on powerpc can handle kernel pointers, this is unportable and a bad example. Replace the file operations by callbacks, registered by the ps3flash driver. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/ps3.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 7660694ab3ca..7f065e178ec4 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -53,6 +53,13 @@ enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
53extern u64 ps3_os_area_get_rtc_diff(void); 53extern u64 ps3_os_area_get_rtc_diff(void);
54extern void ps3_os_area_set_rtc_diff(u64 rtc_diff); 54extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
55 55
56struct ps3_os_area_flash_ops {
57 ssize_t (*read)(void *buf, size_t count, loff_t pos);
58 ssize_t (*write)(const void *buf, size_t count, loff_t pos);
59};
60
61extern void ps3_os_area_flash_register(const struct ps3_os_area_flash_ops *ops);
62
56/* dma routines */ 63/* dma routines */
57 64
58enum ps3_dma_page_size { 65enum ps3_dma_page_size {