Lines Matching +full:serial +full:- +full:id

3  * ChipCommon serial flash interface
28 u32 id; member
85 bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n"); in bcma_sflash_cmd()
88 /* Initialize serial flash access */
91 struct bcma_bus *bus = cc->core->bus; in bcma_sflash_init()
92 struct bcma_sflash *sflash = &cc->sflash; in bcma_sflash_init()
94 u32 id, id2; in bcma_sflash_init() local
96 switch (cc->capabilities & BCMA_CC_CAP_FLASHT) { in bcma_sflash_init()
102 id = bcma_cc_read32(cc, BCMA_CC_FLASHDATA); in bcma_sflash_init()
108 switch (id) { in bcma_sflash_init()
110 for (e = bcma_sflash_sst_tbl; e->name; e++) { in bcma_sflash_init()
111 if (e->id == id2) in bcma_sflash_init()
116 return -ENOTSUPP; in bcma_sflash_init()
118 for (e = bcma_sflash_st_tbl; e->name; e++) { in bcma_sflash_init()
119 if (e->id == id) in bcma_sflash_init()
124 if (!e->name) { in bcma_sflash_init()
125 bcma_err(bus, "Unsupported ST serial flash (id: 0x%X, id2: 0x%X)\n", id, id2); in bcma_sflash_init()
126 return -ENOTSUPP; in bcma_sflash_init()
132 id = bcma_cc_read32(cc, BCMA_CC_FLASHDATA) & 0x3c; in bcma_sflash_init()
134 for (e = bcma_sflash_at_tbl; e->name; e++) { in bcma_sflash_init()
135 if (e->id == id) in bcma_sflash_init()
138 if (!e->name) { in bcma_sflash_init()
139 bcma_err(bus, "Unsupported Atmel serial flash (id: 0x%X)\n", id); in bcma_sflash_init()
140 return -ENOTSUPP; in bcma_sflash_init()
146 return -ENOTSUPP; in bcma_sflash_init()
149 sflash->blocksize = e->blocksize; in bcma_sflash_init()
150 sflash->numblocks = e->numblocks; in bcma_sflash_init()
151 sflash->size = sflash->blocksize * sflash->numblocks; in bcma_sflash_init()
152 sflash->present = true; in bcma_sflash_init()
154 bcma_info(bus, "Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n", in bcma_sflash_init()
155 e->name, sflash->size / 1024, sflash->blocksize, in bcma_sflash_init()
156 sflash->numblocks); in bcma_sflash_init()
161 sflash->size; in bcma_sflash_init()