aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/prom.c
Commit message (Collapse)AuthorAgeFilesLines
* [SPARC]: Centralize find_in_proplist() instead of duplicating N times.David S. Miller2007-08-071-0/+15
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix serial console node string creation.David S. Miller2007-07-301-2/+3
| | | | | | | | | | The string setting code depends upon the original value of the "skip" variable, not the one that gets modified by the node traversal loop. Based upon a patch by Mark Fortescue. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix serial console device detection.David S. Miller2007-07-201-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | The current scheme works on static interpretation of text names, which is wrong. The output-device setting, for example, must be resolved via an alias or similar to a full path name to the console device. Paths also contain an optional set of 'options', which starts with a colon at the end of the path. The option area is used to specify which of two serial ports ('a' or 'b') the path refers to when a device node drives multiple ports. 'a' is assumed if the option specification is missing. This was caught by the UltraSPARC-T1 simulator. The 'output-device' property was set to 'ttya' and we didn't pick upon the fact that this is an OBP alias set to '/virtual-devices/console'. Instead we saw it as the first serial console device, instead of the hypervisor console. The infrastructure is now there to take advantage of this to resolve the console correctly even in multi-head situations in fbcon too. Thanks to Greg Onufer for the bug report. Signed-off-by: David S. Miller <davem@davemloft.net>
* Consolidate of_find_node_by routinesStephen Rothwell2007-07-201-60/+1
| | | | | | | | | | | This consolidates the routines of_find_node_by_path, of_find_node_by_name, of_find_node_by_type and of_find_compatible_device. Again, the comparison of strings are done differently by Sparc and PowerPC and also these add read_locks around the iterations. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
* Consolidate of_get_next_childStephen Rothwell2007-07-201-14/+0
| | | | | | | | This adds a read_lock around the child/next accesses on Sparc. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
* Consolidate of_get_parentStephen Rothwell2007-07-201-13/+0
| | | | | | | | | This requires creating dummy of_node_{get,put} routines for sparc and sparc64. It also adds a read_lock around the parent accesses. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
* Consolidate of_find_propertyStephen Rothwell2007-07-201-21/+1
| | | | | | | | | | | | The only change here is that a readlock is taken while the property list is being traversed on Sparc where it was not taken previously. Also, Sparc uses strcasecmp to compare property names while PowerPC uses strcmp. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
* Consolidate of_device_is_compatibleStephen Rothwell2007-07-201-21/+0
| | | | | | | | | The only difference here is that Sparc uses strncmp to match compatibility names while PowerPC uses strncasecmp. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
* Start split out of common open firmware codeStephen Rothwell2007-07-201-42/+0
| | | | | | | | | This creates drivers/of/base.c (depending on CONFIG_OF) and puts the first trivially common bits from the prom.c files into it. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Use strcasecmp for OFW property name comparisons.David S. Miller2007-04-261-2/+2
| | | | | | | | This allows us to simplify sharing code with powerpc which has properties that have various forms of capitalization when on the sparc64 side the property is all lower-case. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: constify some paramaters of OF routinesStephen Rothwell2007-04-261-3/+6
| | | | | | | | This starts bringing the PowerPC and Sparc implemetations back closer together. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC/64]: constify of_get_property returnStephen Rothwell2007-04-261-1/+1
| | | | | | | Finally, we actually change the functions themselves. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: constify of_get_property return: arch/sparcStephen Rothwell2007-04-261-3/+3
| | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC32]: Fix prom.c build warningMartin Habets2006-10-091-2/+5
| | | | | | | | | | | | | | Fix these 2.6.19-rc1 build warnings: CC arch/sparc/kernel/prom.o arch/sparc/kernel/prom.c: In function `of_set_property': arch/sparc/kernel/prom.c:246: warning: passing arg 2 of `prom_setprop' discards qualifiers from pointer target type arch/sparc/kernel/prom.c: In function `build_one_prop': arch/sparc/kernel/prom.c:446: warning: unused variable `len' arch/sparc/kernel/prom.c:480: warning: ignoring return value of `prom_getproperty', declared with attribute warn_unused_result Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix property name acquisition in prom.cBob Breuer2006-07-211-3/+6
| | | | | | | | | On sparc32 the prom_{first,next}prop() interfaces work a little differently. The buffer argument is ignored on sparc32 and the firmware just returns a raw pointer to the property name. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add of_n_{addr,size}_cells().David S. Miller2006-06-291-0/+30
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add unique device_node IDs and a ".node" property.David S. Miller2006-06-251-18/+35
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add of_set_property() interface.David S. Miller2006-06-251-0/+53
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Port sparc64 in-kernel device tree code to sparc32.David S. Miller2006-06-231-0/+474
Signed-off-by: David S. Miller <davem@davemloft.net>