apm821xx: make ata-dwc as a standalone module
authorChristian Lamparter <chunkeey@gmail.com>
Sun, 28 May 2023 19:22:52 +0000 (21:22 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Mon, 29 May 2023 23:58:20 +0000 (01:58 +0200)
In order to cut down on the Netgear WNDR4700, the ata
driver can be outsourced. This helps other apm821xx
devices too to save up on kernel size (~200 kb).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/apm821xx/image/nand.mk
target/linux/apm821xx/modules.mk [new file with mode: 0644]
target/linux/apm821xx/nand/config-default
target/linux/generic/config-5.15
target/linux/generic/config-6.1

index 2848b87719ed92220fde8036a5acee66f8aa6193..2b8abfc22fd9b7d7f933ff0ea3b96d2d5439c54f 100644 (file)
@@ -100,7 +100,7 @@ define Device/netgear_wndr4700
        kmod-dm kmod-fs-ext4 kmod-fs-vfat kmod-usb-ledtrig-usbport \
        kmod-md-mod kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-iso8859-15 \
        kmod-nls-utf8 kmod-usb3 kmod-usb-dwc2 kmod-usb-storage \
-       partx-utils
+       partx-utils kmod-ata-dwc
   BOARD_NAME := wndr4700
   PAGESIZE := 2048
   SUBPAGESIZE := 512
diff --git a/target/linux/apm821xx/modules.mk b/target/linux/apm821xx/modules.mk
new file mode 100644 (file)
index 0000000..98610f9
--- /dev/null
@@ -0,0 +1,13 @@
+define KernelPackage/ata-dwc
+  TITLE:=DesignWare Cores SATA support
+  KCONFIG:=CONFIG_SATA_DWC
+  FILES:=$(LINUX_DIR)/drivers/ata/sata_dwc_460ex.ko
+  AUTOLOAD:=$(call AutoLoad,40,sata_dwc_460ex,1)
+  $(call AddDepends/ata)
+endef
+
+define KernelPackage/ata-dwc/description
+ Platform support for the on-chip SATA controller.
+endef
+
+$(eval $(call KernelPackage,ata-dwc))
index a8ab4fd8920b489834f88c17a720ef0af8f8aa05..7070b34b93d0eeac5abd0bd2b1dec66af9ada1e7 100644 (file)
@@ -2,14 +2,8 @@ CONFIG_AT803X_PHY=y
 CONFIG_AR8216_PHY=y
 # CONFIG_SATA_DWC_OLD_DMA is not set
 CONFIG_IKAREM=y
-CONFIG_ATA=y
-CONFIG_ATA_SFF=y
-CONFIG_ATA_BMDMA=y
 # CONFIG_PCI_DISABLE_COMMON_QUIRKS is not set
-CONFIG_SATA_PMP=y
 CONFIG_GENERIC_PHY=y
-CONFIG_SATA_DWC=y
-# CONFIG_SATA_DWC_DEBUG is not set
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_GPIO_GENERIC=y
index 934af3a7681c283457e408a4487075fcb997d258..0f2f1567288687a12e1443499d84a5d7c23e858e 100644 (file)
@@ -5231,6 +5231,8 @@ CONFIG_RXKAD=y
 # CONFIG_SATA_AHCI is not set
 # CONFIG_SATA_AHCI_PLATFORM is not set
 # CONFIG_SATA_DWC is not set
+# CONFIG_SATA_DWC_DEBUG is not set
+# CONFIG_SATA_DWC_OLD_DMA is not set
 # CONFIG_SATA_FSL is not set
 # CONFIG_SATA_HIGHBANK is not set
 # CONFIG_SATA_HOST is not set
index 7eae9c5d49799dd58a727d5a513dced2c23e55da..94c97f9f54dccd5f8f44fb3d7568258abcbcc406 100644 (file)
@@ -150,6 +150,7 @@ CONFIG_AF_UNIX_OOB=y
 # CONFIG_AHCI_BRCM is not set
 # CONFIG_AHCI_CEVA is not set
 # CONFIG_AHCI_DWC is not set
+# CONFIG_SATA_DWC_OLD_DMA is not set
 # CONFIG_AHCI_IMX is not set
 # CONFIG_AHCI_MVEBU is not set
 # CONFIG_AHCI_QORIQ is not set