Date: Tue, 15 May 2018 22:26:09 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333652 - head/sys/dev/cxgbe/common Message-ID: <201805152226.w4FMQ9Ac036507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Tue May 15 22:26:09 2018 New Revision: 333652 URL: https://svnweb.freebsd.org/changeset/base/333652 Log: cxgbe(4): Add support for two more flash parts. Obtained from: Chelsio Communications MFC after: 2 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/t4_hw.c Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Tue May 15 22:22:10 2018 (r333651) +++ head/sys/dev/cxgbe/common/t4_hw.c Tue May 15 22:26:09 2018 (r333652) @@ -7905,6 +7905,44 @@ int t4_get_flash_params(struct adapter *adapter) break; } + case 0x9d: { /* ISSI -- Integrated Silicon Solution, Inc. */ + /* + * This Density -> Size decoding table is taken from ISSI + * Data Sheets. + */ + density = (flashid >> 16) & 0xff; + switch (density) { + case 0x16: size = 1 << 25; break; /* 32MB */ + case 0x17: size = 1 << 26; break; /* 64MB */ + + default: + CH_ERR(adapter, "ISSI Flash Part has bad size, " + "ID = %#x, Density code = %#x\n", + flashid, density); + return -EINVAL; + } + break; + } + + case 0xc2: { /* Macronix */ + /* + * This Density -> Size decoding table is taken from Macronix + * Data Sheets. + */ + density = (flashid >> 16) & 0xff; + switch (density) { + case 0x17: size = 1 << 23; break; /* 8MB */ + case 0x18: size = 1 << 24; break; /* 16MB */ + + default: + CH_ERR(adapter, "Macronix Flash Part has bad size, " + "ID = %#x, Density code = %#x\n", + flashid, density); + return -EINVAL; + } + break; + } + case 0xef: { /* Winbond */ /* * This Density -> Size decoding table is taken from Winbond
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805152226.w4FMQ9Ac036507>