hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/spi/spi-xilinx.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Xilinx SPI controller driver (master mode only)
34 *
....@@ -8,9 +9,6 @@
89 * Copyright (c) 2009 Intel Corporation
910 * 2002-2007 (c) MontaVista Software, Inc.
1011
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License version 2 as
13
- * published by the Free Software Foundation.
1412 */
1513
1614 #include <linux/module.h>
....@@ -393,7 +391,7 @@
393391 struct xilinx_spi *xspi;
394392 struct xspi_platform_data *pdata;
395393 struct resource *res;
396
- int ret, num_cs = 0, bits_per_word = 8;
394
+ int ret, num_cs = 0, bits_per_word;
397395 struct spi_master *master;
398396 u32 tmp;
399397 u8 i;
....@@ -405,6 +403,11 @@
405403 } else {
406404 of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits",
407405 &num_cs);
406
+ ret = of_property_read_u32(pdev->dev.of_node,
407
+ "xlnx,num-transfer-bits",
408
+ &bits_per_word);
409
+ if (ret)
410
+ bits_per_word = 8;
408411 }
409412
410413 if (!num_cs) {
....@@ -488,8 +491,7 @@
488491 goto put_master;
489492 }
490493
491
- dev_info(&pdev->dev, "at 0x%08llX mapped to 0x%p, irq=%d\n",
492
- (unsigned long long)res->start, xspi->regs, xspi->irq);
494
+ dev_info(&pdev->dev, "at %pR, irq=%d\n", res, xspi->irq);
493495
494496 if (pdata) {
495497 for (i = 0; i < pdata->num_devices; i++)