From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vince Hsu Subject: Re: [PATCH 2/3] Add Tegra132 support for the cbootimage utility Date: Tue, 15 Jul 2014 04:56:34 +0800 Message-ID: <53C44402.8020803@nvidia.com> References: <1404987710-26375-1-git-send-email-vinceh@nvidia.com> <1404987710-26375-2-git-send-email-vinceh@nvidia.com> <20140711182317.GA1730@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140711182317.GA1730-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Allen Martin Cc: "swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org" , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-tegra@vger.kernel.org Hi, On 07/12/2014 02:23 AM, Allen Martin wrote: >> >+cbootimage_soc_config tegra132_config = { >> >+ .init_bad_block_table = t132_init_bad_block_table, >> >+ .set_dev_param = t132_set_dev_param, >> >+ .get_dev_param = t132_get_dev_param, >> >+ .set_sdram_param = t132_set_sdram_param, >> >+ .get_sdram_param = t132_get_sdram_param, >> >+ .setbl_param = t132_setbl_param, >> >+ .getbl_param = t132_getbl_param, >> >+ .set_value = t132_bct_set_value, >> >+ .get_value = t132_bct_get_value, >> >+ .set_data = t132_bct_set_data, >> >+ .get_bct_size = t132_get_bct_size, >> >+ .set_mts_info = t132_set_mts_info, >> >+ .get_mts_info = t132_get_mts_info, >> >+ .token_supported = t132_bct_token_supported, >> >+ >> >+ .devtype_table = s_devtype_table_t132, >> >+ .sdmmc_data_width_table = s_sdmmc_data_width_table_t132, >> >+ .spi_clock_source_table = s_spi_clock_source_table_t132, >> >+ .nvboot_memory_type_table = s_nvboot_memory_type_table_t132, >> >+ .sdram_field_table = s_sdram_field_table_t132, >> >+ .nand_table = 0, >> >+ .sdmmc_table = s_sdmmc_table_t132, >> >+ .spiflash_table = s_spiflash_table_t132, >> >+ .device_type_table = s_device_type_table_t132, >> >+}; >> >+ > Since Tegra132 and Tegra124 are so similar, can we reuse the Tegra124 > version of any of these to avoid the duplication? Some of these functions like setbl_param refer to the macros/definitions in nvboot_bct_txx.h. So maybe they look similar, actually they don't. If we want to generalize these functions, we might have to refactor nvboot_bct_txx.h and some more stuff. Can we leave it as is? Thanks, Vince