From 1f53a41603b9093c59741f4208fef0ab3790d6ce Mon Sep 17 00:00:00 2001 From: wdenk Date: Wed, 4 Dec 2002 23:39:58 +0000 Subject: Add LED indication for IDE activity on KUP4K board --- board/kup4k/kup4k.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'board') 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 -- cgit v1.1