diff options
author | Helge Deller <deller@gmx.de> | 2019-02-08 18:28:13 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2019-02-21 20:37:13 +0100 |
commit | 8207d4ee44d3f525bf9aa57807ac9db5d0d90c1a (patch) | |
tree | 13c14cc3d981f137402301355c92cf4f58abb351 /arch/parisc/kernel/firmware.c | |
parent | parisc: Add constants for PDC_RELOCATE PDC call (diff) | |
download | linux-8207d4ee44d3f525bf9aa57807ac9db5d0d90c1a.tar.xz linux-8207d4ee44d3f525bf9aa57807ac9db5d0d90c1a.zip |
parisc: Show machine product number during boot
Ask PDC firmware during boot for the original and current product
number as well as the serial number and show it (if available).
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/firmware.c')
-rw-r--r-- | arch/parisc/kernel/firmware.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index e6f3b49f2fd7..7a17551ea31e 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -569,6 +569,30 @@ int pdc_model_capabilities(unsigned long *capabilities) } /** + * pdc_model_platform_info - Returns machine product and serial number. + * @orig_prod_num: Return buffer for original product number. + * @current_prod_num: Return buffer for current product number. + * @serial_no: Return buffer for serial number. + * + * Returns strings containing the original and current product numbers and the + * serial number of the system. + */ +int pdc_model_platform_info(char *orig_prod_num, char *current_prod_num, + char *serial_no) +{ + int retval; + unsigned long flags; + + spin_lock_irqsave(&pdc_lock, flags); + retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_GET_PLATFORM_INFO, + __pa(orig_prod_num), __pa(current_prod_num), __pa(serial_no)); + convert_to_wide(pdc_result); + spin_unlock_irqrestore(&pdc_lock, flags); + + return retval; +} + +/** * pdc_cache_info - Return cache and TLB information. * @cache_info: The return buffer. * |