aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/prom.h
AgeCommit message (Collapse)Author
2011-02-04of/pci: move of_irq_map_pci() into generic codeSebastian Andrzej Siewior
There is a tiny difference between PPC32 and PPC64. Microblaze uses the PPC32 variant. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> [grant.likely@secretlab.ca: Added comment to #endif, moved documentation block to function implementation, fixed for non ppc and microblaze compiles] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-12-23of/address: use proper endianess in get_flagsSebastian Andrzej Siewior
This patch changes u32 to __be32 for all "ranges", "prop" and "addr" and such. Those variables are pointing to the device tree which contains integers in big endian format. Most functions are doing it right because of_read_number() is doing the right thing for them. of_bus_isa_get_flags(), of_bus_pci_get_flags() and of_bus_isa_map() were accessing the data directly and were doing it wrong. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-11-01of/net: Move of_get_mac_address() to a common source file.David Daney
There are two identical implementations of of_get_mac_address(), one each in arch/powerpc/kernel/prom_parse.c and arch/microblaze/kernel/prom_parse.c. Move this function to a new common file of_net.{c,h} and adjust all the callers to include the new header. Signed-off-by: David Daney <ddaney@caviumnetworks.com> [grant.likely@secretlab.ca: protect header with #ifdef] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-01of/address: Clean up function declarationsGrant Likely
This patch moves the declaration of of_get_address(), of_get_pci_address(), and of_pci_address_to_resource() out of arch code and into the common linux/of_address header file. This patch also fixes some of the asm/prom.h ordering issues. It still includes some header files that it ideally shouldn't be, but at least the ordering is consistent now so that of_* overrides work. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-07-30of: Provide default of_node_to_nid() implementation.Grant Likely
of_node_to_nid() is only relevant in a few architectures. Don't force everyone to implement it anyway. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-07-24of: remove asm/of_platform.hGrant Likely
Only thing left in it is of_instantiate_rtc() which can be moved to asm/prom.h on PowerPC and is unused in microblaze. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net>
2010-07-05of/address: Merge all of the bus translation codeGrant Likely
Microblaze and PowerPC share a large chunk of code for translating OF device tree data into usable addresses. Differences between the two consist of cosmetic differences, and the addition of dma-ranges support code to powerpc but not microblaze. This patch moves the powerpc version into common code and applies many of the cosmetic (non-functional) changes from the microblaze version. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Michal Simek <monstr@monstr.eu> CC: Wolfram Sang <w.sang@pengutronix.de> CC: Stephen Rothwell <sfr@canb.auug.org.au>
2010-07-05of/address: merge of_address_to_resource()Grant Likely
Merge common code between PowerPC and Microblaze. This patch also moves the prototype of pci_address_to_pio() out of pci-bridge.h and into prom.h because the only user of pci_address_to_pio() is of_address_to_resource(). Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Michal Simek <monstr@monstr.eu> CC: Stephen Rothwell <sfr@canb.auug.org.au>
2010-07-05of/address: merge of_iomap()Grant Likely
Merge common code between Microblaze and PowerPC. This patch creates new of_address.h and address.c files to containing address translation and mapping routines. First routine to be moved it of_iomap() Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Michal Simek <monstr@monstr.eu> CC: Stephen Rothwell <sfr@canb.auug.org.au>
2010-07-05of/irq: merge irq mapping codeGrant Likely
Merge common irq mapping code between PowerPC and Microblaze. This patch merges of_irq_find_parent(), of_irq_map_raw() and of_irq_map_one(). The functions are dependent on one another, so all three are merged in a single patch. Other than cosmetic difference (ie. DBG() vs. pr_debug()), the implementations are identical. of_irq_to_resource() is also merged, but in this case the implementations are different. This patch drops the microblaze version and uses the powerpc implementation unchanged. The microblaze version essentially open-coded irq_of_parse_and_map() which it does not need to do. Therefore the powerpc version is safe to adopt. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> CC: Michal Simek <monstr@monstr.eu> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Stephen Rothwell <sfr@canb.auug.org.au>
2010-07-05of/powerpc: Move Powermac irq quirk code into powermac pic driver codeGrant Likely
The code that figures out what is wrong with the powermac irq device tree data belongs with the rest of the powermac irq code. This patch moves it out of prom_parse.c and into powermac/pic.c so that it is only compiled in when actually needed. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28of/irq: Move irq_of_parse_and_map() to common codeGrant Likely
Merge common code between PowerPC and Microblaze. SPARC implements irq_of_parse_and_map(), but the implementation is different, so it does not use this code. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Michal Simek <monstr@monstr.eu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
2010-02-14of: remove undefined request_OF_resource & release_OF_resourceGrant Likely
Neither request_OF_resource or release_OF_resource are defined anywhere. Remove the declarations. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michal Simek <monstr@monstr.eu>
2010-02-14of: move definition of of_chosen into common code.Grant Likely
Rather than defining of_chosen in each arch, it can be defined for all in driver/of/base.c Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michal Simek <monstr@monstr.eu>
2010-02-14of: put default string compare and #a/s-cell values into common headerGrant Likely
Most architectures don't need to change these. Put them into common code to eliminate some duplication Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michal Simek <monstr@monstr.eu>
2010-02-09of: merge of_attach_node() & of_detach_node()Grant Likely
Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-15of: merge other miscellaneous prototypesGrant Likely
Merge common prototypes used by Microblaze and PowerPC Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: merge of_*_flat_dt*() functionsGrant Likely
Merge common flattened device tree code between Microblaze and PowerPC Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: merge of_node_get(), of_node_put() and of_find_all_nodes()Grant Likely
Merge common code between Sparc, PowerPC and Microblaze. Sparc differs in the implementation at this point, so this patch uses a #ifdef to handle sparc differently for now. The merging of implementations will occur in a later patch Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: merge of_read_number() an of_read_ulong()Grant Likely
Merge common code between Microblaze and PowerPC Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: merge of_node_*_flag() and set_node_proc_entry()Grant Likely
Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: merge struct boot_param_header from Microblaze and PowerPCGrant Likely
Merge common code for working with Flattened Device Tree data structure Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: add common header for flattened device tree representationGrant Likely
Add a common header file for working with the flattened device tree data structure and merge the shared data tags used by Microblaze and PowerPC Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: merge struct device_nodeGrant Likely
Merge of common code duplicated between Sparc, PowerPC and Microblaze Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: merge phandle, ihandle and struct propertyGrant Likely
Merge of common code duplicated between Sparc, PowerPC and Microblaze Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15of: Rework linux/of.h and asm/prom.h include orderingGrant Likely
In preparation to prune things out of the Sparc, PowerPC and Microblaze asm/prom.h files, change the #include statements to ensure that even if asm/prom.h is included first, linux/of.h gets to determine the order in which files are processed. This patch adds a #include <linux/of.h> to each of the prom.h files *above* the multi-include protection macros to ensure that linux/of.h can define things before prom.h gets processed. At the end of the merge the cross dependencies between the files should be gone and a sane #include scheme can be restored. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2008-12-21powerpc: Add of_find_next_cache_node()Nathan Lynch
We have more than one piece of code that looks up cache nodes manually using the "l2-cache" property. Add a common helper routine which does this and handles ePAPR's "next-level-cache" property as well as powermac. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-04powerpc: Move include files to arch/powerpc/include/asmStephen Rothwell
from include/asm-powerpc. This is the result of a mkdir arch/powerpc/include/asm git mv include/asm-powerpc/* arch/powerpc/include/asm Followed by a few documentation/comment fixups and a couple of places where <asm-powepc/...> was being used explicitly. Of the latter only one was outside the arch code and it is a driver only built for powerpc. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>