Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

ioremap returns NULL

$
0
0

I'm trying to create a customised UART driver for Raspberry PI.I try to ioremap the MMIO. But ioremap returns always NULL.

#define UART_REG_BASE_ADDR  0x7E20100pUart = ioremap(UART_REG_BASE_ADDR, 1024);if (pUart==NULL){    printk("Couldn't remap UART MMIO\n");    return -EIO;}

dmesg dumps following:

[ 2906.579848] CPU: 0 PID: 4983 Comm: insmod Tainted: G      D W  O   3.18.5+ #1[ 2906.590783] [<c0014b64>] (unwind_backtrace) from [<c00120ec>] (show_stack+0x20/0x24)[ 2906.614046] [<c00120ec>] (show_stack) from [<c0549008>] (dump_stack+0x20/0x28)[ 2906.624803] [<c0549008>] (dump_stack) from [<c0022620>] (warn_slowpath_common+0x7c/0x9c)[ 2906.647925] [<c0022620>] (warn_slowpath_common) from [<c002266c>] (warn_slowpath_null+0x2c/0x34)[ 2906.668656] [<c002266c>] (warn_slowpath_null) from [<c001a888>] (__arm_ioremap_pfn_caller+0x240/0x25c)[ 2906.691936] [<c001a888>] (__arm_ioremap_pfn_caller) from [<c001a934>] (__arm_ioremap_caller+0x68/0x70)[ 2906.713171] [<c001a934>] (__arm_ioremap_caller) from [<c001a3d0>] (__arm_ioremap+0x24/0x2c)[ 2906.735043] [<c001a3d0>] (__arm_ioremap) from [<bf19c028>] (hello_init+0x28/0x88 [domotx])[ 2906.755780] [<bf19c028>] (hello_init [domotx]) from [<c000873c>] (do_one_initcall+0x94/0x1e4)[ 2906.778165] [<c000873c>] (do_one_initcall) from [<c0087e70>] (load_module+0x1848/0x1e38)[ 2906.799410] [<c0087e70>] (load_module) from [<c008854c>] (SyS_init_module+0xec/0xf0)[ 2906.822660] [<c008854c>] (SyS_init_module) from [<c000e980>] (ret_fast_syscall+0x0/0x48)[ 2906.844558] ---[ end trace c7cdd8b3d5007a1b ]---[ 2906.856382] Couldn't remap UART MMIO

What do I do wrong?


Viewing all articles
Browse latest Browse all 6334

Trending Articles