Skip to content

Commit

Permalink
Merge pull request #91 from SwethaParasa/master
Browse files Browse the repository at this point in the history
libpdbg: Add On Chip Controller (OCC) hardware unit
  • Loading branch information
aravynd authored Mar 20, 2024
2 parents 27a8112 + 40b0666 commit c1199fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libpdbg/hwunit.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,9 @@ struct pmic {
};
#define target_to_pmic(x) container_of(x, struct pmic, target)

struct occ {
struct pdbg_target target;
};
#define target_to_occ(x) container_of(x, struct occ, target)

#endif /* __HWUNIT_H */
11 changes: 11 additions & 0 deletions libpdbg/p10_fapi_targets.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,16 @@ struct pmic p10_pmic= {
};
DECLARE_HW_UNIT(p10_pmic);

struct occ p10_occ= {
.target = {
.name = "POWER10 On Chip Controller",
.compatible = "ibm,power10-occ",
.class = "occ",
.translate = no_translate,
},
};
DECLARE_HW_UNIT(p10_occ);

__attribute__((constructor))
static void register_p10_fapi_targets(void)
{
Expand Down Expand Up @@ -680,4 +690,5 @@ static void register_p10_fapi_targets(void)
pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p10_adc_hw_unit);
pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p10_gpio_expander_hw_unit);
pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p10_pmic_hw_unit);
pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p10_occ_hw_unit);
}

0 comments on commit c1199fe

Please sign in to comment.