PERFORCE change 197185 for review

Jakub Wojciech Klama jceel at FreeBSD.org
Thu Aug 4 14:07:39 UTC 2011


http://p4web.freebsd.org/@@197185?ac=10

Change 197185 by jceel at jceel_cyclone on 2011/08/04 14:07:17

	Add early version of DMA controller driver.

Affected files ...

.. //depot/projects/soc2011/jceel_lpc/sys/arm/conf/EA3250#10 edit
.. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/files.lpc#9 edit
.. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpc_dmac.c#3 add
.. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcreg.h#9 edit
.. //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcvar.h#7 edit
.. //depot/projects/soc2011/jceel_lpc/sys/boot/fdt/dts/ea3250.dts#10 edit

Differences ...

==== //depot/projects/soc2011/jceel_lpc/sys/arm/conf/EA3250#10 (text+ko) ====

@@ -97,6 +97,9 @@
 
 device		lpcfb
 
+# DMAC
+device		dmac
+
 # Flattened Device Tree
 options 	FDT
 options 	FDT_DTB_STATIC

==== //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/files.lpc#9 (text+ko) ====

@@ -15,6 +15,7 @@
 arm/lpc/lpc_fb.c			optional	lpcfb
 arm/lpc/lpc_gpio.c			optional	lpcgpio
 arm/lpc/lpc_spi.c			optional	lpcspi
+arm/lpc/lpc_dmac.c			optional	dmac
 arm/lpc/ssd1289.c			optional	ssd1289
 dev/uart/uart_dev_ns8250.c		optional	uart
 kern/kern_clocksource.c			standard

==== //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcreg.h#9 (text+ko) ====

@@ -141,6 +141,7 @@
 #define	LPC_CLKPWR_MS_CTRL_SD_CLOCK	(1 << 5)
 #define	LPC_CLKPWR_MS_CTRL_CLKDIV_MASK	0xf
 #define	LPC_CLKPWR_DMACLK_CTRL		0xe8
+#define	LPC_CLKPWR_DMACLK_CTRL_EN	(1 << 0)
 #define	LPC_CLKPWR_FLASHCLK_CTRL	0xc8
 #define	LPC_CLKPWR_MACCLK_CTRL		0x90
 #define	LPC_CLKPWR_LCDCLK_CTRL		0x54
@@ -560,6 +561,8 @@
 #define	LPC_DMAC_SOFTLSREQ		0x2c
 #define	LPC_DMAC_CONFIG			0x30
 #define	LPC_DMAC_CHADDR(_n)		(0x100 + (_n * 0x20))
+#define	LPC_DMAC_CHNUM			8
+#define	LPC_DMAC_CHSIZE			0x20
 #define	LPC_DMAC_CH_SRCADDR		0x00
 #define	LPC_DMAC_CH_DSTADDR		0x04
 #define	LPC_DMAC_CH_LLI			0x08
@@ -582,6 +585,10 @@
 #define	LPC_DMAC_CH_CONFIG_ITC		(1 << 15)
 #define	LPC_DMAC_CH_CONFIG_IE		(1 << 14)
 #define	LPC_DMAC_CH_CONFIG_FLOWCNTL(_n)	((_n & 0x7) << 11)
+#define	LPC_DMAC_CH_FCNTL_MEM_TO_MEM	0
+#define	LPC_DMAC_CH_FCNTL_MEM_TO_DEV	1
+#define	LPC_DMAC_CH_FCNTL_DEV_TO_MEM	2
+#define	LPC_DMAC_CH_FCNTL_DEV_TO_DEV	3
 #define	LPC_DMAC_CH_CONFIG_DESTP(_n)	((_n & 0x1f) << 6)
 #define	LPC_DMAC_CH_CONFIG_SRCP(_n)	((_n & 0x1f) << 1)
 #define	LPC_DMAC_CH_CONFIG_E		(1 << 0)

==== //depot/projects/soc2011/jceel_lpc/sys/arm/lpc/lpcvar.h#7 (text+ko) ====

@@ -44,10 +44,13 @@
 /* DMA */
 struct lpc_dmac_channel_config
 {
+	int		ldc_fcntl;
 	int		ldc_src_periph;
+	int		ldc_src_width;
+	int		ldc_src_incr;
 	int		ldc_dst_periph;
-	int		ldc_src_width;
 	int		ldc_dst_width;
+	int		ldc_dst_incr;
 	void		(*ldc_success_handler)(void);
 	void		(*ldc_error_handler)(void);
 };

==== //depot/projects/soc2011/jceel_lpc/sys/boot/fdt/dts/ea3250.dts#10 (text+ko) ====

@@ -179,6 +179,13 @@
 		compatible = "simple-bus";
 		ranges = <0x0 0x30000000 0x10000000>;
 
+		dmac at 100000 {
+			compatible = "lpc,dmac";
+			reg = <0x100000 0x20000>;
+			interrupts = <28>;
+			interrupt-parent = <&PIC>;
+		};
+
 		usb at 1020000 {
 			compatible = "lpc,usb-ohci", "usb-ohci";
 			reg = <0x1020000 0x20000>;


More information about the p4-projects mailing list