Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259171
b: refs/heads/master
c: e817513
h: refs/heads/master
i:
  259169: cd51e92
  259167: f5f0c05
v: v3
  • Loading branch information
Dave Kleikamp authored and Josh Boyer committed Jul 12, 2011
1 parent ede30da commit ac9f53f
Show file tree
Hide file tree
Showing 2 changed files with 23 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: 91b191c71eae79c0e652c52a968d06cd96b539c5
refs/heads/master: e817513b1b3399f7fe0b1d77046a71b845114378
23 changes: 22 additions & 1 deletion trunk/arch/powerpc/boot/treeboot-iss4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,29 @@

BSS_STACK(4096);

static u32 ibm4xx_memstart;

static void iss_4xx_fixups(void)
{
ibm4xx_sdram_fixup_memsize();
void *memory;
u32 reg[3];

memory = finddevice("/memory");
if (!memory)
fatal("Can't find memory node\n");
/* This assumes #address-cells = 2, #size-cells =1 and that */
getprop(memory, "reg", reg, sizeof(reg));
if (reg[2])
/* If the device tree specifies the memory range, use it */
ibm4xx_memstart = reg[1];
else
/* othersize, read it from the SDRAM controller */
ibm4xx_sdram_fixup_memsize();
}

static void *iss_4xx_vmlinux_alloc(unsigned long size)
{
return (void *)ibm4xx_memstart;
}

#define SPRN_PIR 0x11E /* Processor Indentification Register */
Expand All @@ -48,6 +68,7 @@ void platform_init(void)

simple_alloc_init(_end, avail_ram, 128, 64);
platform_ops.fixups = iss_4xx_fixups;
platform_ops.vmlinux_alloc = iss_4xx_vmlinux_alloc;
platform_ops.exit = ibm44x_dbcr_reset;
pir_reg = mfspr(SPRN_PIR);
fdt_set_boot_cpuid_phys(_dtb_start, pir_reg);
Expand Down

0 comments on commit ac9f53f

Please sign in to comment.