Skip to content

Commit

Permalink
rtc-ds1742.c should use resource_size_t for base address
Browse files Browse the repository at this point in the history
Currently the rtc driver, rtc-ds1742.c uses an unsigned long to store the
base mmio address of the NVRAM/RTC.  This breaks on systems like PowerPC
440, which is a 32-bit core with 36-bit physical addresses: IO on the
system, including the RTC, is typically above the 4GB point, and cannot fit
into an unsigned long.

This patch fixes the problem by replacing the unsigned long with a
resource_size_t.  Tested on Ebony (PPC440) (with additional patches to
instantiate the ds1742 platform device appropriately).

Signed-off-by: David Gibson <[email protected]>
Acked-by: Atsushi Nemoto <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dgibson authored and Linus Torvalds committed Sep 19, 2007
1 parent efc63c4 commit 2e3e31c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-ds1742.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct rtc_plat_data {
void __iomem *ioaddr_rtc;
size_t size_nvram;
size_t size;
unsigned long baseaddr;
resource_size_t baseaddr;
unsigned long last_jiffies;
};

Expand Down

0 comments on commit 2e3e31c

Please sign in to comment.