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)
Wed, Dec 11, 6:03 PM
Unknown Object (File)
Sat, Dec 7, 10:44 PM
Unknown Object (File)
Tue, Nov 26, 1:02 PM
Unknown Object (File)
Nov 7 2024, 2:15 PM
Unknown Object (File)
Nov 7 2024, 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

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 โ†—(On Diff #39083)

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

810 โ†—(On Diff #39083)

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.