bmw.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * BMW/MPC8245 Board definitions.
  3. * For more info, see http://www.vooha.com/
  4. *
  5. * (C) Copyright 2000
  6. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  7. *
  8. * (C) Copyright 2002
  9. * James Dougherty (jfd@broadcom.com)
  10. *
  11. * See file CREDITS for list of people who contributed to this
  12. * project.
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License as
  16. * published by the Free Software Foundation; either version 2 of
  17. * the License, or (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, write to the Free Software
  26. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  27. * MA 02111-1307 USA
  28. */
  29. #ifndef __BMW_H
  30. #define __BMW_H
  31. /* System addresses */
  32. #define PCI_SPECIAL_BASE 0xfe000000
  33. #define PCI_SPECIAL_SIZE 0x01000000
  34. #define EUMBBAR_VAL 0x80500000 /* Location of EUMB region */
  35. #define EUMBSIZE 0x00100000 /* Size of EUMB region */
  36. /* Extended ROM space devices */
  37. #define DOC_BASE_ADDR 0xff000000 /* Onboard DOC TSOP 16MB */
  38. #define DOC2_BASE_ADDR 0x70000000 /* DIP32 socket -> 1GB */
  39. #define XROM_BASE_ADDR 0x7c000000 /* RCS2 (PAL / Satellite IO) */
  40. #define PLD_REG_BASE XROM_BASE_ADDR
  41. #define LED_REG_BASE (XROM_BASE_ADDR | 0x2000)
  42. #define TOD_BASE (XROM_BASE_ADDR | 0x4000)
  43. #define LED_REG(x) (*(volatile unsigned char *) \
  44. (LED_REG_BASE + (x)))
  45. #define XROM_DEV_SIZE 0x00006000
  46. #define ENET_DEV_BASE 0x80000000
  47. #define PLD_REG(off) (*(volatile unsigned char *)\
  48. (PLD_REG_BASE + (off)))
  49. #define PLD_REVID_B1 0x7f /* Fix me */
  50. #define PLD_REVID_B2 0x01 /* Fix me */
  51. #define SYS_HARD_RESET() { for (;;) PLD_REG(0) = 0; } /* clr 0x80 bit */
  52. #define SYS_REVID_GET() ((int) PLD_REG(0) & 0x7f)
  53. #define SYS_LED_OFF() (PLD_REG(1) |= 0x80)
  54. #define SYS_LED_ON() (PLD_REG(1) &= ~0x80)
  55. #define SYS_WATCHDOG_IRQ3() (PLD_REG(2) |= 0x80)
  56. #define SYS_WATCHDOG_RESET() (PLD_REG(2) &= ~0x80)
  57. #define SYS_TOD_PROTECT() (PLD_REG(3) |= 0x80)
  58. #define SYS_TOD_UNPROTECT() (PLD_REG(3) &= ~0x80)
  59. #define TOD_REG_BASE (TOD_BASE | 0x1ff0)
  60. #define TOD_NVRAM_BASE TOD_BASE
  61. #define TOD_NVRAM_SIZE 0x1ff0
  62. #define TOD_NVRAM_LIMIT (TOD_NVRAM_BASE + TOD_NVRAM_SIZE)
  63. #define RTC(r) (TOD_BASE + r)
  64. /* Onboard BCM570x device */
  65. #define PCI_ENET_IOADDR 0x80000000
  66. #define PCI_ENET_MEMADDR 0x80000000
  67. #ifndef __ASSEMBLY__
  68. /* C Function prototypes */
  69. void sys_led_msg(char* msg);
  70. #endif /* !__ASSEMBLY__ */
  71. #endif /* __BMW_H */