ixdp2x00.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * include/asm-arm/arch-ixp2000/ixdp2x00.h
  3. *
  4. * Register and other defines for IXDP2[48]00 platforms
  5. *
  6. * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
  7. * Maintainer: Deepak Saxena <dsaxena@plexity.net>
  8. *
  9. * Copyright (C) 2002 Intel Corp.
  10. * Copyright (C) 2003-2004 MontaVista Software, Inc.
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU General Public License as published by the
  14. * Free Software Foundation; either version 2 of the License, or (at your
  15. * option) any later version.
  16. */
  17. #ifndef _IXDP2X00_H_
  18. #define _IXDP2X00_H_
  19. /*
  20. * On board CPLD memory map
  21. */
  22. #define IXDP2X00_PHYS_CPLD_BASE 0xc7000000
  23. #define IXDP2X00_VIRT_CPLD_BASE 0xfe000000
  24. #define IXDP2X00_CPLD_SIZE 0x00100000
  25. #define IXDP2X00_CPLD_REG(x) \
  26. (volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x)
  27. /*
  28. * IXDP2400 CPLD registers
  29. */
  30. #define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0)
  31. #define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4)
  32. #define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8)
  33. #define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc)
  34. #define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10)
  35. #define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14)
  36. #define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18)
  37. #define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48)
  38. /*
  39. * IXDP2800 CPLD registers
  40. */
  41. #define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0)
  42. #define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140)
  43. #define IXDP2X00_GPIO_I2C_ENABLE 0x02
  44. #define IXDP2X00_GPIO_SCL 0x07
  45. #define IXDP2X00_GPIO_SDA 0x06
  46. /*
  47. * PCI devfns for on-board devices. We need these to be able to
  48. * properly translate IRQs and for device removal.
  49. */
  50. #define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */
  51. #define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */
  52. #define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */
  53. #define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
  54. #define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */
  55. #define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */
  56. #define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
  57. #define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */
  58. #define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */
  59. #define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */
  60. #define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */
  61. #define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */
  62. #ifndef __ASSEMBLY__
  63. /*
  64. * The master NPU is always PCI master.
  65. */
  66. static inline unsigned int ixdp2x00_master_npu(void)
  67. {
  68. return !!ixp2000_is_pcimaster();
  69. }
  70. /*
  71. * Helper functions used by ixdp2400 and ixdp2800 specific code
  72. */
  73. void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long);
  74. void ixdp2x00_slave_pci_postinit(void);
  75. void ixdp2x00_init_machine(void);
  76. void ixdp2x00_map_io(void);
  77. #endif
  78. #endif /*_IXDP2X00_H_ */