| /* |
| * Copyright (C) 2006 Mindspeed Technologies, Inc. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License as published by |
| * the Free Software Foundation; either version 2 of the License, or |
| * (at your option) any later version. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with this program; if not, write to the Free Software |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| * |
| */ |
| |
| #ifndef _BSP_2000_H |
| #define _BSP_2000_H |
| |
| #include <asm/arch/hardware.h> |
| #ifndef __ASSEMBLY__ |
| #include <asm/byteorder.h> |
| #endif |
| |
| #define GPIO_TYPE_INPUT 0 |
| #define GPIO_TYPE_OUTPUT 1 |
| |
| #define COMCERTO_PART_MAGIC 0x4D535044 |
| |
| int SoC_gpio_cfg(int gpio, int mode); |
| |
| #define SoC_gpio_mask(gpio) (1 << ((gpio) & 0x1f)) |
| #define SoC_gpio_read(gpiomask) (__le32_to_cpu(*(volatile u32 *)COMCERTO_GPIO_INPUT_REG & (gpiomask))) |
| #define SoC_gpio_set_0(gpiomask) (*(volatile u32 *)COMCERTO_GPIO_OUTPUT_REG &= __cpu_to_le32(~(gpiomask))) |
| #define SoC_gpio_set_1(gpiomask) (*(volatile u32 *)COMCERTO_GPIO_OUTPUT_REG |= __cpu_to_le32((gpiomask))) |
| |
| #endif /* _BSP_2000_H */ |