Page MenuHomeFreeBSD

fixed amd type flash write opration and diaplay chip infomation at boot
ClosedPublic

Authored by yamori813_yahoo.co.jp on Feb 9 2018, 4:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 2:15 PM
Unknown Object (File)
Thu, Nov 7, 2:15 PM
Unknown Object (File)
Oct 1 2024, 8:41 PM
Unknown Object (File)
Oct 1 2024, 5:46 AM
Unknown Object (File)
Sep 26 2024, 9:34 PM
Unknown Object (File)
Sep 19 2024, 9:45 PM
Unknown Object (File)
Sep 17 2024, 7:13 AM
Unknown Object (File)
Sep 8 2024, 7:41 AM

Details

Summary

amd type flash that is mx chip can't update correctly.
This is fixed by datasheet method.

Test Plan

AR9132 with AMD chip and RT3050 with MX chip
write data by dd command then read data check md5 value.

cfi0: Manufacturer ID:1 Device ID:227e
cfi0: Manufacturer ID:c2 Device ID:22a8

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14893
Build 15005: arc lint + arc unit

Event Timeline

Current code is very dangerous because of doing sector erase to address 0. 0 is boot sector in mips. Almost system is sector 0 is protected then no effect. I see Juniper not tested this code on AMD type flash.

imp added inline comments.
sys/dev/cfi/cfi_core.c
513

This should be a bool function. It returns true/false over whether the erase succeeded / failed.

810

why are we doing the read-back with interrupts enabled?

I think this looks good now.

This revision is now accepted and ready to land.Jun 14 2018, 1:53 PM

I will compile commit this review.

This revision was automatically updated to reflect the committed changes.