Цитата(nill @ Apr 7 2016, 11:07)

platform_driver_register() всего лишь регистрирует драйвер в системе, далее система должна определить присутствие устройства и после этого вызвать axi_gpio_probe(). У Вас это устройство определено в device tree? Вы передали device tree в qemu при старте системы?
Изменяю свой модуль. В консоли выполяю команды:
Код
petalinux-build
petalinux-boot --qemu --kernel
Этого достаточно?
В консоль выдаёт следующее:
CODE
--------------------------------------------------------------------
Xilinx QEMU Dec 10 2015 13:38:20.
--------------------------------------------------------------------
INFO: TCP PORT is free
INFO: Starting microblaze QEMU
INFO: qemu-system-microblazeel -L /opt/pkg/petalinux-v2015.4-final/etc/qemu -M microblaze-fdt-plnx -m 256 -serial mon:stdio -serial /dev/null -display none -kernel /home/andrei/work/htg_v7_g3/petalinux/peta_test/images/linux/image.elf -gdb tcp::9000 -dtb /tmp/tmp.BX8ZjB61fs -tftp /tftpboot
--------------------------------------------------------------------
Xilinx QEMU Dec 10 2015 13:38:20.
--------------------------------------------------------------------
Ramdisk addr 0x00000000,
FDT at 0x40b11668
Linux version 4.0.0 (andrei@andrei-pc) (gcc version 4.9.2 (crosstool-NG 1.20.0) ) #150 Thu Apr 7 15:23:02 MSK 2016
setup_cpuinfo: initialising
setup_cpuinfo: No PVR support. Using static CPU info from FDT
wt_msr_noirq
setup_memory: max_mapnr: 0x40000
setup_memory: min_low_pfn: 0x40000
setup_memory: max_low_pfn: 0x70000
setup_memory: max_pfn: 0x80000
Zone ranges:
DMA [mem 0x0000000040000000-0x000000006fffffff]
Normal empty
HighMem [mem 0x0000000070000000-0x000000007fffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000040000000-0x000000007fffffff]
Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
On node 0 totalpages: 262144
free_area_init_node: node 0, pgdat c03d3004, node_mem_map c1000000
DMA zone: 1536 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 196608 pages, LIFO batch:31
HighMem zone: 65536 pages, LIFO batch:15
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260608
Kernel command line: console=ttyUL0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1027408K/1048576K available (2965K kernel code, 95K rwdata, 816K rodata, 6856K init, 545K bss, 21168K reserved, 0K cma-reserved, 262144K highmem)
Kernel virtual memory layout:
* 0xfffea000..0xfffff000 : fixmap
* 0xff800000..0xffc00000 : highmem PTEs
* 0xff800000..0xff800000 : early ioremap
* 0xf0000000..0xff800000 : vmalloc & ioremap
NR_IRQS:33
/amba_pl/interrupt-controller@10002000: num_irq=2, edge=0x2
/amba_pl/timer@10000000: irq=1
xilinx_timer_set_mode: shutdown
xilinx_timer_set_mode: periodic
sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 28633115641ns
Calibrating delay loop... 749.56 BogoMIPS (lpj=3747840)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
devtmpfs: initialized
NET: Registered protocol family 16
Switched to clocksource xilinx_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 5, 163840 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 24576 bytes)
UDP-Lite hash table entries: 512 (order: 2, 24576 bytes)
NET: Registered protocol family 1
Skipping unavailable RESET gpio -2 (reset)
futex hash table entries: 16 (order: -4, 448 bytes)
romfs: ROMFS MTD © 2007 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
10001000.serial: ttyUL0 at MMIO 0x10001000 (irq = 2, base_baud = 0) is a uartlite
console [ttyUL0] enabled
brd: module loaded
i2c /dev entries driver
TCP: cubic registered
NET: Registered protocol family 17
Key type encrypted registered
Freeing unused kernel memory: 6856K (c03d4000 - c0a86000)
INIT: version 2.88 booting
Creating /dev/flash/* device nodes
random: dd urandom read with 10 bits of entropy available
Starting internet superserver: inetd.
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
/etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
login[290]: root login on 'console'
-sh: can't access tty; job control turned off
root@peta_test:~#
root@peta_test:~#
root@peta_test:~#
root@peta_test:~#
Попробовал так
Код
petalinux-boot --qemu --image images/linux/image.elf --dtb images/linux/system.dtb
, не помогло.