Commit Graph

104 Commits

Author SHA1 Message Date
Scott Wood
8941c0c495 [POWERPC] bootwrapper: Add ft_find_node_by_prop_value().
ft_find_node_by_prop_value() finds nodes with the specified
property/value pair.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-16 15:49:14 +11:00
Scott Wood
a9ec7669fc [POWERPC] bootwrapper: Make ft_get_parent() return a phandle, and NULL if already top-level.
Most of ft_get_parent() is factored out into __ft_get_parent(), which
deals only in internal node pointers.  The ft_get_parent() wrapper
handles phandle conversion in both directions (previously,
ft_get_parent() did not convert its return value).

It also now returns NULL as the parent of the toplevel node, rather than
just returning the toplevel node again (which made it rather useless in
loops).

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-16 15:49:11 +11:00
Scott Wood
c350038b2b [POWERPC] bootwrapper: Refactor ft_get_prop() into internal and external functions.
The property searching part of ft_get_prop is factored out into an
internal __ft_get_prop() which does not deal with phandles and does not
copy the property data.  ft_get_prop() is then a wrapper that does the
phandle translation and copying.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-16 15:49:10 +11:00
Scott Wood
fc58341161 [POWERPC] bootwrapper: Add ft_find_device_rel().
Add a function to look up a relative, rather than absolute, path name.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-16 15:49:08 +11:00
Scott Wood
5adeef52cc [POWERPC] bootwrapper: Use map_string() instead of lookup_string() in ft_prop().
When adding a property, the property name should be added to the string
table if it doesn't already exist.  map_string() does that;
lookup_string() will fail instead.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 21:15:58 +11:00
Scott Wood
9dd2c31ab8 [POWERPC] bootwrapper: Modify *pp, not *p, in ft_shuffle().
Move the caller's pointer back to match the change in the region's start,
rather than alter a byte of the device tree's content.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 21:15:55 +11:00
Scott Wood
78438b3601 [POWERPC] bootwrapper: Preserve the pp pointer in ft_make_space() when calling ft_reorder().
The ft_reorder() function may change the start of the region of interest,
so the pointer provided by the caller into that region must be fixed up
to still point to the same datum.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 21:15:52 +11:00
Scott Wood
c8aa72633e [POWERPC] bootwrapper: Make ft_get_phandle() accept and return NULL.
Currently, if ft_get_phandle() is passed NULL it will allocate an entry
for it and return a non-NULL phandle.  This patch makes it simply pass
the NULL through.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 21:15:50 +11:00
Scott Wood
1c53a496ba [POWERPC] bootwrapper: Rename ft_node_add() to ft_get_phandle().
This name better reflects what the function does, which is to
look up the phandle for an internal node pointer, and add it to the
internal pointer to phandle table if not found.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 21:15:46 +11:00
Scott Wood
7c71c04625 [POWERPC] bootwrapper: Add ft_root_node().
Clean up some of the open-coded data structure references by providing a
function to return a pointer to the tree's root node.  This is only used
in high-level functions trying to access the root of the tree, not in
low-level code that is actually manipulating the data structure.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 21:15:44 +11:00
Scott Wood
ce3edb30ec [POWERPC] bootwrapper: Add stddef.h to ops.h
ops.h references NULL, so include stddef.h, so files including ops.h
don't have to.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 21:15:42 +11:00
David Gibson
cd197ffcf1 [POWERPC] zImage: Cleanup and improve zImage entry point
This patch re-organises the way the zImage wrapper code is entered, to
allow more flexibility on platforms with unusual entry conditions.
After this patch, a platform .o file has two options:

1) It can define a _zimage_start, in which case the platform code gets
   control from the very beginning of execution.  In this case the
   platform code is responsible for relocating the zImage if necessary,
   clearing the BSS, performing any platform specific initialization, and
   finally calling start() to load and enter the kernel.

2) It can define platform_init().  In this case the generic crt0.S
   handles initial entry, and calls platform_init() before calling
   start().  The signature of platform_init() is changed, however, to
   take up to 5 parameters (in r3..r7) as they come from the platform's
   initial loader, instead of a fixed set of parameters based on OF's
   usage.

   When using the generic crt0.S, the platform .o can optionally
   supply a custom stack to use, using the BSS_STACK() macro.  If this
   is not supplied, the crt0.S will assume that the loader has
   supplied a usable stack.

In either case, the platform code communicates information to the
generic code (specifically, a PROM pointer for OF systems, and/or an
initrd image address supplied by the bootloader) via a global
structure "loader_info".

In addition the wrapper script is rearranged to ensure that the
platform .o is always linked first.  This means that platforms where
the zImage entry point is at a fixed address or offset, rather than
being encoded in the binary header can be supported using option (1).

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 13:35:03 +11:00
David Gibson
79c8541924 [POWERPC] zImage: Cleanup and improve prep_kernel()
This patch rewrites prep_kernel() in the zImage wrapper code to be
clearer and more flexible.  Notable changes:

	- Handling of the initrd image from prep_kernel() has moved
into a new prep_initrd() function.
	- The address of the initrd image is now added as device tree
properties, as the kernel expects.
	- We only copy a packaged initrd image to a new location if it
is in danger of being clobbered when the kernel moves to its final
location, instead of always.
	- By default we decompress the kernel directly to address 0,
instead of requiring it to relocate itself.  Platforms (such as OF)
where doing this could clobber still-live firmware data structures can
override the vmlinux_alloc hook to provide an alternate place to
decompress the kernel.
	- We no longer pass lots of information between functions in
global variables.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 13:35:01 +11:00
David Gibson
ad9d2716cf [POWERPC] zImage: Add more flexible gunzip convenience functions
At present, arch/powerpc/boot/main.c includes a gunzip() function
which is a convenient wrapper around zlib.  However, it doesn't
conveniently allow decompressing part of an image to one location,
then the remainder to a different address.

This patch adds a new set of more flexible convenience wrappers around
zlib, moving them to their own file, gunzip_util.c, in the process.
These wrappers allow decompressing sections of the compressed image to
different locations.  In addition, they transparently handle
uncompressed data, avoiding special case code to handle uncompressed
vmlinux images.

The patch also converts main.c to use the new wrappers, using the new
flexibility to avoid decompressing the vmlinux's ELF header twice as
we did previously.  That in turn means we avoid extending our
allocations for the vmlinux to allow space for the extra copy of the
ELF header.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 13:35:01 +11:00
Stuart Yoder
500798d48f [POWERPC] Remove unused, undocumented #cpus property from cpus node
The #cpus property is unused and undocumented and is therefore
being removed.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-09 15:03:24 +11:00
Kumar Gala
c2944612cf Merge branch '86xx' into for_paulus 2007-02-18 08:34:33 -06:00
Kumar Gala
6d9065d8af [POWERPC] 86xx: Cleaned up platform dts files
* Removed explicit linux,phandle usage. Use references and labels now
* Removed interrupts property from openpic node
* Removed interrupt-parent property from openpic node that pointed to itself

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Jon Loeliger <jdl@freescale.com>
2007-02-18 08:33:32 -06:00
Kumar Gala
56d7b79402 Merge branch '85xx' into for_paulus 2007-02-17 16:32:46 -06:00
Kumar Gala
5209487963 [POWERPC] 85xx: Cleaned up platform dts files
* Fixed up top level compatible property for all boards
* Removed explicit linux,phandle usage. Use references and labels now
* Fixed phy-phandles for TSEC3/4 in mpc8548cds.dts

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17 16:06:27 -06:00
Kumar Gala
be156bed9e [POWERPC] 83xx: Renamed MPC8323 MDS dts and defconfig to match other boards
Renamed the MPC8323 MDS and defconfig to match the naming convention followed
by other MDS boards.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17 10:16:18 -06:00
Kumar Gala
322d05a1c4 [POWERPC] 83xx: Updated and renamed MPC8360PB to MPC836x MDS
The MPC836x PB board is really just one part of the MPC836x MDS.  We currently
name all other PB boards as MDS.  Removed all references to PB and replaced
with MDS.  Additionally renamed the .dts to match the defconfig (mpc836x_mds*).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17 10:13:56 -06:00
Kumar Gala
d71a1dc62b [POWERPC] 83xx: Cleaned up 83xx platform dts files
* Fixed up top level compatible property for all boards
* Removed explicit linux,phandle usage. Use references and labels now
* Fixed interrupt sense attribute, some interrupts were marked edge, that are level

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-16 10:10:52 -06:00
Timur Tabi
32aed2a5ce [POWERPC] Delete boot-cpu property from all DTS files
The 'linux,boot-cpu' property is obsolete, so remove it from all of the DTS
files and from booting-without-of.txt.  The boot CPU is actually defined in
the device tree header, and U-Boot sets that field.  The device tree compiler
also complains if the property exists.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-16 14:00:20 +11:00
Kumar Gala
f909f10621 Merge branch '83xx' into for_paulus 2007-02-13 12:51:38 -06:00
Timur Tabi
8c4a013da8 [POWERPC] 83xx: Add support for MPC8349E-mITX-GP
This patch adds a defconfig and a DTS for the MPC8349E-mITX-GP, a variant of
the MPC8349E-mITX.

USB is disabled because the only USB port is not setup properly by
firmware/kernel

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-13 12:48:56 -06:00
Andy Fleming
c2882bb12c [POWERPC] 85xx: Add support for the 8568 MDS board
Add support for the MPC8568 MDS reference board

Signed-off-by: Andrew Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-13 12:36:23 -06:00
Grant Likely
05cbbc692f [POWERPC] mpc5200 device tree bindings refinement
Much needed refinement of mpc5200 device tree binding specifications.

Short list:
- drop mpc52xx designator; only two supported chips exist, 5200 and 5200b.
  It's premature to refer to them as '52xx'.
- Specify optional 'model' and 'revision' properties in the soc5200 node
- Specify reqiured 'cell-index' property to identify between multiple SOC
  devices of the same type.  (Useful for arbitrating shared register access)
- Specify optional 'port-number' property for adjusting the logical serial
  port assignments.
- Specify optional 'has-wdt' property for gpt0 node.
- Add system-frequency property to soc5200 node

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-13 15:35:53 +11:00
Guennadi Liakhovetski
8500adc79b [POWERPC] Update to linkstation / kurobox support
Linkstation systems capable of running mainline kernels use u-boot as a
bootloader, so, specifying a suitable kernel command is not a problem.
Don't guess. Also extend linkstation_defconfig to support the linkstation HS
model with a IT8212 IDE controller and kuroboxHD/HD-HLAN linkstation
models with a tulip ethernet chip. The latter also require a slightly
different .dts file, which is also included with this patch.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-09 11:41:18 -06:00
Kumar Gala
49baa91d68 [POWERPC] 83xx: Updated and renamed MPC834x SYS to MPC834x MDS
The MPC834x SYS board has always been called the MPC834x MDS since its public
release.  Removed all references to SYS and replaced with MDS.  Additionally
renamed the .dts to match the defconfig (mpc834x_mds*).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-09 11:39:46 -06:00
Li Yang
ea5b7a61b6 [POWERPC] 83xx: Added new dr_mode property for usb controller on 83xx
Added a new dr_mode property to describe what mode the DR controller is being
used in (host, device, OTG).  Updated the MPC8349E MDS dts with this new property.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-08 00:40:00 -06:00
Kim Phillips
b359049f27 [POWERPC] 83xx: Add base support for the MPC8313E RDB
Add support for the MPC8313E Reference Development Board (RDB).  The board
is a mini-ITX reference board with 128M DDR2, 8M flash, 32M NAND, USB, PCI,
gigabit ethernet, and serial.

Signed-off-by: Wilson Lo <Wilson.Lo@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-07 23:44:05 -06:00
Ishizaki Kou
c347b7989e [POWERPC] Celleb: basic support
This patch adds base support for Celleb platform.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Vitaly Bordug
5427828e83 [POWERPC] Fix kernel build errors for mpc8272ads and mpc8560ads
Recent update of asm-powerpc/io.h caused cpm-related stuff to break in the
current kernel. Current patch fixes it, as well as other inconsistencies
expressed, that do not permit targets from working properly:

- Updated dts with a chosen node with interrupt controller,
- fixed messed device IDs among CPM2 SoC devices,
- corrected odd header name and fixed type in defines,
- Added 82xx subdir to the powerpc/platforms Makefile, missed during
  initial commit,
- new solely-powerpc header file for 8260 family (was using one from
  arch/ppc, this one cleaned up from the extra stuff), in fact for now
  a placeholder to get the board-specific includes for stuff not yet
  capable to live with devicetree peeks only
- Fixed couple of misprints in reference mpc8272 dts.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:20 +11:00
Vitaly Bordug
73844ecbaa [POWERPC] cpm2: CPM2 interrupt controller fix
This contains important fixes for the CPM2 PIC code. Eliminated
CPM_IRQ_OFFSET, pulling the respective interrupt numbers from the interrupt
mapping. Updated devicetree files to reflect that. Changed direct
IC-related IO accesses to the IO accessors. Fixed all the sense values to
keep coherency with ipic. In the current code, CPM2 stuff will have no IRQs
and hence could be hardly usable.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:20 +11:00
Vitaly Bordug
29f1530f19 [POWERPC] Add mpc866ads board-specific bits to arch/powerpc
This add support of the Freescale mpc86xads reference board to
arch/powerpc. Supported SMC1 and SMC2 (UART and serial console), FEC
100Mbps Ethernet, SCC1 Ethernet (10Mbps hdx)

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Vitaly Bordug
df34403dca [POWERPC] 8xx: Add mpc885ads support and common mpc8xx files
This adds the core 8xx stuff and specifically mpc885ads board-specific
bits to arch/powerpc. Respective Kconfig has been cleaned up from the stuff
not yet ported over to avoid confusion. Updated and cleaned version.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Kim Phillips
18a1e4c3ee [POWERPC] 83xx: Add the mpc8323emds.dts
Add the mpc8323emds device tree source (dts)

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-30 16:23:58 -06:00
Grant Likely
121361f72c [POWERPC] Make it blatantly clear; mpc5200 device tree is not yet stable
Documentation-only change.  The 5200 device tree layout has not yet
stablized, so nobody should depend on the layout of the tree.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-22 21:27:35 +11:00
Grant Likely
a5b6ad6691 [POWERPC] Fix mpc52xx fdt to use correct device_type for sound devices
This corrects the documented interface for mpc52xx device trees.
Sound devices should be using 'sound' for the device_type field, not
the type of sound interface.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:02 +11:00
Benjamin Herrenschmidt
d28d027ab3 [POWERPC] Fix build of cell zImage.initrd
The patch adding support for zImage.ps3 didn't add a zImage.initrd.ps3
target causing builds of zImage.initrd to fail when ps3 is included in
the .config. The current method of generating ps3 images doesn't support
initrd's yet, so we create a dummy target that only displays a warning
message instead.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:48 +11:00
Geoff Levand
8a8944aab2 [POWERPC] ps3: add a default zImage target
Add a powerpc make target that can be loaded by the ps3 bootloader (kboot) and
set this as the default image to build for that platform.

Until the compressed zImage wrapper is made, this arranges for a stripped
vmlinux image to be built.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-05 11:28:17 +11:00
Guennadi Liakhovetski
04d76b937b [POWERPC] Linkstation / kurobox support
Support for the Kurobox(HG)/LinkStation-I NAS systems by Buffalo
Technology, should be also applicable to the PPC TeraStation family.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:42:08 +11:00
Geert Uytterhoeven
dc0f80aa6a [POWERPC] Clean images in arch/powerpc/boot
Add a rule to clean up the various generated image files in
arch/powerpc/boot.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:51 +11:00
Grant Likely
c6d4d657c2 [POWERPC] Add device trees for lite5200 and lite5200b eval boards
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:46 +11:00
Rutger Nijlunsing
06f2138e61 [POWERPC] Add files build to .gitignore
Mostly taken from corresponding Makefile's make-clean rule.

Tested by (cross)compiling for $ARCH PPC and POWERPC and checking
output of git-status.

Signed-off-by: Rutger Nijlunsing <git-commit@tux.tmfweb.nl>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:29 +11:00
Arnd Bergmann
4ec64d5686 [POWERPC] ps3: add a default zImage target
It's currently not possible to build the default zImage
target if PS3 is the only selected platform. This is
a hack to fall back to building the pseries style
zImage, so the build is successful. This will probably
change in the future, if someone writes a PS3 specific
boot wrapper.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:41:17 +11:00
Nicolas DET
7839af3354 [POWERPC] Compile a zImage.chrp if PPC_EFIKA seleted
Signed-off-by: Nicolas DET <nd@bplan-gmbh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:04 +11:00
David Gibson
35af89eb49 [POWERPC] Cleanup zImage handling of kernel entry with flat device tree
This makes 2 changes to clean up the flat device tree handling
logic in the zImage wrapper.

First, there were two callbacks from the dt_ops structure used for
producing a final flat tree to pass to the kerne: dt_ops.ft_pack()
which packed the flat tree (possibly a no-op) and dt_ops.ft_addr()
which retreived the address of the final blob.  Since they were only
ever called together, this patch combines the two into a single new
callback, dt_ops.finalize().  This new callback does whatever
platform-dependent things are necessary to produce a final flat device
tree blob, and returns the blob's addres.

Second, the current logic calls the kernel with a flat device tree if
one is build into the zImage wrapper, otherwise it boots the kernel
with a PROM pointer, expecting the kernel to copy the OF device tree
itself.  This approach precludes the possibility of the platform
wrapper code building a flat device tree from whatever
platform-specific information firmware provides.  Thus, this patch
takes the more sensible approach of invoking the kernel with a flat
tree if the dt_ops.finalize callback provides one (by whatever means).

So, the dt_ops.finalize callback can be NULL, or can be a function
which returns NULL.  In either case, the zImage wrapper logic assumes
that this is a platform with OF and invokes the kernel accordingly.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:39:34 +11:00
David Gibson
f79e083c2f [POWERPC] Small clarification of initrd handling
This patch makes the handling of the initrd (or initramfs) in the
zImage wrapper a little easier to follow.  Instead of passing the
initrd addresses out from prep_kernel() via the cryptic a1 and a2
parameters, use the global struct add_range, 'initrd'.  prep_kernel()
already passes information through the 'vmlinux' addr_range struct, so
this seems like a reasonable extension.

Some comments also clarify the logic with prep_kernel(): we use an
initrd included in the zImage if present, otherwise we use an initrd
passed in by the bootloader in the a1 and a2 parameters (yaboot, at
least, uses this mechanism to pass an initrd).

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:39:32 +11:00
Zang Roy-r61911
5873c9bdb0 [POWERPC] Make pci_read_irq_line the default on mpc7448hpc2 board
The following patch adds a tsi108/9 pci interrupt controller host.
On mpc7448hpc2 board, pci_irq_fixup function is removed, which makes the
pci_read_irq_line be the default pci irq fixup.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:39:27 +11:00