aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:54:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:54:55 -0500
commitb24174b0cbbe383c5bb6097aeb24480b8fd2d338 (patch)
tree2df02e72b7166dadb19b766435dbe7568d97e946 /arch/arm/mach-pxa
parent7ed214ac2095f561a94335ca672b6c42a1ea40ff (diff)
parentbe8fd292f9b1ed787a04cb4437f7faef16c4afef (diff)
Merge tag 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull non-critical ARM SoC bug fixes from Arnd Bergmann: "Bug fixes that did not make it into v3.8, mostly because they were not considered important enough, and in some cases because bugs only show up in combination with other patches destined for 3.9. This includes a few larger patches for GPIO on the Marvell PXA platform and a lot of Samsung specific bug fixes, as well as a series from Arnd to fix older build warnings." * tag 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits) ARM: SPEAr13xx: Enable CONFIG_ARCH_HAS_CPUFREQ ARM: imx: MACH_MX31ADS_WM1133_EV1 needs REGULATOR_WM8350 scripts/sortextable: silence script output ARM: s3c: i2c: add platform_device forward declaration ARM: mvebu: allow selecting mvebu without Armada XP ARM: pick Versatile by default for !MMU ARM: integrator: fix build with INTEGRATOR_AP off ARM: integrator/versatile: fix NOMMU warnings ARM: sa1100: don't warn about mach/ide.h ARM: shmobile: fix defconfig warning on CONFIG_USB ARM: w90x900: fix legacy assembly syntax ARM: samsung: fix assembly syntax for new gas ARM: disable virt_to_bus/virt_to_bus almost everywhere ARM: dts: Correct pin configuration of SD 4 for exynos4x12-pinctrl ARM: SAMSUNG: Silence empty switch warning in fimc-core.h ARM: SAMSUNG: Silence empty switch warning in sdhci.h ARM: msm: proc_comm_boot_wait should not be __init arm: vt8500: Update MAINTAINERS entry for arch-vt8500 ARM: integrator: ensure ap_syscon_base is initialised when !CONFIG_MMU ARM: S5PV210: Fix early uart output in fifo mode ...
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtreo.h5
-rw-r--r--arch/arm/mach-pxa/include/mach/smemc.h1
-rw-r--r--arch/arm/mach-pxa/palmtreo.c70
-rw-r--r--arch/arm/mach-pxa/smemc.c15
-rw-r--r--arch/arm/mach-pxa/spitz.c4
5 files changed, 80 insertions, 15 deletions
diff --git a/arch/arm/mach-pxa/include/mach/palmtreo.h b/arch/arm/mach-pxa/include/mach/palmtreo.h
index 2d3f14e3be29..714b6574393e 100644
--- a/arch/arm/mach-pxa/include/mach/palmtreo.h
+++ b/arch/arm/mach-pxa/include/mach/palmtreo.h
@@ -38,13 +38,14 @@
38#define GPIO_NR_TREO_LCD_POWER 25 38#define GPIO_NR_TREO_LCD_POWER 25
39 39
40/* Treo680 specific GPIOs */ 40/* Treo680 specific GPIOs */
41#ifdef CONFIG_MACH_TREO680
42#define GPIO_NR_TREO680_SD_READONLY 33 41#define GPIO_NR_TREO680_SD_READONLY 33
43#define GPIO_NR_TREO680_SD_POWER 42 42#define GPIO_NR_TREO680_SD_POWER 42
44#define GPIO_NR_TREO680_VIBRATE_EN 44 43#define GPIO_NR_TREO680_VIBRATE_EN 44
45#define GPIO_NR_TREO680_KEYB_BL 24 44#define GPIO_NR_TREO680_KEYB_BL 24
46#define GPIO_NR_TREO680_BT_EN 43 45#define GPIO_NR_TREO680_BT_EN 43
47#endif /* CONFIG_MACH_TREO680 */ 46#define GPIO_NR_TREO680_LCD_POWER 77
47#define GPIO_NR_TREO680_LCD_EN 86
48#define GPIO_NR_TREO680_LCD_EN_N 25
48 49
49/* Centro685 specific GPIOs */ 50/* Centro685 specific GPIOs */
50#define GPIO_NR_CENTRO_SD_POWER 21 51#define GPIO_NR_CENTRO_SD_POWER 21
diff --git a/arch/arm/mach-pxa/include/mach/smemc.h b/arch/arm/mach-pxa/include/mach/smemc.h
index b7de471b273a..b802f285fe00 100644
--- a/arch/arm/mach-pxa/include/mach/smemc.h
+++ b/arch/arm/mach-pxa/include/mach/smemc.h
@@ -37,6 +37,7 @@
37#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */ 37#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */
38#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */ 38#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */
39#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */ 39#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */
40#define CSMSADRCFG (SMEMC_VIRT + 0xA0) /* Chip Select Configuration Register */
40 41
41/* 42/*
42 * More handy macros for PCMCIA 43 * More handy macros for PCMCIA
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index 3f3c48f2f7ce..577512845a6c 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -98,9 +98,6 @@ static unsigned long treo_pin_config[] __initdata = {
98 GPIO96_KP_MKOUT_6, 98 GPIO96_KP_MKOUT_6,
99 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */ 99 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */
100 100
101 /* LCD */
102 GPIOxx_LCD_TFT_16BPP,
103
104 /* Quick Capture Interface */ 101 /* Quick Capture Interface */
105 GPIO84_CIF_FV, 102 GPIO84_CIF_FV,
106 GPIO85_CIF_LV, 103 GPIO85_CIF_LV,
@@ -140,6 +137,12 @@ static unsigned long treo680_pin_config[] __initdata = {
140 /* MATRIX KEYPAD - different wake up source */ 137 /* MATRIX KEYPAD - different wake up source */
141 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 138 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
142 GPIO99_KP_MKIN_5, 139 GPIO99_KP_MKIN_5,
140
141 /* LCD... L_BIAS alt fn not configured on Treo680; is GPIO instead */
142 GPIOxx_LCD_16BPP,
143 GPIO74_LCD_FCLK,
144 GPIO75_LCD_LCLK,
145 GPIO76_LCD_PCLK,
143}; 146};
144#endif /* CONFIG_MACH_TREO680 */ 147#endif /* CONFIG_MACH_TREO680 */
145 148
@@ -155,6 +158,9 @@ static unsigned long centro685_pin_config[] __initdata = {
155 /* MATRIX KEYPAD - different wake up source */ 158 /* MATRIX KEYPAD - different wake up source */
156 GPIO100_KP_MKIN_0, 159 GPIO100_KP_MKIN_0,
157 GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, 160 GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
161
162 /* LCD */
163 GPIOxx_LCD_TFT_16BPP,
158}; 164};
159#endif /* CONFIG_MACH_CENTRO */ 165#endif /* CONFIG_MACH_CENTRO */
160 166
@@ -328,7 +334,6 @@ static inline void palmtreo_uhc_init(void) {}
328/****************************************************************************** 334/******************************************************************************
329 * Vibra and LEDs 335 * Vibra and LEDs
330 ******************************************************************************/ 336 ******************************************************************************/
331#ifdef CONFIG_MACH_TREO680
332static struct gpio_led treo680_gpio_leds[] = { 337static struct gpio_led treo680_gpio_leds[] = {
333 { 338 {
334 .name = "treo680:vibra:vibra", 339 .name = "treo680:vibra:vibra",
@@ -379,21 +384,17 @@ static struct gpio_led_platform_data centro_gpio_led_info = {
379static struct platform_device palmtreo_leds = { 384static struct platform_device palmtreo_leds = {
380 .name = "leds-gpio", 385 .name = "leds-gpio",
381 .id = -1, 386 .id = -1,
382 .dev = {
383 .platform_data = &treo680_gpio_led_info,
384 }
385}; 387};
386 388
387static void __init palmtreo_leds_init(void) 389static void __init palmtreo_leds_init(void)
388{ 390{
389 if (machine_is_centro()) 391 if (machine_is_centro())
390 palmtreo_leds.dev.platform_data = &centro_gpio_led_info; 392 palmtreo_leds.dev.platform_data = &centro_gpio_led_info;
393 else if (machine_is_treo680())
394 palmtreo_leds.dev.platform_data = &treo680_gpio_led_info;
391 395
392 platform_device_register(&palmtreo_leds); 396 platform_device_register(&palmtreo_leds);
393} 397}
394#else
395static inline void palmtreo_leds_init(void) {}
396#endif
397 398
398/****************************************************************************** 399/******************************************************************************
399 * Machine init 400 * Machine init
@@ -424,10 +425,59 @@ static void __init palmphone_common_init(void)
424} 425}
425 426
426#ifdef CONFIG_MACH_TREO680 427#ifdef CONFIG_MACH_TREO680
428void __init treo680_gpio_init(void)
429{
430 unsigned int gpio;
431
432 /* drive all three lcd gpios high initially */
433 const unsigned long lcd_flags = GPIOF_INIT_HIGH | GPIOF_DIR_OUT;
434
435 /*
436 * LCD GPIO initialization...
437 */
438
439 /*
440 * This is likely the power to the lcd. Toggling it low/high appears to
441 * turn the lcd off/on. Can be toggled after lcd is initialized without
442 * any apparent adverse effects to the lcd operation. Note that this
443 * gpio line is used by the lcd controller as the L_BIAS signal, but
444 * treo680 configures it as gpio.
445 */
446 gpio = GPIO_NR_TREO680_LCD_POWER;
447 if (gpio_request_one(gpio, lcd_flags, "LCD power") < 0)
448 goto fail;
449
450 /*
451 * These two are called "enables", for lack of a better understanding.
452 * If either of these are toggled after the lcd is initialized, the
453 * image becomes degraded. N.B. The IPL shipped with the treo
454 * configures GPIO_NR_TREO680_LCD_EN_N as output and drives it high. If
455 * the IPL is ever reprogrammed, this initialization may be need to be
456 * revisited.
457 */
458 gpio = GPIO_NR_TREO680_LCD_EN;
459 if (gpio_request_one(gpio, lcd_flags, "LCD enable") < 0)
460 goto fail;
461 gpio = GPIO_NR_TREO680_LCD_EN_N;
462 if (gpio_request_one(gpio, lcd_flags, "LCD enable_n") < 0)
463 goto fail;
464
465 /* driving this low turns LCD on */
466 gpio_set_value(GPIO_NR_TREO680_LCD_EN_N, 0);
467
468 return;
469 fail:
470 pr_err("gpio %d initialization failed\n", gpio);
471 gpio_free(GPIO_NR_TREO680_LCD_POWER);
472 gpio_free(GPIO_NR_TREO680_LCD_EN);
473 gpio_free(GPIO_NR_TREO680_LCD_EN_N);
474}
475
427static void __init treo680_init(void) 476static void __init treo680_init(void)
428{ 477{
429 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); 478 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
430 palmphone_common_init(); 479 palmphone_common_init();
480 treo680_gpio_init();
431 palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, 481 palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
432 GPIO_NR_TREO680_SD_POWER, 0); 482 GPIO_NR_TREO680_SD_POWER, 0);
433} 483}
diff --git a/arch/arm/mach-pxa/smemc.c b/arch/arm/mach-pxa/smemc.c
index 79923058d10f..f38aa890b2c9 100644
--- a/arch/arm/mach-pxa/smemc.c
+++ b/arch/arm/mach-pxa/smemc.c
@@ -40,6 +40,8 @@ static void pxa3xx_smemc_resume(void)
40 __raw_writel(csadrcfg[1], CSADRCFG1); 40 __raw_writel(csadrcfg[1], CSADRCFG1);
41 __raw_writel(csadrcfg[2], CSADRCFG2); 41 __raw_writel(csadrcfg[2], CSADRCFG2);
42 __raw_writel(csadrcfg[3], CSADRCFG3); 42 __raw_writel(csadrcfg[3], CSADRCFG3);
43 /* CSMSADRCFG wakes up in its default state (0), so we need to set it */
44 __raw_writel(0x2, CSMSADRCFG);
43} 45}
44 46
45static struct syscore_ops smemc_syscore_ops = { 47static struct syscore_ops smemc_syscore_ops = {
@@ -49,8 +51,19 @@ static struct syscore_ops smemc_syscore_ops = {
49 51
50static int __init smemc_init(void) 52static int __init smemc_init(void)
51{ 53{
52 if (cpu_is_pxa3xx()) 54 if (cpu_is_pxa3xx()) {
55 /*
56 * The only documentation we have on the
57 * Chip Select Configuration Register (CSMSADRCFG) is that
58 * it must be programmed to 0x2.
59 * Moreover, in the bit definitions, the second bit
60 * (CSMSADRCFG[1]) is called "SETALWAYS".
61 * Other bits are reserved in this register.
62 */
63 __raw_writel(0x2, CSMSADRCFG);
64
53 register_syscore_ops(&smemc_syscore_ops); 65 register_syscore_ops(&smemc_syscore_ops);
66 }
54 67
55 return 0; 68 return 0;
56} 69}
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 2073f0e6db0d..7e2cb880daa6 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -732,7 +732,7 @@ static inline void spitz_lcd_init(void) {}
732#endif 732#endif
733 733
734/****************************************************************************** 734/******************************************************************************
735 * Framebuffer 735 * NAND Flash
736 ******************************************************************************/ 736 ******************************************************************************/
737#if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE) 737#if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE)
738static struct mtd_partition spitz_nand_partitions[] = { 738static struct mtd_partition spitz_nand_partitions[] = {
@@ -858,7 +858,7 @@ static inline void spitz_nor_init(void) {}
858#endif 858#endif
859 859
860/****************************************************************************** 860/******************************************************************************
861 * GPIO expander 861 * I2C devices
862 ******************************************************************************/ 862 ******************************************************************************/
863#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) 863#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
864static struct pca953x_platform_data akita_pca953x_pdata = { 864static struct pca953x_platform_data akita_pca953x_pdata = {