~ubuntu-branches/ubuntu/vivid/linux-fsl-imx51/vivid

« back to all changes in this revision

Viewing changes to drivers/mxc/security/sahara2/fsl_shw_auth.c

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Amit Kucheria, Andy Whitcroft, Bryan Wu, Upstream Kernel Changes
  • Date: 2010-01-11 16:26:27 UTC
  • Revision ID: james.westby@ubuntu.com-20100111162627-1q2fl9tcuwcywt1e
Tags: 2.6.31-602.4
[ Amit Kucheria ]

* Update to official 2.6.31 BSP release from Freescale

[ Andy Whitcroft ]

* drop a number of modules no longer built

[ Bryan Wu ]

* [Config] Update configs after applying .31 patchset from Freescale
* [Config] Sync with imx51_defconfig from Freescale BSP

[ Upstream Kernel Changes ]

* Update to official 2.6.31 BSP release from Freescale.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    unsigned val;                                                             \
43
43
    uint32_t len = l;                                                         \
44
44
    if (len == 0) {                                                           \
45
 
        val = 0;                                                              \
 
45
        val = 0;                                                              \
46
46
    } else if (len < 65280) {                                                 \
47
 
        val = 2;                                                              \
 
47
        val = 2;                                                              \
48
48
    } else {                    /* cannot handle >= 2^32 */                   \
49
 
        val = 6;                                                              \
 
49
        val = 6;                                                              \
50
50
    }                                                                         \
51
51
    val;                                                                      \
52
52
})
63
63
{                                                                             \
64
64
    register uint32_t L = l;                                                  \
65
65
    if ((uint32_t)(l) < 65280) {                                              \
66
 
        (p)[1] = L & 0xff;                                                    \
67
 
        L >>= 8;                                                              \
68
 
        (p)[0] = L & 0xff;                                                    \
 
66
        (p)[1] = L & 0xff;                                                    \
 
67
        L >>= 8;                                                              \
 
68
        (p)[0] = L & 0xff;                                                    \
69
69
    } else {                    /* cannot handle >= 2^32 */                   \
70
 
        int i;                                                                \
71
 
        for (i = 5; i > 1; i--) {                                             \
72
 
            (p)[i] = L & 0xff;                                                \
73
 
            L >>= 8;                                                          \
74
 
        }                                                                     \
75
 
        (p)[1] = 0xfe;  /* Markers */                                         \
76
 
        (p)[0] = 0xff;                                                        \
 
70
        int i;                                                                \
 
71
        for (i = 5; i > 1; i--) {                                             \
 
72
            (p)[i] = L & 0xff;                                                \
 
73
            L >>= 8;                                                          \
 
74
        }                                                                     \
 
75
        (p)[1] = 0xfe;  /* Markers */                                         \
 
76
        (p)[0] = 0xff;                                                        \
77
77
    }                                                                         \
78
78
}
79
79