summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-01-21 20:58:33 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-01-21 20:58:33 +0000
commit29b136b82dda3b3170589df62120705b1b954652 (patch)
tree51dd27061fb7a2da2e2cc826bda1ec6dafb9e5b2 /firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
parent868a4bdbc3f08a7c9d26a84bb67a5b3e083ffcec (diff)
downloadrockbox-29b136b82dda3b3170589df62120705b1b954652.tar.gz
rockbox-29b136b82dda3b3170589df62120705b1b954652.tar.bz2
rockbox-29b136b82dda3b3170589df62120705b1b954652.zip
Onda VX747:
* Get USB working (it isn't good at writing support though) * Clean up NAND & SD a bit * Other comments/fixes Ingenic Jz4740/MIPS: * Split MMU from system git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19815 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
index 22e274b4d1..3bb9a27007 100644
--- a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
@@ -23,31 +23,20 @@
#include "jz4740.h"
#include "ata.h"
#include "ata-sd-target.h"
+#include "logf.h"
#include "sd.h"
#include "system.h"
#include "kernel.h"
#include "panic.h"
#include "debug.h"
+#include "storage.h"
static struct wakeup sd_wakeup;
//#define MMC_DMA_ENABLE
#define MMC_DMA_INTERRUPT 0
-//#define DEBUG(x...) DEBUGF(x);
-#define DEBUG(x...) printf(x);
-
-#ifdef MMC_POWER_PIN
-#define MMC_POWER_OFF() \
-do { \
- __gpio_set_pin(MMC_POWER_PIN); \
-} while (0)
-
-#define MMC_POWER_ON() \
-do { \
- __gpio_clear_pin(MMC_POWER_PIN); \
-} while (0)
-#endif
+#define DEBUG(x...) logf(x);
#ifdef MMC_CD_PIN
#define MMC_INSERT_STATUS() __gpio_get_pin(MMC_CD_PIN)
@@ -1088,7 +1077,7 @@ static void mmc_send_cmd(struct mmc_request *request, int cmd, unsigned int arg,
request->block_len = block_len;
request->buffer = buffer;
request->cnt = nob * block_len;
- printf("mmc_send_cmd: command = %d",cmd);
+ logf("mmc_send_cmd: command = %d",cmd);
jz_mmc_exec_cmd(request);
}
@@ -1154,3 +1143,20 @@ int _sd_write_sectors(unsigned long start, int count, const void* buf)
(void)buf;
return -1;
}
+
+#ifdef STORAGE_GET_INFO
+void sd_get_info(IF_MV2(int drive,) struct storage_info *info)
+{
+ (void)drive;
+ /* firmware version */
+ info->revision="0.00";
+
+ info->vendor="Rockbox";
+ info->product="SD Storage";
+
+ /* blocks count */
+ /* TODO: proper amount of sectors! */
+ info->num_sectors = 0;
+ info->sector_size = 512;
+}
+#endif