gpio/mxs: Move Freescale mxs gpio driver to drivers/gpio
GPIO drivers are getting moved to drivers/gpio for cleanup and consolidation. This patch moves the mxs driver. Follow up patches will clean it up and make it a fine upstanding example of a gpio driver. v2: Removed header file entirely and put struct definition directly into driver. The struct isn't used anywhere else in the kernel. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
59c5f46fbe
commit
7b2fa57020
@ -1,5 +1,5 @@
|
||||
# Common support
|
||||
obj-y := clock.o devices.o gpio.o icoll.o iomux.o system.o timer.o
|
||||
obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o
|
||||
|
||||
obj-$(CONFIG_MXS_OCOTP) += ocotp.o
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright 2008 Juergen Beisert, kernel@pengutronix.de
|
||||
*
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MXS_GPIO_H__
|
||||
#define __MXS_GPIO_H__
|
||||
|
||||
struct mxs_gpio_port {
|
||||
void __iomem *base;
|
||||
int id;
|
||||
int irq;
|
||||
int irq_high;
|
||||
int virtual_irq_start;
|
||||
struct gpio_chip chip;
|
||||
};
|
||||
|
||||
int mxs_gpio_init(struct mxs_gpio_port*, int);
|
||||
|
||||
#endif /* __MXS_GPIO_H__ */
|
@ -26,7 +26,6 @@
|
||||
#include <mach/iomux-mx28.h>
|
||||
|
||||
#include "devices-mx28.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13)
|
||||
#define MX28EVK_FEC_PHY_POWER MXS_GPIO_NR(2, 15)
|
||||
|
@ -93,6 +93,10 @@ config GPIO_EXYNOS4
|
||||
help
|
||||
Say yes here to support Samsung Exynos4 series SoCs GPIO library
|
||||
|
||||
config GPIO_MXS
|
||||
def_bool y
|
||||
depends on ARCH_MXS
|
||||
|
||||
config GPIO_PLAT_SAMSUNG
|
||||
bool "Samsung SoCs GPIO library support"
|
||||
default y if SAMSUNG_GPIOLIB_4BIT
|
||||
|
@ -9,6 +9,7 @@ obj-$(CONFIG_GPIO_ADP5588) += adp5588-gpio.o
|
||||
obj-$(CONFIG_GPIO_BASIC_MMIO_CORE) += basic_mmio_gpio.o
|
||||
obj-$(CONFIG_GPIO_BASIC_MMIO) += basic_mmio_gpio.o
|
||||
obj-$(CONFIG_GPIO_EXYNOS4) += gpio-exynos4.o
|
||||
obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o
|
||||
obj-$(CONFIG_GPIO_PLAT_SAMSUNG) += gpio-plat-samsung.o
|
||||
obj-$(CONFIG_GPIO_S5PC100) += gpio-s5pc100.o
|
||||
obj-$(CONFIG_GPIO_S5PV210) += gpio-s5pv210.o
|
||||
|
@ -29,8 +29,6 @@
|
||||
#include <mach/mx28.h>
|
||||
#include <asm-generic/bug.h>
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
static struct mxs_gpio_port *mxs_gpio_ports;
|
||||
static int gpio_table_size;
|
||||
|
||||
@ -50,6 +48,15 @@ static int gpio_table_size;
|
||||
#define GPIO_INT_LEV_MASK (1 << 0)
|
||||
#define GPIO_INT_POL_MASK (1 << 1)
|
||||
|
||||
struct mxs_gpio_port {
|
||||
void __iomem *base;
|
||||
int id;
|
||||
int irq;
|
||||
int irq_high;
|
||||
int virtual_irq_start;
|
||||
struct gpio_chip chip;
|
||||
};
|
||||
|
||||
/* Note: This driver assumes 32 GPIOs are handled in one register */
|
||||
|
||||
static void clear_gpio_irqstatus(struct mxs_gpio_port *port, u32 index)
|
Loading…
Reference in New Issue
Block a user