OSDN Git Service

cxgb4: support new ISSI flash parts
authorGanesh Goudar <ganeshgr@chelsio.com>
Fri, 23 Mar 2018 11:35:49 +0000 (17:05 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Mar 2018 01:08:32 +0000 (21:08 -0400)
Add support for new 32MB and 64MB ISSI (Integrated Silicon
Solution, Inc.) FLASH parts.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

index b862477..7cb3ef4 100644 (file)
@@ -8604,6 +8604,25 @@ static int t4_get_flash_params(struct adapter *adap)
                }
                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: /* 32 MB */
+                       size = 1 << 25;
+                       break;
+               case 0x17: /* 64MB */
+                       size = 1 << 26;
+                       break;
+               default:
+                       dev_err(adap->pdev_dev, "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.