#!/usr/local/bin/perl # #***************************************************************************** # Copyright Statement: # -------------------- # This software is protected by Copyright and the information contained # herein is confidential. The software may not be copied and the information # contained herein may not be used or disclosed except with the written # permission of MediaTek Inc. (C) 2008 # # BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES # THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") # RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON # AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. # NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE # SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR # SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH # THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO # NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S # SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. # # BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE # LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, # AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, # OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO # MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. # # THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE # WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF # LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND # RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER # THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). # #****************************************************************************/ #* #* Filename: #* --------- #* emigen_sp.pl #* #* Project: #* -------- #* #* #* Description: #* ------------ #* This script will #* 1. parse custom_MemoryDevice.h to get memory device type and part number #* 2. read a excel file to get appropriate emi setting based on the part number #* 3. based on the emi settings, generate custom_EMI.c if not exist #* 4. based on the emi settings, generate custom_EMI.h if not exist #* #* Author: #* ------- #* #*============================================================================ #* HISTORY #* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! #*------------------------------------------------------------------------------ #* $Revision$ #* $Modtime$ #* $Log$ #* #* #*------------------------------------------------------------------------------ #* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! #*============================================================================ #****************************************************************************/ #**************************************************************************** # Included Modules #**************************************************************************** # original design, but perl does not support array of structure, really? # #my $CustomChip = () ; # # # an array of following structure: # # CustChip => NAND_ID # => CS0_PART_NUMBER # => CS1_PART_NUMBER # # # # # # use strict; use File::Basename; my $LOCAL_PATH; BEGIN { $LOCAL_PATH = dirname($0); } use lib "$LOCAL_PATH/../common"; use emigen_v1; &emigen_set_id("MT6785", "v45"); # platform can support these type of dram &emigen_support_ddr("LPDDR3"); &emigen_support_ddr("LPDDR4"); &emigen_support_ddr("LPDR4X"); #&emigen_support_ddr("LPDR4P"); &emigen_support_hw_trap("LPDDR3"); &emigen_support_hw_trap("LPDDR4"); &emigen_support_hw_trap("LPDR4X"); #&emigen_support_hw_trap("LPDR4P"); &emigen_check_bldr(1); #&emigen_run("custom/evb6763_64_emmc/inc/custom_MemoryDevice.h", "tools/emigen/MT6763/MemoryDeviceList_MT6763.xls", "evb6763_64_emmc_otp", "out/xxx/", 0); &emigen_run($ARGV[0], $ARGV[1], $ARGV[3], $ARGV[4], $ARGV[5]);