Merge "msm_shared: mmc: Change structure names for mmc device"
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/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/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");