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