Commit Graph

15 Commits (52b209f7b848a28987ed133dc2b48f304b1dc6b8)

Author SHA1 Message Date
Konrad Eisele e63829de3d sparc,leon: Added support for AMBAPP bus.
The device is a AMBA bus if it is a child of prom node "ambapp" (AMBA
plug and play). Two functions
leon_trans_init() and leon_node_init() (defined in
sparc/kernel/leon_kernel.c) are called in the
prom_build_tree() path if CONFIG_SPARC_LEON is
defined. leon_node_init() will build up the device
tree using AMBA plug and play. Also: a extra check was addes to
prom_common.c:build_one_prop()
in case a rom-node is undefined which can happen for SPARC-LEON
because it creates only a minimum
nodes to emulate sparc behaviour.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Reviewed-by:   Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-17 18:32:10 -07:00
David S. Miller bf944c370a sparc: Restore irq_trans_init() call in prom_create_node().
This broke sparc64 in various ways.

Add an empty dummy hook in sparc32's prom_32.c so that we
can potentially handle things on that side similarly, and
in particular avoid a prom_common.c ifdef :-)

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-07 00:46:33 -08:00
David S. Miller ad07aed8ca sparc: Move of_console_{device,path,options} info prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 18:17:08 -08:00
David S. Miller 23dc758e47 sparc: Move prom_build_devicetree() into prom_common.c
To make this work we provide a dummy nop implementation
of of_fill_in_cpu_data() for sparc32.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 18:16:48 -08:00
David S. Miller 6524036a1e sparc: Move core of OF device tree building code into prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 18:15:03 -08:00
David S. Miller 4aef8c53fe sparc: Match sparc32's build_tree() up to sparc64's
Sparc64 uses a non-recursive sibling traversal algorithm
that never got propagated into the sparc32 copy of this
code.

Sync them up.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:09:49 -08:00
David S. Miller 7d9439d50b sparc: Move create_node() and friends into prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:09:10 -08:00
David S. Miller 06c0db7221 sparc: Make sparc32's create_node() assign parent pointer.
This makes it match what sparc64's version does.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:08:23 -08:00
David S. Miller 59966e3b4e sparc: Commonize get_one_property() implementations.
Add final len assignment in sparc64's get_one_property() (it's necessary
to avoid unchecked return value warnings on the sparc32 side),
and mark name argument const on sparc32's copy.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:06:47 -08:00
David S. Miller b9e5567cda sparc: Move property building code into prom_common.c
Unfortunately there is some sparc32/sparc64 ifdef'ery in
here due to the difference in how the prom_firstprop()
and prom_nextprop() routines work.

This will be eliminated eventually.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:04:22 -08:00
David S. Miller e5ff0fe31d sparc: Move 'unique_id' into prom_common.c and rename to 'prom_unique_id'
This will be used in a subsequent changeset.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:03:30 -08:00
David S. Miller efeac2f876 sparc: Mark prom_early_alloc non-static.
A subsequent changeset will use this.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:01:27 -08:00
David S. Miller dfa76060be sparc: Create common area for OF device layer code.
This is where common code implementations will go as we unify
32-bit and 64-bit OF device tree code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:00:13 -08:00
David S. Miller 657f201df6 sparc: Create common header file for prom_{32,64}.c
This is where common declarations will go as we unify
these files as much as possible into common code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 16:44:29 -08:00
Sam Ravnborg d670bd4f80 sparc: prepare kernel/ for unification
o sparc32 files with identical names to sparc64 renamed to <name>_32.S
o introduced a few Kconfig helpers to simplify Makefile logic
o refactored Makefile to prepare for unification
  - use obj-$(CONFIG_SPARC32) for sparc32 specific files
  - use <name>_$(BITS) for files where sparc64 has a _64 variant
  - sparc64 directly include a few files where sparc32 builds them,
    refer to these files directly (no BITS)
  - sneaked in -Werror as used by sparc64
o modified sparc/Makefile to use the new names for head/init_task

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04 09:17:20 -08:00