亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? spi.patch

?? patches for linux-2.6.
?? PATCH
?? 第 1 頁 / 共 2 頁
字號:
diff -Nbur linux26-cvs/arch/mips/au1000/common/clocks.c linux26-cvs.SPI/arch/mips/au1000/common/clocks.c--- linux26.cvs/arch/mips/au1000/common/clocks.c	2005-08-03 11:21:28.000000000 -0500+++ linux26.amd/arch/mips/au1000/common/clocks.c	2005-08-03 10:54:38.000000000 -0500@@ -46,7 +46,7 @@ { 	return au1x00_clock; }-+EXPORT_SYMBOL(get_au1x00_speed);   /*diff -Nbur linux26-cvs/drivers/char/au1xxx_psc_spi.c linux26-cvs.SPI/drivers/char/au1xxx_psc_spi.c--- linux26.cvs/drivers/char/au1xxx_psc_spi.c	1969-12-31 18:00:00.000000000 -0600+++ linux26.amd/drivers/char/au1xxx_psc_spi.c	2005-08-03 10:55:08.000000000 -0500@@ -0,0 +1,552 @@+/*+ *  Driver for Alchemy Au1550 SPI on the PSC.+ *+ * Copyright 2004 Embedded Edge, LLC.+ *	dan@embeddededge.com+ *+ *  This program is free software; you can redistribute  it and/or modify it+ *  under  the terms of  the GNU General  Public License as published by the+ *  Free Software Foundation;  either version 2 of the  License, or (at your+ *  option) any later version.+ *+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN+ *  NO  EVENT  SHALL   THE AUTHOR  BE	LIABLE FOR ANY   DIRECT, INDIRECT,+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+ *+ *  You should have received a copy of the  GNU General Public License along+ *  with this program; if not, write  to the Free Software Foundation, Inc.,+ *  675 Mass Ave, Cambridge, MA 02139, USA.+ */++#include <linux/module.h>+#include <linux/config.h>+#include <linux/types.h>+#include <linux/kernel.h>+#include <linux/miscdevice.h>+#include <linux/init.h>+#include <linux/fs.h>+#include <asm/uaccess.h>+#include <asm/io.h>+#include <asm/mach-au1x00/au1000.h>+#include <asm/mach-au1x00/au1550_spi.h>+#include <asm/mach-au1x00/au1xxx_psc.h>++#ifdef CONFIG_MIPS_PB1550+#include <asm/mach-pb1x00/pb1550.h>+#endif++#ifdef CONFIG_MIPS_DB1550+#include <asm/mach-db1x00/db1x00.h>+#endif++#ifdef CONFIG_MIPS_PB1200+#include <asm/mach-pb1x00/pb1200.h>+#endif++#ifdef CONFIG_MIPS_DB1200+#include <asm/mach-db1x00/db1200.h>+#endif++#ifdef CONFIG_PM+#include <asm/mach-au1x00/au1xxx_pm.h>+#endif+++/* This is just a simple programmed I/O SPI interface on the PSC of the 1550.+ * We support open, close, write, and ioctl.  The SPI is a full duplex+ * interface, you can't read without writing.  So, the write system call+ * copies the bytes out to the SPI, and whatever is returned is placed+ * in the same buffer.  Kinda weird, maybe we'll change it, but for now+ * it works OK.+ * I didn't implement any DMA yet, and it's a debate about the necessity.+ * The SPI clocks are usually quite fast, so data is sent/received as+ * quickly as you can stuff the FIFO.  The overhead of DMA and interrupts+ * are usually far greater than the data transfer itself.  If, however,+ * we find applications that move large amounts of data, we may choose+ * use the overhead of buffering and DMA to do the work.+ */++/* The maximum clock rate specified in the manual is 2mHz.+*/+#define MAX_BAUD_RATE	(2 * 1000000)+#define PSC_INTCLK_RATE (32 * 1000000)++static	int	inuse;++/* We have to know what the user requested for the data length+ * so we know how to stuff the fifo.  The FIFO is 32 bits wide,+ * and we have to load it with the bits to go in a single transfer.+ */+static	uint	spi_datalen;+ +#ifdef CONFIG_PM +int au1200spi_pm_callback(au1xxx_power_dev_t *dev, +		au1xxx_request_t request, void *data);+au1xxx_power_dev_t *SPI_pm_dev;+#endif+++static int+au1550spi_master_done( int ms )+{+	int timeout=ms;+	volatile psc_spi_t *sp;++	sp = (volatile psc_spi_t *)SPI_PSC_BASE;++	/* Loop until MD is set or timeout has expired */+	while(!(sp->psc_spievent & PSC_SPIEVNT_MD) &&  timeout--) udelay(1000);++	if ( !timeout )+		return 0;+	else+		sp->psc_spievent |= PSC_SPIEVNT_MD;++	return 1;+}++static int+au1550spi_open(struct inode *inode, struct file *file)+{+	if (inuse)+		return -EBUSY;++	inuse = 1;++	+	return 0;+}++static ssize_t+au1550spi_write(struct file *fp, const char *bp, size_t count, loff_t *ppos)+{+	int	bytelen, i;+	size_t	rcount, retval;+	unsigned char	sb, *rp, *wp;+	uint	fifoword, pcr, stat;+	volatile psc_spi_t *sp;++	/* Get the number of bytes per transfer.+	*/+	bytelen = ((spi_datalen - 1) / 8) + 1;++	/* User needs to send us multiple of this count.+	*/+	if ((count % bytelen) != 0)+		return -EINVAL;++	rp = wp = (unsigned char *)bp;+	retval = rcount = count;++	/* Reset the FIFO.+	*/+	sp = (volatile psc_spi_t *)SPI_PSC_BASE;+	sp->psc_spipcr = (PSC_SPIPCR_RC | PSC_SPIPCR_TC);+	au_sync();+	do {+		pcr = sp->psc_spipcr;+		au_sync();+	} while (pcr != 0);++	/* Prime the transmit FIFO.+	*/+	while (count > 0) {+		fifoword = 0;+		for (i=0; i<bytelen; i++) {+			fifoword <<= 8;+			if (get_user(sb, wp) < 0)+				return -EFAULT;+			fifoword |= sb;+			wp++;+		}+		count -= bytelen;+		if (count <= 0)+			fifoword |= PSC_SPITXRX_LC;+		sp->psc_spitxrx = fifoword;+		au_sync();+		stat = sp->psc_spistat;+		au_sync();+		if (stat & PSC_SPISTAT_TF)+			break;+	}++	/* Start the transfer.+	*/+	sp->psc_spipcr = PSC_SPIPCR_MS;+	au_sync();++	/* Now, just keep the transmit fifo full and empty the receive.+	*/+	while (count > 0) {+		stat = sp->psc_spistat;+		au_sync();+		while ((stat & PSC_SPISTAT_RE) == 0) {+			fifoword = sp->psc_spitxrx;+			au_sync();+			for (i=0; i<bytelen; i++) {+				sb = fifoword & 0xff;+				if (put_user(sb, rp) < 0)+					return -EFAULT;+				fifoword >>= 8;+				rp++;+			}+			rcount -= bytelen;+			stat = sp->psc_spistat;+			au_sync();+		}+		if ((stat & PSC_SPISTAT_TF) == 0) {+			fifoword = 0;+			for (i=0; i<bytelen; i++) {+				fifoword <<= 8;+				if (get_user(sb, wp) < 0)+					return -EFAULT;+				fifoword |= sb;+				wp++;+			}+			count -= bytelen;+			if (count <= 0)+				fifoword |= PSC_SPITXRX_LC;+			sp->psc_spitxrx = fifoword;+			au_sync();+		}+	}++	/* All of the bytes for transmit have been written.  Hang+	 * out waiting for any residual bytes that are yet to be+	 * read from the fifo.+	 */+	while (rcount > 0) {+		stat = sp->psc_spistat;+		au_sync();+		if ((stat & PSC_SPISTAT_RE) == 0) {+			fifoword = sp->psc_spitxrx;+			au_sync();+			for (i=0; i<bytelen; i++) {+				sb = fifoword & 0xff;+				if (put_user(sb, rp) < 0)+					return -EFAULT;+				fifoword >>= 8;+				rp++;+			}+			rcount -= bytelen;+		}+	}++	/* Wait for MasterDone event. 30ms timeout */+	if (!au1550spi_master_done(30) ) retval = -EFAULT;+	return retval;+}++static int+au1550spi_release(struct inode *inode, struct file *file)+{+	+	inuse = 0;++	return 0;+}++/* Set the baud rate closest to the request, then return the actual+ * value we are using.+ */+static uint+set_baud_rate(uint baud)+{+	uint	rate, tmpclk, brg, ctl, stat;+	volatile psc_spi_t *sp;++	/* For starters, the input clock is divided by two.+	*/+	tmpclk = PSC_INTCLK_RATE/2;++	rate = tmpclk / baud;++	/* The dividers work as follows:+	 *	baud = tmpclk / (2 * (brg + 1))+	 */+	 brg = (rate/2) - 1;++	 /* Test BRG to ensure it will fit into the 6 bits allocated.+	 */++	 /* Make sure the device is disabled while we make the change.+	 */+	sp = (volatile psc_spi_t *)SPI_PSC_BASE;+	ctl = sp->psc_spicfg;+	au_sync();+	sp->psc_spicfg = ctl & ~PSC_SPICFG_DE_ENABLE;+	au_sync();+	ctl = PSC_SPICFG_CLR_BAUD(ctl);+	ctl |= PSC_SPICFG_SET_BAUD(brg);+	sp->psc_spicfg = ctl;+	au_sync();++	/* If the device was running prior to getting here, wait for+	 * it to restart.+	 */+	if (ctl & PSC_SPICFG_DE_ENABLE) {+		do {+			stat = sp->psc_spistat;+			au_sync();+		} while ((stat & PSC_SPISTAT_DR) == 0);+	}++	/* Return the actual value.+	*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美天天综合网| 丁香婷婷综合五月| 欧美浪妇xxxx高跟鞋交| 亚洲一区中文在线| 欧美精品xxxxbbbb| 精品一区二区三区在线播放视频 | 色婷婷久久久综合中文字幕| 亚洲手机成人高清视频| 欧美在线观看视频一区二区| 亚洲成人av一区二区| 欧美一区二区三区四区久久| 激情小说欧美图片| 中文字幕乱码亚洲精品一区| 色综合天天综合网国产成人综合天| 一区二区三区四区乱视频| 欧美高清激情brazzers| 国产制服丝袜一区| 亚洲免费在线看| 欧美一区二区大片| 亚洲国产日韩av| 精品日韩在线一区| 97成人超碰视| 麻豆久久久久久久| 亚洲欧洲日韩女同| 日韩精品一区二区在线| 99精品国产99久久久久久白柏| 亚洲国产精品视频| 国产亚洲欧美在线| 欧美视频在线一区| 成人精品视频一区二区三区| 香蕉乱码成人久久天堂爱免费| 久久久激情视频| 欧美日韩高清影院| 国产成人av电影在线| 偷拍与自拍一区| 国产精品的网站| 欧美精品一区二区在线播放| 欧美视频一区二区三区四区| 国产成人av福利| 日本成人在线一区| 亚洲综合一区二区精品导航| 久久精品亚洲精品国产欧美kt∨| 欧美图片一区二区三区| 成人黄色av网站在线| 免费人成精品欧美精品| 夜夜嗨av一区二区三区网页| 久久久久高清精品| 日韩欧美国产一区二区三区| 精品视频免费在线| 99视频精品全部免费在线| 麻豆精品视频在线观看视频| 一区二区三区免费网站| 国产精品三级在线观看| 久久品道一品道久久精品| 91精品国产综合久久久久久| 欧美性高清videossexo| 99免费精品视频| 国产激情精品久久久第一区二区| 日韩—二三区免费观看av| 中文字幕视频一区二区三区久| 26uuu精品一区二区| 欧美一级专区免费大片| 欧美老肥妇做.爰bbww视频| 91成人国产精品| 色综合久久88色综合天天 | 成人免费av在线| 国产麻豆午夜三级精品| 乱一区二区av| 久久99国产精品免费| 美腿丝袜亚洲三区| 美女视频第一区二区三区免费观看网站| 亚洲综合免费观看高清完整版在线 | 老司机午夜精品| 青椒成人免费视频| 免费成人美女在线观看.| 日韩va欧美va亚洲va久久| 亚洲第一久久影院| 日韩一区精品字幕| 麻豆成人91精品二区三区| 另类中文字幕网| 激情小说欧美图片| 国产精品2024| youjizz国产精品| 99在线精品视频| 色94色欧美sute亚洲13| 欧美亚洲日本国产| 欧美一区二区三区在线| 精品电影一区二区| 国产丝袜在线精品| 国产精品三级电影| 亚洲另类在线制服丝袜| 午夜欧美2019年伦理| 另类小说欧美激情| 国产成人av在线影院| 一本一道久久a久久精品综合蜜臀| 一本久久a久久精品亚洲| 欧美三级韩国三级日本三斤| 欧美一区二区三区在线电影| xnxx国产精品| 亚洲欧美综合在线精品| 性欧美疯狂xxxxbbbb| 另类的小说在线视频另类成人小视频在线 | 欧美在线视频不卡| 日韩精品一区二区三区视频在线观看| 久久久久久免费毛片精品| 亚洲欧洲一区二区在线播放| 亚洲成a人片在线不卡一二三区| 九九**精品视频免费播放| 成人av中文字幕| 欧美日韩高清在线播放| 久久久另类综合| 亚洲综合色在线| 国产在线看一区| 欧美在线免费观看视频| 欧美大片顶级少妇| 亚洲免费在线电影| 久久国产麻豆精品| 91一区二区三区在线观看| 欧美一区三区二区| 国产精品不卡一区二区三区| 日韩精品一区第一页| 不卡一区在线观看| 日韩欧美国产一区二区三区| 最新日韩av在线| 精品无人码麻豆乱码1区2区| 一本久道久久综合中文字幕| 欧美精品一区二区三区一线天视频| 国产精品久久久久精k8| 麻豆91在线播放| 欧美综合一区二区三区| 国产日韩欧美精品电影三级在线| 亚洲国产精品嫩草影院| www.成人网.com| 久久久精品黄色| 轻轻草成人在线| 色狠狠桃花综合| 日本一区二区三区电影| 蓝色福利精品导航| 欧美日韩久久不卡| 亚洲乱码国产乱码精品精小说 | 国产成人h网站| 7777精品伊人久久久大香线蕉完整版 | 日韩欧美国产一区在线观看| 一区二区激情视频| 成人av网站在线| 久久精品夜夜夜夜久久| 精品一区二区三区香蕉蜜桃 | 91免费国产在线观看| 久久久久久9999| 久久99精品久久久久婷婷| 欧美久久久一区| 亚洲国产精品久久久久婷婷884 | 精品国产伦一区二区三区观看体验| 亚洲国产一区二区a毛片| 97久久超碰国产精品电影| 国产女人水真多18毛片18精品视频 | 久久你懂得1024| 久久精品噜噜噜成人av农村| 欧美日本一区二区三区四区| 亚洲综合999| 日本韩国欧美国产| 一区二区三区中文字幕精品精品| 成人黄动漫网站免费app| 日本一区二区电影| 成人黄色免费短视频| 国产精品日日摸夜夜摸av| 成年人国产精品| 亚洲色图19p| 欧美性感一区二区三区| 亚洲国产va精品久久久不卡综合| 在线观看视频一区二区欧美日韩| 亚洲欧美另类图片小说| 色老头久久综合| 亚洲高清免费观看 | 国产精品成人午夜| 99久久99久久精品国产片果冻 | 欧美日韩国产一级| 亚洲国产wwwccc36天堂| 91麻豆精品国产| 免费成人av在线| 久久久久久久久久美女| 成人精品在线视频观看| 亚洲精品免费一二三区| 欧美在线观看一二区| 日本最新不卡在线| 日韩一区二区三区精品视频| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲国产激情av| 在线观看不卡视频| 秋霞电影一区二区| 亚洲国产激情av| 欧美撒尿777hd撒尿| 久久99精品国产91久久来源| 欧美高清在线一区二区| 91精彩视频在线观看| 免费一区二区视频| 国产精品久久久久久亚洲毛片| 日本道免费精品一区二区三区| 天天影视网天天综合色在线播放| 亚洲精品在线三区|