193198b6cSCorey Minyard /* 293198b6cSCorey Minyard * QEMU SMBus EEPROM API 393198b6cSCorey Minyard * 493198b6cSCorey Minyard * Permission is hereby granted, free of charge, to any person obtaining a copy 593198b6cSCorey Minyard * of this software and associated documentation files (the "Software"), to deal 693198b6cSCorey Minyard * in the Software without restriction, including without limitation the rights 793198b6cSCorey Minyard * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 893198b6cSCorey Minyard * copies of the Software, and to permit persons to whom the Software is 993198b6cSCorey Minyard * furnished to do so, subject to the following conditions: 1093198b6cSCorey Minyard * 1193198b6cSCorey Minyard * The above copyright notice and this permission notice shall be included in 1293198b6cSCorey Minyard * all copies or substantial portions of the Software. 1393198b6cSCorey Minyard * 1493198b6cSCorey Minyard * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1593198b6cSCorey Minyard * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1693198b6cSCorey Minyard * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1793198b6cSCorey Minyard * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1893198b6cSCorey Minyard * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1993198b6cSCorey Minyard * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 2093198b6cSCorey Minyard * THE SOFTWARE. 2193198b6cSCorey Minyard */ 2293198b6cSCorey Minyard 2393198b6cSCorey Minyard #ifndef HW_SMBUS_EEPROM_H 2493198b6cSCorey Minyard #define HW_SMBUS_EEPROM_H 2593198b6cSCorey Minyard 26*d4842052SMarkus Armbruster #include "exec/cpu-common.h" 2793198b6cSCorey Minyard #include "hw/i2c/i2c.h" 2893198b6cSCorey Minyard 2993198b6cSCorey Minyard void smbus_eeprom_init_one(I2CBus *bus, uint8_t address, uint8_t *eeprom_buf); 3093198b6cSCorey Minyard void smbus_eeprom_init(I2CBus *bus, int nb_eeprom, 3193198b6cSCorey Minyard const uint8_t *eeprom_spd, int size); 3293198b6cSCorey Minyard 3393198b6cSCorey Minyard enum sdram_type { SDR = 0x4, DDR = 0x7, DDR2 = 0x8 }; 3493198b6cSCorey Minyard uint8_t *spd_data_generate(enum sdram_type type, ram_addr_t size, Error **errp); 3593198b6cSCorey Minyard 3693198b6cSCorey Minyard #endif 37