lkml.org 
[lkml]   [2007]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 04/20] Blackfin arch: fix bug ad1836 fails to build properly for BF533-EZKIT
    Date
    From: Roy Huang <roy.huang@analog.com>

    bug log here: http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3166

    Signed-off-by: Roy Huang <roy.huang@analog.com>
    Signed-off-by: Bryan Wu <bryan.wu@analog.com>
    ---
    include/asm-blackfin/mach-common/def_LPBlackfin.h | 22 +++++++++++++++++++++
    1 files changed, 22 insertions(+), 0 deletions(-)

    diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h
    index 7610352..fcda2c1 100644
    --- a/include/asm-blackfin/mach-common/def_LPBlackfin.h
    +++ b/include/asm-blackfin/mach-common/def_LPBlackfin.h
    @@ -42,6 +42,12 @@

    #if defined(ANOMALY_05000198)

    +#define bfin_read8(addr) ({ unsigned char __v; \
    + __asm__ __volatile__ ("NOP;\n\t" \
    + "%0 = b[%1] (z);\n\t" \
    + : "=d"(__v) : "a"(addr)); \
    + __v; })
    +
    #define bfin_read16(addr) ({ unsigned __v; \
    __asm__ __volatile__ ("NOP;\n\t"\
    "%0 = w[%1] (z);\n\t"\
    @@ -52,6 +58,11 @@
    "%0 = [%1];\n\t"\
    : "=d"(__v) : "a"(addr)); __v; })

    +#define bfin_write8(addr,val) ({ \
    + __asm__ __volatile__ ("NOP;\n\t" \
    + "b[%0] = %1;\n\t" \
    + : : "a"(addr), "d"(val) : "memory");})
    +
    #define bfin_write16(addr,val) ({\
    __asm__ __volatile__ ("NOP;\n\t"\
    "w[%0] = %1;\n\t"\
    @@ -64,6 +75,12 @@

    #else

    +#define bfin_read8(addr) ({ unsigned char __v; \
    + __asm__ __volatile__ ( \
    + "%0 = b[%1] (z);\n\t" \
    + :"=d"(__v) : "a"(addr)); \
    + __v; })
    +
    #define bfin_read16(addr) ({ unsigned __v; \
    __asm__ __volatile__ (\
    "%0 = w[%1] (z);\n\t"\
    @@ -74,6 +91,11 @@
    "%0 = [%1];\n\t"\
    : "=d"(__v) : "a"(addr)); __v; })

    +#define bfin_write8(addr, val) ({ \
    + __asm__ __volatile__ ( \
    + "b[%0] = %1; \n\t" \
    + ::"a"(addr), "d"(val) : "memory");})
    +
    #define bfin_write16(addr,val) ({\
    __asm__ __volatile__ (\
    "w[%0] = %1;\n\t"\
    --
    1.5.2
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-05-28 10:41    [W:0.026 / U:95.648 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site