]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: ux500: delete custom pin control system
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 7 May 2012 06:50:31 +0000 (08:50 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 11 May 2012 09:14:18 +0000 (11:14 +0200)
At the beginning of the first patch series I included the custom
ux500 pin control system to make sure I could eventually replace
it with the standard subsystem driver. So now that we've done so,
let's remove it.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-ux500/Makefile
arch/arm/mach-ux500/board-mop500-pins.c
arch/arm/mach-ux500/pins.c [deleted file]
arch/arm/mach-ux500/pins.h [deleted file]

index 015932c6bf08e1c99ca45e41d113cbf4c91820c0..11729bc6219438b9b47763be58310cd5cf81e11e 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 obj-y                          := clock.o cpu.o devices.o devices-common.o \
-                                  id.o pins.o usb.o timer.o
+                                  id.o usb.o timer.o
 obj-$(CONFIG_CACHE_L2X0)       += cache-l2x0.o
 obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o dma-db5500.o
 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
index 28c456c2906c9d99094ae2347b2bfa745b2bafc3..157af7ee5cdcd7ae7b2aef172e5222c5b81b5f9a 100644 (file)
@@ -17,7 +17,6 @@
 #include <mach/hardware.h>
 
 #include "pins-db8500.h"
-#include "pins.h"
 #include "board-mop500.h"
 
 enum custom_pin_cfg_t {
diff --git a/arch/arm/mach-ux500/pins.c b/arch/arm/mach-ux500/pins.c
deleted file mode 100644 (file)
index 38c1d47..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2
- */
-
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/device.h>
-#include <linux/mutex.h>
-#include <linux/spinlock.h>
-#include <linux/err.h>
-#include <plat/pincfg.h>
-
-#include "pins.h"
-
-static LIST_HEAD(pin_lookups);
-static DEFINE_MUTEX(pin_lookups_mutex);
-static DEFINE_SPINLOCK(pins_lock);
-
-void __init ux500_pins_add(struct ux500_pin_lookup *pl, size_t num)
-{
-       mutex_lock(&pin_lookups_mutex);
-
-       while (num--) {
-               list_add_tail(&pl->node, &pin_lookups);
-               pl++;
-       }
-
-       mutex_unlock(&pin_lookups_mutex);
-}
-
-struct ux500_pins *ux500_pins_get(const char *name)
-{
-       struct ux500_pins *pins = NULL;
-       struct ux500_pin_lookup *pl;
-
-       mutex_lock(&pin_lookups_mutex);
-
-       list_for_each_entry(pl, &pin_lookups, node) {
-               if (!strcmp(pl->name, name)) {
-                       pins = pl->pins;
-                       goto out;
-               }
-       }
-
-out:
-       mutex_unlock(&pin_lookups_mutex);
-       return pins;
-}
-
-int ux500_pins_enable(struct ux500_pins *pins)
-{
-       unsigned long flags;
-       int ret = 0;
-
-       spin_lock_irqsave(&pins_lock, flags);
-
-       if (pins->usage++ == 0)
-               ret = nmk_config_pins(pins->cfg, pins->num);
-
-       spin_unlock_irqrestore(&pins_lock, flags);
-       return ret;
-}
-
-int ux500_pins_disable(struct ux500_pins *pins)
-{
-       unsigned long flags;
-       int ret = 0;
-
-       spin_lock_irqsave(&pins_lock, flags);
-
-       if (WARN_ON(pins->usage == 0))
-               goto out;
-
-       if (--pins->usage == 0)
-               ret = nmk_config_pins_sleep(pins->cfg, pins->num);
-
-out:
-       spin_unlock_irqrestore(&pins_lock, flags);
-       return ret;
-}
-
-void ux500_pins_put(struct ux500_pins *pins)
-{
-       WARN_ON(!pins);
-}
diff --git a/arch/arm/mach-ux500/pins.h b/arch/arm/mach-ux500/pins.h
deleted file mode 100644 (file)
index 0d36af2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2
- */
-
-#ifndef __MACH_UX500_PINS_H
-#define __MACH_UX500_PINS_H
-
-#include <linux/list.h>
-#include <plat/pincfg.h>
-
-#define PIN_LOOKUP(_name, _pins)       \
-{                                      \
-       .name   = _name,                \
-       .pins   = _pins,                \
-}
-
-#define UX500_PINS(name, pins...)                      \
-struct ux500_pins name = {                             \
-       .cfg = (pin_cfg_t[]) {pins},                    \
-       .num = ARRAY_SIZE(((pin_cfg_t[]) {pins})),      \
-}
-
-struct ux500_pins {
-       int usage;
-       int num;
-       pin_cfg_t *cfg;
-};
-
-struct ux500_pin_lookup {
-       struct list_head        node;
-       const char              *name;
-       struct ux500_pins       *pins;
-};
-
-void __init ux500_pins_add(struct ux500_pin_lookup *pl, size_t num);
-void __init ux500_offchip_gpio_init(struct ux500_pins *pins);
-struct ux500_pins *ux500_pins_get(const char *name);
-int ux500_pins_enable(struct ux500_pins *pins);
-int ux500_pins_disable(struct ux500_pins *pins);
-void ux500_pins_put(struct ux500_pins *pins);
-int pins_for_u9500(void);
-
-#endif