summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/partitions-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-10-22 00:03:04 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-10-22 00:07:07 +0200
commit7d62a78af47e77e3d4f6b8b37545d1abcc436f57 (patch)
tree0a47e503470ba46b2db5e9da8004b431ca3f399f /firmware/target/arm/imx233/partitions-imx233.h
parent5c7167c79c369973969f2199efa191cdf857a1a4 (diff)
downloadrockbox-7d62a78af47e77e3d4f6b8b37545d1abcc436f57.tar.gz
rockbox-7d62a78af47e77e3d4f6b8b37545d1abcc436f57.tar.bz2
rockbox-7d62a78af47e77e3d4f6b8b37545d1abcc436f57.zip
imx233: extend partition window support to be more generic
The new code can select among several types of window (user, system, ...). Furthermore, the type of partitions to use is selectable in config file. Currently, two types are support: Freescale style MBR and Creative MBLK Change-Id: I969d60a3d08f2c9448fb4b9c440051b7801b94cd
Diffstat (limited to 'firmware/target/arm/imx233/partitions-imx233.h')
-rw-r--r--firmware/target/arm/imx233/partitions-imx233.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/partitions-imx233.h b/firmware/target/arm/imx233/partitions-imx233.h
index 4490aad77f..b7ed251dee 100644
--- a/firmware/target/arm/imx233/partitions-imx233.h
+++ b/firmware/target/arm/imx233/partitions-imx233.h
@@ -24,10 +24,27 @@
#include "system.h"
#include "storage.h"
+#ifndef IMX233_PARTITIONS
+#error You must define IMX233_PARTITIONS
+#endif
+
+enum imx233_part_t
+{
+ IMX233_PART_USER,
+#if (IMX233_PARTITIONS & IMX233_FREESCALE)
+ IMX233_PART_BOOT,
+#endif
+#if (IMX233_PARTITIONS & IMX233_CREATIVE)
+ IMX233_PART_CFS,
+ IMX233_PART_MINIFS,
+#endif
+};
+
/* Enable/Disable window computations for internal storage following the
* Freescale convention */
void imx233_partitions_enable_window(bool enable);
bool imx233_partitions_is_window_enabled(void);
-int imx233_partitions_compute_window(uint8_t mbr[512], unsigned *start, unsigned *end);
+int imx233_partitions_compute_window(IF_MD(int drive,) enum imx233_part_t part,
+ unsigned *start, unsigned *end);
#endif /* __PARTITIONS_IMX233__ */ \ No newline at end of file