1. 16 Oct, 2013 1 commit
  2. 24 Jul, 2013 1 commit
  3. 04 Apr, 2011 1 commit
    • Timur Tabi's avatar
      fsl: obsolete NXID v0 EEPROMs, automatically upgrade them to NXID v1 · f098c9c8
      Timur Tabi authored
      
      
      The NXID EEPROM format comes in two versions, v0 and v1.  The only
      difference is in the number of MAC addresses that can be stored.  NXID v0
      supports eight addresses, and NXID v1 supports 23.
      
      Rather than allow a board to choose which version to support, NXID v0 is
      now considered deprecated.  The EEPROM code is updated to support only
      NXID v1, but it can still read EEPROMs formatted with v0.  In these cases,
      the EEPROM data is loaded and the CRC is verified, but the data is stored
      into a v1 data structure.  If the EEPROM data is written back, it is
      written in v1 format.  This allows existing v0-formatted EEPROMs to
      continue providing MAC addresses, but any changes to the data will force
      an upgrade to the v1 format, while retaining all data.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      f098c9c8
  4. 10 Feb, 2011 1 commit
  5. 07 Oct, 2010 2 commits
    • Timur Tabi's avatar
      fsl: add support for NXID v1 EEPROM format · bfb70719
      Timur Tabi authored
      
      
      Freescale application note AN3638 describes an update to the NXID format,
      which stores MAC addresses and related data on an on-board EEPROM.  The new
      version adds support for up to 23 MAC addresses, instead of just 8.  Since
      the initial implementation of NXID had a "0" in the 'version' field, this
      new version is called "v1".
      
      Boards that are shipped with EEPROMs in the NXID v1 format should define
      CONFIG_SYS_I2C_EEPROM_NXID_1 instead of CONFIG_SYS_I2C_EEPROM_NXID.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      bfb70719
    • Timur Tabi's avatar
      fsl: verify writes to the MAC address EEPROM · 3addcb93
      Timur Tabi authored
      
      
      Update the code which writes to the on-board EEPROM so that it can detect if
      the write failed because the EEPROM is write-protected.  Most of the 8xxx-class
      Freescale reference boards use an AT24C02 EEPROM to store MAC addresses and
      similar information.  With this patch, if the EEPROM is protected, the
      "mac save" command will display an error message indicating that the write
      has not succeeded.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      3addcb93
  6. 24 Jul, 2010 1 commit
  7. 04 Jul, 2010 1 commit
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      
      
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems since version 6 - but not so in U-Boot:
      
      int main (int argc, char **argv)
      {
      	while (--argc > 0 && **++argv == '-') {
      /* ====> */	while (*++*argv) {
      			switch (**argv) {
      			case 'd':
      				debug++;
      				break;
      			...
      			default:
      				usage ();
      			}
      		}
      	}
      	...
      }
      
      The line marked "====>" will corrupt the malloc data structures and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	error: increment of read-only location '*argv'
      
      N.B.: The code above can be trivially rewritten like this:
      
      	while (--argc > 0 && **++argv == '-') {
      		char *arg = *argv;
      		while (*++arg) {
      			switch (*arg) {
      			...
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  8. 03 Oct, 2009 1 commit
  9. 08 Sep, 2009 1 commit
  10. 28 Aug, 2009 1 commit
    • Timur Tabi's avatar
      fsl: simplify the "mac id" command, improve boot-time informational message · 2d04db08
      Timur Tabi authored
      
      
      The "mac id" command took a 4-character parameter as the identifier string.
      However, for any given board, only one kind of identifier is acceptable, so it
      makes no sense to ask the user to type it in.  Instead, if the user enters
      "mac id", the identifier (and also the version, if it's NXID) will
      automatically be set to the correct value.
      
      Improve the message that is displayed when EEPROM is read during boot.  It now
      displays "EEPROM:" and then either an error message or the EEPROM identifier
      if successful.
      
      If the identifier in EEPROM is valid, then always reject a bad CRC, even if the
      CRC field has not been initialized.
      
      Don't force the MAC address count to MAX_NUM_PORTS or less.  Forcing the value
      to be changed resulting in an in-memory copy that does not match what's in
      hardware, even though the user did not request that change.
      
      Finally, always update the CRC value in the in-memory copy after any field
      is changed, so that the CRC is always correct.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      2d04db08
  11. 03 Jul, 2009 1 commit
  12. 12 Jun, 2009 1 commit
  13. 28 Jan, 2009 1 commit
  14. 18 Oct, 2008 1 commit
  15. 08 Oct, 2008 1 commit
    • Rafal Czubak's avatar
      FSL: Fix get_cpu_board_revision() return value. · e46c7bfb
      Rafal Czubak authored
      
      
      get_cpu_board_revision() returned board revision based on information stored
      in global static struct eeprom. It should instead use one from local struct
      board_eeprom, to which the data is actually read from EEPROM. The bug led to
      system hang after printing L1 cache information on U-Boot startup. The problem
      was observed on MPC8555CDS system and possibly affects other Freescale MPC85xx
      boards using CFG_I2C_EEPROM_CCID.
      
      The change has been successfully tested on MPC8555CDS system.
      Signed-off-by: default avatarRafal Czubak <rcz@semihalf.com>
      e46c7bfb
  16. 15 Jul, 2008 2 commits
  17. 20 May, 2008 1 commit
    • Wolfgang Denk's avatar
      Big white-space cleanup. · 53677ef1
      Wolfgang Denk authored
      
      
      This commit gets rid of a huge amount of silly white-space issues.
      Especially, all sequences of SPACEs followed by TAB characters get
      removed (unless they appear in print statements).
      
      Also remove all embedded "vim:" and "vi:" statements which hide
      indentation problems.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      53677ef1
  18. 14 Feb, 2008 1 commit
  19. 17 Jan, 2008 1 commit
  20. 16 Jan, 2008 1 commit
  21. 15 Aug, 2007 1 commit
  22. 01 Aug, 2007 1 commit
  23. 22 Aug, 2006 1 commit
  24. 13 Jul, 2006 1 commit
    • Haiying Wang's avatar
      Add support for reading and writing mac addresses to or from ID EEPROM. · bea3f28d
      Haiying Wang authored
      
      
      Added code for reading and writing Mac addresses to/from ID EEPROM(0x57).
      With attached patch, we can use command "mac/mac read/mac save/"
      to read and write EEPROM under u-boot prompt.
      
      U-boot will calculate the checksum of EEPROM while bootup,
      if it is right, then u-boot will check whether the mac address
      of eTSEC0/1/2/3 is availalbe (non-zero).
      
      If there is mac address availabe in EEPROM, u-boot will use it,
      otherewise, u-boot will use the mac address defined in
      MPC8641HPCN.h. This matches the requirement to set unique mac address
      for each TSEC port.
      Signed-off-by: default avatarHaiying Wang <haiying.wang@freescale.com>
      Signed-off-by: default avatarYork Sun <yorksun@freescale.com>
      bea3f28d