diff options
Diffstat (limited to 'arch/arm/mach-pxa')
54 files changed, 245 insertions, 270 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index a8427115ee0..e6690a44917 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -7,7 +7,6 @@ comment "Intel/Marvell Dev Platforms (sorted by hardware release time)"  config MACH_PXA3XX_DT  	bool "Support PXA3xx platforms from device tree"  	select CPU_PXA300 -	select HAVE_PWM  	select POWER_SUPPLY  	select PXA3xx  	select USE_OF @@ -23,12 +22,10 @@ config ARCH_LUBBOCK  config MACH_MAINSTONE  	bool "Intel HCDDBBVA0 Development Platform (aka Mainstone)" -	select HAVE_PWM  	select PXA27x  config MACH_ZYLONITE  	bool -	select HAVE_PWM  	select PXA3xx  config MACH_ZYLONITE300 @@ -53,12 +50,16 @@ config MACH_TAVOREVB  	select CPU_PXA930  	select CPU_PXA935  	select PXA3xx +	select FB +	select FB_PXA  config MACH_SAAR  	bool "PXA930 Handheld Platform (aka SAAR)"  	select CPU_PXA930  	select CPU_PXA935  	select PXA3xx +	select FB +	select FB_PXA  comment "Third Party Dev Platforms (sorted by vendor name)" @@ -69,8 +70,7 @@ config ARCH_PXA_IDP  config ARCH_VIPER  	bool "Arcom/Eurotech VIPER SBC"  	select ARCOM_PCMCIA -	select HAVE_PWM -	select I2C_GPIO +	select I2C_GPIO if I2C=y  	select ISA  	select PXA25x  	select PXA_HAVE_ISA_IRQS @@ -120,7 +120,6 @@ config MACH_CM_X300  	bool "CompuLab CM-X300 modules"  	select CPU_PXA300  	select CPU_PXA310 -	select HAVE_PWM  	select PXA3xx  config MACH_CAPC7117 @@ -164,7 +163,6 @@ config MACH_XCEP  	select MTD_CFI_INTELEXT  	select MTD_PHYSMAP  	select PXA25x -	select SMC91X  	help  	  PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash.  	  Tuned for usage in Libera instruments for particle accelerators. @@ -181,6 +179,7 @@ config MACH_TRIZEPS4  config MACH_TRIZEPS4WL  	bool "Keith und Koep Trizeps4-WL DIMM-Module"  	depends on TRIZEPS_PXA +	select MACH_TRIZEPS4  	select PXA27x  	select TRIZEPS_PCMCIA @@ -211,7 +210,6 @@ config TRIZEPS_PCMCIA  config MACH_LOGICPD_PXA270  	bool "LogicPD PXA270 Card Engine Development Platform" -	select HAVE_PWM  	select PXA27x  config MACH_PCM027 @@ -222,7 +220,6 @@ config MACH_PCM027  config MACH_PCM990_BASEBOARD  	bool "PHYTEC PCM-990 development board"  	depends on MACH_PCM027 -	select HAVE_PWM  choice  	prompt "display on pcm990" @@ -246,7 +243,6 @@ config MACH_COLIBRI  config MACH_COLIBRI_PXA270_INCOME  	bool "Income s.r.o. PXA270 SBC"  	depends on MACH_COLIBRI -	select HAVE_PWM  	select PXA27x  config MACH_COLIBRI300 @@ -275,7 +271,6 @@ comment "End-user Products (sorted by vendor name)"  config MACH_H4700  	bool "HP iPAQ hx4700" -	select HAVE_PWM  	select IWMMXT  	select PXA27x @@ -289,14 +284,12 @@ config MACH_HIMALAYA  config MACH_MAGICIAN  	bool "Enable HTC Magician Support" -	select HAVE_PWM  	select IWMMXT  	select PXA27x  config MACH_MIOA701  	bool "Mitac Mio A701 Support"  	select GPIO_SYSFS -	select HAVE_PWM  	select IWMMXT  	select PXA27x  	help @@ -306,7 +299,6 @@ config MACH_MIOA701  config PXA_EZX  	bool "Motorola EZX Platform" -	select HAVE_PWM  	select IWMMXT  	select PXA27x @@ -346,7 +338,6 @@ config MACH_MP900C  config ARCH_PXA_PALM  	bool "PXA based Palm PDAs" -	select HAVE_PWM  config MACH_PALM27X  	bool @@ -444,7 +435,6 @@ config MACH_TREO680  config MACH_RAUMFELD_RC  	bool "Raumfeld Controller"  	select CPU_PXA300 -	select HAVE_PWM  	select POWER_SUPPLY  	select PXA3xx @@ -608,21 +598,18 @@ config MACH_E800  config MACH_ZIPIT2  	bool "Zipit Z2 Handheld" -	select HAVE_PWM  	select PXA27x  endmenu  config PXA25x  	bool  	select CPU_XSCALE -	select CPU_FREQ_TABLE if CPU_FREQ  	help  	  Select code specific to PXA21x/25x/26x variants  config PXA27x  	bool  	select CPU_XSCALE -	select CPU_FREQ_TABLE if CPU_FREQ  	help  	  Select code specific to PXA27x variants @@ -635,7 +622,6 @@ config CPU_PXA26x  config PXA3xx  	bool  	select CPU_XSC3 -	select CPU_FREQ_TABLE if CPU_FREQ  	help  	  Select code specific to PXA3xx variants diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c index ffa6d811aad..12fb0f4ae35 100644 --- a/arch/arm/mach-pxa/am200epd.c +++ b/arch/arm/mach-pxa/am200epd.c @@ -293,8 +293,7 @@ static int am200_setup_irq(struct fb_info *info)  	int ret;  	ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am200_handle_irq, -				IRQF_DISABLED|IRQF_TRIGGER_FALLING, -				"AM200", info->par); +				IRQF_TRIGGER_FALLING, "AM200", info->par);  	if (ret)  		dev_err(&am200_device->dev, "request_irq failed: %d\n", ret); diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c index 3dfec1ec462..8b90c4f2d43 100644 --- a/arch/arm/mach-pxa/am300epd.c +++ b/arch/arm/mach-pxa/am300epd.c @@ -30,6 +30,7 @@  #include <mach/gumstix.h>  #include <mach/mfp-pxa25x.h> +#include <mach/irqs.h>  #include <linux/platform_data/video-pxafb.h>  #include "generic.h" @@ -241,8 +242,7 @@ static int am300_setup_irq(struct fb_info *info)  	struct broadsheetfb_par *par = info->par;  	ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am300_handle_irq, -				IRQF_DISABLED|IRQF_TRIGGER_RISING, -				"AM300", par); +				IRQF_TRIGGER_RISING, "AM300", par);  	if (ret)  		dev_err(&am300_device->dev, "request_irq failed: %d\n", ret); diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 2f71b3fbd31..43596e0ed05 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -331,7 +331,6 @@ static struct pxa2xx_udc_mach_info balloon3_udc_info __initdata = {  static void __init balloon3_udc_init(void)  {  	pxa_set_udc_info(&balloon3_udc_info); -	platform_device_register(&balloon3_gpio_vbus);  }  #else  static inline void balloon3_udc_init(void) {} diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index f9423493ed3..4d3588d26c2 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -310,6 +310,7 @@ static struct platform_pwm_backlight_data cm_x300_backlight_data = {  	.max_brightness	= 100,  	.dft_brightness	= 100,  	.pwm_period_ns	= 10000, +	.enable_gpio	= -1,  };  static struct platform_device cm_x300_backlight_device = { @@ -836,8 +837,7 @@ static void __init cm_x300_init(void)  	cm_x300_init_bl();  } -static void __init cm_x300_fixup(struct tag *tags, char **cmdline, -				 struct meminfo *mi) +static void __init cm_x300_fixup(struct tag *tags, char **cmdline)  {  	/* Make sure that mi->bank[0].start = PHYS_ADDR */  	for (; tags->hdr.size; tags = tag_next(tags)) diff --git a/arch/arm/mach-pxa/colibri-evalboard.c b/arch/arm/mach-pxa/colibri-evalboard.c index 8404b24240e..638b0bb8842 100644 --- a/arch/arm/mach-pxa/colibri-evalboard.c +++ b/arch/arm/mach-pxa/colibri-evalboard.c @@ -20,6 +20,7 @@  #include <asm/mach/arch.h>  #include <linux/i2c.h>  #include <linux/i2c/pxa-i2c.h> +#include <asm/io.h>  #include <mach/pxa27x.h>  #include <mach/colibri.h> diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c index 2d4a7b4d5d7..3aa264640c9 100644 --- a/arch/arm/mach-pxa/colibri-pxa270-income.c +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c @@ -189,6 +189,7 @@ static struct platform_pwm_backlight_data income_backlight_data = {  	.max_brightness	= 0x3ff,  	.dft_brightness	= 0x1ff,  	.pwm_period_ns	= 1000000, +	.enable_gpio	= -1,  };  static struct platform_device income_backlight = { diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index f162f1b77cd..91dd1c7cdbc 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -32,7 +32,9 @@  #include <linux/spi/pxa2xx_spi.h>  #include <linux/mtd/sharpsl.h>  #include <linux/input/matrix_keypad.h> +#include <linux/gpio_keys.h>  #include <linux/module.h> +#include <linux/memblock.h>  #include <video/w100fb.h>  #include <asm/setup.h> @@ -405,6 +407,44 @@ static struct platform_device corgikbd_device = {  	},  }; +static struct gpio_keys_button corgi_gpio_keys[] = { +	{ +		.type	= EV_SW, +		.code	= SW_LID, +		.gpio	= CORGI_GPIO_SWA, +		.desc	= "Lid close switch", +		.debounce_interval = 500, +	}, +	{ +		.type	= EV_SW, +		.code	= SW_TABLET_MODE, +		.gpio	= CORGI_GPIO_SWB, +		.desc	= "Tablet mode switch", +		.debounce_interval = 500, +	}, +	{ +		.type	= EV_SW, +		.code	= SW_HEADPHONE_INSERT, +		.gpio	= CORGI_GPIO_AK_INT, +		.desc	= "HeadPhone insert", +		.debounce_interval = 500, +	}, +}; + +static struct gpio_keys_platform_data corgi_gpio_keys_platform_data = { +	.buttons	= corgi_gpio_keys, +	.nbuttons	= ARRAY_SIZE(corgi_gpio_keys), +	.poll_interval	= 250, +}; + +static struct platform_device corgi_gpio_keys_device = { +	.name	= "gpio-keys-polled", +	.id	= -1, +	.dev	= { +		.platform_data	= &corgi_gpio_keys_platform_data, +	}, +}; +  /*   * Corgi LEDs   */ @@ -646,6 +686,7 @@ static struct platform_device sharpsl_rom_device = {  static struct platform_device *devices[] __initdata = {  	&corgiscoop_device,  	&corgifb_device, +	&corgi_gpio_keys_device,  	&corgikbd_device,  	&corgiled_device,  	&corgi_audio_device, @@ -713,16 +754,13 @@ static void __init corgi_init(void)  	platform_add_devices(devices, ARRAY_SIZE(devices));  } -static void __init fixup_corgi(struct tag *tags, char **cmdline, -			       struct meminfo *mi) +static void __init fixup_corgi(struct tag *tags, char **cmdline)  {  	sharpsl_save_param(); -	mi->nr_banks=1; -	mi->bank[0].start = 0xa0000000;  	if (machine_is_corgi()) -		mi->bank[0].size = (32*1024*1024); +		memblock_add(0xa0000000, SZ_32M);  	else -		mi->bank[0].size = (64*1024*1024); +		memblock_add(0xa0000000, SZ_64M);  }  #ifdef CONFIG_MACH_CORGI diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 8eb4e23c561..6915a9f6b3a 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -564,8 +564,7 @@ static int em_x270_mci_init(struct device *dev,  	}  	err = request_irq(gpio_to_irq(mmc_cd), em_x270_detect_int, -			      IRQF_DISABLED | IRQF_TRIGGER_RISING | -			      IRQF_TRIGGER_FALLING, +			      IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,  			      "MMC card detect", data);  	if (err) {  		dev_err(dev, "can't request MMC card detect IRQ: %d\n", err); diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index 8280ebcaab9..cfb864173ce 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c @@ -21,6 +21,7 @@  #include <linux/mtd/nand.h>  #include <linux/mtd/partitions.h>  #include <linux/usb/gpio_vbus.h> +#include <linux/memblock.h>  #include <video/w100fb.h> @@ -41,14 +42,12 @@  #include "clock.h"  /* Only e800 has 128MB RAM */ -void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) +void __init eseries_fixup(struct tag *tags, char **cmdline)  { -	mi->nr_banks=1; -	mi->bank[0].start = 0xa0000000;  	if (machine_is_e800()) -		mi->bank[0].size = (128*1024*1024); +		memblock_add(0xa0000000, SZ_128M);  	else -		mi->bank[0].size = (64*1024*1024); +		memblock_add(0xa0000000, SZ_64M);  }  struct gpio_vbus_mach_info e7xx_udc_info = { diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index fe2eb8394df..ab93441e596 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c @@ -54,6 +54,7 @@ static struct platform_pwm_backlight_data ezx_backlight_data = {  	.max_brightness	= 1023,  	.dft_brightness	= 1023,  	.pwm_period_ns	= 78770, +	.enable_gpio	= -1,  };  static struct platform_device ezx_backlight_device = { diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 133109ec733..c66ad4edc5e 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -561,6 +561,7 @@ static struct platform_pwm_backlight_data backlight_data = {  	.max_brightness = 200,  	.dft_brightness = 100,  	.pwm_period_ns  = 30923, +	.enable_gpio    = -1,  };  static struct platform_device backlight = { @@ -573,7 +574,8 @@ static struct platform_device backlight = {  };  static struct pwm_lookup hx4700_pwm_lookup[] = { -	PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL), +	PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL, +		   30923, PWM_POLARITY_NORMAL),  };  /* diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h index 954641e6c8b..1b0825911e6 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/include/mach/balloon3.h @@ -14,6 +14,8 @@  #ifndef ASM_ARCH_BALLOON3_H  #define ASM_ARCH_BALLOON3_H +#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +  enum balloon3_features {  	BALLOON3_FEATURE_OHCI,  	BALLOON3_FEATURE_MMC, diff --git a/arch/arm/mach-pxa/include/mach/corgi.h b/arch/arm/mach-pxa/include/mach/corgi.h index f3c3493b468..c030d955bbd 100644 --- a/arch/arm/mach-pxa/include/mach/corgi.h +++ b/arch/arm/mach-pxa/include/mach/corgi.h @@ -13,6 +13,7 @@  #ifndef __ASM_ARCH_CORGI_H  #define __ASM_ARCH_CORGI_H  1 +#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */  /*   * Corgi (Non Standard) GPIO Definitions diff --git a/arch/arm/mach-pxa/include/mach/csb726.h b/arch/arm/mach-pxa/include/mach/csb726.h index 2628e7b7211..00cfbbbf73f 100644 --- a/arch/arm/mach-pxa/include/mach/csb726.h +++ b/arch/arm/mach-pxa/include/mach/csb726.h @@ -11,6 +11,8 @@  #ifndef CSB726_H  #define CSB726_H +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  #define CSB726_GPIO_IRQ_LAN	52  #define CSB726_GPIO_IRQ_SM501	53  #define CSB726_GPIO_MMC_DETECT	100 diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h deleted file mode 100644 index 0248e433bc9..00000000000 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * arch/arm/mach-pxa/include/mach/gpio.h - * - * PXA GPIO wrappers for arch-neutral GPIO calls - * - * Written by Philipp Zabel <philipp.zabel@gmail.com> - * - * 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 - * - */ - -#ifndef __ASM_ARCH_PXA_GPIO_H -#define __ASM_ARCH_PXA_GPIO_H - -#include <asm-generic/gpio.h> - -#include <mach/irqs.h> -#include <mach/hardware.h> - -#endif diff --git a/arch/arm/mach-pxa/include/mach/gumstix.h b/arch/arm/mach-pxa/include/mach/gumstix.h index dba14b6503a..f7df27bbb42 100644 --- a/arch/arm/mach-pxa/include/mach/gumstix.h +++ b/arch/arm/mach-pxa/include/mach/gumstix.h @@ -6,6 +6,7 @@   * published by the Free Software Foundation.   */ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */  /* BTRESET - Reset line to Bluetooth module, active low signal. */  #define GPIO_GUMSTIX_BTRESET          7 diff --git a/arch/arm/mach-pxa/include/mach/hx4700.h b/arch/arm/mach-pxa/include/mach/hx4700.h index 8bc02913517..0e1bb46264f 100644 --- a/arch/arm/mach-pxa/include/mach/hx4700.h +++ b/arch/arm/mach-pxa/include/mach/hx4700.h @@ -14,6 +14,7 @@  #include <linux/gpio.h>  #include <linux/mfd/asic3.h> +#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */  #define HX4700_ASIC3_GPIO_BASE	PXA_NR_BUILTIN_GPIO  #define HX4700_EGPIO_BASE	(HX4700_ASIC3_GPIO_BASE + ASIC3_NUM_GPIOS) diff --git a/arch/arm/mach-pxa/include/mach/idp.h b/arch/arm/mach-pxa/include/mach/idp.h index 22a96f87232..7e63f468027 100644 --- a/arch/arm/mach-pxa/include/mach/idp.h +++ b/arch/arm/mach-pxa/include/mach/idp.h @@ -23,6 +23,7 @@   * IDP hardware.   */ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */  #define IDP_FLASH_PHYS		(PXA_CS0_PHYS)  #define IDP_ALT_FLASH_PHYS	(PXA_CS1_PHYS) diff --git a/arch/arm/mach-pxa/include/mach/lubbock.h b/arch/arm/mach-pxa/include/mach/lubbock.h index 2a086e8373e..958cd6af938 100644 --- a/arch/arm/mach-pxa/include/mach/lubbock.h +++ b/arch/arm/mach-pxa/include/mach/lubbock.h @@ -10,6 +10,8 @@   * published by the Free Software Foundation.   */ +#include <mach/irqs.h> +  #define LUBBOCK_ETH_PHYS	PXA_CS3_PHYS  #define LUBBOCK_FPGA_PHYS	PXA_CS2_PHYS diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/include/mach/palmld.h index 2c447133657..b184f296023 100644 --- a/arch/arm/mach-pxa/include/mach/palmld.h +++ b/arch/arm/mach-pxa/include/mach/palmld.h @@ -13,6 +13,8 @@  #ifndef _INCLUDE_PALMLD_H_  #define _INCLUDE_PALMLD_H_ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  /** HERE ARE GPIOs **/  /* GPIOs */ diff --git a/arch/arm/mach-pxa/include/mach/palmt5.h b/arch/arm/mach-pxa/include/mach/palmt5.h index 0bd4f036c72..e342c592140 100644 --- a/arch/arm/mach-pxa/include/mach/palmt5.h +++ b/arch/arm/mach-pxa/include/mach/palmt5.h @@ -15,6 +15,8 @@  #ifndef _INCLUDE_PALMT5_H_  #define _INCLUDE_PALMT5_H_ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  /** HERE ARE GPIOs **/  /* GPIOs */ diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/include/mach/palmtc.h index c383a21680b..81c727b3cfd 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/include/mach/palmtc.h @@ -16,6 +16,8 @@  #ifndef _INCLUDE_PALMTC_H_  #define _INCLUDE_PALMTC_H_ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  /** HERE ARE GPIOs **/  /* GPIOs */ diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h index f2e53038025..92bc1f05300 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/include/mach/palmtx.h @@ -16,6 +16,8 @@  #ifndef _INCLUDE_PALMTX_H_  #define _INCLUDE_PALMTX_H_ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  /** HERE ARE GPIOs **/  /* GPIOs */ diff --git a/arch/arm/mach-pxa/include/mach/pcm027.h b/arch/arm/mach-pxa/include/mach/pcm027.h index 6bf28de228b..86ebd7b6c96 100644 --- a/arch/arm/mach-pxa/include/mach/pcm027.h +++ b/arch/arm/mach-pxa/include/mach/pcm027.h @@ -23,6 +23,8 @@   * Definitions of CPU card resources only   */ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  /* phyCORE-PXA270 (PCM027) Interrupts */  #define PCM027_IRQ(x)          (IRQ_BOARD_START + (x))  #define PCM027_BTDET_IRQ       PCM027_IRQ(0) diff --git a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h index 0260aaa2fc1..7e544c14967 100644 --- a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h +++ b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h @@ -20,6 +20,7 @@   */  #include <mach/pcm027.h> +#include "irqs.h" /* PXA_GPIO_TO_IRQ */  /*   * definitions relevant only when the PCM-990 diff --git a/arch/arm/mach-pxa/include/mach/poodle.h b/arch/arm/mach-pxa/include/mach/poodle.h index f32ff75dcca..b56b19351a0 100644 --- a/arch/arm/mach-pxa/include/mach/poodle.h +++ b/arch/arm/mach-pxa/include/mach/poodle.h @@ -15,6 +15,8 @@  #ifndef __ASM_ARCH_POODLE_H  #define __ASM_ARCH_POODLE_H  1 +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  /*   * GPIOs   */ diff --git a/arch/arm/mach-pxa/include/mach/spitz.h b/arch/arm/mach-pxa/include/mach/spitz.h index 0bfe6507c95..25c9f62e46a 100644 --- a/arch/arm/mach-pxa/include/mach/spitz.h +++ b/arch/arm/mach-pxa/include/mach/spitz.h @@ -15,8 +15,8 @@  #define __ASM_ARCH_SPITZ_H  1  #endif +#include "irqs.h" /* PXA_NR_BUILTIN_GPIO, PXA_GPIO_TO_IRQ */  #include <linux/fb.h> -#include <linux/gpio.h>  /* Spitz/Akita GPIOs */ diff --git a/arch/arm/mach-pxa/include/mach/timex.h b/arch/arm/mach-pxa/include/mach/timex.h deleted file mode 100644 index af6760a50e1..00000000000 --- a/arch/arm/mach-pxa/include/mach/timex.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * arch/arm/mach-pxa/include/mach/timex.h - * - * Author:	Nicolas Pitre - * Created:	Jun 15, 2001 - * Copyright:	MontaVista Software Inc. - * - * 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. - */ - -/* Various drivers are still using the constant of CLOCK_TICK_RATE, for - * those drivers to at least work, the definition is provided here. - * - * NOTE: this is no longer accurate when multiple processors and boards - * are selected, newer drivers should not depend on this any more.  Use - * either the clocksource/clockevent or get this at run-time by calling - * get_clock_tick_rate() (as defined in generic.c). - */ - -#if defined(CONFIG_PXA25x) -/* PXA250/210 timer base */ -#define CLOCK_TICK_RATE 3686400 -#elif defined(CONFIG_PXA27x) -/* PXA27x timer base */ -#ifdef CONFIG_MACH_MAINSTONE -#define CLOCK_TICK_RATE 3249600 -#else -#define CLOCK_TICK_RATE 3250000 -#endif -#else -#define CLOCK_TICK_RATE 3250000 -#endif diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h index 2bb0e862598..0497d95cef2 100644 --- a/arch/arm/mach-pxa/include/mach/tosa.h +++ b/arch/arm/mach-pxa/include/mach/tosa.h @@ -13,6 +13,8 @@  #ifndef _ASM_ARCH_TOSA_H_  #define _ASM_ARCH_TOSA_H_ 1 +#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +  /*  TOSA Chip selects  */  #define TOSA_LCDC_PHYS		PXA_CS4_PHYS  /* Internel Scoop */ diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/include/mach/trizeps4.h index d2ca01053f6..ae3ca013afa 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/include/mach/trizeps4.h @@ -10,6 +10,8 @@  #ifndef _TRIPEPS4_H_  #define _TRIPEPS4_H_ +#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +  /* physical memory regions */  #define TRIZEPS4_FLASH_PHYS	(PXA_CS0_PHYS)  /* Flash region */  #define TRIZEPS4_DISK_PHYS	(PXA_CS1_PHYS)  /* Disk On Chip region */ diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index b6cc1816463..0eecd83c624 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -235,8 +235,6 @@ static const struct of_device_id intc_ids[] __initconst = {  void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int))  {  	struct device_node *node; -	const struct of_device_id *of_id; -	struct pxa_intc_conf *conf;  	struct resource res;  	int n, ret; @@ -245,8 +243,6 @@ void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int))  		pr_err("Failed to find interrupt controller in arch-pxa\n");  		return;  	} -	of_id = of_match_node(intc_ids, node); -	conf = of_id->data;  	ret = of_property_read_u32(node, "marvell,intc-nr-irqs",  				   &pxa_internal_irq_nr); diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 1255ee00f3d..9f6ec167902 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c @@ -269,6 +269,7 @@ static struct platform_pwm_backlight_data lpd270_backlight_data = {  	.max_brightness	= 1,  	.dft_brightness	= 1,  	.pwm_period_ns	= 78770, +	.enable_gpio	= -1,  };  static struct platform_device lpd270_backlight_device = { diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index f44532fc648..a9761c29302 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -378,6 +378,7 @@ static struct platform_pwm_backlight_data backlight_data = {  	.max_brightness = 272,  	.dft_brightness = 100,  	.pwm_period_ns  = 30923, +	.enable_gpio    = -1,  	.init           = magician_backlight_init,  	.notify         = magician_backlight_notify,  	.exit           = magician_backlight_exit, @@ -633,7 +634,7 @@ static struct platform_device bq24022 = {  static int magician_mci_init(struct device *dev,  				irq_handler_t detect_irq, void *data)  { -	return request_irq(IRQ_MAGICIAN_SD, detect_irq, IRQF_DISABLED, +	return request_irq(IRQ_MAGICIAN_SD, detect_irq, 0,  			   "mmc card detect", data);  } diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index dd70343c870..78b84c0dfc7 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c @@ -338,6 +338,7 @@ static struct platform_pwm_backlight_data mainstone_backlight_data = {  	.max_brightness	= 1023,  	.dft_brightness	= 1023,  	.pwm_period_ns	= 78770, +	.enable_gpio	= -1,  };  static struct platform_device mainstone_backlight_device = { @@ -400,7 +401,7 @@ static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_in  	 */  	MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; -	err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, IRQF_DISABLED, +	err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, 0,  			     "MMC card detect", data);  	if (err)  		printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index acc9d3cc076..29997bde277 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c @@ -38,6 +38,7 @@  #include <linux/mtd/physmap.h>  #include <linux/usb/gpio_vbus.h>  #include <linux/reboot.h> +#include <linux/regulator/fixed.h>  #include <linux/regulator/max1586.h>  #include <linux/slab.h>  #include <linux/i2c/pxa-i2c.h> @@ -186,6 +187,7 @@ static struct platform_pwm_backlight_data mioa701_backlight_data = {  	.max_brightness	= 100,  	.dft_brightness	= 50,  	.pwm_period_ns	= 4000 * 1024,	/* Fl = 250kHz */ +	.enable_gpio	= -1,  };  /* @@ -713,6 +715,10 @@ static struct gpio global_gpios[] = {  	{ GPIO56_MT9M111_nOE, GPIOF_OUT_INIT_LOW, "Camera nOE" },  }; +static struct regulator_consumer_supply fixed_5v0_consumers[] = { +	REGULATOR_SUPPLY("power", "pwm-backlight"), +}; +  static void __init mioa701_machine_init(void)  {  	int rc; @@ -752,6 +758,10 @@ static void __init mioa701_machine_init(void)  	pxa_set_i2c_info(&i2c_pdata);  	pxa27x_set_i2c_power_info(NULL);  	pxa_set_camera_info(&mioa701_pxacamera_platform_data); + +	regulator_register_always_on(0, "fixed-5.0V", fixed_5v0_consumers, +				     ARRAY_SIZE(fixed_5v0_consumers), +				     5000000);  }  static void mioa701_machine_exit(void) diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c index 17d4c53017c..e54a296fb81 100644 --- a/arch/arm/mach-pxa/palm27x.c +++ b/arch/arm/mach-pxa/palm27x.c @@ -322,6 +322,7 @@ static struct platform_pwm_backlight_data palm27x_backlight_data = {  	.max_brightness	= 0xfe,  	.dft_brightness	= 0x7e,  	.pwm_period_ns	= 3500 * 1024, +	.enable_gpio	= -1,  	.init		= palm27x_backlight_init,  	.notify		= palm27x_backlight_notify,  	.exit		= palm27x_backlight_exit, diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index 100b176f7e8..7691c974ca4 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -166,45 +166,12 @@ static inline void palmtc_keys_init(void) {}   * Backlight   ******************************************************************************/  #if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE) -static int palmtc_backlight_init(struct device *dev) -{ -	int ret; - -	ret = gpio_request(GPIO_NR_PALMTC_BL_POWER, "BL POWER"); -	if (ret) -		goto err; -	ret = gpio_direction_output(GPIO_NR_PALMTC_BL_POWER, 1); -	if (ret) -		goto err2; - -	return 0; - -err2: -	gpio_free(GPIO_NR_PALMTC_BL_POWER); -err: -	return ret; -} - -static int palmtc_backlight_notify(struct device *dev, int brightness) -{ -	/* backlight is on when GPIO16 AF0 is high */ -	gpio_set_value(GPIO_NR_PALMTC_BL_POWER, brightness); -	return brightness; -} - -static void palmtc_backlight_exit(struct device *dev) -{ -	gpio_free(GPIO_NR_PALMTC_BL_POWER); -} -  static struct platform_pwm_backlight_data palmtc_backlight_data = {  	.pwm_id		= 1,  	.max_brightness	= PALMTC_MAX_INTENSITY,  	.dft_brightness	= PALMTC_MAX_INTENSITY,  	.pwm_period_ns	= PALMTC_PERIOD_NS, -	.init		= palmtc_backlight_init, -	.notify		= palmtc_backlight_notify, -	.exit		= palmtc_backlight_exit, +	.enable_gpio	= GPIO_NR_PALMTC_BL_POWER,  };  static struct platform_device palmtc_backlight = { diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index 0742721ced2..956fd24ee6f 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c @@ -165,6 +165,7 @@ static struct platform_pwm_backlight_data palmte2_backlight_data = {  	.max_brightness	= PALMTE2_MAX_INTENSITY,  	.dft_brightness	= PALMTE2_MAX_INTENSITY,  	.pwm_period_ns	= PALMTE2_PERIOD_NS, +	.enable_gpio	= -1,  	.init		= palmte2_backlight_init,  	.notify		= palmte2_backlight_notify,  	.exit		= palmte2_backlight_exit, diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 3133ba82c50..2897da2a5df 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c @@ -153,6 +153,7 @@ static struct platform_pwm_backlight_data pcm990_backlight_data = {  	.max_brightness	= 1023,  	.dft_brightness	= 1023,  	.pwm_period_ns	= 78770, +	.enable_gpio	= -1,  };  static struct platform_device pcm990_backlight_device = { @@ -326,7 +327,7 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int,  {  	int err; -	err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED, +	err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, 0,  			     "MMC card detect", data);  	if (err)  		printk(KERN_ERR "pcm990_mci_init: MMC/SD: can't request MMC " diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index aedf053a1de..13199162911 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -29,6 +29,7 @@  #include <linux/spi/ads7846.h>  #include <linux/spi/pxa2xx_spi.h>  #include <linux/mtd/sharpsl.h> +#include <linux/memblock.h>  #include <mach/hardware.h>  #include <asm/mach-types.h> @@ -456,13 +457,10 @@ static void __init poodle_init(void)  	poodle_init_spi();  } -static void __init fixup_poodle(struct tag *tags, char **cmdline, -				struct meminfo *mi) +static void __init fixup_poodle(struct tag *tags, char **cmdline)  {  	sharpsl_save_param(); -	mi->nr_banks=1; -	mi->bank[0].start = 0xa0000000; -	mi->bank[0].size = (32*1024*1024); +	memblock_add(0xa0000000, SZ_32M);  }  MACHINE_START(POODLE, "SHARP Poodle") diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 969b0ba7fa7..8386dc30b3e 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -539,6 +539,7 @@ static struct platform_pwm_backlight_data raumfeld_pwm_backlight_data = {  	.dft_brightness	= 100,  	/* 10000 ns = 10 ms ^= 100 kHz */  	.pwm_period_ns	= 10000, +	.enable_gpio	= -1,  };  static struct platform_device raumfeld_pwm_backlight_device = { diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index 0d5dd646f61..263b15249b5 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c @@ -13,6 +13,7 @@  #include <mach/regs-ost.h>  #include <mach/reset.h> +#include <mach/smemc.h>  unsigned int reset_status;  EXPORT_SYMBOL(reset_status); @@ -81,6 +82,12 @@ static void do_hw_reset(void)  	writel_relaxed(OSSR_M3, OSSR);  	/* ... in 100 ms */  	writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); +	/* +	 * SDRAM hangs on watchdog reset on Marvell PXA270 (erratum 71) +	 * we put SDRAM into self-refresh to prevent that +	 */ +	while (1) +		writel_relaxed(MDREFR_SLFRSH, MDREFR);  }  void pxa_restart(enum reboot_mode mode, const char *cmd) @@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd)  		break;  	}  } - diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 0a36d3585f2..051a6555cbf 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -860,18 +860,18 @@ static int sharpsl_pm_probe(struct platform_device *pdev)  	/* Register interrupt handlers */  	irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_acin); -	if (request_irq(irq, sharpsl_ac_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "AC Input Detect", sharpsl_ac_isr)) { +	if (request_irq(irq, sharpsl_ac_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "AC Input Detect", sharpsl_ac_isr)) {  		dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);  	}  	irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock); -	if (request_irq(irq, sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Battery Cover", sharpsl_fatal_isr)) { +	if (request_irq(irq, sharpsl_fatal_isr, IRQF_TRIGGER_FALLING, "Battery Cover", sharpsl_fatal_isr)) {  		dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);  	}  	if (sharpsl_pm.machinfo->gpio_fatal) {  		irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal); -		if (request_irq(irq, sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Fatal Battery", sharpsl_fatal_isr)) { +		if (request_irq(irq, sharpsl_fatal_isr, IRQF_TRIGGER_FALLING, "Fatal Battery", sharpsl_fatal_isr)) {  			dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);  		}  	} @@ -879,7 +879,7 @@ static int sharpsl_pm_probe(struct platform_device *pdev)  	if (sharpsl_pm.machinfo->batfull_irq) {  		/* Register interrupt handler. */  		irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull); -		if (request_irq(irq, sharpsl_chrg_full_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) { +		if (request_irq(irq, sharpsl_chrg_full_isr, IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) {  			dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);  		}  	} diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 0b11c1af51c..840c3a48e72 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -32,6 +32,7 @@  #include <linux/io.h>  #include <linux/module.h>  #include <linux/reboot.h> +#include <linux/memblock.h>  #include <asm/setup.h>  #include <asm/mach-types.h> @@ -971,13 +972,10 @@ static void __init spitz_init(void)  	spitz_i2c_init();  } -static void __init spitz_fixup(struct tag *tags, char **cmdline, -			       struct meminfo *mi) +static void __init spitz_fixup(struct tag *tags, char **cmdline)  {  	sharpsl_save_param(); -	mi->nr_banks = 1; -	mi->bank[0].start = 0xa0000000; -	mi->bank[0].size = (64*1024*1024); +	memblock_add(0xa0000000, SZ_64M);  }  #ifdef CONFIG_MACH_SPITZ diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index 62aea3e835f..01de542432a 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c @@ -27,7 +27,7 @@  #include <linux/i2c/pxa-i2c.h>  #include <linux/i2c/pcf857x.h> -#include <linux/i2c/at24.h> +#include <linux/platform_data/at24.h>  #include <linux/smc91x.h>  #include <linux/gpio.h>  #include <linux/leds.h> diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c index 4680efe5534..a71da84e784 100644 --- a/arch/arm/mach-pxa/tavorevb.c +++ b/arch/arm/mach-pxa/tavorevb.c @@ -175,6 +175,7 @@ static struct platform_pwm_backlight_data tavorevb_backlight_data[] = {  		.max_brightness	= 100,  		.dft_brightness	= 100,  		.pwm_period_ns	= 100000, +		.enable_gpio	= -1,  	},  	[1] = {  		/* secondary backlight */ @@ -182,6 +183,7 @@ static struct platform_pwm_backlight_data tavorevb_backlight_data[] = {  		.max_brightness	= 100,  		.dft_brightness	= 100,  		.pwm_period_ns	= 100000, +		.enable_gpio	= -1,  	},  }; diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 9aa852a8fab..fca174e3865 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c @@ -33,7 +33,7 @@   * calls to sched_clock() which should always be the case in practice.   */ -static u32 notrace pxa_read_sched_clock(void) +static u64 notrace pxa_read_sched_clock(void)  {  	return readl_relaxed(OSCR);  } @@ -137,7 +137,7 @@ static struct clock_event_device ckevt_pxa_osmr0 = {  static struct irqaction pxa_ost0_irq = {  	.name		= "ost0", -	.flags		= IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, +	.flags		= IRQF_TIMER | IRQF_IRQPOLL,  	.handler	= pxa_ost0_interrupt,  	.dev_id		= &ckevt_pxa_osmr0,  }; @@ -149,7 +149,7 @@ void __init pxa_timer_init(void)  	writel_relaxed(0, OIER);  	writel_relaxed(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR); -	setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate); +	sched_clock_register(pxa_read_sched_clock, 32, clock_tick_rate);  	ckevt_pxa_osmr0.cpumask = cpumask_of(0); diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 0206b915a6f..c158a6e3e0a 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -37,6 +37,7 @@  #include <linux/i2c/pxa-i2c.h>  #include <linux/usb/gpio_vbus.h>  #include <linux/reboot.h> +#include <linux/memblock.h>  #include <asm/setup.h>  #include <asm/mach-types.h> @@ -425,57 +426,57 @@ static struct platform_device tosa_power_device = {   * Tosa Keyboard   */  static const uint32_t tosakbd_keymap[] = { -	KEY(0, 2, KEY_W), -	KEY(0, 6, KEY_K), -	KEY(0, 7, KEY_BACKSPACE), -	KEY(0, 8, KEY_P), -	KEY(1, 1, KEY_Q), -	KEY(1, 2, KEY_E), -	KEY(1, 3, KEY_T), -	KEY(1, 4, KEY_Y), -	KEY(1, 6, KEY_O), -	KEY(1, 7, KEY_I), -	KEY(1, 8, KEY_COMMA), -	KEY(2, 1, KEY_A), -	KEY(2, 2, KEY_D), -	KEY(2, 3, KEY_G), -	KEY(2, 4, KEY_U), -	KEY(2, 6, KEY_L), -	KEY(2, 7, KEY_ENTER), -	KEY(2, 8, KEY_DOT), -	KEY(3, 1, KEY_Z), -	KEY(3, 2, KEY_C), -	KEY(3, 3, KEY_V), -	KEY(3, 4, KEY_J), -	KEY(3, 5, TOSA_KEY_ADDRESSBOOK), -	KEY(3, 6, TOSA_KEY_CANCEL), -	KEY(3, 7, TOSA_KEY_CENTER), -	KEY(3, 8, TOSA_KEY_OK), -	KEY(3, 9, KEY_LEFTSHIFT), -	KEY(4, 1, KEY_S), -	KEY(4, 2, KEY_R), -	KEY(4, 3, KEY_B), -	KEY(4, 4, KEY_N), -	KEY(4, 5, TOSA_KEY_CALENDAR), -	KEY(4, 6, TOSA_KEY_HOMEPAGE), -	KEY(4, 7, KEY_LEFTCTRL), -	KEY(4, 8, TOSA_KEY_LIGHT), -	KEY(4, 10, KEY_RIGHTSHIFT), -	KEY(5, 1, KEY_TAB), -	KEY(5, 2, KEY_SLASH), -	KEY(5, 3, KEY_H), -	KEY(5, 4, KEY_M), -	KEY(5, 5, TOSA_KEY_MENU), -	KEY(5, 7, KEY_UP), -	KEY(5, 11, TOSA_KEY_FN), -	KEY(6, 1, KEY_X), -	KEY(6, 2, KEY_F), -	KEY(6, 3, KEY_SPACE), -	KEY(6, 4, KEY_APOSTROPHE), -	KEY(6, 5, TOSA_KEY_MAIL), -	KEY(6, 6, KEY_LEFT), -	KEY(6, 7, KEY_DOWN), -	KEY(6, 8, KEY_RIGHT), +	KEY(0, 1, KEY_W), +	KEY(0, 5, KEY_K), +	KEY(0, 6, KEY_BACKSPACE), +	KEY(0, 7, KEY_P), +	KEY(1, 0, KEY_Q), +	KEY(1, 1, KEY_E), +	KEY(1, 2, KEY_T), +	KEY(1, 3, KEY_Y), +	KEY(1, 5, KEY_O), +	KEY(1, 6, KEY_I), +	KEY(1, 7, KEY_COMMA), +	KEY(2, 0, KEY_A), +	KEY(2, 1, KEY_D), +	KEY(2, 2, KEY_G), +	KEY(2, 3, KEY_U), +	KEY(2, 5, KEY_L), +	KEY(2, 6, KEY_ENTER), +	KEY(2, 7, KEY_DOT), +	KEY(3, 0, KEY_Z), +	KEY(3, 1, KEY_C), +	KEY(3, 2, KEY_V), +	KEY(3, 3, KEY_J), +	KEY(3, 4, TOSA_KEY_ADDRESSBOOK), +	KEY(3, 5, TOSA_KEY_CANCEL), +	KEY(3, 6, TOSA_KEY_CENTER), +	KEY(3, 7, TOSA_KEY_OK), +	KEY(3, 8, KEY_LEFTSHIFT), +	KEY(4, 0, KEY_S), +	KEY(4, 1, KEY_R), +	KEY(4, 2, KEY_B), +	KEY(4, 3, KEY_N), +	KEY(4, 4, TOSA_KEY_CALENDAR), +	KEY(4, 5, TOSA_KEY_HOMEPAGE), +	KEY(4, 6, KEY_LEFTCTRL), +	KEY(4, 7, TOSA_KEY_LIGHT), +	KEY(4, 9, KEY_RIGHTSHIFT), +	KEY(5, 0, KEY_TAB), +	KEY(5, 1, KEY_SLASH), +	KEY(5, 2, KEY_H), +	KEY(5, 3, KEY_M), +	KEY(5, 4, TOSA_KEY_MENU), +	KEY(5, 6, KEY_UP), +	KEY(5, 10, TOSA_KEY_FN), +	KEY(6, 0, KEY_X), +	KEY(6, 1, KEY_F), +	KEY(6, 2, KEY_SPACE), +	KEY(6, 3, KEY_APOSTROPHE), +	KEY(6, 4, TOSA_KEY_MAIL), +	KEY(6, 5, KEY_LEFT), +	KEY(6, 6, KEY_DOWN), +	KEY(6, 7, KEY_RIGHT),  };  static struct matrix_keymap_data tosakbd_keymap_data = { @@ -960,13 +961,10 @@ static void __init tosa_init(void)  	platform_add_devices(devices, ARRAY_SIZE(devices));  } -static void __init fixup_tosa(struct tag *tags, char **cmdline, -			      struct meminfo *mi) +static void __init fixup_tosa(struct tag *tags, char **cmdline)  {  	sharpsl_save_param(); -	mi->nr_banks=1; -	mi->bank[0].start = 0xa0000000; -	mi->bank[0].size = (64*1024*1024); +	memblock_add(0xa0000000, SZ_64M);  }  MACHINE_START(TOSA, "SHARP Tosa") diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index c58043462ac..872dcb20e75 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -332,8 +332,7 @@ static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int,  	int err;  	err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int, -			  IRQF_DISABLED | IRQF_TRIGGER_RISING, -			  "MMC card detect", data); +			  IRQF_TRIGGER_RISING, "MMC card detect", data);  	if (err) {  		printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request"  						"MMC card detect IRQ\n"); diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 9c363c081d3..41f27f667ca 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -401,6 +401,7 @@ static struct platform_pwm_backlight_data viper_backlight_data = {  	.max_brightness	= 100,  	.dft_brightness	= 100,  	.pwm_period_ns	= 1000000, +	.enable_gpio	= -1,  	.init		= viper_backlight_init,  	.notify		= viper_backlight_notify,  	.exit		= viper_backlight_exit, @@ -884,9 +885,6 @@ static int viper_cpufreq_notifier(struct notifier_block *nb,  			viper_set_core_cpu_voltage(freq->new, 0);  		}  		break; -	case CPUFREQ_RESUMECHANGE: -		viper_set_core_cpu_voltage(freq->new, 0); -		break;  	default:  		/* ignore */  		break; diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 2513d8f4931..e1a121b36cf 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c @@ -206,6 +206,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = {  		.max_brightness	= 1023,  		.dft_brightness	= 0,  		.pwm_period_ns	= 1260320, +		.enable_gpio	= -1,  	},  	[1] = {  		/* LCD Backlight */ @@ -213,6 +214,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = {  		.max_brightness	= 1023,  		.dft_brightness	= 512,  		.pwm_period_ns	= 1260320, +		.enable_gpio	= -1,  	},  }; diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index b19d1c361ca..205f9bf3821 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -413,7 +413,7 @@ static struct fixed_voltage_config can_regulator_pdata = {  static struct platform_device can_regulator_device = {  	.name	= "reg-fixed-volage", -	.id	= -1, +	.id	= 0,  	.dev	= {  		.platform_data	= &can_regulator_pdata,  	}, @@ -510,18 +510,6 @@ struct platform_device zeus_max6369_device = {  	.num_resources	= 1,  }; -static struct platform_device *zeus_devices[] __initdata = { -	&zeus_serial_device, -	&zeus_mtd_devices[0], -	&zeus_dm9k0_device, -	&zeus_dm9k1_device, -	&zeus_sram_device, -	&zeus_leds_device, -	&zeus_pcmcia_device, -	&zeus_max6369_device, -	&can_regulator_device, -}; -  /* AC'97 */  static pxa2xx_audio_ops_t zeus_ac97_info = {  	.reset_gpio = 95, @@ -532,44 +520,50 @@ static pxa2xx_audio_ops_t zeus_ac97_info = {   * USB host   */ -static int zeus_ohci_init(struct device *dev) -{ -	int err; - -	/* Switch on port 2. */ -	if ((err = gpio_request(ZEUS_USB2_PWREN_GPIO, "USB2_PWREN"))) { -		dev_err(dev, "Can't request USB2_PWREN\n"); -		return err; -	} - -	if ((err = gpio_direction_output(ZEUS_USB2_PWREN_GPIO, 1))) { -		gpio_free(ZEUS_USB2_PWREN_GPIO); -		dev_err(dev, "Can't enable USB2_PWREN\n"); -		return err; -	} +static struct regulator_consumer_supply zeus_ohci_regulator_supplies[] = { +	REGULATOR_SUPPLY("vbus2", "pxa27x-ohci"), +}; -	/* Port 2 is shared between host and client interface. */ -	UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE; +static struct regulator_init_data zeus_ohci_regulator_data = { +	.constraints = { +		.valid_ops_mask		= REGULATOR_CHANGE_STATUS, +	}, +	.num_consumer_supplies	= ARRAY_SIZE(zeus_ohci_regulator_supplies), +	.consumer_supplies	= zeus_ohci_regulator_supplies, +}; -	return 0; -} +static struct fixed_voltage_config zeus_ohci_regulator_config = { +	.supply_name		= "vbus2", +	.microvolts		= 5000000, /* 5.0V */ +	.gpio			= ZEUS_USB2_PWREN_GPIO, +	.enable_high		= 1, +	.startup_delay		= 0, +	.init_data		= &zeus_ohci_regulator_data, +}; -static void zeus_ohci_exit(struct device *dev) -{ -	/* Power-off port 2 */ -	gpio_direction_output(ZEUS_USB2_PWREN_GPIO, 0); -	gpio_free(ZEUS_USB2_PWREN_GPIO); -} +static struct platform_device zeus_ohci_regulator_device = { +	.name		= "reg-fixed-voltage", +	.id		= 1, +	.dev = { +		.platform_data = &zeus_ohci_regulator_config, +	}, +};  static struct pxaohci_platform_data zeus_ohci_platform_data = {  	.port_mode	= PMM_NPS_MODE,  	/* Clear Power Control Polarity Low and set Power Sense  	 * Polarity Low. Supply power to USB ports. */  	.flags		= ENABLE_PORT_ALL | POWER_SENSE_LOW, -	.init		= zeus_ohci_init, -	.exit		= zeus_ohci_exit,  }; +static void zeus_register_ohci(void) +{ +	/* Port 2 is shared between host and client interface. */ +	UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE; + +	pxa_set_ohci_info(&zeus_ohci_platform_data); +} +  /*   * Flat Panel   */ @@ -677,6 +671,19 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = {  	.udc_command = zeus_udc_command,  }; +static struct platform_device *zeus_devices[] __initdata = { +	&zeus_serial_device, +	&zeus_mtd_devices[0], +	&zeus_dm9k0_device, +	&zeus_dm9k1_device, +	&zeus_sram_device, +	&zeus_leds_device, +	&zeus_pcmcia_device, +	&zeus_max6369_device, +	&can_regulator_device, +	&zeus_ohci_regulator_device, +}; +  #ifdef CONFIG_PM  static void zeus_power_off(void)  { @@ -847,7 +854,7 @@ static void __init zeus_init(void)  	platform_add_devices(zeus_devices, ARRAY_SIZE(zeus_devices)); -	pxa_set_ohci_info(&zeus_ohci_platform_data); +	zeus_register_ohci();  	if (zeus_setup_fb_gpios())  		pr_err("Failed to setup fb gpios\n"); diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 36cf7cf95ec..77daea478e8 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c @@ -125,6 +125,7 @@ static struct platform_pwm_backlight_data zylonite_backlight_data = {  	.max_brightness	= 100,  	.dft_brightness	= 100,  	.pwm_period_ns	= 10000, +	.enable_gpio	= -1,  };  static struct platform_device zylonite_backlight_device = {  | 
