Commit ecac7036 authored by Sven Schnelle's avatar Sven Schnelle Committed by Helge Deller

parisc/firmware: add functions to retrieve TOC data

Add functions to retrieve TOC data from firmware both
for 1.1 and 2.0 PDC.
Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent d9e20336
......@@ -51,6 +51,8 @@ int pdc_spaceid_bits(unsigned long *space_bits);
int pdc_btlb_info(struct pdc_btlb_info *btlb);
int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
#endif /* !CONFIG_PA20 */
int pdc_pim_toc11(struct pdc_toc_pim_11 *ret);
int pdc_pim_toc20(struct pdc_toc_pim_20 *ret);
int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa);
int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count);
......
......@@ -1061,6 +1061,38 @@ int pdc_mem_pdt_read_entries(struct pdc_mem_read_pdt *pret,
return retval;
}
/**
* pdc_pim_toc11 - Fetch TOC PIM 1.1 data from firmware.
* @ret: pointer to return buffer
*/
int pdc_pim_toc11(struct pdc_toc_pim_11 *ret)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_PIM, PDC_PIM_TOC, __pa(pdc_result),
__pa(ret), sizeof(*ret));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
/**
* pdc_pim_toc20 - Fetch TOC PIM 2.0 data from firmware.
* @ret: pointer to return buffer
*/
int pdc_pim_toc20(struct pdc_toc_pim_20 *ret)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_PIM, PDC_PIM_TOC, __pa(pdc_result),
__pa(ret), sizeof(*ret));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
/**
* pdc_tod_set - Set the Time-Of-Day clock.
* @sec: The number of seconds since epoch.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment