Blame view

include/mpc86xx.h 2.2 KB
debb7354d   Jon Loeliger   Initial support f...
1
  /*
5c9efb36a   Jon Loeliger   Cleanup whitespac...
2
   * Copyright 2006 Freescale Semiconductor.
b93775c20   Jon Loeliger   Cleanup even more...
3
   * Jeffrey Brown
debb7354d   Jon Loeliger   Initial support f...
4
5
6
7
8
   * Srikanth Srinivasan (srikanth.srinivasan@freescale.com)
   */
  
  #ifndef	__MPC86xx_H__
  #define __MPC86xx_H__
bf30bb1f7   Anton Vorontsov   83xx/85xx/86xx: f...
9
  #include <asm/fsl_lbc.h>
debb7354d   Jon Loeliger   Initial support f...
10
  #define EXC_OFF_SYS_RESET	0x0100	/* System reset	offset */
02032e8f1   Rafal Jaworowski   [ppc] Fix build b...
11
  #define _START_OFFSET		EXC_OFF_SYS_RESET
a75af9bfd   James Yang   Conditionalize 86...
12
13
14
15
  
  /*
   * platform register addresses
   */
6d0f6bcf3   Jean-Christophe PLAGNIOL-VILLARD   rename CFG_ macro...
16
17
18
  #define GUTS_SVR	(CONFIG_SYS_CCSRBAR + 0xE00A4)
  #define MCM_ABCR	(CONFIG_SYS_CCSRBAR + 0x01000)
  #define MCM_DBCR	(CONFIG_SYS_CCSRBAR + 0x01008)
a75af9bfd   James Yang   Conditionalize 86...
19

5c9efb36a   Jon Loeliger   Cleanup whitespac...
20
  /*
debb7354d   Jon Loeliger   Initial support f...
21
22
23
24
25
26
27
28
29
30
31
32
   * l2cr values.  Look in config_<BOARD>.h for the actual setup
   */
  #define l2cr		 1017
  
  #define L2CR_L2E         0x80000000 /* bit 0 - enable */
  #define L2CR_L2PE        0x40000000 /* bit 1 - data parity */
  #define L2CR_L2I         0x00200000 /* bit 10 - global invalidate bit */
  #define L2CR_L2CTL       0x00100000 /* bit 11 - l2 ram control */
  #define L2CR_L2DO        0x00010000 /* bit 15 - data-only mode */
  #define L2CR_REP         0x00001000 /* bit 19 - l2 replacement alg */
  #define L2CR_HWF         0x00000800 /* bit 20 - hardware flush */
  #define L2CR_L2IP        0x00000001 /* global invalidate in progress */
debb7354d   Jon Loeliger   Initial support f...
33
34
35
36
37
  #define HID0_XBSEN              0x00000100
  #define HID0_HIGH_BAT_EN        0x00800000
  #define HID0_XAEN               0x00020000
  
  #ifndef __ASSEMBLY__
b93775c20   Jon Loeliger   Cleanup even more...
38
  typedef struct {
997399fa4   Prabhakar Kushwaha   powerpc: Fix Came...
39
40
41
  	unsigned long freq_processor;
  	unsigned long freq_systembus;
  	unsigned long freq_localbus;
debb7354d   Jon Loeliger   Initial support f...
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
  } MPC86xx_SYS_INFO;
  
  #define l1icache_enable	icache_enable
  
  void l2cache_enable(void);
  void l1dcache_enable(void);
  
  static __inline__ unsigned long get_hid0 (void)
  {
  	unsigned long hid0;
  	asm volatile("mfspr %0, 1008" : "=r" (hid0) :);
  	return hid0;
  }
  
  static __inline__ unsigned long get_hid1 (void)
  {
  	unsigned long hid1;
  	asm volatile("mfspr %0, 1009" : "=r" (hid1) :);
  	return hid1;
  }
  
  static __inline__ void set_hid0 (unsigned long hid0)
  {
  	asm volatile("mtspr 1008, %0" : : "r" (hid0));
  }
  
  static __inline__ void set_hid1 (unsigned long hid1)
  {
  	asm volatile("mtspr 1009, %0" : : "r" (hid1));
  }
  
  
  static __inline__ unsigned long get_l2cr (void)
  {
     unsigned long l2cr_val;
     asm volatile("mfspr %0, 1017" : "=r" (l2cr_val) :);
     return l2cr_val;
  }
9ff32d8cc   Timur Tabi   mpc86xx: set the ...
80
  void setup_ddr_bat(phys_addr_t dram_size);
1605cc9e1   Becky Bruce   powerpc/mpc86xx: ...
81
  extern void setup_bats(void);
9ff32d8cc   Timur Tabi   mpc86xx: set the ...
82

debb7354d   Jon Loeliger   Initial support f...
83
84
  #endif  /* _ASMLANGUAGE */
  #endif	/* __MPC86xx_H__ */