[PATCH v4 0/5(7)] OMAP1: Amstrad Delta: add FIQ based support for external keyboard

Janusz Krzysztofik jkrzyszt at tis.icnet.pl
Tue Apr 27 20:52:56 EDT 2010


This series of patches adds support for an external keyboard (called 
mailboard) connected to the Amstrad Delta (E3) videophone.

The series is based on a patch by Matt Callow, created against
linux-omap-2.6.19[1], initially submitted to the e3-hacking mailing list in
April 2006[2].

Since the keyboard serial clock line is connected to a GPIO input, it 
generates interrupts every single bit received. In order to handle this 
correctly, the code makes use of a FIQ hardware feature. Since all GPIO 
generated interrupts would be converted to FIQ, the handler must include 
support for all supported GPIO connected devices: the keyboard, a modem and a 
hook switch.

My initial modifications to the original patch included:
- split into several patches,
- refresh against a recent linux version,
- a lot of cleanups, mainly to get rid of checkpatch reported issues,
- add support for handling interrupts generated by a GPIO line that the 
  meanwhile activated hook switch hangs off.
v2 changes:
- remove scan code to key code mapping from the serio driver, that doesn't 
  belong here and should be set up from userspace; thanks to Dmitry Torokhov 
  for advising this[3],
- no funtional changes in FIQ part (there were no comments in round 1).
v3 changes:
- cleanups suggested by Dmitry[4] (applied not only to serio bits),
- assembly code optimizations suggested by Ralph Corderoy[5],
- (re)use existing header file provided macros where applicable instead of 
  defining new; remove a lot of unnecessary defines,
- extract missing FIQ_START definition fix into an extra patch number 
  0.1/5(7),
- modify both fiq and deferred_fiq handlers to follow default OMAP GPIO 
  interrupt processing path more closely,
- update board initialization code for complete modem IRQ GPIO line setup; 
  this appeared essential for correct interaction with optimized FIQ handler; 
  the change is provided as a separate patch number 2.1/5(7),
- use IRQ12 (reserved on OMAP1510) for requesting deferred_fiq handler instead 
  of TIMER32k dedicated IRQ,
- more optimizations in both assembly and C code,
- modify serio Kconfig for automatic AT keyboard and FIQ handler selection,
- drop intermediate defconfig changes.
v4 changes:
- changes requested by Dmitry for his Ack to be valid[6],
- correct a few occurrences of 2nd argumet missing in 3-argument assembly 
  instruction, thanks to Ralph Corderoy for pointing them out,
- remove commented out code for interrupt active edge toggling, but keep the 
  updated comment that justifies the removal.

Created and tested against linux-omap master, 
commit 104a77440f05430f29f9d3f4ecb88c1536819585 dated 2010-04-27.

Compile tested with a bunch of OMAP15XX/OMAP16XX boards selected 
simultaneously, as requested by Tony[7].

Janusz Krzysztofik(7)
	OMAP: add missing FIQ_START definition required for arch/arm/kernel/fiq.c 
			compilation
	OMAP1: Amstrad Delta: add FIQ handler for serial keyboard port interrupt
			processing
	OMAP1: Amstrad Delta: add a handler for processing interrupts generated by
			the FIQ routine
	OMAP1: Amstrad Delta: update board initialization code for complete modem IRQ 
			GPIO line setup
	OMAP1: Amstrad Delta: use FIQ for processing GPIO interrupts
	input: serio: add support for Amstrad Delta serial keyboard port
	OMAP1: Amstrad Delta: modify defconfig for external keyboard support

 arch/arm/configs/ams_delta_defconfig             |    1
 arch/arm/mach-omap1/Kconfig                      |   10
 arch/arm/mach-omap1/Makefile                     |    3
 arch/arm/mach-omap1/ams-delta-fiq-handler.S      |  278 +++++++++++++++++++++++
 arch/arm/mach-omap1/ams-delta-fiq.c              |  155 ++++++++++++
 arch/arm/mach-omap1/board-ams-delta.c            |   18 +
 arch/arm/mach-omap1/include/mach/ams-delta-fiq.h |   79 ++++++
 arch/arm/plat-omap/include/plat/irqs.h           |    4
 drivers/input/serio/Kconfig                      |   16 +
 drivers/input/serio/Makefile                     |    1
 drivers/input/serio/ams_delta_serio.c            |  177 ++++++++++++++
 11 files changed, 740 insertions(+), 2 deletions(-)

Thanks,
Janusz

[1] http://the.earth.li/pub/e3/2.6.19/ams-delta-keyboard.patch
[2] http://www.earth.li/pipermail/e3-hacking/2006-April/000453.html
[3] http://www.spinics.net/lists/linux-input/msg07690.html
[4] http://www.spinics.net/lists/linux-input/msg07762.html
[5] http://www.spinics.net/lists/linux-omap/msg27373.html
[6] http://www.spinics.net/lists/linux-input/msg08093.html
[7] http://www.spinics.net/lists/linux-omap/msg28535.html



More information about the linux-arm-kernel mailing list