Re: [PATCH 1/2] Add correct PLL settings for DragonBall VZ.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 3, 2014 at 2:41 PM, Greg Ungerer <gregungerer00@xxxxxxxxx> wrote:
-#ifdef CONFIG_PILOT
+#if defined(CONFIG_PILOT)
        movew   #0x2410, 0xfffff200             /* PLLCR */
+#elif defined(CONFIG_M68VZ328)
+       movew   #0x2493, 0xfffff200             /* PLLCR */


Would it be cleaner to have a defined value here instead?
This moves the #ifdef'ery to just the PLLCR value, and keeps the
code instructions here cleaner. So something like this at the top of
this head.S:

#if defined(CONFIG_PILOT)
#define PLLCR   0x2410
#elif defined(CONFIG_M68VZ328)
#define PLLCR   0x2493
#else
#define PLLCR   0x2400
#endif

and then just

        movew   #PLLCR, 0xfffff200              /* PLLCR */

While I like this advice in general, I prefer to use a different name than
"PLLCR" for this definition.

One day someone may want to put "#define PLLCR 0xfffff200" in a
header file...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux