diff mbox series

[2/2] libpdbg: Replace hard-coded chip id with defines

Message ID 20200526051312.71133-2-amitay@ozlabs.org
State Accepted
Headers show
Series [1/2] libpdbg: Move chip id definitions to common header | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (86851b290ac1771b9a6fb0d5238ebf459ea80a21)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs May 26, 2020, 5:13 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/cfam.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Alistair Popple June 15, 2020, 7:39 a.m. UTC | #1
Reviewed-by: Alistair Popple <alistair@popple.id.au>

On Tuesday, 26 May 2020 3:13:12 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
> ---
>  libpdbg/cfam.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c
> index 0b0b6f0..0b670d8 100644
> --- a/libpdbg/cfam.c
> +++ b/libpdbg/cfam.c
> @@ -241,11 +241,11 @@ DECLARE_HW_UNIT(p8_opb);
>  enum chip_type get_chip_type(uint64_t chip_id)
>  {
>  	switch(GETFIELD(PPC_BITMASK32(12, 19), chip_id)) {
> -	case 0xea:
> +	case CHIP_ID_P8:
>  		return CHIP_P8;
> -	case 0xd3:
> +	case CHIP_ID_P8P:
>  		return CHIP_P8NV;
> -	case 0xd1:
> +	case CHIP_ID_P9:
>  		return CHIP_P9;
>  	default:
>  		return CHIP_UNKNOWN;
>
diff mbox series

Patch

diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c
index 0b0b6f0..0b670d8 100644
--- a/libpdbg/cfam.c
+++ b/libpdbg/cfam.c
@@ -241,11 +241,11 @@  DECLARE_HW_UNIT(p8_opb);
 enum chip_type get_chip_type(uint64_t chip_id)
 {
 	switch(GETFIELD(PPC_BITMASK32(12, 19), chip_id)) {
-	case 0xea:
+	case CHIP_ID_P8:
 		return CHIP_P8;
-	case 0xd3:
+	case CHIP_ID_P8P:
 		return CHIP_P8NV;
-	case 0xd1:
+	case CHIP_ID_P9:
 		return CHIP_P9;
 	default:
 		return CHIP_UNKNOWN;