1 /*******************************************************************
2 *Copyright (c) 2012 by Silicon Motion, Inc. (SMI)
3 *Permission is hereby granted, free of charge, to any person obtaining a copy
4 *of this software and associated documentation files (the "Software"), to deal
5 *in the Software without restriction, including without limitation the rights to
6 *use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 *of the Software, and to permit persons to whom the Software is furnished to
8 *do so, subject to the following conditions:
10 *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
11 *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
12 *OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13 *NONINFRINGEMENT. IN NO EVENT SHALL Mill.Chen and Monk.Liu OR COPYRIGHT
14 *HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
15 *WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16 *FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
17 *OTHER DEALINGS IN THE SOFTWARE.
18 *******************************************************************/
19 #ifndef DDK750_HELP_H__
20 #define DDK750_HELP_H__
21 #include "ddk750_chip.h"
22 #ifndef USE_INTERNAL_REGISTER_ACCESS
24 #include <linux/ioport.h>
26 #include <asm/uaccess.h>
28 #ifdef CONFIG_FB_LYNXFB_DOMAINS
29 #include <asm-l/iolinkmask.h>
32 #include "lynx_help.h"
34 #ifdef CONFIG_FB_LYNXFB_DOMAINS
35 /* software control endianess */
36 #define PEEK32(addr, domain) readl((addr) + mmio750[domain])
37 #define POKE32(addr, data, domain) writel((data), (addr) + mmio750[domain])
39 /* software control endianess */
40 #define PEEK32(addr) readl((addr) + mmio750)
41 #define POKE32(addr, data) writel((data), (addr) + mmio750)
42 #endif /* CONFIG_FB_LYNXFB_DOMAINS */
45 #ifdef CONFIG_FB_LYNXFB_DOMAINS
46 extern volatile unsigned char __iomem
*mmio750
[MAX_NUMIOLINKS
];
47 extern char revId750
[MAX_NUMIOLINKS
];
48 extern unsigned short devId750
[MAX_NUMIOLINKS
];
50 extern volatile unsigned char __iomem
*mmio750
;
52 extern unsigned short devId750
;
53 #endif /* CONFIG_FB_LYNXFB_DOMAINS */
57 /* implement if you want use it*/