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

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

?? device-init.c

?? linux內核源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* *  PS3 device registration routines. * *  Copyright (C) 2007 Sony Computer Entertainment Inc. *  Copyright 2007 Sony Corp. * *  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; version 2 of the License. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include <linux/delay.h>#include <linux/freezer.h>#include <linux/kernel.h>#include <linux/kthread.h>#include <linux/init.h>#include <asm/firmware.h>#include <asm/lv1call.h>#include <asm/ps3stor.h>#include "platform.h"/** * ps3_setup_gelic_device - Setup and register a gelic device instance. * * Allocates memory for a struct ps3_system_bus_device instance, initialises the * structure members, and registers the device instance with the system bus. */static int __init ps3_setup_gelic_device(	const struct ps3_repository_device *repo){	int result;	struct layout {		struct ps3_system_bus_device dev;		struct ps3_dma_region d_region;	} *p;	pr_debug(" -> %s:%d\n", __func__, __LINE__);	BUG_ON(repo->bus_type != PS3_BUS_TYPE_SB);	BUG_ON(repo->dev_type != PS3_DEV_TYPE_SB_GELIC);	p = kzalloc(sizeof(struct layout), GFP_KERNEL);	if (!p) {		result = -ENOMEM;		goto fail_malloc;	}	p->dev.match_id = PS3_MATCH_ID_GELIC;	p->dev.dev_type = PS3_DEVICE_TYPE_SB;	p->dev.bus_id = repo->bus_id;	p->dev.dev_id = repo->dev_id;	p->dev.d_region = &p->d_region;	result = ps3_repository_find_interrupt(repo,		PS3_INTERRUPT_TYPE_EVENT_PORT, &p->dev.interrupt_id);	if (result) {		pr_debug("%s:%d ps3_repository_find_interrupt failed\n",			__func__, __LINE__);		goto fail_find_interrupt;	}	BUG_ON(p->dev.interrupt_id != 0);	result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K,		PS3_DMA_OTHER, NULL, 0);	if (result) {		pr_debug("%s:%d ps3_dma_region_init failed\n",			__func__, __LINE__);		goto fail_dma_init;	}	result = ps3_system_bus_device_register(&p->dev);	if (result) {		pr_debug("%s:%d ps3_system_bus_device_register failed\n",			__func__, __LINE__);		goto fail_device_register;	}	pr_debug(" <- %s:%d\n", __func__, __LINE__);	return result;fail_device_register:fail_dma_init:fail_find_interrupt:	kfree(p);fail_malloc:	pr_debug(" <- %s:%d: fail.\n", __func__, __LINE__);	return result;}static int __init_refok ps3_setup_uhc_device(	const struct ps3_repository_device *repo, enum ps3_match_id match_id,	enum ps3_interrupt_type interrupt_type, enum ps3_reg_type reg_type){	int result;	struct layout {		struct ps3_system_bus_device dev;		struct ps3_dma_region d_region;		struct ps3_mmio_region m_region;	} *p;	u64 bus_addr;	u64 len;	pr_debug(" -> %s:%d\n", __func__, __LINE__);	BUG_ON(repo->bus_type != PS3_BUS_TYPE_SB);	BUG_ON(repo->dev_type != PS3_DEV_TYPE_SB_USB);	p = kzalloc(sizeof(struct layout), GFP_KERNEL);	if (!p) {		result = -ENOMEM;		goto fail_malloc;	}	p->dev.match_id = match_id;	p->dev.dev_type = PS3_DEVICE_TYPE_SB;	p->dev.bus_id = repo->bus_id;	p->dev.dev_id = repo->dev_id;	p->dev.d_region = &p->d_region;	p->dev.m_region = &p->m_region;	result = ps3_repository_find_interrupt(repo,		interrupt_type, &p->dev.interrupt_id);	if (result) {		pr_debug("%s:%d ps3_repository_find_interrupt failed\n",			__func__, __LINE__);		goto fail_find_interrupt;	}	result = ps3_repository_find_reg(repo, reg_type,		&bus_addr, &len);	if (result) {		pr_debug("%s:%d ps3_repository_find_reg failed\n",			__func__, __LINE__);		goto fail_find_reg;	}	result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K,		PS3_DMA_INTERNAL, NULL, 0);	if (result) {		pr_debug("%s:%d ps3_dma_region_init failed\n",			__func__, __LINE__);		goto fail_dma_init;	}	result = ps3_mmio_region_init(&p->dev, p->dev.m_region, bus_addr, len,		PS3_MMIO_4K);	if (result) {		pr_debug("%s:%d ps3_mmio_region_init failed\n",			__func__, __LINE__);		goto fail_mmio_init;	}	result = ps3_system_bus_device_register(&p->dev);	if (result) {		pr_debug("%s:%d ps3_system_bus_device_register failed\n",			__func__, __LINE__);		goto fail_device_register;	}	pr_debug(" <- %s:%d\n", __func__, __LINE__);	return result;fail_device_register:fail_mmio_init:fail_dma_init:fail_find_reg:fail_find_interrupt:	kfree(p);fail_malloc:	pr_debug(" <- %s:%d: fail.\n", __func__, __LINE__);	return result;}static int __init ps3_setup_ehci_device(	const struct ps3_repository_device *repo){	return ps3_setup_uhc_device(repo, PS3_MATCH_ID_EHCI,		PS3_INTERRUPT_TYPE_SB_EHCI, PS3_REG_TYPE_SB_EHCI);}static int __init ps3_setup_ohci_device(	const struct ps3_repository_device *repo){	return ps3_setup_uhc_device(repo, PS3_MATCH_ID_OHCI,		PS3_INTERRUPT_TYPE_SB_OHCI, PS3_REG_TYPE_SB_OHCI);}static int __init ps3_setup_vuart_device(enum ps3_match_id match_id,	unsigned int port_number){	int result;	struct layout {		struct ps3_system_bus_device dev;	} *p;	pr_debug(" -> %s:%d: match_id %u, port %u\n", __func__, __LINE__,		match_id, port_number);	p = kzalloc(sizeof(struct layout), GFP_KERNEL);	if (!p)		return -ENOMEM;	p->dev.match_id = match_id;	p->dev.dev_type = PS3_DEVICE_TYPE_VUART;	p->dev.port_number = port_number;	result = ps3_system_bus_device_register(&p->dev);	if (result)		pr_debug("%s:%d ps3_system_bus_device_register failed\n",			__func__, __LINE__);	pr_debug(" <- %s:%d\n", __func__, __LINE__);	return result;}static int ps3stor_wait_for_completion(u64 dev_id, u64 tag,				       unsigned int timeout){	int result = -1;	unsigned int retries = 0;	u64 status;	for (retries = 0; retries < timeout; retries++) {		result = lv1_storage_check_async_status(dev_id, tag, &status);		if (!result)			break;		msleep(1);	}	if (result)		pr_debug("%s:%u: check_async_status: %s, status %lx\n",			 __func__, __LINE__, ps3_result(result), status);	return result;}/** * ps3_storage_wait_for_device - Wait for a storage device to become ready. * @repo: The repository device to wait for. * * Uses the hypervisor's storage device notification mechanism to wait until * a storage device is ready.  The device notification mechanism uses a * psuedo device (id = -1) to asynchronously notify the guest when storage * devices become ready.  The notification device has a block size of 512 * bytes. */static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo){	int error = -ENODEV;	int result;	const u64 notification_dev_id = (u64)-1LL;	const unsigned int timeout = HZ;	u64 lpar;	u64 tag;	void *buf;	enum ps3_notify_type {		notify_device_ready = 0,		notify_region_probe = 1,		notify_region_update = 2,	};	struct {		u64 operation_code;	/* must be zero */		u64 event_mask;		/* OR of 1UL << enum ps3_notify_type */	} *notify_cmd;	struct {		u64 event_type;		/* enum ps3_notify_type */		u64 bus_id;		u64 dev_id;		u64 dev_type;		u64 dev_port;	} *notify_event;	pr_debug(" -> %s:%u: (%u:%u:%u)\n", __func__, __LINE__, repo->bus_id,		 repo->dev_id, repo->dev_type);	buf = kzalloc(512, GFP_KERNEL);	if (!buf)		return -ENOMEM;	lpar = ps3_mm_phys_to_lpar(__pa(buf));	notify_cmd = buf;	notify_event = buf;	result = lv1_open_device(repo->bus_id, notification_dev_id, 0);	if (result) {		printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__,		       __LINE__, ps3_result(result));		goto fail_free;	}	/* Setup and write the request for device notification. */	notify_cmd->operation_code = 0; /* must be zero */	notify_cmd->event_mask = 1UL << notify_region_probe;	result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar,				   &tag);	if (result) {		printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__,		       ps3_result(result));		goto fail_close;	}	/* Wait for the write completion */	result = ps3stor_wait_for_completion(notification_dev_id, tag,					     timeout);	if (result) {		printk(KERN_ERR "%s:%u: write not completed %s\n", __func__,		       __LINE__, ps3_result(result));		goto fail_close;	}	/* Loop here processing the requested notification events. */	while (1) {		memset(notify_event, 0, sizeof(*notify_event));		result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0,					  lpar, &tag);		if (result) {			printk(KERN_ERR "%s:%u: write failed %s\n", __func__,			       __LINE__, ps3_result(result));			break;		}		result = ps3stor_wait_for_completion(notification_dev_id, tag,						     timeout);		if (result) {			printk(KERN_ERR "%s:%u: read not completed %s\n",			       __func__, __LINE__, ps3_result(result));			break;		}		pr_debug("%s:%d: notify event (%u:%u:%u): event_type 0x%lx, "			 "port %lu\n", __func__, __LINE__, repo->bus_index,			 repo->dev_index, repo->dev_type,			 notify_event->event_type, notify_event->dev_port);		if (notify_event->event_type != notify_region_probe ||		    notify_event->bus_id != repo->bus_id) {			pr_debug("%s:%u: bad notify_event: event %lu, "				 "dev_id %lu, dev_type %lu\n",				 __func__, __LINE__, notify_event->event_type,				 notify_event->dev_id, notify_event->dev_type);			break;		}		if (notify_event->dev_id == repo->dev_id &&		    notify_event->dev_type == repo->dev_type) {			pr_debug("%s:%u: device ready (%u:%u:%u)\n", __func__,				 __LINE__, repo->bus_index, repo->dev_index,				 repo->dev_type);			error = 0;			break;		}		if (notify_event->dev_id == repo->dev_id &&		    notify_event->dev_type == PS3_DEV_TYPE_NOACCESS) {			pr_debug("%s:%u: no access: dev_id %u\n", __func__,				 __LINE__, repo->dev_id);			break;		}	}fail_close:	lv1_close_device(repo->bus_id, notification_dev_id);fail_free:	kfree(buf);	pr_debug(" <- %s:%u\n", __func__, __LINE__);	return error;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人欧美一区二区三区黑人麻豆 | 日韩一区二区麻豆国产| 国产欧美视频一区二区| 久久99精品国产.久久久久久| 欧美日韩性生活| 尤物av一区二区| 色狠狠色噜噜噜综合网| 欧美精品一区二区三| 奇米色一区二区| 欧美不卡激情三级在线观看| 国产成人自拍高清视频在线免费播放| 欧美国产欧美亚州国产日韩mv天天看完整| 成人午夜视频在线观看| 亚洲国产综合在线| 欧美xfplay| 成人性生交大片免费看在线播放| 亚洲欧美日韩小说| 91麻豆精品国产自产在线| 九九九久久久精品| 亚洲欧美日韩国产手机在线| 欧美精品精品一区| 懂色中文一区二区在线播放| 一区二区三区四区在线播放| 日韩三级电影网址| 91蜜桃免费观看视频| 日韩av中文在线观看| 欧美国产成人精品| 欧美嫩在线观看| 成人网男人的天堂| 日韩av电影免费观看高清完整版 | 91女厕偷拍女厕偷拍高清| 视频一区二区欧美| 中文字幕中文字幕一区| 91精品国产欧美一区二区18| 成人免费视频一区| 日韩va欧美va亚洲va久久| 国产精品久久久久影院老司| 91精品国产麻豆国产自产在线| 丁香婷婷综合激情五月色| 日韩一区精品字幕| 国产精品第五页| 精品国产一区二区三区久久影院| 99re成人精品视频| 狠狠色丁香婷婷综合久久片| 亚洲一区二区欧美| 中文字幕日韩一区| 久久日韩粉嫩一区二区三区| 欧美日韩一卡二卡| 91在线云播放| 国产成人精品免费一区二区| 日韩av一区二区在线影视| 亚洲美女一区二区三区| 国产欧美日韩卡一| 欧美成人在线直播| 日本道精品一区二区三区| 成人免费黄色大片| 国产在线不卡一区| 蜜桃av一区二区三区| 午夜精品久久久久久不卡8050| 亚洲色大成网站www久久九九| 国产色产综合色产在线视频 | 九色综合狠狠综合久久| 婷婷中文字幕综合| 亚洲国产日韩一区二区| 亚洲免费电影在线| 中文字幕亚洲一区二区va在线| 国产三级精品在线| 久久久久久久久久久黄色| 欧美v日韩v国产v| 欧美一区二区三区在| 欧美肥胖老妇做爰| 56国语精品自产拍在线观看| 欧美日韩精品二区第二页| 色婷婷国产精品久久包臀 | 国产精品18久久久久久久久 | 国产一区二区三区免费看| 天天av天天翘天天综合网色鬼国产| 亚洲综合一二区| 一区二区国产视频| 亚洲精品免费电影| 亚洲一区二区三区美女| 亚洲第一电影网| 日韩二区三区四区| 蜜桃视频第一区免费观看| 日本美女一区二区三区视频| 日本vs亚洲vs韩国一区三区| 日本不卡1234视频| 麻豆极品一区二区三区| 麻豆91小视频| 国产一区二区日韩精品| 国产福利一区二区三区视频| 国产91高潮流白浆在线麻豆| 国产成人午夜99999| 成人国产精品免费观看动漫| 99麻豆久久久国产精品免费 | 一区二区视频在线| 亚洲国产日产av| 五月婷婷久久丁香| 日本女人一区二区三区| 国内精品嫩模私拍在线| 成人av资源在线| 色88888久久久久久影院野外| 欧美日产国产精品| 久久综合久久鬼色| 中文字幕一区在线观看| 亚洲国产综合人成综合网站| 久久国产精品色婷婷| 国产xxx精品视频大全| 91久久久免费一区二区| 欧美一区二区三区四区五区| 国产午夜亚洲精品理论片色戒| 亚洲免费观看高清| 视频一区国产视频| 国产aⅴ综合色| 欧美日韩在线播放一区| 久久蜜桃av一区二区天堂| 亚洲人成亚洲人成在线观看图片| 亚瑟在线精品视频| 国产福利电影一区二区三区| 在线这里只有精品| 久久综合久久99| 伊人一区二区三区| 国产在线不卡一区| 欧美日韩精品欧美日韩精品| 久久久噜噜噜久久人人看 | 天堂影院一区二区| 国产成人一级电影| 欧美这里有精品| 久久久久久久综合日本| 亚洲资源在线观看| 成人午夜碰碰视频| 日韩一级二级三级| 一级特黄大欧美久久久| 国产精品1区2区3区| 欧美一区午夜视频在线观看| 国产精品福利一区二区| 激情综合一区二区三区| 欧美色综合久久| 中文字幕色av一区二区三区| 狠狠v欧美v日韩v亚洲ⅴ| 欧美精品粉嫩高潮一区二区| 中文字幕一区免费在线观看| 韩国三级在线一区| 777xxx欧美| 亚洲成a人在线观看| 色婷婷精品大视频在线蜜桃视频| 精品福利在线导航| 日韩av电影免费观看高清完整版 | 欧美性猛片aaaaaaa做受| 国产精品丝袜在线| 国产精品综合久久| 欧美成人激情免费网| 午夜激情综合网| 欧美一区三区四区| 中文字幕视频一区二区三区久| 久久99精品国产麻豆婷婷| 欧美乱妇一区二区三区不卡视频| 中文字幕一区二区不卡 | 国产一区二区看久久| 欧美一区二区三区色| 亚洲二区在线观看| 一本大道综合伊人精品热热| 亚洲天堂精品在线观看| a4yy欧美一区二区三区| 国产精品久线观看视频| 高清beeg欧美| 亚洲国产精品国自产拍av| 高清国产午夜精品久久久久久| 久久只精品国产| 风流少妇一区二区| 欧美国产成人精品| 成人免费高清视频在线观看| 国产精品免费久久久久| 波多野结衣中文字幕一区二区三区 | 欧美色图片你懂的| 亚洲综合丝袜美腿| 欧美电影一区二区三区| 日韩高清电影一区| 精品精品国产高清a毛片牛牛 | 在线欧美日韩精品| 亚洲一级电影视频| 欧美高清视频www夜色资源网| 日韩二区三区四区| 精品免费视频一区二区| 国产精品18久久久久久久久久久久| 日本一区二区三区四区在线视频| eeuss影院一区二区三区| 一区二区国产盗摄色噜噜| 欧美猛男超大videosgay| 蜜臀av性久久久久蜜臀aⅴ四虎| 26uuu另类欧美亚洲曰本| 成人精品视频一区二区三区尤物| 亚洲女女做受ⅹxx高潮| 欧美午夜电影在线播放| 免费人成在线不卡| 国产日韩影视精品| 色素色在线综合| 免费观看在线综合| 国产精品欧美综合在线| 欧美写真视频网站|