Quentin Schulz | 3add62d | 2018-08-31 16:28:29 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * (C) Copyright 2018 |
| 4 | * Quentin Schulz, Bootlin, quentin.schulz@bootlin.com |
| 5 | * |
| 6 | * Structure for use with U_BOOT_DEVICE for pl022 SPI devices or to use |
| 7 | * in ofdata_to_platdata. |
| 8 | */ |
| 9 | |
| 10 | #ifndef __PL022_SPI_H__ |
| 11 | #define __PL022_SPI_H__ |
| 12 | |
| 13 | #if !CONFIG_IS_ENABLED(OF_PLATDATA) |
| 14 | #include <clk.h> |
| 15 | #endif |
| 16 | #include <fdtdec.h> |
| 17 | |
| 18 | struct pl022_spi_pdata { |
| 19 | fdt_addr_t addr; |
| 20 | fdt_size_t size; |
| 21 | #if !CONFIG_IS_ENABLED(OF_PLATDATA) |
| 22 | struct clk clk; |
| 23 | #else |
| 24 | unsigned int freq; |
| 25 | #endif |
| 26 | }; |
| 27 | |
| 28 | #endif |