summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/ssi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/ssi.c')
-rw-r--r--arch/arm/mach-omap2/ssi.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/arch/arm/mach-omap2/ssi.c b/arch/arm/mach-omap2/ssi.c
deleted file mode 100644
index a9d6eee1abba..000000000000
--- a/arch/arm/mach-omap2/ssi.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/ssi.c
- *
- * Copyright (C) 2010 Nokia Corporation. All rights reserved.
- *
- * Contact: Carlos Chinea <carlos.chinea@nokia.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/err.h>
-#include <linux/gpio.h>
-#include <linux/platform_device.h>
-#include <linux/platform_data/hsi-omap-ssi.h>
-#include "omap_hwmod.h"
-#include "omap_device.h"
-#include "omap-pm.h"
-
-static struct omap_ssi_platform_data ssi_pdata = {
- .num_ports = SSI_NUM_PORTS,
- .cawake_gpio = {0},
- .get_dev_context_loss_count = omap_pm_get_dev_context_loss_count,
-};
-
-int __init omap_ssi_config(struct omap_ssi_board_config *ssi_config)
-{
- unsigned int port, offset, cawake_gpio;
- int err;
-
- ssi_pdata.num_ports = ssi_config->num_ports;
-
- for (port = 0, offset = 7; port < ssi_config->num_ports; port++, offset += 5) {
- cawake_gpio = ssi_config->cawake_gpio[port];
- if (!cawake_gpio)
- continue; /* Nothing to do */
- err = gpio_request(cawake_gpio, "cawake");
- if (err < 0)
- goto rback;
- gpio_direction_input(cawake_gpio);
-
- ssi_pdata.cawake_gpio[port] = ssi_config->cawake_gpio[port];
- }
-
- return 0;
-
-rback:
- pr_err("omap-ssi: Request cawake (gpio%d) failed\n", cawake_gpio);
- while (port > 0)
- gpio_free(ssi_config->cawake_gpio[--port]);
-
- return err;
-}
-
-static int __init omap_ssi_init(void)
-{
- struct omap_hwmod *oh;
- struct platform_device *pdev;
-
- oh = omap_hwmod_lookup("ssi");
- if (!oh)
- return -EINVAL;
-
- pdev = omap_device_build("omap_ssi", 0, oh, &ssi_pdata, sizeof(struct omap_ssi_platform_data));
- WARN(IS_ERR(pdev), "Can't build omap_device for omap_ssi\n");
-
- return 0;
-}
-subsys_initcall(omap_ssi_init);