Support for RTL838x based managed switches

Oh, no, the reset bug on the 838x platform is back. This is bad, because it depends on the device you are using. The strange PLL message is there to help you understand what is going on.

What is happening is the following: The Flash on this platform can be addressed in a 3 or with a 4 byte wide mode. It depends on the type of flash being used, in particular its size. The flash driver once Linux is running can basically do whatever it wants, but U-Boot expects a certain state when it boots up and tries to read the flash. Interestingly, the reset does not reset the 3/4-byte mode and PLL upon reset (there are other things you can mess up which will prevent the device from booting even after the reset, I have found quite a few by accident). So you see this reset and then nothing happens any longer, because the reset happened, it is only u-boot that gets stuck and cannot boot.

The original flash driver carefully tried to avoid this effect together with the reset code. Because it depends on the device, you can easily fix it for one type and break it for another. It took a lot of time and effort from several developers to find a solution that actually worked on all devices. The new flash driver looks suspiciously free of the 3/4 byte hacks that were being used...

2 Likes