summaryrefslogtreecommitdiff
path: root/drivers/staging/sm750fb/ddk750_chip.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-30staging: sm750fb: initialize max_d to maximum D value of 6Colin Ian King1-1/+1
max_d is not initialized and should be set to the largest D value of 6. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-21staging: sm750fb: move MHz() and roundedDiv() close to their usageMike Rapoport1-0/+4
The MHz() and roundedDiv macros are used only by ddk750_chip.c, so move their definition there. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-21staging: sm750fb: replace absDiff with kernel standard abs macroMike Rapoport1-1/+2
<linux/kernel.h> already has 'abs', use it instead of custom absDiff Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: use BIT macro for DMA_ABORT_INTERRUPT single-bit fieldsMike Rapoport1-1/+1
Replace complex definition of DMA_ABORT_INTERRUPT register fields with BIT() macro and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: use BIT macro for PANEL_DISPLAY_CTRL single-bit fieldsMike Rapoport1-3/+3
Replace complex definition of PANEL_DISPLAY_CTRL register fields with BIT() macro and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: share common bits in display control registersMike Rapoport1-3/+3
The display control registers for primary and secondary display share some of the bits and those bits can be defined in a single place and then used for manipulations of the relevant registers. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: use BIT macro for VGA_CONFIGURATION single-bit fieldsMike Rapoport1-2/+1
Replace complex defintion of VGA_CONFIGURATION register fields with BIT() macro and use open-coded implementation for VGA_CONFIGURATION manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: change defintion of PANEL_PLL_CTRL multi-bit fieldsMike Rapoport1-9/+15
Use more straight-forward definitions for multi-bit field of PANEL_PLL_CTRL register and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: use BIT macro for PLL_CTRL single-bit fieldsMike Rapoport1-4/+1
Replace complex defintion of PLL_CTRL fields with BIT() macro and use open-coded implementation for PLL register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: rename PANEL_PLL_CTRL_* fields to PLL_CTRL_*Mike Rapoport1-11/+11
Several PLL control registers have the same layout and therefore the field definitions may be shared for those registers. Renaming definitions of PANEL_PLL_CTRL_* fields to more generic PLL_CTRL_* will allow reusing these definitions for other PLL control registers. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: formatPllReg: fix comment formattingMike Rapoport1-4/+6
Fix comment alignment and formatting to follow kernel coding style Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: sm750fb: formatPllReg: rename ulPllReg to regMike Rapoport1-3/+3
Remove HungarianCamelCase notation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: sm750fb: use BIT macro for MODE0_GATE single-bit fieldsMike Rapoport1-1/+1
Replace complex definition of MODE0_GATE register fields with BIT() macro and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: sm750fb: change definition of CURRENT_GATE multi-bit fieldsMike Rapoport1-10/+10
Use more straight-forward definitions for multi-bit fields of CURRENT_GATE register and use open-coded implementation for register manipulation. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: sm750fb: set{Memory, Master}Clock: rename ulReg to regMike Rapoport1-14/+14
Remove HungarianCamelCase notation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: sm750fb: use BIT macro for CURRENT_GATE single-bit fieldsMike Rapoport1-2/+1
Replace complex definition of CURRENT_GATE register fields with BIT() macro and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: sm750fb: change definition of MISC_CTRL multi-bit fieldsMike Rapoport1-1/+1
Use more straight-forward definitions for multi-bit fields of MISC_CTRL register and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: sm750fb: use BIT macro for MISC_CTRL single-bit fieldsMike Rapoport1-2/+2
Replace complex definition of MISC_CTRL register fields with BIT() macro and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: sm750fb: ddk750_initHw: rename ulReg to regMike Rapoport1-26/+26
Remove HungarianCamelCase notation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: remove unused pllcalparam typedefMike Rapoport1-7/+0
The pllcalparam type is not used and can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: simplify PLL divisors calculationsMike Rapoport1-34/+10
The calcPllValues currently uses arrays of PLL parametres that contain possible PLL control register field values and redundant data that is calculated according to those values. The usage of these arrays can be replaced with simple arithmetics. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: remove '#if 1' conditionalsMike Rapoport1-8/+5
The code enclosed in '#if 1' anyway gets compiled. Removing useless conditionals. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: sm750fb: remove some unnecessary castingsMike Rapoport1-2/+2
The clock divisor calculations in setMasterClock and setMemoryClock unnecessaryly cast unsigned int to unsigned int. Removing the casting. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: sm750fb: rename getChipClock to get_mxclk_freqMike Rapoport1-3/+3
The getChipClock is used to detect MXCLK frequency. Make it's name reflect what the function is actually doing. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: sm750fb: merge calcPLL and getPllValue into getChipClockMike Rapoport1-43/+10
The getChipClock function is used only to get MXCLK frequency, which makes most of getPllValue function unused and thus. The detection of MXCLK frequency may be implemented directly in getChipClock rendering getPllValue and calcPLL unused. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Rename miniDiffAmitoj Kaur Chawla1-4/+4
Rename miniDiff to mini_diff to avoid CamelCase. Problem found using checkpatch.pl CHECK: Avoid CamelCase: <miniDiff> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove space after opening braceAmitoj Kaur Chawla1-1/+0
Remove space after opening brace '{'. Problem found using checkpatch.pl CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove space before closing braceAmitoj Kaur Chawla1-1/+0
Remove space before closing brace '}'. Problem found using checkpatch.pl CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove space after castAmitoj Kaur Chawla1-2/+2
Remove unnecessary space after cast. Problem found using checkpatch.pl CHECK: No space is necessary after a cast Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13Staging: sm750fb: Use ARRAY_SIZE macroShraddha Barke1-2/+2
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its first element. Changes made using Coccinelle- @@ type T; T[] E; @@ - (sizeof(E)/sizeof(E[...])) + ARRAY_SIZE(E) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Remove multiple blank linesAmitoj Kaur Chawla1-7/+0
Remove multiple blank lines. Problem found using checkpatch.pl CHECK: Please don't use multiple blank lines Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Add space around ':'Amitoj Kaur Chawla1-1/+1
Add space around operator ':'. Problem found using checkpatch.pl CHECK: spaces preferred around that ':' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Add space around '?'Amitoj Kaur Chawla1-1/+1
Add space around operator '?'. Problem found using checkpatch.pl CHECK: spaces preferred around that '?' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Add space around '*'Amitoj Kaur Chawla1-2/+2
Add space around operator '*'. Problem found using checkpatch.pl CHECK: spaces preferred around that '*' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Add space around '/'Amitoj Kaur Chawla1-2/+2
Add space around operator '/'. Problem found using checkpatch.pl CHECK: spaces preferred around that '/' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30staging: sm750fb: remove unused calcPllValue2 functionMike Rapoport1-100/+0
The calcPllValue2 function is never called and therefore it can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30staging: sm750fb: staticize local functions in ddk750_chipMike Rapoport1-6/+6
Several functions in ddk750_chip are not used elsewhere, let's make them static. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: sm750fb: remove dead codeMike Rapoport1-53/+0
Remove the code enclosed in '#if 0' Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: sm750fb: replace twoToPowerOfx with shift operatorMike Rapoport1-14/+4
The function twoToPowerOfx that iteratively calculates the power of 2 may be replaced with shift operator Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: sm750fb: replace custom MB(x) macro with appropriate SZ_xMMike Rapoport1-5/+7
Use SZ_xM defined in linux/sizes.h instead of custom MB(x) macro Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15staging: sm750fb: add missing blank line after declarationsJuston Li1-0/+1
Fixes checkpatch.pl WARNING: Missing a blank line after declarations Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15staging: sm750fb: add spaces around operatorsJuston Li1-1/+1
Fixes checkpath.pl error: ERROR: spaces required around that operator Note running checkpatch.pl with '--strict' catches more of these errors along with cases where spacing is optional but preferred. Take care of these in a future patch. Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15staging: sm750fb: consistent spacing around operatorsJuston Li1-2/+2
Fixes checkpatch.pl error: ERROR: need consistent spacing around operator Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15staging: sm750fb: remove space before close parenthesisJuston Li1-1/+1
Fixes checkpatch.pl error: ERROR: space prohibited before that close parenthesis ')' Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15staging: sm750fb: remove spacing after open parenthesisJuston Li1-3/+3
Fixes checkpatch.pl warning: ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-19drivers: staging: sm750fb: Fix "'foo * bar' should be 'foo *bar'" errorsGreg Donald1-1/+1
Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13staging: sm750fb: fix c99 commentsJuston Li1-9/+2
fixed all checkpatch.pl ERROR: do not use C99 // comments Any C99 comments used to comment out code are simply removed. Also some of the errors occur inside '#if 0' blocks which I might as well fix since checkpatch.pl caught them but the blocks themselves should probably be cleaned up later. Changes since v1: close a comment block Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31Staging: sm750fb: Replace spaces with tabs at the start of linesIsaac Assegai1-1/+1
Replace spaces at the start of lines with tabs to rectify the following warning: WARNING: please, no spaces at the start of a line Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: sm750fb: Remove space after parenthesisAmitoj Kaur Chawla1-2/+2
Fixed error by removing space after open parenthesis '(' Problem found using checkpatch.pl ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-04Revert "Staging: sm750fb: Fix C99 Comments"Greg Kroah-Hartman1-2/+8
This reverts commit 6ad6b5ed3e2472b399b567a2f036006bf25df467. It added a file that should not be in the kernel source tree. Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>