summaryrefslogtreecommitdiff
path: root/drivers/staging/vme/devices/vme_pio2_cntr.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-11-14 10:47:01 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-11-14 10:47:01 -0500
commitf2ecc3d0787e05d9145722feed01d4a11ab6bec1 (patch)
tree8b952af40dad67d728f1e421efc640907c523982 /drivers/staging/vme/devices/vme_pio2_cntr.c
parentb1cb7372fa822af6c06c8045963571d13ad6348b (diff)
parentc14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 (diff)
Merge tag 'staging-4.15-rc1' into v4l_for_linus
There are some conflicts between staging and media trees, as reported by Stephen Rothwell <sfr@canb.auug.org.au>. So, merge from staging. * tag 'staging-4.15-rc1': (775 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ... Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/vme/devices/vme_pio2_cntr.c')
-rw-r--r--drivers/staging/vme/devices/vme_pio2_cntr.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/staging/vme/devices/vme_pio2_cntr.c b/drivers/staging/vme/devices/vme_pio2_cntr.c
deleted file mode 100644
index 486c30c4956f..000000000000
--- a/drivers/staging/vme/devices/vme_pio2_cntr.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * GE PIO2 Counter Driver
- *
- * Author: Martyn Welch <martyn.welch@ge.com>
- * Copyright 2009 GE Intelligent Platforms Embedded Systems, Inc.
- *
- * 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.
- *
- * The PIO-2 has 6 counters, currently this code just disables the interrupts
- * and leaves them alone.
- *
- */
-
-#include <linux/device.h>
-#include <linux/types.h>
-#include <linux/gpio.h>
-#include <linux/vme.h>
-
-#include "vme_pio2.h"
-
-static int pio2_cntr_irq_set(struct pio2_card *card, int id)
-{
- int retval;
- u8 data;
-
- data = PIO2_CNTR_SC_DEV[id] | PIO2_CNTR_RW_BOTH | card->cntr[id].mode;
- retval = vme_master_write(card->window, &data, 1, PIO2_CNTR_CTRL[id]);
- if (retval < 0)
- return retval;
-
- data = card->cntr[id].count & 0xFF;
- retval = vme_master_write(card->window, &data, 1, PIO2_CNTR_DATA[id]);
- if (retval < 0)
- return retval;
-
- data = (card->cntr[id].count >> 8) & 0xFF;
- retval = vme_master_write(card->window, &data, 1, PIO2_CNTR_DATA[id]);
- if (retval < 0)
- return retval;
-
- return 0;
-}
-
-int pio2_cntr_reset(struct pio2_card *card)
-{
- int i, retval = 0;
- u8 reg;
-
- /* Clear down all timers */
- for (i = 0; i < 6; i++) {
- card->cntr[i].mode = PIO2_CNTR_MODE5;
- card->cntr[i].count = 0;
- retval = pio2_cntr_irq_set(card, i);
- if (retval < 0)
- return retval;
- }
-
- /* Ensure all counter interrupts are cleared */
- do {
- retval = vme_master_read(card->window, &reg, 1,
- PIO2_REGS_INT_STAT_CNTR);
- if (retval < 0)
- return retval;
- } while (reg != 0);
-
- return retval;
-}
-