/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished proprietary information of BroadOn Communications Corp.,
 *  and are protected by federal copyright law. They may not be disclosed
 *  to third parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 *  Description:
 *      This file implements common utility functions.
 */
#include <iostypes.h>
void 
little2big(u32 *buf, u32 len)
{
    u32 i;
    u32 count = (len + 3) >> 2;
    for (i = 0; i < count; ++i ) {
        u32 value = *buf;
        value = ((value & 0xff) << 24) |
                ((value & 0xff00) << 8) |
                ((value & 0xff0000) >> 8) |
                ((value & 0xff000000) >> 24);
        *buf++ = value;
    } 
}
