summaryrefslogtreecommitdiff
path: root/include/fdt_support.h
AgeCommit message (Collapse)Author
2009-10-23fdt: Add fdt_fixup_nor_flash_size() to fixup NOR FLASH size in dtbStefan Roese
This function can be used to update the size in the "reg" property of the NOR FLASH device nodes. This is necessary for boards with non-fixed NOR FLASH sizes. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Gerald Van Baren <vanbaren@cideas.com> Acked-by: Wolfgang Denk <wd@denx.de>
2009-06-1283xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xxPeter Tyser
Use the standard lowercase "xx" capitalization that other Freescale architectures use for CPU defines to prevent confusion and errors Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-10-24fdt: Added helper to set PCI dma-ranges propertyKumar Gala
Added fdt_pci_dma_ranges() that parses the pci_region info from the struct pci_controller and populates the dma-ranges based on it. The max # of windws/dma-ranges we support is 3 since on embedded PowerPC based systems this is the max number of windows. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
2008-10-24fdt: Add fdt_getprop_u32_default helpersKumar Gala
Add helper functions to return find a node and return it's property or a default value. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2008-09-13powerpc: Fix bootm to boot up again with a RamdiskHeiko Schocher
Commit 2a1a2cb6 didnt remove the dummy mem reservation in fdt_chosen, and this stopped Linux from booting with a Ramdisk. This patch fixes this, by deleting the useless dummy mem reservation. When booting with a Ramdisk, a fix offset FDT_RAMDISK_OVERHEAD is now added to of_size, so we dont need anymore a dummy mem reservation. I measured the value of FDT_RAMDISK_OVERHEAD on a MPC8270 based system (=0x44 bytes) and rounded it up to 0x80). Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26fdt: refactor initrd related codeKumar Gala
Created a new fdt_initrd() to deal with setting the initrd properties in the device tree and fixing up the mem reserve. We can use this both in the choosen node handling and lets us remove some duplicated code when we fixup the initrd info in bootm on PPC. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26fdt: refactor fdt resize codeKumar Gala
Move the fdt resizing code out of ppc specific boot code and into common fdt support code. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26bootm: Set working fdt address as part of the bootm flowKumar Gala
Set the fdt working address so "fdt FOO" commands can be used as part of the bootm flow. Also set an the environment variable "fdtaddr" with the value. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21fdt: rework fdt_fixup_ethernet() to use env instead of bd_tKumar Gala
Move to using the environment variables 'ethaddr', 'eth1addr', etc.. instead of bd->bi_enetaddr, bi_enet1addr, etc. This makes the code a bit more flexible to the number of ethernet interfaces. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-14fdt: add crypto node handling for MPC8{3, 5}xxE processorsKim Phillips
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-03-2583xx/fdt_support: let user specifiy FSL USB Dual-Role controller roleAnton Vorontsov
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-26Remove deprecated CONFIG_OF_HAS_UBOOT_ENV and CONFIG_OF_HAS_BD_TJerry Van Baren
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-01-0985xx: add ability to upload QE firmwareTimur Tabi
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-08Add fdt_find_and_setprop() to fdt_support.hMatthias Fuchs
fdt_find_and_setprop() is used by several 4xx boards and it's missing in the appropriate header. This patch eliminates a warning when building U-Boot for such boards. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com> Acked-by: Stefan Roese <sr@denx.de>
2007-12-07Add common memory fixup functionKumar Gala
Add the function fdt_fixup_memory() to fixup the /memory node of the fdt Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21Add additional fdt fixup helper functionsKumar Gala
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-21Add fdt_fixup_ethernet helper to set mac addressesKumar Gala
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-21Move do_fixup* for libfdt into common codeKumar Gala
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-08-10Call ft_board_setup() from the bootm command.Gerald Van Baren
In the patch titled "Create new fdt boardsetup command..." I removed the call to ft_board_setup() from the routine fdt_chosen(), but I forgot to add a direct call back into cmd_bootm.c This fixes the oversight by adding the direct call to the bootm command. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2007-04-06Moved fdt command support code to fdt_support.cGerald Van Baren
...in preparation for improving the bootm command's handling of fdt blobs. Also cleaned up some coding sloppiness.