Updated NatSemi SCx200 patches for Linux-2.5
Subsystems (6)
Hi,
my SCx200 patches missed 2.5.40, so I have merged with the latest bitkeeper tree and am trying again.
This patch adds support for the National Semiconductor SCx200 processor family to Linux 2.5. If it looks good, please apply.
The patch consists of the following drivers:
arch/i386/kernel/scx200.c -- give kernel access to the GPIO pins
drivers/chars/scx200_gpio.c -- give userspace access to the GPIO pins drivers/chars/scx200_wdt.c -- watchdog timer driver
drivers/i2c/scx200_i2c.c -- use any two GPIO pins as an I2C bus drivers/i2c/scx200_acb.c -- driver for the Access.BUS hardware
drivers/mtd/maps/scx200_docflash.c -- driver for a CFI flash connected
to the DOCCS pin
The patch is also available as a bitkeeper tre from:
bk pull bk://zoo.weinigel.se/scx200-2.5
I'll try to remember to restart the Bitkeeper daemon if the box reboots for some reason.
/Christer
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.715 -> 1.716
# drivers/mtd/maps/Makefile 1.3 -> 1.4
# drivers/i2c/Makefile 1.4 -> 1.5
# arch/i386/Config.help 1.17 -> 1.18
# arch/i386/kernel/Makefile 1.22 -> 1.23
# drivers/i2c/Config.help 1.1 -> 1.2
# drivers/char/Config.in 1.37.1.1 -> 1.40
# drivers/mtd/maps/Config.help 1.1 -> 1.2
# arch/i386/config.in 1.51 -> 1.52
# include/linux/pci_ids.h 1.60 -> 1.61
# drivers/char/Config.help 1.11.1.1 -> 1.13
# drivers/mtd/maps/Config.in 1.6 -> 1.7
# MAINTAINERS 1.103 -> 1.104
# drivers/char/Makefile 1.37.1.1 -> 1.39
# drivers/i2c/Config.in 1.5 -> 1.7
# (new) -> 1.2 drivers/char/scx200_wdt.c # (new) -> 1.1 drivers/i2c/scx200_acb.c # (new) -> 1.1 include/linux/scx200.h # (new) -> 1.1 drivers/mtd/maps/scx200_docflash.c # (new) -> 1.1 drivers/char/scx200_gpio.c # (new) -> 1.1 include/linux/scx200_gpio.h # (new) -> 1.1 drivers/i2c/scx200_i2c.c # (new) -> 1.1 arch/i386/kernel/scx200.c
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/05 [email protected] 1.716
# Merge weinigel.se:/export/bk/linux-2.5 into weinigel.se:/export/bk/x # --------------------------------------------
#
MAINTAINERS +6 -0
@@ -1433,6 +1433,12 @@ L: [email protected] S: Maintained +SCx200 CPU SUPPORT +P: Christer Weinigel +M: [email protected] +W: http://www.weinigel.se +S: Supported + SGI VISUAL WORKSTATION 320 AND 540 P: Bent Hagemark M: [email protected]
arch/i386/Config.help +9 -0
@@ -1058,3 +1058,12 @@ absence of features. For more information take a look at Documentation/swsusp.txt. + +CONFIG_SCx200 + This provides basic support for the National Semiconductor SCx200 + processor. Right now this is just a driver for the GPIO pins. + + If you don't know what to do here, say N. + + This support is also available as a module. If compiled as a + module, it will be called scx200.o.
arch/i386/config.in +2 -0
@@ -293,6 +293,8 @@ fi fi +tristate 'NatSemi SCx200 support' CONFIG_SCx200 + source drivers/pci/Config.in bool 'EISA support' CONFIG_EISA
arch/i386/kernel/Makefile +3 -0
@@ -29,4 +29,7 @@ EXTRA_AFLAGS := -traditional +export-objs += scx200.o +obj-$(CONFIG_SCx200) += scx200.o + include $(TOPDIR)/Rules.make
arch/i386/kernel/scx200.c new file +128 -0
128 lines not on this page · raw message
drivers/char/Config.help +12 -0
@@ -818,6 +818,12 @@ module, say M here and read <file:Documentation/modules.txt>. Most people will say N. +CONFIG_SCx200_WDT + Enable the built-in watchdog timer support on the National + Semiconductor SCx200 processors. + + If compiled as a module, it will be called scx200_watchdog.o. + CONFIG_MACHZ_WDT If you are using a ZF Micro MachZ processor, say Y here, otherwise N. This is the driver for the watchdog timer builtin on that
@@ -1020,4 +1026,10 @@ The raw driver permits block devices to be bound to /dev/raw/rawN. Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. See the raw(8) manpage for more details. + +CONFIG_SCx200_GPIO + Give userspace access to the GPIO pins on the National + Semiconductor SCx200 processors. + + If compiled as a module, it will be called scx200_gpio.o.
drivers/char/Config.in +3 -0
@@ -131,6 +131,7 @@ tristate ' IB700 SBC Watchdog Timer' CONFIG_IB700_WDT tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO tristate ' Mixcom Watchdog' CONFIG_MIXCOMWD + tristate ' NatSemi SCx200 Watchdog' CONFIG_SCx200_WDT tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT
@@ -192,6 +193,8 @@ if [ "$CONFIG_X86" = "y" ]; then tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE fi + +dep_tristate 'NatSemi SCx200 GPIO Support' CONFIG_SCx200_GPIO $CONFIG_SCx200 tristate ' RAW driver (/dev/raw/rawN)' CONFIG_RAW_DRIVER
drivers/char/Makefile +2 -0
@@ -75,6 +75,7 @@ obj-$(CONFIG_DZ) += dz.o obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o +obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o # Only one watchdog can succeed. We probe the hardware watchdog # drivers first, then the softdog driver. This means if your hardware
@@ -86,6 +87,7 @@ obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o obj-$(CONFIG_IB700_WDT) += ib700wdt.o obj-$(CONFIG_MIXCOMWD) += mixcomwd.o +obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o obj-$(CONFIG_60XX_WDT) += sbc60xxwdt.o obj-$(CONFIG_WDT) += wdt.o obj-$(CONFIG_WDTPCI) += wdt_pci.o
drivers/char/scx200_gpio.c new file +154 -0
154 lines not on this page · raw message
drivers/char/scx200_wdt.c new file +277 -0
277 lines not on this page · raw message
drivers/i2c/Config.help +22 -0
@@ -91,6 +91,28 @@ <file:Documentation/modules.txt>. The module will be called i2c-dev.o. +CONFIG_SCx200_I2C + Enable the use of two GPIO pins of a SCx200 processor as an I2C bus. + + If you don't know what to do here, say N. + + If compiled as a module, it will be called scx200_i2c.o. + +CONFIG_SCx200_I2C_SCL + Enter the GPIO pin number used for the SCL signal. This value can + also be specified with a module parameter. + +CONFIG_SCx200_I2C_SDA + Enter the GPIO pin number used for the SSA signal. This value can + also be specified with a module parameter. + +CONFIG_SCx200_ACB + Enable the use of the ACCESS.bus controllers of a SCx200 processor. + + If you don't know what to do here, say N. + + If compiled as a module, it will be called scx200_acb.o. + CONFIG_I2C_PROC This provides support for i2c device entries in the /proc filesystem. The entries will be found in /proc/sys/dev/sensors.
drivers/i2c/Config.in +6 -0
@@ -13,6 +13,12 @@ dep_tristate ' Philips style parallel port adapter' CONFIG_I2C_PHILIPSPAR $CONFIG_I2C_ALGOBIT $CONFIG_PARPORT dep_tristate ' ELV adapter' CONFIG_I2C_ELV $CONFIG_I2C_ALGOBIT dep_tristate ' Velleman K9000 adapter' CONFIG_I2C_VELLEMAN $CONFIG_I2C_ALGOBIT + dep_tristate ' NatSemi SCx200 I2C using GPIO pins' CONFIG_SCx200_I2C $CONFIG_SCx200 $CONFIG_I2C_ALGOBIT + if [ "$CONFIG_SCx200_I2C" != "n" ]; then + int ' GPIO pin used for SCL' CONFIG_SCx200_I2C_SCL 12 + int ' GPIO pin used for SDA' CONFIG_SCx200_I2C_SDA 13 + fi + dep_tristate ' NatSemi SCx200 ACCESS.bus' CONFIG_SCx200_ACB $CONFIG_I2C fi dep_tristate 'I2C PCF 8584 interfaces' CONFIG_I2C_ALGOPCF $CONFIG_I2C
drivers/i2c/Makefile +2 -0
@@ -15,6 +15,8 @@ obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o obj-$(CONFIG_ITE_I2C_ALGO) += i2c-algo-ite.o obj-$(CONFIG_ITE_I2C_ADAP) += i2c-adap-ite.o +obj-$(CONFIG_SCx200_I2C) += scx200_i2c.o +obj-$(CONFIG_SCx200_ACB) += scx200_acb.o obj-$(CONFIG_I2C_PROC) += i2c-proc.o # This is needed for automatic patch generation: sensors code starts here
drivers/i2c/scx200_acb.c new file +578 -0
578 lines not on this page · raw message
drivers/i2c/scx200_i2c.c new file +156 -0
156 lines not on this page · raw message
drivers/mtd/maps/Config.help +8 -0
@@ -127,6 +127,14 @@ you probably want to enable this mapping driver. More info is at <http://www.itc.hu/>. +CONFIG_MTD_SCx200_DOCFLASH + Enable support for a flash chip mapped using the DOCCS signal on a + National Semiconductor SCx200 processor. + + If you don't know what to do here, say N. + + If compiled as a module, it will be called scx200_docflash.o. + CONFIG_MTD_OCTAGON This provides a 'mapping' driver which supports the way in which the flash chips are connected in the Octagon-5066 Single Board
drivers/mtd/maps/Config.in +1 -0
@@ -26,6 +26,7 @@ dep_tristate ' JEDEC Flash device mapped on Mixcom piggyback card' CONFIG_MTD_MIXMEM $CONFIG_MTD_JEDEC dep_tristate ' JEDEC Flash device mapped on Octagon 5066 SBC' CONFIG_MTD_OCTAGON $CONFIG_MTD_JEDEC dep_tristate ' JEDEC Flash device mapped on Tempustech VMAX SBC301' CONFIG_MTD_VMAX $CONFIG_MTD_JEDEC + dep_tristate ' Flash device mapped with DOCCS on NatSemi SCx200' CONFIG_MTD_SCx200_DOCFLASH $CONFIG_MTD_CFI dep_tristate ' BIOS flash chip on Intel L440GX boards' CONFIG_MTD_L440GX $CONFIG_MTD_JEDEC fi
drivers/mtd/maps/Makefile +1 -0
@@ -24,6 +24,7 @@ obj-$(CONFIG_MTD_NETSC520) += netsc520.o obj-$(CONFIG_MTD_SUN_UFLASH) += sun_uflash.o obj-$(CONFIG_MTD_VMAX) += vmax301.o +obj-$(CONFIG_MTD_SCx200_DOCFLASH)+= scx200_docflash.o obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o obj-$(CONFIG_MTD_OCELOT) += ocelot.o obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
drivers/mtd/maps/scx200_docflash.c new file +268 -0
268 lines not on this page · raw message
include/linux/pci_ids.h +6 -0
@@ -288,6 +288,12 @@#define PCI_DEVICE_ID_NS_87560_USB 0x0012#define PCI_DEVICE_ID_NS_83815 0x0020#define PCI_DEVICE_ID_NS_83820 0x0022 +#define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 +#define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 +#define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 +#define PCI_DEVICE_ID_NS_SCx200_AUDIO 0x0503 +#define PCI_DEVICE_ID_NS_SCx200_VIDEO 0x0504 +#define PCI_DEVICE_ID_NS_SCx200_XBUS 0x0505#define PCI_DEVICE_ID_NS_87410 0xd001#define PCI_VENDOR_ID_TSENG 0x100c
include/linux/scx200.h new file +56 -0
56 lines not on this page · raw message
include/linux/scx200_gpio.h new file +98 -0
98 lines not on this page · raw message
Signature · 5 lines
-- "Just how much can I get away with and still go to heaven?" Freelance consultant specializing in device driver programming for Linux Christer Weinigel <[email protected]> http://www.weinigel.se
Quoted 2 lines · Christer Weinigel
arch/i386/kernel/scx200.c-- give kernel access to the GPIO pins
Would that perhaps be better in arch/i386/kernel/cpu/...