diff mbox series

[1/2] board: gateworks: venice: add additional levels for dtb name match

Message ID 20220408221433.25516-2-tharvey@gateworks.com
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series Add support for Gateworks imx8mp-venice-gw74xx | expand

Commit Message

Tim Harvey April 8, 2022, 10:14 p.m. UTC
Gateworks produces many products from a single PCB with subloaded
components. Add an additional two levels of dtb name matching so that
for example a GW7400-A matches the dtb name of gw74xx.dtb

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/eeprom.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Stefano Babic April 13, 2022, 8:21 a.m. UTC | #1
Hi Tim,

(quite unrelated to this series): after applying tons of patches, there 
are a list that are obsolete and need to be rebased. I applied several 
of the patches you sent, some have open issues, some cannot be applied 
(as this series), as they depend on other patches too.

I would appreciate if you can check what is missing for Gateworks, and 
then repost on top of u-boot-imx (or you wait my PR to Tom, I will send 
it today).

Thanks,
Stefano

On 09.04.22 00:14, Tim Harvey wrote:
> Gateworks produces many products from a single PCB with subloaded
> components. Add an additional two levels of dtb name matching so that
> for example a GW7400-A matches the dtb name of gw74xx.dtb
> 
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>   board/gateworks/venice/eeprom.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/board/gateworks/venice/eeprom.c b/board/gateworks/venice/eeprom.c
> index 62b8125960c7..282d55f2ae30 100644
> --- a/board/gateworks/venice/eeprom.c
> +++ b/board/gateworks/venice/eeprom.c
> @@ -259,8 +259,16 @@ const char *eeprom_get_dtb_name(int level, char *buf, int sz)
>   			break;
>   		case 2: /* don't care about PCB or BOM revision */
>   			break;
> +		case 3: /* don't care about last digit of model */
> +			buf[strlen(buf) - 1] = 'x';
> +			break;
> +		case 4: /* don't care about last two digits of model */
> +			buf[strlen(buf) - 1] = 'x';
> +			buf[strlen(buf) - 2] = 'x';
> +			break;
>   		default:
>   			return NULL;
> +			break;
>   		}
>   	}
>
Tim Harvey April 13, 2022, 6:31 p.m. UTC | #2
On Wed, Apr 13, 2022 at 1:21 AM Stefano Babic <sbabic@denx.de> wrote:
>
> Hi Tim,
>
> (quite unrelated to this series): after applying tons of patches, there
> are a list that are obsolete and need to be rebased. I applied several
> of the patches you sent, some have open issues, some cannot be applied
> (as this series), as they depend on other patches too.
>
> I would appreciate if you can check what is missing for Gateworks, and
> then repost on top of u-boot-imx (or you wait my PR to Tom, I will send
> it today).
>

Stefano,

Thanks - I've rebased and re-submitted everything I have in my queue.

Best Regards,

Tim
diff mbox series

Patch

diff --git a/board/gateworks/venice/eeprom.c b/board/gateworks/venice/eeprom.c
index 62b8125960c7..282d55f2ae30 100644
--- a/board/gateworks/venice/eeprom.c
+++ b/board/gateworks/venice/eeprom.c
@@ -259,8 +259,16 @@  const char *eeprom_get_dtb_name(int level, char *buf, int sz)
 			break;
 		case 2: /* don't care about PCB or BOM revision */
 			break;
+		case 3: /* don't care about last digit of model */
+			buf[strlen(buf) - 1] = 'x';
+			break;
+		case 4: /* don't care about last two digits of model */
+			buf[strlen(buf) - 1] = 'x';
+			buf[strlen(buf) - 2] = 'x';
+			break;
 		default:
 			return NULL;
+			break;
 		}
 	}