• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/shared/

Lines Matching refs:sih

51 static int nflash_poll(si_t *sih, chipcregs_t *cc);
52 static int nflash_readst(si_t *sih, chipcregs_t *cc, uint8 *status);
53 static int nflash_readoob(si_t *sih, chipcregs_t *cc, uint64 offset, uint len, uchar *buf);
54 static int nflash_writeoob(si_t *sih, chipcregs_t *cc, uint64 offset, uint len, uchar *buf);
56 hndnand_t *nflash_init(si_t *sih);
68 si_t *sih = nfl->sih;
70 if (sih->ccrev == 38) {
72 if ((sih->chipst & (1 << 4)) != 0)
76 si_pmu_chipcontrol(sih, 1, CCTRL5357_NFLASH, CCTRL5357_NFLASH);
78 si_pmu_chipcontrol(sih, 1, CCTRL5357_NFLASH, 0);
157 nflash_init(si_t *sih)
167 ASSERT(sih);
169 if ((cc = (chipcregs_t *)si_setcoreidx(sih, SI_CC_IDX)) == NULL)
173 if ((CHIPID(sih->chip) != BCM4706_CHIP_ID) && (sih->ccrev != 38))
177 if ((sih->cccaps & CC_CAP_NFLASH) != CC_CAP_NFLASH)
183 osh = si_osh(sih);
186 nflash.sih = sih;
195 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
321 if (nflash_poll(sih, cc) < 0) {
415 si_t *sih = nfl->sih;
424 ASSERT(sih);
432 osh = si_osh(sih);
436 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
453 if (nflash_poll(sih, cc) < 0)
476 if (nflash_poll(sih, cc) < 0)
496 nflash_poll(si_t *sih, chipcregs_t *cc)
502 ASSERT(sih);
503 osh = si_osh(sih);
505 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
535 si_t *sih = nfl->sih;
546 ASSERT(sih);
555 osh = si_osh(sih);
560 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
590 if (nflash_poll(sih, cc) < 0)
593 if (nflash_readst(sih, cc, &status) != 0)
620 if (nflash_poll(sih, cc) < 0)
625 if (nflash_poll(sih, cc) < 0)
650 si_t *sih = nfl->sih;
656 ASSERT(sih);
658 osh = si_osh(sih);
665 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
678 if (nflash_poll(sih, cc) < 0)
681 if (nflash_readst(sih, cc, &status) != 0)
692 if (nflash_poll(sih, cc) < 0) {
698 if (nflash_poll(sih, cc) < 0) {
715 si_t *sih = nfl->sih;
723 ASSERT(sih);
725 osh = si_osh(sih);
732 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
737 status1 = nflash_readoob(sih, cc, offset, sizeof(oob_buf1), oob_buf1);
740 status2 = nflash_readoob(sih, cc, sec_page_offset, sizeof(oob_buf2), oob_buf2);
761 if (nflash_poll(sih, cc) < 0) {
784 si_t *sih = nfl->sih;
791 ASSERT(sih);
793 osh = si_osh(sih);
800 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
808 if (nflash_writeoob(sih, cc, offset, nflash.oobsize, oob_buf) < 0)
811 if (nflash_writeoob(sih, cc, offset + nflash.pagesize, nflash.oobsize, oob_buf) < 0)
818 if (nflash_poll(sih, cc) < 0) {
842 if (nflash_poll(sih, cc) < 0) {
869 nflash_readst(si_t *sih, chipcregs_t *cc, uint8 *status)
874 ASSERT(sih);
876 osh = si_osh(sih);
878 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
898 if (nflash_poll(sih, cc) < 0)
911 nflash_readoob(si_t *sih, chipcregs_t *cc, uint64 offset, uint len, uchar *buf)
919 ASSERT(sih);
925 osh = si_osh(sih);
929 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
945 if (nflash_poll(sih, cc) < 0)
969 nflash_writeoob(si_t *sih, chipcregs_t *cc, uint64 offset, uint len, uchar *buf)
977 ASSERT(sih);
983 osh = si_osh(sih);
987 if (CHIPID(sih->chip) == BCM4706_CHIP_ID) {
1021 if (nflash_poll(sih, cc) < 0)
1024 if (nflash_readst(sih, cc, &status) != 0)