forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/arch/arm/mach-pxa/icontrol.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-pxa/icontrol.c
34 *
....@@ -7,14 +8,11 @@
78 * Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd.
89 *
910 * 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.
1411 */
1512
1613 #include <linux/irq.h>
1714 #include <linux/platform_device.h>
15
+#include <linux/property.h>
1816 #include <linux/gpio.h>
1917
2018 #include <asm/mach-types.h>
....@@ -25,7 +23,6 @@
2523
2624 #include <linux/spi/spi.h>
2725 #include <linux/spi/pxa2xx_spi.h>
28
-#include <linux/can/platform/mcp251x.h>
2926 #include <linux/regulator/machine.h>
3027
3128 #include "generic.h"
....@@ -72,8 +69,9 @@
7269 .gpio_cs = ICONTROL_MCP251x_nCS4
7370 };
7471
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
+ {}
7775 };
7876
7977 static struct spi_board_info mcp251x_board_info[] = {
....@@ -82,7 +80,7 @@
8280 .max_speed_hz = 6500000,
8381 .bus_num = 3,
8482 .chip_select = 0,
85
- .platform_data = &mcp251x_info,
83
+ .properties = mcp251x_properties,
8684 .controller_data = &mcp251x_chip_info1,
8785 .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ1)
8886 },
....@@ -91,7 +89,7 @@
9189 .max_speed_hz = 6500000,
9290 .bus_num = 3,
9391 .chip_select = 1,
94
- .platform_data = &mcp251x_info,
92
+ .properties = mcp251x_properties,
9593 .controller_data = &mcp251x_chip_info2,
9694 .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ2)
9795 },
....@@ -100,7 +98,7 @@
10098 .max_speed_hz = 6500000,
10199 .bus_num = 4,
102100 .chip_select = 0,
103
- .platform_data = &mcp251x_info,
101
+ .properties = mcp251x_properties,
104102 .controller_data = &mcp251x_chip_info3,
105103 .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ3)
106104 },
....@@ -109,18 +107,18 @@
109107 .max_speed_hz = 6500000,
110108 .bus_num = 4,
111109 .chip_select = 1,
112
- .platform_data = &mcp251x_info,
110
+ .properties = mcp251x_properties,
113111 .controller_data = &mcp251x_chip_info4,
114112 .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ4)
115113 }
116114 };
117115
118
-static struct pxa2xx_spi_master pxa_ssp3_spi_master_info = {
116
+static struct pxa2xx_spi_controller pxa_ssp3_spi_master_info = {
119117 .num_chipselect = 2,
120118 .enable_dma = 1
121119 };
122120
123
-static struct pxa2xx_spi_master pxa_ssp4_spi_master_info = {
121
+static struct pxa2xx_spi_controller pxa_ssp4_spi_master_info = {
124122 .num_chipselect = 2,
125123 .enable_dma = 1
126124 };