大家好,我在AM3517上想扩展串口数量,用的NXP的SC16IS7X2,menuconfig不配置McSPI的话,无法probe SC16IS7x2,但是kernel可以正常工作。
board-am3517evm.c
static struct omap2_mcspi_device_config sc16is7x2_mcspi_config = {
.turbo_mode = 0,
.single_channel = 1, /* 0: slave, 1: master */
};
struct spi_board_info omap3_sc16is7x2_spi_board_info[] = {
[0] = {
.modalias = "sc16is7x2",
.bus_num = 2,
.chip_select = 1,
.max_speed_hz = 3000000,
.controller_data = &sc16is7x2_mcspi_config,
.mode = SPI_MODE_0,
.irq = OMAP_GPIO_IRQ(AM3517_SPI_UART_GPIO),
.platform_data = &sc16is7x2_config,
},
};
在menuconfig中配置MCSPI后,出现以下的提示。红色的都是由于配置McSPI之后,产生的信息。
我该如何解决这个问题,这个MCSPI在linux下应该怎么使用呢?
Uncompressing Linux……………………………………………………………………………………………………………………………… done, booting the kernel.
Linux version 2.6.32 (realtimedsp@ubuntu) (gcc version 4.4.3 (ctng-1.6.1) ) #73 Wed Dec 12 18:34:28 PST 2012
CPU: ARMv7 Processor [411fc087] revision 7 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP3517/AM3517 EVM
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 65536
free_area_init_node: node 0, pgdat c04685e8, node_mem_map c0486000
Normal zone: 512 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 65024 pages, LIFO batch:15
AM3517 ES3.1 (l2cache iva sgx neon isp )
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x100000
Reserving 4194304 bytes SDRAM for VRAM
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: mem=256M console=ttyS2,115200n8 root=/dev/ram0 initrd=0x81000000,40M ramdisk_size=40960;PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 210048KB available (3984K code, 343K data, 164K init, 0K highmem)
Hierarchical RCU implementation.
NR_IRQS:368
Clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
GPMC revision 5.0
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP GPIO hardware version 2.5
OMAP clockevent source: GPTIMER1 at 32768 Hz
Console: colour dummy device 80×30
Calibrating delay loop… 503.12 BogoMIPS (lpj=1966080)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
mux: Setting signal etk_clk.hsusb1_stp 0x0018 -> 0x0003
mux: Setting signal etk_ctl.hsusb1_clk 0x0000 -> 0x0003
mux: Setting signal etk_d8.hsusb1_dir 0x0100 -> 0x010b
mux: Setting signal etk_d9.hsusb1_nxt 0x0100 -> 0x010b
mux: Setting signal etk_d0.hsusb1_data0 0x0100 -> 0x010b
mux: Setting signal etk_d1.hsusb1_data1 0x0100 -> 0x010b
mux: Setting signal etk_d2.hsusb1_data2 0x0108 -> 0x010b
mux: Setting signal etk_d7.hsusb1_data3 0x0100 -> 0x010b
mux: Setting signal etk_d4.hsusb1_data4 0x0100 -> 0x010b
mux: Setting signal etk_d5.hsusb1_data5 0x0100 -> 0x010b
mux: Setting signal etk_d6.hsusb1_data6 0x0100 -> 0x010b
mux: Setting signal etk_d3.hsusb1_data7 0x0100 -> 0x010b
mux: Setting signal mcspi2_cs0.gpio181 0x010c -> 0x011c
Display initialized successfully
mux: Setting signal sdmmc2_dat4.gpio136 0x011c -> 0x011c
mux: Setting signal sdmmc2_dat5.gpio137 0x011c -> 0x011c
mux: Setting signal sdmmc1_clk.sdmmc1_clk 0x0118 -> 0x0118
mux: Setting signal sdmmc1_cmd.sdmmc1_cmd 0x0110 -> 0x0118
mux: Setting signal sdmmc1_dat0.sdmmc1_dat0 0x0110 -> 0x0118
mux: Setting signal sdmmc1_dat1.sdmmc1_dat1 0x0110 -> 0x0118
mux: Setting signal sdmmc1_dat2.sdmmc1_dat2 0x0110 -> 0x0118
mux: Setting signal sdmmc1_dat3.sdmmc1_dat3 0x0110 -> 0x0118
mux: Setting signal sdmmc2_clk.sdmmc2_clk 0x0108 -> 0x0118
mux: Setting signal sdmmc2_cmd.sdmmc2_cmd 0x0100 -> 0x0118
mux: Setting signal sdmmc2_dat0.sdmmc2_dat0 0x0100 -> 0x0118
mux: Setting signal sdmmc2_dat1.sdmmc2_dat1 0x0100 -> 0x0118
mux: Setting signal sdmmc2_dat2.sdmmc2_dat2 0x0100 -> 0x0118
mux: Setting signal sdmmc2_dat3.sdmmc2_dat3 0x0100 -> 0x0118
OMAP DMA hardware revision 4.0
bio: create slab <bio-0> at 0
spi_register_driver
SCSI subsystem initialized
spi->modalias=sc16is7x2
sc16is7x2 probe
gpiochip_add: gpios 500..507 (sc16is7x2) not registered
sc16is7x2 spi2.1: sc16is7x2_release_port
sc16is7x2 spi2.1: sc16is7x2_release_port
————[ cut here ]————
WARNING: at kernel/mutex-debug.c:106 mutex_destroy+0x4c/0x64()
Modules linked in:
[<c003747c>] (unwind_backtrace+0x0/0xd8) from [<c0057af0>] (warn_slowpath_common+0x48/0x60)
[<c0057af0>] (warn_slowpath_common+0x48/0x60) from [<c0074ca4>] (mutex_destroy+0x4c/0x64)
[<c0074ca4>] (mutex_destroy+0x4c/0x64) from [<c030dc40>] (sc16is7x2_probe+0x224/0x268)
[<c030dc40>] (sc16is7x2_probe+0x224/0x268) from [<c01e4f44>] (spi_drv_probe+0x18/0x1c)
[<c01e4f44>] (spi_drv_probe+0x18/0x1c) from [<c01c4abc>] (driver_probe_device+0xa0/0x148)
[<c01c4abc>] (driver_probe_device+0xa0/0x148) from [<c01c40d4>] (bus_for_each_drv+0x48/0x84)
[<c01c40d4>] (bus_for_each_drv+0x48/0x84) from [<c01c4c9c>] (device_attach+0x50/0x68)
[<c01c4c9c>] (device_attach+0x50/0x68) from [<c01c3ef4>] (bus_probe_device+0x24/0x40)
[<c01c3ef4>] (bus_probe_device+0x24/0x40) from [<c01c2bb0>] (device_add+0x420/0x584)
[<c01c2bb0>] (device_add+0x420/0x584) from [<c01e55c4>] (spi_add_device+0xdc/0x138)
[<c01e55c4>] (spi_add_device+0xdc/0x138) from [<c01e56a0>] (spi_new_device+0x80/0xa0)
[<c01e56a0>] (spi_new_device+0x80/0xa0) from [<c01e5774>] (spi_register_master+0xb4/0xf4)
[<c01e5774>] (spi_register_master+0xb4/0xf4) from [<c001bef4>] (omap2_mcspi_probe+0x314/0x390)
[<c001bef4>] (omap2_mcspi_probe+0x314/0x390) from [<c01c5948>] (platform_drv_probe+0x18/0x1c)
[<c01c5948>] (platform_drv_probe+0x18/0x1c) from [<c01c4abc>] (driver_probe_device+0xa0/0x148)
[<c01c4abc>] (driver_probe_device+0xa0/0x148) from [<c01c4bc4>] (__driver_attach+0x60/0x84)
[<c01c4bc4>] (__driver_attach+0x60/0x84) from [<c01c4388>] (bus_for_each_dev+0x48/0x84)
[<c01c4388>] (bus_for_each_dev+0x48/0x84) from [<c01c3c98>] (bus_add_driver+0x9c/0x218)
[<c01c3c98>] (bus_add_driver+0x9c/0x218) from [<c01c4e8c>] (driver_register+0xa8/0x134)
[<c01c4e8c>] (driver_register+0xa8/0x134) from [<c01c5d24>] (platform_driver_probe+0x18/0x68)
[<c01c5d24>] (platform_driver_probe+0x18/0x68) from [<c0031334>] (do_one_initcall+0x5c/0x1bc)
[<c0031334>] (do_one_initcall+0x5c/0x1bc) from [<c0008570>] (kernel_init+0x94/0x10c)
[<c0008570>] (kernel_init+0x94/0x10c) from [<c0032ea4>] (kernel_thread_exit+0x0/0x8)
—[ end trace 1b75b31a2719ed1c ]—
sc16is7x2: probe of spi2.1 failed with error -22
Generic PHY: Registered new driver
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c_omap i2c_omap.1: bus 1 rev3.12 at 400 kHz
regulator: VDCDC1: 1200 mV normalregulator: VDCDC2: 3300 mV normalregulator: VDCDC3: 1800 mV normalregulator: LDO1: 1800 mV normalregulator: LDO2: 3300 mV normalSwitching to clocksource 32k_counter
musb_hdrc: version 6.0, cppi4.1-dma, otg (peripheral+host), debug=0
AM3517 OTG revision 4ea41001, PHY f0836e2, control 00
musb_hdrc: ConfigData=0x1e (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb_hdrc: MHDRC RTL version 1.900musb_hdrc: setup fifo_mode 4
musb_hdrc: 28/31 max ep, 16384/32768 memory
musb_hdrc: USB OTG mode controller at d0810000 using DMA, IRQ 71
Registered /proc/driver/musb_hdrc
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs…
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 40960K
AM3517 Linux PSP version 03.00.00.04 (AM3517EVM)
NetWinder Floating Point Emulator V0.97 (double precision)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
msgmni has been set to 490
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
OMAP DSS rev 2.0
OMAP DISPC rev 3.0
OMAP VENC rev 2
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
console [ttyS2] enabled
brd: module loaded
loop: module loaded
omap2-nand driver initializing
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Creating 7 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000080000 : "xloader-nand"
0x000000080000-0x000000240000 : "uboot-nand"
0x000000240000-0x000000280000 : "params-nand"
0x000000280000-0x000000780000 : "linux-nand"
0x000000780000-0x000001b80000 : "jffs2-nand"
0x000001b80000-0x000002580000 : "appl"
0x000002580000-0x000008000000 : "data"
vcan: Virtual CAN interface driver
CAN device driver interface
TI High End CAN Controller Driver 0.7
failed to get can_stbti_hecc ti_hecc.1: device registered (reg_base=d0870000, irq=24)
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver dm9601
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OMAP-EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.32 ehci_hcd
usb usb1: SerialNumber: ehci-omap.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver…
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbtest
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC 02:11:87:5d:32:f8
usb0: HOST MAC 76:8a:91:45:2d:8a
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: MUSB HDRC host driver
usb usb2: Manufacturer: Linux 2.6.32 musb-hcd
usb usb2: SerialNumber: musb_hdrc
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
rtc-pcf8563 1-0051: chip found, driver version 0.4.3
rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc0
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
vpfe_init
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
tvp5150a 1-005d: tvp5150a 1-005d decoder driver registered !!
vpfe-capture vpfe-capture: v4l2 sub device tvp5150a registered
vpfe_register_ccdc_device: DM6446 CCDC
DM6446 CCDC is registered with vpfe.
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
usbcore: registered new interface driver snd-usb-audio
alc562x-codec: probe of 1-001a failed with error -1071109040
No device for DAI omap-mcbsp-dai-0
No device for DAI omap-mcbsp-dai-1
No device for DAI omap-mcbsp-dai-2
No device for DAI omap-mcbsp-dai-3
No device for DAI omap-mcbsp-dai-4
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Power Management for TI OMAP3.
Disabling unused clock "emac_fck"
Disabling unused clock "emac_ick"
Disabling unused clock "mcbsp_fck"
Disabling unused clock "mcbsp_fck"
Disabling unused clock "mcbsp_fck"
Disabling unused clock "mcbsp_ick"
Disabling unused clock "mcbsp_ick"
Disabling unused clock "mcbsp_ick"
Disabling unused clock "gpt2_ick"
Disabling unused clock "gpt3_ick"
Disabling unused clock "gpt4_ick"
Disabling unused clock "gpt5_ick"
Disabling unused clock "gpt6_ick"
Disabling unused clock "gpt7_ick"
Disabling unused clock "gpt8_ick"
Disabling unused clock "gpt9_ick"
Disabling unused clock "wdt3_ick"
Disabling unused clock "wdt3_fck"
Disabling unused clock "gpio2_dbck"
Disabling unused clock "gpio3_dbck"
Disabling unused clock "gpio4_dbck"
Disabling unused clock "gpio5_dbck"
Disabling unused clock "gpt9_fck"
Disabling unused clock "gpt8_fck"
Disabling unused clock "gpt7_fck"
Disabling unused clock "gpt6_fck"
Disabling unused clock "gpt5_fck"
Disabling unused clock "gpt4_fck"
Disabling unused clock "gpt3_fck"
Disabling unused clock "gpt2_fck"
Disabling unused clock "gpt12_ick"
Disabling unused clock "wdt1_ick"
Disabling unused clock "gpio1_dbck"
Disabling unused clock "mcbsp_ick"
Disabling unused clock "mcbsp_ick"
Disabling unused clock "gpt10_ick"
Disabling unused clock "gpt11_ick"
Disabling unused clock "i2c_ick"
Disabling unused clock "i2c_ick"
Disabling unused clock "hdq_ick"
Disabling unused clock "hdq_fck"
Disabling unused clock "mcbsp_fck"
Disabling unused clock "mcbsp_fck"
Disabling unused clock "i2c_fck"
Disabling unused clock "i2c_fck"
Disabling unused clock "gpt11_fck"
Disabling unused clock "gpt10_fck"
Disabling unused clock "dpll4_m6x2_ck"
Disabling unused clock "dpll4_m5x2_ck"
Disabling unused clock "dpll3_m3x2_ck"
Disabling unused clock "sys_clkout1"
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
regulator_init_complete: incomplete constraints, leaving LDO2 on
regulator_init_complete: incomplete constraints, leaving LDO1 on
davinci_emac_probe: using random MAC addr: c2:c7:ae:80:e2:a2
emac-mii: probed
rtc-pcf8563 1-0051: setting system clock to 2012-12-13 10:37:41 UTC (1355395061)
omapdss DPI error: display already enabled
omap_vout omap_vout: 'lcd' Display already enabled
omapdss DPI error: display already enabled
omap_vout omap_vout: 'lcd' Display already enabled
omap_vout omap_vout: Buffer Size = 3686400
omap_vout omap_vout: : registered and initialized video device 1
omap_vout omap_vout: Buffer Size = 3686400
omap_vout omap_vout: : registered and initialized video device 2
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 164K
INIT: version 2.86 booting
Please wait: booting…
Starting udev
Populating dev cache
Remounting root file system…
root: mount: mounting rootfs on / failed: No such file or directory
root: mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
Setting up IP spoofing protection: rp_filter.
Configuring network interfaces… Unable to handle kernel paging request at virtual address ffffff8b
pgd = cb7c4000
[ffffff8b] *pgd=80688021, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in:
CPU: 0 Tainted: G W (2.6.32 #73)
PC is at inet_dump_ifaddr+0x70/0x138
LR is at rtnl_dump_all+0x98/0xc0
pc : [<c02cf324>] lr : [<c029c3dc>] psr: a0000013
sp : cbe3bca8 ip : 00000120 fp : 00000000
r10: 00000000 r9 : 00000048 r8 : 00000000
r7 : cf87f880 r6 : 00000000 r5 : 00000000 r4 : ccdbb810
r3 : ffffff7f r2 : 00000000 r1 : c047b430 r0 : cc3409c0
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 8b7c4019 DAC: 00000015
Process ifconfig (pid: 1436, stack limit = 0xcbe3a2e8)
Stack: (0xcbe3bca8 to 0xcbe3c000)
bca0: 000003a0 00000000 00000000 cc3409c0 c04645b0 ffffff7f
bcc0: c04645b0 00000002 cf87f880 00000001 c047b8b8 cc3409c0 cf87f894 cf8b8e30
bce0: 00000014 c029c3dc cc0c8200 cc3409c0 cf87f880 cf87f880 c029c344 00000038
bd00: 00000000 c02a281c cc0c8200 22222222 cc0c8208 cc0c8200 cc677000 cf87f880
bd20: c029c344 c02a2e38 c029c344 cc677000 00000000 cce3c300 c047b988 c029d904
bd40: 00000000 cc677000 00000014 cc677000 cce3c300 c029d834 cbe3bd84 c047b988
bd60: 00000000 c02a3b8c cce3c300 cf81a600 cc0c8200 c029d828 cce3c300 c02a3884
bd80: cc0c8200 7fffffff 00000000 cce3c300 cc0c8200 cbe3bf5c cbe3be80 00000014
bda0: 00000000 00000000 00000000 c02a40fc cf4146f8 cbe3bde0 0000059c 00000000
bdc0: 00000000 00000000 00000000 00000014 cbe3be80 00000000 00000000 0000000c
bde0: cbe3a000 be9baa14 be9baa4c c0284ac8 00000000 c0468bd8 00000000 00000001
be00: ffffffff 00000000 00000000 00000000 00000000 00000000 cf8c04c0 00000002
be20: 00000000 00000000 003fffff cf8c04c0 c0069dc8 cbe3be34 cbe3be34 ccd0a5f8
be40: c049c800 c0468bdc cbe3be80 00000000 00000000 c0094088 00000000 ccdf9e40
be60: 00000000 000000bc 40190000 c04685e8 cba427b0 ccc82288 00083603 ccc82288
be80: be9b9000 c00387b0 ccc82288 00000014 cf488e40 c0094ecc cbe3bdb8 cbe3bf5c
bea0: 00000000 cf84b800 cc0c8200 cbe3bedc cf488e40 00000000 0000000c cbe3bedc
bec0: 0000000c 00000014 cbe3bedc cf488e40 00000000 c02853ec be9b99a8 00000010
bee0: 00000000 00000000 be9b99a8 00000817 00000817 c0431e58 be9b99a8 cbe3bfb0
bf00: be9babb8 0000059c be9babc7 c0031274 00000000 cf500f70 cf500f18 c00b761c
bf20: cf896f40 cf488e40 cbe3bf4c 00000000 cf896f40 cf488e40 c0332c90 c0285828
bf40: c0332c90 00000119 c0032068 00000000 c04700e0 c0070afc be9babc6 cbe3bedc
bf60: 0000000c cbe3bf78 00000001 00000000 00000000 00000000 be9baa14 00000000
bf80: 00000000 00000000 00000000 be9baa14 0000000c 00000004 00000122 c0032068
bfa0: 00000000 c0031ec0 be9baa14 0000000c 00000004 be9baa00 00000014 00000000
bfc0: be9baa14 0000000c 00000004 00000122 be9babb8 0000059c be9babc7 be9baa4c
bfe0: be9baa00 be9b99a0 401b8a9c 40198158 60000010 00000004 00000000 00000000
[<c02cf324>] (inet_dump_ifaddr+0x70/0x138) from [<c029c3dc>] (rtnl_dump_all+0x98/0xc0)
[<c029c3dc>] (rtnl_dump_all+0x98/0xc0) from [<c02a281c>] (netlink_dump+0x48/0x1a4)
[<c02a281c>] (netlink_dump+0x48/0x1a4) from [<c02a2e38>] (netlink_dump_start+0x138/0x170)
[<c02a2e38>] (netlink_dump_start+0x138/0x170) from [<c029d904>] (rtnetlink_rcv_msg+0xd0/0x1f8)
[<c029d904>] (rtnetlink_rcv_msg+0xd0/0x1f8) from [<c02a3b8c>] (netlink_rcv_skb+0x4c/0xb0)
[<c02a3b8c>] (netlink_rcv_skb+0x4c/0xb0) from [<c029d828>] (rtnetlink_rcv+0x18/0x24)
[<c029d828>] (rtnetlink_rcv+0x18/0x24) from [<c02a3884>] (netlink_unicast+0x218/0x2b4)
[<c02a3884>] (netlink_unicast+0x218/0x2b4) from [<c02a40fc>] (netlink_sendmsg+0x248/0x25c)
[<c02a40fc>] (netlink_sendmsg+0x248/0x25c) from [<c0284ac8>] (sock_sendmsg+0xa4/0xc8)
[<c0284ac8>] (sock_sendmsg+0xa4/0xc8) from [<c02853ec>] (sys_sendto+0xb0/0xd4)
[<c02853ec>] (sys_sendto+0xb0/0xd4) from [<c0031ec0>] (ret_fast_syscall+0x0/0x2c)
Code: 159d3014 158d3014 e59d3014 e3530000 (1593800c)—[ end trace 1b75b31a2719ed1e ]—
Segmentation fault
Qi Fu:
回复 Yaoming Qin:
我检查后,发现gpio_chip值会对这些有影响,但是base和ngpio这两个,我不知道该用哪个值。麻烦请大家给些提示。
base我配置成200,不会出现上述这些大量的提示,导致内核崩溃。配置成178,就完蛋了,就是上面的信息。完全用不了。
SPI2的SCLK,MISO,MOSI,CS是gpio_178,179,180,181。
struct gpio_chip { const char *label; struct device *dev; struct module *owner;
int (*request)(struct gpio_chip *chip, unsigned offset); void (*free)(struct gpio_chip *chip, unsigned offset);
int (*direction_input)(struct gpio_chip *chip, unsigned offset); int (*get)(struct gpio_chip *chip, unsigned offset); int (*direction_output)(struct gpio_chip *chip, unsigned offset, int value); void (*set)(struct gpio_chip *chip, unsigned offset, int value);
int (*to_irq)(struct gpio_chip *chip, unsigned offset);
void (*dbg_show)(struct seq_file *s, struct gpio_chip *chip); int base; u16 ngpio; char **names; unsigned can_sleep:1; unsigned exported:1;};
base与ngpio应该如何赋值,烦请大家讲通俗易懂点,最好是能举个例子。
内核的文档中的介绍
base:identifies the first GPIO number handled by this chip;
"base" … same as N, the first GPIO managed by this chip
"label" … provided for diagnostics (not always unique)
"ngpio" … how many GPIOs this manges (N to N + ngpio – 1)
但是我没能理解,这里到底该填什么值呢?
现在内核中已经产生了UART的两个设备文件,但无法收发,测量SPI时钟,数据信号均没有。
Qi Fu:
AM3517的板子我们已经小批量生产了,但是想在系统后增加了一个LED灯闪烁,表示系统正在正常工作,于是有menuconfig中我增加了
led support
Led class support,
led support for gpio connected,
Platform device bindings
Led trigger support,
led heartbeat trigger
以及LED IO口的设置,LED灯确实能开始闪烁了,但是同时发现了一个问题,增加LED class这个选项后,我有另外一路使用spi扩串口,SPI就工作不正常了,SCLK没有时钟信号了,上面全是一些没有规则IO信号。
这是什么原因呢,请大家帮忙指导。
Qi Fu:
回复 Qi Fu:
已经解决了,但不知道原因。我调用了下面的pinmux设置就行了,非的屏蔽掉omap3_mux_init才行。请问这是什么原因呢?
static struct omap_board_mux board_gpio_led_mux[] = { OMAP3_MUX(MCBSP1_CLKX,OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), //Power DS2 //uart4 //OMAP3_MUX(GPMC_WAIT1, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), //OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), { .reg_offset = OMAP_MUX_TERMINATOR },};
static int gpio_leds_init(void){ int ret = 0;omap3_mux_init(board_gpio_led_mux, OMAP_PACKAGE_CBB);
}
jianguo zhou:
您好,我看您的打印信息中有用到tvp5150,能否把其驱动给我参考下,谢谢!