diff options
author | Eugene Konev <ejka@openwrt.org> | 2007-03-25 05:42:16 +0000 |
---|---|---|
committer | Eugene Konev <ejka@openwrt.org> | 2007-03-25 05:42:16 +0000 |
commit | 8f80d431ddbbc5659b7f6fd65a0549db3b5ab321 (patch) | |
tree | 1bd93c920bb803af8b0d671b603dcebd74bad5da /target/linux/ar7-2.6/files/drivers | |
parent | c931a35b7663c72ed2f3aee13ffb04229767584d (diff) | |
download | master-187ad058-8f80d431ddbbc5659b7f6fd65a0549db3b5ab321.tar.gz master-187ad058-8f80d431ddbbc5659b7f6fd65a0549db3b5ab321.tar.bz2 master-187ad058-8f80d431ddbbc5659b7f6fd65a0549db3b5ab321.zip |
ar7: clocks setup (prerequisite for dsl/usb) and misc cleanups.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6693 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7-2.6/files/drivers')
-rw-r--r-- | target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c | 9 | ||||
-rw-r--r-- | target/linux/ar7-2.6/files/drivers/mtd/ar7part.c | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c b/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c index 00919e76e7..59ac693d43 100644 --- a/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c +++ b/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c @@ -70,9 +70,6 @@ typedef struct { static struct semaphore open_semaphore; static unsigned expect_close; -/* XXX correct? assumed to be sysfreq/2. get this dynamically ... */ -#define vbus_freq (ar7_bus_freq() / 2) - /* XXX currently fixed, allows max margin ~68.72 secs */ #define prescale_value 0xFFFF @@ -143,14 +140,14 @@ static void ar7_wdt_update_margin(int new_margin) { u32 change; - change = new_margin * (vbus_freq / prescale_value); + change = new_margin * (ar7_vbus_freq() / prescale_value); if (change < 1) change = 1; if (change > 0xFFFF) change = 0xFFFF; ar7_wdt_change(change); - margin = change * prescale_value / vbus_freq; + margin = change * prescale_value / ar7_vbus_freq(); printk(KERN_INFO DRVNAME ": timer margin %d seconds (prescale %d, change %d, freq %d)\n", - margin, prescale_value, change, vbus_freq); + margin, prescale_value, change, ar7_vbus_freq()); } static void ar7_wdt_enable_wdt(void) diff --git a/target/linux/ar7-2.6/files/drivers/mtd/ar7part.c b/target/linux/ar7-2.6/files/drivers/mtd/ar7part.c index 2b3edf67b7..0ae96a305f 100644 --- a/target/linux/ar7-2.6/files/drivers/mtd/ar7part.c +++ b/target/linux/ar7-2.6/files/drivers/mtd/ar7part.c @@ -29,6 +29,7 @@ #include <linux/mtd/partitions.h> #include <linux/bootmem.h> #include <linux/squashfs_fs.h> +#include <linux/root_dev.h> struct ar7_bin_rec { unsigned int checksum; @@ -108,6 +109,7 @@ static int create_mtd_partitions(struct mtd_info *master, ar7_parts[p - 1].size -= ar7_parts[p].size; ar7_parts[p - 1].mask_flags |= MTD_WRITEABLE; ar7_parts[p++].mask_flags = 0; + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, p - 1); } else { printk("Squashfs not found. Moving rootfs partition to next erase block\n"); if ((root_offset % master->erasesize) > 0) @@ -116,6 +118,7 @@ static int create_mtd_partitions(struct mtd_info *master, ar7_parts[p].offset = root_offset; ar7_parts[p].size = master->size - root_offset - post_size; + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, p); } *pparts = ar7_parts; return p; |