summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-04-04 23:53:26 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-04-04 23:53:26 (GMT)
commitc3b1feb024d1a3997a3e689711283c38bb05075e (patch)
treee08830905016227812095b09ee4d64cea5a7024f /drivers
parent93e2aeaca520743d66ec66b757db3a3e27936e91 (diff)
parent3d50a7fb42992545e45e10b068406546ea699489 (diff)
downloadlinux-c3b1feb024d1a3997a3e689711283c38bb05075e.tar.xz
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle: "This is the first round of MIPS fixes for 4.6: - Fix spelling mistakes all over arch/mips - Provide __bswapsi2 so XZ kernel compression will build with older GCC - ATH79 clock fixes. - Fix clock-rated copy-paste erros in ATH79 DTS. - Fix gisb-arb compatible string for 7435 BMIPS - Enable NAND and UBIFS support in CI20. - Fix BUG() assertion caused by inapropriate smp_processor_id() use. - Fix exception handling issues for the sake of debuggers - Fix the last remaining instance of irq_to_gpio in the db1xxx_ss PCMCIA code - Fix MSA unaligned load failures - Panic if kernel is configured for a not TLB-supported page size - Bail out on unsupported relocs in modules. - Partial fix for Qemu breakage after recent IPI rewrite - Wire up the preadv2 and pwrite2 syscalls - Fix the ar724x clock calculation" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: traps.c: Verify the ISA for microMIPS RDHWR emulation MIPS: BMIPS: Fix gisb-arb compatible string for 7435 MIPS: Bail on unsupported module relocs MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: use "ref" for reference clock name MIPS: ath79: Fix the ar913x reference clock rate MIPS: ath79: Fix the ar724x clock calculation dt-bindings: clock: qca,ath79-pll: fix copy-paste typos MIPS: traps: Correct the SIGTRAP debug ABI in `do_watch' and `do_trap_or_bp' FIRMWARE: Broadcom: Fix grammar of warning messages in bcm47xx_sprom.c. MIPS: ci20: Enable NAND and UBIFS support in defconfig. MIPS: Fix misspellings in comments. MIPS: tlb-r4k: panic if the MMU doesn't support PAGE_SIZE MIPS: zboot: Remove copied source files on clean MIPS: zboot: Fix the build with XZ compression on older GCC versions MIPS: Wire up preadv2 and pwrite2 syscalls. MIPS: cpu_name_string: Use raw_smp_processor_id(). pcmcia: db1xxx_ss: fix last irq_to_gpio user MIPS: Fix MSA ld unaligned failure cases MIPS: Fix broken malta qemu
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/db1xxx_ss.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
index 4c2fa05..944674e 100644
--- a/drivers/pcmcia/db1xxx_ss.c
+++ b/drivers/pcmcia/db1xxx_ss.c
@@ -56,6 +56,7 @@ struct db1x_pcmcia_sock {
int stschg_irq; /* card-status-change irq */
int card_irq; /* card irq */
int eject_irq; /* db1200/pb1200 have these */
+ int insert_gpio; /* db1000 carddetect gpio */
#define BOARD_TYPE_DEFAULT 0 /* most boards */
#define BOARD_TYPE_DB1200 1 /* IRQs aren't gpios */
@@ -83,7 +84,7 @@ static int db1200_card_inserted(struct db1x_pcmcia_sock *sock)
/* carddetect gpio: low-active */
static int db1000_card_inserted(struct db1x_pcmcia_sock *sock)
{
- return !gpio_get_value(irq_to_gpio(sock->insert_irq));
+ return !gpio_get_value(sock->insert_gpio);
}
static int db1x_card_inserted(struct db1x_pcmcia_sock *sock)
@@ -457,9 +458,15 @@ static int db1x_pcmcia_socket_probe(struct platform_device *pdev)
r = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "card");
sock->card_irq = r ? r->start : 0;
- /* insert: irq which triggers on card insertion/ejection */
+ /* insert: irq which triggers on card insertion/ejection
+ * BIG FAT NOTE: on DB1000/1100/1500/1550 we pass a GPIO here!
+ */
r = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "insert");
sock->insert_irq = r ? r->start : -1;
+ if (sock->board_type == BOARD_TYPE_DEFAULT) {
+ sock->insert_gpio = r ? r->start : -1;
+ sock->insert_irq = r ? gpio_to_irq(r->start) : -1;
+ }
/* stschg: irq which trigger on card status change (optional) */
r = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "stschg");