From owner-p4-projects@FreeBSD.ORG Fri Feb 27 14:36:48 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EA4501065672; Fri, 27 Feb 2009 14:36:47 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A680D106566C for ; Fri, 27 Feb 2009 14:36:47 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7ADD58FC19 for ; Fri, 27 Feb 2009 14:36:47 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n1REaluj001921 for ; Fri, 27 Feb 2009 14:36:47 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n1REalVf001919 for perforce@freebsd.org; Fri, 27 Feb 2009 14:36:47 GMT (envelope-from lulf@FreeBSD.org) Date: Fri, 27 Feb 2009 14:36:47 GMT Message-Id: <200902271436.n1REalVf001919@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 158376 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2009 14:36:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=158376 Change 158376 by lulf@lulf_carrot on 2009/02/27 14:36:01 - Initial import of busdma code, commented out parts that are not ready yet. - Import mci driver, almost equal to at91, but add it as a file here for now and try and generalize later when we have it working. Affected files ... .. //depot/projects/avr32/src/sys/avr32/avr32/at32.c#4 edit .. //depot/projects/avr32/src/sys/avr32/avr32/busdma_machdep.c#1 add .. //depot/projects/avr32/src/sys/avr32/conf/NGW100#8 edit .. //depot/projects/avr32/src/sys/avr32/include/bus_dma.h#2 edit .. //depot/projects/avr32/src/sys/conf/files.avr32#8 edit Differences ... ==== //depot/projects/avr32/src/sys/avr32/avr32/at32.c#4 (text+ko) ==== @@ -369,3 +369,16 @@ { /* TODO: Implement */ } + +struct avr32_dma_range * +bus_dma_get_range(void) +{ + + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + return (0); +} ==== //depot/projects/avr32/src/sys/avr32/conf/NGW100#8 (text+ko) ==== @@ -45,12 +45,11 @@ device at32_pm # Power Manager device at32_rtc # Real Time Counter (System clock) device at32_pio # Peripheral IO - #device gpio # GPIO framework device uart # USART support #device atmel_twi # TWI (I2C) support #device atmel_ssc # Sync Serial controller -#device atmel_mci # Media card interface +device at32_mci # Media card interface # Drivers for onboard parallel flash device cfi ==== //depot/projects/avr32/src/sys/avr32/include/bus_dma.h#2 (text+ko) ==== @@ -7,4 +7,31 @@ #include +#ifdef _AVR32_BUS_DMA_PRIVATE +/* + * avr32_dma_range + * + * This structure describes a valid DMA range. + */ +struct avr32_dma_range { + bus_addr_t dr_sysbase; /* system base address */ + bus_addr_t dr_busbase; /* appears here on bus */ + bus_size_t dr_len; /* length of range */ +}; + +/* _dm_buftype */ +#define AVR32_BUFTYPE_INVALID 0 +#define AVR32_BUFTYPE_LINEAR 1 +#define AVR32_BUFTYPE_MBUF 2 +#define AVR32_BUFTYPE_UIO 3 +#define AVR32_BUFTYPE_RAW 4 + +struct avr32_dma_range *bus_dma_get_range(void); +int bus_dma_get_range_nb(void); + +extern bus_dma_tag_t avr32_root_dma_tag; + +#endif /* _AVR32_BUS_DMA_PRIVATE */ + + #endif /* !_AVR32_BUS_DMA_H_ */ ==== //depot/projects/avr32/src/sys/conf/files.avr32#8 (text+ko) ==== @@ -32,6 +32,8 @@ avr32/avr32/at32_pio.c optional at32_pio avr32/avr32/at32_sdramc.c optional at32_sdramc avr32/avr32/at32_smc.c optional at32_smc +avr32/avr32/at32_mci.c optional at32_mci +avr32/avr32/busdma_machdep.c optional at32_mci dev/cfi/cfi_bus_at32_smc.c optional at32_smc cfi libkern/ashldi3.c standard