2 * drivers/net/ibm_newemac/tah.h
4 * Driver for PowerPC 4xx on-chip ethernet controller, TAH support.
6 * Copyright 2004 MontaVista Software, Inc.
7 * Matt Porter <mporter@kernel.crashing.org>
9 * Copyright (c) 2005 Eugene Surovegin <ebs@ebshome.net>
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
17 #ifndef __IBM_NEWEMAC_TAH_H
18 #define __IBM_NEWEMAC_TAH_H
37 struct tah_regs __iomem
*base
;
39 /* Only one EMAC whacks us at a time */
42 /* number of EMACs using this TAH */
45 /* OF device instance */
46 struct of_device
*ofdev
;
51 #define TAH_MR_CVR 0x80000000
52 #define TAH_MR_SR 0x40000000
53 #define TAH_MR_ST_256 0x01000000
54 #define TAH_MR_ST_512 0x02000000
55 #define TAH_MR_ST_768 0x03000000
56 #define TAH_MR_ST_1024 0x04000000
57 #define TAH_MR_ST_1280 0x05000000
58 #define TAH_MR_ST_1536 0x06000000
59 #define TAH_MR_TFS_16KB 0x00000000
60 #define TAH_MR_TFS_2KB 0x00200000
61 #define TAH_MR_TFS_4KB 0x00400000
62 #define TAH_MR_TFS_6KB 0x00600000
63 #define TAH_MR_TFS_8KB 0x00800000
64 #define TAH_MR_TFS_10KB 0x00a00000
65 #define TAH_MR_DTFP 0x00100000
66 #define TAH_MR_DIG 0x00080000
68 #ifdef CONFIG_IBM_NEW_EMAC_TAH
70 extern int tah_init(void);
71 extern void tah_exit(void);
72 extern int tah_attach(struct of_device
*ofdev
, int channel
);
73 extern void tah_detach(struct of_device
*ofdev
, int channel
);
74 extern void tah_reset(struct of_device
*ofdev
);
75 extern int tah_get_regs_len(struct of_device
*ofdev
);
76 extern void *tah_dump_regs(struct of_device
*ofdev
, void *buf
);
81 # define tah_exit() do { } while(0)
82 # define tah_attach(x,y) (-ENXIO)
83 # define tah_detach(x,y) do { } while(0)
84 # define tah_reset(x) do { } while(0)
85 # define tah_get_regs_len(x) 0
86 # define tah_dump_regs(x,buf) (buf)
88 #endif /* !CONFIG_IBM_NEW_EMAC_TAH */
90 #endif /* __IBM_NEWEMAC_TAH_H */