summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-05-21 11:46:52 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-05-21 11:46:52 +0000
commit0f93ae5da0de8671521d9cd1cc532591fc0b6a91 (patch)
tree463bba6aa4d19377c8b9726c1a50150f6eda5554
parentc7b698119d7eaa90aacc39f32c2fa54b446141b6 (diff)
downloadrockbox-0f93ae5da0de8671521d9cd1cc532591fc0b6a91.tar.gz
rockbox-0f93ae5da0de8671521d9cd1cc532591fc0b6a91.zip
Sansa AMS: move OF size declaration in model specific config
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21008 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/config-c200v2.h3
-rw-r--r--firmware/export/config-clip.h3
-rw-r--r--firmware/export/config-e200v2.h3
-rw-r--r--firmware/export/config-fuze.h3
-rw-r--r--firmware/export/config-m200v4.h3
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c8
6 files changed, 17 insertions, 6 deletions
diff --git a/firmware/export/config-c200v2.h b/firmware/export/config-c200v2.h
index b47ba73610..775a39fc4c 100644
--- a/firmware/export/config-c200v2.h
+++ b/firmware/export/config-c200v2.h
@@ -145,6 +145,9 @@
145/* Define this if you have a PortalPlayer PP5024 */ 145/* Define this if you have a PortalPlayer PP5024 */
146#define CONFIG_CPU AS3525 146#define CONFIG_CPU AS3525
147 147
148/* Define how much SD sectors are reserved for OF */
149#define AMS_OF_SIZE 0x5000 /* TODO : check */
150
148/* Define this if you want to use the PP5024 i2c interface */ 151/* Define this if you want to use the PP5024 i2c interface */
149#define CONFIG_I2C I2C_AS3525 152#define CONFIG_I2C I2C_AS3525
150 153
diff --git a/firmware/export/config-clip.h b/firmware/export/config-clip.h
index e038ffbcdc..37b1a3185a 100644
--- a/firmware/export/config-clip.h
+++ b/firmware/export/config-clip.h
@@ -152,6 +152,9 @@
152/* Define this if you have a AMS AS3525 SoC */ 152/* Define this if you have a AMS AS3525 SoC */
153#define CONFIG_CPU AS3525 153#define CONFIG_CPU AS3525
154 154
155/* Define how much SD sectors are reserved for OF */
156#define AMS_OF_SIZE 0x5000
157
155/* Define this if you want to use the AS3525 i2c interface */ 158/* Define this if you want to use the AS3525 i2c interface */
156#define CONFIG_I2C I2C_AS3525 159#define CONFIG_I2C I2C_AS3525
157 160
diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h
index 9ee8572fbd..cc66b73249 100644
--- a/firmware/export/config-e200v2.h
+++ b/firmware/export/config-e200v2.h
@@ -155,6 +155,9 @@
155/* Define this if you have an AMS AS3525*/ 155/* Define this if you have an AMS AS3525*/
156#define CONFIG_CPU AS3525 156#define CONFIG_CPU AS3525
157 157
158/* Define how much SD sectors are reserved for OF */
159#define AMS_OF_SIZE 0xF000
160
158/* Define this if you want to use the AS2525 i2c interface */ 161/* Define this if you want to use the AS2525 i2c interface */
159#define CONFIG_I2C I2C_AS3525 162#define CONFIG_I2C I2C_AS3525
160 163
diff --git a/firmware/export/config-fuze.h b/firmware/export/config-fuze.h
index 4f943580a7..a30f95e5b0 100644
--- a/firmware/export/config-fuze.h
+++ b/firmware/export/config-fuze.h
@@ -160,6 +160,9 @@
160/* Define this if you have an AMS AS3525*/ 160/* Define this if you have an AMS AS3525*/
161#define CONFIG_CPU AS3525 161#define CONFIG_CPU AS3525
162 162
163/* Define how much SD sectors are reserved for OF */
164#define AMS_OF_SIZE 0xF000
165
163/* Define this if you want to use the AS2525 i2c interface */ 166/* Define this if you want to use the AS2525 i2c interface */
164#define CONFIG_I2C I2C_AS3525 167#define CONFIG_I2C I2C_AS3525
165 168
diff --git a/firmware/export/config-m200v4.h b/firmware/export/config-m200v4.h
index 9ce5605a62..16b704cea4 100644
--- a/firmware/export/config-m200v4.h
+++ b/firmware/export/config-m200v4.h
@@ -105,6 +105,9 @@
105/* Define this for LCD backlight available */ 105/* Define this for LCD backlight available */
106#define HAVE_BACKLIGHT 106#define HAVE_BACKLIGHT
107 107
108/* Define how much SD sectors are reserved for OF */
109#define AMS_OF_SIZE 0x5000
110
108#define CONFIG_I2C I2C_AS3525 111#define CONFIG_I2C I2C_AS3525
109 112
110#define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */ 113#define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 342be613c5..6d6b275fba 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -24,7 +24,7 @@
24 24
25/* TODO: Find the real capacity of >2GB models (will be useful for USB) */ 25/* TODO: Find the real capacity of >2GB models (will be useful for USB) */
26 26
27#include "config.h" /* for HAVE_MULTIVOLUME */ 27#include "config.h" /* for HAVE_MULTIVOLUME & AMS_OF_SIZE */
28#include "fat.h" 28#include "fat.h"
29#include "thread.h" 29#include "thread.h"
30#include "hotswap.h" 30#include "hotswap.h"
@@ -632,11 +632,7 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
632 632
633 /* skip SanDisk OF */ 633 /* skip SanDisk OF */
634 if (drive == INTERNAL_AS3525) 634 if (drive == INTERNAL_AS3525)
635#if defined(SANSA_E200V2) || defined(SANSA_FUZE) 635 start += AMS_OF_SIZE;
636 start += 0xf000;
637#else
638 start += 0x5000;
639#endif
640 636
641 mutex_lock(&sd_mtx); 637 mutex_lock(&sd_mtx);
642#ifndef BOOTLOADER 638#ifndef BOOTLOADER