Merge branch 'omap3-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel

This commit is contained in:
Russell King
2008-12-15 22:13:26 +00:00
committed by Russell King
321 changed files with 7039 additions and 3389 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ static void do_test_timer(unsigned long data)
int cpu; int cpu;
/* Increment the counters */ /* Increment the counters */
on_each_cpu(test_each, NULL, 0, 1); on_each_cpu(test_each, NULL, 1);
/* Read all the counters */ /* Read all the counters */
printk("Counters read from CPU %d\n", smp_processor_id()); printk("Counters read from CPU %d\n", smp_processor_id());
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
+12 -2
View File
@@ -779,6 +779,7 @@ ATM
P: Chas Williams P: Chas Williams
M: chas@cmf.nrl.navy.mil M: chas@cmf.nrl.navy.mil
L: linux-atm-general@lists.sourceforge.net (subscribers-only) L: linux-atm-general@lists.sourceforge.net (subscribers-only)
L: netdev@vger.kernel.org
W: http://linux-atm.sourceforge.net W: http://linux-atm.sourceforge.net
S: Maintained S: Maintained
@@ -3758,6 +3759,15 @@ M: drzeus-sdhci@drzeus.cx
L: sdhci-devel@list.drzeus.cx L: sdhci-devel@list.drzeus.cx
S: Maintained S: Maintained
SECURITY SUBSYSTEM
F: security/
P: James Morris
M: jmorris@namei.org
L: linux-kernel@vger.kernel.org
L: linux-security-module@vger.kernel.org (suggested Cc:)
T: git kernel.org:pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git
S: Supported
SECURITY CONTACT SECURITY CONTACT
P: Security Officers P: Security Officers
M: security@kernel.org M: security@kernel.org
@@ -4235,7 +4245,7 @@ M: dedekind@infradead.org
P: Adrian Hunter P: Adrian Hunter
M: ext-adrian.hunter@nokia.com M: ext-adrian.hunter@nokia.com
L: linux-mtd@lists.infradead.org L: linux-mtd@lists.infradead.org
T: git git://git.infradead.org/~dedekind/ubifs-2.6.git T: git git://git.infradead.org/ubifs-2.6.git
W: http://www.linux-mtd.infradead.org/doc/ubifs.html W: http://www.linux-mtd.infradead.org/doc/ubifs.html
S: Maintained S: Maintained
@@ -4289,7 +4299,7 @@ P: Artem Bityutskiy
M: dedekind@infradead.org M: dedekind@infradead.org
W: http://www.linux-mtd.infradead.org/ W: http://www.linux-mtd.infradead.org/
L: linux-mtd@lists.infradead.org L: linux-mtd@lists.infradead.org
T: git git://git.infradead.org/~dedekind/ubi-2.6.git T: git git://git.infradead.org/ubi-2.6.git
S: Maintained S: Maintained
USB ACM DRIVER USB ACM DRIVER
+1 -1
View File
@@ -1,7 +1,7 @@
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 28 SUBLEVEL = 28
EXTRAVERSION = -rc7 EXTRAVERSION = -rc8
NAME = Erotic Pickled Herring NAME = Erotic Pickled Herring
# *DOCUMENTATION* # *DOCUMENTATION*
File diff suppressed because it is too large Load Diff
+147 -1
View File
@@ -316,7 +316,82 @@ CONFIG_BINFMT_MISC=y
# #
# CONFIG_PM is not set # CONFIG_PM is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_NET is not set CONFIG_NET=y
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=y
# CONFIG_XFRM_SUB_POLICY is not set
CONFIG_XFRM_MIGRATE=y
# CONFIG_XFRM_STATISTICS is not set
CONFIG_NET_KEY=y
CONFIG_NET_KEY_MIGRATE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_SCHED is not set
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_PHONET is not set
# CONFIG_WIRELESS is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
# #
# Device Drivers # Device Drivers
@@ -332,6 +407,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set # CONFIG_SYS_HYPERVISOR is not set
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
# CONFIG_MTD is not set # CONFIG_MTD is not set
# CONFIG_PARPORT is not set # CONFIG_PARPORT is not set
CONFIG_BLK_DEV=y CONFIG_BLK_DEV=y
@@ -390,6 +467,54 @@ CONFIG_SCSI_LOWLEVEL=y
# CONFIG_SCSI_DH is not set # CONFIG_SCSI_DH is not set
# CONFIG_ATA is not set # CONFIG_ATA is not set
# CONFIG_MD is not set # CONFIG_MD is not set
CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_AX88796 is not set
# CONFIG_SMC91X is not set
# CONFIG_DM9000 is not set
# CONFIG_ENC28J60 is not set
CONFIG_SMC911X=y
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
# CONFIG_B44 is not set
CONFIG_NETDEV_1000=y
CONFIG_NETDEV_10000=y
#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
# CONFIG_IWLWIFI_LEDS is not set
#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_WAN is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_ISDN is not set
# #
# Input device support # Input device support
@@ -816,6 +941,27 @@ CONFIG_TMPFS=y
# CONFIG_ROMFS_FS is not set # CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set # CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set # CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
# CONFIG_SUNRPC_REGISTER_V4 is not set
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
# #
# Partition Types # Partition Types
+10 -6
View File
@@ -237,6 +237,7 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
#if __LINUX_ARM_ARCH__ < 5 #if __LINUX_ARM_ARCH__ < 5
#include <asm-generic/bitops/ffz.h> #include <asm-generic/bitops/ffz.h>
#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/__ffs.h> #include <asm-generic/bitops/__ffs.h>
#include <asm-generic/bitops/fls.h> #include <asm-generic/bitops/fls.h>
#include <asm-generic/bitops/ffs.h> #include <asm-generic/bitops/ffs.h>
@@ -277,16 +278,19 @@ static inline int constant_fls(int x)
* the clz instruction for much better code efficiency. * the clz instruction for much better code efficiency.
*/ */
#define __fls(x) \
( __builtin_constant_p(x) ? constant_fls(x) : \
({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) )
/* Implement fls() in C so that 64-bit args are suitably truncated */
static inline int fls(int x) static inline int fls(int x)
{ {
return __fls(x); int ret;
if (__builtin_constant_p(x))
return constant_fls(x);
asm("clz\t%0, %1" : "=r" (ret) : "r" (x) : "cc");
ret = 32 - ret;
return ret;
} }
#define __fls(x) (fls(x) - 1)
#define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); }) #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
#define __ffs(x) (ffs(x) - 1) #define __ffs(x) (ffs(x) - 1)
#define ffz(x) __ffs( ~(x) ) #define ffz(x) __ffs( ~(x) )
+1 -1
View File
@@ -23,7 +23,7 @@
#include <asm/types.h> #include <asm/types.h>
#ifdef __KERNEL__ #ifdef __KERNEL__
#define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \ #define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \
TASK_SIZE : TASK_SIZE_26) TASK_SIZE : TASK_SIZE_26)
#define STACK_TOP_MAX TASK_SIZE #define STACK_TOP_MAX TASK_SIZE
#endif #endif
+4 -3
View File
@@ -205,7 +205,7 @@ static struct platform_device *devices[] __initdata = {
static int nand_dev_ready(struct omap_nand_platform_data *data) static int nand_dev_ready(struct omap_nand_platform_data *data)
{ {
return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); return gpio_get_value(P2_NAND_RB_GPIO_PIN);
} }
static struct omap_uart_config fsample_uart_config __initdata = { static struct omap_uart_config fsample_uart_config __initdata = {
@@ -223,8 +223,9 @@ static struct omap_board_config_kernel fsample_config[] = {
static void __init omap_fsample_init(void) static void __init omap_fsample_init(void)
{ {
if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
nand_data.dev_ready = nand_dev_ready; BUG();
nand_data.dev_ready = nand_dev_ready;
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
omap_cfg_reg(M8_1610_FLASH_CS2B_WE); omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
+11 -13
View File
@@ -250,11 +250,8 @@ static struct platform_device h2_kp_device = {
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
static int h2_transceiver_mode(struct device *dev, int state) static int h2_transceiver_mode(struct device *dev, int state)
{ {
if (state & IR_SIRMODE) /* SIR when low, else MIR/FIR when HIGH */
omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 0); gpio_set_value(H2_IRDA_FIRSEL_GPIO_PIN, !(state & IR_SIRMODE));
else /* MIR/FIR */
omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 1);
return 0; return 0;
} }
#endif #endif
@@ -342,7 +339,7 @@ static struct platform_device *h2_devices[] __initdata = {
static void __init h2_init_smc91x(void) static void __init h2_init_smc91x(void)
{ {
if ((omap_request_gpio(0)) < 0) { if (gpio_request(0, "SMC91x irq") < 0) {
printk("Error requesting gpio 0 for smc91x irq\n"); printk("Error requesting gpio 0 for smc91x irq\n");
return; return;
} }
@@ -409,7 +406,7 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
static int h2_nand_dev_ready(struct omap_nand_platform_data *data) static int h2_nand_dev_ready(struct omap_nand_platform_data *data)
{ {
return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN); return gpio_get_value(H2_NAND_RB_GPIO_PIN);
} }
static void __init h2_init(void) static void __init h2_init(void)
@@ -428,8 +425,9 @@ static void __init h2_init(void)
h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
h2_nand_resource.end += SZ_4K - 1; h2_nand_resource.end += SZ_4K - 1;
if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN))) if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
h2_nand_data.dev_ready = h2_nand_dev_ready; BUG();
gpio_direction_input(H2_NAND_RB_GPIO_PIN);
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
omap_cfg_reg(M8_1610_FLASH_CS2B_WE); omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
@@ -441,10 +439,10 @@ static void __init h2_init(void)
/* Irda */ /* Irda */
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A);
if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) { if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0)
omap_set_gpio_direction(H2_IRDA_FIRSEL_GPIO_PIN, 0); BUG();
h2_irda_data.transceiver_mode = h2_transceiver_mode; gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0);
} h2_irda_data.transceiver_mode = h2_transceiver_mode;
#endif #endif
platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
+5 -4
View File
@@ -498,7 +498,7 @@ static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
static int nand_dev_ready(struct omap_nand_platform_data *data) static int nand_dev_ready(struct omap_nand_platform_data *data)
{ {
return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN); return gpio_get_value(H3_NAND_RB_GPIO_PIN);
} }
static void __init h3_init(void) static void __init h3_init(void)
@@ -516,8 +516,9 @@ static void __init h3_init(void)
nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS; nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
nand_resource.end += SZ_4K - 1; nand_resource.end += SZ_4K - 1;
if (!(omap_request_gpio(H3_NAND_RB_GPIO_PIN))) if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0)
nand_data.dev_ready = nand_dev_ready; BUG();
nand_data.dev_ready = nand_dev_ready;
/* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
/* GPIO10 pullup/down register, Enable pullup on GPIO10 */ /* GPIO10 pullup/down register, Enable pullup on GPIO10 */
@@ -537,7 +538,7 @@ static void __init h3_init(void)
static void __init h3_init_smc91x(void) static void __init h3_init_smc91x(void)
{ {
omap_cfg_reg(W15_1710_GPIO40); omap_cfg_reg(W15_1710_GPIO40);
if (omap_request_gpio(40) < 0) { if (gpio_request(40, "SMC91x irq") < 0) {
printk("Error requesting gpio 40 for smc91x irq\n"); printk("Error requesting gpio 40 for smc91x irq\n");
return; return;
} }
+1 -1
View File
@@ -301,7 +301,7 @@ static void __init innovator_init_smc91x(void)
OMAP1510_FPGA_RST); OMAP1510_FPGA_RST);
udelay(750); udelay(750);
} else { } else {
if ((omap_request_gpio(0)) < 0) { if (gpio_request(0, "SMC91x irq") < 0) {
printk("Error requesting gpio 0 for smc91x irq\n"); printk("Error requesting gpio 0 for smc91x irq\n");
return; return;
} }
+6 -6
View File
@@ -102,7 +102,7 @@ static void mipid_shutdown(struct mipid_platform_data *pdata)
{ {
if (pdata->nreset_gpio != -1) { if (pdata->nreset_gpio != -1) {
printk(KERN_INFO "shutdown LCD\n"); printk(KERN_INFO "shutdown LCD\n");
omap_set_gpio_dataout(pdata->nreset_gpio, 0); gpio_set_value(pdata->nreset_gpio, 0);
msleep(120); msleep(120);
} }
} }
@@ -124,13 +124,13 @@ static void mipid_dev_init(void)
static void ads7846_dev_init(void) static void ads7846_dev_init(void)
{ {
if (omap_request_gpio(ADS7846_PENDOWN_GPIO) < 0) if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
} }
static int ads7846_get_pendown_state(void) static int ads7846_get_pendown_state(void)
{ {
return !omap_get_gpio_datain(ADS7846_PENDOWN_GPIO); return !gpio_get_value(ADS7846_PENDOWN_GPIO);
} }
static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = { static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
@@ -228,9 +228,9 @@ static void nokia770_audio_pwr_up(void)
/* Turn on codec */ /* Turn on codec */
aic23_power_up(); aic23_power_up();
if (omap_get_gpio_datain(HEADPHONE_GPIO)) if (gpio_get_value(HEADPHONE_GPIO))
/* HP not connected, turn on amplifier */ /* HP not connected, turn on amplifier */
omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 1); gpio_set_value(AMPLIFIER_CTRL_GPIO, 1);
else else
/* HP connected, do not turn on amplifier */ /* HP connected, do not turn on amplifier */
printk("HP connected\n"); printk("HP connected\n");
@@ -250,7 +250,7 @@ static DECLARE_DELAYED_WORK(codec_power_down_work, codec_delayed_power_down);
static void nokia770_audio_pwr_down(void) static void nokia770_audio_pwr_down(void)
{ {
/* Turn off amplifier */ /* Turn off amplifier */
omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 0); gpio_set_value(AMPLIFIER_CTRL_GPIO, 0);
/* Turn off codec: schedule delayed work */ /* Turn off codec: schedule delayed work */
schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */ schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */
+35 -8
View File
@@ -188,7 +188,8 @@ static struct gpio_led tps_leds[] = {
/* NOTE: D9 and D2 have hardware blink support. /* NOTE: D9 and D2 have hardware blink support.
* Also, D9 requires non-battery power. * Also, D9 requires non-battery power.
*/ */
{ .gpio = OSK_TPS_GPIO_LED_D9, .name = "d9", }, { .gpio = OSK_TPS_GPIO_LED_D9, .name = "d9",
.default_trigger = "ide-disk", },
{ .gpio = OSK_TPS_GPIO_LED_D2, .name = "d2", }, { .gpio = OSK_TPS_GPIO_LED_D2, .name = "d2", },
{ .gpio = OSK_TPS_GPIO_LED_D3, .name = "d3", .active_low = 1, { .gpio = OSK_TPS_GPIO_LED_D3, .name = "d3", .active_low = 1,
.default_trigger = "heartbeat", }, .default_trigger = "heartbeat", },
@@ -260,7 +261,6 @@ static struct i2c_board_info __initdata osk_i2c_board_info[] = {
}, },
/* TODO when driver support is ready: /* TODO when driver support is ready:
* - aic23 audio chip at 0x1a * - aic23 audio chip at 0x1a
* - on Mistral, 24c04 eeprom at 0x50
* - optionally on Mistral, ov9640 camera sensor at 0x30 * - optionally on Mistral, ov9640 camera sensor at 0x30
*/ */
}; };
@@ -288,7 +288,7 @@ static void __init osk_init_cf(void)
return; return;
} }
/* the CF I/O IRQ is really active-low */ /* the CF I/O IRQ is really active-low */
set_irq_type(OMAP_GPIO_IRQ(62), IRQ_TYPE_EDGE_FALLING); set_irq_type(gpio_to_irq(62), IRQ_TYPE_EDGE_FALLING);
} }
static void __init osk_init_irq(void) static void __init osk_init_irq(void)
@@ -337,11 +337,28 @@ static struct omap_board_config_kernel osk_config[] __initdata = {
#ifdef CONFIG_OMAP_OSK_MISTRAL #ifdef CONFIG_OMAP_OSK_MISTRAL
#include <linux/input.h> #include <linux/input.h>
#include <linux/i2c/at24.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
#include <mach/keypad.h> #include <mach/keypad.h>
static struct at24_platform_data at24c04 = {
.byte_len = SZ_4K / 8,
.page_size = 16,
};
static struct i2c_board_info __initdata mistral_i2c_board_info[] = {
{
/* NOTE: powered from LCD supply */
I2C_BOARD_INFO("24c04", 0x50),
.platform_data = &at24c04,
},
/* TODO when driver support is ready:
* - optionally ov9640 camera sensor at 0x30
*/
};
static const int osk_keymap[] = { static const int osk_keymap[] = {
/* KEY(col, row, code) */ /* KEY(col, row, code) */
KEY(0, 0, KEY_F1), /* SW4 */ KEY(0, 0, KEY_F1), /* SW4 */
@@ -483,23 +500,30 @@ static void __init osk_mistral_init(void)
omap_cfg_reg(P20_1610_GPIO4); /* PENIRQ */ omap_cfg_reg(P20_1610_GPIO4); /* PENIRQ */
gpio_request(4, "ts_int"); gpio_request(4, "ts_int");
gpio_direction_input(4); gpio_direction_input(4);
set_irq_type(OMAP_GPIO_IRQ(4), IRQ_TYPE_EDGE_FALLING); set_irq_type(gpio_to_irq(4), IRQ_TYPE_EDGE_FALLING);
spi_register_board_info(mistral_boardinfo, spi_register_board_info(mistral_boardinfo,
ARRAY_SIZE(mistral_boardinfo)); ARRAY_SIZE(mistral_boardinfo));
/* the sideways button (SW1) is for use as a "wakeup" button */ /* the sideways button (SW1) is for use as a "wakeup" button
*
* NOTE: The Mistral board has the wakeup button (SW1) wired
* to the LCD 3.3V rail, which is powered down during suspend.
* To allow this button to wake up the omap, work around this
* HW bug by rewiring SW1 to use the main 3.3V rail.
*/
omap_cfg_reg(N15_1610_MPUIO2); omap_cfg_reg(N15_1610_MPUIO2);
if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) { if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) {
int ret = 0; int ret = 0;
int irq = gpio_to_irq(OMAP_MPUIO(2));
gpio_direction_input(OMAP_MPUIO(2)); gpio_direction_input(OMAP_MPUIO(2));
set_irq_type(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), IRQ_TYPE_EDGE_RISING); set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
#ifdef CONFIG_PM #ifdef CONFIG_PM
/* share the IRQ in case someone wants to use the /* share the IRQ in case someone wants to use the
* button for more than wakeup from system sleep. * button for more than wakeup from system sleep.
*/ */
ret = request_irq(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), ret = request_irq(irq,
&osk_mistral_wake_interrupt, &osk_mistral_wake_interrupt,
IRQF_SHARED, "mistral_wakeup", IRQF_SHARED, "mistral_wakeup",
&osk_mistral_wake_interrupt); &osk_mistral_wake_interrupt);
@@ -508,7 +532,7 @@ static void __init osk_mistral_init(void)
printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n", printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n",
ret); ret);
} else } else
enable_irq_wake(OMAP_GPIO_IRQ(OMAP_MPUIO(2))); enable_irq_wake(irq);
#endif #endif
} else } else
printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");
@@ -520,6 +544,9 @@ static void __init osk_mistral_init(void)
if (gpio_request(2, "lcd_pwr") == 0) if (gpio_request(2, "lcd_pwr") == 0)
gpio_direction_output(2, 1); gpio_direction_output(2, 1);
i2c_register_board_info(1, mistral_i2c_board_info,
ARRAY_SIZE(mistral_i2c_board_info));
platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
} }
#else #else
+7 -7
View File
@@ -255,7 +255,7 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
{ {
int charging, batt, hi, lo, mid; int charging, batt, hi, lo, mid;
charging = !omap_get_gpio_datain(PALMTE_DC_GPIO); charging = !gpio_get_value(PALMTE_DC_GPIO);
batt = battery[0]; batt = battery[0];
if (charging) if (charging)
batt -= 60; batt -= 60;
@@ -335,11 +335,11 @@ static void palmte_headphones_detect(void *data, int state)
{ {
if (state) { if (state) {
/* Headphones connected, disable speaker */ /* Headphones connected, disable speaker */
omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 0); gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
printk(KERN_INFO "PM: speaker off\n"); printk(KERN_INFO "PM: speaker off\n");
} else { } else {
/* Headphones unplugged, re-enable speaker */ /* Headphones unplugged, re-enable speaker */
omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 1); gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
printk(KERN_INFO "PM: speaker on\n"); printk(KERN_INFO "PM: speaker on\n");
} }
} }
@@ -347,18 +347,18 @@ static void palmte_headphones_detect(void *data, int state)
static void __init palmte_misc_gpio_setup(void) static void __init palmte_misc_gpio_setup(void)
{ {
/* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */
if (omap_request_gpio(PALMTE_PINTDAV_GPIO)) { if (gpio_request(PALMTE_PINTDAV_GPIO, "TSC2102 PINTDAV") < 0) {
printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMTE_PINTDAV_GPIO, 1); gpio_direction_input(PALMTE_PINTDAV_GPIO);
/* Set USB-or-DC-IN pin as input (unused) */ /* Set USB-or-DC-IN pin as input (unused) */
if (omap_request_gpio(PALMTE_USB_OR_DC_GPIO)) { if (gpio_request(PALMTE_USB_OR_DC_GPIO, "USB/DC-IN") < 0) {
printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); printk(KERN_ERR "Could not reserve cable signal GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMTE_USB_OR_DC_GPIO, 1); gpio_direction_input(PALMTE_USB_OR_DC_GPIO);
} }
static void __init omap_palmte_init(void) static void __init omap_palmte_init(void)
+1 -1
View File
@@ -268,7 +268,7 @@ static struct platform_device *palmtt_devices[] __initdata = {
static int palmtt_get_pendown_state(void) static int palmtt_get_pendown_state(void)
{ {
return !omap_get_gpio_datain(6); return !gpio_get_value(6);
} }
static const struct ads7846_platform_data palmtt_ts_info = { static const struct ads7846_platform_data palmtt_ts_info = {
+11 -12
View File
@@ -239,7 +239,7 @@ static struct platform_device *devices[] __initdata = {
static int static int
palmz71_get_pendown_state(void) palmz71_get_pendown_state(void)
{ {
return !omap_get_gpio_datain(PALMZ71_PENIRQ_GPIO); return !gpio_get_value(PALMZ71_PENIRQ_GPIO);
} }
static const struct ads7846_platform_data palmz71_ts_info = { static const struct ads7846_platform_data palmz71_ts_info = {
@@ -295,13 +295,13 @@ static struct omap_board_config_kernel palmz71_config[] __initdata = {
static irqreturn_t static irqreturn_t
palmz71_powercable(int irq, void *dev_id) palmz71_powercable(int irq, void *dev_id)
{ {
if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) { if (gpio_get_value(PALMZ71_USBDETECT_GPIO)) {
printk(KERN_INFO "PM: Power cable connected\n"); printk(KERN_INFO "PM: Power cable connected\n");
set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), set_irq_type(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
IRQ_TYPE_EDGE_FALLING); IRQ_TYPE_EDGE_FALLING);
} else { } else {
printk(KERN_INFO "PM: Power cable disconnected\n"); printk(KERN_INFO "PM: Power cable disconnected\n");
set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), set_irq_type(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
IRQ_TYPE_EDGE_RISING); IRQ_TYPE_EDGE_RISING);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
@@ -323,29 +323,28 @@ palmz71_gpio_setup(int early)
{ {
if (early) { if (early) {
/* Only set GPIO1 so we have a working serial */ /* Only set GPIO1 so we have a working serial */
omap_set_gpio_dataout(1, 1); gpio_direction_output(1, 1);
omap_set_gpio_direction(1, 0);
} else { } else {
/* Set MMC/SD host WP pin as input */ /* Set MMC/SD host WP pin as input */
if (omap_request_gpio(PALMZ71_MMC_WP_GPIO)) { if (gpio_request(PALMZ71_MMC_WP_GPIO, "MMC WP") < 0) {
printk(KERN_ERR "Could not reserve WP GPIO!\n"); printk(KERN_ERR "Could not reserve WP GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMZ71_MMC_WP_GPIO, 1); gpio_direction_input(PALMZ71_MMC_WP_GPIO);
/* Monitor the Power-cable-connected signal */ /* Monitor the Power-cable-connected signal */
if (omap_request_gpio(PALMZ71_USBDETECT_GPIO)) { if (gpio_request(PALMZ71_USBDETECT_GPIO, "USB detect") < 0) {
printk(KERN_ERR printk(KERN_ERR
"Could not reserve cable signal GPIO!\n"); "Could not reserve cable signal GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMZ71_USBDETECT_GPIO, 1); gpio_direction_input(PALMZ71_USBDETECT_GPIO);
if (request_irq(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
palmz71_powercable, IRQF_SAMPLE_RANDOM, palmz71_powercable, IRQF_SAMPLE_RANDOM,
"palmz71-cable", 0)) "palmz71-cable", 0))
printk(KERN_ERR printk(KERN_ERR
"IRQ request for power cable failed!\n"); "IRQ request for power cable failed!\n");
palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0); palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0);
} }
} }
+4 -3
View File
@@ -205,7 +205,7 @@ static struct platform_device *devices[] __initdata = {
static int nand_dev_ready(struct omap_nand_platform_data *data) static int nand_dev_ready(struct omap_nand_platform_data *data)
{ {
return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); return gpio_get_value(P2_NAND_RB_GPIO_PIN);
} }
static struct omap_uart_config perseus2_uart_config __initdata = { static struct omap_uart_config perseus2_uart_config __initdata = {
@@ -223,8 +223,9 @@ static struct omap_board_config_kernel perseus2_config[] __initdata = {
static void __init omap_perseus2_init(void) static void __init omap_perseus2_init(void)
{ {
if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
nand_data.dev_ready = nand_dev_ready; BUG();
nand_data.dev_ready = nand_dev_ready;
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
omap_cfg_reg(M8_1610_FLASH_CS2B_WE); omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
+3 -8
View File
@@ -436,14 +436,9 @@ static void __init omap_sx1_init(void)
omap_request_gpio(1); /* A_IRDA_OFF */ omap_request_gpio(1); /* A_IRDA_OFF */
omap_request_gpio(11); /* A_SWITCH */ omap_request_gpio(11); /* A_SWITCH */
omap_request_gpio(15); /* A_USB_ON */ omap_request_gpio(15); /* A_USB_ON */
omap_set_gpio_direction(1, 0);/* gpio1 -> output */ gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */
omap_set_gpio_direction(11, 0);/* gpio11 -> output */ gpio_direction_output(11, 0); /*A_SWITCH = 0 */
omap_set_gpio_direction(15, 0);/* gpio15 -> output */ gpio_direction_output(15, 0); /*A_USB_ON = 0 */
/* set GPIO data */
omap_set_gpio_dataout(1, 1);/*A_IRDA_OFF = 1 */
omap_set_gpio_dataout(11, 0);/*A_SWITCH = 0 */
omap_set_gpio_dataout(15, 0);/*A_USB_ON = 0 */
} }
/*----------------------------------------*/ /*----------------------------------------*/
static void __init omap_sx1_init_irq(void) static void __init omap_sx1_init_irq(void)
+23 -26
View File
@@ -168,29 +168,27 @@ static void __init voiceblue_init_irq(void)
static void __init voiceblue_init(void) static void __init voiceblue_init(void)
{ {
/* Watchdog */ /* Watchdog */
omap_request_gpio(0); gpio_request(0, "Watchdog");
/* smc91x reset */ /* smc91x reset */
omap_request_gpio(7); gpio_request(7, "SMC91x reset");
omap_set_gpio_direction(7, 0); gpio_direction_output(7, 1);
omap_set_gpio_dataout(7, 1);
udelay(2); /* wait at least 100ns */ udelay(2); /* wait at least 100ns */
omap_set_gpio_dataout(7, 0); gpio_set_value(7, 0);
mdelay(50); /* 50ms until PHY ready */ mdelay(50); /* 50ms until PHY ready */
/* smc91x interrupt pin */ /* smc91x interrupt pin */
omap_request_gpio(8); gpio_request(8, "SMC91x irq");
/* 16C554 reset*/ /* 16C554 reset*/
omap_request_gpio(6); gpio_request(6, "16C554 reset");
omap_set_gpio_direction(6, 0); gpio_direction_output(6, 0);
omap_set_gpio_dataout(6, 0);
/* 16C554 interrupt pins */ /* 16C554 interrupt pins */
omap_request_gpio(12); gpio_request(12, "16C554 irq");
omap_request_gpio(13); gpio_request(13, "16C554 irq");
omap_request_gpio(14); gpio_request(14, "16C554 irq");
omap_request_gpio(15); gpio_request(15, "16C554 irq");
set_irq_type(OMAP_GPIO_IRQ(12), IRQ_TYPE_EDGE_RISING); set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING); set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
set_irq_type(OMAP_GPIO_IRQ(14), IRQ_TYPE_EDGE_RISING); set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
set_irq_type(OMAP_GPIO_IRQ(15), IRQ_TYPE_EDGE_RISING); set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
omap_board_config = voiceblue_config; omap_board_config = voiceblue_config;
@@ -244,19 +242,18 @@ static int wdt_gpio_state;
void voiceblue_wdt_enable(void) void voiceblue_wdt_enable(void)
{ {
omap_set_gpio_direction(0, 0); gpio_direction_output(0, 0);
omap_set_gpio_dataout(0, 0); gpio_set_value(0, 1);
omap_set_gpio_dataout(0, 1); gpio_set_value(0, 0);
omap_set_gpio_dataout(0, 0);
wdt_gpio_state = 0; wdt_gpio_state = 0;
} }
void voiceblue_wdt_disable(void) void voiceblue_wdt_disable(void)
{ {
omap_set_gpio_dataout(0, 0); gpio_set_value(0, 0);
omap_set_gpio_dataout(0, 1); gpio_set_value(0, 1);
omap_set_gpio_dataout(0, 0); gpio_set_value(0, 0);
omap_set_gpio_direction(0, 1); gpio_direction_input(0);
} }
void voiceblue_wdt_ping(void) void voiceblue_wdt_ping(void)
@@ -265,7 +262,7 @@ void voiceblue_wdt_ping(void)
return; return;
wdt_gpio_state = !wdt_gpio_state; wdt_gpio_state = !wdt_gpio_state;
omap_set_gpio_dataout(0, wdt_gpio_state); gpio_set_value(0, wdt_gpio_state);
} }
void voiceblue_reset(void) void voiceblue_reset(void)
+3 -3
View File
@@ -177,9 +177,9 @@ void omap1510_fpga_init_irq(void)
* NOTE: For general GPIO/MPUIO access and interrupts, please see * NOTE: For general GPIO/MPUIO access and interrupts, please see
* gpio.[ch] * gpio.[ch]
*/ */
omap_request_gpio(13); gpio_request(13, "FPGA irq");
omap_set_gpio_direction(13, 1); gpio_direction_input(13);
set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING); set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux);
} }

Some files were not shown because too many files have changed in this diff Show More