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
0fec01ba
Commit
0fec01ba
authored
Jul 23, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synced up to m68k changes
parent
89863ff4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
64 deletions
+83
-64
drivers/video/aty/atyfb.h
drivers/video/aty/atyfb.h
+12
-7
drivers/video/aty/atyfb_base.c
drivers/video/aty/atyfb_base.c
+19
-5
drivers/video/macfb.c
drivers/video/macfb.c
+52
-52
No files found.
drivers/video/aty/atyfb.h
View file @
0fec01ba
...
@@ -146,9 +146,8 @@ static inline u32 aty_ld_le32(int regindex, const struct atyfb_par *par)
...
@@ -146,9 +146,8 @@ static inline u32 aty_ld_le32(int regindex, const struct atyfb_par *par)
if
(
regindex
>=
0x400
)
if
(
regindex
>=
0x400
)
regindex
-=
0x800
;
regindex
-=
0x800
;
#if defined(__mc68000__)
#ifdef CONFIG_ATARI
return
return
in_le32
((
volatile
u32
*
)(
par
->
ati_regbase
+
regindex
));
le32_to_cpu
(
*
((
volatile
u32
*
)
(
par
->
ati_regbase
+
regindex
)));
#else
#else
return
readl
(
par
->
ati_regbase
+
regindex
);
return
readl
(
par
->
ati_regbase
+
regindex
);
#endif
#endif
...
@@ -161,9 +160,8 @@ static inline void aty_st_le32(int regindex, u32 val,
...
@@ -161,9 +160,8 @@ static inline void aty_st_le32(int regindex, u32 val,
if
(
regindex
>=
0x400
)
if
(
regindex
>=
0x400
)
regindex
-=
0x800
;
regindex
-=
0x800
;
#if defined(__mc68000__)
#ifdef CONFIG_ATARI
*
((
volatile
u32
*
)
(
par
->
ati_regbase
+
regindex
))
=
out_le32
((
volatile
u32
*
)(
par
->
ati_regbase
+
regindex
));
cpu_to_le32
(
val
);
#else
#else
writel
(
val
,
par
->
ati_regbase
+
regindex
);
writel
(
val
,
par
->
ati_regbase
+
regindex
);
#endif
#endif
...
@@ -174,8 +172,11 @@ static inline u8 aty_ld_8(int regindex, const struct atyfb_par *par)
...
@@ -174,8 +172,11 @@ static inline u8 aty_ld_8(int regindex, const struct atyfb_par *par)
/* Hack for bloc 1, should be cleanly optimized by compiler */
/* Hack for bloc 1, should be cleanly optimized by compiler */
if
(
regindex
>=
0x400
)
if
(
regindex
>=
0x400
)
regindex
-=
0x800
;
regindex
-=
0x800
;
#ifdef CONFIG_ATARI
return
in_8
(
par
->
ati_regbase
+
regindex
);
#else
return
readb
(
par
->
ati_regbase
+
regindex
);
return
readb
(
par
->
ati_regbase
+
regindex
);
#endif
}
}
static
inline
void
aty_st_8
(
int
regindex
,
u8
val
,
static
inline
void
aty_st_8
(
int
regindex
,
u8
val
,
...
@@ -185,7 +186,11 @@ static inline void aty_st_8(int regindex, u8 val,
...
@@ -185,7 +186,11 @@ static inline void aty_st_8(int regindex, u8 val,
if
(
regindex
>=
0x400
)
if
(
regindex
>=
0x400
)
regindex
-=
0x800
;
regindex
-=
0x800
;
#ifdef CONFIG_ATARI
out_8
(
par
->
ati_regbase
+
regindex
,
val
);
#else
writeb
(
val
,
par
->
ati_regbase
+
regindex
);
writeb
(
val
,
par
->
ati_regbase
+
regindex
);
#endif
}
}
static
inline
u8
aty_ld_pll
(
int
offset
,
const
struct
atyfb_par
*
par
)
static
inline
u8
aty_ld_pll
(
int
offset
,
const
struct
atyfb_par
*
par
)
...
...
drivers/video/aty/atyfb_base.c
View file @
0fec01ba
...
@@ -267,8 +267,11 @@ static unsigned long phys_size[FB_MAX] __initdata = { 0, };
...
@@ -267,8 +267,11 @@ static unsigned long phys_size[FB_MAX] __initdata = { 0, };
static
unsigned
long
phys_guiregbase
[
FB_MAX
]
__initdata
=
{
0
,
};
static
unsigned
long
phys_guiregbase
[
FB_MAX
]
__initdata
=
{
0
,
};
#endif
#endif
#ifdef CONFIG_FB_ATY_GX
static
char
m64n_gx
[]
__initdata
=
"mach64GX (ATI888GX00)"
;
static
char
m64n_gx
[]
__initdata
=
"mach64GX (ATI888GX00)"
;
static
char
m64n_cx
[]
__initdata
=
"mach64CX (ATI888CX00)"
;
static
char
m64n_cx
[]
__initdata
=
"mach64CX (ATI888CX00)"
;
#endif
/* CONFIG_FB_ATY_GX */
#ifdef CONFIG_FB_ATY_CT
static
char
m64n_ct
[]
__initdata
=
"mach64CT (ATI264CT)"
;
static
char
m64n_ct
[]
__initdata
=
"mach64CT (ATI264CT)"
;
static
char
m64n_et
[]
__initdata
=
"mach64ET (ATI264ET)"
;
static
char
m64n_et
[]
__initdata
=
"mach64ET (ATI264ET)"
;
static
char
m64n_vta3
[]
__initdata
=
"mach64VTA3 (ATI264VT)"
;
static
char
m64n_vta3
[]
__initdata
=
"mach64VTA3 (ATI264VT)"
;
...
@@ -292,7 +295,7 @@ static char m64n_ltp_a[] __initdata = "3D RAGE LT PRO (AGP)";
...
@@ -292,7 +295,7 @@ static char m64n_ltp_a[] __initdata = "3D RAGE LT PRO (AGP)";
static
char
m64n_ltp_p
[]
__initdata
=
"3D RAGE LT PRO (PCI)"
;
static
char
m64n_ltp_p
[]
__initdata
=
"3D RAGE LT PRO (PCI)"
;
static
char
m64n_mob_p
[]
__initdata
=
"3D RAGE Mobility (PCI)"
;
static
char
m64n_mob_p
[]
__initdata
=
"3D RAGE Mobility (PCI)"
;
static
char
m64n_mob_a
[]
__initdata
=
"3D RAGE Mobility (AGP)"
;
static
char
m64n_mob_a
[]
__initdata
=
"3D RAGE Mobility (AGP)"
;
#endif
/* CONFIG_FB_ATY_CT */
static
struct
{
static
struct
{
u16
pci_id
,
chip_type
;
u16
pci_id
,
chip_type
;
...
@@ -424,12 +427,16 @@ static struct {
...
@@ -424,12 +427,16 @@ static struct {
};
};
static
char
ram_dram
[]
__initdata
=
"DRAM"
;
static
char
ram_dram
[]
__initdata
=
"DRAM"
;
#ifdef CONFIG_FB_ATY_GX
static
char
ram_vram
[]
__initdata
=
"VRAM"
;
static
char
ram_vram
[]
__initdata
=
"VRAM"
;
#endif
/* CONFIG_FB_ATY_GX */
#ifdef CONFIG_FB_ATY_CT
static
char
ram_edo
[]
__initdata
=
"EDO"
;
static
char
ram_edo
[]
__initdata
=
"EDO"
;
static
char
ram_sdram
[]
__initdata
=
"SDRAM"
;
static
char
ram_sdram
[]
__initdata
=
"SDRAM"
;
static
char
ram_sgram
[]
__initdata
=
"SGRAM"
;
static
char
ram_sgram
[]
__initdata
=
"SGRAM"
;
static
char
ram_wram
[]
__initdata
=
"WRAM"
;
static
char
ram_wram
[]
__initdata
=
"WRAM"
;
static
char
ram_off
[]
__initdata
=
"OFF"
;
static
char
ram_off
[]
__initdata
=
"OFF"
;
#endif
/* CONFIG_FB_ATY_CT */
static
char
ram_resv
[]
__initdata
=
"RESV"
;
static
char
ram_resv
[]
__initdata
=
"RESV"
;
static
u32
pseudo_palette
[
17
];
static
u32
pseudo_palette
[
17
];
...
@@ -2600,11 +2607,11 @@ int __init atyfb_init(void)
...
@@ -2600,11 +2607,11 @@ int __init atyfb_init(void)
* Map the video memory (physical address given) to somewhere in the
* Map the video memory (physical address given) to somewhere in the
* kernel address space.
* kernel address space.
*/
*/
info
->
screen_base
=
info
->
screen_base
=
(
unsigned
long
)
ioremap
(
phys_vmembase
[
m64_num
],
ioremap
(
phys_vmembase
[
m64_num
],
phys_size
[
m64_num
]);
phys_size
[
m64_num
]);
info
->
fix
.
smem_start
=
info
->
screen_base
;
/* Fake! */
info
->
fix
.
smem_start
=
info
->
screen_base
;
/* Fake! */
par
->
ati_regbase
=
par
->
ati_regbase
=
(
unsigned
long
)
ioremap
(
phys_guiregbase
[
m64_num
],
ioremap
(
phys_guiregbase
[
m64_num
],
0x10000
)
+
0xFC00ul
;
0x10000
)
+
0xFC00ul
;
info
->
fix
.
mmio_start
=
par
->
ati_regbase
;
/* Fake! */
info
->
fix
.
mmio_start
=
par
->
ati_regbase
;
/* Fake! */
aty_st_le32
(
CLOCK_CNTL
,
0x12345678
,
info
);
aty_st_le32
(
CLOCK_CNTL
,
0x12345678
,
info
);
...
@@ -2825,10 +2832,17 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
...
@@ -2825,10 +2832,17 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
aty_st_8
(
DAC_CNTL
,
i
,
par
);
aty_st_8
(
DAC_CNTL
,
i
,
par
);
aty_st_8
(
DAC_MASK
,
0xff
,
par
);
aty_st_8
(
DAC_MASK
,
0xff
,
par
);
scale
=
(
M64_HAS
(
INTEGRATED
)
&&
par
->
crtc
.
bpp
==
16
)
?
3
:
0
;
scale
=
(
M64_HAS
(
INTEGRATED
)
&&
par
->
crtc
.
bpp
==
16
)
?
3
:
0
;
#ifdef CONFIG_ATARI
out_8
(
&
par
->
aty_cmap_regs
->
windex
,
regno
<<
scale
);
out_8
(
&
par
->
aty_cmap_regs
->
lut
,
red
);
out_8
(
&
par
->
aty_cmap_regs
->
lut
,
green
);
out_8
(
&
par
->
aty_cmap_regs
->
lut
,
blue
);
#else
writeb
(
regno
<<
scale
,
&
par
->
aty_cmap_regs
->
windex
);
writeb
(
regno
<<
scale
,
&
par
->
aty_cmap_regs
->
windex
);
writeb
(
red
,
&
par
->
aty_cmap_regs
->
lut
);
writeb
(
red
,
&
par
->
aty_cmap_regs
->
lut
);
writeb
(
green
,
&
par
->
aty_cmap_regs
->
lut
);
writeb
(
green
,
&
par
->
aty_cmap_regs
->
lut
);
writeb
(
blue
,
&
par
->
aty_cmap_regs
->
lut
);
writeb
(
blue
,
&
par
->
aty_cmap_regs
->
lut
);
#endif
if
(
regno
<
16
)
if
(
regno
<
16
)
switch
(
par
->
crtc
.
bpp
)
{
switch
(
par
->
crtc
.
bpp
)
{
case
16
:
case
16
:
...
...
drivers/video/macfb.c
View file @
0fec01ba
...
@@ -184,15 +184,15 @@ static int valkyrie_setpalette (unsigned int regno, unsigned int red,
...
@@ -184,15 +184,15 @@ static int valkyrie_setpalette (unsigned int regno, unsigned int red,
cli
();
cli
();
/* tell clut which address to fill */
/* tell clut which address to fill */
writeb
(
regno
,
&
valkyrie_cmap_regs
->
addr
);
nubus_
writeb
(
regno
,
&
valkyrie_cmap_regs
->
addr
);
nop
();
nop
();
/* send one color channel at a time */
/* send one color channel at a time */
writeb
(
red
,
&
valkyrie_cmap_regs
->
lut
);
nubus_
writeb
(
red
,
&
valkyrie_cmap_regs
->
lut
);
nop
();
nop
();
writeb
(
green
,
&
valkyrie_cmap_regs
->
lut
);
nubus_
writeb
(
green
,
&
valkyrie_cmap_regs
->
lut
);
nop
();
nop
();
writeb
(
blue
,
&
valkyrie_cmap_regs
->
lut
);
nubus_
writeb
(
blue
,
&
valkyrie_cmap_regs
->
lut
);
restore_flags
(
flags
);
restore_flags
(
flags
);
...
@@ -224,25 +224,25 @@ static int dafb_setpalette (unsigned int regno, unsigned int red,
...
@@ -224,25 +224,25 @@ static int dafb_setpalette (unsigned int regno, unsigned int red,
int
i
;
int
i
;
/* Stab in the dark trying to reset the CLUT pointer */
/* Stab in the dark trying to reset the CLUT pointer */
writel
(
0
,
&
dafb_cmap_regs
->
reset
);
nubus_
writel
(
0
,
&
dafb_cmap_regs
->
reset
);
nop
();
nop
();
/* Loop until we get to the register we want */
/* Loop until we get to the register we want */
for
(
i
=
0
;
i
<
regno
;
i
++
)
{
for
(
i
=
0
;
i
<
regno
;
i
++
)
{
writeb
(
palette
[
i
].
red
>>
8
,
&
dafb_cmap_regs
->
lut
);
nubus_
writeb
(
palette
[
i
].
red
>>
8
,
&
dafb_cmap_regs
->
lut
);
nop
();
nop
();
writeb
(
palette
[
i
].
green
>>
8
,
&
dafb_cmap_regs
->
lut
);
nubus_
writeb
(
palette
[
i
].
green
>>
8
,
&
dafb_cmap_regs
->
lut
);
nop
();
nop
();
writeb
(
palette
[
i
].
blue
>>
8
,
&
dafb_cmap_regs
->
lut
);
nubus_
writeb
(
palette
[
i
].
blue
>>
8
,
&
dafb_cmap_regs
->
lut
);
nop
();
nop
();
}
}
}
}
writeb
(
red
,
&
dafb_cmap_regs
->
lut
);
nubus_
writeb
(
red
,
&
dafb_cmap_regs
->
lut
);
nop
();
nop
();
writeb
(
green
,
&
dafb_cmap_regs
->
lut
);
nubus_
writeb
(
green
,
&
dafb_cmap_regs
->
lut
);
nop
();
nop
();
writeb
(
blue
,
&
dafb_cmap_regs
->
lut
);
nubus_
writeb
(
blue
,
&
dafb_cmap_regs
->
lut
);
restore_flags
(
flags
);
restore_flags
(
flags
);
...
@@ -274,12 +274,12 @@ static int v8_brazil_setpalette (unsigned int regno, unsigned int red,
...
@@ -274,12 +274,12 @@ static int v8_brazil_setpalette (unsigned int regno, unsigned int red,
In 2bpp, the regnos are 0x3f, 0x7f, 0xbf, 0xff */
In 2bpp, the regnos are 0x3f, 0x7f, 0xbf, 0xff */
_regno
=
(
regno
<<
(
8
-
info
->
var
.
bits_per_pixel
))
|
(
0xFF
>>
info
->
var
.
vits_per_pixel
);
_regno
=
(
regno
<<
(
8
-
info
->
var
.
bits_per_pixel
))
|
(
0xFF
>>
info
->
var
.
vits_per_pixel
);
writeb
(
_regno
,
&
v8_brazil_cmap_regs
->
addr
);
nop
();
nubus_
writeb
(
_regno
,
&
v8_brazil_cmap_regs
->
addr
);
nop
();
/* send one color channel at a time */
/* send one color channel at a time */
writeb
(
_red
,
&
v8_brazil_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_red
,
&
v8_brazil_cmap_regs
->
lut
);
nop
();
writeb
(
_green
,
&
v8_brazil_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_green
,
&
v8_brazil_cmap_regs
->
lut
);
nop
();
writeb
(
_blue
,
&
v8_brazil_cmap_regs
->
lut
);
nubus_
writeb
(
_blue
,
&
v8_brazil_cmap_regs
->
lut
);
restore_flags
(
flags
);
restore_flags
(
flags
);
...
@@ -308,15 +308,15 @@ static int rbv_setpalette (unsigned int regno, unsigned int red,
...
@@ -308,15 +308,15 @@ static int rbv_setpalette (unsigned int regno, unsigned int red,
_regno
=
regno
+
(
256
-
(
1
<<
info
->
var
.
bits_per_pixel
));
_regno
=
regno
+
(
256
-
(
1
<<
info
->
var
.
bits_per_pixel
));
/* reset clut? (VideoToolbox sez "not necessary") */
/* reset clut? (VideoToolbox sez "not necessary") */
writeb
(
0xFF
,
&
rbv_cmap_regs
->
cntl
);
nop
();
nubus_
writeb
(
0xFF
,
&
rbv_cmap_regs
->
cntl
);
nop
();
/* tell clut which address to use. */
/* tell clut which address to use. */
writeb
(
_regno
,
&
rbv_cmap_regs
->
addr
);
nop
();
nubus_
writeb
(
_regno
,
&
rbv_cmap_regs
->
addr
);
nop
();
/* send one color channel at a time. */
/* send one color channel at a time. */
writeb
(
_red
,
&
rbv_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_red
,
&
rbv_cmap_regs
->
lut
);
nop
();
writeb
(
_green
,
&
rbv_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_green
,
&
rbv_cmap_regs
->
lut
);
nop
();
writeb
(
_blue
,
&
rbv_cmap_regs
->
lut
);
nubus_
writeb
(
_blue
,
&
rbv_cmap_regs
->
lut
);
restore_flags
(
flags
);
restore_flags
(
flags
);
/* done. */
/* done. */
...
@@ -340,10 +340,10 @@ static int mdc_setpalette(unsigned int regno, unsigned int red,
...
@@ -340,10 +340,10 @@ static int mdc_setpalette(unsigned int regno, unsigned int red,
cli
();
cli
();
/* the nop's are there to order writes. */
/* the nop's are there to order writes. */
writeb
(
_regno
,
&
cmap_regs
->
addr
);
nop
();
nubus_
writeb
(
_regno
,
&
cmap_regs
->
addr
);
nop
();
writeb
(
_red
,
&
cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_red
,
&
cmap_regs
->
lut
);
nop
();
writeb
(
_green
,
&
cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_green
,
&
cmap_regs
->
lut
);
nop
();
writeb
(
_blue
,
&
cmap_regs
->
lut
);
nubus_
writeb
(
_blue
,
&
cmap_regs
->
lut
);
restore_flags
(
flags
);
restore_flags
(
flags
);
return
0
;
return
0
;
...
@@ -365,10 +365,10 @@ static int toby_setpalette(unsigned int regno, unsigned int red,
...
@@ -365,10 +365,10 @@ static int toby_setpalette(unsigned int regno, unsigned int red,
save_flags
(
flags
);
save_flags
(
flags
);
cli
();
cli
();
writeb
(
_regno
,
&
cmap_regs
->
addr
);
nop
();
nubus_
writeb
(
_regno
,
&
cmap_regs
->
addr
);
nop
();
writeb
(
_red
,
&
cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_red
,
&
cmap_regs
->
lut
);
nop
();
writeb
(
_green
,
&
cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_green
,
&
cmap_regs
->
lut
);
nop
();
writeb
(
_blue
,
&
cmap_regs
->
lut
);
nubus_
writeb
(
_blue
,
&
cmap_regs
->
lut
);
restore_flags
(
flags
);
restore_flags
(
flags
);
return
0
;
return
0
;
...
@@ -389,10 +389,10 @@ static int jet_setpalette(unsigned int regno, unsigned int red,
...
@@ -389,10 +389,10 @@ static int jet_setpalette(unsigned int regno, unsigned int red,
save_flags
(
flags
);
save_flags
(
flags
);
cli
();
cli
();
writeb
(
regno
,
&
cmap_regs
->
addr
);
nop
();
nubus_
writeb
(
regno
,
&
cmap_regs
->
addr
);
nop
();
writeb
(
_red
,
&
cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_red
,
&
cmap_regs
->
lut
);
nop
();
writeb
(
_green
,
&
cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
_green
,
&
cmap_regs
->
lut
);
nop
();
writeb
(
_blue
,
&
cmap_regs
->
lut
);
nubus_
writeb
(
_blue
,
&
cmap_regs
->
lut
);
restore_flags
(
flags
);
restore_flags
(
flags
);
return
0
;
return
0
;
...
@@ -428,7 +428,7 @@ static int civic_setpalette (unsigned int regno, unsigned int red,
...
@@ -428,7 +428,7 @@ static int civic_setpalette (unsigned int regno, unsigned int red,
/*
/*
* Set the register address
* Set the register address
*/
*/
writeb
(
regno
,
&
civic_cmap_regs
->
addr
);
nop
();
nubus_
writeb
(
regno
,
&
civic_cmap_regs
->
addr
);
nop
();
/*
/*
* Wait for VBL interrupt here;
* Wait for VBL interrupt here;
...
@@ -453,42 +453,42 @@ static int civic_setpalette (unsigned int regno, unsigned int red,
...
@@ -453,42 +453,42 @@ static int civic_setpalette (unsigned int regno, unsigned int red,
* Grab a status word and do some checking;
* Grab a status word and do some checking;
* Then finally write the clut!
* Then finally write the clut!
*/
*/
clut_status
=
readb
(
&
civic_cmap_regs
->
status2
);
clut_status
=
nubus_
readb
(
&
civic_cmap_regs
->
status2
);
if
((
clut_status
&
0x0008
)
==
0
)
if
((
clut_status
&
0x0008
)
==
0
)
{
{
#if 0
#if 0
if ((clut_status & 0x000D) != 0)
if ((clut_status & 0x000D) != 0)
{
{
writeb(0x00, &civic_cmap_regs->lut); nop();
nubus_
writeb(0x00, &civic_cmap_regs->lut); nop();
writeb(0x00, &civic_cmap_regs->lut); nop();
nubus_
writeb(0x00, &civic_cmap_regs->lut); nop();
}
}
#endif
#endif
writeb
(
red
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
red
,
&
civic_cmap_regs
->
lut
);
nop
();
writeb
(
green
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
green
,
&
civic_cmap_regs
->
lut
);
nop
();
writeb
(
blue
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
blue
,
&
civic_cmap_regs
->
lut
);
nop
();
writeb
(
0x00
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
0x00
,
&
civic_cmap_regs
->
lut
);
nop
();
}
}
else
else
{
{
unsigned
char
junk
;
unsigned
char
junk
;
junk
=
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
junk
=
nubus_
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
junk
=
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
junk
=
nubus_
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
junk
=
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
junk
=
nubus_
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
junk
=
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
junk
=
nubus_
readb
(
&
civic_cmap_regs
->
lut
);
nop
();
if
((
clut_status
&
0x000D
)
!=
0
)
if
((
clut_status
&
0x000D
)
!=
0
)
{
{
writeb
(
0x00
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
0x00
,
&
civic_cmap_regs
->
lut
);
nop
();
writeb
(
0x00
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
0x00
,
&
civic_cmap_regs
->
lut
);
nop
();
}
}
writeb
(
red
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
red
,
&
civic_cmap_regs
->
lut
);
nop
();
writeb
(
green
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
green
,
&
civic_cmap_regs
->
lut
);
nop
();
writeb
(
blue
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
blue
,
&
civic_cmap_regs
->
lut
);
nop
();
writeb
(
junk
,
&
civic_cmap_regs
->
lut
);
nop
();
nubus_
writeb
(
junk
,
&
civic_cmap_regs
->
lut
);
nop
();
}
}
restore_flags
(
flags
);
restore_flags
(
flags
);
...
@@ -641,7 +641,7 @@ void __init macfb_init(void)
...
@@ -641,7 +641,7 @@ void __init macfb_init(void)
macfb_fix
.
line_length
=
mac_bi_data
.
videorow
;
macfb_fix
.
line_length
=
mac_bi_data
.
videorow
;
macfb_fix
.
smem_len
=
macfb_fix
.
line_length
*
macfb_defined
.
yres
;
macfb_fix
.
smem_len
=
macfb_fix
.
line_length
*
macfb_defined
.
yres
;
/* Note: physical address (since 2.1.127) */
/* Note: physical address (since 2.1.127) */
macfb_fix
.
smem_start
=
(
void
*
)
mac_bi_data
.
videoaddr
;
macfb_fix
.
smem_start
=
mac_bi_data
.
videoaddr
;
/* This is actually redundant with the initial mappings.
/* This is actually redundant with the initial mappings.
However, there are some non-obvious aspects to the way
However, there are some non-obvious aspects to the way
those mappings are set up, so this is in fact the safest
those mappings are set up, so this is in fact the safest
...
@@ -649,7 +649,7 @@ void __init macfb_init(void)
...
@@ -649,7 +649,7 @@ void __init macfb_init(void)
Mac */
Mac */
fb_info
.
screen_base
=
ioremap
(
mac_bi_data
.
videoaddr
,
macfb_fix
.
smem_len
);
fb_info
.
screen_base
=
ioremap
(
mac_bi_data
.
videoaddr
,
macfb_fix
.
smem_len
);
printk
(
"macfb: framebuffer at 0x%
p
, mapped to 0x%p, size %dk
\n
"
,
printk
(
"macfb: framebuffer at 0x%
08lx
, mapped to 0x%p, size %dk
\n
"
,
macfb_fix
.
smem_start
,
fb_info
.
screen_base
,
macfb_fix
.
smem_len
/
1024
);
macfb_fix
.
smem_start
,
fb_info
.
screen_base
,
macfb_fix
.
smem_len
/
1024
);
printk
(
"macfb: mode is %dx%dx%d, linelength=%d
\n
"
,
printk
(
"macfb: mode is %dx%dx%d, linelength=%d
\n
"
,
macfb_defined
.
xres
,
macfb_defined
.
yres
/
,
macfb_defined
.
bits_per_pixel
,
macfb_fix
.
line_length
);
macfb_defined
.
xres
,
macfb_defined
.
yres
/
,
macfb_defined
.
bits_per_pixel
,
macfb_fix
.
line_length
);
...
...
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