platform.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * arch/arm/mach-ixp23xx/include/mach/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. static inline unsigned long ixp2000_reg_read(volatile void *reg)
  16. {
  17. return *((volatile unsigned long *)reg);
  18. }
  19. static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
  20. {
  21. *((volatile unsigned long *)reg) = val;
  22. }
  23. static 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. void ixp23xx_restart(char, const char *);
  32. int ixp23xx_pci_setup(int, struct pci_sys_data *);
  33. void ixp23xx_pci_preinit(void);
  34. struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*);
  35. void ixp23xx_pci_slave_init(void);
  36. extern struct sys_timer ixp23xx_timer;
  37. #define IXP23XX_UART_XTAL 14745600
  38. #ifndef __ASSEMBLY__
  39. /*
  40. * Is system memory on the XSI or CPP bus?
  41. */
  42. static inline unsigned ixp23xx_cpp_boot(void)
  43. {
  44. return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
  45. }
  46. #endif
  47. #endif