The following issues are addressed by this patch:
CPU Detection - Included in OpenWrt, tested
RDC cpu type is correctly detected and will appear in /proc/cpuinfo. Without the patch, some 2.6.30.X kernels fail to boot, and will Ooops in the CPU detection code.
/ # cat /proc/cpuinfo
processor : 0
vendor_id : RDC
cpu family : 4
model : 0
model name : S3282/CodeTek
stepping : unknown
fdiv_bug : yes
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : no
fpu_exception : no
cpuid level : -1
wp : yes
bogomips : 56.44
clflush size : 32
Generic GPIO support - Included in OpenWrt, tested
GPIO support has been added, and uses the sysfs mechanism.
1-wire support - Included in OpenWrt, untested
To specify that a 1-wire device should be on pin 12 ensure w1-gpio-custom module is compiled into the kernel and add the following to the command-line:
Bear in mind that at 3.3v the pull-up resistor needs to be a maximum of 2.2K to ensure sufficient current is supplied to w1 parasitic devices during operation (assuming parasitic powered).
i2c support - Included in OpenWrt, untested
i2c-gpio-custom module allows the GPIO pin configuration to be specified on the kernel command-line. To specify that an i2c device has SDA on pin 12 and SCL on pin 9, add the following to the Biffboot command-line (or compile it in):
MMC-over-GPIO Support - Included in OpenWrt, untested
MMC via SPI-over-GPIO can be configured via the gpiommc module. This requires the kernel to have support for configfs. GPIO pins for this are configured by writing to various files under /config/gpiommc/, see the file Documentation/gpiommc.txt for the details.
R6040 2nd Ethernet NIC detection - Included in OpenWrt (if in a rather 'ugly' form), tested
RDC chips contain 2 NICs, however on the Bifferboard only one is wired. The patch prevents detection of the 2nd nic, effectively giving up after it has found one, which avoids a non-functioning eth1 device appearing, and also saving a bit of memory.
(EXPERIMENTAL) Flash memory read/write access via /config/biffconfig - Not yet in OpenWrt, see these instructions for an interim solution.
A driver has been written to allow access to the Bios config block. The driver uses the configfs mechanism, to allow read or modification of Biffboot parameters. To use it you must include configfs support in your kernel, and also mount the config file system at boot, e.g.:
mount -t configfs configfs /config
Under /config/bifferboard you will find a series of files. Modifiy the files by echoing new strings to them, and when done echo something (anything) to the file called 'commit'.
Software watchdog - Not in OpenWrt
When using a software watchdog invalid op-code can result from the fact that Linux performs a somewhat naive check for the presence of VMX, using the cpuid instruction, before attempting to shut it down. The code should probably toggle the ID bit in the proper manner to determine presence of cpuid, and, in cases where it's missing simply report vmx as not being available. This patch simply #ifdefs out the check for RDC cpus.
Hardware Watchdog - Included in OpenWrt, different interface, untested
Most RDC BIOSes, (including Redboot) initialise Southbridge such that PCIRST_n is 'inactive'. This means that some extra work is required in reboot fixups to enable this line in order to get a reboot. The comments in reboot_fixups_32.c concerning the watchdog timer are incorrect. The code in rdc321x_reset() in fact simply enables PCIRST_n such that the following outb(1, 0x92) takes effect. A similar fix is required in order for the hardware watchdog to trigger. In this patch PCIRST_n is enabled when the hardware watchdog driver is activated.
Note: the test program below is not appropriate for OpenWrt, find the one in the kernel sources instead.
Kexec kernel relocation - Not in OpenWrt
The kexec system call results in references to CR4, which is not available on RDC chips (or any 386/486 CPUs). This results in an illegal instruction when kexec is attempted, and a probable reboot. This patch removes the CR4 references when CONFIG_X86_RDC321X is defined.
MCE, Machine Check Exception - OpenWrt uses the correct config when using RDC321x/Bifferboard profile.
According to the Linux kernel documentation, the check for MCE capability can be avoided by passing 'nomce' to on the kernel command-line. This doesn't seem to work. The only work-around is to disable CONFIG_X86_MCE in the kernel config.
Affected Kernels: 184.108.40.206. Not tested on later kernels.