ARM: pxa: move PXA_GPIO_TO_IRQ macro
Since PXA_GPIO_TO_IRQ() & MMP_GPIO_TO_IRQ() macro are depended on arch code, move them from gpio driver to platform driver instead. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
@@ -12,9 +12,10 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/gpio-pxa.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <mach/pxa930.h>
|
||||
|
||||
@@ -192,6 +193,10 @@ static struct mfp_addr_map pxa935_mfp_addr_map[] __initdata = {
|
||||
MFP_ADDR_END,
|
||||
};
|
||||
|
||||
static struct pxa_gpio_platform_data pxa93x_gpio_pdata = {
|
||||
.irq_base = PXA_GPIO_TO_IRQ(0),
|
||||
};
|
||||
|
||||
static int __init pxa930_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -199,6 +204,9 @@ static int __init pxa930_init(void)
|
||||
if (cpu_is_pxa93x()) {
|
||||
mfp_init_base(io_p2v(MFPR_BASE));
|
||||
mfp_init_addr(pxa930_mfp_addr_map);
|
||||
platform_device_add_data(&pxa93x_device_gpio,
|
||||
&pxa93x_gpio_pdata,
|
||||
sizeof(pxa93x_gpio_pdata));
|
||||
ret = platform_device_register(&pxa93x_device_gpio);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user