aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pcm990-baseboard.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-06-16 03:16:46 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-09 16:32:52 -0400
commit6a566fbbcc902df6c9c4dc151bf399018083fb10 (patch)
tree30d7103722814f0113d62da4c88fe235c83fe3b6 /arch/arm/mach-pxa/pcm990-baseboard.c
parentc0b8556f2f8146bd38324b14b1ce00f249ba8ed9 (diff)
[ARM] 5095/2: pcm990: switch from pxa_gpio_mode to pxa2xx_mfp_config
pxa_gpio_mode() is deprecated, use the new pxa2xx_mfp_config() function to configure GPIOs in pcm990 platform code. Convert "array, ARRAY_SIZE(array)" to "ARRAY_AND_SIZE(array)" while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pcm990-baseboard.c')
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c74
1 files changed, 41 insertions, 33 deletions
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 5d87c7c866e4..30023b00e476 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -33,14 +33,30 @@
33#include <asm/arch/camera.h> 33#include <asm/arch/camera.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/arch/pxa-regs.h> 35#include <asm/arch/pxa-regs.h>
36#include <asm/arch/pxa2xx-gpio.h>
37#include <asm/arch/audio.h> 36#include <asm/arch/audio.h>
38#include <asm/arch/mmc.h> 37#include <asm/arch/mmc.h>
39#include <asm/arch/ohci.h> 38#include <asm/arch/ohci.h>
40#include <asm/arch/pcm990_baseboard.h> 39#include <asm/arch/pcm990_baseboard.h>
41#include <asm/arch/pxafb.h> 40#include <asm/arch/pxafb.h>
41#include <asm/arch/mfp-pxa27x.h>
42 42
43#include "devices.h" 43#include "devices.h"
44#include "generic.h"
45
46static unsigned long pcm990_pin_config[] __initdata = {
47 /* MMC */
48 GPIO32_MMC_CLK,
49 GPIO112_MMC_CMD,
50 GPIO92_MMC_DAT_0,
51 GPIO109_MMC_DAT_1,
52 GPIO110_MMC_DAT_2,
53 GPIO111_MMC_DAT_3,
54 /* USB */
55 GPIO88_USBH1_PWR,
56 GPIO89_USBH1_PEN,
57 /* PWM0 */
58 GPIO16_PWM0_OUT,
59};
44 60
45/* 61/*
46 * pcm990_lcd_power - control power supply to the LCD 62 * pcm990_lcd_power - control power supply to the LCD
@@ -277,16 +293,6 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int,
277{ 293{
278 int err; 294 int err;
279 295
280 /*
281 * enable GPIO for PXA27x MMC controller
282 */
283 pxa_gpio_mode(GPIO32_MMCCLK_MD);
284 pxa_gpio_mode(GPIO112_MMCCMD_MD);
285 pxa_gpio_mode(GPIO92_MMCDAT0_MD);
286 pxa_gpio_mode(GPIO109_MMCDAT1_MD);
287 pxa_gpio_mode(GPIO110_MMCDAT2_MD);
288 pxa_gpio_mode(GPIO111_MMCDAT3_MD);
289
290 err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED, 296 err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED,
291 "MMC card detect", data); 297 "MMC card detect", data);
292 if (err) 298 if (err)
@@ -333,8 +339,6 @@ static struct pxamci_platform_data pcm990_mci_platform_data = {
333 */ 339 */
334static int pcm990_ohci_init(struct device *dev) 340static int pcm990_ohci_init(struct device *dev)
335{ 341{
336 pxa_gpio_mode(PCM990_USB_OVERCURRENT);
337 pxa_gpio_mode(PCM990_USB_PWR_EN);
338 /* 342 /*
339 * disable USB port 2 and 3 343 * disable USB port 2 and 3
340 * power sense is active low 344 * power sense is active low
@@ -361,23 +365,27 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = {
361 * PXA27x Camera specific stuff 365 * PXA27x Camera specific stuff
362 */ 366 */
363#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) 367#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
368static unsigned long pcm990_camera_pin_config[] = {
369 /* CIF */
370 GPIO98_CIF_DD_0,
371 GPIO105_CIF_DD_1,
372 GPIO104_CIF_DD_2,
373 GPIO103_CIF_DD_3,
374 GPIO95_CIF_DD_4,
375 GPIO94_CIF_DD_5,
376 GPIO93_CIF_DD_6,
377 GPIO108_CIF_DD_7,
378 GPIO107_CIF_DD_8,
379 GPIO106_CIF_DD_9,
380 GPIO42_CIF_MCLK,
381 GPIO45_CIF_PCLK,
382 GPIO43_CIF_FV,
383 GPIO44_CIF_LV,
384};
385
364static int pcm990_pxacamera_init(struct device *dev) 386static int pcm990_pxacamera_init(struct device *dev)
365{ 387{
366 pxa_gpio_mode(GPIO98_CIF_DD_0_MD); 388 pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
367 pxa_gpio_mode(GPIO105_CIF_DD_1_MD);
368 pxa_gpio_mode(GPIO104_CIF_DD_2_MD);
369 pxa_gpio_mode(GPIO103_CIF_DD_3_MD);
370 pxa_gpio_mode(GPIO95_CIF_DD_4_MD);
371 pxa_gpio_mode(GPIO94_CIF_DD_5_MD);
372 pxa_gpio_mode(GPIO93_CIF_DD_6_MD);
373 pxa_gpio_mode(GPIO108_CIF_DD_7_MD);
374 pxa_gpio_mode(GPIO107_CIF_DD_8_MD);
375 pxa_gpio_mode(GPIO106_CIF_DD_9_MD);
376 pxa_gpio_mode(GPIO42_CIF_MCLK_MD);
377 pxa_gpio_mode(GPIO45_CIF_PCLK_MD);
378 pxa_gpio_mode(GPIO43_CIF_FV_MD);
379 pxa_gpio_mode(GPIO44_CIF_LV_MD);
380
381 return 0; 389 return 0;
382} 390}
383 391
@@ -449,8 +457,10 @@ static struct map_desc pcm990_io_desc[] __initdata = {
449 */ 457 */
450void __init pcm990_baseboard_init(void) 458void __init pcm990_baseboard_init(void)
451{ 459{
460 pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_pin_config));
461
452 /* register CPLD access */ 462 /* register CPLD access */
453 iotable_init(pcm990_io_desc, ARRAY_SIZE(pcm990_io_desc)); 463 iotable_init(ARRAY_AND_SIZE(pcm990_io_desc));
454 464
455 /* register CPLD's IRQ controller */ 465 /* register CPLD's IRQ controller */
456 pcm990_init_irq(); 466 pcm990_init_irq();
@@ -458,7 +468,6 @@ void __init pcm990_baseboard_init(void)
458#ifndef CONFIG_PCM990_DISPLAY_NONE 468#ifndef CONFIG_PCM990_DISPLAY_NONE
459 set_pxa_fb_info(&pcm990_fbinfo); 469 set_pxa_fb_info(&pcm990_fbinfo);
460#endif 470#endif
461 pxa_gpio_mode(GPIO16_PWM0_MD);
462 platform_device_register(&pcm990_backlight_device); 471 platform_device_register(&pcm990_backlight_device);
463 472
464 /* MMC */ 473 /* MMC */
@@ -473,9 +482,8 @@ void __init pcm990_baseboard_init(void)
473#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) 482#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
474 pxa_set_camera_info(&pcm990_pxacamera_platform_data); 483 pxa_set_camera_info(&pcm990_pxacamera_platform_data);
475 484
476 i2c_register_board_info(0, pcm990_i2c_devices, 485 i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
477 ARRAY_SIZE(pcm990_i2c_devices));
478#endif 486#endif
479 487
480 printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n"); 488 printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n");
481} 489}