aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/eeprom.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-06-20thunderbolt: Make tb_eeprom_get_drom_offset staticAndreas Noever1-1/+1
tb_eeprom_get_drom_offset is local to this file. Signed-off-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20thunderbolt: Make enum tb_drom_entry_type unsignedAndreas Noever1-1/+2
Force enum tb_drom_entry_type to unsigned to fix the following error: drivers/thunderbolt/eeprom.c:202:39: error: dubious one-bit signed bitfield Signed-off-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20thunderbolt: fix format string for size_tArnd Bergmann1-1/+1
The result of "sizeof(struct tb_drom_entry_port)" is a size_t, which is not necessarily the same as 'long', so we should use the appropriate %z format string instead of %l. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20thunderbolt: Fix build error in eeprom.cSachin Kamat1-0/+1
Fixes the below error: drivers/thunderbolt/eeprom.c:407:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration] drivers/thunderbolt/eeprom.c:444:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration] Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19thunderbolt: Read port configuration from eeprom.Andreas Noever1-4/+262
All Thunderbolt switches (except the root switch) contain a drom which contains information about the device. Right now we only read the UID. Add code to read and parse this drom. For now we are only interested in which ports are disabled and which ports are "dual link ports" (a physical thunderbolt port/socket contains two such ports). Signed-off-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19thunderbolt: Read switch uid from EEPROMAndreas Noever1-0/+189
Add eeprom access code and read the uid during switch initialization. The UID will be used to check device identity after suspend. Signed-off-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>