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
Kirill Smelkov
linux
Commits
fa6688e1
Commit
fa6688e1
authored
Apr 05, 2009
by
Geert Uytterhoeven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
m68k: amiga - Frame buffer platform device conversion
Signed-off-by:
Geert Uytterhoeven
<
geert@linux-m68k.org
>
parent
0d305464
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
18 deletions
+46
-18
arch/m68k/amiga/platform.c
arch/m68k/amiga/platform.c
+15
-0
drivers/video/amifb.c
drivers/video/amifb.c
+31
-18
No files found.
arch/m68k/amiga/platform.c
View file @
fa6688e1
...
...
@@ -56,3 +56,18 @@ static int __init amiga_init_bus(void)
subsys_initcall
(
amiga_init_bus
);
#endif
/* CONFIG_ZORRO */
static
int
__init
amiga_init_devices
(
void
)
{
if
(
!
MACH_IS_AMIGA
)
return
-
ENODEV
;
/* video hardware */
if
(
AMIGAHW_PRESENT
(
AMI_VIDEO
))
platform_device_register_simple
(
"amiga-video"
,
-
1
,
NULL
,
0
);
return
0
;
}
device_initcall
(
amiga_init_devices
);
drivers/video/amifb.c
View file @
fa6688e1
...
...
@@ -50,8 +50,9 @@
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/amigahw.h>
...
...
@@ -1135,7 +1136,7 @@ static int amifb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg
* Interface to the low level console driver
*/
static
void
amifb_deinit
(
void
);
static
void
amifb_deinit
(
struct
platform_device
*
pdev
);
/*
* Internal routines
...
...
@@ -2246,7 +2247,7 @@ static inline void chipfree(void)
* Initialisation
*/
static
int
__init
amifb_
init
(
void
)
static
int
__init
amifb_
probe
(
struct
platform_device
*
pdev
)
{
int
tag
,
i
,
err
=
0
;
u_long
chipptr
;
...
...
@@ -2261,16 +2262,6 @@ static int __init amifb_init(void)
}
amifb_setup
(
option
);
#endif
if
(
!
MACH_IS_AMIGA
||
!
AMIGAHW_PRESENT
(
AMI_VIDEO
))
return
-
ENODEV
;
/*
* We request all registers starting from bplpt[0]
*/
if
(
!
request_mem_region
(
CUSTOM_PHYSADDR
+
0xe0
,
0x120
,
"amifb [Denise/Lisa]"
))
return
-
EBUSY
;
custom
.
dmacon
=
DMAF_ALL
|
DMAF_MASTER
;
switch
(
amiga_chipset
)
{
...
...
@@ -2377,6 +2368,7 @@ static int __init amifb_init(void)
fb_info
.
fbops
=
&
amifb_ops
;
fb_info
.
par
=
&
currentpar
;
fb_info
.
flags
=
FBINFO_DEFAULT
;
fb_info
.
device
=
&
pdev
->
dev
;
if
(
!
fb_find_mode
(
&
fb_info
.
var
,
&
fb_info
,
mode_option
,
ami_modedb
,
NUM_TOTAL_MODES
,
&
ami_modedb
[
defmode
],
4
))
{
...
...
@@ -2451,18 +2443,18 @@ static int __init amifb_init(void)
return
0
;
amifb_error:
amifb_deinit
();
amifb_deinit
(
pdev
);
return
err
;
}
static
void
amifb_deinit
(
void
)
static
void
amifb_deinit
(
struct
platform_device
*
pdev
)
{
if
(
fb_info
.
cmap
.
len
)
fb_dealloc_cmap
(
&
fb_info
.
cmap
);
fb_dealloc_cmap
(
&
fb_info
.
cmap
);
chipfree
();
if
(
videomemory
)
iounmap
((
void
*
)
videomemory
);
release_mem_region
(
CUSTOM_PHYSADDR
+
0xe0
,
0x120
);
custom
.
dmacon
=
DMAF_ALL
|
DMAF_MASTER
;
}
...
...
@@ -3794,14 +3786,35 @@ static void ami_rebuild_copper(void)
}
}
static
void
__exit
amifb_exit
(
void
)
static
int
__exit
amifb_remove
(
struct
platform_device
*
pdev
)
{
unregister_framebuffer
(
&
fb_info
);
amifb_deinit
();
amifb_deinit
(
pdev
);
amifb_video_off
();
return
0
;
}
static
struct
platform_driver
amifb_driver
=
{
.
remove
=
__exit_p
(
amifb_remove
),
.
driver
=
{
.
name
=
"amiga-video"
,
.
owner
=
THIS_MODULE
,
},
};
static
int
__init
amifb_init
(
void
)
{
return
platform_driver_probe
(
&
amifb_driver
,
amifb_probe
);
}
module_init
(
amifb_init
);
static
void
__exit
amifb_exit
(
void
)
{
platform_driver_unregister
(
&
amifb_driver
);
}
module_exit
(
amifb_exit
);
MODULE_LICENSE
(
"GPL"
);
MODULE_ALIAS
(
"platform:amiga-video"
);
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