1
0
Fork 0
Commit Graph

11 Commits (61e121047645122c47714fcda684d0ee67f444af)

Author SHA1 Message Date
Chen Gang 41c8366be8 MIPS: using strlcpy() instead of strncpy()
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-06-10 18:01:26 +02:00
John Crispin 9169a5d011 MIPS: move mips_{set,get}_machine_name() to a more generic place
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/
2013-05-08 01:19:07 +02:00
David Daney b01da9f130 MIPS: Prune some target specific code out of prom.c
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 abd2363f6a
[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-07-23 13:54:52 +01:00
John Crispin 40e91aec7d MIPS: parse chosen node on boot
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-15 17:49:20 +02:00
Ralf Baechle 7d6168e576 MIPS: Add helper function to allow platforms to point at a DTB.
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-05-15 17:49:19 +02:00
Grant Likely abd2363f6a irq_domain/mips: Allow irq_domain on MIPS
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
2012-02-24 09:47:23 -07:00
Paul Gortmaker 73bc256d47 mips: migrate core kernel file from module.h --> export.h
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-10-31 19:30:56 -04:00
Grant Likely 85f60ae4ee dt/flattree: explicitly pass command line pointer to early_init_dt_scan_chosen
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-05-11 14:53:18 +02:00
Grant Likely 672c54466d dt/flattree: Return virtual address from early_init_dt_alloc_memory_arch()
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>
2011-01-15 22:01:58 -07:00
Thomas Chou e31fee7c3a MIPS: FDT size is a be32
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-12-16 18:10:58 +00:00
Dezhong Diao f2ffa5ab74 of/mips: Add device tree support to MIPS
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>
2010-10-21 11:10:10 -06:00