aboutsummaryrefslogtreecommitdiffstats
path: root/target/Config.in
Commit message (Expand)AuthorAgeFilesLines
* add nommu target feature flagFelix Fietkau2009-08-211-0/+3
* add a heavily cleaned up version of ubicom32 toolchain supportFelix Fietkau2009-08-211-0/+5
* powerpc: Create a powerpc64 config featureGeoff Levand2009-08-181-0/+3
* add preliminary coldfire v4e supportImre Kaloz2009-06-211-0/+4
* missing changes for pcie handlingImre Kaloz2009-06-021-0/+3
* add a modified version of the mips64 patch from #4603Felix Fietkau2009-04-181-0/+9
* Add FEATURE ramdisk to be able to select the use of INITRAMFS for a sub-targetHamish Guthrie2009-03-181-0/+3
* add new target feature option for fpuImre Kaloz2008-06-031-0/+3
* add a gpio feature for devices supporting the generic GPIO interfaceNicolas Thill2008-04-201-0/+3
* add feature flag for the cpio.gz supportGabor Juhos2008-01-291-0/+3
* add feature flag for display support. will be used as dependency for x.orgFelix Fietkau2007-10-251-0/+3
* more dependency fixesFelix Fietkau2007-07-231-6/+0
* Add a USES_TGZ config.in variable, so that RB1xx profiles can use itFlorian Fainelli2007-07-181-0/+3
* added i686 support and profile for t-vision s100John Crispin2007-07-081-1/+5
* add support for the AVR32 platform, namely the ATNGW100 board - joint work wi...Imre Kaloz2007-06-081-0/+5
* mark uml as broken and add some cleanups (not working yet)Felix Fietkau2007-02-281-0/+4
* disable the image builder in menuconfig for profiles with custom kernel configsFelix Fietkau2007-02-221-0/+3
* add missing VIDEO_SUPPORT optionFelix Fietkau2007-01-211-0/+3
* implement target profiles in menuconfigFelix Fietkau2006-11-121-59/+0
* fix default targetFelix Fietkau2006-11-121-0/+1
* make target/linux/* directories self-contained, use the selected kernel versi...Felix Fietkau2006-11-111-138/+1
* rename the xscale target to ixp4xx for the forthcoming iop target, add gcc 4....Imre Kaloz2006-10-271-2/+2
* add ATM_SUPPORT flagFelix Fietkau2006-10-171-0/+6
* add USES_EXT2 flag for target platformsFelix Fietkau2006-10-171-0/+4
* Merge preliminary rdc-2.6 support (Airlink101 AR525W)Florian Fainelli2006-10-151-0/+10
* enable jffs2 by default on x86-2.6Felix Fietkau2006-10-081-0/+1
* remove x86-2.4Felix Fietkau2006-10-071-11/+0
* fix default ARCH settingNicolas Thill2006-10-071-1/+2
* move BIG_ENDIAN selection to arch configsFelix Fietkau2006-10-031-7/+6
* clean up filesystem selctionFelix Fietkau2006-09-231-1/+20
* enable squashfs in the magicbox kernel (not used yet), magicbox build now no ...Felix Fietkau2006-09-051-1/+0
* introduce USB_SUPPORT, clean up some dependenciesImre Kaloz2006-08-271-0/+13
* add basic support for the Magicbox boardsImre Kaloz2006-08-251-7/+8
* mark 63xx as broken until the platform is readyMike Baker2006-08-101-0/+1
* add XScale support to -ngImre Kaloz2006-08-061-17/+16
* au1000 has pci support, but no pcmciaFelix Fietkau2006-07-311-1/+1
* introduce new BROKEN menuconfig option for hiding known broken settingsMike Baker2006-07-251-0/+11
* UML target completed. Added ext2 target fs for use with uml imagesGerry Rozema2006-07-201-0/+8
* Fancy name for au1000 targetFlorian Fainelli2006-07-021-1/+1
* Merge premilinary Broadcom 63xx support (Livebox, Siemens SE515...)Florian Fainelli2006-06-261-0/+10
* add rb532 supportFelix Fietkau2006-06-151-0/+6
* resync with kamikazeFelix Fietkau2006-05-301-0/+9
* fix BR2_ and CONFIG_ issuesMike Baker2006-05-121-2/+2
* more cleanups and a new menuconfig generatorFelix Fietkau2006-04-211-1/+1
* menuconfig cleanupFelix Fietkau2006-04-201-52/+131
* Move ueagle to the main kernel config since it is in stock kernelFlorian Fainelli2006-04-121-2/+2
* Add initial support for AMD Alchemy 1500 boards (4G-Systems AccessCube). Than...Florian Fainelli2006-04-101-0/+9
* fix ipsec-tools dependenciesFelix Fietkau2006-04-081-0/+8
* reenable unsupported targets on DEVELOPER=1, add binutils 2.16.91.0.6 and a m...Imre Kaloz2006-03-061-6/+50
* make target selection nicer, choose arch automaticallyImre Kaloz2006-01-131-7/+8
class="gi">+ dt->tm_min = buf[RTC7301_MIN] + buf[RTC7301_MIN10]*10; + dt->tm_hour = buf[RTC7301_HOUR] + buf[RTC7301_HOUR10]*10; + + dt->tm_mday = buf[RTC7301_DAY] + buf[RTC7301_DAY10]*10; + dt->tm_mon = buf[RTC7301_MON] + buf[RTC7301_MON10]*10 - 1; + dt->tm_year = buf[RTC7301_YEAR] + buf[RTC7301_YEAR10]*10 + + buf[RTC7301_YEAR100]*100 + + ((buf[RTC7301_YEAR1000] & 3)*1000) - 1900; + + /* the rtc device may contain illegal values on power up + * according to the data sheet. make sure they are valid. + */ + + return rtc_valid_tm(dt); +} + +static int rtc7301_set_datetime(struct device *dev, struct rtc_time *dt) +{ + int data; + + data = dt->tm_year + 1900; + if (data >= 2100 || data < 1900) + return -EINVAL; + + write_reg(RTC7301_CTRLREG, 2); + udelay(122); + + data = bin2bcd(dt->tm_sec); + write_reg(RTC7301_SEC, data); + write_reg(RTC7301_SEC10, (data >> 4)); + + data = bin2bcd(dt->tm_min); + write_reg(RTC7301_MIN, data ); + write_reg(RTC7301_MIN10, (data >> 4)); + + data = bin2bcd(dt->tm_hour); + write_reg(RTC7301_HOUR, data); + write_reg(RTC7301_HOUR10, (data >> 4)); + + data = bin2bcd(dt->tm_mday); + write_reg(RTC7301_DAY, data); + write_reg(RTC7301_DAY10, (data>> 4)); + + data = bin2bcd(dt->tm_mon + 1); + write_reg(RTC7301_MON, data); + write_reg(RTC7301_MON10, (data >> 4)); + + data = bin2bcd(dt->tm_year % 100); + write_reg(RTC7301_YEAR, data); + write_reg(RTC7301_YEAR10, (data >> 4)); + data = bin2bcd((1900 + dt->tm_year) / 100); + write_reg(RTC7301_YEAR100, data); + + data = bin2bcd(dt->tm_wday); + write_reg(RTC7301_WEEKDAY, data); + + write_reg(RTC7301_CTRLREG, 0); + + return 0; +} + +static const struct rtc_class_ops rtc7301_rtc_ops = { + .read_time = rtc7301_get_datetime, + .set_time = rtc7301_set_datetime, +}; + +static int __devinit rtc7301_probe(struct platform_device *pdev) +{ + struct rtc_device *rtc; + struct resource *res; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENOENT; + + rtc7301_base = ioremap_nocache(res->start, 0x1000 /*res->end - res->start + 1*/); + if (!rtc7301_base) + return -EINVAL; + + rtc = rtc_device_register(RTC_NAME, &pdev->dev, + &rtc7301_rtc_ops, THIS_MODULE); + if (IS_ERR(rtc)) { + iounmap(rtc7301_base); + return PTR_ERR(rtc); + } + + platform_set_drvdata(pdev, rtc); + + rtc7301_init_settings(); + return 0; +} + +static int __devexit rtc7301_remove(struct platform_device *pdev) +{ + struct rtc_device *rtc = platform_get_drvdata(pdev); + + if (rtc) + rtc_device_unregister(rtc); + if (rtc7301_base) + iounmap(rtc7301_base); + return 0; +} + +static struct platform_driver rtc7301_driver = { + .driver = { + .name = RTC_NAME, + .owner = THIS_MODULE, + }, + .probe = rtc7301_probe, + .remove = __devexit_p(rtc7301_remove), +}; + +static __init int rtc7301_init(void) +{ + return platform_driver_register(&rtc7301_driver); +} +module_init(rtc7301_init); + +static __exit void rtc7301_exit(void) +{ + platform_driver_unregister(&rtc7301_driver); +} +module_exit(rtc7301_exit); + +MODULE_DESCRIPTION("Epson 7301 RTC driver"); +MODULE_AUTHOR("Jose Vasconcellos <jvasco@verizon.net>"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" RTC_NAME); +MODULE_VERSION(RTC_VERSION);