Driver rtc cmos needs updating

Signed-off-by: David Brownell --- drivers/rtc/rtc-cmos.c | 129 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 117 insertions(+), 12 deletions(-) --- g26.orig/drivers/rtc/rtc-cmos.c 2007-11-05 .000000000 -0800 +++ g26/drivers/rtc/rtc-cmos.c 2007-11-05 .000000000 -0800 @@ -393,6 +393,80 @@ static const struct rtc_class_ops cmos_r /*----------------------------------------------------------------*/ +/* + * All these chips have at least 64 bytes of address space, shared by + * RTC registers and NVRAM.Most of those bytes of NVRAM are used + * by boot firmware. + */ + +#define NVRAM_OFFSET (RTC_REG_D + 1) + +static ssize_t +cmos_nvram_read(struct kobject *kobj, struct bin_attribute *attr, + char *buf, loff_t off, size_t count) +{ + int retval; + + if (unlikely(off size - off; + + spin_lock_irq(&rtc_lock); + for (retval = 0, off += NVRAM_OFFSET; count--; retval++, off++) + *buf++ = CMOS_READ(off); + spin_unlock_irq(&rtc_lock); + + return retval; +} + +static ssize_t +cmos_nvram_write(struct kobject *kobj, struct bin_attribute *attr, + char *buf, loff_t off, size_t count) +{ + struct cmos_rtc *cmos; + int retval; + + cmos = dev_get_drvdata(container_of(kobj, struct device, kobj)); + if (unlikely(off size - off; + + /* NOTE: on at least PCs and Ataris, the boot firmware uses a + * checksum on part of the NVRAM data. If userspace is smart enough to know what fields of + * NVRAM to update, updating checksums is also part of its job.+ */ + spin_lock_irq(&rtc_lock); + for (retval = 0, off += NVRAM_OFFSET; count--; retval++, off++) { + /* don't trash RTC registers */ + if (off == cmos-century) + buf++; + else + CMOS_WRITE(*buf++, off); + } + spin_unlock_irq(&rtc_lock); + + return retval; +} + +static struct bin_attribute nvram = { + = { + = "nvram", + = S_IRUGO | S_IWUSR, + .owner = THIS_MODULE, + }, + + = cmos_nvram_read, + .write = cmos_nvram_write, + /* size gets set up later */ +}; + +/*----------------------------------------------------------------*/ + static struct cmos_rtc cmos_rtc; static irqreturn_t cmos_interrupt(int irq, void *p) @@ -412,11 +486,9 @@ static irqreturn_t cmos_interrupt(int ir } #ifdef CONFIG_PNP -#define is_pnp() 1 #define INITSECTION #else -#define is_pnp() 0 #define INITSECTION __init #endif @@ -426,6 +498,7 @@ cmos_do_probe(struct device *dev, struct struct cmos_rtc_board_info *info = dev-platform_data; int retval = 0; unsigned char rtc_control; + unsigned address_space; /* there can be only one ...*/ if (cmos_rtc.dev) @@ -450,15 +523,36 @@ cmos_do_probe(struct device *dev, struct cmos_= rtc_irq; cmos_rtc.iomem = ports; + /* Heuristic to deduce NVRAM size ...

The primary impact of that limitation is that Linux can't access the uppermost 128 bytes of NVRAM on many systems.Note that this isn't aiming to be a drop-in replacement for the legacy /dev/nvram support.(Presumably that has real users, and isn't just getting carried forward automatically?) Userspace handles more work: - When userspace code updates NVRAM, that will need to include updating any platform-specific checksums that may apply.- No /proc/driver/nvram file will parse and display NVRAM data according to whichever boot firmware your board expects.

Search for driver rtc cmos needs updating:

driver rtc cmos needs updating-61driver rtc cmos needs updating-3driver rtc cmos needs updating-65

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “driver rtc cmos needs updating”

  1. Fred Burks – Former State Department Interpreter for Presidents George W. Michael Springmann – Former career Foreign Service Officer with the State Department and the International Foreign Trade Administration of the Commerce Department. Johnson – Elected Member, Arizona State Legislature 1997 - present. Co-Chairman: Joint Legislative Committee on Children and Family Services. Member and former Chair, Hollis/Brookline School Board (COOP), 2004 - present, 1963 - 1971. Former State Research Forester, New Hampshire Division of Forests and Lands. Also serves as a Member of the following committees: Sanitation & Solid Waste Management; Education; Land Use; Mental Health, Mental Retardation, Alcoholism, Drug Abuse & Disability Services; Zoning & Franchises.

  2. .pdfmeridith baer nudejapanese lingerie shop changing room collection b.mpgnaturilistsbig dicks in kyle txlexus locklear clippeshawar sexy girlsfree henetaiteendreams natalianylon sex tvadultamesyoutube severina porn movie for watching without downloadingfucking granny incessvagina made out of household itemscomtubehanoi pornbo derek nude videochild sekscartoongay self sexteacherporn.com