~ubuntu-branches/ubuntu/precise/linux-linaro-u8500/precise

« back to all changes in this revision

Viewing changes to drivers/staging/tidspbridge/rmgr/proc.c

  • Committer: Bazaar Package Importer
  • Author(s): John Rigby, Upstream Fixes, Andy Green, John Rigby
  • Date: 2011-04-14 12:16:06 UTC
  • Revision ID: james.westby@ubuntu.com-20110414121606-b77podkyqgr2oix7
Tags: 2.6.38-1002.3
[ Upstream Fixes ]

* MUSB: shutdown: Make sure block is awake before doing shutdown
  - LP: #745737
* Fixed gpio polarity of gpio USB-phy reset.
  - LP: #747639

[ Andy Green ]

* LINARO: SAUCE: disable CONFIG_OMAP_RESET_CLOCKS
  - LP: #752900

[ John Rigby ]

* Rebase to new upstreams:
  Linux v2.6.38.1
  linaro-linux-2.6.38-upstream-29Mar2011
  Ubuntu-2.6.38-7.35
* SAUCE: OMAP4: clock: wait for module to become accessible on
  a clk enable
  - LP: #745737
* Rebase to new upstreams:
  Linux v2.6.38.2
  linaro-linux-2.6.38-upstream-5Apr2011
  Ubuntu-2.6.38-8.41
  - LP: #732842
* Update configs for device tree, dvfs and lttng
* LINARO: add building of dtb's
* LINARO: SAUCE: Disable lowest operating freqs on omap34xx
  - LP: #732912

Show diffs side-by-side

added added

removed removed

Lines of Context:
781
781
                                                        (u32)pmpu_addr,
782
782
                                                        ul_size, dir);
783
783
 
 
784
        mutex_lock(&proc_lock);
 
785
 
784
786
        /* find requested memory are in cached mapping information */
785
787
        map_obj = find_containing_mapping(pr_ctxt, (u32) pmpu_addr, ul_size);
786
788
        if (!map_obj) {
787
789
                pr_err("%s: find_containing_mapping failed\n", __func__);
788
790
                status = -EFAULT;
789
 
                goto err_out;
 
791
                goto no_map;
790
792
        }
791
793
 
792
794
        if (memory_give_ownership(map_obj, (u32) pmpu_addr, ul_size, dir)) {
795
797
                status = -EFAULT;
796
798
        }
797
799
 
 
800
no_map:
 
801
        mutex_unlock(&proc_lock);
798
802
err_out:
799
803
 
800
804
        return status;
819
823
                                                        (u32)pmpu_addr,
820
824
                                                        ul_size, dir);
821
825
 
 
826
        mutex_lock(&proc_lock);
 
827
 
822
828
        /* find requested memory are in cached mapping information */
823
829
        map_obj = find_containing_mapping(pr_ctxt, (u32) pmpu_addr, ul_size);
824
830
        if (!map_obj) {
825
831
                pr_err("%s: find_containing_mapping failed\n", __func__);
826
832
                status = -EFAULT;
827
 
                goto err_out;
 
833
                goto no_map;
828
834
        }
829
835
 
830
836
        if (memory_regain_ownership(map_obj, (u32) pmpu_addr, ul_size, dir)) {
831
837
                pr_err("%s: InValid address parameters %p %x\n",
832
838
                       __func__, pmpu_addr, ul_size);
833
839
                status = -EFAULT;
834
 
                goto err_out;
835
840
        }
836
841
 
 
842
no_map:
 
843
        mutex_unlock(&proc_lock);
837
844
err_out:
838
845
        return status;
839
846
}
1726
1733
                    (p_proc_object->hbridge_context, va_align, size_align);
1727
1734
        }
1728
1735
 
1729
 
        mutex_unlock(&proc_lock);
1730
1736
        if (status)
1731
 
                goto func_end;
 
1737
                goto unmap_failed;
1732
1738
 
1733
1739
        /*
1734
1740
         * A successful unmap should be followed by removal of map_obj
1737
1743
         */
1738
1744
        remove_mapping_information(pr_ctxt, (u32) map_addr, size_align);
1739
1745
 
 
1746
unmap_failed:
 
1747
        mutex_unlock(&proc_lock);
 
1748
 
1740
1749
func_end:
1741
1750
        dev_dbg(bridge, "%s: hprocessor: 0x%p map_addr: 0x%p status: 0x%x\n",
1742
1751
                __func__, hprocessor, map_addr, status);