summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/lm32/shared/milkymist_flash/milkymist_flash.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-01 13:48:40 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-01 13:48:40 +0000
commitdce1032b6cdc2cd3c4e6b0ca3695aca6558c56c3 (patch)
treee485d78b238db7255395470e037305af8b8a642c /c/src/lib/libbsp/lm32/shared/milkymist_flash/milkymist_flash.h
parent2011-08-01 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff)
downloadrtems-dce1032b6cdc2cd3c4e6b0ca3695aca6558c56c3.tar.bz2
2011-08-01 Sebastien Bourdeauducq <sebastien.bourdeauducq@gmail.com>
PR 1869/bsps * startup/bspclean.c: New file. * include/tm27.h: Removed. * ChangeLog, Makefile.am, README, preinstall.am, include/bsp.h, include/system_conf.h, make/custom/milkymist.cfg, startup/linkcmds: Complete BSP for Milkymist One supporting Milkymist SOC 1.0.x. Includes new or updated drivers for: - Multi-standard video input (PAL/SECAM/NTSC) - Two DMX512 (RS485) ports - MIDI IN and MIDI OUT ports - VGA output - AC'97 audio - NOR flash - 10/100 Ethernet - Memory card (experimental and incomplete) - USB host connectors (input devices only) - RC5 infrared receiver - RS232 debug port
Diffstat (limited to 'c/src/lib/libbsp/lm32/shared/milkymist_flash/milkymist_flash.h')
-rw-r--r--c/src/lib/libbsp/lm32/shared/milkymist_flash/milkymist_flash.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/lm32/shared/milkymist_flash/milkymist_flash.h b/c/src/lib/libbsp/lm32/shared/milkymist_flash/milkymist_flash.h
new file mode 100644
index 0000000000..f8d5532f84
--- /dev/null
+++ b/c/src/lib/libbsp/lm32/shared/milkymist_flash/milkymist_flash.h
@@ -0,0 +1,53 @@
+/* milkymist_flash.h
+ *
+ * Copyright (C) 2010 Sebastien Bourdeauducq
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ *
+ */
+
+#ifndef __MILKYMIST_FLASH_H_
+#define __MILKYMIST_FLASH_H_
+
+/* Ioctls */
+#define FLASH_GET_SIZE 0x4600
+#define FLASH_GET_BLOCKSIZE 0x4601
+#define FLASH_ERASE_BLOCK 0x4602
+
+struct flash_partition {
+ unsigned int start_address;
+ unsigned int length;
+};
+
+rtems_device_driver flash_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver flash_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver flash_write(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver flash_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define FLASH_DRIVER_TABLE_ENTRY {flash_initialize, \
+NULL, NULL, flash_read, flash_write, flash_control}
+
+#endif /* __MILKYMIST_FLASH_H_ */