mpp.c (0ff555192a8d20385d49d1c420e2e8d409b3c0da) | mpp.c (9569dae75f6f6987e79fa26cf6da3fc24006c996) |
---|---|
1/* 2 * arch/arm/mach-orion5x/mpp.c 3 * 4 * MPP functions for Marvell Orion 5x SoCs 5 * 6 * This file is licensed under the terms of the GNU General Public 7 * License version 2. This program is licensed "as is" without any 8 * warranty of any kind, whether express or implied. 9 */ 10 11#include <linux/kernel.h> 12#include <linux/init.h> 13#include <linux/mbus.h> 14#include <linux/io.h> | 1/* 2 * arch/arm/mach-orion5x/mpp.c 3 * 4 * MPP functions for Marvell Orion 5x SoCs 5 * 6 * This file is licensed under the terms of the GNU General Public 7 * License version 2. This program is licensed "as is" without any 8 * warranty of any kind, whether express or implied. 9 */ 10 11#include <linux/kernel.h> 12#include <linux/init.h> 13#include <linux/mbus.h> 14#include <linux/io.h> |
15#include <asm/gpio.h> |
|
15#include <mach/hardware.h> 16#include "common.h" 17#include "mpp.h" 18 19static int is_5181l(void) 20{ 21 u32 dev; 22 u32 rev; --- 124 unchanged lines hidden (view full) --- 147 mode->type); 148 continue; 149 } 150 151 shift = (mode->mpp & 7) << 2; 152 *reg &= ~(0xf << shift); 153 *reg |= (num_type & 0xf) << shift; 154 | 16#include <mach/hardware.h> 17#include "common.h" 18#include "mpp.h" 19 20static int is_5181l(void) 21{ 22 u32 dev; 23 u32 rev; --- 124 unchanged lines hidden (view full) --- 148 mode->type); 149 continue; 150 } 151 152 shift = (mode->mpp & 7) << 2; 153 *reg &= ~(0xf << shift); 154 *reg |= (num_type & 0xf) << shift; 155 |
155 orion5x_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); | 156 if (mode->type == MPP_UNUSED && (mode->mpp < 16 || is_5182())) 157 orion_gpio_set_unused(mode->mpp); |
156 | 158 |
159 orion_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); 160 |
|
157 mode++; 158 } 159 160 writel(mpp_0_7_ctrl, MPP_0_7_CTRL); 161 writel(mpp_8_15_ctrl, MPP_8_15_CTRL); 162 writel(mpp_16_19_ctrl, MPP_16_19_CTRL); 163} | 161 mode++; 162 } 163 164 writel(mpp_0_7_ctrl, MPP_0_7_CTRL); 165 writel(mpp_8_15_ctrl, MPP_8_15_CTRL); 166 writel(mpp_16_19_ctrl, MPP_16_19_CTRL); 167} |