| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Xilinx SPI controller driver (master mode only) |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * Copyright (c) 2009 Intel Corporation |
|---|
| 9 | 10 | * 2002-2007 (c) MontaVista Software, Inc. |
|---|
| 10 | 11 | |
|---|
| 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. |
|---|
| 14 | 12 | */ |
|---|
| 15 | 13 | |
|---|
| 16 | 14 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 393 | 391 | struct xilinx_spi *xspi; |
|---|
| 394 | 392 | struct xspi_platform_data *pdata; |
|---|
| 395 | 393 | struct resource *res; |
|---|
| 396 | | - int ret, num_cs = 0, bits_per_word = 8; |
|---|
| 394 | + int ret, num_cs = 0, bits_per_word; |
|---|
| 397 | 395 | struct spi_master *master; |
|---|
| 398 | 396 | u32 tmp; |
|---|
| 399 | 397 | u8 i; |
|---|
| .. | .. |
|---|
| 405 | 403 | } else { |
|---|
| 406 | 404 | of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits", |
|---|
| 407 | 405 | &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; |
|---|
| 408 | 411 | } |
|---|
| 409 | 412 | |
|---|
| 410 | 413 | if (!num_cs) { |
|---|
| .. | .. |
|---|
| 488 | 491 | goto put_master; |
|---|
| 489 | 492 | } |
|---|
| 490 | 493 | |
|---|
| 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); |
|---|
| 493 | 495 | |
|---|
| 494 | 496 | if (pdata) { |
|---|
| 495 | 497 | for (i = 0; i < pdata->num_devices; i++) |
|---|