Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Nikita Kiryanov | e4e2bf5 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il> |
| 4 | * |
| 5 | * Authors: Nikita Kiryanov <nikita@compulab.co.il> |
| 6 | * Igor Grinberg <grinberg@compulab.co.il> |
Nikita Kiryanov | e4e2bf5 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 7 | */ |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 8 | |
Nikita Kiryanov | e4e2bf5 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 9 | #ifndef _EEPROM_ |
| 10 | #define _EEPROM_ |
Nikita Kiryanov | 53af877 | 2015-09-06 11:48:37 +0300 | [diff] [blame] | 11 | #include <errno.h> |
Nikita Kiryanov | e4e2bf5 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 12 | |
Tom Rini | 55dabcc | 2021-08-18 23:12:24 -0400 | [diff] [blame] | 13 | #if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) |
Nikita Kiryanov | e7a2447 | 2015-01-14 10:42:43 +0200 | [diff] [blame] | 14 | int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus); |
Nikita Kiryanov | 72898ac | 2015-09-06 11:48:35 +0300 | [diff] [blame] | 15 | u32 cl_eeprom_get_board_rev(uint eeprom_bus); |
Nikita Kiryanov | 53af877 | 2015-09-06 11:48:37 +0300 | [diff] [blame] | 16 | int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus); |
Nikita Kiryanov | e4e2bf5 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 17 | #else |
Nikita Kiryanov | e7a2447 | 2015-01-14 10:42:43 +0200 | [diff] [blame] | 18 | static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus) |
Nikita Kiryanov | e4e2bf5 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 19 | { |
| 20 | return 1; |
| 21 | } |
Nikita Kiryanov | 72898ac | 2015-09-06 11:48:35 +0300 | [diff] [blame] | 22 | static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus) |
Nikita Kiryanov | 8c318eb | 2012-05-24 04:01:24 +0000 | [diff] [blame] | 23 | { |
| 24 | return 0; |
| 25 | } |
Nikita Kiryanov | 53af877 | 2015-09-06 11:48:37 +0300 | [diff] [blame] | 26 | static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus) |
| 27 | { |
| 28 | return -ENOSYS; |
| 29 | } |
Nikita Kiryanov | e4e2bf5 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 30 | #endif |
| 31 | |
| 32 | #endif |