linaro u-boot: get_sdr_cs_offset() ignores CS1STARTLOW field

Bug #652117 reported by Peter Maydell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro U-Boot
Fix Released
Medium
Steve Sakoman

Bug Description

http://git.linaro.org/gitweb?p=boot/u-boot-linaro-next.git;a=blob;f=arch/arm/cpu/armv7/omap3/sdrc.c;h=8905224439b5e7d07204c2b5b2b4f180c5599ce8;hb=HEAD#l94

arch/arm/cpu/armv7/omap3/sdrc.c:get_sdr_cs_offset() does this:

        offset = readl(&sdrc_base->cs_cfg);
        offset = (offset & 15) << 27 | (offset & 0x30) >> 17;

which is clearly shifting the offset&0x30 field off the right hand side of the value so it is effectively ignored. Looking at the OMAP35xx TRM (which defines bits [9:8] as CS1STARTLOW, lower address bits a1:a0, and [3:0] as CS1STARTHIGH, upper address bits a5:a4:a3:a2) I think that this should read "<< 17".

This doesn't have any visible effect on the h/w I have access to (beagleboard) because CS1STARTLOW is zero anyway. I found it by code inspection while trying to track down a different problem in qemu.

Revision history for this message
Loïc Minier (lool) wrote :

Steve, would you mind looking into this?

Changed in u-boot-linaro:
assignee: nobody → Steve Sakoman (steve-sakoman)
Revision history for this message
Steve Sakoman (steve-sakoman) wrote :

Fix patch submitted to upstream U-boot list on 10/1/2010

Revision history for this message
Mounir Bsaibes (mounir-bsaibes) wrote :

Setting importance to Medium as fix has been submitted upstream.

Changed in u-boot-linaro:
importance: Undecided → Medium
Changed in u-boot-linaro:
status: New → In Progress
Revision history for this message
Peter Maydell (pmaydell) wrote :

So this fix is in our u-boot-linaro-next tree:
 http://git.linaro.org/gitweb?p=boot/u-boot-linaro-next.git;a=commitdiff;h=136c69ad7917f23d401c3a794cd0f5a4ab2230de
and has been for some time now. Can we close this bug as fixed?

Fathi Boudra (fboudra)
Changed in u-boot-linaro:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.