Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
054cb795
Commit
054cb795
authored
Sep 01, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/jgarzik/net-drivers-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
parents
57d435d4
d4ad7a7c
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
522 additions
and
313 deletions
+522
-313
arch/i386/pci/common.c
arch/i386/pci/common.c
+1
-1
drivers/block/scsi_ioctl.c
drivers/block/scsi_ioctl.c
+0
-8
drivers/pcmcia/cistpl.c
drivers/pcmcia/cistpl.c
+11
-9
drivers/pcmcia/ricoh.h
drivers/pcmcia/ricoh.h
+22
-20
drivers/pcmcia/ti113x.h
drivers/pcmcia/ti113x.h
+105
-80
drivers/pcmcia/topic.h
drivers/pcmcia/topic.h
+58
-14
drivers/pcmcia/yenta_socket.c
drivers/pcmcia/yenta_socket.c
+251
-178
drivers/pcmcia/yenta_socket.h
drivers/pcmcia/yenta_socket.h
+13
-0
drivers/scsi/sr.c
drivers/scsi/sr.c
+41
-0
include/asm-m68knommu/irq.h
include/asm-m68knommu/irq.h
+4
-3
include/asm-m68knommu/local.h
include/asm-m68knommu/local.h
+6
-0
include/asm-m68knommu/sections.h
include/asm-m68knommu/sections.h
+7
-0
include/linux/pci_ids.h
include/linux/pci_ids.h
+3
-0
No files found.
arch/i386/pci/common.c
View file @
054cb795
...
@@ -152,7 +152,7 @@ static int __init pcibios_init(void)
...
@@ -152,7 +152,7 @@ static int __init pcibios_init(void)
pci_cache_line_size
=
32
>>
2
;
pci_cache_line_size
=
32
>>
2
;
if
(
c
->
x86
>=
6
&&
c
->
x86_vendor
==
X86_VENDOR_AMD
)
if
(
c
->
x86
>=
6
&&
c
->
x86_vendor
==
X86_VENDOR_AMD
)
pci_cache_line_size
=
64
>>
2
;
/* K7 & K8 */
pci_cache_line_size
=
64
>>
2
;
/* K7 & K8 */
else
if
(
c
->
x86
>
6
)
else
if
(
c
->
x86
>
6
&&
c
->
x86_vendor
==
X86_VENDOR_INTEL
)
pci_cache_line_size
=
128
>>
2
;
/* P4 */
pci_cache_line_size
=
128
>>
2
;
/* P4 */
pcibios_resource_survey
();
pcibios_resource_survey
();
...
...
drivers/block/scsi_ioctl.c
View file @
054cb795
...
@@ -438,11 +438,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
...
@@ -438,11 +438,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
err
=
sg_emulated_host
(
q
,
(
int
*
)
arg
);
err
=
sg_emulated_host
(
q
,
(
int
*
)
arg
);
break
;
break
;
case
SG_IO
:
case
SG_IO
:
err
=
bd_claim
(
bdev
,
current
);
if
(
err
)
break
;
err
=
sg_io
(
q
,
bdev
,
(
struct
sg_io_hdr
*
)
arg
);
err
=
sg_io
(
q
,
bdev
,
(
struct
sg_io_hdr
*
)
arg
);
bd_release
(
bdev
);
break
;
break
;
/*
/*
* old junk scsi send command ioctl
* old junk scsi send command ioctl
...
@@ -452,11 +448,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
...
@@ -452,11 +448,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar
if
(
!
arg
)
if
(
!
arg
)
break
;
break
;
err
=
bd_claim
(
bdev
,
current
);
if
(
err
)
break
;
err
=
sg_scsi_ioctl
(
q
,
bdev
,
(
Scsi_Ioctl_Command
*
)
arg
);
err
=
sg_scsi_ioctl
(
q
,
bdev
,
(
Scsi_Ioctl_Command
*
)
arg
);
bd_release
(
bdev
);
break
;
break
;
case
CDROMCLOSETRAY
:
case
CDROMCLOSETRAY
:
close
=
1
;
close
=
1
;
...
...
drivers/pcmcia/cistpl.c
View file @
054cb795
...
@@ -293,15 +293,17 @@ static void read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr,
...
@@ -293,15 +293,17 @@ static void read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr,
#endif
#endif
ret
=
read_cis_mem
(
s
,
attr
,
addr
,
len
,
ptr
);
ret
=
read_cis_mem
(
s
,
attr
,
addr
,
len
,
ptr
);
/* Copy data into the cache */
if
(
ret
==
0
)
{
cis
=
kmalloc
(
sizeof
(
struct
cis_cache_entry
)
+
len
,
GFP_KERNEL
);
/* Copy data into the cache */
if
(
cis
)
{
cis
=
kmalloc
(
sizeof
(
struct
cis_cache_entry
)
+
len
,
GFP_KERNEL
);
cis
->
addr
=
addr
;
if
(
cis
)
{
cis
->
len
=
len
;
cis
->
addr
=
addr
;
cis
->
attr
=
attr
;
cis
->
len
=
len
;
memcpy
(
cis
->
cache
,
ptr
,
len
);
cis
->
attr
=
attr
;
list_add
(
&
cis
->
node
,
&
s
->
cis_cache
);
memcpy
(
cis
->
cache
,
ptr
,
len
);
}
list_add
(
&
cis
->
node
,
&
s
->
cis_cache
);
}
}
}
}
static
void
static
void
...
...
drivers/pcmcia/ricoh.h
View file @
054cb795
...
@@ -142,59 +142,61 @@ static void ricoh_zoom_video(struct pcmcia_socket *sock, int onoff)
...
@@ -142,59 +142,61 @@ static void ricoh_zoom_video(struct pcmcia_socket *sock, int onoff)
config_writeb
(
socket
,
RL5C4XX_MISC_CONTROL
,
reg
);
config_writeb
(
socket
,
RL5C4XX_MISC_CONTROL
,
reg
);
}
}
static
void
ricoh_set_zv
(
struct
pcmcia_socket
*
sock
)
static
void
ricoh_set_zv
(
struct
yenta_socket
*
socket
)
{
{
struct
yenta_socket
*
socket
=
container_of
(
sock
,
struct
yenta_socket
,
socket
);
if
(
socket
->
dev
->
vendor
==
PCI_VENDOR_ID_RICOH
)
if
(
socket
->
dev
->
vendor
==
PCI_VENDOR_ID_RICOH
)
{
{
switch
(
socket
->
dev
->
device
)
switch
(
socket
->
dev
->
device
)
{
{
/* There may be more .. */
/* There may be more .. */
case
PCI_DEVICE_ID_RICOH_RL5C478
:
case
PCI_DEVICE_ID_RICOH_RL5C478
:
sock
->
zoom_video
=
ricoh_zoom_video
;
sock
et
->
socket
.
zoom_video
=
ricoh_zoom_video
;
break
;
break
;
}
}
}
}
}
}
static
int
ricoh_init
(
struct
pcmcia_socket
*
sock
)
static
void
ricoh_save_state
(
struct
yenta_socket
*
socket
)
{
{
struct
yenta_socket
*
socket
=
container_of
(
sock
,
struct
yenta_socket
,
socket
);
rl_misc
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_MISC
);
yenta_init
(
sock
);
rl_ctl
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_16BIT_CTL
);
ricoh_set_zv
(
sock
);
rl_io
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_16BIT_IO_0
);
rl_mem
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_16BIT_MEM_0
);
rl_config
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_CONFIG
);
}
static
void
ricoh_restore_state
(
struct
yenta_socket
*
socket
)
{
config_writew
(
socket
,
RL5C4XX_MISC
,
rl_misc
(
socket
));
config_writew
(
socket
,
RL5C4XX_MISC
,
rl_misc
(
socket
));
config_writew
(
socket
,
RL5C4XX_16BIT_CTL
,
rl_ctl
(
socket
));
config_writew
(
socket
,
RL5C4XX_16BIT_CTL
,
rl_ctl
(
socket
));
config_writew
(
socket
,
RL5C4XX_16BIT_IO_0
,
rl_io
(
socket
));
config_writew
(
socket
,
RL5C4XX_16BIT_IO_0
,
rl_io
(
socket
));
config_writew
(
socket
,
RL5C4XX_16BIT_MEM_0
,
rl_mem
(
socket
));
config_writew
(
socket
,
RL5C4XX_16BIT_MEM_0
,
rl_mem
(
socket
));
config_writew
(
socket
,
RL5C4XX_CONFIG
,
rl_config
(
socket
));
config_writew
(
socket
,
RL5C4XX_CONFIG
,
rl_config
(
socket
));
return
0
;
}
}
/*
/*
* Magic Ricoh initialization code.. Save state at
* Magic Ricoh initialization code..
* beginning, re-initialize it after suspend.
*/
*/
static
int
ricoh_override
(
struct
yenta_socket
*
socket
)
static
int
ricoh_override
(
struct
yenta_socket
*
socket
)
{
{
rl_misc
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_MISC
);
u16
config
,
ctl
;
rl_ctl
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_16BIT_CTL
);
rl_io
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_16BIT_IO_0
);
config
=
config_readw
(
socket
,
RL5C4XX_CONFIG
);
rl_mem
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_16BIT_MEM_0
);
rl_config
(
socket
)
=
config_readw
(
socket
,
RL5C4XX_CONFIG
);
/* Set the default timings, don't trust the original values */
/* Set the default timings, don't trust the original values */
rl_ctl
(
socket
)
=
RL5C4XX_16CTL_IO_TIMING
|
RL5C4XX_16CTL_MEM_TIMING
;
ctl
=
RL5C4XX_16CTL_IO_TIMING
|
RL5C4XX_16CTL_MEM_TIMING
;
if
(
socket
->
dev
->
device
<
PCI_DEVICE_ID_RICOH_RL5C475
)
{
if
(
socket
->
dev
->
device
<
PCI_DEVICE_ID_RICOH_RL5C475
)
{
rl_ctl
(
socket
)
|=
RL5C46X_16CTL_LEVEL_1
|
RL5C46X_16CTL_LEVEL_2
;
ctl
|=
RL5C46X_16CTL_LEVEL_1
|
RL5C46X_16CTL_LEVEL_2
;
}
else
{
}
else
{
rl_config
(
socket
)
|=
RL5C4XX_CONFIG_PREFETCH
;
config
|=
RL5C4XX_CONFIG_PREFETCH
;
}
}
socket
->
socket
.
ops
->
init
=
ricoh_init
;
config_writew
(
socket
,
RL5C4XX_16BIT_CTL
,
ctl
);
config_writew
(
socket
,
RL5C4XX_CONFIG
,
config
);
ricoh_set_zv
(
socket
);
return
0
;
return
0
;
}
}
...
...
drivers/pcmcia/ti113x.h
View file @
054cb795
...
@@ -136,16 +136,34 @@
...
@@ -136,16 +136,34 @@
#ifdef CONFIG_CARDBUS
#ifdef CONFIG_CARDBUS
static
int
ti_intctl
(
struct
yenta_socket
*
socket
)
/*
* Texas Instruments CardBus controller overrides.
*/
#define ti_sysctl(socket) ((socket)->private[0])
#define ti_cardctl(socket) ((socket)->private[1])
#define ti_devctl(socket) ((socket)->private[2])
#define ti_diag(socket) ((socket)->private[3])
#define ti_irqmux(socket) ((socket)->private[4])
/*
* These are the TI specific power management handlers.
*/
static
void
ti_save_state
(
struct
yenta_socket
*
socket
)
{
{
u8
new
,
reg
=
exca_readb
(
socket
,
I365_INTCTL
);
ti_sysctl
(
socket
)
=
config_readl
(
socket
,
TI113X_SYSTEM_CONTROL
);
ti_irqmux
(
socket
)
=
config_readl
(
socket
,
TI122X_IRQMUX
);
ti_cardctl
(
socket
)
=
config_readb
(
socket
,
TI113X_CARD_CONTROL
);
ti_devctl
(
socket
)
=
config_readb
(
socket
,
TI113X_DEVICE_CONTROL
);
ti_diag
(
socket
)
=
config_readb
(
socket
,
TI1250_DIAGNOSTIC
);
}
new
=
reg
&
~
I365_INTR_ENA
;
static
void
ti_restore_state
(
struct
yenta_socket
*
socket
)
if
(
socket
->
cb_irq
)
{
new
|=
I365_INTR_ENA
;
config_writel
(
socket
,
TI113X_SYSTEM_CONTROL
,
ti_sysctl
(
socket
));
if
(
new
!=
reg
)
config_writel
(
socket
,
TI122X_IRQMUX
,
ti_irqmux
(
socket
));
exca_writeb
(
socket
,
I365_INTCTL
,
new
);
config_writeb
(
socket
,
TI113X_CARD_CONTROL
,
ti_cardctl
(
socket
));
return
0
;
config_writeb
(
socket
,
TI113X_DEVICE_CONTROL
,
ti_devctl
(
socket
));
config_writeb
(
socket
,
TI1250_DIAGNOSTIC
,
ti_diag
(
socket
));
}
}
/*
/*
...
@@ -185,8 +203,8 @@ static void ti1250_zoom_video(struct pcmcia_socket *sock, int onoff)
...
@@ -185,8 +203,8 @@ static void ti1250_zoom_video(struct pcmcia_socket *sock, int onoff)
ti_zoom_video
(
sock
,
onoff
);
ti_zoom_video
(
sock
,
onoff
);
reg
=
config_readb
(
socket
,
0x84
);
reg
=
config_readb
(
socket
,
TI1250_MULTIMEDIA_CTL
);
reg
|=
(
1
<<
7
)
;
/* ZV bus enable */
reg
|=
TI1250_MMC_ZVOUTEN
;
/* ZV bus enable */
if
(
PCI_FUNC
(
socket
->
dev
->
devfn
)
==
1
)
if
(
PCI_FUNC
(
socket
->
dev
->
devfn
)
==
1
)
shift
=
1
;
shift
=
1
;
...
@@ -204,12 +222,11 @@ static void ti1250_zoom_video(struct pcmcia_socket *sock, int onoff)
...
@@ -204,12 +222,11 @@ static void ti1250_zoom_video(struct pcmcia_socket *sock, int onoff)
reg
&=
~
(
1
<<
shift
);
/* Socket zoon video off */
reg
&=
~
(
1
<<
shift
);
/* Socket zoon video off */
}
}
config_writeb
(
socket
,
0x84
,
reg
);
config_writeb
(
socket
,
TI1250_MULTIMEDIA_CTL
,
reg
);
}
}
static
void
ti_set_zv
(
struct
pcmcia_socket
*
sock
)
static
void
ti_set_zv
(
struct
yenta_socket
*
socket
)
{
{
struct
yenta_socket
*
socket
=
container_of
(
sock
,
struct
yenta_socket
,
socket
);
if
(
socket
->
dev
->
vendor
==
PCI_VENDOR_ID_TI
)
if
(
socket
->
dev
->
vendor
==
PCI_VENDOR_ID_TI
)
{
{
switch
(
socket
->
dev
->
device
)
switch
(
socket
->
dev
->
device
)
...
@@ -218,24 +235,16 @@ static void ti_set_zv(struct pcmcia_socket *sock)
...
@@ -218,24 +235,16 @@ static void ti_set_zv(struct pcmcia_socket *sock)
case
PCI_DEVICE_ID_TI_1220
:
case
PCI_DEVICE_ID_TI_1220
:
case
PCI_DEVICE_ID_TI_1221
:
case
PCI_DEVICE_ID_TI_1221
:
case
PCI_DEVICE_ID_TI_1225
:
case
PCI_DEVICE_ID_TI_1225
:
sock
->
zoom_video
=
ti_zoom_video
;
sock
et
->
socket
.
zoom_video
=
ti_zoom_video
;
break
;
break
;
case
PCI_DEVICE_ID_TI_1250
:
case
PCI_DEVICE_ID_TI_1250
:
case
PCI_DEVICE_ID_TI_1251A
:
case
PCI_DEVICE_ID_TI_1251A
:
case
PCI_DEVICE_ID_TI_1251B
:
case
PCI_DEVICE_ID_TI_1251B
:
case
PCI_DEVICE_ID_TI_1450
:
case
PCI_DEVICE_ID_TI_1450
:
sock
->
zoom_video
=
ti1250_zoom_video
;
sock
et
->
socket
.
zoom_video
=
ti1250_zoom_video
;
}
}
}
}
}
}
static
int
ti_init
(
struct
pcmcia_socket
*
sock
)
{
struct
yenta_socket
*
socket
=
container_of
(
sock
,
struct
yenta_socket
,
socket
);
yenta_init
(
sock
);
ti_set_zv
(
sock
);
ti_intctl
(
socket
);
return
0
;
}
/*
/*
...
@@ -250,6 +259,18 @@ static int ti_init(struct pcmcia_socket *sock)
...
@@ -250,6 +259,18 @@ static int ti_init(struct pcmcia_socket *sock)
* This makes us correctly get PCI CSC interrupt
* This makes us correctly get PCI CSC interrupt
* events.
* events.
*/
*/
static
int
ti_init
(
struct
yenta_socket
*
socket
)
{
u8
new
,
reg
=
exca_readb
(
socket
,
I365_INTCTL
);
new
=
reg
&
~
I365_INTR_ENA
;
if
(
socket
->
cb_irq
)
new
|=
I365_INTR_ENA
;
if
(
new
!=
reg
)
exca_writeb
(
socket
,
I365_INTCTL
,
new
);
return
0
;
}
static
int
ti_override
(
struct
yenta_socket
*
socket
)
static
int
ti_override
(
struct
yenta_socket
*
socket
)
{
{
u8
new
,
reg
=
exca_readb
(
socket
,
I365_INTCTL
);
u8
new
,
reg
=
exca_readb
(
socket
,
I365_INTCTL
);
...
@@ -258,6 +279,8 @@ static int ti_override(struct yenta_socket *socket)
...
@@ -258,6 +279,8 @@ static int ti_override(struct yenta_socket *socket)
if
(
new
!=
reg
)
if
(
new
!=
reg
)
exca_writeb
(
socket
,
I365_INTCTL
,
new
);
exca_writeb
(
socket
,
I365_INTCTL
,
new
);
ti_set_zv
(
socket
);
#if 0
#if 0
/*
/*
* If ISA interrupts don't work, then fall back to routing card
* If ISA interrupts don't work, then fall back to routing card
...
@@ -285,83 +308,85 @@ static int ti_override(struct yenta_socket *socket)
...
@@ -285,83 +308,85 @@ static int ti_override(struct yenta_socket *socket)
}
}
#endif
#endif
socket
->
socket
.
ops
->
init
=
ti_init
;
return
0
;
}
#define ti_sysctl(socket) ((socket)->private[0])
#define ti_cardctl(socket) ((socket)->private[1])
#define ti_devctl(socket) ((socket)->private[2])
#define ti_diag(socket) ((socket)->private[3])
#define ti_irqmux(socket) ((socket)->private[4])
static
int
ti113x_init
(
struct
pcmcia_socket
*
sock
)
{
struct
yenta_socket
*
socket
=
container_of
(
sock
,
struct
yenta_socket
,
socket
);
yenta_init
(
sock
);
ti_set_zv
(
sock
);
config_writel
(
socket
,
TI113X_SYSTEM_CONTROL
,
ti_sysctl
(
socket
));
config_writeb
(
socket
,
TI113X_CARD_CONTROL
,
ti_cardctl
(
socket
));
config_writeb
(
socket
,
TI113X_DEVICE_CONTROL
,
ti_devctl
(
socket
));
ti_intctl
(
socket
);
return
0
;
return
0
;
}
}
static
int
ti113x_override
(
struct
yenta_socket
*
socket
)
static
int
ti113x_override
(
struct
yenta_socket
*
socket
)
{
{
ti_sysctl
(
socket
)
=
config_readl
(
socket
,
TI113X_SYSTEM_CONTROL
);
u8
cardctl
;
ti_cardctl
(
socket
)
=
config_readb
(
socket
,
TI113X_CARD_CONTROL
);
ti_devctl
(
socket
)
=
config_readb
(
socket
,
TI113X_DEVICE_CONTROL
);
ti_cardctl
(
socket
)
&=
~
(
TI113X_CCR_PCI_IRQ_ENA
|
TI113X_CCR_PCI_IREQ
|
TI113X_CCR_PCI_CSC
);
cardctl
=
config_readb
(
socket
,
TI113X_CARD_CONTROL
);
cardctl
&=
~
(
TI113X_CCR_PCI_IRQ_ENA
|
TI113X_CCR_PCI_IREQ
|
TI113X_CCR_PCI_CSC
);
if
(
socket
->
cb_irq
)
if
(
socket
->
cb_irq
)
ti_cardctl
(
socket
)
|=
TI113X_CCR_PCI_IRQ_ENA
|
TI113X_CCR_PCI_CSC
|
TI113X_CCR_PCI_IREQ
;
cardctl
|=
TI113X_CCR_PCI_IRQ_ENA
|
TI113X_CCR_PCI_CSC
|
TI113X_CCR_PCI_IREQ
;
ti_override
(
socket
);
config_writeb
(
socket
,
TI113X_CARD_CONTROL
,
cardctl
);
socket
->
socket
.
ops
->
init
=
ti113x_init
;
return
0
;
return
ti_override
(
socket
)
;
}
}
static
int
ti12
50_init
(
struct
pcmcia_socket
*
sock
)
static
int
ti12
xx_override
(
struct
yenta_socket
*
socket
)
{
{
struct
yenta_socket
*
socket
=
container_of
(
sock
,
struct
yenta_socket
,
socket
);
u32
val
;
ti113x_init
(
sock
);
ti_irqmux
(
socket
)
=
config_readl
(
socket
,
TI122X_IRQMUX
);
/* make sure that memory burst is active */
#if 0
val
=
config_readl
(
socket
,
TI113X_SYSTEM_CONTROL
);
ti_irqmux(socket) = (ti_irqmux(socket) & ~0x0f) | 0x02; /* route INTA */
if
(
!
(
val
&
TI122X_SCR_MRBURSTUP
))
{
if (!(ti_sysctl(socket) & TI122X_SCR_INTRTIE))
printk
(
KERN_INFO
"Yenta: Enabling burst memory read transactions
\n
"
);
ti_irqmux(socket) |= 0x20; /* route INTB */
val
|=
TI122X_SCR_MRBURSTUP
;
#endif
config_writel
(
socket
,
TI113X_SYSTEM_CONTROL
,
val
);
}
config_writel
(
socket
,
TI122X_IRQMUX
,
ti_irqmux
(
socket
));
/*
config_writeb
(
socket
,
TI1250_DIAGNOSTIC
,
ti_diag
(
socket
));
* Yenta expects controllers to use CSCINT to route
return
0
;
* CSC interrupts to PCI rather than INTVAL.
*/
val
=
config_readb
(
socket
,
TI1250_DIAGNOSTIC
);
printk
(
KERN_INFO
"Yenta: Using %s to route CSC interrupts to PCI
\n
"
,
(
val
&
TI1250_DIAG_PCI_CSC
)
?
"CSCINT"
:
"INTVAL"
);
printk
(
KERN_INFO
"Yenta: Routing CardBus interrupts to %s
\n
"
,
(
val
&
TI1250_DIAG_PCI_IREQ
)
?
"PCI"
:
"ISA"
);
return
ti_override
(
socket
);
}
}
static
int
ti1250_override
(
struct
yenta_socket
*
socket
)
static
int
ti1250_override
(
struct
yenta_socket
*
socket
)
{
{
ti_diag
(
socket
)
=
config_readb
(
socket
,
TI1250_DIAGNOSTIC
)
;
u8
old
,
diag
;
ti_diag
(
socket
)
&=
~
(
TI1250_DIAG_PCI_CSC
|
TI1250_DIAG_PCI_IREQ
);
old
=
config_readb
(
socket
,
TI1250_DIAGNOSTIC
);
diag
=
old
&
~
(
TI1250_DIAG_PCI_CSC
|
TI1250_DIAG_PCI_IREQ
);
if
(
socket
->
cb_irq
)
if
(
socket
->
cb_irq
)
ti_diag
(
socket
)
|=
TI1250_DIAG_PCI_CSC
|
TI1250_DIAG_PCI_IREQ
;
diag
|=
TI1250_DIAG_PCI_CSC
|
TI1250_DIAG_PCI_IREQ
;
ti113x_override
(
socket
);
socket
->
socket
.
ops
->
init
=
ti1250_init
;
return
0
;
}
if
(
diag
!=
old
)
{
printk
(
KERN_INFO
"Yenta: adjusting diagnostic: %02x -> %02x
\n
"
,
old
,
diag
);
config_writeb
(
socket
,
TI1250_DIAGNOSTIC
,
diag
);
}
static
int
ti12xx_override
(
struct
yenta_socket
*
socket
)
#if 0
{
/*
/* make sure that memory burst is active */
* This is highly machine specific, and we should NOT touch
ti_sysctl
(
socket
)
=
config_readl
(
socket
,
TI113X_SYSTEM_CONTROL
);
* this register - we have no knowledge how the hardware
ti_sysctl
(
socket
)
|=
TI122X_SCR_MRBURSTUP
;
* is actually wired.
config_writel
(
socket
,
TI113X_SYSTEM_CONTROL
,
ti_sysctl
(
socket
));
*
* If we're going to do this, we should probably look into
* using the subsystem IDs.
*
* On ThinkPad 380XD, this changes MFUNC0 from the ISA IRQ3
* output (which it is) to IRQ2. We also change MFUNC1
* from ISA IRQ4 to IRQ6.
*/
irqmux = config_readl(socket, TI122X_IRQMUX);
irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
if (!(ti_sysctl(socket) & TI122X_SCR_INTRTIE))
irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
config_writel(socket, TI122X_IRQMUX, irqmux);
#endif
return
ti1
13
x_override
(
socket
);
return
ti1
2x
x_override
(
socket
);
}
}
#endif
/* CONFIG_CARDBUS */
#endif
/* CONFIG_CARDBUS */
...
...
drivers/pcmcia/topic.h
View file @
054cb795
...
@@ -31,20 +31,7 @@
...
@@ -31,20 +31,7 @@
#ifndef _LINUX_TOPIC_H
#ifndef _LINUX_TOPIC_H
#define _LINUX_TOPIC_H
#define _LINUX_TOPIC_H
#ifndef PCI_VENDOR_ID_TOSHIBA
/* Register definitions for Toshiba ToPIC95/97/100 controllers */
#define PCI_VENDOR_ID_TOSHIBA 0x1179
#endif
#ifndef PCI_DEVICE_ID_TOSHIBA_TOPIC95_A
#define PCI_DEVICE_ID_TOSHIBA_TOPIC95_A 0x0603
#endif
#ifndef PCI_DEVICE_ID_TOSHIBA_TOPIC95_B
#define PCI_DEVICE_ID_TOSHIBA_TOPIC95_B 0x060a
#endif
#ifndef PCI_DEVICE_ID_TOSHIBA_TOPIC97
#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
#endif
/* Register definitions for Toshiba ToPIC95 controllers */
#define TOPIC_SOCKET_CONTROL 0x0090
/* 32 bit */
#define TOPIC_SOCKET_CONTROL 0x0090
/* 32 bit */
#define TOPIC_SCR_IRQSEL 0x00000001
#define TOPIC_SCR_IRQSEL 0x00000001
...
@@ -93,4 +80,61 @@
...
@@ -93,4 +80,61 @@
#define TOPIC97_RCR_CAUDIO_OFF 0x00000002
#define TOPIC97_RCR_CAUDIO_OFF 0x00000002
#define TOPIC_RCR_CAUDIO_INVERT 0x00000001
#define TOPIC_RCR_CAUDIO_INVERT 0x00000001
#define TOPIC97_MISC1 0x00ad
/* 8bit */
#define TOPIC97_MISC1_CLOCKRUN_ENABLE 0x80
#define TOPIC97_MISC1_CLOCKRUN_MODE 0x40
#define TOPIC97_MISC1_DETECT_REQ_ENA 0x10
#define TOPIC97_MISC1_SCK_CLEAR_DIS 0x04
#define TOPIC97_MISC1_R2_LOW_ENABLE 0x10
#define TOPIC97_MISC2 0x00ae
/* 8 bit */
#define TOPIC97_MISC2_SPWRCLK_MASK 0x70
#define TOPIC97_MISC2_SPWRMOD 0x08
#define TOPIC97_MISC2_SPWR_ENABLE 0x04
#define TOPIC97_MISC2_ZV_MODE 0x02
#define TOPIC97_MISC2_ZV_ENABLE 0x01
#define TOPIC97_ZOOM_VIDEO_CONTROL 0x009c
/* 8 bit */
#define TOPIC97_ZV_CONTROL_ENABLE 0x01
#define TOPIC97_AUDIO_VIDEO_SWITCH 0x003c
/* 8 bit */
#define TOPIC97_AVS_AUDIO_CONTROL 0x02
#define TOPIC97_AVS_VIDEO_CONTROL 0x01
static
void
topic97_zoom_video
(
struct
pcmcia_socket
*
sock
,
int
onoff
)
{
struct
yenta_socket
*
socket
=
container_of
(
sock
,
struct
yenta_socket
,
socket
);
u8
reg_zv
,
reg
;
reg_zv
=
config_readb
(
socket
,
TOPIC97_ZOOM_VIDEO_CONTROL
);
if
(
onoff
)
{
reg_zv
|=
TOPIC97_ZV_CONTROL_ENABLE
;
config_writeb
(
socket
,
TOPIC97_ZOOM_VIDEO_CONTROL
,
reg_zv
);
reg
=
config_readb
(
socket
,
TOPIC97_MISC2
);
reg
|=
TOPIC97_MISC2_ZV_ENABLE
;
config_writeb
(
socket
,
TOPIC97_MISC2
,
reg
);
/* not sure this is needed, doc is unclear */
#if 0
reg = config_readb(socket, TOPIC97_AUDIO_VIDEO_SWITCH);
reg |= TOPIC97_AVS_AUDIO_CONTROL | TOPIC97_AVS_VIDEO_CONTROL;
config_writeb(socket, TOPIC97_AUDIO_VIDEO_SWITCH, reg);
#endif
}
else
{
reg_zv
&=
~
TOPIC97_ZV_CONTROL_ENABLE
;
config_writeb
(
socket
,
TOPIC97_ZOOM_VIDEO_CONTROL
,
reg_zv
);
}
}
static
int
topic97_override
(
struct
yenta_socket
*
socket
)
{
/* ToPIC97/100 support ZV */
socket
->
socket
.
zoom_video
=
topic97_zoom_video
;
return
0
;
}
#endif
/* _LINUX_TOPIC_H */
#endif
/* _LINUX_TOPIC_H */
drivers/pcmcia/yenta_socket.c
View file @
054cb795
This diff is collapsed.
Click to expand it.
drivers/pcmcia/yenta_socket.h
View file @
054cb795
...
@@ -95,6 +95,15 @@
...
@@ -95,6 +95,15 @@
*/
*/
#define CB_MEM_PAGE(map) (0x40 + (map))
#define CB_MEM_PAGE(map) (0x40 + (map))
struct
yenta_socket
;
struct
cardbus_type
{
int
(
*
override
)(
struct
yenta_socket
*
);
void
(
*
save_state
)(
struct
yenta_socket
*
);
void
(
*
restore_state
)(
struct
yenta_socket
*
);
int
(
*
sock_init
)(
struct
yenta_socket
*
);
};
struct
yenta_socket
{
struct
yenta_socket
{
struct
pci_dev
*
dev
;
struct
pci_dev
*
dev
;
int
cb_irq
,
io_irq
;
int
cb_irq
,
io_irq
;
...
@@ -102,9 +111,13 @@ struct yenta_socket {
...
@@ -102,9 +111,13 @@ struct yenta_socket {
struct
timer_list
poll_timer
;
struct
timer_list
poll_timer
;
struct
pcmcia_socket
socket
;
struct
pcmcia_socket
socket
;
struct
cardbus_type
*
type
;
/* A few words of private data for special stuff of overrides... */
/* A few words of private data for special stuff of overrides... */
unsigned
int
private
[
8
];
unsigned
int
private
[
8
];
/* PCI saved state */
u32
saved_state
[
18
];
};
};
...
...
drivers/scsi/sr.c
View file @
054cb795
...
@@ -695,6 +695,10 @@ static void get_capabilities(struct scsi_cd *cd)
...
@@ -695,6 +695,10 @@ static void get_capabilities(struct scsi_cd *cd)
unsigned
char
*
buffer
;
unsigned
char
*
buffer
;
int
rc
,
n
;
int
rc
,
n
;
struct
scsi_mode_data
data
;
struct
scsi_mode_data
data
;
struct
scsi_request
*
SRpnt
;
unsigned
char
cmd
[
MAX_COMMAND_SIZE
];
unsigned
int
the_result
;
int
retries
;
static
char
*
loadmech
[]
=
static
char
*
loadmech
[]
=
{
{
...
@@ -708,11 +712,46 @@ static void get_capabilities(struct scsi_cd *cd)
...
@@ -708,11 +712,46 @@ static void get_capabilities(struct scsi_cd *cd)
""
""
};
};
/* allocate a request for the TEST_UNIT_READY */
SRpnt
=
scsi_allocate_request
(
cd
->
device
);
if
(
!
SRpnt
)
{
printk
(
KERN_WARNING
"(get_capabilities:) Request allocation "
"failure.
\n
"
);
return
;
}
/* allocate transfer buffer */
buffer
=
kmalloc
(
512
,
GFP_KERNEL
|
GFP_DMA
);
buffer
=
kmalloc
(
512
,
GFP_KERNEL
|
GFP_DMA
);
if
(
!
buffer
)
{
if
(
!
buffer
)
{
printk
(
KERN_ERR
"sr: out of memory.
\n
"
);
printk
(
KERN_ERR
"sr: out of memory.
\n
"
);
scsi_release_request
(
SRpnt
);
return
;
return
;
}
}
/* issue TEST_UNIT_READY until the initial startup UNIT_ATTENTION
* conditions are gone, or a timeout happens
*/
retries
=
0
;
do
{
memset
((
void
*
)
cmd
,
0
,
MAX_COMMAND_SIZE
);
cmd
[
0
]
=
TEST_UNIT_READY
;
SRpnt
->
sr_cmd_len
=
0
;
SRpnt
->
sr_sense_buffer
[
0
]
=
0
;
SRpnt
->
sr_sense_buffer
[
2
]
=
0
;
SRpnt
->
sr_data_direction
=
DMA_NONE
;
scsi_wait_req
(
SRpnt
,
(
void
*
)
cmd
,
buffer
,
0
,
SR_TIMEOUT
,
MAX_RETRIES
);
the_result
=
SRpnt
->
sr_result
;
retries
++
;
}
while
(
retries
<
5
&&
(
!
scsi_status_is_good
(
the_result
)
||
((
driver_byte
(
the_result
)
&
DRIVER_SENSE
)
&&
SRpnt
->
sr_sense_buffer
[
2
]
==
UNIT_ATTENTION
)));
/* ask for mode page 0x2a */
rc
=
scsi_mode_sense
(
cd
->
device
,
0
,
0x2a
,
buffer
,
128
,
rc
=
scsi_mode_sense
(
cd
->
device
,
0
,
0x2a
,
buffer
,
128
,
SR_TIMEOUT
,
3
,
&
data
);
SR_TIMEOUT
,
3
,
&
data
);
...
@@ -722,6 +761,7 @@ static void get_capabilities(struct scsi_cd *cd)
...
@@ -722,6 +761,7 @@ static void get_capabilities(struct scsi_cd *cd)
cd
->
cdi
.
mask
|=
(
CDC_CD_R
|
CDC_CD_RW
|
CDC_DVD_R
|
cd
->
cdi
.
mask
|=
(
CDC_CD_R
|
CDC_CD_RW
|
CDC_DVD_R
|
CDC_DVD
|
CDC_DVD_RAM
|
CDC_DVD
|
CDC_DVD_RAM
|
CDC_SELECT_DISC
|
CDC_SELECT_SPEED
);
CDC_SELECT_DISC
|
CDC_SELECT_SPEED
);
scsi_release_request
(
SRpnt
);
kfree
(
buffer
);
kfree
(
buffer
);
printk
(
"%s: scsi-1 drive
\n
"
,
cd
->
cdi
.
name
);
printk
(
"%s: scsi-1 drive
\n
"
,
cd
->
cdi
.
name
);
return
;
return
;
...
@@ -775,6 +815,7 @@ static void get_capabilities(struct scsi_cd *cd)
...
@@ -775,6 +815,7 @@ static void get_capabilities(struct scsi_cd *cd)
/*else I don't think it can close its tray
/*else I don't think it can close its tray
cd->cdi.mask |= CDC_CLOSE_TRAY; */
cd->cdi.mask |= CDC_CLOSE_TRAY; */
scsi_release_request
(
SRpnt
);
kfree
(
buffer
);
kfree
(
buffer
);
}
}
...
...
include/asm-m68knommu/irq.h
View file @
054cb795
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define _M68K_IRQ_H_
#define _M68K_IRQ_H_
#include <linux/config.h>
#include <linux/config.h>
#include <linux/interrupt.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#ifdef CONFIG_COLDFIRE
#ifdef CONFIG_COLDFIRE
...
@@ -62,7 +63,7 @@ extern void (*mach_enable_irq)(unsigned int);
...
@@ -62,7 +63,7 @@ extern void (*mach_enable_irq)(unsigned int);
extern
void
(
*
mach_disable_irq
)(
unsigned
int
);
extern
void
(
*
mach_disable_irq
)(
unsigned
int
);
extern
int
sys_request_irq
(
unsigned
int
,
extern
int
sys_request_irq
(
unsigned
int
,
void
(
*
)(
int
,
void
*
,
struct
pt_regs
*
),
irqreturn_t
(
*
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
,
const
char
*
,
void
*
);
unsigned
long
,
const
char
*
,
void
*
);
extern
void
sys_free_irq
(
unsigned
int
,
void
*
);
extern
void
sys_free_irq
(
unsigned
int
,
void
*
);
...
@@ -91,7 +92,7 @@ extern void sys_free_irq(unsigned int, void *);
...
@@ -91,7 +92,7 @@ extern void sys_free_irq(unsigned int, void *);
* interrupt source (if it supports chaining).
* interrupt source (if it supports chaining).
*/
*/
typedef
struct
irq_node
{
typedef
struct
irq_node
{
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
);
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
);
unsigned
long
flags
;
unsigned
long
flags
;
void
*
dev_id
;
void
*
dev_id
;
const
char
*
devname
;
const
char
*
devname
;
...
@@ -102,7 +103,7 @@ typedef struct irq_node {
...
@@ -102,7 +103,7 @@ typedef struct irq_node {
* This structure has only 4 elements for speed reasons
* This structure has only 4 elements for speed reasons
*/
*/
typedef
struct
irq_handler
{
typedef
struct
irq_handler
{
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
);
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
);
unsigned
long
flags
;
unsigned
long
flags
;
void
*
dev_id
;
void
*
dev_id
;
const
char
*
devname
;
const
char
*
devname
;
...
...
include/asm-m68knommu/local.h
0 → 100644
View file @
054cb795
#ifndef __M68KNOMMU_LOCAL_H
#define __M68KNOMMU_LOCAL_H
#include <asm-generic/local.h>
#endif
/* __M68KNOMMU_LOCAL_H */
include/asm-m68knommu/sections.h
0 → 100644
View file @
054cb795
#ifndef _M68KNOMMU_SECTIONS_H
#define _M68KNOMMU_SECTIONS_H
/* nothing to see, move along */
#include <asm-generic/sections.h>
#endif
include/linux/pci_ids.h
View file @
054cb795
...
@@ -1345,7 +1345,10 @@
...
@@ -1345,7 +1345,10 @@
#define PCI_VENDOR_ID_TOSHIBA 0x1179
#define PCI_VENDOR_ID_TOSHIBA 0x1179
#define PCI_DEVICE_ID_TOSHIBA_601 0x0601
#define PCI_DEVICE_ID_TOSHIBA_601 0x0601
#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a
#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a
#define PCI_DEVICE_ID_TOSHIBA_TOPIC95_A 0x0603
#define PCI_DEVICE_ID_TOSHIBA_TOPIC95_B 0x060a
#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
#define PCI_DEVICE_ID_TOSHIBA_TOPIC100 0x0617
#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
#define PCI_DEVICE_ID_TOSHIBA_TX3927 0x000a
#define PCI_DEVICE_ID_TOSHIBA_TX3927 0x000a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment