aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/zylonite.c39
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c4
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c6
3 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 13ab2985a026..4a4711d36e73 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -38,6 +38,8 @@
38struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; 38struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
39 39
40int gpio_eth_irq; 40int gpio_eth_irq;
41int gpio_debug_led1;
42int gpio_debug_led2;
41 43
42int wm9713_irq; 44int wm9713_irq;
43 45
@@ -64,6 +66,42 @@ static struct platform_device smc91x_device = {
64 .resource = smc91x_resources, 66 .resource = smc91x_resources,
65}; 67};
66 68
69#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
70static struct gpio_led zylonite_debug_leds[] = {
71 [0] = {
72 .name = "zylonite:yellow:1",
73 .default_trigger = "heartbeat",
74 },
75 [1] = {
76 .name = "zylonite:yellow:2",
77 .default_trigger = "default-on",
78 },
79};
80
81static struct gpio_led_platform_data zylonite_debug_leds_info = {
82 .leds = zylonite_debug_leds,
83 .num_leds = ARRAY_SIZE(zylonite_debug_leds),
84};
85
86static struct platform_device zylonite_device_leds = {
87 .name = "leds-gpio",
88 .id = -1,
89 .dev = {
90 .platform_data = &zylonite_debug_leds_info,
91 }
92};
93
94static void __init zylonite_init_leds(void)
95{
96 zylonite_debug_leds[0].gpio = gpio_debug_led1;
97 zylonite_debug_leds[1].gpio = gpio_debug_led2;
98
99 platform_device_register(&zylonite_device_leds);
100}
101#else
102static inline void zylonite_init_leds(void) {}
103#endif
104
67#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) 105#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
68static struct platform_pwm_backlight_data zylonite_backlight_data = { 106static struct platform_pwm_backlight_data zylonite_backlight_data = {
69 .pwm_id = 3, 107 .pwm_id = 3,
@@ -395,6 +433,7 @@ static void __init zylonite_init(void)
395 zylonite_init_mmc(); 433 zylonite_init_mmc();
396 zylonite_init_keypad(); 434 zylonite_init_keypad();
397 zylonite_init_nand(); 435 zylonite_init_nand();
436 zylonite_init_leds();
398} 437}
399 438
400MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") 439MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index 75bf61f1f1c3..b28d46e081d3 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -264,4 +264,8 @@ void __init zylonite_pxa300_init(void)
264 zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30); 264 zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30);
265 zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31); 265 zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31);
266 } 266 }
267
268 /* GPIOs for Debug LEDs */
269 gpio_debug_led1 = EXT_GPIO(25);
270 gpio_debug_led2 = EXT_GPIO(26);
267} 271}
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index 2b4fc34919ac..2b7fba7a2921 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -116,6 +116,10 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
116 GPIO27_MMC2_DAT3, 116 GPIO27_MMC2_DAT3,
117 GPIO28_MMC2_CLK, 117 GPIO28_MMC2_CLK,
118 GPIO29_MMC2_CMD, 118 GPIO29_MMC2_CMD,
119
120 /* Debug LEDs */
121 GPIO1_2_GPIO | MFP_LPM_DRIVE_HIGH,
122 GPIO4_2_GPIO | MFP_LPM_DRIVE_HIGH,
119}; 123};
120 124
121#define NUM_LCD_DETECT_PINS 7 125#define NUM_LCD_DETECT_PINS 7
@@ -189,6 +193,8 @@ void __init zylonite_pxa320_init(void)
189 193
190 /* GPIO pin assignment */ 194 /* GPIO pin assignment */
191 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9); 195 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9);
196 gpio_debug_led1 = mfp_to_gpio(MFP_PIN_GPIO1_2);
197 gpio_debug_led2 = mfp_to_gpio(MFP_PIN_GPIO4_2);
192 198
193 /* MMC card detect & write protect for controller 0 */ 199 /* MMC card detect & write protect for controller 0 */
194 zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1); 200 zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1);