Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60595
b: refs/heads/master
c: 32d7331
h: refs/heads/master
i:
  60593: 93847ed
  60591: d53932e
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Paul Mackerras committed Jun 28, 2007
1 parent ea32da1 commit 637b387
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4eb8cf0ae5e6e2d7531a3fc7088f7f638795ca6
refs/heads/master: 32d7331852a07d1f94c6d1b817c7c45648aa0fe7
31 changes: 30 additions & 1 deletion trunk/arch/powerpc/platforms/ps3/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ static void ps3_panic(char *str)
while(1);
}

#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
static void prealloc(struct ps3_prealloc *p)
{
if (!p->size)
Expand All @@ -123,7 +124,9 @@ static void prealloc(struct ps3_prealloc *p)
printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
p->address);
}
#endif

#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
struct ps3_prealloc ps3fb_videomemory = {
.name = "ps3fb videomemory",
.size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
Expand All @@ -146,6 +149,30 @@ early_param("ps3fb", early_parse_ps3fb);
#define prealloc_ps3fb_videomemory() do { } while (0)
#endif

#if defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
struct ps3_prealloc ps3flash_bounce_buffer = {
.name = "ps3flash bounce buffer",
.size = 256*1024,
.align = 256*1024
};
EXPORT_SYMBOL_GPL(ps3flash_bounce_buffer);
#define prealloc_ps3flash_bounce_buffer() prealloc(&ps3flash_bounce_buffer)

static int __init early_parse_ps3flash(char *p)
{
if (!p)
return 1;

if (!strcmp(p, "off"))
ps3flash_bounce_buffer.size = 0;

return 0;
}
early_param("ps3flash", early_parse_ps3flash);
#else
#define prealloc_ps3flash_bounce_buffer() do { } while (0)
#endif

static int ps3_set_dabr(u64 dabr)
{
enum {DABR_USER = 1, DABR_KERNEL = 2,};
Expand Down Expand Up @@ -175,6 +202,8 @@ static void __init ps3_setup_arch(void)
#endif

prealloc_ps3fb_videomemory();
prealloc_ps3flash_bounce_buffer();

ppc_md.power_save = ps3_power_save;

DBG(" <- %s:%d\n", __func__, __LINE__);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-powerpc/ps3.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ struct ps3_prealloc {
};

extern struct ps3_prealloc ps3fb_videomemory;
extern struct ps3_prealloc ps3flash_bounce_buffer;


#endif

0 comments on commit 637b387

Please sign in to comment.