diff options
author | wdenk <wdenk> | 2004-09-29 22:55:14 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-09-29 22:55:14 +0000 |
commit | a5bbcc3c53a7fb541f812d25d576c35f097438ba (patch) | |
tree | 06cdb5c11feae54441145636b804a60d9e3dd34b /common/cmd_ace.c | |
parent | a06752e36be7fc74b4a928026b63b1bf1764497e (diff) |
* Patches by Sean Chang, 09 Aug 2004:
- Added support for both 8 and 16 bit mode access to System ACE CF
through MPU.
- Fixed missing System ACE CF device during get FAT partition info
in fat_register_device function.
- Enabled System ACE CF support on ML300.
* Patch by Sean Chang, 09 Aug 2004:
Synch defines for saveenv and do_saveenv functions so they get
compiled under the same statement.
Diffstat (limited to 'common/cmd_ace.c')
-rw-r--r-- | common/cmd_ace.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/common/cmd_ace.c b/common/cmd_ace.c index 4969811f3b..c5b08bf772 100644 --- a/common/cmd_ace.c +++ b/common/cmd_ace.c @@ -50,12 +50,35 @@ */ static unsigned ace_readw(unsigned offset) { - return readw(CFG_SYSTEMACE_BASE+offset); +#if (CFG_SYSTEMACE_WIDTH == 8) + u16 temp; + +#if !defined(__BIG_ENDIAN) + temp =((u16)readb(CFG_SYSTEMACE_BASE+offset) << 8); + temp |= (u16)readb(CFG_SYSTEMACE_BASE+offset+1); +#else + temp = (u16)readb(CFG_SYSTEMACE_BASE+offset); + temp |=((u16)readb(CFG_SYSTEMACE_BASE+offset+1) << 8); +#endif + return temp; +#else + return readw(CFG_SYSTEMACE_BASE+offset); +#endif } static void ace_writew(unsigned val, unsigned offset) { - writew(val, CFG_SYSTEMACE_BASE+offset); +#if (CFG_SYSTEMACE_WIDTH == 8) +#if !defined(__BIG_ENDIAN) + writeb((u8)(val>>8), CFG_SYSTEMACE_BASE+offset); + writeb((u8)val, CFG_SYSTEMACE_BASE+offset+1); +#else + writeb((u8)val, CFG_SYSTEMACE_BASE+offset); + writeb((u8)(val>>8), CFG_SYSTEMACE_BASE+offset+1); +#endif +#else + writew(val, CFG_SYSTEMACE_BASE+offset); +#endif } /* */ |