register_console amba_console

#0  register_console (newcon=0xffff000011e86a10 <amba_console>) at kernel/printk/printk.c:2574
#1  0xffff0000110933cc in uart_configure_port (drv=0xffff000011e869d0 <amba_reg>, state=0xffff80003a6d8000,
    port=0xffff80003a7ff880) at drivers/tty/serial/serial_core.c:2365
#2  0xffff0000110945c4 in uart_add_one_port (drv=0xffff000011e869d0 <amba_reg>, uport=0xffff80003a7ff880)
    at drivers/tty/serial/serial_core.c:2823
#3  0xffff0000110b8db4 in pl011_register_port (uap=0xffff80003a7ff880) at drivers/tty/serial/amba-pl011.c:2613
#4  0xffff0000110b8fd0 in pl011_probe (dev=0xffff80003a7ff000, id=0xffff000011978ff0 <pl011_ids>)
    at drivers/tty/serial/amba-pl011.c:2654
#5  0xffff000010fe2930 in amba_probe (dev=0xffff80003a7ff000) at drivers/amba/bus.c:268
#6  0xffff00001111f5f8 in really_probe (dev=0xffff80003a7ff000, drv=0xffff000011e86b20 <pl011_driver>) at drivers/base/dd.c:509
#7  0xffff000011120248 in driver_probe_device (drv=0xffff000011e86b20 <pl011_driver>, dev=0xffff80003a7ff000)
    at drivers/base/dd.c:667
#8  0xffff0000111204ec in __device_attach_driver (drv=0xffff000011e86b20 <pl011_driver>, _data=0xffff80003a6f7358)
    at drivers/base/dd.c:763
#9  0xffff00001111ae08 in bus_for_each_drv (bus=0xffff000011e7f978 <amba_bustype>, start=0x0, data=0xffff80003a6f7358,
    fn=0xffff000011120330 <__device_attach_driver>) at drivers/base/bus.c:464
#10 0xffff000011120784 in __device_attach (dev=0xffff80003a7ff000, allow_async=true) at drivers/base/dd.c:820
#11 0xffff0000111208e0 in device_initial_probe (dev=0xffff80003a7ff000) at drivers/base/dd.c:867
#12 0xffff00001111b110 in bus_probe_device (dev=0xffff80003a7ff000) at drivers/base/bus.c:524
#13 0xffff000011116a30 in device_add (dev=0xffff80003a7ff000) at drivers/base/core.c:1961
#14 0xffff000010fe3c7c in amba_device_try_add (dev=0xffff80003a7ff000, parent=0xffff000011e036d8 <iomem_resource>)
    at drivers/amba/bus.c:418
#15 0xffff000010fe4238 in amba_device_add (dev=0xffff80003a7ff000, parent=0xffff000011e036d8 <iomem_resource>)
    at drivers/amba/bus.c:494
#16 0xffff0000112a2f68 in of_amba_device_create (node=0xffff80003be018c8, bus_id=0x0, platform_data=0x0, parent=0x0)
    at drivers/of/platform.c:274
#17 0xffff0000112a34f8 in of_platform_bus_create (bus=0xffff80003be018c8,
    matches=0xffff000011989178 <of_default_bus_match_table>, lookup=0x0, parent=0x0, strict=true) at drivers/of/platform.c:394
#18 0xffff0000112a399c in of_platform_populate (root=0xffff80003bdfac38,
    matches=0xffff000011989178 <of_default_bus_match_table>, lookup=0x0, parent=0x0) at drivers/of/platform.c:490
#19 0xffff0000112a3ac0 in of_platform_default_populate (root=0x0, lookup=0x0, parent=0x0) at drivers/of/platform.c:507
#20 0xffff000011c8dca0 in of_platform_default_populate_init () at drivers/of/platform.c:542
    at drivers/of/platform.c:274
#17 0xffff0000112a34f8 in of_platform_bus_create (bus=0xffff80003be018c8,
    matches=0xffff000011989178 <of_default_bus_match_table>, lookup=0x0, parent=0x0, strict=true) at drivers/of/platform.c:394
#18 0xffff0000112a399c in of_platform_populate (root=0xffff80003bdfac38,
    matches=0xffff000011989178 <of_default_bus_match_table>, lookup=0x0, parent=0x0) at drivers/of/platform.c:490
#19 0xffff0000112a3ac0 in of_platform_default_populate (root=0x0, lookup=0x0, parent=0x0) at drivers/of/platform.c:507
#20 0xffff000011c8dca0 in of_platform_default_populate_init () at drivers/of/platform.c:542
--Type <RET> for more, q to quit, c to continue without paging--
#21 0xffff000010087f50 in do_one_initcall (fn=0xffff000011c8db9c <of_platform_default_populate_init>) at init/main.c:887
#22 0xffff000011bf1c88 in do_initcall_level (level=3) at init/main.c:955
#23 0xffff000011bf1d04 in do_initcalls () at init/main.c:963
#24 0xffff000011bf1d60 in do_basic_setup () at init/main.c:981
#25 0xffff000011bf25b4 in kernel_init_freeable () at init/main.c:1136
#26 0xffff0000118a9c88 in kernel_init (unused=0x0) at init/main.c:1054
#27 0xffff00001008c5b8 in ret_from_fork () at arch/arm64/kernel/entry.S:1072
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
 

static int sbsa_uart_probe(struct platform_device *pdev) { struct uart_amba_port *uap; struct resource r; int portnr, ret; int baudrate; / * Check the mandatory baud rate parameter in the DT node early * so that we can easily exit with the error. */ if (pdev->dev.of_node) { struct device_node *np = pdev->dev.of_node; ret = of_property_read_u32(np, "current-speed", &baudrate); if (ret) return ret; } else { baudrate = 115200; } portnr = pl011_find_free_port(); if (portnr < 0) return portnr; uap = devm_kzalloc(&pdev->dev, sizeof(struct uart_amba_port), GFP_KERNEL); if (!uap) return -ENOMEM; ret = platform_get_irq(pdev, 0); if (ret < 0) { if (ret != -EPROBE_DEFER) dev_err(&pdev->dev, "cannot obtain irq\n"); return ret; } uap->port.irq = ret; #ifdef CONFIG_ACPI_SPCR_TABLE if (qdf2400_e44_present) { dev_info(&pdev->dev, "working around QDF2400 SoC erratum 44\n"); uap->vendor = &vendor_qdt_qdf2400_e44; } else #endif uap->vendor = &vendor_sbsa; uap->reg_offset = uap->vendor->reg_offset; uap->fifosize = 32; uap->port.iotype = uap->vendor->access_32b ? UPIO_MEM32 : UPIO_MEM; uap->port.ops = &sbsa_uart_pops; uap->fixed_baud = baudrate; snprintf(uap->type, sizeof(uap->type), "SBSA"); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); ret = pl011_setup_port(&pdev->dev, uap, r, portnr); if (ret) return ret; platform_set_drvdata(pdev, uap); return pl011_register_port(uap); }在上述代码中,我需要添加一个功能:在以uefi方式启动系统时,uart驱动读取acpi表内有关波特率的设置值,并以这个值进行串口波特率设置,请根据我的要求,在原代码中添加这一功能,并给出acpi表的描述
06-07
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值