The CS5535/6 Multifunction super-i/o chip has various subsystems built-in:

GPIO
I2C
IDE/ATA
high-precision timers
watchdog timer
etc.

This patch increases the functionality exposed by this chipset.

Signed-off-by: Philip Prindeville <phil...@redfish-solutions.com>
Index: target/linux/x86/alix2/config-default
===================================================================
--- target/linux/x86/alix2/config-default       (revision 26907)
+++ target/linux/x86/alix2/config-default       (working copy)
@@ -40,3 +40,4 @@
 CONFIG_X86_TSC=y
 CONFIG_X86_USE_3DNOW=y
 CONFIG_X86_USE_PPRO_CHECKSUM=y
+# CS5535_CLOCK_EVENT_SRC is not set
Index: target/linux/x86/alix2/target.mk
===================================================================
--- target/linux/x86/alix2/target.mk    (revision 26907)
+++ target/linux/x86/alix2/target.mk    (working copy)
@@ -1,11 +1,12 @@
 BOARDNAME:=PCEngines alix2
 FEATURES:=squashfs pci usb gpio
 ALIX2_GPIO = $(if $(findstring 
2.6.32,$(LINUX_VERSION)),gpio-cs5535,gpio-cs5535-new)
-DEFAULT_PACKAGES += kmod-ata-via-sata \
+DEFAULT_PACKAGES += \
                        kmod-crypto-hw-geode kmod-crypto-ocf \
                        kmod-$(ALIX2_GPIO) kmod-gpio-nsc \
                        kmod-wdt-geode kmod-hwmon-core kmod-hwmon-lm90 \
                        kmod-via-rhine kmod-leds-alix \
+                       kmod-cs5536 kmod-pata-cs5536 \
                        kmod-i2c-core kmod-i2c-gpio \
                        kmod-i2c-algo-bit kmod-i2c-algo-pca kmod-i2c-algo-pcf \
                        kmod-i2c-scx200-acb \
Index: target/linux/x86/config-default
===================================================================
--- target/linux/x86/config-default     (revision 26907)
+++ target/linux/x86/config-default     (working copy)
@@ -271,7 +271,7 @@
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PAGE_OFFSET=0xC0000000
 # CONFIG_PARAVIRT_GUEST is not set
-CONFIG_PATA_AMD=y
+# CONFIG_PATA_AMD is not set
 CONFIG_PATA_MPIIX=y
 CONFIG_PATA_OLDPIIX=y
 CONFIG_PATA_SC1200=y
Index: target/linux/x86/generic/config-default
===================================================================
--- target/linux/x86/generic/config-default     (revision 26907)
+++ target/linux/x86/generic/config-default     (working copy)
@@ -54,6 +54,7 @@
 # CONFIG_MOUSE_VSXXXAA is not set
 CONFIG_PATA_LEGACY=y
 CONFIG_PATA_PLATFORM=y
+CONFIG_PATA_AMD=y
 CONFIG_PCIEAER=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_VT=y
Index: target/linux/x86/geos/config-default
===================================================================
--- target/linux/x86/geos/config-default        (revision 26907)
+++ target/linux/x86/geos/config-default        (working copy)
@@ -28,3 +28,4 @@
 CONFIG_X86_USE_3DNOW=y
 CONFIG_X86_USE_PPRO_CHECKSUM=y
 CONFIG_GPIOLIB=y
+# CS5535_CLOCK_EVENT_SRC is not set
Index: target/linux/x86/geos/target.mk
===================================================================
--- target/linux/x86/geos/target.mk     (revision 26907)
+++ target/linux/x86/geos/target.mk     (working copy)
@@ -6,6 +6,7 @@
             kmod-$(GEOS_GPIO) \
             kmod-wdt-geode kmod-hwmon-core kmod-hwmon-lm90 \
             kmod-8139cp kmod-solos-pci \
+            kmod-cs5536 kmod-pata-cs5536 \
             kmod-i2c-core kmod-i2c-gpio \
             kmod-i2c-algo-bit kmod-i2c-algo-pca kmod-i2c-algo-pcf \
             kmod-usb-core kmod-usb2 kmod-usb-uhci \
Index: package/kernel/modules/other.mk
===================================================================
--- package/kernel/modules/other.mk     (revision 26907)
+++ package/kernel/modules/other.mk     (working copy)
@@ -514,7 +514,7 @@
 define KernelPackage/wdt-geode
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Geode/LX Watchdog timer
-  DEPENDS:=@TARGET_x86
+  DEPENDS:=@TARGET_x86 +kmod-cs5535-mfgpt
   KCONFIG:=CONFIG_GEODE_WDT
   FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/geodewdt.ko
   AUTOLOAD:=$(call AutoLoad,50,geodewdt)
@@ -527,6 +527,38 @@
 $(eval $(call KernelPackage,wdt-geode))
 
 
+define KernelPackage/cs5535-clockevt
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=CS5535/CS5536 high-res timer (MFGPT) events
+  DEPENDS:=@TARGET_x86 +kmod-cs5535-mfgpt
+  KCONFIG:=CONFIG_CS5535_CLOCK_EVENT_SRC
+  FILES:=$(LINUX_DIR)/drivers/misc/cs5535-clockevt.ko
+  AUTOLOAD:=$(call AutoLoad,45,cs5535-clockevt)
+endef
+
+define KernelPackage/cs5535-clockevt/description
+  Kernel module for CS5535/6 high-res clock event source
+endef
+
+$(eval $(call KernelPackage,cs5535-clockevt))
+
+
+define KernelPackage/cs5535-mfgpt
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=CS5535/6 Multifunction General Purpose Timer
+  DEPENDS:=@TARGET_x86
+  KCONFIG:=CONFIG_CS5535_MFGPT
+  FILES:=$(LINUX_DIR)/drivers/misc/cs5535-mfgpt.ko
+  AUTOLOAD:=$(call AutoLoad,45,cs5535-mfgpt)
+endef
+
+define KernelPackage/cs5535-mfgpt/description
+  Kernel module for CS5535/6 multifunction general purpose timer.
+endef
+
+$(eval $(call KernelPackage,cs5535-mfgpt))
+
+
 define KernelPackage/wdt-omap
   SUBMENU:=$(OTHER_MENU)
   TITLE:=OMAP Watchdog timer
Index: package/kernel/modules/block.mk
===================================================================
--- package/kernel/modules/block.mk     (revision 26907)
+++ package/kernel/modules/block.mk     (working copy)
@@ -471,6 +471,70 @@
 $(eval $(call KernelPackage,ide-it821x))
 
 
+define KernelPackage/cs5535
+  TITLE:=NSC/AMD CS5535 chipset support
+  DEPENDS:=@TARGET_x86
+  KCONFIG:=CONFIG_BLK_DEV_CS5535
+  FILES=$(LINUX_DIR)/drivers/ide/cs5535.ko
+  AUTOLOAD:=$(call AutoLoad,30,cs5535,1)
+  $(call AddDepends/ide)
+endef
+
+define KernelPackage/cs5535/description
+  Kernel module for the NSC/AMD CS5535 companion chip
+endef
+
+$(eval $(call KernelPackage,cs5535))
+
+
+define KernelPackage/cs5536
+  TITLE:=AMD CS5536 chipset support
+  DEPENDS:=@TARGET_x86
+  KCONFIG:=CONFIG_BLK_DEV_CS5536
+  FILES=$(LINUX_DIR)/drivers/ide/cs5536.ko
+  AUTOLOAD:=$(call AutoLoad,30,cs5536,1)
+  $(call AddDepends/ide)
+endef
+
+define KernelPackage/cs5536/description
+  Kernel module for the AMD CS5536 Geode LX companion chip
+endef
+
+$(eval $(call KernelPackage,cs5536))
+
+
+define KernelPackage/pata-cs5535
+  TITLE:=CS5535 PATA support
+  DEPENDS:=@TARGET_x86 @PCI_SUPPORT
+  KCONFIG:=CONFIG_PATA_CS5535
+  FILES=$(LINUX_DIR)/drivers/ata/pata-cs5535.ko
+  AUTOLOAD:=$(call AutoLoad,30,pata-cs5535,1)
+  $(call AddDepends/ata)
+endef
+
+define KernelPackage/cs5535/description
+  Kernel module for the NSC/AMD CS5535 companion chip
+endef
+
+$(eval $(call KernelPackage,cs5535))
+
+
+define KernelPackage/pata-cs5536
+  TITLE:=CS5536 PATA support
+  DEPENDS:=@TARGET_x86 @PCI_SUPPORT
+  KCONFIG:=CONFIG_PATA_CS5536
+  FILES=$(LINUX_DIR)/drivers/ata/pata-cs5536.ko
+  AUTOLOAD:=$(call AutoLoad,30,pata-cs5536,1)
+  $(call AddDepends/ata)
+endef
+
+define KernelPackage/cs5536/description
+  Kernel module for the AMD CS5536 Geode LX companion chip
+endef
+
+$(eval $(call KernelPackage,cs5536))
+
+
 define KernelPackage/libsas
   SUBMENU:=$(BLOCK_MENU)
   TITLE:=SAS Domain Transport Attributes
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to