rockchip: Kconfig: add CONFIG_ROCKCHIP_HWID_DTB for hw-id dtb
Only a few developers need this feature, disable it by default. Change-Id: I074594c8e47c34a05324e363d11613383f3528a7 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
a6926964ec
commit
ca6fb2913f
|
|
@ -596,6 +596,14 @@ config ROCKCHIP_EARLY_DISTRO_DTB_PATH
|
||||||
"DTB file path in the bootable partition image"
|
"DTB file path in the bootable partition image"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
config ROCKCHIP_HWID_DTB
|
||||||
|
bool "Enable support for selecting DTB by hardware id"
|
||||||
|
depends on ROCKCHIP_RESOURCE_IMAGE
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
This enables select the expected DTB from sets by hardware id,
|
||||||
|
i.e. GPIO or ADC value.
|
||||||
|
|
||||||
config ROCKCHIP_VENDOR_PARTITION
|
config ROCKCHIP_VENDOR_PARTITION
|
||||||
bool "Rockchip vendor storage partition support"
|
bool "Rockchip vendor storage partition support"
|
||||||
depends on RKIMG_BOOTLOADER
|
depends on RKIMG_BOOTLOADER
|
||||||
|
|
|
||||||
|
|
@ -525,6 +525,7 @@ int rockchip_read_resource_file(void *buf, const char *name,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_ROCKCHIP_HWID_DTB
|
||||||
#define is_digit(c) ((c) >= '0' && (c) <= '9')
|
#define is_digit(c) ((c) >= '0' && (c) <= '9')
|
||||||
#define is_abcd(c) ((c) >= 'a' && (c) <= 'd')
|
#define is_abcd(c) ((c) >= 'a' && (c) <= 'd')
|
||||||
#define is_equal(c) ((c) == '=')
|
#define is_equal(c) ((c) == '=')
|
||||||
|
|
@ -537,7 +538,6 @@ int rockchip_read_resource_file(void *buf, const char *name,
|
||||||
#define MAX_ADC_CH_NR 10
|
#define MAX_ADC_CH_NR 10
|
||||||
#define MAX_GPIO_NR 10
|
#define MAX_GPIO_NR 10
|
||||||
|
|
||||||
#ifdef CONFIG_ADC
|
|
||||||
/*
|
/*
|
||||||
* How to make it works ?
|
* How to make it works ?
|
||||||
*
|
*
|
||||||
|
|
@ -626,12 +626,6 @@ static int rockchip_read_dtb_by_adc(const char *file_name)
|
||||||
|
|
||||||
return found ? 0 : -ENOENT;
|
return found ? 0 : -ENOENT;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static int rockchip_read_dtb_by_adc(const char *file_name)
|
|
||||||
{
|
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int gpio_parse_base_address(fdt_addr_t *gpio_base_addr)
|
static int gpio_parse_base_address(fdt_addr_t *gpio_base_addr)
|
||||||
{
|
{
|
||||||
|
|
@ -793,6 +787,7 @@ static struct resource_file *rockchip_read_hwid_dtb(void)
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ROCKCHIP_EARLY_DISTRO_DTB
|
#ifdef CONFIG_ROCKCHIP_EARLY_DISTRO_DTB
|
||||||
static int rockchip_read_distro_dtb(void *fdt_addr)
|
static int rockchip_read_distro_dtb(void *fdt_addr)
|
||||||
|
|
@ -859,7 +854,9 @@ int rockchip_read_dtb_file(void *fdt_addr)
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
return ret; /* found & load done */
|
return ret; /* found & load done */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_ROCKCHIP_HWID_DTB
|
||||||
file = rockchip_read_hwid_dtb();
|
file = rockchip_read_hwid_dtb();
|
||||||
|
#endif
|
||||||
if (!file)
|
if (!file)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue