uartlite: probe of 42c30000.serial failed with error -22
- 启动报错:
- 定位:
- 修改:
启动报错:
使用zynq的uartlite时,之前一般使用2个或1个,现在使用4个时,启动报错如下:
42c00000.serial: ttyUL0 at MMIO 0x42c00000 (irq = 165, base_baud = 0) is a uartlite
42c10000.serial: ttyUL2 at MMIO 0x42c10000 (irq = 166, base_baud = 0) is a uartlite
42c20000.serial: ttyUL3 at MMIO 0x42c20000 (irq = 167, base_baud = 0) is a uartlite
uartlite 42c30000.serial: ttyUL4 too large
uartlite: probe of 42c30000.serial failed with error -22
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 143, base_baud = 6249999) is a xuartps
e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 144, base_baud = 6249999) is a xuartps
定位:
后查实为内核中对最大uartlite限制。
修改方法如下:
在内核目录中:
在文件drivers/tty/serial/uartlite.c中可见,原始错误打印的位置如下:
#define ULITE_NR_UARTS 4
if (id < 0 || id >= ULITE_NR_UARTS) {
dev_err(dev, “%s%i too large\n”, ULITE_NAME, id);
return -EINVAL;
}
修改:
#define ULITE_NR_UARTS 16
共有条评论 网友评论