regs-switch.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * arch/arm/mach-ks8695/include/mach/regs-switch.h
  3. *
  4. * Copyright (C) 2006 Andrew Victor
  5. *
  6. * KS8695 - Switch Registers and bit definitions.
  7. *
  8. * This file is licensed under the terms of the GNU General Public
  9. * License version 2. This program is licensed "as is" without any
  10. * warranty of any kind, whether express or implied.
  11. */
  12. #ifndef KS8695_SWITCH_H
  13. #define KS8695_SWITCH_H
  14. #define KS8695_SWITCH_OFFSET (0xF0000 + 0xe800)
  15. #define KS8695_SWITCH_VA (KS8695_IO_VA + KS8695_SWITCH_OFFSET)
  16. #define KS8695_SWITCH_PA (KS8695_IO_PA + KS8695_SWITCH_OFFSET)
  17. /*
  18. * Switch registers
  19. */
  20. #define KS8695_SEC0 (0x00) /* Switch Engine Control 0 */
  21. #define KS8695_SEC1 (0x04) /* Switch Engine Control 1 */
  22. #define KS8695_SEC2 (0x08) /* Switch Engine Control 2 */
  23. #define KS8695_SEPXCZ(x,z) (0x0c + (((x)-1)*3 + ((z)-1))*4) /* Port Configuration Registers */
  24. #define KS8695_SEP12AN (0x48) /* Port 1 & 2 Auto-Negotiation */
  25. #define KS8695_SEP34AN (0x4c) /* Port 3 & 4 Auto-Negotiation */
  26. #define KS8695_SEIAC (0x50) /* Indirect Access Control */
  27. #define KS8695_SEIADH2 (0x54) /* Indirect Access Data High 2 */
  28. #define KS8695_SEIADH1 (0x58) /* Indirect Access Data High 1 */
  29. #define KS8695_SEIADL (0x5c) /* Indirect Access Data Low */
  30. #define KS8695_SEAFC (0x60) /* Advance Feature Control */
  31. #define KS8695_SEDSCPH (0x64) /* TOS Priority High */
  32. #define KS8695_SEDSCPL (0x68) /* TOS Priority Low */
  33. #define KS8695_SEMAH (0x6c) /* Switch Engine MAC Address High */
  34. #define KS8695_SEMAL (0x70) /* Switch Engine MAC Address Low */
  35. #define KS8695_LPPM12 (0x74) /* Port 1 & 2 PHY Power Management */
  36. #define KS8695_LPPM34 (0x78) /* Port 3 & 4 PHY Power Management */
  37. /* Switch Engine Control 0 */
  38. #define SEC0_LLED1S (7 << 25) /* LED1 Select */
  39. #define LLED1S_SPEED (0 << 25)
  40. #define LLED1S_LINK (1 << 25)
  41. #define LLED1S_DUPLEX (2 << 25)
  42. #define LLED1S_COLLISION (3 << 25)
  43. #define LLED1S_ACTIVITY (4 << 25)
  44. #define LLED1S_FDX_COLLISION (5 << 25)
  45. #define LLED1S_LINK_ACTIVITY (6 << 25)
  46. #define SEC0_LLED0S (7 << 22) /* LED0 Select */
  47. #define LLED0S_SPEED (0 << 22)
  48. #define LLED0S_LINK (1 << 22)
  49. #define LLED0S_DUPLEX (2 << 22)
  50. #define LLED0S_COLLISION (3 << 22)
  51. #define LLED0S_ACTIVITY (4 << 22)
  52. #define LLED0S_FDX_COLLISION (5 << 22)
  53. #define LLED0S_LINK_ACTIVITY (6 << 22)
  54. #define SEC0_ENABLE (1 << 0) /* Enable Switch */
  55. #endif