The problem of the 3c2440 led driver example-Linux general technology-Linux programming and kernel information. The following is a detailed description. I used the Development Board of yangchuang 2440 and wrote an led Based on the source code on the Internet.
Driver, but because the kernel source code contains a macro definition S3C2410_VA_GPIO which cannot be found, I think it should be the base address of GPIO, because the four LEDs on the board are connected to GPIO_F4 ~ On GPIO_F7, according to the manual, the base address of GPIO_F should be 0x56000050, and then # define S3C2410_VA_GPIO 0x56000050.
The cross-compilation process passes normally, but the following error message is displayed when the driver module is loaded on the target board:
[Root @ utu-linux pub] # insmod led. ko
Using led. ko
Led: module license 'Unspecified 'taints kernel./* This line does not indicate that the license is generated and should not affect the driver */
Unable to handle kernel paging request at virtual address 56000050
Pgd = c2d7c000
[56000050] * pgd = 00000000
Internal error: Oops: 805 [#1]
Modules linked in: led
CPU: 0
PC is at leds_init + 0x48/0x98 [led]
LR is at 0x1
Pc :[ ] Lr: [<00000001>] Tainted: P
Sp: c3853f6c IPs: 00000008 fp: c3853f7c
R10: 00000000 r9: c00002000 r8: c02a36c4
R7: c02a36c4 r6: c00002000 r5: bf000460 r4: 00000000
R3: 56000050 r2: 00000001 r1: 00005555 r0: 00000003
Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment user
Control: C000317F Table: 32D7C000 DAC: 00000015
Process insmod (pid: 855, stack limit = 0xc3852194)
Stack: (0xc3853f6c to 0xc3854000)
3f60: c02a36d4 c3853fa4 c3853f80 c006ab5c bf002010
3f80: 00000004 00000000 running 1f02 00000080 c00350e4 00000002 00000000 c3853fa8
3fa0: c0034f60 c006a99c 00000000 running 1f02 00900080 4001b000 00000ae6 0007a070
Fc30: 00000004 00000000 running 1f02 bee3fe94 0007a060 00000000 00000002 bee3fe30
3fe0: bee3d154 bee3d148 00028174 401369f0 60000010 00900080 00000000 00000000
Backtrace:
[ ] (Leds_init + 0x0/0x98 [led]) from [ ] (Sys_init_module + 0x1d0/0x37c)
R4 = C02A36D4
[ ] (Sys_init_module + 0x0/0x37c) from [ ] (Ret_fast_syscall + 0x0/0x2c)
Code: e89da810 e59f3048 e59f1048 e3a02001 (e1c310b0)
Segmentation fault
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service