lkml.org 
[lkml]   [2009]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patches in this message
    /
    Date
    From
    SubjectRe: [PATCH] rtc: add x86 support for rtc-efi
    re-post of the patch, both as inline and as an attachment (which 
    hopefully wont cause confusion).


    --- a/drivers/rtc/Kconfig 2009-03-26 12:39:59.000000000 -0400
    +++ b/drivers/rtc/Kconfig 2009-04-06 18:46:58.000000000 -0400
    @@ -442,7 +442,7 @@ config RTC_DRV_DS1742

    config RTC_DRV_EFI
    tristate "EFI RTC"
    - depends on IA64
    + depends on EFI
    help
    If you say yes here you will get support for the EFI
    Real Time Clock.
    --- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
    +++ b/arch/x86/kernel/time_32.c 2009-03-26 13:06:10.000000000 -0400
    @@ -32,6 +32,7 @@
    #include <linux/interrupt.h>
    #include <linux/time.h>
    #include <linux/mca.h>
    +#include <linux/platform_device.h>

    #include <asm/arch_hooks.h>
    #include <asm/hpet.h>
    @@ -135,3 +136,21 @@ void __init time_init(void)
    tsc_init();
    late_time_init = choose_time_init();
    }
    +
    +
    +#ifdef CONFIG_RTC_DRV_EFI
    +static struct platform_device rtc_efi_dev = {
    + .name = "rtc-efi",
    + .id = -1,
    +};
    +
    +static int __init rtc_init(void)
    +{
    + if (platform_device_register(&rtc_efi_dev) < 0)
    + printk(KERN_ERR "unable to register rtc device...\n");
    +
    + /* not necessarily an error */
    + return 0;
    +}
    +module_init(rtc_init);
    +#endif
    --- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
    +++ b/arch/x86/kernel/time_64.c 2009-03-26 13:06:19.000000000 -0400
    @@ -18,6 +18,7 @@
    #include <linux/time.h>
    #include <linux/mca.h>
    #include <linux/nmi.h>
    +#include <linux/platform_device.h>

    #include <asm/i8253.h>
    #include <asm/hpet.h>
    @@ -135,3 +136,20 @@ void __init time_init(void)

    late_time_init = choose_time_init();
    }
    +
    +#ifdef CONFIG_RTC_DRV_EFI
    +static struct platform_device rtc_efi_dev = {
    + .name = "rtc-efi",
    + .id = -1,
    +};
    +
    +static int __init rtc_init(void)
    +{
    + if (platform_device_register(&rtc_efi_dev) < 0)
    + printk(KERN_ERR "unable to register rtc device...\n");
    +
    + /* not necessarily an error */
    + return 0;
    +}
    +module_init(rtc_init);
    +#endif
    --------------------------------------------------------------------------------------------
    --- a/drivers/rtc/Kconfig 2009-03-26 12:39:59.000000000 -0400
    +++ b/drivers/rtc/Kconfig 2009-04-06 18:46:58.000000000 -0400
    @@ -442,7 +442,7 @@ config RTC_DRV_DS1742

    config RTC_DRV_EFI
    tristate "EFI RTC"
    - depends on IA64
    + depends on EFI
    help
    If you say yes here you will get support for the EFI
    Real Time Clock.
    --- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
    +++ b/arch/x86/kernel/time_32.c 2009-03-26 13:06:10.000000000 -0400
    @@ -32,6 +32,7 @@
    #include <linux/interrupt.h>
    #include <linux/time.h>
    #include <linux/mca.h>
    +#include <linux/platform_device.h>

    #include <asm/arch_hooks.h>
    #include <asm/hpet.h>
    @@ -135,3 +136,21 @@ void __init time_init(void)
    tsc_init();
    late_time_init = choose_time_init();
    }
    +
    +
    +#ifdef CONFIG_RTC_DRV_EFI
    +static struct platform_device rtc_efi_dev = {
    + .name = "rtc-efi",
    + .id = -1,
    +};
    +
    +static int __init rtc_init(void)
    +{
    + if (platform_device_register(&rtc_efi_dev) < 0)
    + printk(KERN_ERR "unable to register rtc device...\n");
    +
    + /* not necessarily an error */
    + return 0;
    +}
    +module_init(rtc_init);
    +#endif
    --- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
    +++ b/arch/x86/kernel/time_64.c 2009-03-26 13:06:19.000000000 -0400
    @@ -18,6 +18,7 @@
    #include <linux/time.h>
    #include <linux/mca.h>
    #include <linux/nmi.h>
    +#include <linux/platform_device.h>

    #include <asm/i8253.h>
    #include <asm/hpet.h>
    @@ -135,3 +136,20 @@ void __init time_init(void)

    late_time_init = choose_time_init();
    }
    +
    +#ifdef CONFIG_RTC_DRV_EFI
    +static struct platform_device rtc_efi_dev = {
    + .name = "rtc-efi",
    + .id = -1,
    +};
    +
    +static int __init rtc_init(void)
    +{
    + if (platform_device_register(&rtc_efi_dev) < 0)
    + printk(KERN_ERR "unable to register rtc device...\n");
    +
    + /* not necessarily an error */
    + return 0;
    +}
    +module_init(rtc_init);
    +#endif
    \
     
     \ /
      Last update: 2009-04-07 00:59    [W:2.617 / U:1.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site