cregit-Linux how code gets into the kernel

Release 4.10 arch/mips/fw/arc/tree.c

Directory: arch/mips/fw/arc
/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * PROM component device tree code.
 *
 * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
 * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
 * Copyright (C) 1999 Silicon Graphics, Inc.
 */
#include <linux/init.h>
#include <asm/fw/arc/types.h>
#include <asm/sgialib.h>


#undef DEBUG_PROM_TREE


pcomponent * __init ArcGetPeer(pcomponent *Current) { if (Current == PROM_NULL_COMPONENT) return PROM_NULL_COMPONENT; return (pcomponent *) ARC_CALL1(next_component, Current); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git2165.62%266.67%
ralf baechleralf baechle1134.38%133.33%
Total32100.00%3100.00%


pcomponent * __init ArcGetChild(pcomponent *Current) { return (pcomponent *) ARC_CALL1(child_component, Current); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git1356.52%266.67%
ralf baechleralf baechle1043.48%133.33%
Total23100.00%3100.00%


pcomponent * __init ArcGetParent(pcomponent *Current) { if (Current == PROM_NULL_COMPONENT) return PROM_NULL_COMPONENT; return (pcomponent *) ARC_CALL1(parent_component, Current); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git2165.62%266.67%
ralf baechleralf baechle1134.38%133.33%
Total32100.00%3100.00%


LONG __init ArcGetConfigurationData(VOID *Buffer, pcomponent *Current) { return ARC_CALL2(component_data, Buffer, Current); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git1458.33%266.67%
ralf baechleralf baechle1041.67%133.33%
Total24100.00%3100.00%


pcomponent * __init ArcAddChild(pcomponent *Current, pcomponent *Template, VOID *ConfigurationData) { return (pcomponent *) ARC_CALL3(child_add, Current, Template, ConfigurationData); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git2057.14%266.67%
ralf baechleralf baechle1542.86%133.33%
Total35100.00%3100.00%


LONG __init ArcDeleteComponent(pcomponent *ComponentToDelete) { return ARC_CALL1(comp_del, ComponentToDelete); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git1161.11%266.67%
ralf baechleralf baechle738.89%133.33%
Total18100.00%3100.00%


pcomponent * __init ArcGetComponent(CHAR *Path) { return (pcomponent *)ARC_CALL1(component_by_path, Path); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git1252.17%266.67%
ralf baechleralf baechle1147.83%133.33%
Total23100.00%3100.00%

#ifdef DEBUG_PROM_TREE static char *classes[] = { "system", "processor", "cache", "adapter", "controller", "peripheral", "memory" }; static char *types[] = { "arc", "cpu", "fpu", "picache", "pdcache", "sicache", "sdcache", "sccache", "memdev", "eisa adapter", "tc adapter", "scsi adapter", "dti adapter", "multi-func adapter", "disk controller", "tp controller", "cdrom controller", "worm controller", "serial controller", "net controller", "display controller", "parallel controller", "pointer controller", "keyboard controller", "audio controller", "misc controller", "disk peripheral", "floppy peripheral", "tp peripheral", "modem peripheral", "monitor peripheral", "printer peripheral", "pointer peripheral", "keyboard peripheral", "terminal peripheral", "line peripheral", "net peripheral", "misc peripheral", "anonymous" }; static char *iflags[] = { "bogus", "read only", "removable", "console in", "console out", "input", "output" };
static void __init dump_component(pcomponent *p) { printk("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>", p, classes[p->class], types[p->type], iflags[p->iflags], p->vers, p->rev); printk("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n", p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git7697.44%266.67%
ralf baechleralf baechle22.56%133.33%
Total78100.00%3100.00%


static void __init traverse(pcomponent *p, int op) { dump_component(p); if(ArcGetChild(p)) traverse(ArcGetChild(p), 1); if(ArcGetPeer(p) && op) traverse(ArcGetPeer(p), 1); }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git5192.73%266.67%
ralf baechleralf baechle47.27%133.33%
Total55100.00%3100.00%


void __init prom_testtree(void) { pcomponent *p; p = ArcGetChild(PROM_NULL_COMPONENT); dump_component(p); p = ArcGetChild(p); while(p) { dump_component(p); p = ArcGetPeer(p); } }

Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git4693.88%266.67%
ralf baechleralf baechle36.12%133.33%
Total49100.00%3100.00%

#endif /* DEBUG_PROM_TREE */

Overall Contributors

PersonTokensPropCommitsCommitProp
pre-gitpre-git42782.43%342.86%
ralf baechleralf baechle8917.18%228.57%
aurelien jarnoaurelien jarno10.19%114.29%
justin mattockjustin mattock10.19%114.29%
Total518100.00%7100.00%
Directory: arch/mips/fw/arc
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.