From 0a4a64c07983be76a2b25242094a19b282b36577 Mon Sep 17 00:00:00 2001 From: Pavel Herrmann Date: Tue, 9 Oct 2012 07:06:25 +0000 Subject: move CPC45 ide_led to the same file as other IDE hooks Keep all IDE-related hooks and overrides in a single file, to avoid confusion Signed-off-by: Pavel Herrmann --- board/cpc45/ide.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'board/cpc45/ide.c') diff --git a/board/cpc45/ide.c b/board/cpc45/ide.c index 7b7237b908d..03be59f9740 100644 --- a/board/cpc45/ide.c +++ b/board/cpc45/ide.c @@ -27,6 +27,7 @@ #include #include #include +#include #define EIEIO __asm__ volatile ("eieio") #define SYNC __asm__ volatile ("sync") @@ -128,3 +129,17 @@ void ide_output_data_shorts(int dev, ushort *sect_buf, int shorts) *pbuf_odd = *dbuf++; } } + +void ide_led(uchar led, uchar status) +{ + u_char val; + /* We have one PCMCIA slot and use LED H4 for the IDE Interface */ + val = readb(BCSR_BASE + 0x04); + if (status) /* led on */ + val |= B_CTRL_LED0; + else + val &= ~B_CTRL_LED0; + + writeb(val, BCSR_BASE + 0x04); +} + -- cgit v1.2.3