1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _W7O_H_
25#define _W7O_H_
26#include <config.h>
27
28
29#define PPC405GP_GPIO0_OR 0xef600700L
30#define PPC405GP_GPIO0_TCR 0xef600704L
31#define PPC405GP_GPIO0_ODR 0xef600718L
32#define PPC405GP_GPIO0_IR 0xef60071cL
33
34
35#define LMG_XCV_INIT 0x10000000L
36#define LMG_XCV_PROG 0x04000000L
37#define LMG_XCV_DONE 0x00400000L
38#define LMG_XCV_CNFG_0 0x08000000L
39#define LMG_XCV_IRQ_0 0x0L
40
41
42#define LMC_XCV_INIT 0x00800000L
43#define LMC_XCV_PROG 0x40000000L
44#define LMC_XCV_DONE 0x01000000L
45#define LMC_XCV_CNFG_0 0x00004000L
46#define LMC_XCV_CNFG_1 0x00002000L
47#define LMC_XCV_CNFG_2 0x00001000L
48#define LMC_XCV_IRQ_0 0x00080000L
49#define LMC_XCV_IRQ_1 0x00040000L
50#define LMC_XCV_IRQ_3 0x00020000L
51
52
53
54
55
56#if defined(CONFIG_W7OLMG)
57# define GPIO_XCV_INIT LMG_XCV_INIT
58# define GPIO_XCV_PROG LMG_XCV_PROG
59# define GPIO_XCV_DONE LMG_XCV_DONE
60# define GPIO_XCV_CNFG LMG_XCV_CNFG_0
61# define GPIO_XCV_IRQ LMG_XCV_IRQ_0
62# define GPIO_GPIO_1 0x40000000L
63# define GPIO_GPIO_6 0x02000000L
64# define GPIO_GPIO_7 0x01000000L
65# define GPIO_GPIO_8 0x00800000L
66#elif defined(CONFIG_W7OLMC)
67# define GPIO_XCV_INIT LMC_XCV_INIT
68# define GPIO_XCV_PROG LMC_XCV_PROG
69# define GPIO_XCV_DONE LMC_XCV_DONE
70# define GPIO_XCV_CNFG LMC_XCV_CNFG_0
71# define GPIO_XCV_IRQ LMC_XCV_IRQ_0
72#else
73# error "Unknown W7O board configuration"
74#endif
75
76
77extern void post2(void);
78extern int test_led(void);
79extern int test_sdram(unsigned long size);
80extern void test_fpga(unsigned short *daddr);
81
82
83extern int init_fpga(void);
84
85
86extern int temp_uart_init(void);
87extern void init_fsboot(void);
88
89#endif
90