diff for duplicates of <20020613190646.GT13541@opus.bloom.county> diff --git a/a/1.txt b/N1/1.txt index a964b4d..1249ddc 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,3 +1,4 @@ + Hello all. A few months back yet another RTC thread was started. I've finally gotten around to trying to do something about the generic RTC issue. The following patch takes the m68k generic RTC driver @@ -27,7 +28,7 @@ create <asm/rtc.h> and test :)) and get back to me. What I'd like to try and do in the end is perhaps replace drivers/char/rtc.c, but at a miniumum, I'd like to kill off drivers/macintosh/rtc.c. --- +-- Tom Rini (TR1265) http://gate.crashing.org/~trini/ @@ -37,7 +38,7 @@ diff -Nru a/drivers/char/Config.help b/drivers/char/Config.help @@ -1058,6 +1058,34 @@ The module is called rtc.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. - + +Generic Real Time Clock Support +CONFIG_GEN_RTC + If you say Y here and create a character special file /dev/rtc with @@ -79,7 +80,7 @@ diff -Nru a/drivers/char/Config.in b/drivers/char/Config.in +# XXX: RTC drivers conflict. Only allow one. +if [ "$CONFIG_RTC" = "n" ]; then + # XXX: CONFIG_SUN3 used to define_bool this to y -+ tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC ++ tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC + if [ "$CONFIG_GEN_RTC" != "n" ]; then + bool ' Extended RTC operation' CONFIG_GEN_RTC_X + fi @@ -205,7 +206,7 @@ diff -Nru a/drivers/char/genrtc.c b/drivers/char/genrtc.c +void genrtc_troutine(void *data) +{ + unsigned int tmp = get_rtc_ss(); -+ ++ + if (stop_rtc_timers) { + stask_active = 0; + return; @@ -229,7 +230,7 @@ diff -Nru a/drivers/char/genrtc.c b/drivers/char/genrtc.c +void gen_rtc_timer(unsigned long data) +{ + lostint = get_rtc_ss() - oldsecs ; -+ if (lostint<0) ++ if (lostint<0) + lostint = 60 - lostint; + if (jiffies-tt_exp>1) + printk("genrtc: timer task delayed by %ld jiffies\n", @@ -240,7 +241,7 @@ diff -Nru a/drivers/char/genrtc.c b/drivers/char/genrtc.c + stask_active = 0; +} + -+/* ++/* + * call gen_rtc_interrupt function to signal an RTC_UIE, + * arg is unused. + * Could be invoked either from a real interrupt handler or @@ -624,27 +625,27 @@ diff -Nru a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c +++ b/drivers/video/radeonfb.c Thu Jun 13 12:03:49 2002 @@ -190,7 +190,7 @@ } __attribute__ ((packed)) PLL_BLOCK; - - + + -struct pll_info { +struct radeon_pll_info { int ppll_max; int ppll_min; int xclk; @@ -304,7 +304,7 @@ - + u32 dp_gui_master_cntl; - + - struct pll_info pll; + struct radeon_pll_info pll; int pll_output_freq, post_div, fb_div; - + struct ram_info ram; diff -Nru a/include/asm-ppc/rtc.h b/include/asm-ppc/rtc.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/include/asm-ppc/rtc.h Thu Jun 13 12:03:49 2002 @@ -0,0 +1,94 @@ -+/* ++/* + * inclue/asm-ppc/rtc.h + * + * Copyright 2002 MontaVista Software Inc. @@ -744,7 +745,7 @@ diff -Nru a/include/linux/rtc.h b/include/linux/rtc.h @@ -39,10 +39,32 @@ struct rtc_time time; /* time the alarm is set to */ }; - + +/* + * Data structure to control PLL correction some better RTC feature + * pll_value is used to get or set current value of correction, @@ -756,7 +757,7 @@ diff -Nru a/include/linux/rtc.h b/include/linux/rtc.h + * pll_value*pll_posmult/pll_clock + * -ve pll_value means clock will run slower by + * pll_value*pll_negmult/pll_clock -+ */ ++ */ + +struct pll_info { + int pll_ctrl; /* placeholder for fancier control */ @@ -767,20 +768,22 @@ diff -Nru a/include/linux/rtc.h b/include/linux/rtc.h + int pll_negmult; /* factor for -ve corection */ + long pll_clock; /* base PLL frequency */ +}; - + /* - * ioctl calls that are permitted to the /dev/rtc interface, if + * ioctl calls that are permitted to the /dev/rtc interface, if - * CONFIG_RTC/CONFIG_EFI_RTC was enabled. + * any of the RTC drivers are enabled. */ - + #define RTC_AIE_ON _IO('p', 0x01) /* Alarm int. enable on */ @@ -65,6 +87,9 @@ - + #define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/ #define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/ +#define RTC_PLL_GET _IOR('p', 0x11, struct pll_info) /* Get PLL correction */ +#define RTC_PLL_SET _IOW('p', 0x12, struct pll_info) /* Set PLL correction */ +# - + #ifdef __KERNEL__ + +** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ diff --git a/a/content_digest b/N1/content_digest index 1c81c4f..50c610a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -7,6 +7,7 @@ " Linux/PPC Development <linuxppc-dev@lists.linuxppc.org>\0" "\00:1\0" "b\0" + "\n" "Hello all. A few months back yet another RTC thread was started. I've\n" "finally gotten around to trying to do something about the generic RTC\n" "issue. The following patch takes the m68k generic RTC driver\n" @@ -36,7 +37,7 @@ "try and do in the end is perhaps replace drivers/char/rtc.c, but at a\n" "miniumum, I'd like to kill off drivers/macintosh/rtc.c.\n" "\n" - "-- \n" + "--\n" "Tom Rini (TR1265)\n" "http://gate.crashing.org/~trini/\n" "\n" @@ -46,7 +47,7 @@ "@@ -1058,6 +1058,34 @@\n" " The module is called rtc.o. If you want to compile it as a module,\n" " say M here and read <file:Documentation/modules.txt>.\n" - " \n" + "\n" "+Generic Real Time Clock Support\n" "+CONFIG_GEN_RTC\n" "+ If you say Y here and create a character special file /dev/rtc with\n" @@ -88,7 +89,7 @@ "+# XXX: RTC drivers conflict. Only allow one.\n" "+if [ \"$CONFIG_RTC\" = \"n\" ]; then\n" "+ # XXX: CONFIG_SUN3 used to define_bool this to y\n" - "+ tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC \n" + "+ tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC\n" "+ if [ \"$CONFIG_GEN_RTC\" != \"n\" ]; then\n" "+ bool ' Extended RTC operation' CONFIG_GEN_RTC_X\n" "+ fi\n" @@ -214,7 +215,7 @@ "+void genrtc_troutine(void *data)\n" "+{\n" "+\tunsigned int tmp = get_rtc_ss();\n" - "+\t\n" + "+\n" "+\tif (stop_rtc_timers) {\n" "+\t\tstask_active = 0;\n" "+\t\treturn;\n" @@ -238,7 +239,7 @@ "+void gen_rtc_timer(unsigned long data)\n" "+{\n" "+\tlostint = get_rtc_ss() - oldsecs ;\n" - "+\tif (lostint<0) \n" + "+\tif (lostint<0)\n" "+\t\tlostint = 60 - lostint;\n" "+\tif (jiffies-tt_exp>1)\n" "+\t\tprintk(\"genrtc: timer task delayed by %ld jiffies\\n\",\n" @@ -249,7 +250,7 @@ "+\t\tstask_active = 0;\n" "+}\n" "+\n" - "+/* \n" + "+/*\n" "+ * call gen_rtc_interrupt function to signal an RTC_UIE,\n" "+ * arg is unused.\n" "+ * Could be invoked either from a real interrupt handler or\n" @@ -633,27 +634,27 @@ "+++ b/drivers/video/radeonfb.c\tThu Jun 13 12:03:49 2002\n" "@@ -190,7 +190,7 @@\n" " } __attribute__ ((packed)) PLL_BLOCK;\n" - " \n" - " \n" + "\n" + "\n" "-struct pll_info {\n" "+struct radeon_pll_info {\n" " \tint ppll_max;\n" " \tint ppll_min;\n" " \tint xclk;\n" "@@ -304,7 +304,7 @@\n" - " \n" + "\n" " \tu32 dp_gui_master_cntl;\n" - " \n" + "\n" "-\tstruct pll_info pll;\n" "+\tstruct radeon_pll_info pll;\n" " \tint pll_output_freq, post_div, fb_div;\n" - " \n" + "\n" " \tstruct ram_info ram;\n" "diff -Nru a/include/asm-ppc/rtc.h b/include/asm-ppc/rtc.h\n" "--- /dev/null\tWed Dec 31 16:00:00 1969\n" "+++ b/include/asm-ppc/rtc.h\tThu Jun 13 12:03:49 2002\n" "@@ -0,0 +1,94 @@\n" - "+/* \n" + "+/*\n" "+ * inclue/asm-ppc/rtc.h\n" "+ *\n" "+ * Copyright 2002 MontaVista Software Inc.\n" @@ -753,7 +754,7 @@ "@@ -39,10 +39,32 @@\n" " \tstruct rtc_time time;\t/* time the alarm is set to */\n" " };\n" - " \n" + "\n" "+/*\n" "+ * Data structure to control PLL correction some better RTC feature\n" "+ * pll_value is used to get or set current value of correction,\n" @@ -765,7 +766,7 @@ "+ * pll_value*pll_posmult/pll_clock\n" "+ * -ve pll_value means clock will run slower by\n" "+ * pll_value*pll_negmult/pll_clock\n" - "+ */ \n" + "+ */\n" "+\n" "+struct pll_info {\n" "+\tint pll_ctrl; /* placeholder for fancier control */\n" @@ -776,22 +777,24 @@ "+\tint pll_negmult; /* factor for -ve corection */\n" "+\tlong pll_clock; /* base PLL frequency */\n" "+};\n" - " \n" + "\n" " /*\n" - " * ioctl calls that are permitted to the /dev/rtc interface, if \n" + " * ioctl calls that are permitted to the /dev/rtc interface, if\n" "- * CONFIG_RTC/CONFIG_EFI_RTC was enabled.\n" "+ * any of the RTC drivers are enabled.\n" " */\n" - " \n" + "\n" " #define RTC_AIE_ON\t_IO('p', 0x01)\t/* Alarm int. enable on\t\t*/\n" "@@ -65,6 +87,9 @@\n" - " \n" + "\n" " #define RTC_WKALM_SET\t_IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/\n" " #define RTC_WKALM_RD\t_IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/\n" "+#define RTC_PLL_GET\t_IOR('p', 0x11, struct pll_info) /* Get PLL correction */\n" "+#define RTC_PLL_SET\t_IOW('p', 0x12, struct pll_info) /* Set PLL correction */\n" "+#\n" - " \n" - #ifdef __KERNEL__ + "\n" + " #ifdef __KERNEL__\n" + "\n" + ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ -28bb4b2d4da1b01c63723da6c9ed512aa835d56eb7f452b065779f248dd19511 +bede5ee228d61bc9827df91aa455fa87e1dbb071f3c3e2e6f6661e9f07dc6d8b
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.