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
35055996
Commit
35055996
authored
Jun 25, 2006
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Allow floppy driver to build modular.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
69853918
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
62 deletions
+49
-62
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/irq.c
+0
-61
include/asm-sparc64/floppy.h
include/asm-sparc64/floppy.h
+49
-1
No files found.
arch/sparc64/kernel/irq.c
View file @
35055996
...
@@ -563,67 +563,6 @@ void handler_irq(int irq, struct pt_regs *regs)
...
@@ -563,67 +563,6 @@ void handler_irq(int irq, struct pt_regs *regs)
irq_exit
();
irq_exit
();
}
}
#ifdef CONFIG_BLK_DEV_FD
extern
irqreturn_t
floppy_interrupt
(
int
,
void
*
,
struct
pt_regs
*
);
/* XXX No easy way to include asm/floppy.h XXX */
extern
unsigned
char
*
pdma_vaddr
;
extern
unsigned
long
pdma_size
;
extern
volatile
int
doing_pdma
;
extern
unsigned
long
fdc_status
;
irqreturn_t
sparc_floppy_irq
(
int
irq
,
void
*
dev_cookie
,
struct
pt_regs
*
regs
)
{
if
(
likely
(
doing_pdma
))
{
void
__iomem
*
stat
=
(
void
__iomem
*
)
fdc_status
;
unsigned
char
*
vaddr
=
pdma_vaddr
;
unsigned
long
size
=
pdma_size
;
u8
val
;
while
(
size
)
{
val
=
readb
(
stat
);
if
(
unlikely
(
!
(
val
&
0x80
)))
{
pdma_vaddr
=
vaddr
;
pdma_size
=
size
;
return
IRQ_HANDLED
;
}
if
(
unlikely
(
!
(
val
&
0x20
)))
{
pdma_vaddr
=
vaddr
;
pdma_size
=
size
;
doing_pdma
=
0
;
goto
main_interrupt
;
}
if
(
val
&
0x40
)
{
/* read */
*
vaddr
++
=
readb
(
stat
+
1
);
}
else
{
unsigned
char
data
=
*
vaddr
++
;
/* write */
writeb
(
data
,
stat
+
1
);
}
size
--
;
}
pdma_vaddr
=
vaddr
;
pdma_size
=
size
;
/* Send Terminal Count pulse to floppy controller. */
val
=
readb
(
auxio_register
);
val
|=
AUXIO_AUX1_FTCNT
;
writeb
(
val
,
auxio_register
);
val
&=
~
AUXIO_AUX1_FTCNT
;
writeb
(
val
,
auxio_register
);
doing_pdma
=
0
;
}
main_interrupt:
return
floppy_interrupt
(
irq
,
dev_cookie
,
regs
);
}
EXPORT_SYMBOL
(
sparc_floppy_irq
);
#endif
struct
sun5_timer
{
struct
sun5_timer
{
u64
count0
;
u64
count0
;
u64
limit0
;
u64
limit0
;
...
...
include/asm-sparc64/floppy.h
View file @
35055996
...
@@ -208,7 +208,55 @@ static void sun_fd_enable_dma(void)
...
@@ -208,7 +208,55 @@ static void sun_fd_enable_dma(void)
pdma_areasize
=
pdma_size
;
pdma_areasize
=
pdma_size
;
}
}
extern
irqreturn_t
sparc_floppy_irq
(
int
,
void
*
,
struct
pt_regs
*
);
irqreturn_t
sparc_floppy_irq
(
int
irq
,
void
*
dev_cookie
,
struct
pt_regs
*
regs
)
{
if
(
likely
(
doing_pdma
))
{
void
__iomem
*
stat
=
(
void
__iomem
*
)
fdc_status
;
unsigned
char
*
vaddr
=
pdma_vaddr
;
unsigned
long
size
=
pdma_size
;
u8
val
;
while
(
size
)
{
val
=
readb
(
stat
);
if
(
unlikely
(
!
(
val
&
0x80
)))
{
pdma_vaddr
=
vaddr
;
pdma_size
=
size
;
return
IRQ_HANDLED
;
}
if
(
unlikely
(
!
(
val
&
0x20
)))
{
pdma_vaddr
=
vaddr
;
pdma_size
=
size
;
doing_pdma
=
0
;
goto
main_interrupt
;
}
if
(
val
&
0x40
)
{
/* read */
*
vaddr
++
=
readb
(
stat
+
1
);
}
else
{
unsigned
char
data
=
*
vaddr
++
;
/* write */
writeb
(
data
,
stat
+
1
);
}
size
--
;
}
pdma_vaddr
=
vaddr
;
pdma_size
=
size
;
/* Send Terminal Count pulse to floppy controller. */
val
=
readb
(
auxio_register
);
val
|=
AUXIO_AUX1_FTCNT
;
writeb
(
val
,
auxio_register
);
val
&=
~
AUXIO_AUX1_FTCNT
;
writeb
(
val
,
auxio_register
);
doing_pdma
=
0
;
}
main_interrupt:
return
floppy_interrupt
(
irq
,
dev_cookie
,
regs
);
}
static
int
sun_fd_request_irq
(
void
)
static
int
sun_fd_request_irq
(
void
)
{
{
...
...
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