summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb/XGI_main_26.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: xgifb: main: use readb()/readw() to access iomapped memoryAaro Koskinen2011-09-161-32/+22
| | | | | | | | | | | | | | | | | | | | Use readb()/readw() instead of direct pointer access to read I/O mapped memory and also add __iomem annotation. The patch eliminates the following sparse warnings: drivers/staging/xgifb/XGI_main_26.c:2125:35: warning: incorrect type in assignment (different address spaces) drivers/staging/xgifb/XGI_main_26.c:2125:35: expected char *[addressable] [toplevel] [assigned] mmio_vbase drivers/staging/xgifb/XGI_main_26.c:2125:35: got void [noderef] <asn:2>* drivers/staging/xgifb/XGI_main_26.c:2439:31: warning: incorrect type in argument 1 (different address spaces) drivers/staging/xgifb/XGI_main_26.c:2439:31: expected void volatile [noderef] <asn:2>*addr drivers/staging/xgifb/XGI_main_26.c:2439:31: got char *[addressable] [toplevel] [assigned] mmio_vbase drivers/staging/xgifb/XGI_main_26.c:2463:31: warning: incorrect type in argument 1 (different address spaces) drivers/staging/xgifb/XGI_main_26.c:2463:31: expected void volatile [noderef] <asn:2>*addr drivers/staging/xgifb/XGI_main_26.c:2463:31: got char *[addressable] [toplevel] [assigned] mmio_vbase Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete redundant casts from mtrr_add() callAaro Koskinen2011-09-121-4/+2
| | | | | | | Delete redundant casts from mtrr_add() call. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: fix up MTRR printkAaro Koskinen2011-09-121-2/+2
| | | | | | | The condition for printk() is wrong. Also change it to dev_info(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: properly delete MTRR regionAaro Koskinen2011-09-121-1/+12
| | | | | | | MTRR region should be deleted on probe failure and driver removal. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: use common init for module and built-inAaro Koskinen2011-09-061-10/+0
| | | | | | | Use a common init function for module and built-in driver. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* stating: xgifb: update module parameter descriptionsAaro Koskinen2011-09-061-6/+4
| | | | | | | Remove incorrect/misleading text from parameter descriptions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete all references to mode "none"Aaro Koskinen2011-09-061-11/+5
| | | | | | | | Delete all references to mode "none". It should be handled like any other invalid mode. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: simplify default mode setupAaro Koskinen2011-09-061-13/+5
| | | | | | | | The default mode is the same regardless of the display type, except for XG21/LCD which is determined dynamically. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: fail the probe if no supported LCD video mode foundAaro Koskinen2011-09-061-1/+6
| | | | | | | | Fail the probe if the LCD resolution described in card firmware does not match any of the supported modes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete duplicated default video mode setup codeAaro Koskinen2011-09-061-12/+0
| | | | | | | | The code for determining the default video mode is unnecessarily duplicated in XGIfb_search_mode() and XGIfb_search_vesamode() functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: XGIfb_search_mode(): delete unreachable codeAaro Koskinen2011-09-061-11/+0
| | | | | | | XGIfb_search_mode() is always called with a valid string pointer. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: search video mode later in probeAaro Koskinen2011-09-061-10/+11
| | | | | | | | When searching the video mode, some HW details needs to be known. Therefore it's not possible to do that reliably before probe(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: fix LVDS LCD resolution data setupAaro Koskinen2011-09-061-9/+16
| | | | | | | | | | | | | If the driver fails to get LVDS LCD data from the firmware, it falls back to using driver's hardcoded values. However, this is done too early in the probe. The selected video mode index is not yet known, and also in some cases it could be defaulting to -1 resulting in a read outside the array. Fix this by moving the array lookup after the video mode validation. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: check and report invalid option valuesAaro Koskinen2011-09-061-11/+17
| | | | | | | | Check option values with kstrtoul(). This will also eliminate some checkpatch warnings about simple_strtoul() usage. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: XGIfb_setup(): delete redundant assignmentAaro Koskinen2011-09-061-2/+0
| | | | | | | The global data is already initialized to zero. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: XGIfb_setup(): clean up driver messagesAaro Koskinen2011-09-061-5/+2
| | | | | | | Print options only if they are given. Delete other messages. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete "off" option handlingAaro Koskinen2011-09-061-5/+0
| | | | | | | | | | | | | | It's possible to disable the built-in xgifb driver with the kernel command line option: video=xgifb:off This is already handled by the generic framebuffer layer (fb_get_options() will return TRUE resulting in init failure), so no need to process the option in the driver. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete duplicated codeAaro Koskinen2011-09-061-5/+0
| | | | | | | Delete redundant branches for "mode" and "vesa" options. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: fix ypan disable optionAaro Koskinen2011-09-061-4/+0
| | | | | | | | Setting any of the FB options will disable ypan as a side effect. It should be disabled only by the "noypan" option. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete unused module parameters and optionsAaro Koskinen2011-09-061-114/+0
| | | | | | | Delete parameters which have no effect. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete an empty stringAaro Koskinen2011-08-241-2/+0
| | | | | | | | Delete a string which is always empty. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete driver version informationAaro Koskinen2011-08-241-3/+0
| | | | | | | | Delete version information, it's just noise and serves no purpose. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete write-only variablesAaro Koskinen2011-08-241-10/+0
| | | | | | | | Delete couple write-only variables. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: replace video_type with FB_TYPE_PACKED_PIXELSAaro Koskinen2011-08-231-1/+1
| | | | | | | | Replace a global variable with a constant. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: probe: delete checks for mode "none"Aaro Koskinen2011-08-231-253/+246
| | | | | | | | | The driver does not allow selecting the mode "none", so no need to check for that in probe. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: eliminate #ifdef XGIFB_PANAaro Koskinen2011-08-231-12/+0
| | | | | | | | XGIFB_PAN is always defined and checks can be eliminated. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete unused definitionsAaro Koskinen2011-08-231-2/+0
| | | | | | | | Delete some more unused definitions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: xgifb: Delete define XGIINITSTATIC in XGI_main_26.c and XGI_main.hRuslan Pisarev2011-08-231-2/+2
| | | | | | | This is a patch to the XGI_main.h and XGI_main_26.c file that fixed up a define warrning found by the checkpatch.pl tools. Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" ↵Ruslan Pisarev2011-08-231-13/+13
| | | | | | | | | in XGI_main_26.c This is a patch to the XGI_main_26.c file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools. Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Remove unneeded version.h includes from drivers/staging/xgifb/Jesper Juhl2011-07-051-1/+0
| | | | | | | | | It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/staging/xgifb/. This patch removes them. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: xgifb: Fixed style issues.Kenji Toyama2011-04-261-160/+278
| | | | | | | | | | | | | Not all warnings/errors were silenced, some of them are related to simple printk() messages that imho should not be split across multiple lines (it makes it harder to grep for example), and some of them are related to long lines that are pretty much impossible to split without proper code refactoring. Resubmitting this patch because of conflicts. Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: main: make internal functions staticAaro Koskinen2011-04-251-2/+2
| | | | | | | Make remaining non-static internal functions static. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: main: delete unused functionsAaro Koskinen2011-04-251-177/+0
| | | | | | | Delete unused/dead code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: main: delete redudant extern declarationsAaro Koskinen2011-04-251-0/+2
| | | | | | | Delete redudant declarations and include proper .h files. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: main: move functions to avoid forward declarationsAaro Koskinen2011-04-251-300/+299
| | | | | | | | Move functions so that all forward declarations of internal functions can be deleted. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete unused register I/O functionsAaro Koskinen2011-04-251-13/+0
| | | | | | | Delete unused register I/O functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: replace setXGIIDXREG() with xgifb_reg_and_or()Aaro Koskinen2011-04-251-4/+4
| | | | | | | Replace setXGIIDXREG() with xgifb_reg_and_or(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: replace andXGIIDXREG() with xgifb_reg_and()Aaro Koskinen2011-04-251-5/+5
| | | | | | | Replace andXGIIDXREG() with xgifb_reg_and(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: replace orXGIIDXREG() with xgifb_reg_or()Aaro Koskinen2011-04-251-10/+10
| | | | | | | Replace orXGIIDXREG() with xgifb_reg_or(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: replace outXGIIDXREG() with xgifb_reg_set()Aaro Koskinen2011-04-251-81/+81
| | | | | | | Replace outXGIIDXREG() with xgifb_reg_set(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: replace inXGIIDXREG() with xgifb_reg_get()Aaro Koskinen2011-04-251-36/+36
| | | | | | | Replace inXGIIDXREG() with xgifb_reg_get(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: replace outXGIREG() with outb()Aaro Koskinen2011-04-251-8/+8
| | | | | | | Replace outXGIREG() with outb(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: rename XGINew_SetReg1() to xgifb_reg_set()Aaro Koskinen2011-03-141-1/+1
| | | | | | | Rename XGINew_SetReg1() to xgifb_reg_set(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete incorrect I/O mappingAaro Koskinen2011-03-141-7/+0
| | | | | | | | | | | If the PCI device was disabled when the probe() routine started, the driver will create 256 MB video memory mapping which is never used or properly released. It's also unsafe as the size is incorrect for many video cards. Deleting it also allows eliminating XGIvga_enable global variable. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete redundant extended register access enableAaro Koskinen2011-03-141-4/+0
| | | | | | | | | The extended register access enable in !XGIvga_enabled case is not needed. The driver has enabled the access unconditionally already earlier in the routine. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete unused LINUXBIOS codeAaro Koskinen2011-03-141-27/+0
| | | | | | | Delete unused LINUXBIOS code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: eliminate redudant chip type >= XG40 checksAaro Koskinen2011-03-141-4/+1
| | | | | | | | Since all chips supported by the driver are >= XG40, these checks are redundant and the code can be modified accordingly. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete unsupported chip typesAaro Koskinen2011-03-141-26/+5
| | | | | | | | The probe routine will fail if the chip is other than XG40..XG27, so the other types can be dropped. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete nomax module parameterAaro Koskinen2011-03-091-9/+0
| | | | | | | The parameter is not used. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: xgifb: delete bIntegratedMMEnabledAaro Koskinen2011-03-091-14/+0
| | | | | | | | bIntegratedMMEnabled is always true, so the field and checks can be eliminated. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud