]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/cpc45/ide.c
karo: fdt: remove 'vbus-supply' from usbotg node when otg_mode=peripheral
[karo-tx-uboot.git] / board / cpc45 / ide.c
index 7b7237b908d19337e1ab7c883aaba008ee017cb1..448d887b3a32a4d28f3f09ccf628e9becbd8b5b2 100644 (file)
@@ -5,28 +5,13 @@
  * (C) Copyright 2000-2011
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <ide.h>
 #include <ata.h>
+#include <asm/io.h>
 
 #define EIEIO          __asm__ volatile ("eieio")
 #define SYNC           __asm__ volatile ("sync")
@@ -128,3 +113,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);
+}
+