History log of /linux-master/arch/sparc/include/asm/prom.h
Revision Date Author Comments
# 1dd5474e 29-Mar-2023 Rob Herring <robh@kernel.org>

of: Make devtree_lock declaration private

Sparc is the only place devtree_lock is used outside of drivers/of/.
Move the devtree_lock declaration into of_private.h and Sparc's prom.h
so pulling in spinlock.h to of.h can be avoided for everything besides
Sparc.

Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-1-581e2605fe47@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 00b7d1cf 29-Aug-2018 Rob Herring <robh@kernel.org>

of: make default address and size cells sizes private

Only some old OpenFirmware implementations rely on default sizes. Any
FDT and modern implementation should have explicit properties. Make the
OF_ROOT_NODE_*_CELLS_DEFAULT defines private so we don't get any outside
users.

This also gets us one step closer to removing the asm/prom.h dependency on
Sparc.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>


# f05a6865 16-May-2014 Sam Ravnborg <sam@ravnborg.org>

sparc: drop use of extern for prototypes in arch/sparc/include/asm

Drop extern for all prototypes and adjust alignment of parameters
as required after the removal.
In a few rare cases adjust linelength to conform to maximum 80 chars,
and likewise in a few rare cases adjust alignment of parameters
to static functions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4acf4b9c 16-Sep-2013 Rob Herring <rob.herring@calxeda.com>

of: move of_address_to_resource and of_iomap declarations from sparc

Move of_address_to_resource and of_iomap declarations to common code. These
only differ on sparc, but the declarations are the same and don't need to
be in arch header.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org


# 0c3f061c 17-Sep-2013 Rob Herring <rob.herring@calxeda.com>

of: implement of_node_to_nid as a weak function

Implement of_node_to_nid as weak function to remove the dependency on
asm/prom.h. This is in preparation to make prom.h optional.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@linaro.org>


# 0e622d39 22-Nov-2012 Andreas Larsson <andreas@gaisler.com>

of/address: sparc: Declare of_iomap as an extern function for sparc again

This bug-fix makes sure that of_iomap is defined extern for sparc so that the
sparc-specific implementation of_iomap is once again used when including
include/linux/of_address.h in a sparc context. OF_GPIO that is now available for
sparc relies on this.

The bug was inadvertently introduced in a850a75, "of/address: add empty static
inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when
!CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but
there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.

This fix takes the same approach as 0bce04b that solved the equivalent problem
for of_address_to_resource.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>


# 0bce04be 05-Nov-2012 Andreas Larsson <andreas@gaisler.com>

of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again

This bug-fix makes sure that of_address_to_resource is defined extern for sparc
so that the sparc-specific implementation of of_address_to_resource() is once
again used when including include/linux/of_address.h in a sparc context. A
number of drivers in mainline relies on this function working for sparc.

The bug was introduced in a850a7554442f08d3e910c6eeb4ee216868dda1e, "of/address:
add empty static inlines for !CONFIG_OF". Contrary to that commit title, the
static inlines are added for !CONFIG_OF_ADDRESS, and CONFIG_OF_ADDRESS is never
defined for sparc. This is good behavior for the other functions in
include/linux/of_address.h, as the extern functions defined in
drivers/of/address.c only gets linked when OF_ADDRESS is configured. However,
for of_address_to_resource there exists a sparc-specific implementation in
arch/sparc/arch/sparc/kernel/of_device_common.c

Solution suggested by: Sam Ravnborg <sam@ravnborg.org>

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d593f25f 24-Feb-2012 Grant Likely <grant.likely@secretlab.ca>

irq_domain: Centralize definition of irq_dispose_mapping()

Several architectures define their own empty irq_dispose_mapping(). Since
the irq_domain code is centralized now, there is little need to do so. This
patch removes them and creates a new empty copy when !CONFIG_IRQ_DOMAIN is
selected.

The patch also means that IRQ_DOMAIN becomes selectable on all architectures.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: sparclinux@vger.kernel.org
Cc: linux@lists.openrisc.net


# 60063497 26-Jul-2011 Arun Sharma <asharma@fb.com>

atomic: use <linux/atomic.h>

This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 3cfc535c 10-Oct-2010 Andres Salomon <dilinger@queued.net>

of/promtree: make drivers/of/pdt.c no longer sparc-only

Clean up pdt.c:
- make build dependent upon config OF_PROMTREE
- #ifdef out the sparc-specific stuff
- create pdt-specific header

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>


# 559e2b7e 23-Jul-2010 Grant Likely <grant.likely@secretlab.ca>

of: Provide default of_node_to_nid() implementation.

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>


# cd4cd730 22-Jul-2010 Grant Likely <grant.likely@secretlab.ca>

sparc: remove references to of_device and to_of_device

of_device is just a #define alias to platform_device. This patch
replaces all references to it with platform_device.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>


# 29596042 29-Jun-2010 Grant Likely <grant.likely@secretlab.ca>

of: remove asm/of_device.h

It is mostly unused now. Sparc has a few defines left in it, but they
can be moved to other headers. Removing this header means that new
architectures adding CONFIG_OF support don't need to also add this
header file.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>


# e3873444 18-Jun-2010 Grant Likely <grant.likely@secretlab.ca>

of/irq: Move irq_of_parse_and_map() to common code

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>


# 526b5b3e 15-Oct-2009 Grant Likely <grant.likely@secretlab.ca>

of: merge of_node_get(), of_node_put() and of_find_all_nodes()

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>


# 61e955db 15-Oct-2009 Grant Likely <grant.likely@secretlab.ca>

of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h

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>


# 6f192492 15-Oct-2009 Grant Likely <grant.likely@secretlab.ca>

of: merge struct device_node

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>


# 731581e6 15-Oct-2009 Grant Likely <grant.likely@secretlab.ca>

of: merge phandle, ihandle and struct property

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>


# 9d24c888 15-Oct-2009 Grant Likely <grant.likely@secretlab.ca>

of: Rework linux/of.h and asm/prom.h include ordering

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>


# 0fd7ef1f 16-Aug-2009 Konrad Eisele <konrad@gaisler.com>

sparc,leon: Introduce the sparc-leon CPU type.

Add sparc_leon enum, M_LEON|M_LEON3_SOC machine. Add compilation of
leon.c in mm and kernel
if CONFIG_SPARC_LEON is defined. Add sparc_leon dependent
initialization to switch statements + head.S.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 890db403 01-Apr-2009 David S. Miller <davem@davemloft.net>

sparc: Call OF and MD cpu scanning explicitly from paging_init()

We need to split up the cpu present mask setup from the cpu_data
initialization, and this is a first step towards that.

Signed-off-by: David S. Miller <davem@davemloft.net>


# 9bab5414 26-May-2009 David S. Miller <davem@davemloft.net>

sparc64: Refactor OBP cpu scanning code using an iterator.

With feedback from Sam Ravnborg.

Signed-off-by: David S. Miller <davem@davemloft.net>


# 51e0f004 25-Aug-2008 David S. Miller <davem@davemloft.net>

sparc64: Fix irq_of_parse_and_map() and irq_dispose_mapping().

Stephen Rothwell noticed that I committed an earlier version
of the patch that didn't have two things fixed:

1) irq_of_parse_and_map() should return "unsigned int" not "int"
and it should return zero for "no irq"

2) irq_dispose_mapping() should be an inline function, not a macro,
for type checking

With feedback and suggestions from Anton Vorontsov.

Signed-off-by: David S. Miller <davem@davemloft.net>


# 44266215 20-Aug-2008 David S. Miller <davem@davemloft.net>

sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().

This allows more OF layer code to be shared between powerpc and
sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>


# 2481d766 19-Aug-2008 David S. Miller <davem@davemloft.net>

sparc: Add mutex for set property calls.

On some platforms, the I2C controller is shared between the OS and
OBP. OBP uses this I2C controller to access the EEPROM, and thus is
programmed when the kernel calls prom_setprop().

Wrap such calls with the new of_set_property_mutex.

Relevant I2C bus drivers can grab this mutex around top-level I2C
operations to provide the proper protection.

Signed-off-by: David S. Miller <davem@davemloft.net>


# a439fe51 27-Jul-2008 Sam Ravnborg <sam@ravnborg.org>

sparc, sparc64: use arch/sparc/include

The majority of this patch was created by the following script:

***
ASM=arch/sparc/include/asm
mkdir -p $ASM
git mv include/asm-sparc64/ftrace.h $ASM
git rm include/asm-sparc64/*
git mv include/asm-sparc/* $ASM
sed -ie 's/asm-sparc64/asm/g' $ASM/*
sed -ie 's/asm-sparc/asm/g' $ASM/*
***

The rest was an update of the top-level Makefile to use sparc
for header files when sparc64 is being build.
And a small fixlet to pick up the correct unistd.h from
sparc64 code.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>