forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/arm/mach-davinci/board-sffsdr.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Lyrtech SFFSDR board support.
34 *
....@@ -7,26 +8,12 @@
78 * Based on DV-EVM platform, original copyright follows:
89 *
910 * Copyright (C) 2007 MontaVista Software, Inc.
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 as published by
13
- * the Free Software Foundation; either version 2 of the License, or
14
- * (at your option) any later version.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; if not, write to the Free Software
23
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2411 */
2512
2613 #include <linux/init.h>
2714 #include <linux/platform_device.h>
2815 #include <linux/i2c.h>
29
-#include <linux/platform_data/at24.h>
16
+#include <linux/property.h>
3017 #include <linux/mtd/mtd.h>
3118 #include <linux/mtd/rawnand.h>
3219 #include <linux/mtd/partitions.h>
....@@ -92,16 +79,15 @@
9279 .resource = davinci_sffsdr_nandflash_resource,
9380 };
9481
95
-static struct at24_platform_data eeprom_info = {
96
- .byte_len = (64*1024) / 8,
97
- .page_size = 32,
98
- .flags = AT24_FLAG_ADDR16,
82
+static const struct property_entry eeprom_properties[] = {
83
+ PROPERTY_ENTRY_U32("pagesize", 32),
84
+ { }
9985 };
10086
10187 static struct i2c_board_info __initdata i2c_info[] = {
10288 {
103
- I2C_BOARD_INFO("24lc64", 0x50),
104
- .platform_data = &eeprom_info,
89
+ I2C_BOARD_INFO("24c64", 0x50),
90
+ .properties = eeprom_properties,
10591 },
10692 /* Other I2C devices:
10793 * MSP430, addr 0x23 (not used)
....@@ -153,7 +139,7 @@
153139 MACHINE_START(SFFSDR, "Lyrtech SFFSDR")
154140 .atag_offset = 0x100,
155141 .map_io = davinci_sffsdr_map_io,
156
- .init_irq = davinci_irq_init,
142
+ .init_irq = dm644x_init_irq,
157143 .init_time = dm644x_init_time,
158144 .init_machine = davinci_sffsdr_init,
159145 .init_late = davinci_init_late,