diff options
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 8717370c91b1..bb043cbb3886 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -359,7 +359,6 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) | |||
359 | struct omap_device_pad *pad = hmux->pads_dynamic[i]; | 359 | struct omap_device_pad *pad = hmux->pads_dynamic[i]; |
360 | int val = -EINVAL; | 360 | int val = -EINVAL; |
361 | 361 | ||
362 | pad->flags |= OMAP_DEVICE_PAD_IDLE; | ||
363 | val = pad->idle; | 362 | val = pad->idle; |
364 | omap_mux_write(pad->partition, val, | 363 | omap_mux_write(pad->partition, val, |
365 | pad->mux->reg_offset); | 364 | pad->mux->reg_offset); |
@@ -369,25 +368,18 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) | |||
369 | } | 368 | } |
370 | 369 | ||
371 | /* Runtime enabling of dynamic pads */ | 370 | /* Runtime enabling of dynamic pads */ |
372 | if ((state == _HWMOD_STATE_ENABLED) && hmux->pads_dynamic) { | 371 | if ((state == _HWMOD_STATE_ENABLED) && hmux->pads_dynamic |
373 | int idled = 0; | 372 | && hmux->enabled) { |
374 | |||
375 | for (i = 0; i < hmux->nr_pads_dynamic; i++) { | 373 | for (i = 0; i < hmux->nr_pads_dynamic; i++) { |
376 | struct omap_device_pad *pad = hmux->pads_dynamic[i]; | 374 | struct omap_device_pad *pad = hmux->pads_dynamic[i]; |
377 | int val = -EINVAL; | 375 | int val = -EINVAL; |
378 | 376 | ||
379 | if (!(pad->flags & OMAP_DEVICE_PAD_IDLE)) | ||
380 | continue; | ||
381 | |||
382 | pad->flags &= ~OMAP_DEVICE_PAD_IDLE; | ||
383 | val = pad->enable; | 377 | val = pad->enable; |
384 | omap_mux_write(pad->partition, val, | 378 | omap_mux_write(pad->partition, val, |
385 | pad->mux->reg_offset); | 379 | pad->mux->reg_offset); |
386 | idled++; | ||
387 | } | 380 | } |
388 | 381 | ||
389 | if (idled) | 382 | return; |
390 | return; | ||
391 | } | 383 | } |
392 | 384 | ||
393 | /* Enabling or disabling of all pads */ | 385 | /* Enabling or disabling of all pads */ |
@@ -404,7 +396,6 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) | |||
404 | pad->name, val); | 396 | pad->name, val); |
405 | break; | 397 | break; |
406 | case _HWMOD_STATE_DISABLED: | 398 | case _HWMOD_STATE_DISABLED: |
407 | default: | ||
408 | /* Use safe mode unless OMAP_DEVICE_PAD_REMUX */ | 399 | /* Use safe mode unless OMAP_DEVICE_PAD_REMUX */ |
409 | if (flags & OMAP_DEVICE_PAD_REMUX) | 400 | if (flags & OMAP_DEVICE_PAD_REMUX) |
410 | val = pad->off; | 401 | val = pad->off; |
@@ -412,6 +403,10 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) | |||
412 | val = OMAP_MUX_MODE7; | 403 | val = OMAP_MUX_MODE7; |
413 | pr_debug("%s: Disabling %s %x\n", __func__, | 404 | pr_debug("%s: Disabling %s %x\n", __func__, |
414 | pad->name, val); | 405 | pad->name, val); |
406 | break; | ||
407 | default: | ||
408 | /* Nothing to be done */ | ||
409 | break; | ||
415 | }; | 410 | }; |
416 | 411 | ||
417 | if (val >= 0) { | 412 | if (val >= 0) { |