oak.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. *
  3. * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
  4. *
  5. * Module name: oak.h
  6. *
  7. * Description:
  8. * Macros, definitions, and data structures specific to the IBM PowerPC
  9. * 403G{A,B,C,CX} "Oak" evaluation board. Anything specific to the pro-
  10. * cessor itself is defined elsewhere.
  11. *
  12. */
  13. #ifdef __KERNEL__
  14. #ifndef __ASM_OAK_H__
  15. #define __ASM_OAK_H__
  16. /* We have an IBM 403G{A,B,C,CX} core */
  17. #include <asm/ibm403.h>
  18. #define _IO_BASE 0
  19. #define _ISA_MEM_BASE 0
  20. #define PCI_DRAM_OFFSET 0
  21. /* Memory map for the "Oak" evaluation board */
  22. #define PPC403SPU_IO_BASE 0x40000000 /* 403 On-chip serial port */
  23. #define PPC403SPU_IO_SIZE 0x00000008
  24. #define OAKSERIAL_IO_BASE 0x7E000000 /* NS16550DV serial port */
  25. #define OAKSERIAL_IO_SIZE 0x00000008
  26. #define OAKNET_IO_BASE 0xF4000000 /* NS83902AV Ethernet */
  27. #define OAKNET_IO_SIZE 0x00000040
  28. #define OAKPROM_IO_BASE 0xFFFE0000 /* AMD 29F010 Flash ROM */
  29. #define OAKPROM_IO_SIZE 0x00020000
  30. /* Interrupt assignments fixed by the hardware implementation */
  31. /* This is annoying kbuild-2.4 problem. -- Tom */
  32. #define PPC403SPU_RX_INT 4 /* AIC_INT4 */
  33. #define PPC403SPU_TX_INT 5 /* AIC_INT5 */
  34. #define OAKNET_INT 27 /* AIC_INT27 */
  35. #define OAKSERIAL_INT 28 /* AIC_INT28 */
  36. #ifndef __ASSEMBLY__
  37. /*
  38. * Data structure defining board information maintained by the boot
  39. * ROM on IBM's "Oak" evaluation board. An effort has been made to
  40. * keep the field names consistent with the 8xx 'bd_t' board info
  41. * structures.
  42. */
  43. typedef struct board_info {
  44. unsigned char bi_s_version[4]; /* Version of this structure */
  45. unsigned char bi_r_version[30]; /* Version of the IBM ROM */
  46. unsigned int bi_memsize; /* DRAM installed, in bytes */
  47. unsigned char bi_enetaddr[6]; /* Ethernet MAC address */
  48. unsigned int bi_intfreq; /* Processor speed, in Hz */
  49. unsigned int bi_busfreq; /* Bus speed, in Hz */
  50. } bd_t;
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54. extern void oak_init(unsigned long r3,
  55. unsigned long ird_start,
  56. unsigned long ird_end,
  57. unsigned long cline_start,
  58. unsigned long cline_end);
  59. extern void oak_setup_arch(void);
  60. extern int oak_setup_residual(char *buffer);
  61. extern void oak_init_IRQ(void);
  62. extern int oak_get_irq(struct pt_regs *regs);
  63. extern void oak_restart(char *cmd);
  64. extern void oak_power_off(void);
  65. extern void oak_halt(void);
  66. extern void oak_time_init(void);
  67. extern int oak_set_rtc_time(unsigned long now);
  68. extern unsigned long oak_get_rtc_time(void);
  69. extern void oak_calibrate_decr(void);
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73. /* Some 4xx parts use a different timebase frequency from the internal clock.
  74. */
  75. #define bi_tbfreq bi_intfreq
  76. #define PPC4xx_MACHINE_NAME "IBM Oak"
  77. #endif /* !__ASSEMBLY__ */
  78. #endif /* __ASM_OAK_H__ */
  79. #endif /* __KERNEL__ */