kirkwood: Add Marvell RTC to all machines with nothing else

The Kirkwood SoCs all have an onchip RTC that can hold the time
over e.g. a reboot which will help if no NTP servers are available.

Create a kernel module package for the Marvell RTC, and add it to
all Kirkwood devices that do not have their own discrete
battery-backed RTC. Adding it to platforms with a proper RTC
is just surplus.

All Kirkwoods have at least one RTC so add RTC to the features
list for Kirkwood as well.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Linus Walleij 2024-02-23 08:23:47 +01:00 committed by Hauke Mehrtens
parent 09be63de70
commit ef34f8f5b5
3 changed files with 35 additions and 14 deletions

View file

@ -578,6 +578,23 @@ endef
$(eval $(call KernelPackage,rtc-isl1208)) $(eval $(call KernelPackage,rtc-isl1208))
define KernelPackage/rtc-mv
SUBMENU:=$(OTHER_MENU)
TITLE:=Marvell SoC RTC support
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
KCONFIG:=CONFIG_RTC_DRV_MV \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-mv.ko
AUTOLOAD:=$(call AutoProbe,rtc-mv)
endef
define KernelPackage/rtc-mv/description
Kernel module for Marvell SoC RTC.
endef
$(eval $(call KernelPackage,rtc-mv))
define KernelPackage/rtc-pcf8563 define KernelPackage/rtc-pcf8563
SUBMENU:=$(OTHER_MENU) SUBMENU:=$(OTHER_MENU)
TITLE:=Philips PCF8563/Epson RTC8564 RTC support TITLE:=Philips PCF8563/Epson RTC8564 RTC support

View file

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
ARCH:=arm ARCH:=arm
BOARD:=kirkwood BOARD:=kirkwood
BOARDNAME:=Marvell Kirkwood BOARDNAME:=Marvell Kirkwood
FEATURES:=usb nand squashfs ramdisk FEATURES:=rtc usb nand squashfs ramdisk
CPU_TYPE:=xscale CPU_TYPE:=xscale
SUBTARGETS:=generic SUBTARGETS:=generic

View file

@ -105,7 +105,7 @@ define Device/cisco_on100
KERNEL_IN_UBI := KERNEL_IN_UBI :=
UBINIZE_OPTS := -E 5 UBINIZE_OPTS := -E 5
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
DEVICE_PACKAGES := kmod-mvsdio DEVICE_PACKAGES := kmod-mvsdio kmod-rtc-mv
SUPPORTED_DEVICES += on100 SUPPORTED_DEVICES += on100
endef endef
TARGET_DEVICES += cisco_on100 TARGET_DEVICES += cisco_on100
@ -114,6 +114,7 @@ define Device/cloudengines_pogoe02
DEVICE_VENDOR := Cloud Engines DEVICE_VENDOR := Cloud Engines
DEVICE_MODEL := Pogoplug E02 DEVICE_MODEL := Pogoplug E02
DEVICE_DTS := kirkwood-pogo_e02 DEVICE_DTS := kirkwood-pogo_e02
DEVICE_PACKAGES := kmod-rtc-mv
SUPPORTED_DEVICES += pogo_e02 SUPPORTED_DEVICES += pogo_e02
endef endef
TARGET_DEVICES += cloudengines_pogoe02 TARGET_DEVICES += cloudengines_pogoe02
@ -123,7 +124,7 @@ define Device/cloudengines_pogoplugv4
DEVICE_MODEL := Pogoplug V4 DEVICE_MODEL := Pogoplug V4
DEVICE_DTS := kirkwood-pogoplug-series-4 DEVICE_DTS := kirkwood-pogoplug-series-4
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 \ DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 \
kmod-gpio-button-hotplug kmod-gpio-button-hotplug kmod-rtc-mv
endef endef
TARGET_DEVICES += cloudengines_pogoplugv4 TARGET_DEVICES += cloudengines_pogoplugv4
@ -145,7 +146,7 @@ define Device/endian_4i-edge-200
DEVICE_MODEL := 4i Edge 200 DEVICE_MODEL := 4i Edge 200
DEVICE_ALT0_VENDOR := Endian DEVICE_ALT0_VENDOR := Endian
DEVICE_ALT0_MODEL := UTM Mini Firewall DEVICE_ALT0_MODEL := UTM Mini Firewall
DEVICE_PACKAGES := kmod-ath9k kmod-mvsdio wpad-basic-mbedtls DEVICE_PACKAGES := kmod-ath9k kmod-mvsdio wpad-basic-mbedtls kmod-rtc-mv
KERNEL_SIZE := 4096k KERNEL_SIZE := 4096k
IMAGES := sysupgrade.bin IMAGES := sysupgrade.bin
endef endef
@ -154,13 +155,14 @@ TARGET_DEVICES += endian_4i-edge-200
define Device/globalscale_sheevaplug define Device/globalscale_sheevaplug
DEVICE_VENDOR := Globalscale DEVICE_VENDOR := Globalscale
DEVICE_MODEL := Sheevaplug DEVICE_MODEL := Sheevaplug
DEVICE_PACKAGES := kmod-mvsdio DEVICE_PACKAGES := kmod-mvsdio kmod-rtc-mv
endef endef
TARGET_DEVICES += globalscale_sheevaplug TARGET_DEVICES += globalscale_sheevaplug
define Device/iom_iconnect-1.1 define Device/iom_iconnect-1.1
DEVICE_VENDOR := Iomega DEVICE_VENDOR := Iomega
DEVICE_MODEL := Iconnect DEVICE_MODEL := Iconnect
DEVICE_PACKAGES := kmod-rtc-mv
DEVICE_DTS := kirkwood-iconnect DEVICE_DTS := kirkwood-iconnect
SUPPORTED_DEVICES += iconnect SUPPORTED_DEVICES += iconnect
endef endef
@ -171,7 +173,7 @@ define Device/iom_ix2-200
DEVICE_MODEL := StorCenter ix2-200 DEVICE_MODEL := StorCenter ix2-200
DEVICE_DTS := kirkwood-iomega_ix2_200 DEVICE_DTS := kirkwood-iomega_ix2_200
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \ DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
kmod-gpio-button-hotplug kmod-hwmon-lm63 kmod-gpio-button-hotplug kmod-hwmon-lm63 kmod-rtc-mv
PAGESIZE := 512 PAGESIZE := 512
SUBPAGESIZE := 256 SUBPAGESIZE := 256
BLOCKSIZE := 16k BLOCKSIZE := 16k
@ -189,7 +191,7 @@ define Device/iom_ix4-200d
DEVICE_MODEL := StorCenter ix4-200d DEVICE_MODEL := StorCenter ix4-200d
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \ DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
kmod-gpio-button-hotplug kmod-gpio-nxp-74hc164 \ kmod-gpio-button-hotplug kmod-gpio-nxp-74hc164 \
kmod-hwmon-adt7475 kmod-mvsdio kmod-spi-gpio kmod-hwmon-adt7475 kmod-mvsdio kmod-spi-gpio kmod-rtc-mv
PAGESIZE := 512 PAGESIZE := 512
SUBPAGESIZE := 256 SUBPAGESIZE := 256
BLOCKSIZE := 16k BLOCKSIZE := 16k
@ -207,7 +209,7 @@ define Device/iptime_nas1
DEVICE_MODEL := NAS1 DEVICE_MODEL := NAS1
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \ DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
kmod-gpio-button-hotplug kmod-gpio-pca953x kmod-hwmon-drivetemp \ kmod-gpio-button-hotplug kmod-gpio-pca953x kmod-hwmon-drivetemp \
kmod-hwmon-gpiofan kmod-usb-ledtrig-usbport -uboot-envtools kmod-hwmon-gpiofan kmod-usb-ledtrig-usbport kmod-rtc-mv -uboot-envtools
KERNEL := $$(KERNEL) | iptime-naspkg nas1 KERNEL := $$(KERNEL) | iptime-naspkg nas1
BLOCKSIZE := 256k BLOCKSIZE := 256k
IMAGE_SIZE := 15872k IMAGE_SIZE := 15872k
@ -219,7 +221,8 @@ TARGET_DEVICES += iptime_nas1
define Device/linksys define Device/linksys
DEVICE_VENDOR := Linksys DEVICE_VENDOR := Linksys
DEVICE_PACKAGES := kmod-mwl8k wpad-basic-mbedtls kmod-gpio-button-hotplug DEVICE_PACKAGES := kmod-mwl8k wpad-basic-mbedtls kmod-gpio-button-hotplug \
kmod-rtc-mv
KERNEL_IN_UBI := KERNEL_IN_UBI :=
UBINIZE_OPTS := -E 5 UBINIZE_OPTS := -E 5
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
@ -272,7 +275,7 @@ define Device/raidsonic_ib-nas62x0
DEVICE_VENDOR := RaidSonic DEVICE_VENDOR := RaidSonic
DEVICE_MODEL := ICY BOX IB-NAS62x0 DEVICE_MODEL := ICY BOX IB-NAS62x0
DEVICE_DTS := kirkwood-ib62x0 DEVICE_DTS := kirkwood-ib62x0
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-rtc-mv
SUPPORTED_DEVICES += ib62x0 SUPPORTED_DEVICES += ib62x0
endef endef
TARGET_DEVICES += raidsonic_ib-nas62x0 TARGET_DEVICES += raidsonic_ib-nas62x0
@ -281,7 +284,7 @@ define Device/seagate_blackarmor-nas220
DEVICE_VENDOR := Seagate DEVICE_VENDOR := Seagate
DEVICE_MODEL := Blackarmor NAS220 DEVICE_MODEL := Blackarmor NAS220
DEVICE_PACKAGES := kmod-hwmon-adt7475 kmod-fs-ext4 kmod-ata-marvell-sata \ DEVICE_PACKAGES := kmod-hwmon-adt7475 kmod-fs-ext4 kmod-ata-marvell-sata \
mdadm kmod-gpio-button-hotplug mdadm kmod-gpio-button-hotplug kmod-rtc-mv
PAGESIZE := 512 PAGESIZE := 512
SUBPAGESIZE := 256 SUBPAGESIZE := 256
BLOCKSIZE := 16k BLOCKSIZE := 16k
@ -292,6 +295,7 @@ TARGET_DEVICES += seagate_blackarmor-nas220
define Device/seagate_dockstar define Device/seagate_dockstar
DEVICE_VENDOR := Seagate DEVICE_VENDOR := Seagate
DEVICE_MODEL := FreeAgent Dockstar DEVICE_MODEL := FreeAgent Dockstar
DEVICE_PACKAGES := kmod-rtc-mv
SUPPORTED_DEVICES += dockstar SUPPORTED_DEVICES += dockstar
endef endef
TARGET_DEVICES += seagate_dockstar TARGET_DEVICES += seagate_dockstar
@ -299,7 +303,7 @@ TARGET_DEVICES += seagate_dockstar
define Device/seagate_goflexnet define Device/seagate_goflexnet
DEVICE_VENDOR := Seagate DEVICE_VENDOR := Seagate
DEVICE_MODEL := GoFlexNet DEVICE_MODEL := GoFlexNet
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-rtc-mv
SUPPORTED_DEVICES += goflexnet SUPPORTED_DEVICES += goflexnet
endef endef
TARGET_DEVICES += seagate_goflexnet TARGET_DEVICES += seagate_goflexnet
@ -307,7 +311,7 @@ TARGET_DEVICES += seagate_goflexnet
define Device/seagate_goflexhome define Device/seagate_goflexhome
DEVICE_VENDOR := Seagate DEVICE_VENDOR := Seagate
DEVICE_MODEL := GoFlexHome DEVICE_MODEL := GoFlexHome
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-rtc-mv
SUPPORTED_DEVICES += goflexhome SUPPORTED_DEVICES += goflexhome
endef endef
TARGET_DEVICES += seagate_goflexhome TARGET_DEVICES += seagate_goflexhome
@ -316,7 +320,7 @@ define Device/zyxel_nsa310b
DEVICE_VENDOR := ZyXEL DEVICE_VENDOR := ZyXEL
DEVICE_MODEL := NSA310b DEVICE_MODEL := NSA310b
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-r8169 kmod-fs-ext4 \ DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-r8169 kmod-fs-ext4 \
kmod-gpio-button-hotplug kmod-hwmon-lm85 kmod-gpio-button-hotplug kmod-hwmon-lm85 kmod-rtc-mv
SUPPORTED_DEVICES += nsa310b SUPPORTED_DEVICES += nsa310b
endef endef
TARGET_DEVICES += zyxel_nsa310b TARGET_DEVICES += zyxel_nsa310b