forked from luck/tmp_suning_uos_patched
viafb: yet another dead code removal
Remove some functions that were never executed and a related undocumented module parameter. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Joseph Chan <JosephChan@via.com.tw> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c5f06f5cdd
commit
d8566b29e8
@ -4,4 +4,4 @@
|
||||
|
||||
obj-$(CONFIG_FB_VIA) += viafb.o
|
||||
|
||||
viafb-y :=viafbdev.o hw.o iface.o via_i2c.o dvi.o lcd.o ioctl.o accel.o via_utility.o vt1636.o global.o tblDPASetting.o viamode.o tbl1636.o
|
||||
viafb-y :=viafbdev.o hw.o via_i2c.o dvi.o lcd.o ioctl.o accel.o via_utility.o vt1636.o global.o tblDPASetting.o viamode.o tbl1636.o
|
||||
|
@ -23,7 +23,6 @@ int viafb_platform_epia_dvi = STATE_OFF;
|
||||
int viafb_device_lcd_dualedge = STATE_OFF;
|
||||
int viafb_bus_width = 12;
|
||||
int viafb_display_hardware_layout = HW_LAYOUT_LCD_DVI;
|
||||
int viafb_memsize;
|
||||
int viafb_DeviceStatus = CRT_Device;
|
||||
int viafb_hotplug;
|
||||
int viafb_refresh = 60;
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#include "iface.h"
|
||||
#include "viafbdev.h"
|
||||
#include "chip.h"
|
||||
#include "accel.h"
|
||||
|
@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
|
||||
* Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
|
||||
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* either version 2, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE.See the GNU General Public License
|
||||
* for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
|
||||
/* Get frame buffer size from VGA BIOS */
|
||||
|
||||
unsigned int viafb_get_memsize(void)
|
||||
{
|
||||
unsigned int m;
|
||||
|
||||
/* If memory size provided by user */
|
||||
if (viafb_memsize)
|
||||
m = viafb_memsize * Mb;
|
||||
else {
|
||||
m = (unsigned int)viafb_read_reg(VIASR, SR39);
|
||||
m = m * (4 * Mb);
|
||||
|
||||
if ((m < (16 * Mb)) || (m > (64 * Mb)))
|
||||
m = 16 * Mb;
|
||||
}
|
||||
DEBUG_MSG(KERN_INFO "framebuffer size = %d Mb\n", m / Mb);
|
||||
return m;
|
||||
}
|
||||
|
||||
/* Get Video Buffer Starting Physical Address(back door)*/
|
||||
|
||||
unsigned long viafb_get_videobuf_addr(void)
|
||||
{
|
||||
struct pci_dev *pdev = NULL;
|
||||
unsigned char sys_mem;
|
||||
unsigned char video_mem;
|
||||
unsigned long sys_mem_size;
|
||||
unsigned long video_mem_size;
|
||||
/*system memory = 256 MB, video memory 64 MB */
|
||||
unsigned long vmem_starting_adr = 0x0C000000;
|
||||
|
||||
pdev =
|
||||
(struct pci_dev *)pci_get_device(VIA_K800_BRIDGE_VID,
|
||||
VIA_K800_BRIDGE_DID, NULL);
|
||||
if (pdev != NULL) {
|
||||
pci_read_config_byte(pdev, VIA_K800_SYSTEM_MEMORY_REG,
|
||||
&sys_mem);
|
||||
pci_read_config_byte(pdev, VIA_K800_VIDEO_MEMORY_REG,
|
||||
&video_mem);
|
||||
video_mem = (video_mem & 0x70) >> 4;
|
||||
sys_mem_size = ((unsigned long)sys_mem) << 24;
|
||||
if (video_mem != 0)
|
||||
video_mem_size = (1 << (video_mem)) * 1024 * 1024;
|
||||
else
|
||||
video_mem_size = 0;
|
||||
|
||||
vmem_starting_adr = sys_mem_size - video_mem_size;
|
||||
pci_dev_put(pdev);
|
||||
}
|
||||
|
||||
DEBUG_MSG(KERN_INFO "Video Memory Starting Address = %lx \n",
|
||||
vmem_starting_adr);
|
||||
return vmem_starting_adr;
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
|
||||
* Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
|
||||
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* either version 2, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE.See the GNU General Public License
|
||||
* for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IFACE_H__
|
||||
#define __IFACE_H__
|
||||
|
||||
#define Kb (1024)
|
||||
#define Mb (Kb*Kb)
|
||||
|
||||
#define VIA_K800_BRIDGE_VID 0x1106
|
||||
#define VIA_K800_BRIDGE_DID 0x3204
|
||||
|
||||
#define VIA_K800_SYSTEM_MEMORY_REG 0x47
|
||||
#define VIA_K800_VIDEO_MEMORY_REG 0xA1
|
||||
|
||||
extern int viafb_memsize;
|
||||
unsigned int viafb_get_memsize(void);
|
||||
unsigned long viafb_get_videobuf_addr(void);
|
||||
|
||||
#endif /* __IFACE_H__ */
|
@ -2215,8 +2215,6 @@ module_init(viafb_init);
|
||||
module_exit(viafb_exit);
|
||||
|
||||
#ifdef MODULE
|
||||
module_param(viafb_memsize, int, S_IRUSR);
|
||||
|
||||
module_param(viafb_mode, charp, S_IRUSR);
|
||||
MODULE_PARM_DESC(viafb_mode, "Set resolution (default=640x480)");
|
||||
|
||||
|
@ -91,7 +91,6 @@ extern int viafb_LCD2_ON;
|
||||
extern int viafb_LCD_ON;
|
||||
extern int viafb_DVI_ON;
|
||||
extern int viafb_hotplug;
|
||||
extern int viafb_memsize;
|
||||
|
||||
extern int strict_strtoul(const char *cp, unsigned int base,
|
||||
unsigned long *res);
|
||||
|
Loading…
Reference in New Issue
Block a user