Merge "boot_stats: add support for bootup timestamps"
diff --git a/include/reg.h b/include/reg.h
index b5dd528..c642947 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/platform/msm_shared/include/mdp5.h b/platform/msm_shared/include/mdp5.h
index 497b4d0..357663e 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 43ae057..39b1786 100644
--- a/platform/msm_shared/include/mmc.h
+++ b/platform/msm_shared/include/mmc.h
@@ -426,7 +426,7 @@
/* 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 @@
};
/* 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 @@
#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 @@
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 @@
#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 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 57a92df..e5c1ff8 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 @@
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 *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 *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 468969c..4d6de3a 100644
--- a/platform/msm_shared/mdp5.c
+++ b/platform/msm_shared/mdp5.c
@@ -55,6 +55,19 @@
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 @@
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 @@
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 @@
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 @@
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 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 @@
{
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 8db6c11..5fb0b40 100644
--- a/platform/msm_shared/mmc.c
+++ b/platform/msm_shared/mmc.c
@@ -139,14 +139,14 @@
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 @@
/* 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 @@
/* 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 @@
* 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 @@
}
/* 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 @@
* 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 @@
}
/* 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 @@
* 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 @@
/*
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
}
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 @@
* 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 @@
/*
* 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 @@
* - 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 @@
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 @@
* 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 @@
}
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 @@
}
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 @@
*/
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_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 @@
* 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 @@
* 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 @@
* 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 @@
*/
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 @@
* 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 @@
/*
* 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 @@
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 7172425..dc985db 100644
--- a/platform/msm_shared/partition_parser.c
+++ b/platform/msm_shared/partition_parser.c
@@ -44,8 +44,8 @@
//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 @@
* 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 @@
* 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 @@
/* 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 @@
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 @@
*/
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 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 d4be69c..f310b22 100644
--- a/target/msm8974/target_display.c
+++ b/target/msm8974/target_display.c
@@ -136,9 +136,6 @@
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: