diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/archos/av300/ata-av300.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/archos/av300/ata-target.h | 8 | ||||
-rw-r--r-- | firmware/target/arm/ata-pp5002.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/ata-pp5020.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/ata-target.h | 17 | ||||
-rw-r--r-- | firmware/target/arm/imx31/ata-imx31.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/imx31/ata-target.h | 8 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/ata-target.h | 4 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | 6 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/mrobe-500/ata-target.h | 5 |
14 files changed, 22 insertions, 47 deletions
diff --git a/firmware/target/arm/archos/av300/ata-av300.c b/firmware/target/arm/archos/av300/ata-av300.c index 08bee15fe6..e8623e5f16 100644 --- a/firmware/target/arm/archos/av300/ata-av300.c +++ b/firmware/target/arm/archos/av300/ata-av300.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #include <stdbool.h> | 31 | #include <stdbool.h> |
32 | #include "system.h" | 32 | #include "system.h" |
33 | #include "ata-target.h" | 33 | #include "ata-driver.h" |
34 | 34 | ||
35 | void ata_reset() | 35 | void ata_reset() |
36 | { | 36 | { |
diff --git a/firmware/target/arm/archos/av300/ata-target.h b/firmware/target/arm/archos/av300/ata-target.h index bc3a19a6b4..5732f17045 100644 --- a/firmware/target/arm/archos/av300/ata-target.h +++ b/firmware/target/arm/archos/av300/ata-target.h | |||
@@ -19,6 +19,9 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #ifndef ATA_TARGET_H | ||
23 | #define ATA_TARGET_H | ||
24 | |||
22 | /* Plain C read & write loops */ | 25 | /* Plain C read & write loops */ |
23 | 26 | ||
24 | #define ATA_IOBASE 0x02400000 | 27 | #define ATA_IOBASE 0x02400000 |
@@ -33,7 +36,4 @@ | |||
33 | #define ATA_CONTROL (*((volatile unsigned char*)(ATA_IOBASE + 0x340))) | 36 | #define ATA_CONTROL (*((volatile unsigned char*)(ATA_IOBASE + 0x340))) |
34 | #define ATA_COMMAND (*((volatile unsigned char*)(ATA_IOBASE + 0x380))) | 37 | #define ATA_COMMAND (*((volatile unsigned char*)(ATA_IOBASE + 0x380))) |
35 | 38 | ||
36 | void ata_reset(void); | 39 | #endif /* ATA_TARGET_H */ |
37 | void ata_enable(bool on); | ||
38 | bool ata_is_coldstart(void); | ||
39 | void ata_device_init(void); | ||
diff --git a/firmware/target/arm/ata-pp5002.c b/firmware/target/arm/ata-pp5002.c index 2c4bb3b3bc..5ab0e9ddc7 100644 --- a/firmware/target/arm/ata-pp5002.c +++ b/firmware/target/arm/ata-pp5002.c | |||
@@ -23,8 +23,7 @@ | |||
23 | 23 | ||
24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
25 | #include "system.h" | 25 | #include "system.h" |
26 | #include "ata.h" | 26 | #include "ata-driver.h" |
27 | #include "ata-target.h" | ||
28 | 27 | ||
29 | void ata_reset() | 28 | void ata_reset() |
30 | { | 29 | { |
diff --git a/firmware/target/arm/ata-pp5020.c b/firmware/target/arm/ata-pp5020.c index 0eb64351f2..50e6e27c98 100644 --- a/firmware/target/arm/ata-pp5020.c +++ b/firmware/target/arm/ata-pp5020.c | |||
@@ -23,8 +23,7 @@ | |||
23 | 23 | ||
24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
25 | #include "system.h" | 25 | #include "system.h" |
26 | #include "ata.h" | 26 | #include "ata-driver.h" |
27 | #include "ata-target.h" | ||
28 | 27 | ||
29 | void ata_reset() | 28 | void ata_reset() |
30 | { | 29 | { |
diff --git a/firmware/target/arm/ata-target.h b/firmware/target/arm/ata-target.h index 779ebed070..616c451579 100644 --- a/firmware/target/arm/ata-target.h +++ b/firmware/target/arm/ata-target.h | |||
@@ -19,6 +19,11 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #ifndef ATA_TARGET_H | ||
23 | #define ATA_TARGET_H | ||
24 | |||
25 | #include "config.h" | ||
26 | |||
22 | #ifdef CPU_PP | 27 | #ifdef CPU_PP |
23 | 28 | ||
24 | #ifdef HAVE_BOOTLOADER_USB_MODE | 29 | #ifdef HAVE_BOOTLOADER_USB_MODE |
@@ -49,17 +54,11 @@ | |||
49 | /* asm optimized reading and writing */ | 54 | /* asm optimized reading and writing */ |
50 | #define ATA_OPTIMIZED_READING | 55 | #define ATA_OPTIMIZED_READING |
51 | #define ATA_OPTIMIZED_WRITING | 56 | #define ATA_OPTIMIZED_WRITING |
52 | void copy_read_sectors(unsigned char* buf, int wordcount); | ||
53 | void copy_write_sectors(const unsigned char* buf, int wordcount); | ||
54 | 57 | ||
55 | #endif /* CONFIG_CPU */ | 58 | #endif /* CONFIG_CPU */ |
56 | 59 | ||
57 | #endif | 60 | #endif |
58 | 61 | ||
59 | void ata_reset(void); | ||
60 | bool ata_is_coldstart(void); | ||
61 | void ata_device_init(void); | ||
62 | |||
63 | #ifdef HAVE_ATA_DMA | 62 | #ifdef HAVE_ATA_DMA |
64 | 63 | ||
65 | /* IDE DMA controller registers */ | 64 | /* IDE DMA controller registers */ |
@@ -88,8 +87,6 @@ void ata_device_init(void); | |||
88 | #define ATA_MAX_UDMA 1 | 87 | #define ATA_MAX_UDMA 1 |
89 | #endif | 88 | #endif |
90 | 89 | ||
91 | void ata_dma_set_mode(unsigned char mode); | ||
92 | bool ata_dma_setup(void *addr, unsigned long bytes, bool write); | ||
93 | bool ata_dma_finish(void); | ||
94 | |||
95 | #endif /* HAVE_ATA_DMA */ | 90 | #endif /* HAVE_ATA_DMA */ |
91 | |||
92 | #endif /* ATA_TARGET_H */ | ||
diff --git a/firmware/target/arm/imx31/ata-imx31.c b/firmware/target/arm/imx31/ata-imx31.c index 8a40c924ff..80539b9c9d 100644 --- a/firmware/target/arm/imx31/ata-imx31.c +++ b/firmware/target/arm/imx31/ata-imx31.c | |||
@@ -25,9 +25,8 @@ | |||
25 | #include "system.h" | 25 | #include "system.h" |
26 | #include "power.h" | 26 | #include "power.h" |
27 | #include "panic.h" | 27 | #include "panic.h" |
28 | #include "ata.h" | 28 | #include "ata-driver.h" |
29 | #include "ata-defines.h" | 29 | #include "ata-defines.h" |
30 | #include "ata-target.h" | ||
31 | #include "ccm-imx31.h" | 30 | #include "ccm-imx31.h" |
32 | #ifdef HAVE_ATA_DMA | 31 | #ifdef HAVE_ATA_DMA |
33 | #include "sdma-imx31.h" | 32 | #include "sdma-imx31.h" |
diff --git a/firmware/target/arm/imx31/ata-target.h b/firmware/target/arm/imx31/ata-target.h index 24141c6aa7..6893e83198 100644 --- a/firmware/target/arm/imx31/ata-target.h +++ b/firmware/target/arm/imx31/ata-target.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #ifndef ATA_TARGET_H | 21 | #ifndef ATA_TARGET_H |
22 | #define ATA_TARGET_H | 22 | #define ATA_TARGET_H |
23 | 23 | ||
24 | #include "config.h" | ||
25 | |||
24 | #ifdef BOOTLOADER | 26 | #ifdef BOOTLOADER |
25 | #define ATA_DRIVER_CLOSE | 27 | #define ATA_DRIVER_CLOSE |
26 | #endif | 28 | #endif |
@@ -46,12 +48,8 @@ | |||
46 | #define ATA_COMMAND ATA_DRIVE_COMMAND | 48 | #define ATA_COMMAND ATA_DRIVE_COMMAND |
47 | #define ATA_CONTROL ATA_DRIVE_CONTROL | 49 | #define ATA_CONTROL ATA_DRIVE_CONTROL |
48 | 50 | ||
49 | void ata_reset(void); | ||
50 | void ata_device_init(void); | ||
51 | bool ata_is_coldstart(void); | ||
52 | 51 | ||
53 | #define ATA_SET_DEVICE_FEATURES | 52 | #define ATA_SET_PIO_TIMING |
54 | void ata_set_pio_timings(int mode); | ||
55 | 53 | ||
56 | #define ATA_TARGET_POLLING | 54 | #define ATA_TARGET_POLLING |
57 | 55 | ||
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c index 8cd0260fe4..89b00bbd1d 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c | |||
@@ -26,8 +26,7 @@ | |||
26 | #include "power.h" | 26 | #include "power.h" |
27 | #include "panic.h" | 27 | #include "panic.h" |
28 | #include "pcf50606.h" | 28 | #include "pcf50606.h" |
29 | #include "ata.h" | 29 | #include "ata-driver.h" |
30 | #include "ata-target.h" | ||
31 | #include "backlight-target.h" | 30 | #include "backlight-target.h" |
32 | 31 | ||
33 | /* ARESET on C7C68300 and RESET on ATA interface (Active Low) */ | 32 | /* ARESET on C7C68300 and RESET on ATA interface (Active Low) */ |
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/ata-target.h b/firmware/target/arm/s3c2440/gigabeat-fx/ata-target.h index 95cbaa11cf..7ca7d77c4f 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/ata-target.h +++ b/firmware/target/arm/s3c2440/gigabeat-fx/ata-target.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #define PREFER_C_WRITING | 30 | #define PREFER_C_WRITING |
31 | #if !defined(BOOTLOADER) | 31 | #if !defined(BOOTLOADER) |
32 | #define ATA_OPTIMIZED_READING | 32 | #define ATA_OPTIMIZED_READING |
33 | void copy_read_sectors(unsigned char* buf, int wordcount); | ||
34 | #endif | 33 | #endif |
35 | 34 | ||
36 | #define ATA_IOBASE 0x18000000 | 35 | #define ATA_IOBASE 0x18000000 |
@@ -44,8 +43,5 @@ void copy_read_sectors(unsigned char* buf, int wordcount); | |||
44 | #define ATA_COMMAND (*((volatile unsigned char*)(ATA_IOBASE + 0x0E))) | 43 | #define ATA_COMMAND (*((volatile unsigned char*)(ATA_IOBASE + 0x0E))) |
45 | #define ATA_CONTROL (*((volatile unsigned char*)(0x20000000 + 0x1C))) | 44 | #define ATA_CONTROL (*((volatile unsigned char*)(0x20000000 + 0x1C))) |
46 | 45 | ||
47 | void ata_reset(void); | ||
48 | void ata_device_init(void); | ||
49 | bool ata_is_coldstart(void); | ||
50 | 46 | ||
51 | #endif | 47 | #endif |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c index ad10502f2d..4ff39e2a9e 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "system.h" | 26 | #include "system.h" |
27 | #include "power.h" | 27 | #include "power.h" |
28 | #include "panic.h" | 28 | #include "panic.h" |
29 | #include "ata-target.h" | 29 | #include "ata-driver.h" |
30 | #include "dm320.h" | 30 | #include "dm320.h" |
31 | #include "ata.h" | 31 | #include "ata.h" |
32 | #include "string.h" | 32 | #include "string.h" |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h index 1a1648983d..5b66d192a5 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h +++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | |||
@@ -32,8 +32,6 @@ | |||
32 | #define copy_read_sectors dma_ata_read | 32 | #define copy_read_sectors dma_ata_read |
33 | #define copy_write_sectors dma_ata_write | 33 | #define copy_write_sectors dma_ata_write |
34 | */ | 34 | */ |
35 | void copy_read_sectors(const unsigned char* buf, int wordcount); | ||
36 | void copy_write_sectors(const unsigned char* buf, int wordcount); | ||
37 | 35 | ||
38 | /* Nasty hack, but Creative is nasty... */ | 36 | /* Nasty hack, but Creative is nasty... */ |
39 | #define ata_read_sectors _ata_read_sectors | 37 | #define ata_read_sectors _ata_read_sectors |
@@ -53,10 +51,6 @@ extern int _ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, | |||
53 | #define ATA_COMMAND (*((volatile unsigned char*)(ATA_IOBASE+0xE))) | 51 | #define ATA_COMMAND (*((volatile unsigned char*)(ATA_IOBASE+0xE))) |
54 | #define ATA_CONTROL (*((volatile unsigned char*)(ATA_IOBASE+0x800C))) | 52 | #define ATA_CONTROL (*((volatile unsigned char*)(ATA_IOBASE+0x800C))) |
55 | 53 | ||
56 | void ata_reset(void); | ||
57 | void ata_device_init(void); | ||
58 | bool ata_is_coldstart(void); | ||
59 | void ide_power_enable(bool on); | ||
60 | #ifdef BOOTLOADER | 54 | #ifdef BOOTLOADER |
61 | int load_minifs_file(char* filename, unsigned char* location); | 55 | int load_minifs_file(char* filename, unsigned char* location); |
62 | #endif | 56 | #endif |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c index 6a74ff5e57..418a28ff09 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "dma-target.h" | 26 | #include "dma-target.h" |
27 | #include "dm320.h" | 27 | #include "dm320.h" |
28 | #include "ata.h" | 28 | #include "ata.h" |
29 | #include "ata-target.h" | 29 | #include "ata-driver.h" |
30 | #include "ata-defines.h" | 30 | #include "ata-defines.h" |
31 | #include <stdbool.h> | 31 | #include <stdbool.h> |
32 | 32 | ||
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c index 59f8464d76..1abe0843b3 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c | |||
@@ -27,8 +27,7 @@ | |||
27 | #include "power.h" | 27 | #include "power.h" |
28 | #include "panic.h" | 28 | #include "panic.h" |
29 | #include "pcf50606.h" | 29 | #include "pcf50606.h" |
30 | #include "ata.h" | 30 | #include "ata-driver.h" |
31 | #include "ata-target.h" | ||
32 | #include "backlight-target.h" | 31 | #include "backlight-target.h" |
33 | 32 | ||
34 | /* ARESET on C7C68300 and RESET on ATA interface (Active Low) */ | 33 | /* ARESET on C7C68300 and RESET on ATA interface (Active Low) */ |
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h b/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h index ca75876259..564ff3031f 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h +++ b/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h | |||
@@ -31,8 +31,6 @@ | |||
31 | #define ATA_OPTIMIZED_READING | 31 | #define ATA_OPTIMIZED_READING |
32 | #define ATA_OPTIMIZED_WRITING | 32 | #define ATA_OPTIMIZED_WRITING |
33 | 33 | ||
34 | void copy_read_sectors(const unsigned char* buf, int wordcount); | ||
35 | void copy_write_sectors(const unsigned char* buf, int wordcount); | ||
36 | #endif | 34 | #endif |
37 | 35 | ||
38 | #define ATA_IOBASE 0x50000000 | 36 | #define ATA_IOBASE 0x50000000 |
@@ -49,8 +47,5 @@ void copy_write_sectors(const unsigned char* buf, int wordcount); | |||
49 | #define ATA_COMMAND (*((volatile unsigned char*)(REGISTER_OFFSET + (0x07 << IDE_SHIFT)))) | 47 | #define ATA_COMMAND (*((volatile unsigned char*)(REGISTER_OFFSET + (0x07 << IDE_SHIFT)))) |
50 | #define ATA_CONTROL (*((volatile unsigned char*)(CONTROL_OFFSET + (0x06 << IDE_SHIFT)))) | 48 | #define ATA_CONTROL (*((volatile unsigned char*)(CONTROL_OFFSET + (0x06 << IDE_SHIFT)))) |
51 | 49 | ||
52 | void ata_reset(void); | ||
53 | void ata_device_init(void); | ||
54 | bool ata_is_coldstart(void); | ||
55 | 50 | ||
56 | #endif | 51 | #endif |