diff options
| author | wdenk <wdenk> | 2004-03-14 00:59:59 +0000 | 
|---|---|---|
| committer | wdenk <wdenk> | 2004-03-14 00:59:59 +0000 | 
| commit | c3f9d4939af90eb8e30119601c86c05bde6c7345 (patch) | |
| tree | 90854c0902fd963de17ee275e3836629892a060f /common/cmd_ide.c | |
| parent | 0e6d798cb313580acd06ba01626687a557c5159f (diff) | |
| download | olio-uboot-2014.01-c3f9d4939af90eb8e30119601c86c05bde6c7345.tar.xz olio-uboot-2014.01-c3f9d4939af90eb8e30119601c86c05bde6c7345.zip | |
* Patch by Yuli Barcohen, 4 Mar 2004:
  Fix problems with GCC 3.3.x which changed handling of global
  variables explicitly initialized to zero (now in .bss instead of
  .data as before).
* Patch by Leon Kukovec, 02 Mar 2004:
  add strswab() to fix IDE LBA capacity, firmware and model numbers
  on little endian machines
* Patch by Masami Komiya, 02 Mar 2004:
  - Remove get_ticks() from NFS code
  - Add verification of RPC transaction ID
* Patch by Pierre Aubert, 02 Mar 2004:
  cleanup for IDE and USB drivers for MPC5200
Diffstat (limited to 'common/cmd_ide.c')
| -rw-r--r-- | common/cmd_ide.c | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 1778b33d6..e96a5f59a 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -1094,6 +1094,18 @@ static void ide_ident (block_dev_desc_t *dev_desc)  	ident_cpy (dev_desc->revision, iop->fw_rev, sizeof(dev_desc->revision));  	ident_cpy (dev_desc->vendor, iop->model, sizeof(dev_desc->vendor));  	ident_cpy (dev_desc->product, iop->serial_no, sizeof(dev_desc->product)); +#ifdef __LITTLE_ENDIAN +	/* +	 * firmware revision and model number have Big Endian Byte +	 * order in Word. Convert both to little endian. +	 * +	 * See CF+ and CompactFlash Specification Revision 2.0: +	 * 6.2.1.6: Identfy Drive, Table 39 for more details +	 */ + +	strswab (dev_desc->revision); +	strswab (dev_desc->vendor); +#endif /* __LITTLE_ENDIAN */  	if ((iop->config & 0x0080)==0x0080)  		dev_desc->removable = 1; @@ -1135,8 +1147,18 @@ static void ide_ident (block_dev_desc_t *dev_desc)  	}  #endif /* CONFIG_ATAPI */ +#ifdef __BIG_ENDIAN  	/* swap shorts */  	dev_desc->lba = (iop->lba_capacity << 16) | (iop->lba_capacity >> 16); +#else	/* ! __BIG_ENDIAN */ +	/* +	 * do not swap shorts on little endian +	 * +	 * See CF+ and CompactFlash Specification Revision 2.0: +	 * 6.2.1.6: Identfy Drive, Table 39, Word Address 57-58 for details. +	 */ +	dev_desc->lba = iop->lba_capacity; +#endif	/* __BIG_ENDIAN */  #if CONFIG_LBA48  	if (iop->command_set_2 & 0x0400) { /* LBA 48 support */ |