Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
gdrom.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/cdrom.h>
#include <linux/genhd.h>
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include <linux/platform_device.h>
#include <scsi/scsi.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/delay.h>
#include <mach/dma.h>
#include <mach/sysasic.h>

Go to the source code of this file.

Data Structures

struct  gdromtoc
 
struct  gdrom_unit
 
struct  gdrom_id
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define GDROM_DEV_NAME   "gdrom"
 
#define GD_SESSION_OFFSET   150
 
#define GDROM_COM_SOFTRESET   0x08
 
#define GDROM_COM_EXECDIAG   0x90
 
#define GDROM_COM_PACKET   0xA0
 
#define GDROM_COM_IDDEV   0xA1
 
#define GDROM_BASE_REG   0xA05F7000
 
#define GDROM_ALTSTATUS_REG   (GDROM_BASE_REG + 0x18)
 
#define GDROM_DATA_REG   (GDROM_BASE_REG + 0x80)
 
#define GDROM_ERROR_REG   (GDROM_BASE_REG + 0x84)
 
#define GDROM_INTSEC_REG   (GDROM_BASE_REG + 0x88)
 
#define GDROM_SECNUM_REG   (GDROM_BASE_REG + 0x8C)
 
#define GDROM_BCL_REG   (GDROM_BASE_REG + 0x90)
 
#define GDROM_BCH_REG   (GDROM_BASE_REG + 0x94)
 
#define GDROM_DSEL_REG   (GDROM_BASE_REG + 0x98)
 
#define GDROM_STATUSCOMMAND_REG   (GDROM_BASE_REG + 0x9C)
 
#define GDROM_RESET_REG   (GDROM_BASE_REG + 0x4E4)
 
#define GDROM_DMA_STARTADDR_REG   (GDROM_BASE_REG + 0x404)
 
#define GDROM_DMA_LENGTH_REG   (GDROM_BASE_REG + 0x408)
 
#define GDROM_DMA_DIRECTION_REG   (GDROM_BASE_REG + 0x40C)
 
#define GDROM_DMA_ENABLE_REG   (GDROM_BASE_REG + 0x414)
 
#define GDROM_DMA_STATUS_REG   (GDROM_BASE_REG + 0x418)
 
#define GDROM_DMA_WAIT_REG   (GDROM_BASE_REG + 0x4A0)
 
#define GDROM_DMA_ACCESS_CTRL_REG   (GDROM_BASE_REG + 0x4B8)
 
#define GDROM_HARD_SECTOR   2048
 
#define BLOCK_LAYER_SECTOR   512
 
#define GD_TO_BLK   4
 
#define GDROM_DEFAULT_TIMEOUT   (HZ * 7)
 

Functions

 module_init (init_gdrom)
 
 module_exit (exit_gdrom)
 
 MODULE_AUTHOR ("Adrian McMenamin <[email protected]>")
 
 MODULE_DESCRIPTION ("SEGA Dreamcast GD-ROM Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define BLOCK_LAYER_SECTOR   512

Definition at line 79 of file gdrom.c.

#define GD_SESSION_OFFSET   150

Definition at line 49 of file gdrom.c.

#define GD_TO_BLK   4

Definition at line 80 of file gdrom.c.

#define GDROM_ALTSTATUS_REG   (GDROM_BASE_REG + 0x18)

Definition at line 59 of file gdrom.c.

#define GDROM_BASE_REG   0xA05F7000

Definition at line 58 of file gdrom.c.

#define GDROM_BCH_REG   (GDROM_BASE_REG + 0x94)

Definition at line 65 of file gdrom.c.

#define GDROM_BCL_REG   (GDROM_BASE_REG + 0x90)

Definition at line 64 of file gdrom.c.

#define GDROM_COM_EXECDIAG   0x90

Definition at line 53 of file gdrom.c.

#define GDROM_COM_IDDEV   0xA1

Definition at line 55 of file gdrom.c.

#define GDROM_COM_PACKET   0xA0

Definition at line 54 of file gdrom.c.

#define GDROM_COM_SOFTRESET   0x08

Definition at line 52 of file gdrom.c.

#define GDROM_DATA_REG   (GDROM_BASE_REG + 0x80)

Definition at line 60 of file gdrom.c.

#define GDROM_DEFAULT_TIMEOUT   (HZ * 7)

Definition at line 82 of file gdrom.c.

#define GDROM_DEV_NAME   "gdrom"

Definition at line 48 of file gdrom.c.

#define GDROM_DMA_ACCESS_CTRL_REG   (GDROM_BASE_REG + 0x4B8)

Definition at line 76 of file gdrom.c.

#define GDROM_DMA_DIRECTION_REG   (GDROM_BASE_REG + 0x40C)

Definition at line 72 of file gdrom.c.

#define GDROM_DMA_ENABLE_REG   (GDROM_BASE_REG + 0x414)

Definition at line 73 of file gdrom.c.

#define GDROM_DMA_LENGTH_REG   (GDROM_BASE_REG + 0x408)

Definition at line 71 of file gdrom.c.

#define GDROM_DMA_STARTADDR_REG   (GDROM_BASE_REG + 0x404)

Definition at line 70 of file gdrom.c.

#define GDROM_DMA_STATUS_REG   (GDROM_BASE_REG + 0x418)

Definition at line 74 of file gdrom.c.

#define GDROM_DMA_WAIT_REG   (GDROM_BASE_REG + 0x4A0)

Definition at line 75 of file gdrom.c.

#define GDROM_DSEL_REG   (GDROM_BASE_REG + 0x98)

Definition at line 66 of file gdrom.c.

#define GDROM_ERROR_REG   (GDROM_BASE_REG + 0x84)

Definition at line 61 of file gdrom.c.

#define GDROM_HARD_SECTOR   2048

Definition at line 78 of file gdrom.c.

#define GDROM_INTSEC_REG   (GDROM_BASE_REG + 0x88)

Definition at line 62 of file gdrom.c.

#define GDROM_RESET_REG   (GDROM_BASE_REG + 0x4E4)

Definition at line 68 of file gdrom.c.

#define GDROM_SECNUM_REG   (GDROM_BASE_REG + 0x8C)

Definition at line 63 of file gdrom.c.

#define GDROM_STATUSCOMMAND_REG   (GDROM_BASE_REG + 0x9C)

Definition at line 67 of file gdrom.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 22 of file gdrom.c.

Function Documentation

MODULE_AUTHOR ( "Adrian McMenamin <[email protected]>"  )
MODULE_DESCRIPTION ( "SEGA Dreamcast GD-ROM Driver"  )
module_exit ( exit_gdrom  )
module_init ( init_gdrom  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation

int sense_key

Definition at line 86 of file gdrom.c.

const char* const text

Definition at line 87 of file gdrom.c.