Skip to content

Commit 95ef715

Browse files
committed
Merge tag 'ixp4xx-arm-soc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/soc
This is a major chunk of IXP4xx modernization: - Fist we move some registers around to make room for the predetermined PCI I/O space. - Then we add some Kconfig options to make it possible to use the old PCI driver in parallell with the new shiny one. - Then we add the new PCI driver and some bindings for it. - On top of this we add an (ages old) patch from Arnd that centralize the CPU/SoC detection in drivers/soc and make the header a standard Linux header to avoid the <mach/*> business in drivers. - Then we split out and modernize some platform data headers for pata, and hwrandom, and top it up with DT bindings and support for hwrandom. * tag 'ixp4xx-arm-soc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ixp4xx: fix spelling mistake in Kconfig "Devce" -> "Device" hw_random: ixp4xx: Add OF support hw_random: ixp4xx: Add DT bindings hw_random: ixp4xx: Turn into a module hw_random: ixp4xx: Use SPDX license tag hw_random: ixp4xx: enable compile-testing pata: ixp4xx: split platform data to its own header soc: ixp4xx: move cpu detection to linux/soc/ixp4xx/cpu.h PCI: ixp4xx: Add a new driver for IXP4xx PCI: ixp4xx: Add device tree bindings for IXP4xx ARM/ixp4xx: Make NEED_MACH_IO_H optional ARM/ixp4xx: Move the virtual IObases Link: https://lore.kernel.org/r/CACRpkdbw6HSpp7k6q1FYGmtafLmdAu8bFnpHQOdfBDYYsdLbkw@mail.gmail.com Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents 6b4670a + 0da518d commit 95ef715

31 files changed

Lines changed: 1079 additions & 175 deletions

File tree

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/intel,ixp4xx-pci.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Intel IXP4xx PCI controller
8+
9+
maintainers:
10+
- Linus Walleij <linus.walleij@linaro.org>
11+
12+
description: PCI host controller found in the Intel IXP4xx SoC series.
13+
14+
allOf:
15+
- $ref: /schemas/pci/pci-bus.yaml#
16+
17+
properties:
18+
compatible:
19+
items:
20+
- enum:
21+
- intel,ixp42x-pci
22+
- intel,ixp43x-pci
23+
description: The two supported variants are ixp42x and ixp43x,
24+
though more variants may exist.
25+
26+
reg:
27+
items:
28+
- description: IXP4xx-specific registers
29+
30+
interrupts:
31+
items:
32+
- description: Main PCI interrupt
33+
- description: PCI DMA interrupt 1
34+
- description: PCI DMA interrupt 2
35+
36+
ranges:
37+
maxItems: 2
38+
description: Typically one memory range of 64MB and one IO
39+
space range of 64KB.
40+
41+
dma-ranges:
42+
maxItems: 1
43+
description: The DMA range tells the PCI host which addresses
44+
the RAM is at. It can map only 64MB so if the RAM is bigger
45+
than 64MB the DMA access has to be restricted to these
46+
addresses.
47+
48+
"#interrupt-cells": true
49+
50+
interrupt-map: true
51+
52+
interrupt-map-mask:
53+
items:
54+
- const: 0xf800
55+
- const: 0
56+
- const: 0
57+
- const: 7
58+
59+
required:
60+
- compatible
61+
- reg
62+
- dma-ranges
63+
- "#interrupt-cells"
64+
- interrupt-map
65+
- interrupt-map-mask
66+
67+
unevaluatedProperties: false
68+
69+
examples:
70+
- |
71+
pci@c0000000 {
72+
compatible = "intel,ixp43x-pci";
73+
reg = <0xc0000000 0x1000>;
74+
#address-cells = <3>;
75+
#size-cells = <2>;
76+
device_type = "pci";
77+
bus-range = <0x00 0xff>;
78+
79+
ranges =
80+
<0x02000000 0 0x48000000 0x48000000 0 0x04000000>,
81+
<0x01000000 0 0x00000000 0x4c000000 0 0x00010000>;
82+
dma-ranges =
83+
<0x02000000 0 0x00000000 0x00000000 0 0x04000000>;
84+
85+
#interrupt-cells = <1>;
86+
interrupt-map-mask = <0xf800 0 0 7>;
87+
interrupt-map =
88+
<0x0800 0 0 1 &gpio0 11 3>, /* INT A on slot 1 is irq 11 */
89+
<0x0800 0 0 2 &gpio0 10 3>, /* INT B on slot 1 is irq 10 */
90+
<0x0800 0 0 3 &gpio0 9 3>, /* INT C on slot 1 is irq 9 */
91+
<0x0800 0 0 4 &gpio0 8 3>, /* INT D on slot 1 is irq 8 */
92+
<0x1000 0 0 1 &gpio0 10 3>, /* INT A on slot 2 is irq 10 */
93+
<0x1000 0 0 2 &gpio0 9 3>, /* INT B on slot 2 is irq 9 */
94+
<0x1000 0 0 3 &gpio0 8 3>, /* INT C on slot 2 is irq 8 */
95+
<0x1000 0 0 4 &gpio0 11 3>, /* INT D on slot 2 is irq 11 */
96+
<0x1800 0 0 1 &gpio0 9 3>, /* INT A on slot 3 is irq 9 */
97+
<0x1800 0 0 2 &gpio0 8 3>, /* INT B on slot 3 is irq 8 */
98+
<0x1800 0 0 3 &gpio0 11 3>, /* INT C on slot 3 is irq 11 */
99+
<0x1800 0 0 4 &gpio0 10 3>; /* INT D on slot 3 is irq 10 */
100+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rng/intel,ixp46x-rng.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Intel IXP46x RNG bindings
8+
9+
description: |
10+
The Intel IXP46x has a random number generator at a fixed physical
11+
location in memory. Each read is guaranteed to provide a unique
12+
32 bit random number.
13+
14+
maintainers:
15+
- Linus Walleij <linus.walleij@linaro.org>
16+
17+
properties:
18+
compatible:
19+
const: intel,ixp46x-rng
20+
21+
reg:
22+
maxItems: 1
23+
24+
required:
25+
- compatible
26+
- reg
27+
28+
additionalProperties: false
29+
30+
examples:
31+
- |
32+
rng@70002100 {
33+
compatible = "intel,ixp46x-rng";
34+
reg = <0x70002100 4>;
35+
};
36+

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9252,6 +9252,7 @@ F: include/linux/soc/ixp4xx/qmgr.h
92529252
INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT
92539253
M: Deepak Saxena <dsaxena@plexity.net>
92549254
S: Maintained
9255+
F: Documentation/devicetree/bindings/display/intel,ixp46x-rng.yaml
92559256
F: drivers/char/hw_random/ixp4xx-rng.c
92569257

92579258
INTEL KEEM BAY DRM DRIVER
@@ -14015,6 +14016,12 @@ S: Maintained
1401514016
F: Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
1401614017
F: drivers/pci/controller/dwc/pcie-fu740.c
1401714018

14019+
PCI DRIVER FOR INTEL IXP4XX
14020+
M: Linus Walleij <linus.walleij@linaro.org>
14021+
S: Maintained
14022+
F: Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml
14023+
F: drivers/pci/controller/pci-ixp4xx.c
14024+
1401814025
PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD)
1401914026
M: Jonathan Derrick <jonathan.derrick@intel.com>
1402014027
L: linux-pci@vger.kernel.org

arch/arm/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ config ARCH_IXP4XX
398398
select HAVE_PCI
399399
select IXP4XX_IRQ
400400
select IXP4XX_TIMER
401-
select NEED_MACH_IO_H
401+
# With the new PCI driver this is not needed
402+
select NEED_MACH_IO_H if PCI_IXP4XX_LEGACY
402403
select USB_EHCI_BIG_ENDIAN_DESC
403404
select USB_EHCI_BIG_ENDIAN_MMIO
404405
help

arch/arm/Kconfig.debug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,8 +1813,8 @@ config DEBUG_UART_VIRT
18131813
default 0xfedc0000 if DEBUG_EP93XX
18141814
default 0xfee003f8 if DEBUG_FOOTBRIDGE_COM1
18151815
default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
1816-
default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
1817-
default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
1816+
default 0xfec00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
1817+
default 0xfec00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
18181818
default 0xfef36000 if DEBUG_HIGHBANK_UART
18191819
default 0xfefb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1
18201820
default 0xfefb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2

arch/arm/mach-ixp4xx/Kconfig

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ comment "IXP4xx Platforms"
77

88
config MACH_IXP4XX_OF
99
bool
10-
prompt "Devce Tree IXP4xx boards"
10+
prompt "Device Tree IXP4xx boards"
1111
default y
1212
select ARM_APPENDED_DTB # Old Redboot bootloaders deployed
1313
select I2C
@@ -20,15 +20,15 @@ config MACH_IXP4XX_OF
2020
config MACH_NSLU2
2121
bool
2222
prompt "Linksys NSLU2"
23-
select FORCE_PCI
23+
depends on IXP4XX_PCI_LEGACY
2424
help
2525
Say 'Y' here if you want your kernel to support Linksys's
2626
NSLU2 NAS device. For more information on this platform,
2727
see http://www.nslu2-linux.org
2828

2929
config MACH_AVILA
3030
bool "Avila"
31-
select FORCE_PCI
31+
depends on IXP4XX_PCI_LEGACY
3232
help
3333
Say 'Y' here if you want your kernel to support the Gateworks
3434
Avila Network Platform. For more information on this platform,
@@ -44,37 +44,39 @@ config MACH_LOFT
4444

4545
config ARCH_ADI_COYOTE
4646
bool "Coyote"
47-
select FORCE_PCI
47+
depends on IXP4XX_PCI_LEGACY
4848
help
4949
Say 'Y' here if you want your kernel to support the ADI
5050
Engineering Coyote Gateway Reference Platform. For more
5151
information on this platform, see <file:Documentation/arm/ixp4xx.rst>.
5252

5353
config MACH_GATEWAY7001
5454
bool "Gateway 7001"
55-
select FORCE_PCI
55+
depends on IXP4XX_PCI_LEGACY
5656
help
5757
Say 'Y' here if you want your kernel to support Gateway's
5858
7001 Access Point. For more information on this platform,
5959
see http://openwrt.org
6060

6161
config MACH_WG302V2
6262
bool "Netgear WG302 v2 / WAG302 v2"
63-
select FORCE_PCI
63+
depends on IXP4XX_PCI_LEGACY
6464
help
6565
Say 'Y' here if you want your kernel to support Netgear's
6666
WG302 v2 or WAG302 v2 Access Points. For more information
6767
on this platform, see http://openwrt.org
6868

6969
config ARCH_IXDP425
7070
bool "IXDP425"
71+
depends on IXP4XX_PCI_LEGACY
7172
help
7273
Say 'Y' here if you want your kernel to support Intel's
7374
IXDP425 Development Platform (Also known as Richfield).
7475
For more information on this platform, see <file:Documentation/arm/ixp4xx.rst>.
7576

7677
config MACH_IXDPG425
7778
bool "IXDPG425"
79+
depends on IXP4XX_PCI_LEGACY
7880
help
7981
Say 'Y' here if you want your kernel to support Intel's
8082
IXDPG425 Development Platform (Also known as Montajade).
@@ -120,7 +122,7 @@ config ARCH_PRPMC1100
120122
config MACH_NAS100D
121123
bool
122124
prompt "NAS100D"
123-
select FORCE_PCI
125+
depends on IXP4XX_PCI_LEGACY
124126
help
125127
Say 'Y' here if you want your kernel to support Iomega's
126128
NAS 100d device. For more information on this platform,
@@ -129,7 +131,7 @@ config MACH_NAS100D
129131
config MACH_DSMG600
130132
bool
131133
prompt "D-Link DSM-G600 RevA"
132-
select FORCE_PCI
134+
depends on IXP4XX_PCI_LEGACY
133135
help
134136
Say 'Y' here if you want your kernel to support D-Link's
135137
DSM-G600 RevA device. For more information on this platform,
@@ -143,7 +145,7 @@ config ARCH_IXDP4XX
143145
config MACH_FSG
144146
bool
145147
prompt "Freecom FSG-3"
146-
select FORCE_PCI
148+
depends on IXP4XX_PCI_LEGACY
147149
help
148150
Say 'Y' here if you want your kernel to support Freecom's
149151
FSG-3 device. For more information on this platform,
@@ -152,7 +154,7 @@ config MACH_FSG
152154
config MACH_ARCOM_VULCAN
153155
bool
154156
prompt "Arcom/Eurotech Vulcan"
155-
select FORCE_PCI
157+
depends on IXP4XX_PCI_LEGACY
156158
help
157159
Say 'Y' here if you want your kernel to support Arcom's
158160
Vulcan board.
@@ -173,7 +175,7 @@ config CPU_IXP43X
173175
config MACH_GTWX5715
174176
bool "Gemtek WX5715 (Linksys WRV54G)"
175177
depends on ARCH_IXP4XX
176-
select FORCE_PCI
178+
depends on IXP4XX_PCI_LEGACY
177179
help
178180
This board is currently inside the Linksys WRV54G Gateways.
179181

@@ -196,7 +198,7 @@ config MACH_DEVIXP
196198

197199
config MACH_MICCPT
198200
bool "Omicron MICCPT"
199-
select FORCE_PCI
201+
depends on IXP4XX_PCI_LEGACY
200202
help
201203
Say 'Y' here if you want your kernel to support the MICCPT
202204
board from OMICRON electronics GmbH.
@@ -209,9 +211,16 @@ config MACH_MIC256
209211

210212
comment "IXP4xx Options"
211213

214+
config IXP4XX_PCI_LEGACY
215+
bool "IXP4xx legacy PCI driver support"
216+
depends on PCI
217+
help
218+
Selects legacy PCI driver.
219+
Not recommended for new development.
220+
212221
config IXP4XX_INDIRECT_PCI
213222
bool "Use indirect PCI memory access"
214-
depends on PCI
223+
depends on IXP4XX_PCI_LEGACY
215224
help
216225
IXP4xx provides two methods of accessing PCI memory space:
217226

arch/arm/mach-ixp4xx/avila-setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/tty.h>
2020
#include <linux/serial_8250.h>
2121
#include <linux/gpio/machine.h>
22+
#include <linux/platform_data/pata_ixp4xx_cf.h>
2223
#include <asm/types.h>
2324
#include <asm/setup.h>
2425
#include <asm/memory.h>

0 commit comments

Comments
 (0)