aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/prom.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-04-01MIPS: Let __dt_register_buses accept a single bus typeKevin Cernekee1-1/+4
Some machines only have one bus type to register (e.g. "simple-bus"). Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Cc: f.fainelli@gmail.com Cc: jaedon.shin@gmail.com Cc: abrestic@chromium.org Cc: tglx@linutronix.de Cc: jason@lakedaemon.net Cc: jogo@openwrt.org Cc: arnd@arndb.de Cc: computersforpeace@gmail.com Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8845/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-11-24MIPS: Create a helper function for DT setupKevin Cernekee1-0/+18
A couple of platforms register two buses and call of_platform_populate(). Move this into a common function to reduce duplication. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Cc: f.fainelli@gmail.com Cc: mbizon@freebox.fr Cc: jogo@openwrt.org Cc: jfraser@broadcom.com Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8167/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-04-30mips: convert fdt pointers to opaque pointersRob Herring1-1/+1
The architecture code does not need to access the internals of the FDT blob directly, so make the pointers to it void * and use char arrays for section variables. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Tested-by: Grant Likely <grant.likely@linaro.org>
2013-10-09mips: use common of_flat_dt_get_machine_nameRob Herring1-14/+1
Convert mips to use the common of_flat_dt_get_machine_name function. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Acked-by: John Crispin <blogic@openwrt.org>
2013-10-09of: remove early_init_dt_setup_initrd_archRob Herring1-10/+0
All arches do essentially the same thing now for early_init_dt_setup_initrd_arch, so it can now be removed. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Mark Salter <msalter@redhat.com> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Jonas Bonn <jonas@southpole.se> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Cc: Chris Zankel <chris@zankel.net> Cc: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Grant Likely <grant.likely@linaro.org>
2013-10-09mips: use early_init_dt_scanRob Herring1-36/+3
Convert mips to use new early_init_dt_scan function. Remove early_init_dt_scan_memory_arch Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Acked-by: John Crispin <blogic@openwrt.org>
2013-07-24of: Specify initrd location using 64-bitSantosh Shilimkar1-2/+1
On some PAE architectures, the entire range of physical memory could reside outside the 32-bit limit. These systems need the ability to specify the initrd location using 64-bit numbers. This patch globally modifies the early_init_dt_setup_initrd_arch() function to use 64-bit numbers instead of the current unsigned long. There has been quite a bit of debate about whether to use u64 or phys_addr_t. It was concluded to stick to u64 to be consistent with rest of the device tree code. As summarized by Geert, "The address to load the initrd is decided by the bootloader/user and set at that point later in time. The dtb should not be tied to the kernel you are booting" More details on the discussion can be found here: https://lkml.org/lkml/2013/6/20/690 https://lkml.org/lkml/2012/9/13/544 Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
2013-06-10MIPS: using strlcpy() instead of strncpy()Chen Gang1-1/+1
Ensure strings are always '\0' terminated. Or in the next pr_info() shit may hit the fan. Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: John Crispin <blogic@openwrt.org> Cc: david.daney@cavium.com Cc: linux-mips@linux-mips.org Cc: Linux-Arch <linux-arch@vger.kernel.org> Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> Patchwork: https://patchwork.linux-mips.org/patch/5331/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-08MIPS: move mips_{set,get}_machine_name() to a more generic placeJohn Crispin1-0/+33
Previously this functionality was only available to users of the mips_machine api. Moving the code to prom.c allows us to also add a OF wrapper. Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/5164/
2012-07-23MIPS: Prune some target specific code out of prom.cDavid Daney1-29/+0
This code is not common enough to be in a shared file. It is also not used by any existing boards, so just remove it. [ralf@linux-mips.org: Dropped removal of irq_create_of_mapping which was already removed by abd2363f6a5f1030b935e0bdc15cf917313b3b10 [irq_domain/mips: Allow irq_domain on MIPS]. Moved device_tree_init() and dependencies to its sole user, the XLP code.] Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: devicetree-discuss@lists.ozlabs.org Cc: grant.likely@secretlab.ca Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/2946/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-15MIPS: parse chosen node on bootJohn Crispin1-0/+2
Call early_init_devtree from inside __dt_setup_arch to allow parsing of the chosen node. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3718/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-15MIPS: Add helper function to allow platforms to point at a DTB.Ralf Baechle1-0/+11
Add __dt_setup_arch() that can be called to load a builtin DT. Additionally we add a macro to allow loading a specific symbol from the __dtb_* section. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3715/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-02-24irq_domain/mips: Allow irq_domain on MIPSGrant Likely1-14/+0
This patch makes IRQ_DOMAIN usable on MIPS. It uses an ugly workaround to preserve current behaviour so that MIPS has time to add irq_domain registration to the irq controller drivers. The workaround will be removed in Linux v3.6 Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org
2011-10-31mips: migrate core kernel file from module.h --> export.hPaul Gortmaker1-1/+1
These files are not modules, but were including module.h only for EXPORT_SYMBOL and/or THIS_MODULE. Now that we have the lightweight export.h, use it in these kinds of cases. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-05-11dt/flattree: explicitly pass command line pointer to early_init_dt_scan_chosenGrant Likely1-1/+2
This patch drops the reference to a global 'cmd_line' variable from early_init_dt_scan_chosen, and instead passes the pointer to the command line string via the *data argument. Each architecture does something slightly different with the initial command line, so it makes sense for the architecture to be able to specify the variable name. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-01-15dt/flattree: Return virtual address from early_init_dt_alloc_memory_arch()Grant Likely1-4/+2
The physical address is never used by the device tree code when allocating memory for unflattening. Change the architecture's alloc hook to return the virutal address instead. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-12-16MIPS: FDT size is a be32Thomas Chou1-1/+1
The totalsize field was be32. And the reserve bootmem would cause failure. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> To: devicetree-discuss@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: grant.likely@secretlab.ca Cc: David Daney <ddaney@caviumnetworks.com> Cc: Dezhong Diao <dediao@cisco.com> Patchwork: https://patchwork.linux-mips.org/patch/1838/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-10-21of/mips: Add device tree support to MIPSDezhong Diao1-0/+112
Add the ability to enable CONFIG_OF on the MIPS architecture. Signed-off-by: Dezhong Diao <dediao@cisco.com> [grant.likely@secretlab.ca: cleared out obsolete hooks, removed ARCH_HAS_DEVTREE_MEM, remove __init tags from header file, removed debugfs support hunk] [ddaney@linux-mips.org: backed out over aggressive trimming of hooks] Acked-by: Ralf Baechle <ralf@linux-mips.org> Tested-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>