[#5299] joystick fails to feel the touch now
Submitted By: Mingquan Pan
Open Date
2009-06-30 04:23:51 Close Date
2009-07-07 06:24:36
Priority:
Medium High Assignee:
Barry Song
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
BF537 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
09r1-rc7
App binary format:
N/A
Summary: joystick fails to feel the touch now
Details:
joystick fails to feel the touch now on bf537 stamp. It didn't react to the touching on the board.
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1-svn68
Created: 2009-06-30 7:59:28 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 4695435 Bytes = 4.5 MB
Load Address: 00001000
Entry Point: 0018e594
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 0018e594
Linux version 2.6.28.10-ADI-2009R1-svn6870 (test@my-local-machine) (gcc version 4.1.2 (ADI svn)) #12 Tue Jun 30 15:59:14 CST 2009
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0010aff0
rodata = 0x0010aff0-0x0015df6c
bss = 0x0015e000-0x0016f800
data = 0x0016f800-0x00180000
stack = 0x0017e000-0x00180000
init = 0x00180000-0x008c8000
available = 0x008c8000-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 0
Reset caused by Software reset
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 125 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14223
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:bf537-stamp:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 47780k/65536k RAM, (7456k init code, 1063k kernel code, 469k data, 1024k dma, 7744k reserved)
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (37 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
stamp_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 93
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
brd: module loaded
bfin_mii_bus: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:00:35 UTC (35)
IP-Config: Gateway not on directly connected network.
Freeing unused kernel memory: 7456k freed
dma_alloc_init: dma_page @ 0x008c5000 - 256 pages at 0x03f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - https://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.13.4 (2009-06-30 12:31:57 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> verPHY: 0:01 - Link is Up - 100/Full
sion
kernel: Linux release 2.6.28.10-ADI-2009R1-svn6870, build #12 Tue Jun 30 15:59:14 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-8385, build #6 Tue Jun 30 15:58:33 CST 2009
root:/>
*******************************************************************
STEP 3: Starting test.
modprobe ad7142
ad7142_joystick 0-002c: is attached at 0
module insert success.
Case 1 ...PASS
x2c
input: ad7142 joystick as /devices/virtual/input/input0
root:/> lsmod
Module Size Used by
ad7142
module ls success.
Case 2 ...PASS
4428 0
root:/> cd /bin
root:/bin> event_test /dev/input/event0
ad7142_joystick 0-002c: Open AD7142 Rev 0.2
Input driver version is 1.0.0
Input device ID: bus 0x18 vendor 0x1 product 0x1 version 0x100
Input device name: "ad7142 joystick"
Supported events:
Event type 0 (Reset)
Event code 0 (Reset)
Event code 1 (Key)
Event type 1 (Key)
Event code 103 (Up)
Event code 105 (Left)
Event code 106 (Right)
Event code 108 (Down)
Event code 294 (BaseBtn)
Event code 295 (BaseBtn2)
Event code 296 (BaseBtn3)
Event code 297 (BaseBtn4)
Testing ..
Please touch the Joystick board...
. (interrupt to exit)
Follow-ups
--- Barry Song 2009-06-30 09:01:49
At first, the hardware is completely normal. I2C is ok, and interrupt output
from AD7142 is ok while touching.
The interrupt line is connected to PF7 not PF5. In stamp.c, it is defined as
PF5. So it's wrong. But while using PF7, it is strange the enable_irq can't
enable it at all(without any other devices using PF7 compiled). So I weird a
fly-line to PF5 as interrupt, in order to enable_irq normally, I still need to
delete the call to disable_irq_nosync(client->irq) in ad7142_probe,
otherwise, the IRQ can't be really enabled in ad7142_open by enable_irq.
After making the two changes, the AD7142 works completely normally.
I can't accept that as a official fix and need to check what's the reason PF7
can't be enabled at all.
--- Barry Song 2009-07-07 03:29:38
According to the measure by multimeter, interrupt output of ad7142 is connected
to PIN13 of TWI, the net name is PG5_ELVIS_PF7. I misunderstood it to be PF7,
but in fact it's PG5.
So after making the following patch, joystick gets to work completely normal:
Index: stamp.c
===================================================================
--- stamp.c (revision 6779)
+++ stamp.c (working copy)
@@ -1277,7 +1277,7 @@
#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
{
I2C_BOARD_INFO("ad7142_joystick", 0x2C),
- .irq = IRQ_PF5,
+ .irq = IRQ_PG5,
},
#endif
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
--- Mingquan Pan 2009-07-07 06:24:36
Yes,fixed. Close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.joystick application/octet-stream 33580 Mingquan Pan