1*5a469608STimur Tabi /**
2*5a469608STimur Tabi  * Copyright 2010 Freescale Semiconductor
3*5a469608STimur Tabi  * Author: Timur Tabi <timur@freescale.com>
4*5a469608STimur Tabi  *
5*5a469608STimur Tabi  * This program is free software; you can redistribute it and/or modify it
6*5a469608STimur Tabi  * under the terms of the GNU General Public License as published by the Free
7*5a469608STimur Tabi  * Software Foundation; either version 2 of the License, or (at your option)
8*5a469608STimur Tabi  * any later version.
9*5a469608STimur Tabi  *
10*5a469608STimur Tabi  * This file provides support for the ngPIXIS, a board-specific FPGA used on
11*5a469608STimur Tabi  * some Freescale reference boards.
12*5a469608STimur Tabi  */
13*5a469608STimur Tabi 
14*5a469608STimur Tabi /* ngPIXIS register set. Hopefully, this won't change too much over time.
15*5a469608STimur Tabi  * Feel free to add board-specific #ifdefs where necessary.
16*5a469608STimur Tabi  */
17*5a469608STimur Tabi typedef struct ngpixis {
18*5a469608STimur Tabi 	u8 id;
19*5a469608STimur Tabi 	u8 arch;
20*5a469608STimur Tabi 	u8 scver;
21*5a469608STimur Tabi 	u8 csr;
22*5a469608STimur Tabi 	u8 rst;
23*5a469608STimur Tabi 	u8 res1;
24*5a469608STimur Tabi 	u8 aux;
25*5a469608STimur Tabi 	u8 spd;
26*5a469608STimur Tabi 	u8 brdcfg0;
27*5a469608STimur Tabi 	u8 dma;
28*5a469608STimur Tabi 	u8 addr;
29*5a469608STimur Tabi 	u8 res2[2];
30*5a469608STimur Tabi 	u8 data;
31*5a469608STimur Tabi 	u8 led;
32*5a469608STimur Tabi 	u8 res3;
33*5a469608STimur Tabi 	u8 vctl;
34*5a469608STimur Tabi 	u8 vstat;
35*5a469608STimur Tabi 	u8 vcfgen0;
36*5a469608STimur Tabi 	u8 res4;
37*5a469608STimur Tabi 	u8 ocmcsr;
38*5a469608STimur Tabi 	u8 ocmmsg;
39*5a469608STimur Tabi 	u8 gmdbg;
40*5a469608STimur Tabi 	u8 res5[2];
41*5a469608STimur Tabi 	u8 sclk[3];
42*5a469608STimur Tabi 	u8 dclk[3];
43*5a469608STimur Tabi 	u8 watch;
44*5a469608STimur Tabi 	struct {
45*5a469608STimur Tabi 		u8 sw;
46*5a469608STimur Tabi 		u8 en;
47*5a469608STimur Tabi 	} s[8];
48*5a469608STimur Tabi } ngpixis_t  __attribute__ ((aligned(1)));
49*5a469608STimur Tabi 
50*5a469608STimur Tabi /* Pointer to the PIXIS register set */
51*5a469608STimur Tabi #define pixis ((ngpixis_t *)PIXIS_BASE)
52*5a469608STimur Tabi 
53*5a469608STimur Tabi /* The PIXIS SW register that corresponds to board switch X, where x >= 1 */
54*5a469608STimur Tabi #define PIXIS_SW(x)		(pixis->s[(x) - 1].sw)
55*5a469608STimur Tabi 
56*5a469608STimur Tabi /* The PIXIS EN register that corresponds to board switch X, where x >= 1 */
57*5a469608STimur Tabi #define PIXIS_EN(x)		(pixis->s[(x) - 1].en)
58