:::::: :::::: Manual check reason: "low confidence static check warning: drivers/media/platform/marvell/mmp-driver.c:63:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]" ::::::
CC: [email protected] CC: [email protected] BCC: [email protected] CC: [email protected] TO: Mauro Carvalho Chehab <[email protected]> CC: [email protected] tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: f2906aa863381afb0015a9eb7fefad885d4e5a56 commit: dc7bbea90075b57772e9a28043061bf71d96f06f media: platform: rename marvell-ccic/ to marvell/ date: 3 months ago :::::: branch date: 17 hours ago :::::: commit date: 3 months ago config: arm-randconfig-c002-20220605 (https://download.01.org/0day-ci/archive/20220607/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0a90b72c432d70aae035727ece4ba80ce820f381) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dc7bbea90075b57772e9a28043061bf71d96f06f git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout dc7bbea90075b57772e9a28043061bf71d96f06f # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) Suppressed 1 warnings (1 with check filters). 4 warnings generated. drivers/media/usb/cx231xx/cx231xx-417.c:728:12: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if (value != 0x12345678) { ~~~~~ ^ drivers/media/usb/cx231xx/cx231xx-417.c:719:6: note: 'value' declared without an initial value u32 value, flag, retval = 0; ^~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:722:2: note: Assuming 'v4l_debug' is < 3 dprintk(3, "%s: command(0x%X) = %s\n", __func__, command, ^ drivers/media/usb/cx231xx/cx231xx-417.c:78:7: note: expanded from macro 'dprintk' if (v4l_debug >= level) \ ^~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:722:2: note: Taking false branch dprintk(3, "%s: command(0x%X) = %s\n", __func__, command, ^ drivers/media/usb/cx231xx/cx231xx-417.c:78:3: note: expanded from macro 'dprintk' if (v4l_debug >= level) \ ^ drivers/media/usb/cx231xx/cx231xx-417.c:722:2: note: Loop condition is false. Exiting loop dprintk(3, "%s: command(0x%X) = %s\n", __func__, command, ^ drivers/media/usb/cx231xx/cx231xx-417.c:77:2: note: expanded from macro 'dprintk' do { \ ^ drivers/media/usb/cx231xx/cx231xx-417.c:727:2: note: Calling 'mc417_memory_read' mc417_memory_read(dev, dev->cx23417_mailbox - 4, &value); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:560:6: note: Assuming 'ret' is < 0 if (ret < 0) ^~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:560:2: note: Taking true branch if (ret < 0) ^ drivers/media/usb/cx231xx/cx231xx-417.c:561:3: note: Returning without writing to '*value' return ret; ^ drivers/media/usb/cx231xx/cx231xx-417.c:727:2: note: Returning from 'mc417_memory_read' mc417_memory_read(dev, dev->cx23417_mailbox - 4, &value); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:728:12: note: The left operand of '!=' is a garbage value if (value != 0x12345678) { ~~~~~ ^ drivers/media/usb/cx231xx/cx231xx-417.c:738:6: warning: Branch condition evaluates to a garbage value [clang-analyzer-core.uninitialized.Branch] if (flag) { ^~~~ drivers/media/usb/cx231xx/cx231xx-417.c:719:13: note: 'flag' declared without an initial value u32 value, flag, retval = 0; ^~~~ drivers/media/usb/cx231xx/cx231xx-417.c:722:2: note: Assuming 'v4l_debug' is < 3 dprintk(3, "%s: command(0x%X) = %s\n", __func__, command, ^ drivers/media/usb/cx231xx/cx231xx-417.c:78:7: note: expanded from macro 'dprintk' if (v4l_debug >= level) \ ^~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:722:2: note: Taking false branch dprintk(3, "%s: command(0x%X) = %s\n", __func__, command, ^ drivers/media/usb/cx231xx/cx231xx-417.c:78:3: note: expanded from macro 'dprintk' if (v4l_debug >= level) \ ^ drivers/media/usb/cx231xx/cx231xx-417.c:722:2: note: Loop condition is false. Exiting loop dprintk(3, "%s: command(0x%X) = %s\n", __func__, command, ^ drivers/media/usb/cx231xx/cx231xx-417.c:77:2: note: expanded from macro 'dprintk' do { \ ^ drivers/media/usb/cx231xx/cx231xx-417.c:728:6: note: Assuming 'value' is equal to 305419896 if (value != 0x12345678) { ^~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:728:2: note: Taking false branch if (value != 0x12345678) { ^ drivers/media/usb/cx231xx/cx231xx-417.c:737:2: note: Calling 'mc417_memory_read' mc417_memory_read(dev, dev->cx23417_mailbox, &flag); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:560:6: note: Assuming 'ret' is < 0 if (ret < 0) ^~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:560:2: note: Taking true branch if (ret < 0) ^ drivers/media/usb/cx231xx/cx231xx-417.c:561:3: note: Returning without writing to '*value' return ret; ^ drivers/media/usb/cx231xx/cx231xx-417.c:737:2: note: Returning from 'mc417_memory_read' mc417_memory_read(dev, dev->cx23417_mailbox, &flag); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:738:6: note: Branch condition evaluates to a garbage value if (flag) { ^~~~ drivers/media/usb/cx231xx/cx231xx-417.c:961:2: warning: Value stored to 'retval' is never read [clang-analyzer-deadcode.DeadStores] retval |= mc417_memory_read(dev, 0x900C, &value); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-417.c:961:2: note: Value stored to 'retval' is never read retval |= mc417_memory_read(dev, 0x900C, &value); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 1 warnings (1 with check filters). 2 warnings generated. >> drivers/media/platform/marvell/mmp-driver.c:63:17: warning: Value stored to >> 'dev' during its initialization is never read >> [clang-analyzer-deadcode.DeadStores] struct device *dev = &cam->pdev->dev; ^~~ ~~~~~~~~~~~~~~~ drivers/media/platform/marvell/mmp-driver.c:63:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &cam->pdev->dev; ^~~ ~~~~~~~~~~~~~~~ Suppressed 1 warnings (1 with check filters). 1 warning generated. Suppressed 1 warnings (1 with check filters). 2 warnings generated. drivers/media/platform/omap3isp/isp.c:529:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = isp->dev; ^~~ ~~~~~~~~ drivers/media/platform/omap3isp/isp.c:529:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = isp->dev; ^~~ ~~~~~~~~ Suppressed 1 warnings (1 with check filters). 1 warning generated. Suppressed 1 warnings (1 with check filters). 2 warnings generated. drivers/media/platform/omap3isp/ispcsiphy.c:63:14: warning: The left operand of '<<' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] reg |= mode << shift; ^ drivers/media/platform/omap3isp/ispcsiphy.c:264:6: note: Assuming field 'vdd' is not equal to NULL if (phy->vdd == NULL) { ^~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:264:2: note: Taking false branch if (phy->vdd == NULL) { ^ drivers/media/platform/omap3isp/ispcsiphy.c:273:6: note: Assuming 'rval' is >= 0 if (rval < 0) ^~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:273:2: note: Taking false branch if (rval < 0) ^ drivers/media/platform/omap3isp/ispcsiphy.c:277:6: note: Assuming 'rval' is >= 0 if (rval < 0) ^~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:277:2: note: Taking false branch if (rval < 0) ^ drivers/media/platform/omap3isp/ispcsiphy.c:282:9: note: Calling 'omap3isp_csiphy_config' rval = omap3isp_csiphy_config(phy); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:172:6: note: Assuming field 'interface' is not equal to ISP_INTERFACE_CCP2B_PHY1 if (buscfg->interface == ISP_INTERFACE_CCP2B_PHY1 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:172:6: note: Left side of '||' is false drivers/media/platform/omap3isp/ispcsiphy.c:173:9: note: Assuming field 'interface' is not equal to ISP_INTERFACE_CCP2B_PHY2 || buscfg->interface == ISP_INTERFACE_CCP2B_PHY2) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:172:2: note: Taking false branch if (buscfg->interface == ISP_INTERFACE_CCP2B_PHY1 ^ drivers/media/platform/omap3isp/ispcsiphy.c:181:6: note: Assuming 'num_data_lanes' is <= field 'num_data_lanes' if (num_data_lanes > phy->num_data_lanes) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:181:2: note: Taking false branch if (num_data_lanes > phy->num_data_lanes) ^ drivers/media/platform/omap3isp/ispcsiphy.c:185:14: note: Assuming 'i' is >= 'num_data_lanes' for (i = 0; i < num_data_lanes; i++) { ^~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:185:2: note: Loop condition is false. Execution continues on line 195 for (i = 0; i < num_data_lanes; i++) { ^ drivers/media/platform/omap3isp/ispcsiphy.c:195:6: note: Assuming field 'pol' is <= 1 if (lanes->clk.pol > 1 || lanes->clk.pos > 3) ^~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:195:6: note: Left side of '||' is false drivers/media/platform/omap3isp/ispcsiphy.c:195:28: note: Assuming field 'pos' is <= 3 if (lanes->clk.pol > 1 || lanes->clk.pos > 3) ^~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:195:2: note: Taking false branch if (lanes->clk.pol > 1 || lanes->clk.pos > 3) ^ drivers/media/platform/omap3isp/ispcsiphy.c:198:6: note: Assuming field 'pos' is not equal to 0 if (lanes->clk.pos == 0 || used_lanes & (1 << lanes->clk.pos)) ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:198:6: note: Left side of '||' is false drivers/media/platform/omap3isp/ispcsiphy.c:198:2: note: Taking false branch if (lanes->clk.pos == 0 || used_lanes & (1 << lanes->clk.pos)) ^ drivers/media/platform/omap3isp/ispcsiphy.c:206:2: note: Calling 'csiphy_routing_cfg' csiphy_routing_cfg(phy, buscfg->interface, true, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:105:6: note: Assuming field 'phy_type' is equal to ISP_PHY_TYPE_3630 if (phy->isp->phy_type == ISP_PHY_TYPE_3630 && on) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:105:6: note: Left side of '&&' is true drivers/media/platform/omap3isp/ispcsiphy.c:105:49: note: 'on' is true if (phy->isp->phy_type == ISP_PHY_TYPE_3630 && on) ^~ drivers/media/platform/omap3isp/ispcsiphy.c:105:2: note: Taking true branch if (phy->isp->phy_type == ISP_PHY_TYPE_3630 && on) ^ drivers/media/platform/omap3isp/ispcsiphy.c:106:10: note: Calling 'csiphy_routing_cfg_3630' return csiphy_routing_cfg_3630(phy, iface, ccp2_strobe); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/omap3isp/ispcsiphy.c:28:13: note: 'mode' declared without an initial value u32 shift, mode; vim +/dev +63 drivers/media/platform/marvell/mmp-driver.c 67a8dbbc4e04cd drivers/media/video/marvell-ccic/mmp-driver.c Jonathan Corbet 2011-06-11 49 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 50 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 51 * calc the dphy register values 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 52 * There are three dphy registers being used. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 53 * dphy[0] - CSI2_DPHY3 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 54 * dphy[1] - CSI2_DPHY5 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 55 * dphy[2] - CSI2_DPHY6 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 56 * CSI2_DPHY3 and CSI2_DPHY6 can be set with a default value 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 57 * or be calculated dynamically 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 58 */ e81afa6f28f974 drivers/media/platform/marvell-ccic/mmp-driver.c Mauro Carvalho Chehab 2018-04-05 59 static void mmpcam_calc_dphy(struct mcam_camera *mcam) 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 60 { 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 61 struct mmp_camera *cam = mcam_to_cam(mcam); 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 62 struct mmp_camera_platform_data *pdata = cam->pdev->dev.platform_data; 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 @63 struct device *dev = &cam->pdev->dev; 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 64 unsigned long tx_clk_esc; 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 65 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 66 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 67 * If CSI2_DPHY3 is calculated dynamically, 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 68 * pdata->lane_clk should be already set 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 69 * either in the board driver statically 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 70 * or in the sensor driver dynamically. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 71 */ 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 72 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 73 * dphy[0] - CSI2_DPHY3: 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 74 * bit 0 ~ bit 7: HS Term Enable. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 75 * defines the time that the DPHY 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 76 * wait before enabling the data 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 77 * lane termination after detecting 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 78 * that the sensor has driven the data 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 79 * lanes to the LP00 bridge state. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 80 * The value is calculated by: 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 81 * (Max T(D_TERM_EN)/Period(DDR)) - 1 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 82 * bit 8 ~ bit 15: HS_SETTLE 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 83 * Time interval during which the HS 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 84 * receiver shall ignore any Data Lane 8b72c18d467fad drivers/media/platform/marvell-ccic/mmp-driver.c Mauro Carvalho Chehab 2019-02-18 85 * HS transitions. 8b72c18d467fad drivers/media/platform/marvell-ccic/mmp-driver.c Mauro Carvalho Chehab 2019-02-18 86 * The value has been calibrated on 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 87 * different boards. It seems to work well. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 88 * 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 89 * More detail please refer 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 90 * MIPI Alliance Spectification for D-PHY 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 91 * document for explanation of HS-SETTLE 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 92 * and D-TERM-EN. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 93 */ 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 94 switch (pdata->dphy3_algo) { 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 95 case DPHY3_ALGO_PXA910: 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 96 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 97 * Calculate CSI2_DPHY3 algo for PXA910 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 98 */ 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 99 pdata->dphy[0] = 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 100 (((1 + (pdata->lane_clk * 80) / 1000) & 0xff) << 8) 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 101 | (1 + pdata->lane_clk * 35 / 1000); 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 102 break; 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 103 case DPHY3_ALGO_PXA2128: 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 104 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 105 * Calculate CSI2_DPHY3 algo for PXA2128 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 106 */ 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 107 pdata->dphy[0] = 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 108 (((2 + (pdata->lane_clk * 110) / 1000) & 0xff) << 8) 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 109 | (1 + pdata->lane_clk * 35 / 1000); 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 110 break; 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 111 default: 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 112 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 113 * Use default CSI2_DPHY3 value for PXA688/PXA988 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 114 */ 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 115 dev_dbg(dev, "camera: use the default CSI2_DPHY3 value\n"); 67a8dbbc4e04cd drivers/media/video/marvell-ccic/mmp-driver.c Jonathan Corbet 2011-06-11 116 } 67a8dbbc4e04cd drivers/media/video/marvell-ccic/mmp-driver.c Jonathan Corbet 2011-06-11 117 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 118 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 119 * mipi_clk will never be changed, it is a fixed value on MMP 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 120 */ 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 121 if (IS_ERR(cam->mipi_clk)) 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 122 return; 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 123 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 124 /* get the escape clk, this is hard coded */ 326f5a3fc502f9 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-11-05 125 clk_prepare_enable(cam->mipi_clk); 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 126 tx_clk_esc = (clk_get_rate(cam->mipi_clk) / 1000000) / 12; 326f5a3fc502f9 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-11-05 127 clk_disable_unprepare(cam->mipi_clk); 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 128 /* 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 129 * dphy[2] - CSI2_DPHY6: 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 130 * bit 0 ~ bit 7: CK Term Enable 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 131 * Time for the Clock Lane receiver to enable the HS line 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 132 * termination. The value is calculated similarly with 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 133 * HS Term Enable 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 134 * bit 8 ~ bit 15: CK Settle 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 135 * Time interval during which the HS receiver shall ignore 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 136 * any Clock Lane HS transitions. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 137 * The value is calibrated on the boards. 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 138 */ 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 139 pdata->dphy[2] = 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 140 ((((534 * tx_clk_esc) / 2000 - 1) & 0xff) << 8) 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 141 | (((38 * tx_clk_esc) / 1000 - 1) & 0xff); 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 142 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 143 dev_dbg(dev, "camera: DPHY sets: dphy3=0x%x, dphy5=0x%x, dphy6=0x%x\n", 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 144 pdata->dphy[0], pdata->dphy[1], pdata->dphy[2]); 05fed81625bf75 drivers/media/platform/marvell-ccic/mmp-driver.c Libin Yang 2013-07-03 145 } 67a8dbbc4e04cd drivers/media/video/marvell-ccic/mmp-driver.c Jonathan Corbet 2011-06-11 146 :::::: The code at line 63 was first introduced by commit :::::: 05fed81625bf755cc67c5864cdfd18b69ea828d1 [media] marvell-ccic: add MIPI support for marvell-ccic driver :::::: TO: Libin Yang <[email protected]> :::::: CC: Mauro Carvalho Chehab <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
