Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcm_host: Recognise all Pi 4 variants, add BCM2711 #696

Merged
merged 1 commit into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions host_applications/linux/libs/bcm_host/bcm_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ int bcm_host_get_model_type(void)
return model_type;
}

/* Returns the type of the Pi being used
/* Test if the host is a member of the Pi 4 family (4B, 400 and CM4)
*/
int bcm_host_is_model_pi4(void)
{
return bcm_host_get_model_type() == 0x11 ? 1 : 0;
return bcm_host_get_processor_id() == BCM_HOST_PROCESSOR_BCM2711;
}

/* returns the processor ID
Expand Down
5 changes: 3 additions & 2 deletions host_applications/linux/libs/bcm_host/include/bcm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ unsigned bcm_host_get_sdram_address(void);

extern int bcm_host_get_model_type(void);

/* Returns 1 if model is Pi4
/* Returns 1 if host belongs to the Pi4 family (4B, 400 and CM4)
*/
extern int bcm_host_is_model_pi4(void);

Expand All @@ -95,7 +95,8 @@ extern int bcm_host_is_kms_active(void);
#define BCM_HOST_PROCESSOR_BCM2835 0
#define BCM_HOST_PROCESSOR_BCM2836 1
#define BCM_HOST_PROCESSOR_BCM2837 2
#define BCM_HOST_PROCESSOR_BCM2838 3
#define BCM_HOST_PROCESSOR_BCM2838 3 /* Deprecated name */
#define BCM_HOST_PROCESSOR_BCM2711 3

extern int bcm_host_get_processor_id(void);

Expand Down