Difference between revisions of "User:Asl:mainline-kernel Mainline kernel patchs"

From BubbaWiki
Jump to: navigation, search
(Created page with 'The following three patches add support for the Bubb3 mini server to linux-2.6.38-rc8. Media:0001-Kirkwood-Add-support-for-Excito-s-B3-miniserver.patch<br>[[Media:0002-phy-...')
(No difference)

Latest revision as of 16:10, 14 March 2011

The following three patches add support for the Bubb3 mini server to linux-2.6.38-rc8.


These three patches are based on the work of Tor Krill <tor@excito.com> who made available a patch for 2.6.37.

The three LEDs which make up the front panel light uses the normal LED sys class driver. They are available in /sys/class/leds as bubba3:blue:active, bubba3:green:programming, bubba3:red:error. eg, to turn on the red LED:

echo 1 > /sys/class/leds/bubba3\:red\:error/brightness

Since they are normal linux LEDs other things can be done with them, eg:

echo timer > /sys/class/leds/bubba3\:red\:error/trigger
echo 100 > /sys/class/leds/bubba3\:red\:error/delay_on

which uses hardware to flash the red LED at 5Hz.
No attempt has been made to make use of the one-wire LED controller. The patch from Tor puts this into passthrough mode, however the patches here do not. Either my hardware does not have this device, or the Uboot bootloader is putting the device into passthrough mode.

The LED class driver has also been bent a bit to control the 4KHz buzzer. This is available as /sys/class/leds/bubba3:buzzer. Thus novel things like this work:

echo heartbeat > /sys/class/leds/bubba3\:buzzer/trigger

The hardware revision is read from the hardware at boot time using three GPIO lines. It can be seen in /proc/cpuinfo

Hardware    : BUBBA3 Kirkwood based miniserver
Revision    : 0001

Since i don't have the needed tools to open the box, i cannot verify if this actually makes sense. Hopefully somebody for Excito can check the code.

The second patch is not specific to the B3. It adds support for the Marvell ethernet PHY. This is just a straight copy from Tors' patch.

The third patch extends the Marvell PHY driver to handle the inverted LEDs the B3 has. This has been implemented differently than Tors patch, it uses the generic phy_register_fixup functions to register a handler which is called when the phy is initialsed. This then sets a device flag which is used by the PHY driver when initializing the PHY configuration.

The patches are checkpatch and sparse clean.

All that is needed now is a Signed-off-by: for Tor and then they can be submitted upstream for review. If we are luck they might make 2.6.39, but 2.6.40 seems more likely.