File tree Expand file tree Collapse file tree
drivers/media/platform/apple/isp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,16 +268,22 @@ static void isp_firmware_shutdown_stage1(struct apple_isp *isp)
268268static int isp_firmware_boot_stage1 (struct apple_isp * isp )
269269{
270270 int err , retries ;
271+ u32 val ;
272+
271273 err = apple_isp_power_up_domains (isp );
272274 if (err < 0 )
273275 return err ;
274276
275- err = isp_reset_coproc (isp );
276- if (err < 0 )
277- return err ;
278277
279278 isp_gpio_write32 (isp , ISP_GPIO_CLOCK_EN , 0x1 );
280279
280+ val = isp_gpio_read32 (isp , ISP_GPIO_1 );
281+ if (val == 0xfeedbabe ) {
282+ err = isp_reset_coproc (isp );
283+ if (err < 0 )
284+ return err ;
285+ }
286+
281287 isp_gpio_write32 (isp , ISP_GPIO_0 , 0x0 );
282288 isp_gpio_write32 (isp , ISP_GPIO_1 , 0x0 );
283289 isp_gpio_write32 (isp , ISP_GPIO_2 , 0x0 );
@@ -293,7 +299,6 @@ static int isp_firmware_boot_stage1(struct apple_isp *isp)
293299 isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x10 );
294300
295301 /* Wait for ISP_GPIO_7 to 0x0 -> 0x8042006 */
296- isp_gpio_write32 (isp , ISP_GPIO_7 , 0x0 );
297302 for (retries = 0 ; retries < ISP_FIRMWARE_MAX_TRIES ; retries ++ ) {
298303 u32 val = isp_gpio_read32 (isp , ISP_GPIO_7 );
299304 if (val == 0x8042006 ) {
You can’t perform that action at this time.
0 commit comments