diff options
author | John Crispin <blogic@openwrt.org> | 2015-07-17 12:48:39 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-07-17 12:48:39 +0000 |
commit | 5557174f793f95c1026b5412e721daa083a77e24 (patch) | |
tree | f7241e26cb7a88d2490021a1c2053c088d4a5256 /target/linux/brcm2708/patches-4.1/0073-platform-Add-force_core-command-line-setting-to-boot.patch | |
parent | 0ac89d02198acd85904e22559a0936c70fbfb294 (diff) | |
download | master-187ad058-5557174f793f95c1026b5412e721daa083a77e24.tar.gz master-187ad058-5557174f793f95c1026b5412e721daa083a77e24.tar.bz2 master-187ad058-5557174f793f95c1026b5412e721daa083a77e24.zip |
brcm2708: add linux 4.1 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46399 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-4.1/0073-platform-Add-force_core-command-line-setting-to-boot.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.1/0073-platform-Add-force_core-command-line-setting-to-boot.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.1/0073-platform-Add-force_core-command-line-setting-to-boot.patch b/target/linux/brcm2708/patches-4.1/0073-platform-Add-force_core-command-line-setting-to-boot.patch new file mode 100644 index 0000000000..83f5bbf3d8 --- /dev/null +++ b/target/linux/brcm2708/patches-4.1/0073-platform-Add-force_core-command-line-setting-to-boot.patch @@ -0,0 +1,69 @@ +From 8a609b1977da490cd177740e61169444383fd8c4 Mon Sep 17 00:00:00 2001 +From: popcornmix <popcornmix@gmail.com> +Date: Tue, 16 Jun 2015 17:47:27 +0100 +Subject: [PATCH 073/121] platform: Add force_core command line setting to boot + from a different core number + +--- + arch/arm/mach-bcm2709/armctrl.c | 17 ++++++++++++++++- + arch/arm/mach-bcm2709/bcm2709.c | 2 ++ + 2 files changed, 18 insertions(+), 1 deletion(-) + +--- a/arch/arm/mach-bcm2709/armctrl.c ++++ b/arch/arm/mach-bcm2709/armctrl.c +@@ -45,6 +45,8 @@ static unsigned int remap_irqs[(INTERRUP + INTERRUPT_VC_ARASANSDIO + }; + ++extern unsigned force_core; ++ + static void armctrl_mask_irq(struct irq_data *d) + { + static const unsigned int disables[4] = { +@@ -92,7 +94,13 @@ static void armctrl_unmask_irq(struct ir + int i; + if (d->irq >= FIQ_START) { + unsigned int data; +- if (num_online_cpus() > 1) { ++ if (force_core) { ++ data = readl(__io_address(ARM_LOCAL_GPU_INT_ROUTING)); ++ data &= ~0xc; ++ data |= ((force_core-1) << 2); ++ writel(data, __io_address(ARM_LOCAL_GPU_INT_ROUTING)); ++ } ++ else if (num_online_cpus() > 1) { + data = readl(__io_address(ARM_LOCAL_GPU_INT_ROUTING)); + data &= ~0xc; + data |= (1 << 2); +@@ -119,6 +127,13 @@ static void armctrl_unmask_irq(struct ir + } + #endif + } else if (d->irq >= ARM_IRQ1_BASE && d->irq < ARM_IRQ_LOCAL_BASE) { ++ if (force_core) { ++ unsigned int data; ++ data = readl(__io_address(ARM_LOCAL_GPU_INT_ROUTING)); ++ data &= ~0x3; ++ data |= ((force_core-1) << 0); ++ writel(data, __io_address(ARM_LOCAL_GPU_INT_ROUTING)); ++ } + unsigned int data = (unsigned int)irq_get_chip_data(d->irq); + writel(1 << (data & 0x1f), __io_address(enables[(data >> 5) & 0x3])); + } else if (d->irq == INTERRUPT_ARM_LOCAL_PMU_FAST) { +--- a/arch/arm/mach-bcm2709/bcm2709.c ++++ b/arch/arm/mach-bcm2709/bcm2709.c +@@ -96,6 +96,7 @@ static unsigned w1_gpio_pin = W1_GPIO; + static unsigned w1_gpio_pullup = W1_PULLUP; + static bool vc_i2c_override = false; + static int pps_gpio_pin = -1; ++unsigned force_core; + + static unsigned use_dt = 0; + +@@ -1305,6 +1306,7 @@ MACHINE_START(BCM2708, "BCM2709") + .dt_compat = bcm2709_compat, + MACHINE_END + ++module_param(force_core, uint, 0644); + module_param(boardrev, uint, 0644); + module_param(serial, uint, 0644); + module_param(uart_clock, uint, 0644); |