>>>>> On Wed, 25 Feb 2004 19:16:45 +0100, Ralf Baechle <ralf@linux-mips.org>
>>>>> said:
>>> I'm not sure what you call endian issue here. The PC style
>>> partition table code we've used for years on big endian systems
>>> without problems.
>>
>> I guess his hardware has a byteswapped IDE bus, like on Atari,
>> Q40/Q60 and Tivo.
ralf> Oh, those. I fear every possible way to hookup the IDE bus in a
ralf> more or particularly less intelligent way to a system has
ralf> already been found out there ...
Since 2.4.21, I need following changes in asm-mips/ide.h to work
generic PCI IDE on my big-endian platform (which uses
CONFIG_SWAP_IO_SPACE) again. This is a same hack used until 2.4.20.
CONFIG_IDE_USE_RAW_IO is a flag in my local configuration.
The 2.4.21 IDE subsystem introduced hwif->OUTW, hwif->OUTSW, etc. but
I could not found a way to override them for generic PCI IDE
controllers. So I still need the hack.
#if defined(CONFIG_IDE_USE_RAW_IO) && defined(__MIPSEB__)
/* get rid of defs from io.h - ide has its private and conflicting versions */
#ifdef insw
#undef insw
#endif
#ifdef outsw
#undef outsw
#endif
#ifdef insl
#undef insl
#endif
#ifdef outsl
#undef outsl
#endif
#define insw(port, addr, count) raw_insw(port, addr, count)
#define insl(port, addr, count) raw_insl(port, addr, count)
#define outsw(port, addr, count) raw_outsw(port, addr, count)
#define outsl(port, addr, count) raw_outsl(port, addr, count)
static inline void raw_insw(unsigned long port, void *addr, unsigned int count)
{
while (count--) {
*(u16 *)addr = *(volatile u16 *)(mips_io_port_base + port);
addr += 2;
}
}
static inline void raw_outsw(unsigned long port, void *addr, unsigned int count)
{
while (count--) {
*(volatile u16 *)(mips_io_port_base + (port)) = *(u16 *)addr;
addr += 2;
}
}
static inline void raw_insl(unsigned long port, void *addr, unsigned int count)
{
while (count--) {
*(u32 *)addr = *(volatile u32 *)(mips_io_port_base + port);
addr += 4;
}
}
static inline void raw_outsl(unsigned long port, void *addr, unsigned int count)
{
while (count--) {
*(volatile u32 *)(mips_io_port_base + (port)) = *(u32 *)addr;
addr += 4;
}
}
#endif
|