mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 21:51:31 +00:00
Blackfin: section off the CF/IDE io.h hacks
These need to be rethought, but until that happens, isolate the hack so that we can extend the common code without breaking things. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
3b062da326
commit
5eefe7e995
1 changed files with 15 additions and 12 deletions
|
@ -34,12 +34,6 @@ static inline void sync(void)
|
||||||
SSYNC();
|
SSYNC();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* function prototypes for CF support */
|
|
||||||
extern void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words);
|
|
||||||
extern void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words);
|
|
||||||
extern unsigned char cf_inb(volatile unsigned char *addr);
|
|
||||||
extern void cf_outb(unsigned char val, volatile unsigned char *addr);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Given a physical address and a length, return a virtual address
|
* Given a physical address and a length, return a virtual address
|
||||||
* that can be used to access the memory range with the caching
|
* that can be used to access the memory range with the caching
|
||||||
|
@ -140,12 +134,21 @@ static inline unsigned int readl(const volatile void *addr)
|
||||||
#define memcpy_fromio(a, b, c) memcpy((a), (void *)(b), (c))
|
#define memcpy_fromio(a, b, c) memcpy((a), (void *)(b), (c))
|
||||||
#define memcpy_toio(a, b, c) memcpy((void *)(a), (b), (c))
|
#define memcpy_toio(a, b, c) memcpy((void *)(a), (b), (c))
|
||||||
|
|
||||||
#define inb(addr) cf_inb((volatile unsigned char *)(addr))
|
#if defined(CONFIG_STAMP_CF) || defined(CONFIG_BFIN_IDE)
|
||||||
#define outb(x, addr) cf_outb((unsigned char)(x), (volatile unsigned char *)(addr))
|
/* This hack for CF/IDE needs to be addressed at some point */
|
||||||
|
extern void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words);
|
||||||
#define insw(port, addr, count) cf_insw((unsigned short *)addr, (unsigned short *)(port), (count))
|
extern void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words);
|
||||||
|
extern unsigned char cf_inb(volatile unsigned char *addr);
|
||||||
#define outsw(port, addr, count) cf_outsw((unsigned short *)(port), (unsigned short *)addr, (count))
|
extern void cf_outb(unsigned char val, volatile unsigned char *addr);
|
||||||
|
#undef inb
|
||||||
|
#undef outb
|
||||||
|
#undef insw
|
||||||
|
#undef outsw
|
||||||
|
#define inb(addr) cf_inb((void *)(addr))
|
||||||
|
#define outb(x, addr) cf_outb((unsigned char)(x), (void *)(addr))
|
||||||
|
#define insw(port, addr, cnt) cf_insw((void *)(addr), (void *)(port), cnt)
|
||||||
|
#define outsw(port, addr, cnt) cf_outsw((void *)(port), (void *)(addr), cnt)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue