diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
commit | e86908614f2c7fec401827e5cefd7a6ea9407f85 (patch) | |
tree | fcb5d9e52422b37bdaf0e647126ebdfc1680f162 /arch/powerpc/boot/ebony.c | |
parent | 547307420931344a868275bd7ea7a30f117a15a9 (diff) | |
parent | 9b4b8feb962f4b3e74768b7205f1f8f6cce87238 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits)
[POWERPC] Add memchr() to the bootwrapper
[POWERPC] Implement logging of unhandled signals
[POWERPC] Add legacy serial support for OPB with flattened device tree
[POWERPC] Use 1TB segments
[POWERPC] XilinxFB: Allow fixed framebuffer base address
[POWERPC] XilinxFB: Add support for custom screen resolution
[POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters
[POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci
[POWERPC] 4xx: Kilauea defconfig file
[POWERPC] 4xx: Kilauea DTS
[POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x
[POWERPC] 4xx: Add AMCC 405EX support to cputable.c
[POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable
[POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers
[POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig
[POWERPC] 85xx: Killed <asm/mpc85xx.h>
[POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS
[POWERPC] 85xx: Convert mpc8560ads to the new CPM binding.
[POWERPC] mpc8272ads: Remove muram from the CPM reg property.
[POWERPC] Make clockevents work on PPC601 processors
...
Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.
Diffstat (limited to 'arch/powerpc/boot/ebony.c')
-rw-r--r-- | arch/powerpc/boot/ebony.c | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c index 75daedafd0a4..86c0f5df0a86 100644 --- a/arch/powerpc/boot/ebony.c +++ b/arch/powerpc/boot/ebony.c | |||
@@ -24,12 +24,11 @@ | |||
24 | #include "page.h" | 24 | #include "page.h" |
25 | #include "ops.h" | 25 | #include "ops.h" |
26 | #include "reg.h" | 26 | #include "reg.h" |
27 | #include "io.h" | ||
27 | #include "dcr.h" | 28 | #include "dcr.h" |
29 | #include "4xx.h" | ||
28 | #include "44x.h" | 30 | #include "44x.h" |
29 | 31 | ||
30 | extern char _dtb_start[]; | ||
31 | extern char _dtb_end[]; | ||
32 | |||
33 | static u8 *ebony_mac0, *ebony_mac1; | 32 | static u8 *ebony_mac0, *ebony_mac1; |
34 | 33 | ||
35 | /* Calculate 440GP clocks */ | 34 | /* Calculate 440GP clocks */ |
@@ -92,15 +91,53 @@ void ibm440gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) | |||
92 | dt_fixup_clock("/plb/opb/serial@40000300", uart1); | 91 | dt_fixup_clock("/plb/opb/serial@40000300", uart1); |
93 | } | 92 | } |
94 | 93 | ||
94 | #define EBONY_FPGA_PATH "/plb/opb/ebc/fpga" | ||
95 | #define EBONY_FPGA_FLASH_SEL 0x01 | ||
96 | #define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash" | ||
97 | |||
98 | static void ebony_flashsel_fixup(void) | ||
99 | { | ||
100 | void *devp; | ||
101 | u32 reg[3] = {0x0, 0x0, 0x80000}; | ||
102 | u8 *fpga; | ||
103 | u8 fpga_reg0 = 0x0; | ||
104 | |||
105 | devp = finddevice(EBONY_FPGA_PATH); | ||
106 | if (!devp) | ||
107 | fatal("Couldn't locate FPGA node %s\n\r", EBONY_FPGA_PATH); | ||
108 | |||
109 | if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga)) | ||
110 | fatal("%s has missing or invalid virtual-reg property\n\r", | ||
111 | EBONY_FPGA_PATH); | ||
112 | |||
113 | fpga_reg0 = in_8(fpga); | ||
114 | |||
115 | devp = finddevice(EBONY_SMALL_FLASH_PATH); | ||
116 | if (!devp) | ||
117 | fatal("Couldn't locate small flash node %s\n\r", | ||
118 | EBONY_SMALL_FLASH_PATH); | ||
119 | |||
120 | if (getprop(devp, "reg", reg, sizeof(reg)) != sizeof(reg)) | ||
121 | fatal("%s has reg property of unexpected size\n\r", | ||
122 | EBONY_SMALL_FLASH_PATH); | ||
123 | |||
124 | /* Invert address bit 14 (IBM-endian) if FLASH_SEL fpga bit is set */ | ||
125 | if (fpga_reg0 & EBONY_FPGA_FLASH_SEL) | ||
126 | reg[1] ^= 0x80000; | ||
127 | |||
128 | setprop(devp, "reg", reg, sizeof(reg)); | ||
129 | } | ||
130 | |||
95 | static void ebony_fixups(void) | 131 | static void ebony_fixups(void) |
96 | { | 132 | { |
97 | // FIXME: sysclk should be derived by reading the FPGA registers | 133 | // FIXME: sysclk should be derived by reading the FPGA registers |
98 | unsigned long sysclk = 33000000; | 134 | unsigned long sysclk = 33000000; |
99 | 135 | ||
100 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); | 136 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); |
101 | ibm44x_fixup_memsize(); | 137 | ibm4xx_fixup_memsize(); |
102 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); | 138 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); |
103 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 139 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
140 | ebony_flashsel_fixup(); | ||
104 | } | 141 | } |
105 | 142 | ||
106 | void ebony_init(void *mac0, void *mac1) | 143 | void ebony_init(void *mac0, void *mac1) |