summaryrefslogtreecommitdiff
path: root/common/fdt_support.c
Commit message (Collapse)AuthorAgeLines
* Fix building of fdt_support.c if DEBUG setKumar Gala2008-02-13-3/+3
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* QE: Move FDT support into a common fileKumar Gala2008-02-12-48/+0
| | | | | | | 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>
* 85xx: add ability to upload QE firmwareTimur Tabi2008-01-09-0/+48
| | | | | | | | | | | 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>
* Fine grained per property /chosen updating.Gerald Van Baren2008-01-08-33/+40
| | | | | | | | | | 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>
* Conditionally compile fdt_fixup_ethernet()Gerald Van Baren2007-12-07-0/+4
| | | | | Fix compiler warnings: On boards that don't have ethernets defined, don't compile fdt_fixup_ethernet().
* Added fdt_fixup_stdout that uses aliases to set linux,stdout-pathKumar Gala2007-12-07-0/+43
| | | | | | | 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>
* Add common memory fixup functionKumar Gala2007-12-07-0/+78
| | | | | | Add the function fdt_fixup_memory() to fixup the /memory node of the fdt Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Conditionally compile fdt_support.cKumar Gala2007-12-07-5/+0
| | | | | | | Modify common/Makefile to conditionally compile fdt_support.c based on CONFIG_OF_LIBFDT. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Add additional fdt fixup helper functionsKumar Gala2007-11-21-0/+55
| | | | | | | | | | | 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>
* Add fdt_fixup_ethernet helper to set mac addressesKumar Gala2007-11-21-0/+46
| | | | | | | 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>
* Update libfdt from device tree compiler (dtc)Kumar Gala2007-11-21-23/+12
| | | | | | | Update libfdt to commit 8eaf5e358366017aa2e846c5038d1aa19958314e from the device tree compiler (dtc) project. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Move do_fixup* for libfdt into common codeKumar Gala2007-11-21-0/+23
| | | | | | | | | | 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>
* Removed some nonused fdt functions and moved fdt_find_and_setprop out of libfdtKumar Gala2007-11-21-0/+26
| | | | | | | | | | | | | | 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>
* fdt: suppress unused variable 'bd' warningKim Phillips2007-08-16-1/+0
| | | | Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* Improve error print messages.Gerald Van Baren2007-08-10-31/+21
| | | | Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
* Create new fdt boardsetup command, fix bug parsing [] form of set values.Gerald Van Baren2007-08-10-15/+0
| | | | | | | | | | | | 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>
* Tighten up the error messages.Gerald Van Baren2007-08-10-22/+11
| | | | Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
* Fix fdt_chosen() to call ft_board_setup(), clean up long lines.Gerald Van Baren2007-08-10-39/+74
| | | | | | | | | 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>
* Replace fdt_node_offset() with fdt_find_node_by_path().Gerald Van Baren2007-08-10-5/+5
| | | | | | | | 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>
* Minor code clean up.Gerald Van Baren2007-08-10-0/+5
| | | | | | | | 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>
* Improve error messages, more informative.Gerald Van Baren2007-08-10-13/+14
| | | | | | | | 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>
* Fix serious pointer bug with bootm and reserve map.Gerald Van Baren2007-04-19-2/+2
| | | | | | | 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.
* Improve the bootm command for CONFIG_OF_LIBFDTGerald Van Baren2007-04-14-5/+29
| | | | | | 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.
* Moved fdt command support code to fdt_support.cGerald Van Baren2007-04-06-0/+323
...in preparation for improving the bootm command's handling of fdt blobs. Also cleaned up some coding sloppiness.