platform.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * include/asm-arm/arch-ixp23xx/platform.h
  3. *
  4. * Various bits of code used by platform-level code.
  5. *
  6. * Author: Deepak Saxena <dsaxena@plexity.net>
  7. *
  8. * Copyright 2005 (c) MontaVista Software, Inc.
  9. *
  10. * This file is licensed under the terms of the GNU General Public
  11. * License version 2. This program is licensed "as is" without any
  12. * warranty of any kind, whether express or implied.
  13. */
  14. #ifndef __ASSEMBLY__
  15. extern inline unsigned long ixp2000_reg_read(volatile void *reg)
  16. {
  17. return *((volatile unsigned long *)reg);
  18. }
  19. extern inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
  20. {
  21. *((volatile unsigned long *)reg) = val;
  22. }
  23. extern inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
  24. {
  25. *((volatile unsigned long *)reg) = val;
  26. }
  27. struct pci_sys_data;
  28. void ixp23xx_map_io(void);
  29. void ixp23xx_init_irq(void);
  30. void ixp23xx_sys_init(void);
  31. int ixp23xx_pci_setup(int, struct pci_sys_data *);
  32. void ixp23xx_pci_preinit(void);
  33. struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*);
  34. void ixp23xx_pci_slave_init(void);
  35. extern struct sys_timer ixp23xx_timer;
  36. #define IXP23XX_UART_XTAL 14745600
  37. #ifndef __ASSEMBLY__
  38. /*
  39. * Is system memory on the XSI or CPP bus?
  40. */
  41. static inline unsigned ixp23xx_cpp_boot(void)
  42. {
  43. return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
  44. }
  45. #endif
  46. #endif