2 * drivers/net/ibm_newemac/rgmii.h
4 * Driver for PowerPC 4xx on-chip ethernet controller, RGMII bridge support.
6 * Based on ocp_zmii.h/ibm_emac_zmii.h
7 * Armin Kuster akuster@mvista.com
9 * Copyright 2004 MontaVista Software, Inc.
10 * Matt Porter <mporter@kernel.crashing.org>
12 * Copyright (c) 2004, 2005 Zultys Technologies.
13 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
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.
21 #ifndef __IBM_NEWEMAC_RGMII_H
22 #define __IBM_NEWEMAC_RGMII_H
24 /* RGMII bridge type */
25 #define RGMII_STANDARD 0
30 u32 fer
; /* Function enable register */
31 u32 ssr
; /* Speed select register */
35 struct rgmii_instance
{
36 struct rgmii_regs __iomem
*base
;
38 /* Type of RGMII bridge */
41 /* Only one EMAC whacks us at a time */
44 /* number of EMACs using this RGMII bridge */
47 /* OF device instance */
48 struct of_device
*ofdev
;
51 #ifdef CONFIG_IBM_NEW_EMAC_RGMII
53 extern int rgmii_init(void);
54 extern void rgmii_exit(void);
55 extern int rgmii_attach(struct of_device
*ofdev
, int input
, int mode
);
56 extern void rgmii_detach(struct of_device
*ofdev
, int input
);
57 extern void rgmii_get_mdio(struct of_device
*ofdev
, int input
);
58 extern void rgmii_put_mdio(struct of_device
*ofdev
, int input
);
59 extern void rgmii_set_speed(struct of_device
*ofdev
, int input
, int speed
);
60 extern int rgmii_get_regs_len(struct of_device
*ofdev
);
61 extern void *rgmii_dump_regs(struct of_device
*ofdev
, void *buf
);
65 # define rgmii_init() 0
66 # define rgmii_exit() do { } while(0)
67 # define rgmii_attach(x,y,z) (-ENXIO)
68 # define rgmii_detach(x,y) do { } while(0)
69 # define rgmii_get_mdio(o,i) do { } while (0)
70 # define rgmii_put_mdio(o,i) do { } while (0)
71 # define rgmii_set_speed(x,y,z) do { } while(0)
72 # define rgmii_get_regs_len(x) 0
73 # define rgmii_dump_regs(x,buf) (buf)
74 #endif /* !CONFIG_IBM_NEW_EMAC_RGMII */
76 #endif /* __IBM_NEWEMAC_RGMII_H */