From 2a2f37bd4c12122fbbcb424c7fe454e6f3512347 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 25 Sep 2012 19:28:52 +0200 Subject: [PATCH] linux: update RPi patches Signed-off-by: Stephan Raue --- ...inux-3.2.30-601-RPi_support-c14ddd0.patch} | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) rename packages/linux/patches/{linux-3.2.30-601-RPi_support-8524c78.patch => linux-3.2.30-601-RPi_support-c14ddd0.patch} (99%) diff --git a/packages/linux/patches/linux-3.2.30-601-RPi_support-8524c78.patch b/packages/linux/patches/linux-3.2.30-601-RPi_support-c14ddd0.patch similarity index 99% rename from packages/linux/patches/linux-3.2.30-601-RPi_support-8524c78.patch rename to packages/linux/patches/linux-3.2.30-601-RPi_support-c14ddd0.patch index f8d7654cc3..d878fb72d8 100644 --- a/packages/linux/patches/linux-3.2.30-601-RPi_support-8524c78.patch +++ b/packages/linux/patches/linux-3.2.30-601-RPi_support-c14ddd0.patch @@ -2674,10 +2674,10 @@ index 0000000..0aa916e +#endif diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c new file mode 100644 -index 0000000..72dcf31 +index 0000000..c9d6bd1 --- /dev/null +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -0,0 +1,867 @@ +@@ -0,0 +1,897 @@ +/* + * linux/arch/arm/mach-bcm2708/bcm2708.c + * @@ -3539,6 +3539,36 @@ index 0000000..72dcf31 +} +#endif + ++ ++/* The assembly versions in delay.S don't account for core freq changing in cpufreq driver */ ++/* Use 1MHz system timer for busy waiting */ ++void __udelay(unsigned long usecs) ++{ ++ unsigned long start = readl(__io_address(ST_BASE + 0x04)); ++ unsigned long now; ++ do { ++ now = readl(__io_address(ST_BASE + 0x04)); ++ } while ((long)(now - start) <= usecs); ++} ++ ++ ++void __const_udelay(unsigned long scaled_usecs) ++{ ++ /* want /107374, this is about 3% bigger. We know usecs is less than 2000, so shouldn't overflow */ ++ const unsigned long usecs = scaled_usecs * 10 >> 20; ++ unsigned long start = readl(__io_address(ST_BASE + 0x04)); ++ unsigned long now; ++ do { ++ now = readl(__io_address(ST_BASE + 0x04)); ++ } while ((long)(now - start) <= usecs); ++} ++ ++void __delay(int loops) ++{ ++ while (--loops > 0) ++ nop(); ++} ++ +MACHINE_START(BCM2708, "BCM2708") + /* Maintainer: Broadcom Europe Ltd. */ + .map_io = bcm2708_map_io,.init_irq = bcm2708_init_irq,.timer =