打印

折腾了半个月的错误

[复制链接]
1871|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
wanli945|  楼主 | 2015-12-11 09:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
IO, gp, pi, ROM, GPIO
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-40
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b95c>] (xiongwae+0x5c/0x9c)
[<c001b95c>] (xiongwae+0x5c/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1a8 ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-72
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b964>] (xiongwae+0x64/0x9c)
[<c001b964>] (xiongwae+0x64/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1a9 ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-104
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b96c>] (xiongwae+0x6c/0x9c)
[<c001b96c>] (xiongwae+0x6c/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1aa ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-136
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b978>] (xiongwae+0x78/0x9c)
[<c001b978>] (xiongwae+0x78/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1ab ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-41
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b95c>] (xiongwae+0x5c/0x9c)
[<c001b95c>] (xiongwae+0x5c/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1ac ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-73
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b964>] (xiongwae+0x64/0x9c)
[<c001b964>] (xiongwae+0x64/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1ad ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-105
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b96c>] (xiongwae+0x6c/0x9c)
[<c001b96c>] (xiongwae+0x6c/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1ae ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-137
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b978>] (xiongwae+0x78/0x9c)
[<c001b978>] (xiongwae+0x78/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1af ]---
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
autorequest GPIO-42
Modules linked in:
[<c00387e4>] (unwind_backtrace+0x0/0xec) from [<c0043dc8>] (warn_slowpath_common+0x4c/0x64)
[<c0043dc8>] (warn_slowpath_common+0x4c/0x64) from [<c0043e74>] (warn_slowpath_fmt+0x30/0x40)
[<c0043e74>] (warn_slowpath_fmt+0x30/0x40) from [<c01927c4>] (gpio_ensure_requested+0x54/0xd4)
[<c01927c4>] (gpio_ensure_requested+0x54/0xd4) from [<c01929ac>] (gpio_direction_input+0x70/0xe8)
[<c01929ac>] (gpio_direction_input+0x70/0xe8) from [<c001b95c>] (xiongwae+0x5c/0x9c)
[<c001b95c>] (xiongwae+0x5c/0x9c) from [<c002d414>] (do_one_initcall+0x90/0x164)
[<c002d414>] (do_one_initcall+0x90/0x164) from [<c0008694>] (kernel_init+0x88/0x130)
[<c0008694>] (kernel_init+0x88/0x130) from [<c003463c>] (kernel_thread_exit+0x0/0x8)
---[ end trace 223e18a2434dc1b0 ]---

相关帖子

沙发
wanli945|  楼主 | 2015-12-11 09:56 | 只看该作者
板子是ATM-9x25    我是自己做的板子  然后移植   现在是移植后出现了错误   我现在很苦恼   这个问题半岁了我很长时间 我现在都不知道怎么去完成他    有人说是GPIO的问题    里面的驱动我也不会   所以请各位大神帮帮我   小弟感激不尽   

使用特权

评论回复
板凳
阿南| | 2015-12-11 10:22 | 只看该作者
没遇到过。楼主放在原来的开发板上跑跑看

使用特权

评论回复
地板
wanli945|  楼主 | 2015-12-11 16:48 | 只看该作者
阿南 发表于 2015-12-11 10:22
没遇到过。楼主放在原来的开发板上跑跑看

原来的开发板上面可以跑  完全没问题:'(的   ,这个是我自己做的板子,就是不知道哪里需要改动

使用特权

评论回复
5
yangwenguan| | 2015-12-12 15:58 | 只看该作者
越來越缺乏爱心的21ic,
首先保证bsp完全一致, 还是原来开发板可跑, 自制的开发板有问题, 不用说是硬件问题, 慢慢查
查drivers/gpio/gpiolib.c:99 gpio_ensure_requested函数, 看看有什么问题,
驱动没你想象中那么复杂, 比应用程序简单多了,

使用特权

评论回复
6
mini1986| | 2015-12-15 08:52 | 只看该作者
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
很明显告诉你了,是gpio的问题.......
你有没有request?......

使用特权

评论回复
7
wanli945|  楼主 | 2015-12-17 08:29 | 只看该作者
mini1986 发表于 2015-12-15 08:52
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x54/0xd4()
很明显告诉你了,是gpio的问题 ...

我把这个函数发给你看看static int gpio_ensure_requested(struct gpio_desc *desc, unsigned offset)
{
        const struct gpio_chip *chip = desc->chip;
        const int gpio = chip->base + offset;

        if (WARN(test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0,
                        "autorequest GPIO-%d\n", gpio)) {
                if (!try_module_get(chip->owner)) {
                        pr_err("GPIO-%d: module can't be gotten \n", gpio);
                        clear_bit(FLAG_REQUESTED, &desc->flags);
                        /* lose */
                        return -EIO;
                }
                desc_set_label(desc, "[auto]");
  /* caller must chip->request() w/o spinlock */
                if (chip->request)
                        return 1;
        }
        return 0;
}

/* caller holds gpio_lock *OR* gpio is marked as requested */
static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
{
        return gpio_desc[gpio].chip;
}

使用特权

评论回复
8
mini1986| | 2015-12-17 09:14 | 只看该作者
wanli945 发表于 2015-12-17 08:29
我把这个函数发给你看看static int gpio_ensure_requested(struct gpio_desc *desc, unsigned offset)
{
...

这个警告是告诉你,你使用的这些个gpio之前并没有进行申请,你好好看看你写的源代码,跟linux内核中的代码没有关系......

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

8

帖子

1

粉丝