Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sddr09.c File Reference
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include "usb.h"
#include "transport.h"
#include "protocol.h"
#include "debug.h"
#include "unusual_sddr09.h"

Go to the source code of this file.

Data Structures

struct  nand_flash_dev
 
struct  sddr09_card_info
 

Macros

#define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, vendorName, productName, useProtocol, useTransport, initFunction, flags)
 
#define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, vendor_name, product_name, use_protocol, use_transport, init_function, Flags)
 
#define short_pack(lsb, msb)   ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
 
#define LSB_of(s)   ((s)&0xFF)
 
#define MSB_of(s)   ((s)>>8)
 
#define NAND_MFR_AMD   0x01
 
#define NAND_MFR_NATSEMI   0x8f
 
#define NAND_MFR_TOSHIBA   0x98
 
#define NAND_MFR_SAMSUNG   0xec
 
#define SDDR09_WP   1 /* write protected */
 
#define CONTROL_SHIFT   6
 
#define LUN   1
 
#define LUNBITS   (LUN << 5)
 
#define UNDEF   0xffffffff
 
#define SPARE   0xfffffffe
 
#define UNUSABLE   0xfffffffd
 
#define SDDR09_READ_MAP_BUFSZ   65536
 

Functions

 MODULE_DESCRIPTION ("Driver for SanDisk SDDR-09 SmartMedia reader")
 
 MODULE_AUTHOR ("Andries Brouwer <[email protected]>, Robert Baruch <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (usb, sddr09_usb_ids)
 
 module_usb_driver (sddr09_driver)
 

Macro Definition Documentation

#define CONTROL_SHIFT   6

Definition at line 281 of file sddr09.c.

#define LSB_of (   s)    ((s)&0xFF)

Definition at line 105 of file sddr09.c.

#define LUN   1

Definition at line 288 of file sddr09.c.

#define LUNBITS   (LUN << 5)

Definition at line 289 of file sddr09.c.

#define MSB_of (   s)    ((s)>>8)

Definition at line 106 of file sddr09.c.

#define NAND_MFR_AMD   0x01

Definition at line 130 of file sddr09.c.

#define NAND_MFR_NATSEMI   0x8f

Definition at line 131 of file sddr09.c.

#define NAND_MFR_SAMSUNG   0xec

Definition at line 133 of file sddr09.c.

#define NAND_MFR_TOSHIBA   0x98

Definition at line 132 of file sddr09.c.

#define SDDR09_READ_MAP_BUFSZ   65536
#define SDDR09_WP   1 /* write protected */

Definition at line 272 of file sddr09.c.

#define short_pack (   lsb,
  msb 
)    ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )

Definition at line 104 of file sddr09.c.

#define SPARE   0xfffffffe

Definition at line 295 of file sddr09.c.

#define UNDEF   0xffffffff

Definition at line 294 of file sddr09.c.

#define UNUSABLE   0xfffffffd

Definition at line 296 of file sddr09.c.

#define UNUSUAL_DEV (   id_vendor,
  id_product,
  bcdDeviceMin,
  bcdDeviceMax,
  vendorName,
  productName,
  useProtocol,
  useTransport,
  initFunction,
  flags 
)
Value:
{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
.driver_info = (flags) }

Definition at line 85 of file sddr09.c.

#define UNUSUAL_DEV (   idVendor,
  idProduct,
  bcdDeviceMin,
  bcdDeviceMax,
  vendor_name,
  product_name,
  use_protocol,
  use_transport,
  init_function,
  Flags 
)
Value:
{ \
.vendorName = vendor_name, \
.productName = product_name, \
.useProtocol = use_protocol, \
.useTransport = use_transport, \
.initFunction = init_function, \
}

Definition at line 85 of file sddr09.c.

Function Documentation

MODULE_AUTHOR ( "Andries Brouwer <[email protected] ,
Robert Baruch< autophile @starband.net >"   
)
MODULE_DESCRIPTION ( "Driver for SanDisk SDDR-09 SmartMedia reader"  )
MODULE_DEVICE_TABLE ( usb  ,
sddr09_usb_ids   
)
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( sddr09_driver  )