File: rio.c

package info (click to toggle)
linux-2.6 2.6.18.dfsg.1-26etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 289,112 kB
  • ctags: 831,064
  • sloc: ansic: 4,700,345; asm: 205,595; makefile: 13,019; perl: 3,208; python: 2,735; yacc: 2,632; sh: 2,313; cpp: 2,107; lex: 1,510; lisp: 218; awk: 99; pascal: 41
file content (52 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
 * RapidIO PPC32 support
 *
 * Copyright 2005 MontaVista Software, Inc.
 * Matt Porter <mporter@kernel.crashing.org>
 *
 * 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.
 */

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/rio.h>

#include <asm/rio.h>

/**
 * platform_rio_init - Do platform specific RIO init
 *
 * Any platform specific initialization of RapdIO
 * hardware is done here as well as registration
 * of any active master ports in the system.
 */
void __attribute__ ((weak))
    platform_rio_init(void)
{
	printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
}

/**
 * ppc_rio_init - Do PPC32 RIO init
 *
 * Calls platform-specific RIO init code and then calls
 * rio_init_mports() to initialize any master ports that
 * have been registered with the RIO subsystem.
 */
static int __init ppc_rio_init(void)
{
	printk(KERN_INFO "RIO: RapidIO init\n");

	/* Platform specific initialization */
	platform_rio_init();

	/* Enumerate all registered ports */
	rio_init_mports();

	return 0;
}

subsys_initcall(ppc_rio_init);