summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/files-2.6.30/arch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/s3c24xx/files-2.6.30/arch')
-rw-r--r--target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-bt.c9
-rw-r--r--target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gps.c2
-rw-r--r--target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gsm.c5
-rw-r--r--target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-wlan.c1
-rw-r--r--target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-shadow.c86
-rw-r--r--target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c20
6 files changed, 16 insertions, 107 deletions
diff --git a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-bt.c b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-bt.c
index 02cdd22..95c1e59 100644
--- a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-bt.c
+++ b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-bt.c
@@ -20,7 +20,6 @@
#include <mach/hardware.h>
#include <asm/mach-types.h>
-#include <linux/gta02-shadow.h>
#include <mach/gta02.h>
#include <linux/mfd/pcf50633/gpio.h>
@@ -62,7 +61,7 @@ static void __gta02_pm_bt_toggle_radio(struct device *dev, unsigned int on)
bt_data = dev_get_drvdata(dev);
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, !on);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, !on);
if (on) {
if (!regulator_is_enabled(bt_data->regulator))
@@ -72,7 +71,7 @@ static void __gta02_pm_bt_toggle_radio(struct device *dev, unsigned int on)
regulator_disable(bt_data->regulator);
}
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, on);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on);
}
@@ -100,7 +99,7 @@ static ssize_t bt_write(struct device *dev, struct device_attribute *attr,
__gta02_pm_bt_toggle_radio(dev, on);
} else if (!strcmp(attr->attr.name, "reset")) {
/* reset is low-active, so we need to invert */
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1);
}
return count;
@@ -177,7 +176,7 @@ static int __init gta02_bt_probe(struct platform_device *pdev)
/* we pull reset to low to make sure that the chip doesn't
* drain power through the reset line */
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, 0);
rfkill = rfkill_allocate(&pdev->dev, RFKILL_TYPE_BLUETOOTH);
diff --git a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gps.c b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gps.c
index 9325123..ef598c7 100644
--- a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gps.c
+++ b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gps.c
@@ -22,8 +22,6 @@
#include <asm/mach-types.h>
-#include <linux/gta02-shadow.h>
-
#include <mach/gta02.h>
#include <linux/mfd/pcf50633/core.h>
#include <linux/mfd/pcf50633/pmic.h>
diff --git a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gsm.c b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gsm.c
index afb4182..687b260 100644
--- a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gsm.c
+++ b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-gsm.c
@@ -30,7 +30,6 @@
#include <linux/mfd/pcf50633/gpio.h>
#include <mach/regs-gpio.h>
#include <mach/regs-gpioj.h>
-#include <linux/gta02-shadow.h>
int gta_gsm_interrupts;
EXPORT_SYMBOL(gta_gsm_interrupts);
@@ -114,9 +113,9 @@ static void gsm_on_off(struct device *dev, int on)
msleep(100);
- gta02_gpb_setpin(GTA02_GPIO_MODEM_ON, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_MODEM_ON, 1);
msleep(500);
- gta02_gpb_setpin(GTA02_GPIO_MODEM_ON, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_MODEM_ON, 0);
/*
* workaround for calypso firmware moko10 and earlier,
diff --git a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-wlan.c b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-wlan.c
index 5f2b159..9cb8e6a 100644
--- a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-wlan.c
+++ b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-pm-wlan.c
@@ -19,7 +19,6 @@
#include <mach/hardware.h>
#include <asm/mach-types.h>
-#include <linux/gta02-shadow.h>
#include <mach/gta02.h>
#include <mach/gta02-pm-wlan.h>
diff --git a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-shadow.c b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-shadow.c
deleted file mode 100644
index c65304a..0000000
--- a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/gta02-shadow.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Common utility code for GTA02
- *
- * Copyright (C) 2008 by Openmoko, Inc.
- * Author: Holger Hans Peter Freyther <freyther@openmoko.org>
- * All rights reserved.
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- */
-
-#include <linux/module.h>
-#include <linux/io.h>
-#include <linux/irq.h>
-
-#include <asm/gpio.h>
-#include <mach/regs-gpio.h>
-#include <linux/gta02-shadow.h>
-
-/**
- * Shadow GPIO bank B handling. For the LEDs we need to keep track of the state
- * in software. The s3c2410_gpio_setpin must not be used for GPIOs on bank B
- */
-static unsigned long gpb_mask;
-static unsigned long gpb_state;
-
-void gta02_gpb_add_shadow_gpio(unsigned int gpio)
-{
- unsigned long offset = S3C2410_GPIO_OFFSET(gpio);
- unsigned long flags;
-
- local_irq_save(flags);
- gpb_mask |= 1L << offset;
- local_irq_restore(flags);
-}
-EXPORT_SYMBOL(gta02_gpb_add_shadow_gpio);
-
-static void set_shadow_gpio(unsigned long offset, unsigned int value)
-{
- unsigned long state = value != 0;
-
- gpb_state &= ~(1L << offset);
- gpb_state |= state << offset;
-}
-
-void gta02_gpb_setpin(unsigned int pin, unsigned to)
-{
- void __iomem *base = S3C24XX_GPIO_BASE(S3C2410_GPB0);
- unsigned long offset = S3C2410_GPIO_OFFSET(pin);
- unsigned long flags;
- unsigned long dat;
-
- BUG_ON(base != S3C24XX_GPIO_BASE(pin));
-
- local_irq_save(flags);
- dat = __raw_readl(base + 0x04);
-
- /* Add the shadow values */
- dat &= ~gpb_mask;
- dat |= gpb_state;
-
- /* Do the operation like s3c2410_gpio_setpin */
- dat &= ~(1L << offset);
- dat |= to << offset;
-
- /* Update the shadow state */
- if ((1L << offset) & gpb_mask)
- set_shadow_gpio(offset, to);
-
- __raw_writel(dat, base + 0x04);
- local_irq_restore(flags);
-}
-EXPORT_SYMBOL(gta02_gpb_setpin);
diff --git a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c
index 30405ad..88377da 100644
--- a/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/target/linux/s3c24xx/files-2.6.30/arch/arm/mach-s3c2442/mach-gta02.c
@@ -112,7 +112,6 @@
#include <asm/fiq.h>
#include <linux/gta02-vibrator.h>
-#include <linux/gta02-shadow.h>
/* arbitrates which sensor IRQ owns the shared SPI bus */
static spinlock_t motion_irq_lock;
@@ -275,7 +274,7 @@ static long gta02_panic_blink(long count)
led ^= 1;
s3c2410_gpio_cfgpin(GTA02_GPIO_AUX_LED, S3C2410_GPIO_OUTPUT);
- gta02_gpb_setpin(GTA02_GPIO_AUX_LED, led);
+ s3c2410_gpio_setpin(GTA02_GPIO_AUX_LED, led);
last_blink = count;
return delay;
@@ -938,11 +937,11 @@ static void gta02_udc_command(enum s3c2410_udc_cmd_e cmd)
switch (cmd) {
case S3C2410_UDC_P_ENABLE:
printk(KERN_DEBUG "%s S3C2410_UDC_P_ENABLE\n", __func__);
- gta02_gpb_setpin(GTA02_GPIO_USB_PULLUP, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_USB_PULLUP, 1);
break;
case S3C2410_UDC_P_DISABLE:
printk(KERN_DEBUG "%s S3C2410_UDC_P_DISABLE\n", __func__);
- gta02_gpb_setpin(GTA02_GPIO_USB_PULLUP, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_USB_PULLUP, 0);
break;
case S3C2410_UDC_P_RESET:
printk(KERN_DEBUG "%s S3C2410_UDC_P_RESET\n", __func__);
@@ -1570,11 +1569,12 @@ static struct platform_device *gta02_devices_pmu_children[] = {
&gta02_resume_reason_device,
};
-static void gta02_register_glamo() {
+static void gta02_register_glamo(void)
+{
platform_device_register(&gta02_glamo_dev);
- if (!gpio_request(GTA02_GPIO_GLAMO(4), "jbt6k74 reset"))
+ if (gpio_request(GTA02_GPIO_GLAMO(4), "jbt6k74 reset"))
printk("gta02: Failed to request jbt6k74 reset pin\n");
- if (!gpio_direction_output(GTA02_GPIO_GLAMO(4), 1))
+ if (gpio_direction_output(GTA02_GPIO_GLAMO(4), 1))
printk("gta02: Failed to configure jbt6k74 reset pin\n");
platform_device_register(&spigpio_device);
}
@@ -1725,13 +1725,13 @@ void DEBUG_LED(int n)
{
switch (n) {
case 0:
- gta02_gpb_setpin(GTA02_GPIO_PWR_LED1, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_PWR_LED1, 1);
break;
case 1:
- gta02_gpb_setpin(GTA02_GPIO_PWR_LED2, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_PWR_LED2, 1);
break;
default:
- gta02_gpb_setpin(GTA02_GPIO_AUX_LED, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_AUX_LED, 1);
break;
}
}