diff options
-rw-r--r-- | app/aboot/aboot.c | 11 | ||||
-rw-r--r-- | include/boot_stats.h | 48 | ||||
-rw-r--r-- | include/reg.h | 3 | ||||
-rw-r--r-- | kernel/main.c | 10 | ||||
-rw-r--r-- | platform/init.c | 5 | ||||
-rw-r--r-- | platform/msm8974/include/platform/iomap.h | 6 | ||||
-rw-r--r-- | platform/msm8974/platform.c | 42 | ||||
-rw-r--r-- | platform/msm_shared/display.c | 3 | ||||
-rw-r--r-- | platform/msm_shared/include/mdp5.h | 41 | ||||
-rw-r--r-- | platform/msm_shared/include/mmc.h | 24 | ||||
-rw-r--r-- | platform/msm_shared/include/partition_parser.h | 22 | ||||
-rw-r--r-- | platform/msm_shared/mdp5.c | 60 | ||||
-rw-r--r-- | platform/msm_shared/mmc.c | 112 | ||||
-rw-r--r-- | platform/msm_shared/partition_parser.c | 22 | ||||
-rw-r--r-- | target/msm8974/target_display.c | 3 |
15 files changed, 269 insertions, 143 deletions
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c index f51f01dd..9a45feb0 100644 --- a/app/aboot/aboot.c +++ b/app/aboot/aboot.c @@ -49,6 +49,7 @@ #include <platform.h> #include <crypto_hash.h> #include <malloc.h> +#include <boot_stats.h> #if DEVICE_TREE #include <libfdt.h> @@ -444,7 +445,7 @@ void boot_linux(void *kernel, unsigned *tags, #if ARM_WITH_MMU arch_disable_mmu(); #endif - + bs_set_timestamp(BS_KERNEL_ENTRY); entry(0, machtype, (unsigned*)tags_phys); } @@ -542,6 +543,7 @@ int boot_linux_from_mmc(void) device.is_tampered = 1; dprintf(INFO, "Loading boot image (%d): start\n", imagesize_actual); + bs_set_timestamp(BS_KERNEL_LOAD_START); /* Read image without signature */ if (mmc_read(ptn + offset, (void *)image_addr, imagesize_actual)) @@ -551,6 +553,7 @@ int boot_linux_from_mmc(void) } dprintf(INFO, "Loading boot image (%d): done\n", imagesize_actual); + bs_set_timestamp(BS_KERNEL_LOAD_DONE); offset = imagesize_actual; /* Read signature */ @@ -639,6 +642,7 @@ int boot_linux_from_mmc(void) dprintf(INFO, "Loading boot image (%d): start\n", kernel_actual + ramdisk_actual); + bs_set_timestamp(BS_KERNEL_LOAD_START); offset = page_size; @@ -661,6 +665,7 @@ int boot_linux_from_mmc(void) dprintf(INFO, "Loading boot image (%d): done\n", kernel_actual + ramdisk_actual); + bs_set_timestamp(BS_KERNEL_LOAD_DONE); if(hdr->second_size != 0) { offset += second_actual; @@ -829,6 +834,7 @@ int boot_linux_from_flash(void) device.is_tampered = 1; dprintf(INFO, "Loading boot image (%d): start\n", imagesize_actual); + bs_set_timestamp(BS_KERNEL_LOAD_START); /* Read image without signature */ if (flash_read(ptn, offset, (void *)image_addr, imagesize_actual)) @@ -838,6 +844,7 @@ int boot_linux_from_flash(void) } dprintf(INFO, "Loading boot image (%d): done\n", imagesize_actual); + bs_set_timestamp(BS_KERNEL_LOAD_DONE); offset = imagesize_actual; /* Read signature */ @@ -890,6 +897,7 @@ int boot_linux_from_flash(void) dprintf(INFO, "Loading boot image (%d): start\n", kernel_actual + ramdisk_actual); + bs_set_timestamp(BS_KERNEL_LOAD_START); if (flash_read(ptn, offset, (void *)hdr->kernel_addr, kernel_actual)) { dprintf(CRITICAL, "ERROR: Cannot read kernel image\n"); @@ -905,6 +913,7 @@ int boot_linux_from_flash(void) dprintf(INFO, "Loading boot image (%d): done\n", kernel_actual + ramdisk_actual); + bs_set_timestamp(BS_KERNEL_LOAD_DONE); if(hdr->second_size != 0) { offset += second_actual; diff --git a/include/boot_stats.h b/include/boot_stats.h new file mode 100644 index 00000000..01774846 --- /dev/null +++ b/include/boot_stats.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Fundation, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef __BOOT_STATS_H +#define __BOOT_STATS_H + +/* The order of the entries in this enum does not correspond to bootup order. + * It is mandated by the expected order of the entries in imem when the values + * are read in the kernel. + */ +enum bs_entry { + BS_BL_START = 0, + BS_KERNEL_ENTRY, + BS_SPLASH_SCREEN_DISPLAY, + BS_KERNEL_LOAD_TIME, + BS_KERNEL_LOAD_START, + BS_KERNEL_LOAD_DONE, + BS_MAX, +}; +void bs_set_timestamp(enum bs_entry bs_id); + +#endif diff --git a/include/reg.h b/include/reg.h index b5dd5283..c6429479 100644 --- a/include/reg.h +++ b/include/reg.h @@ -41,4 +41,7 @@ #define writeb(v, a) (*REG8(a) = (v)) #define readb(a) (*REG8(a)) + +#define writehw(v, a) (*REG16(a) = (v)) +#define readhw(a) (*REG16(a)) #endif diff --git a/kernel/main.c b/kernel/main.c index 1167f31b..9999f854 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2008 Travis Geiselbrecht * - * Copyright (c) 2009, The Linux Foundation. All rights reserved. + * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files @@ -33,6 +33,7 @@ #include <kernel/thread.h> #include <kernel/timer.h> #include <kernel/dpc.h> +#include <boot_stats.h> extern void *__ctor_list; extern void *__ctor_end; @@ -48,7 +49,7 @@ void bootstrap_nandwrite(void); static void call_constructors(void) { void **ctor; - + ctor = &__ctor_list; while(ctor != &__ctor_end) { void (*func)(void); @@ -77,7 +78,8 @@ void kmain(void) target_early_init(); dprintf(INFO, "welcome to lk\n\n"); - + bs_set_timestamp(BS_BL_START); + // deal with any static constructors dprintf(SPEW, "calling constructors\n"); call_constructors(); @@ -132,7 +134,7 @@ static int bootstrap2(void *arg) // initialize the rest of the platform dprintf(SPEW, "initializing platform\n"); platform_init(); - + // initialize the target dprintf(SPEW, "initializing target\n"); target_init(); diff --git a/platform/init.c b/platform/init.c index 30f3e519..0c5a8506 100644 --- a/platform/init.c +++ b/platform/init.c @@ -23,6 +23,7 @@ #include <err.h> #include <debug.h> #include <platform.h> +#include <boot_stats.h> /* * default implementations of these routines, if the platform code @@ -90,3 +91,7 @@ __WEAK int image_verify(unsigned char * image_ptr, __WEAK ce_clock_init(void) { } + +__WEAK void bs_set_timestamp(enum bs_entry bs_id) +{ +} diff --git a/platform/msm8974/include/platform/iomap.h b/platform/msm8974/include/platform/iomap.h index 86f154d2..df49060a 100644 --- a/platform/msm8974/include/platform/iomap.h +++ b/platform/msm8974/include/platform/iomap.h @@ -39,8 +39,10 @@ #define RPM_MSG_RAM_BASE 0xFC42B000 #define SYSTEM_IMEM_BASE 0xFE800000 -#define RESTART_REASON_ADDR (RPM_MSG_RAM_BASE + 0x65C) -#define RESTART_REASON_ADDR_V2 (SYSTEM_IMEM_BASE + 0x565C) +#define MSM_SHARED_IMEM_BASE 0xFE850000 + +#define RESTART_REASON_ADDR (RPM_MSG_RAM_BASE + 0x65C) +#define RESTART_REASON_ADDR_V2 (MSM_SHARED_IMEM_BASE + 0x65C) #define KPSS_BASE 0xF9000000 diff --git a/platform/msm8974/platform.c b/platform/msm8974/platform.c index 430116bb..cb8876ec 100644 --- a/platform/msm8974/platform.c +++ b/platform/msm8974/platform.c @@ -35,6 +35,8 @@ #include <mmu.h> #include <arch/arm/mmu.h> #include <smem.h> +#include <board.h> +#include <boot_stats.h> #define MB (1024*1024) @@ -56,6 +58,11 @@ static mmu_section_t mmu_section_table[] = { static struct smem_ram_ptable ram_ptable; +/* Boot timestamps */ +#define BS_INFO_OFFSET (0x6B0) +#define BS_INFO_ADDR_V1 (RPM_MSG_RAM_BASE + BS_INFO_OFFSET) +#define BS_INFO_ADDR_V2 (MSM_SHARED_IMEM_BASE + BS_INFO_OFFSET) + void platform_early_init(void) { board_init(); @@ -69,19 +76,42 @@ void platform_init(void) dprintf(INFO, "platform_init()\n"); } -static void platform_print_sclk(void) +static uint32_t platform_get_sclk_count(void) +{ + return readl(MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL); +} + +static uint32_t kernel_load_start; +void bs_set_timestamp(enum bs_entry bs_id) { - uint32_t count; + void *bs_imem; + uint32_t soc_ver = board_soc_version(); - count = readl(MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL); + if (bs_id >= BS_MAX) { + dprintf(CRITICAL, "bad bs id: %u, max: %u\n", bs_id, BS_MAX); + ASSERT(0); + } + + if (bs_id == BS_KERNEL_LOAD_START) { + kernel_load_start = platform_get_sclk_count(); + return; + } - dprintf(INFO, "mpm sclk=(%lu)\n", count); + if (soc_ver < BOARD_SOC_VERSION2) + bs_imem = (void *)BS_INFO_ADDR_V1; + else + bs_imem = (void *)BS_INFO_ADDR_V2; + + if(bs_id == BS_KERNEL_LOAD_DONE) + writel(platform_get_sclk_count() - kernel_load_start, + bs_imem + (sizeof(uint32_t) * BS_KERNEL_LOAD_TIME)); + else + writel(platform_get_sclk_count(), + bs_imem + (sizeof(uint32_t) * bs_id)); } void platform_uninit(void) { - platform_print_sclk(); - #if DISPLAY_SPLASH_SCREEN display_shutdown(); #endif diff --git a/platform/msm_shared/display.c b/platform/msm_shared/display.c index 03192334..3a7a1660 100644 --- a/platform/msm_shared/display.c +++ b/platform/msm_shared/display.c @@ -31,6 +31,7 @@ #include <msm_panel.h> #include <mdp4.h> #include <mipi_dsi.h> +#include <boot_stats.h> #ifndef DISPLAY_TYPE_HDMI static int hdmi_dtv_init(void) @@ -147,6 +148,8 @@ int msm_display_on() if (!panel) return ERR_INVALID_ARGS; + bs_set_timestamp(BS_SPLASH_SCREEN_DISPLAY); + pinfo = &(panel->panel_info); switch (pinfo->type) { diff --git a/platform/msm_shared/include/mdp5.h b/platform/msm_shared/include/mdp5.h index 497b4d08..357663eb 100644 --- a/platform/msm_shared/include/mdp5.h +++ b/platform/msm_shared/include/mdp5.h @@ -54,6 +54,11 @@ #define MDP_VP_0_LAYER_3_BLEND_OP REG_MDP(0x32B0) #define MDP_VP_0_LAYER_3_BLEND0_FG_ALPHA REG_MDP(0x32B4) + +#define MDSS_MDP_HW_REV_100 0x10000000 +#define MDSS_MDP_HW_REV_102 0x10020000 + +#define MDP_HW_REV REG_MDP(0x0100) #define MDP_INTR_EN REG_MDP(0x0110) #define MDP_INTR_CLEAR REG_MDP(0x0118) #define MDP_HIST_INTR_EN REG_MDP(0x011C) @@ -63,29 +68,29 @@ #define MDP_UPPER_NEW_ROI_PRIOR_RO_START REG_MDP(0x02EC) #define MDP_LOWER_NEW_ROI_PRIOR_TO_START REG_MDP(0x04F8) -#define MDP_INTF_1_TIMING_ENGINE_EN REG_MDP(0x21300) +#define MDP_INTF_1_TIMING_ENGINE_EN REG_MDP(0x12700) #define MDP_CTL_0_LAYER_0 REG_MDP(0x600) #define MDP_CTL_0_TOP REG_MDP(0x614) #define MDP_CTL_0_FLUSH REG_MDP(0x618) -#define MDP_INTF_1_HSYNC_CTL REG_MDP(0x21308) -#define MDP_INTF_1_VSYNC_PERIOD_F0 REG_MDP(0x2130C) -#define MDP_INTF_1_VSYNC_PERIOD_F1 REG_MDP(0x21310) -#define MDP_INTF_1_VSYNC_PULSE_WIDTH_F0 REG_MDP(0x21314) -#define MDP_INTF_1_VSYNC_PULSE_WIDTH_F1 REG_MDP(0x21318) -#define MDP_INTF_1_DISPLAY_HCTL REG_MDP(0x2133C) -#define MDP_INTF_1_DISPLAY_V_START_F0 REG_MDP(0x2131C) -#define MDP_INTF_1_DISPLAY_V_START_F1 REG_MDP(0x21320) -#define MDP_INTF_1_DISPLAY_V_END_F0 REG_MDP(0x21324) -#define MDP_INTF_1_DISPLAY_V_END_F1 REG_MDP(0x21328) -#define MDP_INTF_1_ACTIVE_HCTL REG_MDP(0x21340) -#define MDP_INTF_1_ACTIVE_V_START_F0 REG_MDP(0x2132C) -#define MDP_INTF_1_ACTIVE_V_START_F1 REG_MDP(0x21330) -#define MDP_INTF_1_ACTIVE_V_END_F0 REG_MDP(0x21334) -#define MDP_INTF_1_ACTIVE_V_END_F1 REG_MDP(0x21338) -#define MDP_INTF_1_UNDERFFLOW_COLOR REG_MDP(0x21348) -#define MDP_INTF_1_PANEL_FORMAT REG_MDP(0x21390) +#define MDP_INTF_1_HSYNC_CTL REG_MDP(0x12708) +#define MDP_INTF_1_VSYNC_PERIOD_F0 REG_MDP(0x1270C) +#define MDP_INTF_1_VSYNC_PERIOD_F1 REG_MDP(0x12710) +#define MDP_INTF_1_VSYNC_PULSE_WIDTH_F0 REG_MDP(0x12714) +#define MDP_INTF_1_VSYNC_PULSE_WIDTH_F1 REG_MDP(0x12718) +#define MDP_INTF_1_DISPLAY_HCTL REG_MDP(0x1273C) +#define MDP_INTF_1_DISPLAY_V_START_F0 REG_MDP(0x1271C) +#define MDP_INTF_1_DISPLAY_V_START_F1 REG_MDP(0x12720) +#define MDP_INTF_1_DISPLAY_V_END_F0 REG_MDP(0x12724) +#define MDP_INTF_1_DISPLAY_V_END_F1 REG_MDP(0x12728) +#define MDP_INTF_1_ACTIVE_HCTL REG_MDP(0x12740) +#define MDP_INTF_1_ACTIVE_V_START_F0 REG_MDP(0x1272C) +#define MDP_INTF_1_ACTIVE_V_START_F1 REG_MDP(0x12730) +#define MDP_INTF_1_ACTIVE_V_END_F0 REG_MDP(0x12734) +#define MDP_INTF_1_ACTIVE_V_END_F1 REG_MDP(0x12738) +#define MDP_INTF_1_UNDERFFLOW_COLOR REG_MDP(0x12748) +#define MDP_INTF_1_PANEL_FORMAT REG_MDP(0x12790) #define MDP_CLK_CTRL0 REG_MDP(0x03AC) #define MDP_CLK_CTRL1 REG_MDP(0x03B4) diff --git a/platform/msm_shared/include/mmc.h b/platform/msm_shared/include/mmc.h index 43ae0577..39b1786c 100644 --- a/platform/msm_shared/include/mmc.h +++ b/platform/msm_shared/include/mmc.h @@ -426,7 +426,7 @@ struct mmc_boot_command { /* CSD Register. * Note: not all the fields have been defined here */ -struct mmc_boot_csd { +struct mmc_csd { unsigned int cmmc_structure; unsigned int spec_vers; unsigned int card_cmd_class; @@ -453,7 +453,7 @@ struct mmc_boot_csd { }; /* CID Register */ -struct mmc_boot_cid { +struct mmc_cid { unsigned int mid; /* 8 bit manufacturer id */ unsigned int oid; /* 16 bits 2 character ASCII - OEM ID */ unsigned char pnm[7]; /* 6 character ASCII - product name */ @@ -481,7 +481,7 @@ struct mmc_boot_scr { #define MMC_BOOT_SCR_BUS_WIDTH_4_BIT (1<<2) }; -struct mmc_boot_card { +struct mmc_card { unsigned int rca; unsigned int ocr; unsigned long long capacity; @@ -499,15 +499,15 @@ struct mmc_boot_card { unsigned int rd_block_len; unsigned int wr_block_len; //unsigned int data_xfer_len; - struct mmc_boot_cid cid; - struct mmc_boot_csd csd; + struct mmc_cid cid; + struct mmc_csd csd; struct mmc_boot_scr scr; }; #define MMC_BOOT_XFER_MULTI_BLOCK 0 #define MMC_BOOT_XFER_SINGLE_BLOCK 1 -struct mmc_boot_host { +struct mmc_host { unsigned int mclk_rate; unsigned int ocr; unsigned int cmd_retry; @@ -582,8 +582,8 @@ struct mmc_boot_host { #define MMC_CLK_DISABLE 0 unsigned int mmc_boot_main(unsigned char slot, unsigned int base); -unsigned int mmc_boot_read_from_card(struct mmc_boot_host *host, - struct mmc_boot_card *card, +unsigned int mmc_boot_read_from_card(struct mmc_host *host, + struct mmc_card *card, unsigned long long data_addr, unsigned int data_len, unsigned int *out); unsigned int mmc_write(unsigned long long data_addr, @@ -593,16 +593,16 @@ unsigned int mmc_read(unsigned long long data_addr, unsigned int *out, unsigned int data_len); unsigned mmc_get_psn(void); -unsigned int mmc_boot_write_to_card(struct mmc_boot_host *host, - struct mmc_boot_card *card, +unsigned int mmc_boot_write_to_card(struct mmc_host *host, + struct mmc_card *card, unsigned long long data_addr, unsigned int data_len, unsigned int *in); unsigned int mmc_erase_card(unsigned long long data_addr, unsigned long long data_len); -struct mmc_boot_host *get_mmc_host(void); -struct mmc_boot_card *get_mmc_card(void); +struct mmc_host *get_mmc_host(void); +struct mmc_card *get_mmc_card(void); void mmc_mclk_reg_wr_delay(); void mmc_boot_mci_clk_enable(); void mmc_boot_mci_clk_disable(); diff --git a/platform/msm_shared/include/partition_parser.h b/platform/msm_shared/include/partition_parser.h index 57a92dfc..e5c1ff89 100644 --- a/platform/msm_shared/include/partition_parser.h +++ b/platform/msm_shared/include/partition_parser.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -149,10 +149,10 @@ struct partition_entry { static void mbr_fill_name(struct partition_entry *partition_ent, unsigned int type); -unsigned int mmc_boot_read_gpt(struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card); -unsigned int mmc_boot_read_mbr(struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card); +unsigned int mmc_boot_read_gpt(struct mmc_host *mmc_host, + struct mmc_card *mmc_card); +unsigned int mmc_boot_read_mbr(struct mmc_host *mmc_host, + struct mmc_card *mmc_card); unsigned partition_get_index(const char *name); unsigned long long partition_get_size(int index); unsigned long long partition_get_offset(int index); @@ -162,8 +162,8 @@ unsigned int mbr_partition_get_type(unsigned size, unsigned char *partition, unsigned int *partition_type); unsigned int partition_get_type(unsigned size, unsigned char *partition, unsigned int *partition_type); -unsigned int partition_read_table(struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card); +unsigned int partition_read_table(struct mmc_host *mmc_host, + struct mmc_card *mmc_card); unsigned int partition_parse_gpt_header(unsigned char *buffer, unsigned long long *first_usable_lba, unsigned int *partition_entry_size, @@ -171,11 +171,11 @@ unsigned int partition_parse_gpt_header(unsigned char *buffer, unsigned int *max_partition_count); unsigned int write_mbr(unsigned size, unsigned char *mbrImage, - struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card); + struct mmc_host *mmc_host, + struct mmc_card *mmc_card); unsigned int write_gpt(unsigned size, unsigned char *gptImage, - struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card); + struct mmc_host *mmc_host, + struct mmc_card *mmc_card); unsigned int write_partition(unsigned size, unsigned char *partition); /* For Debugging */ diff --git a/platform/msm_shared/mdp5.c b/platform/msm_shared/mdp5.c index 468969cc..4d6de3a8 100644 --- a/platform/msm_shared/mdp5.c +++ b/platform/msm_shared/mdp5.c @@ -55,6 +55,19 @@ int mdp_get_revision() return mdp_rev; } +uint32_t mdss_mdp_intf_offset() +{ + uint32_t mdss_mdp_intf_off; + uint32_t mdss_mdp_rev = readl(MDP_HW_REV); + + if (mdss_mdp_rev > MDSS_MDP_HW_REV_100) + mdss_mdp_intf_off = 0; + else + mdss_mdp_intf_off = 0xEC00; + + return mdss_mdp_intf_off; +} + void mdp_clk_gating_ctrl(void) { writel(0x40000000, MDP_CLK_CTRL0); @@ -77,6 +90,7 @@ int mdp_dsi_video_config(struct msm_panel_info *pinfo, struct lcdc_panel_info *lcdc = NULL; unsigned mdp_rgb_size; int access_secure = 0; + uint32_t mdss_mdp_intf_off = 0; if (pinfo == NULL) return ERR_INVALID_ARGS; @@ -108,6 +122,8 @@ int mdp_dsi_video_config(struct msm_panel_info *pinfo, hsync_ctl = (hsync_period << 16) | lcdc->h_pulse_width; display_hctl = (hsync_end_x << 16) | hsync_start_x; + mdss_mdp_intf_off = mdss_mdp_intf_offset(); + /* write active region size*/ mdp_rgb_size = (fb->height << 16) + fb->width; @@ -135,22 +151,27 @@ int mdp_dsi_video_config(struct msm_panel_info *pinfo, writel(0x00101010, MMSS_MDP_SMP_ALLOC_R_0); writel(0x00000010, MMSS_MDP_SMP_ALLOC_R_1); - writel(hsync_ctl, MDP_INTF_1_HSYNC_CTL); - writel(vsync_period*hsync_period, MDP_INTF_1_VSYNC_PERIOD_F0); - writel(0x00, MDP_INTF_1_VSYNC_PERIOD_F1); - writel(lcdc->v_pulse_width*hsync_period, MDP_INTF_1_VSYNC_PULSE_WIDTH_F0); - writel(0x00, MDP_INTF_1_VSYNC_PULSE_WIDTH_F1); - writel(display_hctl, MDP_INTF_1_DISPLAY_HCTL); - writel(display_vstart, MDP_INTF_1_DISPLAY_V_START_F0); - writel(0x00, MDP_INTF_1_DISPLAY_V_START_F1); - writel(display_vend, MDP_INTF_1_DISPLAY_V_END_F0); - writel(0x00, MDP_INTF_1_DISPLAY_V_END_F1); - writel(0x00, MDP_INTF_1_ACTIVE_HCTL); - writel(0x00, MDP_INTF_1_ACTIVE_V_START_F0); - writel(0x00, MDP_INTF_1_ACTIVE_V_START_F1); - writel(0x00, MDP_INTF_1_ACTIVE_V_END_F0); - writel(0x00, MDP_INTF_1_ACTIVE_V_END_F1); - writel(0xFF, MDP_INTF_1_UNDERFFLOW_COLOR); + writel(hsync_ctl, MDP_INTF_1_HSYNC_CTL + mdss_mdp_intf_off); + writel(vsync_period*hsync_period, MDP_INTF_1_VSYNC_PERIOD_F0 + + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_VSYNC_PERIOD_F1 + mdss_mdp_intf_off); + writel(lcdc->v_pulse_width*hsync_period, + MDP_INTF_1_VSYNC_PULSE_WIDTH_F0 + + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_VSYNC_PULSE_WIDTH_F1 + mdss_mdp_intf_off); + writel(display_hctl, MDP_INTF_1_DISPLAY_HCTL + mdss_mdp_intf_off); + writel(display_vstart, MDP_INTF_1_DISPLAY_V_START_F0 + + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_DISPLAY_V_START_F1 + mdss_mdp_intf_off); + writel(display_vend, MDP_INTF_1_DISPLAY_V_END_F0 + + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_DISPLAY_V_END_F1 + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_ACTIVE_HCTL + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_ACTIVE_V_START_F0 + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_ACTIVE_V_START_F1 + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_ACTIVE_V_END_F0 + mdss_mdp_intf_off); + writel(0x00, MDP_INTF_1_ACTIVE_V_END_F1 + mdss_mdp_intf_off); + writel(0xFF, MDP_INTF_1_UNDERFFLOW_COLOR + mdss_mdp_intf_off); writel(fb->base, MDP_VP_0_RGB_0_SSPP_SRC0_ADDR); writel((fb->stride * fb->bpp/8),MDP_VP_0_RGB_0_SSPP_SRC_YSTRIDE); @@ -179,7 +200,7 @@ int mdp_dsi_video_config(struct msm_panel_info *pinfo, writel(0x010000200, MDP_CTL_0_LAYER_0); writel(0x1F20, MDP_CTL_0_TOP); - writel(0x213F, MDP_INTF_1_PANEL_FORMAT); + writel(0x213F, MDP_INTF_1_PANEL_FORMAT + mdss_mdp_intf_off); writel(0x0100, MDP_DISP_INTF_SEL); writel(0x1111, MDP_VIDEO_INTF_UNDERFLOW_CTL); @@ -201,7 +222,7 @@ int mdp_dsi_video_on(void) { int ret = NO_ERROR; writel(0x32048, MDP_CTL_0_FLUSH); - writel(0x01, MDP_INTF_1_TIMING_ENGINE_EN); + writel(0x01, MDP_INTF_1_TIMING_ENGINE_EN + mdss_mdp_intf_offset()); return ret; } @@ -209,7 +230,8 @@ int mdp_dsi_video_off() { if(!target_cont_splash_screen()) { - writel(0x00000000, MDP_INTF_1_TIMING_ENGINE_EN); + writel(0x00000000, MDP_INTF_1_TIMING_ENGINE_EN + + mdss_mdp_intf_offset()); mdelay(60); /* Ping-Pong done Tear Check Read/Write */ /* Underrun(Interface 0/1/2/3) VSYNC Interrupt Enable */ diff --git a/platform/msm_shared/mmc.c b/platform/msm_shared/mmc.c index 8db6c113..5fb0b40a 100644 --- a/platform/msm_shared/mmc.c +++ b/platform/msm_shared/mmc.c @@ -139,14 +139,14 @@ int mmc_clock_enable_disable(unsigned id, unsigned enable); int mmc_clock_get_rate(unsigned id); int mmc_clock_set_rate(unsigned id, unsigned rate); -struct mmc_boot_host mmc_host; -struct mmc_boot_card mmc_card; +struct mmc_host mmc_host; +struct mmc_card mmc_card; static unsigned int mmc_wp(unsigned int addr, unsigned int size, unsigned char set_clear_wp); -static unsigned int mmc_boot_send_ext_cmd(struct mmc_boot_card *card, +static unsigned int mmc_boot_send_ext_cmd(struct mmc_card *card, unsigned char *buf); -static unsigned int mmc_boot_read_reg(struct mmc_boot_card *card, +static unsigned int mmc_boot_read_reg(struct mmc_card *card, unsigned int data_len, unsigned int command, unsigned int addr, unsigned int *out); @@ -172,8 +172,8 @@ void mmc_mclk_reg_wr_delay() /* Sets a timeout for read operation. */ static unsigned int -mmc_boot_set_read_timeout(struct mmc_boot_host *host, - struct mmc_boot_card *card) +mmc_boot_set_read_timeout(struct mmc_host *host, + struct mmc_card *card) { unsigned int timeout_ns = 0; @@ -202,8 +202,8 @@ mmc_boot_set_read_timeout(struct mmc_boot_host *host, /* Sets a timeout for write operation. */ static unsigned int -mmc_boot_set_write_timeout(struct mmc_boot_host *host, - struct mmc_boot_card *card) +mmc_boot_set_write_timeout(struct mmc_host *host, + struct mmc_card *card) { unsigned int timeout_ns = 0; @@ -235,14 +235,14 @@ mmc_boot_set_write_timeout(struct mmc_boot_host *host, * few of the CSD elements in csd structure. We'll only decode those values. */ static unsigned int -mmc_boot_decode_and_save_csd(struct mmc_boot_card *card, unsigned int *raw_csd) +mmc_boot_decode_and_save_csd(struct mmc_card *card, unsigned int *raw_csd) { unsigned int mmc_sizeof = 0; unsigned int mmc_unit = 0; unsigned int mmc_value = 0; unsigned int mmc_temp = 0; - struct mmc_boot_csd mmc_csd; + struct mmc_csd mmc_csd; if ((card == NULL) || (raw_csd == NULL)) { return MMC_BOOT_E_INVAL; @@ -427,8 +427,8 @@ mmc_boot_decode_and_save_csd(struct mmc_boot_card *card, unsigned int *raw_csd) } /* save the information in card structure */ - memcpy((struct mmc_boot_csd *)&card->csd, - (struct mmc_boot_csd *)&mmc_csd, sizeof(struct mmc_boot_csd)); + memcpy((struct mmc_csd *)&card->csd, + (struct mmc_csd *)&mmc_csd, sizeof(struct mmc_csd)); dprintf(SPEW, "Decoded CSD fields:\n"); dprintf(SPEW, "cmmc_structure: %d\n", mmc_csd.cmmc_structure); @@ -456,9 +456,9 @@ mmc_boot_decode_and_save_csd(struct mmc_boot_card *card, unsigned int *raw_csd) * Decode CID sent by the card. */ static unsigned int -mmc_boot_decode_and_save_cid(struct mmc_boot_card *card, unsigned int *raw_cid) +mmc_boot_decode_and_save_cid(struct mmc_card *card, unsigned int *raw_cid) { - struct mmc_boot_cid mmc_cid; + struct mmc_cid mmc_cid; unsigned int mmc_sizeof = 0; int i = 0; @@ -511,8 +511,8 @@ mmc_boot_decode_and_save_cid(struct mmc_boot_card *card, unsigned int *raw_cid) } /* save it in card database */ - memcpy((struct mmc_boot_cid *)&card->cid, - (struct mmc_boot_cid *)&mmc_cid, sizeof(struct mmc_boot_cid)); + memcpy((struct mmc_cid *)&card->cid, + (struct mmc_cid *)&mmc_cid, sizeof(struct mmc_cid)); dprintf(SPEW, "Decoded CID fields:\n"); dprintf(SPEW, "Manufacturer ID: %x\n", mmc_cid.mid); @@ -704,7 +704,7 @@ static unsigned int mmc_boot_reset_cards(void) * Send CMD1 to know whether the card supports host VDD profile or not. */ static unsigned int -mmc_boot_send_op_cond(struct mmc_boot_host *host, struct mmc_boot_card *card) +mmc_boot_send_op_cond(struct mmc_host *host, struct mmc_card *card) { struct mmc_boot_command cmd; unsigned int mmc_resp = 0; @@ -760,7 +760,7 @@ mmc_boot_send_op_cond(struct mmc_boot_host *host, struct mmc_boot_card *card) /* * Request any card to send its uniquie card identification (CID) number (CMD2). */ -static unsigned int mmc_boot_all_send_cid(struct mmc_boot_card *card) +static unsigned int mmc_boot_all_send_cid(struct mmc_card *card) { struct mmc_boot_command cmd; unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; @@ -799,7 +799,7 @@ static unsigned int mmc_boot_all_send_cid(struct mmc_boot_card *card) * Ask any card to send it's relative card address (RCA).This RCA number is * shorter than CID and is used by the host to address the card in future (CMD3) */ -static unsigned int mmc_boot_send_relative_address(struct mmc_boot_card *card) +static unsigned int mmc_boot_send_relative_address(struct mmc_card *card) { struct mmc_boot_command cmd; unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; @@ -850,7 +850,7 @@ static unsigned int mmc_boot_send_relative_address(struct mmc_boot_card *card) * Requests card to send it's CSD register's contents. (CMD9) */ static unsigned int -mmc_boot_send_csd(struct mmc_boot_card *card, unsigned int *raw_csd) +mmc_boot_send_csd(struct mmc_card *card, unsigned int *raw_csd) { struct mmc_boot_command cmd; unsigned int mmc_arg = 0; @@ -893,7 +893,7 @@ mmc_boot_send_csd(struct mmc_boot_card *card, unsigned int *raw_csd) * the card will be de-selected. (CMD7) */ static unsigned int -mmc_boot_select_card(struct mmc_boot_card *card, unsigned int rca) +mmc_boot_select_card(struct mmc_card *card, unsigned int rca) { struct mmc_boot_command cmd; unsigned int mmc_arg = 0; @@ -943,7 +943,7 @@ mmc_boot_select_card(struct mmc_boot_card *card, unsigned int rca) * Send command to set block length. */ static unsigned int -mmc_boot_set_block_len(struct mmc_boot_card *card, unsigned int block_len) +mmc_boot_set_block_len(struct mmc_card *card, unsigned int block_len) { struct mmc_boot_command cmd; unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; @@ -983,7 +983,7 @@ mmc_boot_set_block_len(struct mmc_boot_card *card, unsigned int block_len) * Requests the card to stop transmission of data. */ static unsigned int -mmc_boot_send_stop_transmission(struct mmc_boot_card *card, +mmc_boot_send_stop_transmission(struct mmc_card *card, unsigned int prg_enabled) { struct mmc_boot_command cmd; @@ -1020,7 +1020,7 @@ mmc_boot_send_stop_transmission(struct mmc_boot_card *card, * Get the card's current status */ static unsigned int -mmc_boot_get_card_status(struct mmc_boot_card *card, +mmc_boot_get_card_status(struct mmc_card *card, unsigned int prg_enabled, unsigned int *status) { struct mmc_boot_command cmd; @@ -1098,7 +1098,7 @@ static unsigned int mmc_boot_status_error(unsigned mmc_status) * Send ext csd command. */ static unsigned int -mmc_boot_send_ext_cmd(struct mmc_boot_card *card, unsigned char *buf) +mmc_boot_send_ext_cmd(struct mmc_card *card, unsigned char *buf) { struct mmc_boot_command cmd; unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; @@ -1188,7 +1188,7 @@ mmc_boot_send_ext_cmd(struct mmc_boot_card *card, unsigned char *buf) * Switch command */ static unsigned int -mmc_boot_switch_cmd(struct mmc_boot_card *card, +mmc_boot_switch_cmd(struct mmc_card *card, unsigned access, unsigned index, unsigned value) { @@ -1264,7 +1264,7 @@ mmc_boot_switch_cmd(struct mmc_boot_card *card, * A command to set the data bus width for card. Set width to either */ static unsigned int -mmc_boot_set_bus_width(struct mmc_boot_card *card, unsigned int width) +mmc_boot_set_bus_width(struct mmc_card *card, unsigned int width) { unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; unsigned int mmc_reg = 0; @@ -1307,7 +1307,7 @@ mmc_boot_set_bus_width(struct mmc_boot_card *card, unsigned int width) * CMD12 - STOP_TRANSMISSION. */ static unsigned int -mmc_boot_send_read_command(struct mmc_boot_card *card, +mmc_boot_send_read_command(struct mmc_card *card, unsigned int xfer_type, unsigned int data_addr) { struct mmc_boot_command cmd; @@ -1360,7 +1360,7 @@ mmc_boot_send_read_command(struct mmc_boot_card *card, * CMD12 - STOP_TRANSMISSION. */ static unsigned int -mmc_boot_send_write_command(struct mmc_boot_card *card, +mmc_boot_send_write_command(struct mmc_card *card, unsigned int xfer_type, unsigned int data_addr) { struct mmc_boot_command cmd; @@ -1411,8 +1411,8 @@ mmc_boot_send_write_command(struct mmc_boot_card *card, * multiple of blocks for block data transfer. */ unsigned int -mmc_boot_write_to_card(struct mmc_boot_host *host, - struct mmc_boot_card *card, +mmc_boot_write_to_card(struct mmc_host *host, + struct mmc_card *card, unsigned long long data_addr, unsigned int data_len, unsigned int *in) { @@ -1573,8 +1573,8 @@ mmc_boot_write_to_card(struct mmc_boot_host *host, * Adjust the interface speed to optimal speed */ static unsigned int -mmc_boot_adjust_interface_speed(struct mmc_boot_host *host, - struct mmc_boot_card *card) +mmc_boot_adjust_interface_speed(struct mmc_host *host, + struct mmc_card *card) { unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; @@ -1595,7 +1595,7 @@ mmc_boot_adjust_interface_speed(struct mmc_boot_host *host, } static unsigned int -mmc_boot_set_block_count(struct mmc_boot_card *card, unsigned int block_count) +mmc_boot_set_block_count(struct mmc_card *card, unsigned int block_count) { struct mmc_boot_command cmd; unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; @@ -1635,8 +1635,8 @@ mmc_boot_set_block_count(struct mmc_boot_card *card, unsigned int block_count) * should be multiple of block size for block data transfer. */ unsigned int -mmc_boot_read_from_card(struct mmc_boot_host *host, - struct mmc_boot_card *card, +mmc_boot_read_from_card(struct mmc_host *host, + struct mmc_card *card, unsigned long long data_addr, unsigned int data_len, unsigned int *out) { @@ -1790,7 +1790,7 @@ mmc_boot_read_from_card(struct mmc_boot_host *host, /* * Initialize host structure, set and enable clock-rate and power mode. */ -unsigned int mmc_boot_init(struct mmc_boot_host *host) +unsigned int mmc_boot_init(struct mmc_host *host) { unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; unsigned int mmc_pwr = 0; @@ -1832,7 +1832,7 @@ unsigned int mmc_boot_init(struct mmc_boot_host *host) * - get Extended CSD (for mmc) */ static unsigned int -mmc_boot_identify_card(struct mmc_boot_host *host, struct mmc_boot_card *card) +mmc_boot_identify_card(struct mmc_host *host, struct mmc_card *card) { unsigned int mmc_return = MMC_BOOT_E_SUCCESS; unsigned int raw_csd[4]; @@ -1946,7 +1946,7 @@ static unsigned int mmc_boot_send_app_cmd(unsigned int rca) return MMC_BOOT_E_SUCCESS; } -static unsigned int mmc_boot_sd_init_card(struct mmc_boot_card *card) +static unsigned int mmc_boot_sd_init_card(struct mmc_card *card) { unsigned int i, mmc_ret; unsigned int ocr_cmd_arg; @@ -2008,7 +2008,7 @@ static unsigned int mmc_boot_sd_init_card(struct mmc_boot_card *card) * voltage and set the card inready state. */ static unsigned int -mmc_boot_init_card(struct mmc_boot_host *host, struct mmc_boot_card *card) +mmc_boot_init_card(struct mmc_host *host, struct mmc_card *card) { unsigned int mmc_retry = 0; unsigned int mmc_return = MMC_BOOT_E_SUCCESS; @@ -2065,7 +2065,7 @@ mmc_boot_init_card(struct mmc_boot_host *host, struct mmc_boot_card *card) } static unsigned int -mmc_boot_set_sd_bus_width(struct mmc_boot_card *card, unsigned int width) +mmc_boot_set_sd_bus_width(struct mmc_card *card, unsigned int width) { struct mmc_boot_command cmd; unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; @@ -2116,7 +2116,7 @@ mmc_boot_set_sd_bus_width(struct mmc_boot_card *card, unsigned int width) } static unsigned int -mmc_boot_set_sd_hs(struct mmc_boot_host *host, struct mmc_boot_card *card) +mmc_boot_set_sd_hs(struct mmc_host *host, struct mmc_card *card) { unsigned char sw_buf[64]; unsigned int mmc_ret; @@ -2144,8 +2144,8 @@ mmc_boot_set_sd_hs(struct mmc_boot_host *host, struct mmc_boot_card *card) */ static unsigned int -mmc_boot_init_and_identify_cards(struct mmc_boot_host *host, - struct mmc_boot_card *card) +mmc_boot_init_and_identify_cards(struct mmc_host *host, + struct mmc_card *card) { unsigned int mmc_return = MMC_BOOT_E_SUCCESS; unsigned int status; @@ -2255,10 +2255,10 @@ unsigned int mmc_boot_main(unsigned char slot, unsigned int base) { unsigned int mmc_ret = MMC_BOOT_E_SUCCESS; - memset((struct mmc_boot_host *)&mmc_host, 0, - sizeof(struct mmc_boot_host)); - memset((struct mmc_boot_card *)&mmc_card, 0, - sizeof(struct mmc_boot_card)); + memset((struct mmc_host *)&mmc_host, 0, + sizeof(struct mmc_host)); + memset((struct mmc_card *)&mmc_card, 0, + sizeof(struct mmc_card)); mmc_slot = slot; mmc_boot_mci_base = base; @@ -2344,7 +2344,7 @@ mmc_read(unsigned long long data_addr, unsigned int *out, unsigned int data_len) * Function to read registers from MMC or SD card */ static unsigned int -mmc_boot_read_reg(struct mmc_boot_card *card, +mmc_boot_read_reg(struct mmc_card *card, unsigned int data_len, unsigned int command, unsigned int addr, unsigned int *out) { @@ -2413,7 +2413,7 @@ mmc_boot_read_reg(struct mmc_boot_card *card, * Function to set/clear power-on write protection for the user area partitions */ static unsigned int -mmc_boot_set_clr_power_on_wp_user(struct mmc_boot_card *card, +mmc_boot_set_clr_power_on_wp_user(struct mmc_card *card, unsigned int addr, unsigned int size, unsigned char set_clear_wp) { @@ -2538,7 +2538,7 @@ mmc_boot_set_clr_power_on_wp_user(struct mmc_boot_card *card, * Function to get Write Protect status of the given sector */ static unsigned int -mmc_boot_get_wp_status(struct mmc_boot_card *card, unsigned int sector) +mmc_boot_get_wp_status(struct mmc_card *card, unsigned int sector) { unsigned int rc = MMC_BOOT_E_SUCCESS; memset(wp_status_buf, 0, 8); @@ -2735,7 +2735,7 @@ mmc_boot_fifo_write(unsigned int *mmc_ptr, unsigned int data_len) */ static unsigned int -mmc_boot_send_erase_group_start(struct mmc_boot_card *card, +mmc_boot_send_erase_group_start(struct mmc_card *card, unsigned long long data_addr) { struct mmc_boot_command cmd; @@ -2770,7 +2770,7 @@ mmc_boot_send_erase_group_start(struct mmc_boot_card *card, * CMD36 ERASE GROUP END */ static unsigned int -mmc_boot_send_erase_group_end(struct mmc_boot_card *card, +mmc_boot_send_erase_group_end(struct mmc_card *card, unsigned long long data_addr) { struct mmc_boot_command cmd; @@ -2803,7 +2803,7 @@ mmc_boot_send_erase_group_end(struct mmc_boot_card *card, /* * CMD38 ERASE */ -static unsigned int mmc_boot_send_erase(struct mmc_boot_card *card) +static unsigned int mmc_boot_send_erase(struct mmc_card *card) { struct mmc_boot_command cmd; @@ -2943,12 +2943,12 @@ mmc_erase_card(unsigned long long data_addr, unsigned long long size) return MMC_BOOT_E_SUCCESS; } -struct mmc_boot_host *get_mmc_host(void) +struct mmc_host *get_mmc_host(void) { return &mmc_host; } -struct mmc_boot_card *get_mmc_card(void) +struct mmc_card *get_mmc_card(void) { return &mmc_card; } diff --git a/platform/msm_shared/partition_parser.c b/platform/msm_shared/partition_parser.c index 71724250..dc985db6 100644 --- a/platform/msm_shared/partition_parser.c +++ b/platform/msm_shared/partition_parser.c @@ -44,8 +44,8 @@ unsigned partition_count = 0; //TODO: Remove the dependency of mmc in these functions unsigned int -partition_read_table(struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card) +partition_read_table(struct mmc_host *mmc_host, + struct mmc_card *mmc_card) { unsigned int ret; @@ -71,8 +71,8 @@ partition_read_table(struct mmc_boot_host *mmc_host, * Read MBR from MMC card and fill partition table. */ unsigned int -mmc_boot_read_mbr(struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card) +mmc_boot_read_mbr(struct mmc_host *mmc_host, + struct mmc_card *mmc_card) { unsigned char buffer[BLOCK_SIZE]; unsigned int dtype; @@ -191,8 +191,8 @@ mmc_boot_read_mbr(struct mmc_boot_host *mmc_host, * Read GPT from MMC and fill partition table */ unsigned int -mmc_boot_read_gpt(struct mmc_boot_host *mmc_host, - struct mmc_boot_card *mmc_card) +mmc_boot_read_gpt(struct mmc_host *mmc_host, + struct mmc_card *mmc_card) { int ret = MMC_BOOT_E_SUCCESS; @@ -386,7 +386,7 @@ static unsigned int write_mbr_in_blocks(unsigned size, unsigned char *mbrImage) /* Write the MBR/EBR to the MMC. */ unsigned int write_mbr(unsigned size, unsigned char *mbrImage, - struct mmc_boot_host *mmc_host, struct mmc_boot_card *mmc_card) + struct mmc_host *mmc_host, struct mmc_card *mmc_card) { unsigned int ret; @@ -494,7 +494,7 @@ write_gpt_partition_array(unsigned char *header, static void patch_gpt(unsigned char *gptImage, - struct mmc_boot_card *mmc_card, + struct mmc_card *mmc_card, unsigned int array_size, unsigned int max_part_count, unsigned int part_entry_size) { @@ -571,7 +571,7 @@ patch_gpt(unsigned char *gptImage, */ unsigned int write_gpt(unsigned size, unsigned char *gptImage, - struct mmc_boot_host *mmc_host, struct mmc_boot_card *mmc_card) + struct mmc_host *mmc_host, struct mmc_card *mmc_card) { unsigned int ret = MMC_BOOT_E_INVAL; unsigned int header_size; @@ -695,8 +695,8 @@ unsigned int write_partition(unsigned size, unsigned char *partition) { unsigned int ret = MMC_BOOT_E_INVAL; unsigned int partition_type; - struct mmc_boot_host *mmc_host; - struct mmc_boot_card *mmc_card; + struct mmc_host *mmc_host; + struct mmc_card *mmc_card; if (partition == 0) { dprintf(CRITICAL, "NULL partition\n"); diff --git a/target/msm8974/target_display.c b/target/msm8974/target_display.c index d4be69c4..f310b22b 100644 --- a/target/msm8974/target_display.c +++ b/target/msm8974/target_display.c @@ -136,9 +136,6 @@ void display_init(void) dprintf(INFO, "display_init(),target_id=%d.\n", hw_id); - if (soc_ver >= BOARD_SOC_VERSION2) - return; - switch (hw_id) { case HW_PLATFORM_MTP: case HW_PLATFORM_FLUID: |