Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105164
b: refs/heads/master
c: 5c9f50e
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao authored and Russell King committed Jul 9, 2008
1 parent 230f46c commit b15d296
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1f7fc48c143537e2bf70affee7e8932f5be9bb4
refs/heads/master: 5c9f50e90e8056fb5a8bdd479ab0591d5dad79a0
39 changes: 39 additions & 0 deletions trunk/arch/arm/mach-pxa/zylonite.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];

int gpio_eth_irq;
int gpio_debug_led1;
int gpio_debug_led2;

int wm9713_irq;

Expand All @@ -64,6 +66,42 @@ static struct platform_device smc91x_device = {
.resource = smc91x_resources,
};

#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
static struct gpio_led zylonite_debug_leds[] = {
[0] = {
.name = "zylonite:yellow:1",
.default_trigger = "heartbeat",
},
[1] = {
.name = "zylonite:yellow:2",
.default_trigger = "default-on",
},
};

static struct gpio_led_platform_data zylonite_debug_leds_info = {
.leds = zylonite_debug_leds,
.num_leds = ARRAY_SIZE(zylonite_debug_leds),
};

static struct platform_device zylonite_device_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &zylonite_debug_leds_info,
}
};

static void __init zylonite_init_leds(void)
{
zylonite_debug_leds[0].gpio = gpio_debug_led1;
zylonite_debug_leds[1].gpio = gpio_debug_led2;

platform_device_register(&zylonite_device_leds);
}
#else
static inline void zylonite_init_leds(void) {}
#endif

#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
static struct platform_pwm_backlight_data zylonite_backlight_data = {
.pwm_id = 3,
Expand Down Expand Up @@ -395,6 +433,7 @@ static void __init zylonite_init(void)
zylonite_init_mmc();
zylonite_init_keypad();
zylonite_init_nand();
zylonite_init_leds();
}

MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/arm/mach-pxa/zylonite_pxa300.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,8 @@ void __init zylonite_pxa300_init(void)
zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30);
zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31);
}

/* GPIOs for Debug LEDs */
gpio_debug_led1 = EXT_GPIO(25);
gpio_debug_led2 = EXT_GPIO(26);
}
6 changes: 6 additions & 0 deletions trunk/arch/arm/mach-pxa/zylonite_pxa320.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
GPIO27_MMC2_DAT3,
GPIO28_MMC2_CLK,
GPIO29_MMC2_CMD,

/* Debug LEDs */
GPIO1_2_GPIO | MFP_LPM_DRIVE_HIGH,
GPIO4_2_GPIO | MFP_LPM_DRIVE_HIGH,
};

#define NUM_LCD_DETECT_PINS 7
Expand Down Expand Up @@ -189,6 +193,8 @@ void __init zylonite_pxa320_init(void)

/* GPIO pin assignment */
gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9);
gpio_debug_led1 = mfp_to_gpio(MFP_PIN_GPIO1_2);
gpio_debug_led2 = mfp_to_gpio(MFP_PIN_GPIO4_2);

/* MMC card detect & write protect for controller 0 */
zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-arm/arch-pxa/zylonite.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ struct platform_mmc_slot {
extern struct platform_mmc_slot zylonite_mmc_slot[];

extern int gpio_eth_irq;
extern int gpio_debug_led1;
extern int gpio_debug_led2;

extern int wm9713_irq;

Expand Down

0 comments on commit b15d296

Please sign in to comment.