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)
Feb 11 2024, 9:24 PM
Unknown Object (File)
Jan 25 2024, 3:24 PM
Unknown Object (File)
Jan 25 2024, 3:19 PM
Unknown Object (File)
Dec 23 2023, 8:48 PM
Unknown Object (File)
Dec 20 2023, 2:53 AM
Unknown Object (File)
Dec 12 2023, 9:26 PM
Unknown Object (File)
Nov 17 2023, 6:31 AM
Unknown Object (File)
Nov 15 2023, 9:23 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 15930
Build 15922: 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
544

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

811

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.