summaryrefslogtreecommitdiffstats
path: root/board/MAI/AmigaOneG3SE/memio.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-06-13 18:28:54 +0200
committerWolfgang Denk <wd@denx.de>2010-06-23 23:24:20 +0200
commit953b7e629198fe2eb0adf272fb9140f2a4a51826 (patch)
tree1ed75dbbc88088c96b477286bc37da31ce0b1a47 /board/MAI/AmigaOneG3SE/memio.h
parentee80fa7b6e96a43d4270700cddc884e00cdd99fd (diff)
downloadblackbird-obmc-uboot-953b7e629198fe2eb0adf272fb9140f2a4a51826.tar.gz
blackbird-obmc-uboot-953b7e629198fe2eb0adf272fb9140f2a4a51826.zip
Remove AmigaOneG3SE board
The AmigaOneG3SE board has been orphaned or a very long time, and broken for more than 12 releases resp. more than 3 years. As nobody seems to be interested any more in this stuff we may as well ged rid of it, especially as it clutters many areas of the code so it is a continuous pain for all kinds of ongoing work. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/MAI/AmigaOneG3SE/memio.h')
-rw-r--r--board/MAI/AmigaOneG3SE/memio.h113
1 files changed, 0 insertions, 113 deletions
diff --git a/board/MAI/AmigaOneG3SE/memio.h b/board/MAI/AmigaOneG3SE/memio.h
deleted file mode 100644
index f5ce303070..0000000000
--- a/board/MAI/AmigaOneG3SE/memio.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Memory mapped IO
- *
- * (C) Copyright 2002
- * Hyperion Entertainment, ThomasF@hyperion-entertainment.com
- *
- * 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.
- * You may also use this under a BSD license.
- *
- * 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.
- *
- */
-
-#ifndef _MEMIO_H
-#define _MEMIO_H
-
-#include "short_types.h"
-
-#define IOBASE 0xFE000000
-
-#define in_byte(from) read_byte( (uint8 *)(IOBASE | (from)))
-#define in_word(from) read_word_little((uint16 *)(IOBASE | (from)))
-#define in_long(from) read_long_little((uint32 *)(IOBASE | (from)))
-#define out_byte(to, val) write_byte((uint8 *)(IOBASE | (to)), val)
-#define out_word(to, val) write_word_little((uint16 *)(IOBASE | (to)), val)
-#define out_long(to, val) write_long_little((uint32 *)(IOBASE | (to)), val)
-
-
-static inline uint8 read_byte(volatile uint8 *from)
-{
- int x;
- asm volatile ("lbz %0,%1\n eieio\n sync" : "=r" (x) : "m" (*from));
- return (uint8)x;
-}
-
-
-static inline void write_byte(volatile uint8 *to, uint8 x)
-{
- asm volatile ("stb %1,%0\n eieio\n sync" : "=m" (*to) : "r" (x));
-}
-
-static inline uint16 read_word_little(volatile uint16 *from)
-{
- int x;
- asm volatile ("lhbrx %0,0,%1\n eieio\n sync" : "=r" (x) : "r" (from), "m" (*from));
- return (uint16)x;
-}
-
-static inline uint16 read_word_big(volatile uint16 *from)
-{
- int x;
- asm volatile ("lhz %0,%1\n eieio\n sync" : "=r" (x) : "m" (*from));
- return (uint16)x;
-}
-
-static inline void write_word_little(volatile uint16 *to, int x)
-{
- asm volatile ("sthbrx %1,0,%2\n eieio\n sync" : "=m" (*to) : "r" (x), "r" (to));
-}
-
-static inline void write_word_big(volatile uint16 *to, int x)
-{
- asm volatile ("sth %1,%0\n eieio\n sync" : "=m" (*to) : "r" (x));
-}
-
-static inline uint32 read_long_little(volatile uint32 *from)
-{
- unsigned long x;
- asm volatile ("lwbrx %0,0,%1\n eieio\n sync" : "=r" (x) : "r" (from), "m"(*from));
- return (uint32)x;
-}
-
-static inline uint32 read_long_big(volatile uint32 *from)
-{
- unsigned long x;
- asm volatile ("lwz %0,%1\n eieio\n sync" : "=r" (x) : "m" (*from));
- return (uint32)x;
-}
-
-static inline void write_long_little(volatile uint32 *to, uint32 x)
-{
- asm volatile ("stwbrx %1,0,%2\n eieio\n sync" : "=m" (*to) : "r" (x), "r" (to));
-}
-
-static inline void write_long_big(volatile uint32 *to, uint32 x)
-{
- asm volatile ("stw %1,%0\n eieio\n sync" : "=m" (*to) : "r" (x));
-}
-
-#define CONFIG_ADDR(bus, devfn, offset) \
- write_long_big((uint32 *)0xFEC00CF8, \
- ((offset & 0xFC)<<24) | (devfn << 16) \
- | (bus<<8) | 0x80);
-#define CONFIG_DATA(offset,mask) ((void *)(0xFEE00CFC+(offset & mask)))
-
-
-uint8 pci_read_cfg_byte(int32 bus, int32 devfn, int32 offset);
-void pci_write_cfg_byte(int32 bus, int32 devfn, int32 offset, uint8 x);
-uint16 pci_read_cfg_word(int32 bus, int32 devfn, int32 offset);
-void pci_write_cfg_word(int32 bus, int32 devfn, int32 offset, uint16 x);
-uint32 pci_read_cfg_long(int32 bus, int32 devfn, int32 offset);
-void pci_write_cfg_long(int32 bus, int32 devfn, int32 offset, uint32 x);
-
-
-#endif
OpenPOWER on IntegriCloud