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 @@ -270,16 +270,22 @@ static void isp_firmware_shutdown_stage1(struct apple_isp *isp)
270270static int isp_firmware_boot_stage1 (struct apple_isp * isp )
271271{
272272 int err , retries ;
273+ u32 val ;
274+
273275 err = apple_isp_power_up_domains (isp );
274276 if (err < 0 )
275277 return err ;
276278
277- err = isp_reset_coproc (isp );
278- if (err < 0 )
279- return err ;
280279
281280 isp_gpio_write32 (isp , ISP_GPIO_CLOCK_EN , 0x1 );
282281
282+ val = isp_gpio_read32 (isp , ISP_GPIO_1 );
283+ if (val == 0xfeedbabe ) {
284+ err = isp_reset_coproc (isp );
285+ if (err < 0 )
286+ return err ;
287+ }
288+
283289 isp_gpio_write32 (isp , ISP_GPIO_0 , 0x0 );
284290 isp_gpio_write32 (isp , ISP_GPIO_1 , 0x0 );
285291 isp_gpio_write32 (isp , ISP_GPIO_2 , 0x0 );
@@ -295,7 +301,6 @@ static int isp_firmware_boot_stage1(struct apple_isp *isp)
295301 isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x10 );
296302
297303 /* Wait for ISP_GPIO_7 to 0x0 -> 0x8042006 */
298- isp_gpio_write32 (isp , ISP_GPIO_7 , 0x0 );
299304 for (retries = 0 ; retries < ISP_FIRMWARE_MAX_TRIES ; retries ++ ) {
300305 u32 val = isp_gpio_read32 (isp , ISP_GPIO_7 );
301306 if (val == 0x8042006 ) {
You can’t perform that action at this time.
0 commit comments