| .. | .. |
|---|
| 1 | | -/* |
|---|
| 2 | | - * Driver for Amlogic Meson SPI flash controller (SPIFC) |
|---|
| 3 | | - * |
|---|
| 4 | | - * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * version 2 as published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * You should have received a copy of the GNU General Public License |
|---|
| 11 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 12 | | - */ |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 2 | +// |
|---|
| 3 | +// Driver for Amlogic Meson SPI flash controller (SPIFC) |
|---|
| 4 | +// |
|---|
| 5 | +// Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> |
|---|
| 6 | +// |
|---|
| 13 | 7 | |
|---|
| 14 | 8 | #include <linux/clk.h> |
|---|
| 15 | 9 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 76 | 70 | * @master: the SPI master |
|---|
| 77 | 71 | * @regmap: regmap for device registers |
|---|
| 78 | 72 | * @clk: input clock of the built-in baud rate generator |
|---|
| 79 | | - * @device: the device structure |
|---|
| 73 | + * @dev: the device structure |
|---|
| 80 | 74 | */ |
|---|
| 81 | 75 | struct meson_spifc { |
|---|
| 82 | 76 | struct spi_master *master; |
|---|
| .. | .. |
|---|
| 292 | 286 | { |
|---|
| 293 | 287 | struct spi_master *master; |
|---|
| 294 | 288 | struct meson_spifc *spifc; |
|---|
| 295 | | - struct resource *res; |
|---|
| 296 | 289 | void __iomem *base; |
|---|
| 297 | 290 | unsigned int rate; |
|---|
| 298 | 291 | int ret = 0; |
|---|
| .. | .. |
|---|
| 306 | 299 | spifc = spi_master_get_devdata(master); |
|---|
| 307 | 300 | spifc->dev = &pdev->dev; |
|---|
| 308 | 301 | |
|---|
| 309 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 310 | | - base = devm_ioremap_resource(spifc->dev, res); |
|---|
| 302 | + base = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 311 | 303 | if (IS_ERR(base)) { |
|---|
| 312 | 304 | ret = PTR_ERR(base); |
|---|
| 313 | 305 | goto out_err; |
|---|