| /******************************************************************************** |
| * Marvell GPL License Option |
| * |
| * If you received this File from Marvell, you may opt to use, redistribute and/or |
| * modify this File in accordance with the terms and conditions of the General |
| * Public License Version 2, June 1991 (the "GPL License"), a copy of which is |
| * available along with the File in the license.txt file or by writing to the Free |
| * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or |
| * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. |
| * |
| * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED |
| * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY |
| * DISCLAIMED. The GPL License provides additional details about this warranty |
| * disclaimer. |
| ******************************************************************************/ |
| |
| #ifndef _IMAGE_2_IO_H |
| #define _IMAGE_2_IO_H |
| |
| #define __chk_io_ptr(a) (void)0 |
| |
| #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char *)(a) = (v)) |
| #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile unsigned short *)(a) = (v)) |
| #define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile unsigned int *)(a) = (v)) |
| |
| #define __raw_readb(a) (__chk_io_ptr(a), *(volatile unsigned char *)(a)) |
| #define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short *)(a)) |
| #define __raw_readl(a) (*(volatile unsigned int *)(a)) |
| |
| |
| #define writeb __raw_writeb |
| #define writew __raw_writew |
| #define writel __raw_writel |
| |
| #define readb __raw_readb |
| #define readw __raw_readw |
| #define readl __raw_readl |
| |
| #ifndef GA_REG_WORD32_WRITE |
| #define GA_REG_WORD32_WRITE(a, v) (writel(v, a)) |
| #endif |
| |
| #ifndef GA_REG_WORD32_READ |
| #define GA_REG_WORD32_READ(a, h) (*h = readl(a)) |
| #endif |
| |
| void pin_init(); |
| void power_tuning(void); |
| void list_speed(int level); |
| |
| #endif |