]> git.sur5r.net Git - u-boot/blobdiff - cpu/lh7a40x/speed.c
usb: musb: make sure the register layout is packed
[u-boot] / cpu / lh7a40x / speed.c
index e80b046d34d66e55a4ca5766ee164b98a087b015..333ebb504aa04307fc7d98838fb9df394f9aeb99 100644 (file)
@@ -46,7 +46,7 @@ ulong get_PLLCLK (void)
 /* return FCLK frequency */
 ulong get_FCLK (void)
 {
-       LH7A40X_CSC_PTR (csc);
+       lh7a40x_csc_t* csc = LH7A40X_CSC_PTR;
        ulong maindiv1, maindiv2, prediv, ps;
 
        /*
@@ -68,7 +68,7 @@ ulong get_FCLK (void)
 /* return HCLK frequency */
 ulong get_HCLK (void)
 {
-       LH7A40X_CSC_PTR (csc);
+       lh7a40x_csc_t* csc = LH7A40X_CSC_PTR;
 
        return (get_FCLK () / ((csc->clkset & CLKSET_HCLKDIV) + 1));
 }
@@ -76,7 +76,7 @@ ulong get_HCLK (void)
 /* return PCLK frequency */
 ulong get_PCLK (void)
 {
-       LH7A40X_CSC_PTR (csc);
+       lh7a40x_csc_t* csc = LH7A40X_CSC_PTR;
 
        return (get_HCLK () /
                (1 << (((csc->clkset & CLKSET_PCLKDIV) >> 16) + 1)));