| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Lyrtech SFFSDR board support. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 7 | 8 | * Based on DV-EVM platform, original copyright follows: |
|---|
| 8 | 9 | * |
|---|
| 9 | 10 | * 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. |
|---|
| 24 | 11 | */ |
|---|
| 25 | 12 | |
|---|
| 26 | 13 | #include <linux/init.h> |
|---|
| 27 | 14 | #include <linux/platform_device.h> |
|---|
| 28 | 15 | #include <linux/i2c.h> |
|---|
| 29 | | -#include <linux/platform_data/at24.h> |
|---|
| 16 | +#include <linux/property.h> |
|---|
| 30 | 17 | #include <linux/mtd/mtd.h> |
|---|
| 31 | 18 | #include <linux/mtd/rawnand.h> |
|---|
| 32 | 19 | #include <linux/mtd/partitions.h> |
|---|
| .. | .. |
|---|
| 92 | 79 | .resource = davinci_sffsdr_nandflash_resource, |
|---|
| 93 | 80 | }; |
|---|
| 94 | 81 | |
|---|
| 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 | + { } |
|---|
| 99 | 85 | }; |
|---|
| 100 | 86 | |
|---|
| 101 | 87 | static struct i2c_board_info __initdata i2c_info[] = { |
|---|
| 102 | 88 | { |
|---|
| 103 | | - I2C_BOARD_INFO("24lc64", 0x50), |
|---|
| 104 | | - .platform_data = &eeprom_info, |
|---|
| 89 | + I2C_BOARD_INFO("24c64", 0x50), |
|---|
| 90 | + .properties = eeprom_properties, |
|---|
| 105 | 91 | }, |
|---|
| 106 | 92 | /* Other I2C devices: |
|---|
| 107 | 93 | * MSP430, addr 0x23 (not used) |
|---|
| .. | .. |
|---|
| 153 | 139 | MACHINE_START(SFFSDR, "Lyrtech SFFSDR") |
|---|
| 154 | 140 | .atag_offset = 0x100, |
|---|
| 155 | 141 | .map_io = davinci_sffsdr_map_io, |
|---|
| 156 | | - .init_irq = davinci_irq_init, |
|---|
| 142 | + .init_irq = dm644x_init_irq, |
|---|
| 157 | 143 | .init_time = dm644x_init_time, |
|---|
| 158 | 144 | .init_machine = davinci_sffsdr_init, |
|---|
| 159 | 145 | .init_late = davinci_init_late, |
|---|