ARM: davinci: support gpio platform device
DaVinci GPIO driver now uses platform device model. Add a GPIO platform register API to convert the traditional DaVinci SoCs to use the new model. While at it, also group related include files together wherever that was not the case. Signed-off-by: Philip Avinash <avinashphilip@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> [nsekhar@ti.com: move function declaration to local header, simplify commit message, merge SoC specific portions from other patches into this patch] Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:

committed by
Sekhar Nori

parent
f606d38de7
commit
9cc1515cbd
@@ -13,8 +13,10 @@
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/platform_data/edma.h>
|
||||
#include <linux/platform_data/gpio-davinci.h>
|
||||
#include <linux/platform_data/spi-davinci.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
@@ -25,9 +27,6 @@
|
||||
#include <mach/time.h>
|
||||
#include <mach/serial.h>
|
||||
#include <mach/common.h>
|
||||
#include <linux/platform_data/spi-davinci.h>
|
||||
#include <mach/gpio-davinci.h>
|
||||
#include <linux/platform_data/edma.h>
|
||||
|
||||
#include "davinci.h"
|
||||
#include "clock.h"
|
||||
@@ -886,6 +885,30 @@ static struct platform_device dm355_vpbe_dev = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource dm355_gpio_resources[] = {
|
||||
{ /* registers */
|
||||
.start = DAVINCI_GPIO_BASE,
|
||||
.end = DAVINCI_GPIO_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{ /* interrupt */
|
||||
.start = IRQ_DM355_GPIOBNK0,
|
||||
.end = IRQ_DM355_GPIOBNK6,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct davinci_gpio_platform_data dm355_gpio_platform_data = {
|
||||
.ngpio = 104,
|
||||
.intc_irq_num = DAVINCI_N_AINTC_IRQ,
|
||||
};
|
||||
|
||||
int __init dm355_gpio_register(void)
|
||||
{
|
||||
return davinci_gpio_register(dm355_gpio_resources,
|
||||
sizeof(dm355_gpio_resources),
|
||||
&dm355_gpio_platform_data);
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
static struct map_desc dm355_io_desc[] = {
|
||||
@@ -1005,10 +1028,6 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {
|
||||
.intc_irq_prios = dm355_default_priorities,
|
||||
.intc_irq_num = DAVINCI_N_AINTC_IRQ,
|
||||
.timer_info = &dm355_timer_info,
|
||||
.gpio_type = GPIO_TYPE_DAVINCI,
|
||||
.gpio_base = DAVINCI_GPIO_BASE,
|
||||
.gpio_num = 104,
|
||||
.gpio_irq = IRQ_DM355_GPIOBNK0,
|
||||
.sram_dma = 0x00010000,
|
||||
.sram_len = SZ_32K,
|
||||
};
|
||||
|
Reference in New Issue
Block a user