Lines Matching +full:serial +full:- +full:id
3 * ChipCommon serial flash interface
27 u32 id; member
83 dev_err(cc->dev->dev, "SFLASH control command failed (timeout)!\n"); in ssb_sflash_cmd()
86 /* Initialize serial flash access */
89 struct ssb_sflash *sflash = &cc->dev->bus->mipscore.sflash; in ssb_sflash_init()
91 u32 id, id2; in ssb_sflash_init() local
93 switch (cc->capabilities & SSB_CHIPCO_CAP_FLASHT) { in ssb_sflash_init()
99 id = chipco_read32(cc, SSB_CHIPCO_FLASHDATA); in ssb_sflash_init()
105 switch (id) { in ssb_sflash_init()
107 for (e = ssb_sflash_sst_tbl; e->name; e++) { in ssb_sflash_init()
108 if (e->id == id2) in ssb_sflash_init()
113 return -ENOTSUPP; in ssb_sflash_init()
115 for (e = ssb_sflash_st_tbl; e->name; e++) { in ssb_sflash_init()
116 if (e->id == id) in ssb_sflash_init()
121 if (!e->name) { in ssb_sflash_init()
122 pr_err("Unsupported ST serial flash (id: 0x%X, id2: 0x%X)\n", in ssb_sflash_init()
123 id, id2); in ssb_sflash_init()
124 return -ENOTSUPP; in ssb_sflash_init()
130 id = chipco_read32(cc, SSB_CHIPCO_FLASHDATA) & 0x3c; in ssb_sflash_init()
132 for (e = ssb_sflash_at_tbl; e->name; e++) { in ssb_sflash_init()
133 if (e->id == id) in ssb_sflash_init()
136 if (!e->name) { in ssb_sflash_init()
137 pr_err("Unsupported Atmel serial flash (id: 0x%X)\n", in ssb_sflash_init()
138 id); in ssb_sflash_init()
139 return -ENOTSUPP; in ssb_sflash_init()
145 return -ENOTSUPP; in ssb_sflash_init()
148 sflash->window = SSB_FLASH2; in ssb_sflash_init()
149 sflash->blocksize = e->blocksize; in ssb_sflash_init()
150 sflash->numblocks = e->numblocks; in ssb_sflash_init()
151 sflash->size = sflash->blocksize * sflash->numblocks; in ssb_sflash_init()
152 sflash->present = true; in ssb_sflash_init()
154 pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n", in ssb_sflash_init()
155 e->name, sflash->size / 1024, e->blocksize, e->numblocks); in ssb_sflash_init()
160 sflash->size; in ssb_sflash_init()