summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/partitions-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-11-11 02:02:11 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2013-11-11 02:02:11 +0000
commitbb8dd053434cbe9c98fe5b9a1095d00ebafb7b61 (patch)
treeaf02a94d87691298a15758ed3e1c86b18c128519 /firmware/target/arm/imx233/partitions-imx233.h
parent39bfd0d2ab6b4edd30c1ccf4deefac96b9004e09 (diff)
downloadrockbox-bb8dd053434cbe9c98fe5b9a1095d00ebafb7b61.tar.gz
rockbox-bb8dd053434cbe9c98fe5b9a1095d00ebafb7b61.tar.bz2
rockbox-bb8dd053434cbe9c98fe5b9a1095d00ebafb7b61.zip
imx233/creative: workaround stupid Creative partition table
This should fix wrong partition size on the ZEN, X-Fi and Mozaic Change-Id: Ib8999d414773c12e1b97d515e9bf058a82141d35
Diffstat (limited to 'firmware/target/arm/imx233/partitions-imx233.h')
-rw-r--r--firmware/target/arm/imx233/partitions-imx233.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/target/arm/imx233/partitions-imx233.h b/firmware/target/arm/imx233/partitions-imx233.h
index 80936ad865..e5378dadbb 100644
--- a/firmware/target/arm/imx233/partitions-imx233.h
+++ b/firmware/target/arm/imx233/partitions-imx233.h
@@ -30,13 +30,15 @@
enum imx233_part_t
{
- IMX233_PART_USER,
#if (IMX233_PARTITIONS & IMX233_FREESCALE)
IMX233_PART_BOOT,
+ IMX233_PART_DATA,
+ IMX233_PART_USER = IMX233_PART_DATA,
#endif
#if (IMX233_PARTITIONS & IMX233_CREATIVE)
IMX233_PART_CFS,
IMX233_PART_MINIFS,
+ IMX233_PART_USER = IMX233_PART_CFS,
#endif
};
@@ -45,9 +47,13 @@ enum imx233_part_t
* issue, one must provide a read function. */
typedef int (*part_read_fn_t)(intptr_t user, unsigned long start, int count, void* buf);
/* Enable/Disable window computations for internal storage following the
- * Freescale convention */
+ * Freescale/Creative convention */
void imx233_partitions_enable_window(bool enable);
bool imx233_partitions_is_window_enabled(void);
+/* Compute the window size. The *start and *end parameters should contain
+ * the initial window in which the computation is done. So in particular,
+ * for a whole disk, *end should be the size of the disk when the function is
+ * called */
int imx233_partitions_compute_window(intptr_t user, part_read_fn_t read_fn,
enum imx233_part_t part, unsigned *start, unsigned *end);