PCMCIA Compact Flash GPRS GPS PCMCIA Personal Computer Memory Card International Association CF Compact Flash PCMCIA CF PCMCIA/CF

Similar documents
Ch03_嵌入式作業系統建置_01

solutions guide

一个开放源码的嵌入式仿真环境 ― SkyEye

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

P4i45GL_GV-R50-CN.p65

ebook140-9

Guide to Install SATA Hard Disks

AL-M200 Series

Microsoft Word - 正文.doc

ICD ICD ICD ICD ICD

+01-10_M5A_C1955.p65

1 CPU

IP505SM_manual_cn.doc

P4V88+_BIOS_CN.p65

EK-STM32F

ebook62-1

PTS7_Manual.PDF

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10

P4VM800_BIOS_CN.p65

AL-MX200 Series

Bus Hound 5

K7VT2_QIG_v3

P4Dual-915GL_BIOS_CN.p65

ebook71-13

epub

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP

ebook140-8

KL DSC DEMO 使用说明

Windows 98 / Windows Me! PC!"#$%& 3!"#$% PC! PC!"#$ PC!"!"#$%&'() 1!"#$ PC! 2!"#$%&'()*+ PC!"#$ PC =EPCMCIAF=!"!! PC!"#$%&'()*+,-. 2 =XXXXXXXX XXXXXXX

3 PCI PCI PCI type 0 PCI type 1 PCI type 2 PCI CardBus PCI 16 6 Device ID Vendor ID 00h Status Register Command Register 04h Class Code Revision ID 08

Measurement Studio Expands Your Test and Measurement Programming Power

775i65PE_BIOS_CN.p65

USB解决方案.ppt

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

Windows 2000 Server for T100

Abstract arm linux tool-chain root NET-Start! 2

第4章 系统设置

Data Server_new_.doc

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

Serial ATA ( Nvidia nforce430)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Microsoft Win

IT (1) IDE... 2 (2) BIOS IDE RAID... 3 (3) RAID BIOS RAID... 5 (4) R A I D (5) ID E RA ID... 15

ebook140-11

目 次 一 社 團 活 動 基 本 資 料 2 ( 一 ) 參 加 隊 員 名 冊 2 ( 二 ) 活 動 成 效 分 析 表 4 二 活 動 成 果 報 告 6 ( 一 ) 活 動 支 出 明 細 表 6 ( 二 ) 活 動 內 容 及 活 動 分 工 8 ( 三 ) 活 動 執 行 過 程 說

untitled

rz_Newsletter2016_en_ indd

CHN_p000A_Cover.ai

经华名家讲堂

TPM BIOS Infineon TPM Smart TPM Infineon TPM Smart TPM TPM Smart TPM TPM Advanced Mode...8

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

1

邏輯分析儀的概念與原理-展示版

LSI U320 SCSI卡用户手册.doc

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

华恒家庭网关方案

RAID RAID 0 RAID 1 RAID 5 RAID * ( -1)* ( /2)* No Yes Yes Yes A. B. BIOS SATA C. RAID BIOS RAID ( ) D. SATA RAID/AHCI ( ) SATA M.2 SSD ( )

热设计网

. I/O Third Generation Input Output 3GIO PCI Express 3D 10GHz CPU 1Gb Gbps QoS PCI. PCI Express PCI 10 AGP PCI-X HyperTransport PCI 133MB Mu

C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C Project 30 C Project 3 60 Project 40

宏电文档

Copyright 2007 Hewlett-Packard Development Company, L.P. Microsoft 和 Windows 是 Microsoft Corporation 在 美 国 的 注 册 商 标 Bluetooth 是 其 所 有 者 拥 有 的 商 标,Hew

HighPoint产品的FAQ手册

Microsoft Word - YDB Vehicle Telematics Service Requirement and General Framework

05 01 X Window X Window Linux Linux X Window X Window Webmin Web Linux Linux X Window X Window Notebook PC X Window X Window module Linux Linux kernel

(Quad-Core Intel Xeon 2.0GHz) ()(SAS) (Quad-Core Intel Xeon 2.0GHz) (Windows )(Serial ATA) (Quad-Core Intel Xeon 2.0GHz) (Linux)(Serial ATA)

Microsoft Word - PS2_linux_guide_cn.doc

mvc

SL2511 SR Plus 操作手冊_單面.doc

ARM JTAG实时仿真器安装使用指南

MSAC-EX1

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

投影片 1

1.ai

例 如, 一 个 含 有 2000 个 记 录 的 文 件, 每 个 磁 盘 块 可 容 纳 250 个 记 录, 则 该 文 件 包 含 8 个 磁 盘 块 然 后 对 该 文 件 作 二 路 归 并 的 外 排 序, 每 次 往 内 存 读 入 两 个 磁 盘 块, 排 序 后 再 写 回 磁

<55342D323637CBB5C3F7CAE92E786C73>

bingdian001.com

QL1880new2.PDF

展讯平台软件架构介绍 [只读]

穨2700使用手冊.doc

Microsoft Word - 00-巻頭言.doc


Microsoft Word htm

舟山市人民政府办公室文件

,,, PCB, AR M VxWorks DSP,,,,,,,,,,, (CIP) /,,.:,2005 ISBN TP36 CIP (2005) : ( 10 ) : : (010 ) : (010)

Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1-1MRS755673

!!

<4D F736F F D20D5E3BDADD5FDD4AAD6C7BBDBBFC6BCBCB9C9B7DDD3D0CFDEB9ABCBBECAD7B4CEB9ABBFAAB7A2D0D0B9C9C6B1B2A2D4DAB4B4D2B5B0E5C9CFCAD0D5D0B9C9CBB5C3F7CAE9A3A8C9EAB1A8B8E C4EA36D4C23139C8D5B1A8CBCDA3A92E646F63>

CC213

投影片 1

员工签到录

Cadence SPB 15.2 VOICE Cadence SPB 15.2 PC Cadence 3 (1) CD1 1of 2 (2) CD2 2of 2 (3) CD3 Concept HDL 1of 1

HC20131_2010

TX-NR3030_BAS_Cs_ indd

Lexmark Prospect Pro200 Series 快速参考手册

Microsoft Word - 32

Serial ATA ( nvidia nforce4 Ultra/SLI)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Micro

硬體安裝與ADSL.doc

untitled


Transcription:

09 PCMCIA Compact Flash GPRS GPS PCMCIA Personal Computer Memory Card International Association CF Compact Flash PCMCIA CF PCMCIA/CF PCMCIA WiFi Linux PCMCIA PCMCIA/CF 9-1 PCMCIA/CF PCMCIA 16 CF PCMCIA PCMCIA PDA CF 50 CF-to-PCMCIA 68 PCMCIA PCMCIA CF PCMCIA 32 CardBus PC PCMCIA CardBus CardBus PCI CardBus PCMCIA PCI PCMCIA ExpressCard PCI Express PCI PCI CardBus ExpressCard PC Type I 3.3mm Type II 5mm Type III.5mm 260

Linux PCMCIA PCMCIA PCMCIA PCMCIA PCI PCMCIA PCMCIA I/O PCMCIA 09-1 Processor North Bridge PCMCIA/ CardBus Controller South Bridge PCI Bus PCI Slot Socket PCI Slot PCMCIA Card 9.1 PCMCIA 9.1 PCMCIA 9.2 Embedded Controller CPU Core PCMCIA Controller Internal Local Bus LCD Controller PCMCIA/CF Socket PCMCIA Card 9.2 PCMCIA 261

09 9-2 Linux-PCMCIA Linux PCMCIA ARM MIPS PowerPC PCMCIA PCMCIA daemon Card Services 9.3 Linux-PCMCIA pcmciautils XX-Applications User Space Kernel Space PCMCIA Core CIS Routines Card Services sysfs/udev Interface pccardd Driver Services (ds) XX-Dependent Layers PCMCIA Compact Flash Kernel Space Hardware Host Controller Driver XX_cs CIS Space IRQ, I/O Mem Data XX PCMCIA/CardBus Host Controller Bridge PCMCIA Socket PCMCIA Card XX 9.3 Linux PCMCIA 262

Linux Linux-PCMCIA Linux-PCMCIA PCMCIA kernel 2.6. pcmciautils http://kernel.org/pub/linux/utils/kernel/pcmcia/howto. html pcmcia-cs http://pcmcia-cs.sourceforge.net user space cardmgr PCMCIA udev cardmgr http://kernel.org/pub/linux/utils/kernel/pcmcia/cardmgr-to-pcmciautils.html 9.3 PCMCIA PCMCIA socket PCMCIA 9.3 XX_cs Linux PCMCIA XX_cs PCMCIA 9.3 XX 9.3 PCMCIA IDE XX IDE XX_cs ide_cs XX XX XX_cs IRQ I/O XX PCMCIA XScale x86 CF driver services, ds 09-2 Linux-PCMCIA Tip 263

09 Pcmciautils pccardctl PCMCIA card-configuration 9.4 9.1 Linux PCMCIA PC Higher Layers/Applications PCMCIA Core Processor Host Controller Driver XX.ko Interrupts that monitor card status Device Interrupts Resources North Bridge South Bridge PCMCIA/ CardBus Controller PCI Bus PCI Slot Socket PCI Slot PCMCIA Card XX XX_cs.ko 9.4 PCMCIA PC PCMCIA Compact Flash Linux PCMCIA 9-7 PCMCIA WiFi 9-3 XX card function PCMCIA 264

Linux PCMCIA GPIO StrongARM drivers/pcmcia/sa10_assabet.c 9-4 PCMCIA PCMCIA PCMCIA pccardd PCMCIA pccardd Device Services PCMCIA Card Information Structure CIS CIS PCMCIA PCMCIA/CF attribute common CIS PCMCIA IDE CIS sector cylinder array PCMCIA pccard_get_first_tuple() pccard_get_next_tuple() pccard_parse_tuple() CIS 9.2 09-4 PCMCIA 9.2 PCMCIA PCMCIA sysfs udev CIS user space pccardctl pcmciautils sysfs udev sysfs udev 265

09 9-5 Driver Services pccardd PCMCIA CIS core Driver Services pcmcia_bus_type PCMCIA pcmcia_register_ driver() 9.1 9-6 client device driver 9.3 XX_cs PCMCIA CIS PCMCIA PCMCIA Compact Flash 9-6-1 PCMCIA 1. PCMCIA pcmcia_device_id include/ linux/mod_devicetable.h struct pcmcia_device_id { u16 manf_id; /* Manufacturer ID */ u16 card_id; /* Card ID */ u8 func_id; /* Function ID */ }; 266

Linux PCMCIA PCMCIA_DEVICE_MANF_CARD() ID pcmcia_device_id MODULE_DEVICE_ TABLE() module image pcmcia_device_ids PCMCIA CIS ID 4 I/O PCI USB 9.1 PCI USB PCMCIA PCI USB ID pcmcia_device_id pci_device_id usb_device_id ID PCMCIA_DEVICE_ PCI_DEVICE() USB_DEVICE() MANF_CARD() struct pcmcia_ struct pci_dev struct usb_device device struct pcmcia_driver struct pci_driver struct usb_driver probe() remove() probe() remove() probe() disconnect() pccardd kthread PCI-familydependent khubd kthread 9.1 PCMCIA PCI USB ID 09-6 manf_id card_id func_id PCMCIA ID ID ID 2. PCMCIA probe() remove() pcmcia_ device_id pcmcia_driver struct pcmcia_driver { int (*probe)(struct pcmcia_device *dev); /* Probe method */ void (*remove)(struct pcmcia_device *dev); /* Remove method */ struct pcmcia_device_id *id_table; /* Device ID table */ }; 267

09 3. pcmcia_device PCMCIA drivers/pcmcia/ds.h struct pcmcia_device { io_req_t io; /* I/O attributes*/ irq_req_t irq; /* IRQ settings */ config_req_t conf; /* Configuration */ struct device dev; /* Connection to device model */ }; 4. CIS tuple_t include/pcmcia/cistpl.h CIS CISTPL_LONGLINK_MFC tuple include/pcmcia/cistpl.h http:// pcmcia-cs.sourceforge.net/ftp/doc/pcmcia-prog.html typedef struct tuple_t { cisdata_t TupleCode; /* See include/pcmcia/cistpl.h */ cisdata_t DesiredTuple; /* Identity of the desired tuple */ cisdata_t *TupleData; /* Buffer space */ }; PCMCIA Compact Flash 5. CIS configuration include/pcmcia/cistpl.h cistpl_cftable_entry_t typedef struct cistpl_cftable_entry_t { cistpl_power_t vcc, vpp1, vpp2; /* Voltage level */ cistpl_io_t io; /* I/O attributes */ cistpl_irq_t irq; /* IRQ settings */ cistpl_mem_t mem; /* Memory window */ }; 6. cisparse_t include/pcmcia/cistpl.h PCMCIA 268

Linux cistpl_manfid_t manfid; /* Manf ID */ cistpl_cftable_entry_t cftable_entry; /* Configuration table entry */ } cisparse_t; 9-6-2 PCMCIA PCMCIA PCMCIA XX XX_cs PCMCIA probe() remove() 9.1 PCMCIA probe() remove() pcmcia_device_ id PCMCIA XX_probe() XX_remove() 9.1 #include <pcmcia/ds.h> /* Definition of struct pcmcia_device */ static struct pcmcia_driver XX_cs_driver = {.owner = THIS_MODULE,.drv = {.name = "XX_cs", /* Name */ },.probe = XX_probe, /* Probe */.remove = XX_remove, /* Release */.id_table = XX_ids, /* ID table */.suspend = XX_suspend, /* Power management */.resume = XX_resume, /* Power management */ }; 09-6 union cisparse_t { typedef #define XX_MANFUFACTURER_ID 0xABCD /* Device's manf_id */ #define XX_CARD_ID 0xCDEF /* Device's card_id */ 269

09 PCMCIA Compact Flash /* Identity of supported cards */ static struct pcmcia_device_id XX_ids[] = { PCMCIA_DEVICE_MANF_CARD(XX_MANFUFACTURER_ID, XX_CARD_ID), PCMCIA_DEVICE_NULL, }; MODULE_DEVICE_TABLE(pcmcia, XX_ids); /* For module autoload */ /* Initialization */ static int init init_xx_cs(void) { return pcmcia_register_driver(&xx_cs_driver); } /* Probe Method */ static int XX_probe(struct pcmcia_device *link) { /* Populate the pcmcia_device structure allotted for this card by the core. First fill in general information */ /* Fill in attributes related to I/O windows and interrupt levels */ XX_config(link); /* See Listing 9.2 */ } 9.2 I/O XX PCMCIA XX PCMCIA XX 9.2 drivers/net/wireless/airo_cs.c Cisco Aironet 4500 4800 PCMCIA WiFi PCMCIA PCMCIA CIS PCMCIA I/O 270

Linux 9.2 #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <pcmcia/cs.h> #include <pcmcia/cisreg.h> /* This makes the XX device available to the system. XX_config() is based on airo_config(), defined in drivers/net/wireless/airo_cs.c */ static int XX_config(struct pcmcia_device *link) { tuple_t tuple; cisparse_t parse; u_char buf[64]; /* Populate a tuple_t structure with the identity of the desired tuple. In this case, we're looking for a configuration table entry */ tuple.desiredtuple = CISTPL_CFTABLE_ENTRY; tuple.attributes = 0; tuple.tupledata = buf; tuple.tupledatamax = sizeof(buf); /* Walk the CIS for a matching tuple and glean card configuration information such as I/O window base addresses */ /* Get first tuple */ CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); while (1){ cistpl_cftable_entry_t dflt = {0}; cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); 09-6 XX /* Read a configuration tuple from the card's CIS space */ if (pcmcia_get_tuple_data(link, &tuple)!= 0 pcmcia_parse_tuple(link, &tuple, &parse)!= 0) { goto next_entry; } /* We have a matching tuple! */ /* Configure power settings in the pcmcia_device based on what was found in the parsed tuple entry */ 271

09 PCMCIA Compact Flash if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM)) link->conf.vpp = cfg->vpp1.param[cistpl_power_vnom]/000; /* Configure I/O window settings in the pcmcia_device based on what was found in the parsed tuple entry */ if ((cfg->io.nwin > 0) (dflt.io.nwin > 0)) { cistpl_io_t *io = (cfg->io.nwin)? &cfg->io : &dflt.io; if (!(io->flags & CISTPL_IO_8BIT)) { link->io.attributes1 = IO_DATA_PATH_WIDTH_16; } link->io.baseport1 = io->win[0].base; } break; next_entry: CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(link, &tuple); } /* Allocate IRQ */ if (link->conf.attributes & CONF_ENABLE_IRQ) { CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); } /* Invoke init_xx_card(), which is part of the generic XX driver (so, not shown in this listing), and pass the I/O base and IRQ information obtained above */ init_xx_card(link->irq.assignedirq, link->io.baseport1, 1, &handle_to_dev(link)); /* The chip-specific (form factor independent) driver is ready to take responsibility of this card from now on! */ } 272

Linux 9.3 PCMCIA PCMCIA PCMCIA Cisco Aironet PCMCIA 82365 PCMCIA 1. PCMCIA drivers/pcmcia/yenta_socket.c 2. Pccardd PCMCIACard Services drivers/pcmcia/cs.c 1 3. Card Services Driver Services drivers/pcmcia/ds.c Driver Services 4. Driver Services CIS ID ID drivers/net/ wireless/airo_cs.c MODULE_DEVICE_TABLE() 5. 9.1 4 airo_cs.c pcmcia_ register_driver() pcmcia_bus_type PCMCIA probe() remove() Driver Services ds.c 6. 5 Driver Services probe() 5 probe() airo_probe() probe() I/O drivers/net/wireless/airo.c 9.2 7. airo.c ethx PCMCIA PCI ethx 09-7 9-7 273

09 9-8 PCMCIA PCMCIA/CF storage GB IDE Micro drive IDE spin-up IDECard Services ide_cs IDE IDE memory card flash memory IDE IDECard Services ide_cs flash memory IDE memory_cscard Services memory_cs PCMCIA PCMCIA Compact Flash 9-9 PCMCIA GPRS GSM GPS PCMCIA PCMCIA/CF GPRS GSM 16 Linux serial_cs PCMCIA/CF /dev/ttysx PCMCIA serial_cs GPRS GSM GPS PCMCIA/ CF HCI Host Control Interface 274

Linux 9.5 serial_cs Phone Dialers, Networking Apps (WEP Browsing..) 09-9 User Space Bluetooth Networking GPRS/GSM Setup GPS Applications Kernel Space BlueZ Bluetooth Stack PPP Stack HCI Line Discipline PPP Line Discipline PCMCIA Core Bluetooth GPRS/GSM GPS Serial Driver IRQ, I/O Windows serial_cs Kernel Space Hardware CIS Space PCMCIA/CardBus Host Controller Bridge PCMCIA PCMCIA Socket Serial PCMCIA Card 9.5 PCMCIA/CF PPP Point-to-Point Protocol TCP/IP link 9.5 PPP TCP/IP GPRS GSM PPP pppd serial_cs pppd PPP ppp_generic ppp_async slhc pppd bash> pppd ttysx call connection-script 275

09 connection-script pppd connection-script GPRS connection-script GSM 16-4-1 GPRS connection-script 9- PCMCIA/CF PCMCIA CONFIG_PCMCIA_DEBUG Bus options PCCARD support Enable PCCARD debugging pcmcia_core.pc_debug pc_debug PC /proc/bus/pccard/drivers /sys/ bus/pcmcia/devices/* ID PCI-to-PCMCIA /proc/bus/pci/ PCMCIA /proc/interrupts IRQ PCMCIA PCMCIA Compact Flash Linux-PCMCIA http://lists.infradead.org/mailman/listinfo/linux-pcmcia 9- Linux drivers/pcmcia/ drivers/pcmcia/yenta_socket.c x86 include/pcmcia/ PCMCIA 276

PCMCIA Compact Flash

Linux drivers/net/pcmcia/ PCMCIA IDE PCMCIA drivers/ide/legacy/ ide-cs.c PCMCIA drivers/serial/serial_cs.c 9.2 9.3 pcmcia_device_id i n c l u d e / l i n u x / m o d _ PCMCIA devicetable.h pcmcia_device include/pcmcia/ds.h PCMCIA pcmcia_driver include/pcmcia/ds.h PCMCIA tuple_t include/pcmcia/cistpl.h CIS tuple_t cistpl_cftable_entry_t include/pcmcia/cistpl.h CIS cisparse_t include/pcmcia/cistpl.h 9.2 09- pcmcia_register_driver() drivers/pcmcia/ds.c PCMCIA pcmcia_unregister_driver() drivers/pcmcia/ds.c PCMCIA pcmcia_get_first_tuple() pcmcia_get_tuple_data() pcmcia_parse_tuple() pcmcia_request_irq() include/pcmcia/cistpl.h drivers/pcmcia/cistpl.c drivers/pcmcia/pcmcia_ resource.c CIS PCMCIA IRQ 9.3 277