fix file specification in comments
[deliverable/linux.git] / drivers / net / ibm_emac / ibm_emac_rgmii.h
CommitLineData
1da177e4 1/*
f30c2269 2 * drivers/net/ibm_emac/ibm_emac_rgmii.h
37448f7d
ES
3 *
4 * Driver for PowerPC 4xx on-chip ethernet controller, RGMII bridge support.
1da177e4
LT
5 *
6 * Based on ocp_zmii.h/ibm_emac_zmii.h
7 * Armin Kuster akuster@mvista.com
8 *
9 * Copyright 2004 MontaVista Software, Inc.
10 * Matt Porter <mporter@kernel.crashing.org>
11 *
37448f7d
ES
12 * Copyright (c) 2004, 2005 Zultys Technologies.
13 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
14 *
1da177e4
LT
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20
21#ifndef _IBM_EMAC_RGMII_H_
22#define _IBM_EMAC_RGMII_H_
23
1da177e4
LT
24
25/* RGMII bridge */
37448f7d 26struct rgmii_regs {
1da177e4
LT
27 u32 fer; /* Function enable register */
28 u32 ssr; /* Speed select register */
37448f7d 29};
1da177e4
LT
30
31/* RGMII device */
32struct ibm_ocp_rgmii {
b43de2d8 33 struct rgmii_regs __iomem *base;
1da177e4
LT
34 int users; /* number of EMACs using this RGMII bridge */
35};
36
37448f7d
ES
37#ifdef CONFIG_IBM_EMAC_RGMII
38int rgmii_attach(void *emac) __init;
1da177e4 39
37448f7d
ES
40void __rgmii_fini(struct ocp_device *ocpdev, int input) __exit;
41static inline void rgmii_fini(struct ocp_device *ocpdev, int input)
42{
43 if (ocpdev)
44 __rgmii_fini(ocpdev, input);
45}
1da177e4 46
37448f7d 47void rgmii_set_speed(struct ocp_device *ocpdev, int input, int speed);
1da177e4 48
37448f7d
ES
49int __rgmii_get_regs_len(struct ocp_device *ocpdev);
50static inline int rgmii_get_regs_len(struct ocp_device *ocpdev)
51{
52 return ocpdev ? __rgmii_get_regs_len(ocpdev) : 0;
53}
1da177e4 54
37448f7d
ES
55void *rgmii_dump_regs(struct ocp_device *ocpdev, void *buf);
56#else
57# define rgmii_attach(x) 0
58# define rgmii_fini(x,y) ((void)0)
59# define rgmii_set_speed(x,y,z) ((void)0)
60# define rgmii_get_regs_len(x) 0
61# define rgmii_dump_regs(x,buf) (buf)
62#endif /* !CONFIG_IBM_EMAC_RGMII */
1da177e4
LT
63
64#endif /* _IBM_EMAC_RGMII_H_ */
This page took 0.194226 seconds and 5 git commands to generate.