rpx8260.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * A collection of structures, addresses, and values associated with
  3. * the Embedded Planet RPX6 (or RPX Super) MPC8260 board.
  4. * Copied from the RPX-Classic and SBS8260 stuff.
  5. *
  6. * Copyright (c) 2001 Dan Malek <dan@embeddededge.com>
  7. */
  8. #ifdef __KERNEL__
  9. #ifndef __ASM_PLATFORMS_RPX8260_H__
  10. #define __ASM_PLATFORMS_RPX8260_H__
  11. /* A Board Information structure that is given to a program when
  12. * prom starts it up.
  13. */
  14. typedef struct bd_info {
  15. unsigned int bi_memstart; /* Memory start address */
  16. unsigned int bi_memsize; /* Memory (end) size in bytes */
  17. unsigned int bi_nvsize; /* NVRAM size in bytes (can be 0) */
  18. unsigned int bi_intfreq; /* Internal Freq, in Hz */
  19. unsigned int bi_busfreq; /* Bus Freq, in MHz */
  20. unsigned int bi_cpmfreq; /* CPM Freq, in MHz */
  21. unsigned int bi_brgfreq; /* BRG Freq, in MHz */
  22. unsigned int bi_vco; /* VCO Out from PLL */
  23. unsigned int bi_baudrate; /* Default console baud rate */
  24. unsigned int bi_immr; /* IMMR when called from boot rom */
  25. unsigned char bi_enetaddr[6];
  26. } bd_t;
  27. extern bd_t m8xx_board_info;
  28. /* Memory map is configured by the PROM startup.
  29. * We just map a few things we need. The CSR is actually 4 byte-wide
  30. * registers that can be accessed as 8-, 16-, or 32-bit values.
  31. */
  32. #define CPM_MAP_ADDR ((uint)0xf0000000)
  33. #define RPX_CSR_ADDR ((uint)0xfa000000)
  34. #define RPX_CSR_SIZE ((uint)(512 * 1024))
  35. #define RPX_NVRTC_ADDR ((uint)0xfa080000)
  36. #define RPX_NVRTC_SIZE ((uint)(512 * 1024))
  37. /* The RPX6 has 16, byte wide control/status registers.
  38. * Not all are used (yet).
  39. */
  40. extern volatile u_char *rpx6_csr_addr;
  41. /* Things of interest in the CSR.
  42. */
  43. #define BCSR0_ID_MASK ((u_char)0xf0) /* Read only */
  44. #define BCSR0_SWITCH_MASK ((u_char)0x0f) /* Read only */
  45. #define BCSR1_XCVR_SMC1 ((u_char)0x80)
  46. #define BCSR1_XCVR_SMC2 ((u_char)0x40)
  47. #define BCSR2_FLASH_WENABLE ((u_char)0x20)
  48. #define BCSR2_NVRAM_ENABLE ((u_char)0x10)
  49. #define BCSR2_ALT_IRQ2 ((u_char)0x08)
  50. #define BCSR2_ALT_IRQ3 ((u_char)0x04)
  51. #define BCSR2_PRST ((u_char)0x02) /* Force reset */
  52. #define BCSR2_ENPRST ((u_char)0x01) /* Enable POR */
  53. #define BCSR3_MODCLK_MASK ((u_char)0xe0)
  54. #define BCSR3_ENCLKHDR ((u_char)0x10)
  55. #define BCSR3_LED5 ((u_char)0x04) /* 0 == on */
  56. #define BCSR3_LED6 ((u_char)0x02) /* 0 == on */
  57. #define BCSR3_LED7 ((u_char)0x01) /* 0 == on */
  58. #define BCSR4_EN_PHY ((u_char)0x80) /* Enable PHY */
  59. #define BCSR4_EN_MII ((u_char)0x40) /* Enable PHY */
  60. #define BCSR4_MII_READ ((u_char)0x04)
  61. #define BCSR4_MII_MDC ((u_char)0x02)
  62. #define BCSR4_MII_MDIO ((u_char)0x01)
  63. #define BCSR13_FETH_IRQMASK ((u_char)0xf0)
  64. #define BCSR15_FETH_IRQ ((u_char)0x20)
  65. #define PHY_INTERRUPT SIU_INT_IRQ7
  66. /* For our show_cpuinfo hooks. */
  67. #define CPUINFO_VENDOR "Embedded Planet"
  68. #define CPUINFO_MACHINE "EP8260 PowerPC"
  69. /* Warm reset vector. */
  70. #define BOOTROM_RESTART_ADDR ((uint)0xfff00104)
  71. #endif /* __ASM_PLATFORMS_RPX8260_H__ */
  72. #endif /* __KERNEL__ */