1 From 1647cccc871bf43876c3df9852869680880d054c Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Wed, 25 Mar 2015 13:52:02 +0100
4 Subject: [PATCH 1/2] MIPS: BCM63XX: provide a gpio lookup for the pcmcia
7 To prepare for a time when gpiobases don't need to be fixed anymore.
9 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
11 arch/mips/bcm63xx/dev-pcmcia.c | 13 +++++++++++++
12 1 file changed, 13 insertions(+)
14 --- a/arch/mips/bcm63xx/dev-pcmcia.c
15 +++ b/arch/mips/bcm63xx/dev-pcmcia.c
17 #include <linux/kernel.h>
18 #include <asm/bootinfo.h>
19 #include <linux/platform_device.h>
20 +#include <linux/gpio/machine.h>
21 #include <bcm63xx_cs.h>
22 #include <bcm63xx_cpu.h>
23 #include <bcm63xx_dev_pcmcia.h>
24 @@ -101,6 +102,14 @@ static const struct {
28 +static struct gpiod_lookup_table pcmcia_gpios_table = {
29 + .dev_id = "bcm63xx_pcmcia.0",
31 + GPIO_LOOKUP("bcm63xx-gpio.0", 0, "ready", GPIO_ACTIVE_HIGH),
36 int __init bcm63xx_pcmcia_register(void)
39 @@ -112,16 +121,20 @@ int __init bcm63xx_pcmcia_register(void)
40 switch (bcm63xx_get_cpu_id()) {
43 + pcmcia_gpios_table.table[0].chip_hwnum = 22;
48 + pcmcia_gpios_table.table[0].chip_hwnum = 18;
55 + gpiod_add_lookup_table(&pcmcia_gpios_table);
57 pcmcia_resources[0].start = bcm63xx_regset_address(RSET_PCMCIA);
58 pcmcia_resources[0].end = pcmcia_resources[0].start +