]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.
authorloos <loos@FreeBSD.org>
Mon, 12 Jan 2015 03:23:16 +0000 (03:23 +0000)
committerloos <loos@FreeBSD.org>
Mon, 12 Jan 2015 03:23:16 +0000 (03:23 +0000)
commit8e5fb35624be57a7cb25a227750de7adca8749c2
tree0ec3429f5b8a8f2c52c272a1bf835ffe28e584a9
parent17bc7b87655a451570af2ed2287b971871cbc909
Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.

To cut off the power we need to start the shutdown sequence by writing
the OFF bit on PMIC.

Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE
pin when it is ready for the PMIC to cut off the power.  This is done by
triggering the ALARM2 interrupt on SoC RTC.

The RTC driver only works in power management mode which means it won't
provide any kind of time keeping functionality.  It only implements a way
to trigger the ALARM2 interrupt when requested.

Differential Revision: https://reviews.freebsd.org/D1489
Reviewed by: rpaulo
MFC after: 2 weeks
sys/arm/conf/BEAGLEBONE
sys/arm/ti/am335x/am335x_pmic.c
sys/arm/ti/am335x/am335x_prcm.c
sys/arm/ti/am335x/am335x_rtc.c [new file with mode: 0644]
sys/arm/ti/am335x/am335x_rtcreg.h [new file with mode: 0644]
sys/arm/ti/am335x/am335x_rtcvar.h [new file with mode: 0644]
sys/arm/ti/am335x/files.am335x
sys/arm/ti/ti_prcm.h
sys/boot/fdt/dts/arm/am335x.dtsi