arm: Finish migration of CONFIG_MACH_TYPE

As this is only useful when booting with ATAGs, which are now largely
disabled, remove this value for the remaining platforms.  We have a few
places in the code that had been testing for MACH_TYPE as a sort of
internal logic.  Update those to use different but still correct CONFIG
symbols.

Cc: Phil Sutter <phil@nwl.cc>
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2021-08-30 09:16:32 -04:00
parent 87e8d38a39
commit 5f588f831b
88 changed files with 24 additions and 268 deletions

View File

@@ -73,8 +73,10 @@ int board_early_init_f(void)
int board_init(void)
{
#ifdef CONFIG_MACH_TYPE
/* Machine number */
gd->bd->bi_arch_number = CONFIG_MACH_TYPE;
#endif
/* Boot parameters address */
gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;

View File

@@ -15,14 +15,15 @@
static unsigned int syno_board_id(void)
{
#ifdef CONFIG_MACH_TYPE
switch (CONFIG_MACH_TYPE) {
case 527:
return SYNO_DS109_ID;
case 3036:
return SYNO_AXP_4BAY_2BAY;
default:
return 0;
}
#endif
return 0;
}
static unsigned int usb_port_modes(void)

View File

@@ -16,7 +16,7 @@
#include <asm/gpio.h>
/* TODO: Remove this code when the SPI switch is working */
#if (CONFIG_MACH_TYPE != MACH_TYPE_VENTANA)
#ifndef CONFIG_TARGET_VENTANA
void gpio_early_init_uart(void)
{
/* Enable UART via GPIO_PI3 (port 8, bit 3) so serial console works */

View File

@@ -493,24 +493,24 @@ static int get_cfgblock_interactive(void)
else
tdx_hw_tag.prodid = COLIBRI_PXA270_520MHZ;
}
#ifdef CONFIG_MACH_TYPE
#if defined(CONFIG_TARGET_APALIS_T30) || defined(CONFIG_TARGET_COLIBRI_T30)
else if (!strcmp("tegra30", soc)) {
if (CONFIG_MACH_TYPE == MACH_TYPE_APALIS_T30) {
if (it == 'y' || it == 'Y')
tdx_hw_tag.prodid = APALIS_T30_IT;
#ifdef CONFIG_TARGET_APALIS_T30
if (it == 'y' || it == 'Y')
tdx_hw_tag.prodid = APALIS_T30_IT;
else
if (gd->ram_size == 0x40000000)
tdx_hw_tag.prodid = APALIS_T30_1GB;
else
if (gd->ram_size == 0x40000000)
tdx_hw_tag.prodid = APALIS_T30_1GB;
else
tdx_hw_tag.prodid = APALIS_T30_2GB;
} else {
if (it == 'y' || it == 'Y')
tdx_hw_tag.prodid = COLIBRI_T30_IT;
else
tdx_hw_tag.prodid = COLIBRI_T30;
}
tdx_hw_tag.prodid = APALIS_T30_2GB;
#else
if (it == 'y' || it == 'Y')
tdx_hw_tag.prodid = COLIBRI_T30_IT;
else
tdx_hw_tag.prodid = COLIBRI_T30;
#endif
}
#endif /* CONFIG_MACH_TYPE */
#endif /* CONFIG_TARGET_APALIS_T30 || CONFIG_TARGET_COLIBRI_T30 */
else if (!strcmp("tegra124", soc)) {
tdx_hw_tag.prodid = APALIS_TK1_2GB;
} else if (!strcmp("vf500", soc)) {