.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-pxa/icontrol.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd. |
---|
8 | 9 | * |
---|
9 | 10 | * 2010-01-21 Hennie van der Merve <hvdmerwe@tmtservies.co.za> |
---|
10 | | - * |
---|
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 | 11 | */ |
---|
15 | 12 | |
---|
16 | 13 | #include <linux/irq.h> |
---|
17 | 14 | #include <linux/platform_device.h> |
---|
| 15 | +#include <linux/property.h> |
---|
18 | 16 | #include <linux/gpio.h> |
---|
19 | 17 | |
---|
20 | 18 | #include <asm/mach-types.h> |
---|
.. | .. |
---|
25 | 23 | |
---|
26 | 24 | #include <linux/spi/spi.h> |
---|
27 | 25 | #include <linux/spi/pxa2xx_spi.h> |
---|
28 | | -#include <linux/can/platform/mcp251x.h> |
---|
29 | 26 | #include <linux/regulator/machine.h> |
---|
30 | 27 | |
---|
31 | 28 | #include "generic.h" |
---|
.. | .. |
---|
72 | 69 | .gpio_cs = ICONTROL_MCP251x_nCS4 |
---|
73 | 70 | }; |
---|
74 | 71 | |
---|
75 | | -static struct mcp251x_platform_data mcp251x_info = { |
---|
76 | | - .oscillator_frequency = 16E6, |
---|
| 72 | +static const struct property_entry mcp251x_properties[] = { |
---|
| 73 | + PROPERTY_ENTRY_U32("clock-frequency", 16000000), |
---|
| 74 | + {} |
---|
77 | 75 | }; |
---|
78 | 76 | |
---|
79 | 77 | static struct spi_board_info mcp251x_board_info[] = { |
---|
.. | .. |
---|
82 | 80 | .max_speed_hz = 6500000, |
---|
83 | 81 | .bus_num = 3, |
---|
84 | 82 | .chip_select = 0, |
---|
85 | | - .platform_data = &mcp251x_info, |
---|
| 83 | + .properties = mcp251x_properties, |
---|
86 | 84 | .controller_data = &mcp251x_chip_info1, |
---|
87 | 85 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ1) |
---|
88 | 86 | }, |
---|
.. | .. |
---|
91 | 89 | .max_speed_hz = 6500000, |
---|
92 | 90 | .bus_num = 3, |
---|
93 | 91 | .chip_select = 1, |
---|
94 | | - .platform_data = &mcp251x_info, |
---|
| 92 | + .properties = mcp251x_properties, |
---|
95 | 93 | .controller_data = &mcp251x_chip_info2, |
---|
96 | 94 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ2) |
---|
97 | 95 | }, |
---|
.. | .. |
---|
100 | 98 | .max_speed_hz = 6500000, |
---|
101 | 99 | .bus_num = 4, |
---|
102 | 100 | .chip_select = 0, |
---|
103 | | - .platform_data = &mcp251x_info, |
---|
| 101 | + .properties = mcp251x_properties, |
---|
104 | 102 | .controller_data = &mcp251x_chip_info3, |
---|
105 | 103 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ3) |
---|
106 | 104 | }, |
---|
.. | .. |
---|
109 | 107 | .max_speed_hz = 6500000, |
---|
110 | 108 | .bus_num = 4, |
---|
111 | 109 | .chip_select = 1, |
---|
112 | | - .platform_data = &mcp251x_info, |
---|
| 110 | + .properties = mcp251x_properties, |
---|
113 | 111 | .controller_data = &mcp251x_chip_info4, |
---|
114 | 112 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ4) |
---|
115 | 113 | } |
---|
116 | 114 | }; |
---|
117 | 115 | |
---|
118 | | -static struct pxa2xx_spi_master pxa_ssp3_spi_master_info = { |
---|
| 116 | +static struct pxa2xx_spi_controller pxa_ssp3_spi_master_info = { |
---|
119 | 117 | .num_chipselect = 2, |
---|
120 | 118 | .enable_dma = 1 |
---|
121 | 119 | }; |
---|
122 | 120 | |
---|
123 | | -static struct pxa2xx_spi_master pxa_ssp4_spi_master_info = { |
---|
| 121 | +static struct pxa2xx_spi_controller pxa_ssp4_spi_master_info = { |
---|
124 | 122 | .num_chipselect = 2, |
---|
125 | 123 | .enable_dma = 1 |
---|
126 | 124 | }; |
---|