ARM: plat-iop: instantiate GPIO from platform device
This converts the IOP32x and IOP33x platforms to pass their base address offset by a resource attached to a platform device instead of using static offset macros implicitly passed through <linux/gpio.h> including <mach/gpio.h>. Delete the local <mach/gpio.h> and <asm/hardware/iop3xx-gpio.h> headers and remove the selection of NEED_MACH_GPIO_H. Pass the virtual address as a resource in the platform device at this point for bisectability, next patch will pass the physical address as is custom. Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* arch/arm/include/asm/hardware/iop3xx-gpio.h
|
||||
*
|
||||
* IOP3xx GPIO wrappers
|
||||
*
|
||||
* Copyright (c) 2008 Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
* Based on IXP4XX gpio.h file
|
||||
*
|
||||
* 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 __ASM_ARM_HARDWARE_IOP3XX_GPIO_H
|
||||
#define __ASM_ARM_HARDWARE_IOP3XX_GPIO_H
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
#endif
|
||||
|
@@ -18,10 +18,6 @@
|
||||
/*
|
||||
* IOP3XX GPIO handling
|
||||
*/
|
||||
#define GPIO_IN 0
|
||||
#define GPIO_OUT 1
|
||||
#define GPIO_LOW 0
|
||||
#define GPIO_HIGH 1
|
||||
#define IOP3XX_GPIO_LINE(x) (x)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
@@ -165,11 +161,6 @@ extern int iop3xx_get_init_atu(void);
|
||||
/* PERCR0 DOESN'T EXIST - index from 1! */
|
||||
#define IOP3XX_PERCR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0710)
|
||||
|
||||
/* General Purpose I/O */
|
||||
#define IOP3XX_GPOE (volatile u32 *)IOP3XX_GPIO_REG(0x0000)
|
||||
#define IOP3XX_GPID (volatile u32 *)IOP3XX_GPIO_REG(0x0004)
|
||||
#define IOP3XX_GPOD (volatile u32 *)IOP3XX_GPIO_REG(0x0008)
|
||||
|
||||
/* Timers */
|
||||
#define IOP3XX_TU_TMR0 (volatile u32 *)IOP3XX_TIMER_REG(0x0000)
|
||||
#define IOP3XX_TU_TMR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0004)
|
||||
|
Reference in New Issue
Block a user