diff options
author | wdenk <wdenk> | 2002-12-04 23:39:58 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2002-12-04 23:39:58 +0000 |
commit | 1f53a41603b9093c59741f4208fef0ab3790d6ce (patch) | |
tree | f4ba6cfcc73c5b6ce2d71c233fd0debea4e47424 /board/kup4k/kup4k.c | |
parent | a6c7ad2f65afaa717ba19cbf9d8d138b5f10ccf9 (diff) | |
download | u-boot-imx-1f53a41603b9093c59741f4208fef0ab3790d6ce.zip u-boot-imx-1f53a41603b9093c59741f4208fef0ab3790d6ce.tar.gz u-boot-imx-1f53a41603b9093c59741f4208fef0ab3790d6ce.tar.bz2 |
Add LED indication for IDE activity on KUP4K board
Diffstat (limited to 'board/kup4k/kup4k.c')
-rw-r--r-- | board/kup4k/kup4k.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/board/kup4k/kup4k.c b/board/kup4k/kup4k.c index 86e1c81..aeafa6a 100644 --- a/board/kup4k/kup4k.c +++ b/board/kup4k/kup4k.c @@ -288,12 +288,22 @@ int misc_init_r (void) { DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_STATUS_LED + volatile immap_t *immap = (immap_t *)CFG_IMMR; +#endif #ifdef CONFIG_KUP4K_LOGO bd_t *bd = gd->bd; lcd_logo(bd); #endif /* CONFIG_KUP4K_LOGO */ +#ifdef CONFIG_IDE_LED + /* Configure PA8 as output port */ + immap->im_ioport.iop_padir |= 0x80; + immap->im_ioport.iop_paodr |= 0x80; + immap->im_ioport.iop_papar &= ~0x80; + immap->im_ioport.iop_padat |= 0x80; /* turn it off */ +#endif return(0); } @@ -422,3 +432,15 @@ void lcd_logo(bd_t *bd){ } #endif /* CONFIG_KUP4K_LOGO */ +#ifdef CONFIG_IDE_LED +void ide_led (uchar led, uchar status) +{ + volatile immap_t *immap = (immap_t *)CFG_IMMR; + /* We have one led for both pcmcia slots */ + if (status) { /* led on */ + immap->im_ioport.iop_padat &= ~0x80; + } else { + immap->im_ioport.iop_padat |= 0x80; + } +} +#endif |