diff options
author | Sean MacLennan <smaclennan@pikatech.com> | 2008-05-20 09:28:52 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-05-29 08:06:56 -0400 |
commit | 4ebef31fa6e013e5cd3d4522e6018eb6d55046be (patch) | |
tree | 78843ac145fe2e4c18de4809c2609df474068c88 /arch/powerpc/boot/cuboot-warp.c | |
parent | 0393cb615f369b6ea0e636dd4d1e25675657dc75 (diff) |
[POWERPC] PIKA Warp: Update platform code to support Rev B boards
* Switched from 64M NOR/64M NAND to 4M NOR/256M NAND.
* Full DTM support including critical temperature.
* Added POST information.
* Removed LED function, moved to new LED driver.
* Moved ad7414 to new style I2C initialization.
Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/boot/cuboot-warp.c')
-rw-r--r-- | arch/powerpc/boot/cuboot-warp.c | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/arch/powerpc/boot/cuboot-warp.c b/arch/powerpc/boot/cuboot-warp.c index eb108a877492..21780210057d 100644 --- a/arch/powerpc/boot/cuboot-warp.c +++ b/arch/powerpc/boot/cuboot-warp.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "ops.h" | 10 | #include "ops.h" |
11 | #include "4xx.h" | 11 | #include "4xx.h" |
12 | #include "cuboot.h" | 12 | #include "cuboot.h" |
13 | #include "stdio.h" | ||
13 | 14 | ||
14 | #define TARGET_4xx | 15 | #define TARGET_4xx |
15 | #define TARGET_44x | 16 | #define TARGET_44x |
@@ -17,14 +18,54 @@ | |||
17 | 18 | ||
18 | static bd_t bd; | 19 | static bd_t bd; |
19 | 20 | ||
20 | static void warp_fixups(void) | 21 | static void warp_fixup_one_nor(u32 from, u32 to) |
21 | { | 22 | { |
22 | unsigned long sysclk = 66000000; | 23 | void *devp; |
24 | char name[50]; | ||
25 | u32 v[2]; | ||
26 | |||
27 | sprintf(name, "/plb/opb/ebc/nor_flash@0,0/partition@%x", from); | ||
28 | |||
29 | devp = finddevice(name); | ||
30 | if (!devp) | ||
31 | return; | ||
32 | |||
33 | if (getprop(devp, "reg", v, sizeof(v)) == sizeof(v)) { | ||
34 | v[0] = to; | ||
35 | setprop(devp, "reg", v, sizeof(v)); | ||
36 | |||
37 | printf("NOR 64M fixup %x -> %x\r\n", from, to); | ||
38 | } | ||
39 | } | ||
40 | |||
23 | 41 | ||
24 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | 42 | static void warp_fixups(void) |
43 | { | ||
44 | ibm440ep_fixup_clocks(66000000, 11059200, 50000000); | ||
25 | ibm4xx_sdram_fixup_memsize(); | 45 | ibm4xx_sdram_fixup_memsize(); |
26 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 46 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
27 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); | 47 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
48 | |||
49 | /* Fixup for 64M flash on Rev A boards. */ | ||
50 | if (bd.bi_flashsize == 0x4000000) { | ||
51 | void *devp; | ||
52 | u32 v[3]; | ||
53 | |||
54 | devp = finddevice("/plb/opb/ebc/nor_flash@0,0"); | ||
55 | if (!devp) | ||
56 | return; | ||
57 | |||
58 | /* Fixup the size */ | ||
59 | if (getprop(devp, "reg", v, sizeof(v)) == sizeof(v)) { | ||
60 | v[2] = bd.bi_flashsize; | ||
61 | setprop(devp, "reg", v, sizeof(v)); | ||
62 | } | ||
63 | |||
64 | /* Fixup parition offsets */ | ||
65 | warp_fixup_one_nor(0x300000, 0x3f00000); | ||
66 | warp_fixup_one_nor(0x340000, 0x3f40000); | ||
67 | warp_fixup_one_nor(0x380000, 0x3f80000); | ||
68 | } | ||
28 | } | 69 | } |
29 | 70 | ||
30 | 71 | ||