mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
2874c5fd28
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41 lines
910 B
C
41 lines
910 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* DEC platform devices.
|
|
*
|
|
* Copyright (c) 2014 Maciej W. Rozycki
|
|
*/
|
|
|
|
#include <linux/ioport.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/mc146818rtc.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
static struct resource dec_rtc_resources[] = {
|
|
{
|
|
.name = "rtc",
|
|
.flags = IORESOURCE_MEM,
|
|
},
|
|
};
|
|
|
|
static struct cmos_rtc_board_info dec_rtc_info = {
|
|
.flags = CMOS_RTC_FLAGS_NOFREQ,
|
|
.address_space = 64,
|
|
};
|
|
|
|
static struct platform_device dec_rtc_device = {
|
|
.name = "rtc_cmos",
|
|
.id = PLATFORM_DEVID_NONE,
|
|
.dev.platform_data = &dec_rtc_info,
|
|
.resource = dec_rtc_resources,
|
|
.num_resources = ARRAY_SIZE(dec_rtc_resources),
|
|
};
|
|
|
|
static int __init dec_add_devices(void)
|
|
{
|
|
dec_rtc_resources[0].start = RTC_PORT(0);
|
|
dec_rtc_resources[0].end = RTC_PORT(0) + dec_kn_slot_size - 1;
|
|
return platform_device_register(&dec_rtc_device);
|
|
}
|
|
|
|
device_initcall(dec_add_devices);
|