aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/cuboot-mpc7448hpc2.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2008-02-06 13:18:34 -0500
committerPaul Mackerras <paulus@samba.org>2008-02-06 19:40:19 -0500
commit25431333813686654907ab987fb5de10c10a16db (patch)
treec641d4c3ffbf28ebd19b02f1103b9bbfb65a61fe /arch/powerpc/boot/cuboot-mpc7448hpc2.c
parent1daa6d08d1257aa61f376c3cc4795660877fb9e3 (diff)
[POWERPC] bootwrapper: Build multiple cuImages
Currently, the kernel uses CONFIG_DEVICE_TREE to wrap a kernel image with a fdt blob which means for any given configuration only one dts file can be selected and so support for only one board can be built This moves the selection of the default .dts file out of the kernel config and into the bootwrapper makefile. The makefile chooses which images to build based on the kernel config and the dts source file name is taken directly from the image name. For example "cuImage.ebony" will use "ebony.dts" as the device tree source file. In addition, this patch allows a specific image to be requested from the command line by adding "cuImage.%" and "treeImage.%" targets to the list of valid built targets in arch/powerpc/Makefile. This allows the default dts selection to be overridden. Another advantage to this change is it allows a single defconfig to be supplied for all boards using the same chip family and only differing in the device tree. Important note: This patch adds two new zImage targets; zImage.dtb.% and zImage.dtb.initrd.% for zImages with embedded dtb files. Currently there are 5 platforms which require this: ps3, ep405, mpc885ads, ep88xc, adder875-redboot and ep8248e. This patch *changes the zImage filenames* for those platforms. ie. 'zImage.ps3' is now 'zImage.dtb.ps3'. This new zImage.dtb targets were added so that the .dts file could be part of the dependancies list for building them. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/cuboot-mpc7448hpc2.c')
-rw-r--r--arch/powerpc/boot/cuboot-mpc7448hpc2.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/powerpc/boot/cuboot-mpc7448hpc2.c b/arch/powerpc/boot/cuboot-mpc7448hpc2.c
new file mode 100644
index 000000000000..1b8953259d75
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-mpc7448hpc2.c
@@ -0,0 +1,48 @@
1/*
2 * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
3 *
4 * Author: Roy Zang <tie-fei.zang@freescale.com>
5 *
6 * Description:
7 * Old U-boot compatibility for mpc7448hpc2 board
8 * Based on the code of Scott Wood <scottwood@freescale.com>
9 * for 83xx and 85xx.
10 *
11 * This is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 */
17
18#include "ops.h"
19#include "stdio.h"
20#include "cuboot.h"
21
22#define TARGET_HAS_ETH1
23#include "ppcboot.h"
24
25static bd_t bd;
26extern char _dtb_start[], _dtb_end[];
27
28static void platform_fixups(void)
29{
30 void *tsi;
31
32 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
33 dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
34 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
35 tsi = find_node_by_devtype(NULL, "tsi-bridge");
36 if (tsi)
37 setprop(tsi, "bus-frequency", &bd.bi_busfreq,
38 sizeof(bd.bi_busfreq));
39}
40
41void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
42 unsigned long r6, unsigned long r7)
43{
44 CUBOOT_INIT();
45 fdt_init(_dtb_start);
46 serial_console_init();
47 platform_ops.fixups = platform_fixups;
48}