Differences
This shows you the differences between the selected revision and the current version of the page.
howto:enable_disk_leds_in_mainline_kernel 2008/10/07 16:09 | howto:enable_disk_leds_in_mainline_kernel 2017/09/06 18:38 current | ||
---|---|---|---|
Line 1: | Line 1: | ||
It appears that blue disk leds are not blinking in mainline kernels (tried 2.6.26). To fix that, you'll need to change GPIO setting in drivers/ata/sata_mv.c: | It appears that blue disk leds are not blinking in mainline kernels (tried 2.6.26). To fix that, you'll need to change GPIO setting in drivers/ata/sata_mv.c: | ||
- | ''static void mv6_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio) \\ | + | <code> |
- | {\\ | + | static void mv6_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio) |
- | #if 0\\ | + | { |
- | writel(0x00000060, mmio + MV_GPIO_PORT_CTL_OFS);\\ | + | #if 0 |
- | #else\\ | + | writel(0x00000060, mmio + MV_GPIO_PORT_CTL_OFS); |
- | writel(0x00000050, mmio + MV_GPIO_PORT_CTL_OFS);\\ | + | #else |
- | #endif\\ | + | writel(0x00000050, mmio + MV_GPIO_PORT_CTL_OFS); |
- | }\\ | + | #endif |
- | '' | + | } |
+ | </code> | ||
+ | |||
+ | |||
+ | Code has been commited in linux-2.6 main git tree as seen here http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a88656553d18c324554855fccc730c9644048111. | ||
+ | So LED will soon be controllable from userland. **Expected in 2.6.31** | ||
+ | |||
+ | discussion with Erik Benada explaining that : | ||
+ | |||
+ | <code> | ||
+ | with conversion of Orion architecture to gpiolib it is now possible to | ||
+ | turn off power LED blinking from userspace - eg. after booting is | ||
+ | finished. You can also turn on power LED blinking before you shut down the system to let user know system is going down. | ||
+ | |||
+ | To turn off power LED blinking after booting is finished: | ||
+ | echo 1 > /sys/class/gpio/gpio3/value | ||
+ | |||
+ | To turn on power LED blinking before shutdown/reboot: | ||
+ | echo 1 > /sys/class/gpio/gpio4/value | ||
+ | </code> | ||
+ | |||
+ | Disk access leds still don't work properly in 2.6.32... | ||
+ | Following code configures SATA gpio, not ARM gpio | ||
+ | writel(0x00000050, mmio + MV_GPIO_PORT_CTL_OFS); |