diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-10-22 00:03:04 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-10-22 00:07:07 +0200 |
commit | 7d62a78af47e77e3d4f6b8b37545d1abcc436f57 (patch) | |
tree | 0a47e503470ba46b2db5e9da8004b431ca3f399f /firmware/target/arm/imx233/partitions-imx233.h | |
parent | 5c7167c79c369973969f2199efa191cdf857a1a4 (diff) | |
download | rockbox-7d62a78af47e77e3d4f6b8b37545d1abcc436f57.tar.gz 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.h | 19 |
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 @@ | |||
24 | #include "system.h" | 24 | #include "system.h" |
25 | #include "storage.h" | 25 | #include "storage.h" |
26 | 26 | ||
27 | #ifndef IMX233_PARTITIONS | ||
28 | #error You must define IMX233_PARTITIONS | ||
29 | #endif | ||
30 | |||
31 | enum imx233_part_t | ||
32 | { | ||
33 | IMX233_PART_USER, | ||
34 | #if (IMX233_PARTITIONS & IMX233_FREESCALE) | ||
35 | IMX233_PART_BOOT, | ||
36 | #endif | ||
37 | #if (IMX233_PARTITIONS & IMX233_CREATIVE) | ||
38 | IMX233_PART_CFS, | ||
39 | IMX233_PART_MINIFS, | ||
40 | #endif | ||
41 | }; | ||
42 | |||
27 | /* Enable/Disable window computations for internal storage following the | 43 | /* Enable/Disable window computations for internal storage following the |
28 | * Freescale convention */ | 44 | * Freescale convention */ |
29 | void imx233_partitions_enable_window(bool enable); | 45 | void imx233_partitions_enable_window(bool enable); |
30 | bool imx233_partitions_is_window_enabled(void); | 46 | bool imx233_partitions_is_window_enabled(void); |
31 | int imx233_partitions_compute_window(uint8_t mbr[512], unsigned *start, unsigned *end); | 47 | int imx233_partitions_compute_window(IF_MD(int drive,) enum imx233_part_t part, |
48 | unsigned *start, unsigned *end); | ||
32 | 49 | ||
33 | #endif /* __PARTITIONS_IMX233__ */ \ No newline at end of file | 50 | #endif /* __PARTITIONS_IMX233__ */ \ No newline at end of file |