Commit Graph

180 Commits

Author SHA1 Message Date
Kim Phillips
6b70ffb9d1 fdt: add crypto node handling for MPC8{3, 5}xxE processors
Delete the crypto node if not on an E-processor.  If on 8360 or 834x family,
check rev and up-rev crypto node (to SEC rev. 2.4 property values)
if on an 'EA' processor, e.g. MPC8349EA.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-07-14 17:01:29 -05:00
Detlev Zundel
4077781231 fdt: Fix typo in variable name.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-06-20 22:24:05 +02:00
Gerald Van Baren
ae9e97fa96 libfdt: Move the working_fdt pointer to cmd_fdt.c
The working_fdt pointer was declared in common/fdt_support.c but was
not used there.  Move it to common/cmd_fdt.c where it is used (it is
also used in lib_ppc/bootm.c).

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2008-06-10 22:23:23 -04:00
Kim Phillips
e489b9c078 fdt: unshadow global working fdt variable
differentiate with local variables of the same name by renaming the
global 'fdt' variable 'working_fdt'.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-06-10 22:23:17 -04:00
Anton Vorontsov
18e69a35ef 83xx/fdt_support: let user specifiy FSL USB Dual-Role controller role
Linux understands "host" (default), "peripheral" and "otg" (broken).
Though, U-Boot doesn't restrict dr_mode variable to these values (think
of renames in future).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-25 19:19:39 -05:00
Jerry Van Baren
43ddd9c820 Remove deprecated CONFIG_OF_HAS_UBOOT_ENV and CONFIG_OF_HAS_BD_T
These defines embedded the u-boot env variables and/or the bd_t structure
in the fdt blob.  The conclusion of discussion on the u-boot email list
was that embedding these in the fdt blob is not useful: there are better
ways of passing the data (in fact, the fdt blob itself replaces the
bd_t struct).

The only board that enables these is the stxxtc and they don't appear
to be used by linux.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-26 00:22:39 +01:00
Kumar Gala
d9ad115bbf Fix building of fdt_support.c if DEBUG set
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-13 23:58:18 +01:00
Kumar Gala
69018ce2e0 QE: Move FDT support into a common file
Move the flat device tree setup for QE related devices into
a common file shared between 83xx & 85xx platforms that have QE's.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-12 00:36:21 +01:00
Timur Tabi
b8ec238503 85xx: add ability to upload QE firmware
Define the layout of a binary blob that contains a QE firmware and instructions
on how to upload it.  Add function qe_upload_firmware() to parse the blob and
perform the actual upload.  Add command-line command "qe fw" to take a firmware
blob in memory and upload it.  Update ft_cpu_setup() on 85xx to create the
'firmware' device tree node if U-Boot has uploaded a firmware.  Fully define
'struct rsp' in immap_qe.h to include the actual RISC Special Registers.

Signed-off-by: Timur Tabi <timur@freescale.com>
2008-01-09 16:28:12 -06:00
Gerald Van Baren
b60af3d4c1 Fine grained per property /chosen updating.
Implement a suggestion by Scott Wood to make the /chosen handling fine
grained.  Don't overwrite pre-existing properties on a per-property basis,
so if /chosen exists but a necessary /chosen/property doesn't, it gets
created.  If a /chosen property exists, it is NOT overwritten unless the
"force" flag is true.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2008-01-08 15:03:29 -05:00
Gerald Van Baren
c01b17dd85 Conditionally compile fdt_fixup_ethernet()
Fix compiler warnings: On boards that don't have ethernets defined,
don't compile fdt_fixup_ethernet().
2007-12-07 20:51:25 -05:00
Kumar Gala
151c8b09b3 Added fdt_fixup_stdout that uses aliases to set linux,stdout-path
We use a combination of the serialN alias and CONFIG_CONS_INDEX to
determine which serial alias we should set linux,stdout-path to.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-07 20:51:25 -05:00
Kumar Gala
3c9272813f Add common memory fixup function
Add the function fdt_fixup_memory() to fixup the /memory node of the fdt

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-07 20:51:25 -05:00
Kumar Gala
9c9109e7fc Conditionally compile fdt_support.c
Modify common/Makefile to conditionally compile fdt_support.c based
on CONFIG_OF_LIBFDT.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-07 20:51:25 -05:00
Kumar Gala
9eb77cea1f Add additional fdt fixup helper functions
Added the following fdt fixup helpers:
 * do_fixup_by_prop{_u32} - Find matching nodes by property name/value
 * do_fixup_by_compat{_u32} - Find matching nodes by compat

The _u32 variants work the same only the property they are setting
is know to be a 32-bit integer instead of a byte buffer.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 15:11:58 -06:00
Kumar Gala
ab544633ab Add fdt_fixup_ethernet helper to set mac addresses
Added a fixup helper that uses aliases to set mac addresses
in the device tree based on the bd_t

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 15:08:56 -06:00
Kumar Gala
8d04f02f62 Update libfdt from device tree compiler (dtc)
Update libfdt to commit 8eaf5e358366017aa2e846c5038d1aa19958314e from
the device tree compiler (dtc) project.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 14:04:05 -06:00
Kumar Gala
e93becf80d Move do_fixup* for libfdt into common code
Moved the generic fixup handling code out of cpu/mpc5xxx and cpu/mpc8260
into common/fdt_support.c and renamed:

do_fixup()	-> do_fixup_by_path()
do_fixup_u32() 	-> do_fixup_by_path_u32()

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 14:01:49 -06:00
Kumar Gala
a3c2933e02 Removed some nonused fdt functions and moved fdt_find_and_setprop out of libfdt
Removed:
	fdt_node_is_compatible
	fdt_find_node_by_type
	fdt_find_compatible_node

To ease merge of newer libfdt as we aren't using them anywhere at this time.

Also moved fdt_find_and_setprop out of libfdt into fdt_support.c for the same
reason.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 14:01:49 -06:00
Kim Phillips
d35b508a55 fdt: suppress unused variable 'bd' warning
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2007-08-16 12:19:28 +02:00
Gerald Van Baren
5fe6be6208 Improve error print messages.
Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2007-08-10 19:21:37 -04:00
Gerald Van Baren
fd61e55dd8 Create new fdt boardsetup command, fix bug parsing [] form of set values.
Previously ft_board_setup() was called by fdt_chosen() which was not
really correctly structured.  This splits ft_board_setup() out by creating
a new fdt boardsetup command.

Fix a bug when parsing fdt set command values which have the square
bracket form [00 11 22 33] - the length was updated incorrectly in when
parsing that form.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2007-08-10 19:21:36 -04:00
Gerald Van Baren
6f35ded9e8 Tighten up the error messages.
Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2007-08-10 19:21:36 -04:00
Gerald Van Baren
35ec398f16 Fix fdt_chosen() to call ft_board_setup(), clean up long lines.
The fdt_chosen() function was adding/seting some properties ad-hoc
  improperly and duplicated (poorly) what was done in ft_board_setup()

Clean up long lines (setting properties, printing errors).

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2007-08-10 19:21:36 -04:00
Gerald Van Baren
1a861169bc Replace fdt_node_offset() with fdt_find_node_by_path().
The new name matches more closely the kernel's name, which is also
a much better description.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2007-08-10 19:21:36 -04:00
Gerald Van Baren
bb930e76fe Minor code clean up.
Declare the variable fdt properly as extern.
Call the "set_fn" function pointer the "short way" without the full
  dereferencing syntax.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2007-08-10 19:21:35 -04:00
Gerald Van Baren
ba24e2ac3b Improve error messages, more informative.
Print more than the raw libfdt error message strings.  This is especially
useful for cluing in the user when the bootm command aborts due to
blob problems.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2007-08-10 19:21:35 -04:00
Gerald Van Baren
7651f8bdbb Fix serious pointer bug with bootm and reserve map.
What was suppose to be a stack variable was declared as a pointer,
  overwriting random memory.
Also moved the libfdt.a requirement into the main Makefile.  That is
  The U-Boot Way.
2007-04-19 23:14:39 -04:00
Gerald Van Baren
c28abb9c61 Improve the bootm command for CONFIG_OF_LIBFDT
In bootm, create the "/chosen" node only if it doesn't already exist
  (better matches the previous behavior).
Update for proper reserved memory map handling for initrd.
2007-04-14 22:51:24 -04:00
Gerald Van Baren
64dbbd40c5 Moved fdt command support code to fdt_support.c
...in preparation for improving the bootm command's handling of fdt blobs.
Also cleaned up some coding sloppiness.
2007-04-06 14:19:43 -04:00