Mercurial > hg > aboriginal
annotate sources/patches/linux-arm.patch @ 1610:c756b708583f 1.2.4
Make the arm board work under qemu 1.5.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 07 Jul 2013 22:03:18 -0500 |
parents | 3cbf1abde44a |
children | 1b2017d3ecf5 |
rev | line source |
---|---|
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 Make the "Arm Versatile" board even more versatile, for QEMU, which can |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 stick weird processors into things that were never rmeant to receive them. |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
4 In addition, fix breakage in 3.5 that adjusted versatile's interrupts to |
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
5 match the spec instead of matching what qemu supports. (It only _ever_ ran |
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
6 under qemu, nobody seems to have classic versatile hardware anymore, so...) |
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
7 |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
8 diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
9 index c1f38f6..fe5738c 100644 |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
10 --- a/arch/arm/mach-versatile/Kconfig |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
11 +++ b/arch/arm/mach-versatile/Kconfig |
1570 | 12 @@ -4,7 +4,6 @@ menu "Versatile platform type" |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
13 config ARCH_VERSATILE_PB |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
14 bool "Support Versatile Platform Baseboard for ARM926EJ-S" |
1570 | 15 default y |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
16 - select CPU_ARM926T |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
17 select MIGHT_HAVE_PCI |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
18 help |
1570 | 19 Include support for the ARM(R) Versatile Platform Baseboard |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
20 @@ -12,7 +11,6 @@ config ARCH_VERSATILE_PB |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
21 |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
22 config MACH_VERSATILE_AB |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
23 bool "Support Versatile Application Baseboard for ARM926EJ-S" |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
24 - select CPU_ARM926T |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
25 help |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
26 Include support for the ARM(R) Versatile Application Baseboard |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
27 for the ARM926EJ-S. |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
28 diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
29 index 101b968..70de9fd 100644 |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
30 --- a/arch/arm/mm/Kconfig |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
31 +++ b/arch/arm/mm/Kconfig |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
32 @@ -71,7 +71,7 @@ config CPU_ARM9TDMI |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 # ARM920T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 config CPU_ARM920T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 - bool "Support ARM920T processor" if ARCH_INTEGRATOR |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 + bool "Support ARM920T processor" if ARCH_INTEGRATOR || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
38 select CPU_32v4T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
39 select CPU_ABRT_EV4T |
1570 | 40 select CPU_CACHE_V4WT |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
41 @@ -89,7 +89,7 @@ config CPU_ARM920T |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
42 |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
43 # ARM922T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
44 config CPU_ARM922T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
45 - bool "Support ARM922T processor" if ARCH_INTEGRATOR |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
46 + bool "Support ARM922T processor" if ARCH_INTEGRATOR || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
47 select CPU_32v4T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
48 select CPU_ABRT_EV4T |
1570 | 49 select CPU_CACHE_V4WT |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
50 @@ -127,7 +127,7 @@ config CPU_ARM925T |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
51 |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
52 # ARM926T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
53 config CPU_ARM926T |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
54 - bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
55 + bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
56 select CPU_32v5 |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
57 select CPU_ABRT_EV5TJ |
1570 | 58 select CPU_CACHE_VIVT |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
59 @@ -135,6 +135,7 @@ config CPU_ARM926T |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
60 select CPU_CP15_MMU |
1570 | 61 select CPU_PABRT_LEGACY |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
62 select CPU_TLB_V4WBI if MMU |
1570 | 63 + select ARCH_SUPPORTS_BIG_ENDIAN |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
64 help |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
65 This is a variant of the ARM920. It has slightly different |
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
66 instruction sequences for cache and TLB operations. Curiously, |
1534
418a7e78cfe1
Make arm versatile work again.
Rob Landley <rob@landley.net>
parents:
1365
diff
changeset
|
67 @@ -354,7 +355,8 @@ config CPU_PJ4 |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
68 |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
69 # ARMv6 |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
70 config CPU_V6 |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
71 - bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
72 + bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB |
1329
c52b7a665f31
Update busybox, and update uClibc and linux to test versions that should ship soon. Update patches directory to match.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
73 + |
1365
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
74 select CPU_32v6 |
f6153a16bfad
Fix armv6l, for details see http://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg00829.html
Rob Landley <rob@landley.net>
parents:
1359
diff
changeset
|
75 select CPU_ABRT_EV6 |
1570 | 76 select CPU_CACHE_V6 |
77 diff -ruN linux/arch/arm/mach-versatile/Kconfig linux.new/arch/arm/mach-versatile/Kconfig | |
78 --- linux/arch/arm/mach-versatile/Kconfig 2012-12-03 00:24:33.494770199 -0600 | |
79 +++ linux.new/arch/arm/mach-versatile/Kconfig 2012-12-03 00:17:31.172705566 -0600 | |
80 @@ -1,6 +1,12 @@ | |
81 menu "Versatile platform type" | |
82 depends on ARCH_VERSATILE | |
83 | |
84 +if ARCH_VERSATILE | |
85 +config ARCH_SUPPORTS_BIG_ENDIAN | |
86 + bool | |
87 + default y | |
88 +endif | |
89 + | |
90 config ARCH_VERSATILE_PB | |
91 bool "Support Versatile Platform Baseboard for ARM926EJ-S" | |
92 default y | |
1610
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
93 diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
94 index e92e5e0..807a5ad 100644 |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
95 --- a/arch/arm/mach-versatile/pci.c |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
96 +++ b/arch/arm/mach-versatile/pci.c |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
97 @@ -333,7 +333,13 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
1598 | 98 * 26 1 IRQ_SIC_PCI2 |
99 * 27 1 IRQ_SIC_PCI3 | |
1588
7bf850767bb8
The arm guys have now screwed up the ARM versatile board's IRQ routing three consecutive times. I'm impressed.
Rob Landley <rob@landley.net>
parents:
1570
diff
changeset
|
100 */ |
1598 | 101 - irq = IRQ_SIC_PCI0 + ((slot - 24 + pin - 1) & 3); |
1610
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
102 + // Hit QEMU 1.5.0 and later with a brick so it uses the IRQ we say. |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
103 + dev->bus->ops->write(dev->bus, dev->devfn, PCI_INTERRUPT_LINE, 1, 27); |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
104 + |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
105 + // The kernel has no clue where IRQs are, and its current assignments |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
106 + // match neither the hardware nor historic QEMU. Use historic QEMU |
c756b708583f
Make the arm board work under qemu 1.5.
Rob Landley <rob@landley.net>
parents:
1598
diff
changeset
|
107 + // for compatability with old versions. |
1598 | 108 + irq = 59; //IRQ_SIC_PCI0 + ((slot - 24 + pin - 1) & 3); |
1588
7bf850767bb8
The arm guys have now screwed up the ARM versatile board's IRQ routing three consecutive times. I'm impressed.
Rob Landley <rob@landley.net>
parents:
1570
diff
changeset
|
109 |
7bf850767bb8
The arm guys have now screwed up the ARM versatile board's IRQ routing three consecutive times. I'm impressed.
Rob Landley <rob@landley.net>
parents:
1570
diff
changeset
|
110 return irq; |
7bf850767bb8
The arm guys have now screwed up the ARM versatile board's IRQ routing three consecutive times. I'm impressed.
Rob Landley <rob@landley.net>
parents:
1570
diff
changeset
|
111 } |