[PATCH] firewire-ohci: work around oversized DMA reads on JMicron controllers

2017-11-03 Thread Hector Martin
do unconditionally for controllers in case others have the same behavior. Signed-off-by: Hector Martin --- drivers/firewire/ohci.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 8bf89267dc25..d731b413cb2c 100644

[PATCH v2 00/25] Apple M1 SoC platform bring-up

2021-02-15 Thread Hector Martin
support * Fixed many style issues, bugs, and other nits Note: this keeps the `apple,arm-platform` compatible, which is now used to gate the OF nonposted-mmio logic to Apple platforms only. Hector Martin (24): dt-bindings: vendor-prefixes: Add apple prefix dt-bindings: arm: apple: Add bindings for Ap

[PATCH v2 02/25] dt-bindings: arm: apple: Add bindings for Apple ARM platforms

2021-02-15 Thread Hector Martin
This introduces bindings for all three 2020 Apple M1 devices: * apple,j274 - Mac mini (M1, 2020) * apple,j293 - MacBook Pro (13-inch, M1, 2020) * apple,j313 - MacBook Air (M1, 2020) Signed-off-by: Hector Martin --- .../devicetree/bindings/arm/apple.yaml| 36

[PATCH v2 01/25] dt-bindings: vendor-prefixes: Add apple prefix

2021-02-15 Thread Hector Martin
This is different from the legacy AAPL prefix used on PPC, but consensus is that we prefer `apple` for these new platforms. Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree

[PATCH v2 03/25] dt-bindings: arm: cpus: Add apple,firestorm & icestorm compatibles

2021-02-15 Thread Hector Martin
These are the CPU cores in the "Apple Silicon" M1 SoC. Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/arm/cpus.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.

[PATCH v2 06/25] arm64: arch_timer: implement support for interrupt-names

2021-02-15 Thread Hector Martin
This allows the devicetree to correctly represent the available set of timers, which varies from device to device, without the need for fake dummy interrupts for unavailable slots. Also add the hyp-virt timer/PPI, which is not currently used, but worth representing. Signed-off-by: Hector Martin

[PATCH v2 05/25] dt-bindings: timer: arm,arch_timer: Add interrupt-names support

2021-02-15 Thread Hector Martin
code can pick the right one. This also adds the hyp-virt timer/interrupt, which was previously not expressed in the fixed 4-interrupt form. Signed-off-by: Hector Martin --- .../devicetree/bindings/timer/arm,arch_timer.yaml | 14 ++ 1 file changed, 14 insertions(+) diff --git a

[PATCH v2 04/25] arm64: cputype: Add CPU implementor & types for the Apple M1 cores

2021-02-15 Thread Hector Martin
The implementor will be used to condition the FIQ support quirk. The specific CPU types are not used at the moment, but let's add them for documentation purposes. Signed-off-by: Hector Martin --- arch/arm64/include/asm/cputype.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH v2 10/25] asm-generic/io.h: Add a non-posted variant of ioremap()

2021-02-15 Thread Hector Martin
introducing devm_ioremap_np(), and making devm_ioremap_resource() automatically select this variant when the resource has the IORESOURCE_MEM_NONPOSTED flag set. Signed-off-by: Hector Martin --- include/asm-generic/io.h | 8 +++- include/linux/io.h | 2 ++ include/linux/ioport.h | 1

[PATCH v2 07/25] arm64: cpufeature: Add a feature for FIQ support

2021-02-15 Thread Hector Martin
need FIQs, or if newer SoCs are released without the FIQ requirement, we can revisit the condition. Signed-off-by: Hector Martin --- arch/arm64/Kconfig | 11 +++ arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/kernel/cpufeature.c | 14 ++ 3 files changed

[PATCH v2 08/25] arm64: Always keep DAIF.[IF] in sync

2021-02-15 Thread Hector Martin
discriminate between IRQs and FIQs by checking the ISR_EL1 system register. Signed-off-by: Hector Martin --- arch/arm64/include/asm/assembler.h | 6 +++--- arch/arm64/include/asm/daifflags.h | 4 ++-- arch/arm64/include/asm/irqflags.h | 19 +++ arch/arm64/kernel/entry.S | 6

[PATCH v2 09/25] arm64: entry: Map the FIQ vector to IRQ on NEEDS_FIQ platforms

2021-02-15 Thread Hector Martin
Signed-off-by: Hector Martin --- arch/arm64/kernel/entry.S | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index ba5f9aa379ce..bcfd1ac72636 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel

[PATCH v2 11/25] arm64: Implement ioremap_np() to map MMIO as nGnRnE

2021-02-15 Thread Hector Martin
This is used on Apple ARM platforms, which require most MMIO (except PCI devices) to be mapped as nGnRnE. Signed-off-by: Hector Martin --- arch/arm64/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 5ea8656a2030

[PATCH v2 14/25] dt-bindings: interrupt-controller: Add DT bindings for apple-aic

2021-02-15 Thread Hector Martin
AIC is the Apple Interrupt Controller found on Apple ARM SoCs, such as the M1. Signed-off-by: Hector Martin --- .../interrupt-controller/apple,aic.yaml | 88 +++ MAINTAINERS | 1 + .../interrupt-controller/apple-aic.h | 15

[PATCH v2 12/25] of/address: Add infrastructure to declare MMIO as non-posted

2021-02-15 Thread Hector Martin
. This mechanism is currently restricted to Apple ARM platforms, as an optimization. Signed-off-by: Hector Martin --- drivers/of/address.c | 72 -- include/linux/of_address.h | 1 + 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/drivers/of/ad

[PATCH v2 13/25] arm64: Add Apple vendor-specific system registers

2021-02-15 Thread Hector Martin
Apple ARM64 SoCs have a ton of vendor-specific registers we're going to have to deal with, and those don't really belong in sysreg.h with all the architectural registers. Make a new home for them, and add some registers which are useful for early bring-up. Signed-off-by: Hec

[PATCH v2 15/25] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-02-15 Thread Hector Martin
timer). This patch introduces basic UP irqchip support, without SMP/IPI support. Signed-off-by: Hector Martin --- MAINTAINERS | 2 + drivers/irqchip/Kconfig | 10 + drivers/irqchip/Makefile| 1 + drivers/irqchip/irq-apple-aic.c | 647

[PATCH v2 17/25] tty: serial: samsung_tty: Separate S3C64XX ops structure

2021-02-15 Thread Hector Martin
avoids excessive branching control flow and mirrors s3c64xx_serial_startup. tx_claimed and rx_claimed are only used in the S3C24XX functions. Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 69 1 file changed, 53 insertions(+), 16 deletions

[PATCH v2 16/25] arm64: Kconfig: Introduce CONFIG_ARCH_APPLE

2021-02-15 Thread Hector Martin
This adds a Kconfig option to toggle support for Apple ARM SoCs. At this time this targets the M1 and later "Apple Silicon" Mac SoCs. Signed-off-by: Hector Martin --- arch/arm64/Kconfig.platforms | 8 arch/arm64/configs/defconfig | 1 + 2 files changed, 9 insertions(+) di

[PATCH v2 23/25] tty: serial: samsung_tty: Add earlycon support for Apple UARTs

2021-02-15 Thread Hector Martin
makes more sense to do it here in the UART driver instead of introducing a whole fdt nonposted-mmio resolver just for earlycon/fixmap. Suggested-by: Arnd Bergmann Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 17 + 1 file changed, 17 insertions(+) diff

[PATCH v2 20/25] tty: serial: samsung_tty: Use devm_ioremap_resource

2021-02-15 Thread Hector Martin
return value, which should use IS_ERR(). Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 821cd0e4f870

[PATCH v2 18/25] tty: serial: samsung_tty: add s3c24xx_port_type

2021-02-15 Thread Hector Martin
as a distinct type. Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 131 ++- 1 file changed, 77 insertions(+), 54 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 6b661f3ec1ae..21955be680a4 100644

[PATCH v2 24/25] dt-bindings: display: Add apple,simple-framebuffer

2021-02-15 Thread Hector Martin
Apple SoCs run firmware that sets up a simplefb-compatible framebuffer for us. Add a compatible for it, and two missing supported formats. Signed-off-by: Hector Martin --- .../devicetree/bindings/display/simple-framebuffer.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a

[PATCH v2 21/25] dt-bindings: serial: samsung: Add apple,s5l-uart compatible

2021-02-15 Thread Hector Martin
Apple mobile devices originally used Samsung SoCs (starting with the S5L8900), and their current in-house SoCs continue to use compatible UART peripherals. We'll call this UART variant apple,s5l-uart. Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/serial/samsung_uart

[PATCH v2 22/25] tty: serial: samsung_tty: Add support for Apple UARTs

2021-02-15 Thread Hector Martin
the FIFO with data directly. Signed-off-by: Hector Martin --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/samsung_tty.c | 228 +-- include/linux/serial_s3c.h | 16 +++ 3 files changed, 236 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH v2 25/25] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-15 Thread Hector Martin
This currently supports: * SMP (via spin-tables) * AIC IRQs * Serial (with earlycon) * Framebuffer A number of properties are dynamic, and based on system firmware decisions that vary from version to version. These are expected to be filled in by the loader. Signed-off-by: Hector Martin

[PATCH v2 19/25] tty: serial: samsung_tty: IRQ rework

2021-02-15 Thread Hector Martin
x27; logic isn't necessary here, if either handler ran we are always going to return IRQ_HANDLED. * Rename s3c24xx_serial_rx_chars to s3c24xx_serial_rx_irq for consistency with the above. All it does now is call two other functions anyway. Signed-off-by: Hector Martin --- dri

Re: [PATCH v2 06/25] arm64: arch_timer: implement support for interrupt-names

2021-02-15 Thread Hector Martin
YPE_CP15; You probably didn't want to drop this line, did you? Ouch. Thanks for catching that. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH v2 00/25] Apple M1 SoC platform bring-up

2021-02-15 Thread Hector Martin
look at v2, or wait for v3? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH v2 00/25] Apple M1 SoC platform bring-up

2021-02-15 Thread Hector Martin
On 16/02/2021 01.12, gregkh wrote: On Tue, Feb 16, 2021 at 12:57:27AM +0900, Hector Martin wrote: On 15/02/2021 22.22, gregkh wrote: On Mon, Feb 15, 2021 at 01:57:39PM +0100, Arnd Bergmann wrote: (adding maintainers for the serial/irqchip/clocksource drivers and arch/arm64 to cc) I would

Re: [PATCH v2 23/25] tty: serial: samsung_tty: Add earlycon support for Apple UARTs

2021-02-16 Thread Hector Martin
dn't hurt to try to add minimal error handling here. There's no logic to clean this up in earlycon itself anyway, so there's no point in trying to do it for the override. If another earlycon driver ends up getting instantiated for some reason, it will override the mapping with a

Re: [PATCH v2 02/25] dt-bindings: arm: apple: Add bindings for Apple ARM platforms

2021-02-16 Thread Hector Martin
On 16/02/2021 02.48, Krzysztof Kozlowski wrote: On Mon, Feb 15, 2021 at 09:16:50PM +0900, Hector Martin wrote: +description: | + Apple ARM ("Apple Silicon") platforms should contain compatible strings + in the following format: + + - apple,j274 (board/device ID) + - apple,m1

Re: [PATCH v2 06/25] arm64: arch_timer: implement support for interrupt-names

2021-02-16 Thread Hector Martin
On 16/02/2021 03.23, Tony Lindgren wrote: * Hector Martin [210215 12:18]: This allows the devicetree to correctly represent the available set of timers, which varies from device to device, without the need for fake dummy interrupts for unavailable slots. I like the idea of using interrupt

Re: [PATCH v4 11/18] asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np

2021-04-08 Thread Hector Martin
: return ioremap_np(offset, size) ?: ioremap(offset, size); Today I learned that this one is kosher in kernel code. Handy! Let's go with that. Acked-by: Will Deacon Thanks! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH v4 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-04-08 Thread Hector Martin
On 08/04/2021 06.09, Will Deacon wrote: Couple of stale comment nits: [...] But with that: Acked-by: Will Deacon Fixed those for the PR, thanks! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

[GIT PULL] Apple M1 SoC platform bring-up for 5.13

2021-04-08 Thread Hector Martin
ebsite for more information on the project: https://asahilinux.org/ Signed-off-by: Hector Martin Arnd Bergmann (1): docs: driver-api: device-io: Document I/O access functions Hector Martin (17): dt-bindings: vendor-prefixes: A

Coding FATX support for 2.6

2007-09-23 Thread Hector Martin
ould be made with care, as we don't want to cause a regression. However, much of the code (allocation strategies, FAT handling, etc) should be the same or very similar, so it seems stupid to start from scratch. Comments? -- Hector Martin ([EMAIL PROTECTED]) Public Key: http://www.marcansoft.co

Re: Coding FATX support for 2.6

2007-09-23 Thread Hector Martin
Diego Calleja wrote: > FUSE could be an acceptable solution. Not really. Booting Xbox-Linux from an image file on a FATX partition is common. I don't think FUSE would work very well there. -- Hector Martin ([EMAIL PROTECTED]) Public Key: http://www.marcansoft.com/marcan.asc - To uns

Re: [PATCH v2 00/25] Apple M1 SoC platform bring-up

2021-02-23 Thread Hector Martin
On 22/02/2021 05.41, Andy Shevchenko wrote: Hector, I would like to be cc’ed in the next version Noted, thanks! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH v2 00/25] Apple M1 SoC platform bring-up

2021-02-24 Thread Hector Martin
On 22/02/2021 00.20, Hector Martin wrote: I haven't tested things at EL0 yet, but it looks like the stateful instructions known to be usable in EL0 (AMX) already default to trap on this platform, so we should be safe there. Everything else looks like it probably either shouldn't work

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-10 Thread Hector Martin
On 10/02/2021 19.19, Tony Lindgren wrote: * Hector Martin 'marcan' [210208 12:05]: On 08/02/2021 20.04, Krzysztof Kozlowski wrote: ... + clk24: clk24 { Just "clock". Node names should be generic. Really? Almost every other device device tree uses unique cloc

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-10 Thread Hector Martin
On 10/02/2021 20.34, Tony Lindgren wrote: * Hector Martin [210210 11:14]: That means it'll end up like this (so that we can have more than one fixed-clock): clocks { #address-cells = <1>; #size-cells = <0>; clk123: clock@0 { ... reg = <0&

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-10 Thread Hector Martin
arm64's ioremap look up the address in a structure populated from this. As an additional wrinkle, earlycon is almost certainly going to need a special path to handle this very early, before OF stuff is available; it also uses fixmap instead of ioremap, which has its own idea about what type of mapping to use. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-10 Thread Hector Martin
river as a property instead of creating a fake clock. In our case it's an existing driver (with patches) that is already integrated with the clock infrastructure, so it makes sense to use a fixed-clock instead of just an ad-hoc property. -- Hector Martin (mar...@marcan.st) Public

Re: [PATCH v2 08/25] arm64: Always keep DAIF.[IF] in sync

2021-02-18 Thread Hector Martin
ase delete this bit, though? Now that we say IRQ and FIQ are masked/unmasked together, I don't think the rest is necessary to understand the masking logic, and it's one less thing to keep in sync with changes to the entry code. Gone :) -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH v2 10/25] asm-generic/io.h: Add a non-posted variant of ioremap()

2021-02-18 Thread Hector Martin
c blurb on IO mapping modes, much like x86 has one... -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH v2 17/25] tty: serial: samsung_tty: Separate S3C64XX ops structure

2021-02-18 Thread Hector Martin
On 16/02/2021 03.06, Krzysztof Kozlowski wrote: On Mon, Feb 15, 2021 at 09:17:05PM +0900, Hector Martin wrote: +static void s3c64xx_serial_shutdown(struct uart_port *port) +{ + struct s3c24xx_uart_port *ourport = to_ourport(port); + + free_irq(port->irq, ourport); + + wr_r

Re: [PATCH v2 18/25] tty: serial: samsung_tty: add s3c24xx_port_type

2021-02-18 Thread Hector Martin
_dbg(port->dev, "stopping rx\n"); - if (s3c24xx_serial_has_interrupt_mask(port)) - s3c24xx_set_bit(port, S3C64XX_UINTM_RXD, - S3C64XX_UINTM); The same. Reverted those two lines for v3. -- Hector Martin (m

Re: [PATCH v2 19/25] tty: serial: samsung_tty: IRQ rework

2021-02-18 Thread Hector Martin
On 16/02/2021 03.40, Krzysztof Kozlowski wrote: On Mon, Feb 15, 2021 at 09:17:07PM +0900, Hector Martin wrote: * Split out s3c24xx_serial_tx_chars from s3c24xx_serial_tx_irq, where only the latter acquires the port lock. I miss here information why you do all this. Added an explanation

Re: [PATCH v2 20/25] tty: serial: samsung_tty: Use devm_ioremap_resource

2021-02-18 Thread Hector Martin
on next submission, so Greg does not pick them too fast. I unfortunately don't have any Exynos devices where I could test the code (I have a couple but no serial connections, and I have no idea if mailine would run on them). I'll mark v3 as RFT. -- Hector Martin (mar...@marcan.st)

Re: [PATCH v2 22/25] tty: serial: samsung_tty: Add support for Apple UARTs

2021-02-18 Thread Hector Martin
On 16/02/2021 04.13, Krzysztof Kozlowski wrote: On Mon, Feb 15, 2021 at 09:17:10PM +0900, Hector Martin wrote: @@ -389,10 +396,12 @@ static void enable_tx_pio(struct s3c24xx_uart_port *ourport) ucon = rd_regl(port, S3C2410_UCON); ucon &= ~(S3C64XX_UCON_TXMODE_

Re: [PATCH v2 08/25] arm64: Always keep DAIF.[IF] in sync

2021-02-18 Thread Hector Martin
d a minor related one: should init_gic_priority_masking() WARN if FIQ is masked too? This probably goes with the above. I think it should, yes. Done for v3 then. Thanks! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 0/8] arm64: Support FIQ controller registration

2021-02-19 Thread Hector Martin
Linux/linux/tree/upstream-bringup-v3 [3] https://github.com/AsahiLinux/linux/tree/upstream-bringup-v2.5 -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

[PATCH 00/18] Apple M1 SoC platform bring-up

2021-02-04 Thread Hector Martin
he project: https://asahilinux.org/ Hector Martin (18): dt-bindings: vendor-prefixes: add AAPL prefix dt-bindings: arm: cpus: Add AAPL,firestorm & icestorm compatibles dt-bindings: arm: AAPL: Add bindings for Apple ARM platforms arm64: Kconfig: Introduce CONFIG_ARCH_APPLE tty: seria

[PATCH 04/18] arm64: Kconfig: Introduce CONFIG_ARCH_APPLE

2021-02-04 Thread Hector Martin
This adds a Kconfig option to toggle support for Apple ARM SoCs. At this time this targets the M1 and later "Apple Silicon" Mac SoCs. Signed-off-by: Hector Martin --- arch/arm64/Kconfig.platforms | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/Kconfig.platfo

[PATCH 01/18] dt-bindings: vendor-prefixes: add AAPL prefix

2021-02-04 Thread Hector Martin
Amusingly, this wasn't yet documented, even though this vendor prefix has been used since time immemorial on PPC. Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bin

[PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-04 Thread Hector Martin
the FIFO with data directly. Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 297 +++ include/linux/serial_s3c.h | 16 ++ include/uapi/linux/serial_core.h | 3 + 3 files changed, 280 insertions(+), 36 deletions(-) diff --git a/drivers

[PATCH 06/18] dt-bindings: serial: samsung: Add AAPL,s5l-uart compatible

2021-02-04 Thread Hector Martin
Apple mobile devices originally used Samsung SoCs (starting with the S5L8900), and their current in-house SoCs continue to use compatible UART peripherals. We'll call this UART variant AAPL,s5l-uart. Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/serial/samsung_uart.yam

[PATCH 09/18] arm64: cputype: Add CPU types for the Apple M1 big/little cores

2021-02-04 Thread Hector Martin
These are not used at the moment, but let's add them for documentation purposes. Signed-off-by: Hector Martin --- arch/arm64/include/asm/cputype.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 2084a03

[PATCH 07/18] tty: serial: samsung_tty: enable for ARCH_APPLE

2021-02-04 Thread Hector Martin
Apple M1 SoCs are distant descendants of Samsung SoCs and use similar UART blocks. Signed-off-by: Hector Martin --- drivers/tty/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 34a2899e69c0

[PATCH 08/18] arm64: cpufeature: Add a feature for FIQ support

2021-02-04 Thread Hector Martin
which do not need FIQs, or if newer SoCs are released without the FIQ requirement, we can revisit the condition. Signed-off-by: Hector Martin --- arch/arm64/Kconfig | 10 + arch/arm64/include/asm/cpucaps.h| 3 ++- arch/arm64/include/asm/cpufeature.h | 6 ++ arch

[PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-04 Thread Hector Martin
oke mechanism to the DT, and that it does not let device drivers actually select the IO mode, which might be desirable in the future anyway for some devices. All discussion and additional ideas welcome. Signed-off-by: Hector Martin --- arch/arm64/include/asm/io.h | 9 - 1 file

[PATCH 14/18] dt-bindings: interrupt-controller: Add DT bindings for apple-aic

2021-02-04 Thread Hector Martin
AIC is the Apple Interrupt Controller found on Apple ARM SoCs, such as the M1. Signed-off-by: Hector Martin --- .../interrupt-controller/AAPL,aic.yaml| 88 +++ MAINTAINERS | 2 + .../interrupt-controller/apple-aic.h | 14 +++ 3

[PATCH 17/18] dt-bindings: display: add AAPL,simple-framebuffer

2021-02-04 Thread Hector Martin
Apple SoCs run firmware that sets up a simplefb-compatible framebuffer for us. Add a compatible for it, and two missing supported formats. Signed-off-by: Hector Martin --- .../devicetree/bindings/display/simple-framebuffer.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a

[PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-04 Thread Hector Martin
This currently supports: * SMP (via spin-tables) * AIC IRQs * Serial (with earlycon) * Framebuffer A number of properties are dynamic, and based on system firmware decisions that vary from version to version. These are expected to be filled in by the loader. Signed-off-by: Hector Martin

[PATCH 16/18] irqchip/apple-aic: Add SMP / IPI support

2021-02-04 Thread Hector Martin
Since the hardware IRQ controller only supports two IPIs per CPU and Linux needs more, we implement 32 virtual IPIs using software and funnel them through a single hardware IPI. Signed-off-by: Hector Martin --- drivers/irqchip/irq-apple-aic.c | 195 +++- 1 file

[PATCH 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-02-04 Thread Hector Martin
timer). This patch introduces basic UP irqchip support, without SMP/IPI support. Signed-off-by: Hector Martin --- MAINTAINERS | 1 + drivers/irqchip/Kconfig | 10 + drivers/irqchip/Makefile| 1 + drivers/irqchip/irq-apple-aic.c | 316

[PATCH 02/18] dt-bindings: arm: cpus: Add AAPL,firestorm & icestorm compatibles

2021-02-04 Thread Hector Martin
These are the CPU cores in the "Apple Silicon" M1 SoC. Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/arm/cpus.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.

[PATCH 03/18] dt-bindings: arm: AAPL: Add bindings for Apple ARM platforms

2021-02-04 Thread Hector Martin
This introduces bindings for all three 2020 Apple M1 devices: * AAPL,j274 - Mac mini (M1, 2020) * AAPL,j293 - MacBook Pro (13-inch, M1, 2020) * AAPL,j313 - MacBook Air (M1, 2020) Signed-off-by: Hector Martin --- .../devicetree/bindings/arm/AAPL.yaml | 36

[PATCH 12/18] arm64: setup: Use nGnRnE IO mappings for fixmap on Apple platforms

2021-02-04 Thread Hector Martin
ad of a platform match. Any other ideas? Signed-off-by: Hector Martin --- arch/arm64/include/asm/fixmap.h | 10 +- arch/arm64/kernel/setup.c | 12 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/includ

[PATCH 10/18] arm64: Introduce FIQ support

2021-02-04 Thread Hector Martin
drivers can discriminate between IRQs and FIQs by checking the ISR_EL1 system register. Signed-off-by: Hector Martin --- arch/arm64/include/asm/assembler.h | 4 arch/arm64/include/asm/daifflags.h | 7 +++ arch/arm64/include/asm/irqflags.h | 17 + arch/arm64/kernel

[PATCH 11/18] arm64: Kconfig: Require FIQ support for ARCH_APPLE

2021-02-04 Thread Hector Martin
All currently supported Apple ARM SoCs (and possibly all future ones too) require FIQs. Signed-off-by: Hector Martin --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index e3e3bd2c4374..8182d78e8e23

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
On 08/02/2021 21.40, Arnd Bergmann wrote: On Mon, Feb 8, 2021 at 1:13 PM Krzysztof Kozlowski wrote: On Mon, Feb 08, 2021 at 08:56:53PM +0900, Hector Martin 'marcan' wrote: On 08/02/2021 20.04, Krzysztof Kozlowski wrote: apple Don't make things different for this one platfor

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
al timer with VHE right now. I guess it's worth describing it in the binding and dts, even if the driver never selects it...? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-02-08 Thread Hector Martin
On 08/02/2021 20.36, Marc Zyngier wrote: On Mon, 08 Feb 2021 10:29:23 +, Arnd Bergmann wrote: On Mon, Feb 8, 2021 at 10:25 AM Marc Zyngier wrote: On Thu, 04 Feb 2021 20:39:48 +, Hector Martin wrote: +{ + return readl(ic->base + reg); Please consider using the _rela

Re: [PATCH 11/18] arm64: Kconfig: Require FIQ support for ARCH_APPLE

2021-02-08 Thread Hector Martin
with an unbootable system, and not having interrupts is one thing that makes it really hard to debug... Sounds good, I'll flip it over. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 08/18] arm64: cpufeature: Add a feature for FIQ support

2021-02-08 Thread Hector Martin
Aside from the lack of programmable priority, the lack of convenient masking for per-CPU interrupts is a bit of an issue... Yeah... we'll see how that goes. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
hat to a a separate uart_ops too. Ack on all the other comments, I'll make the changes for v2. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
my server doesn't do DKIM yet, and they went through a mailing list? It's probably time to set that up... Either way, certainly not for Apple SoCs; I'll get rid of IRQF_SHARED for v2. Please send a v2 after fixing issues pointed out by kbuild. Will do, already have those fixe

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
On 08/02/2021 19.34, Marc Zyngier wrote: On 2021-02-07 09:12, Hector Martin 'marcan' wrote: On 06/02/2021 22.15, Marc Zyngier wrote: Do you actually need a new port type here? Looking at the driver itself, it is mainly used to work out the IRQ model. Maybe introducing a new irq_typ

Re: [PATCH 01/18] dt-bindings: vendor-prefixes: add AAPL prefix

2021-02-08 Thread Hector Martin
On 09/02/2021 03.12, Krzysztof Kozlowski wrote: Mentioned grep brings only one result: arch/powerpc/platforms/powermac/pic.c: * cases where the APPL,interrupts property is completely You want to grep for 'AAPL', not 'APPL' :-) -- Hector Martin (mar...@marcan.st) Public

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
get rid of any code in there that cares about the uapi-visible port type (other than setting it correctly for those that do exist, to maintain current behavior), and just make everything else use PORT_8250 for that? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
s such const pointer. Still during s3c24xx_serial_probe() correct ops would have to be assigned, but at least all ops are easily visible. Roger, will do this for v2. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 10/18] arm64: Introduce FIQ support

2021-02-08 Thread Hector Martin
after subsequently issuing an isb, makes me think all this FIQ stuff is seriously deeply tied into the instruction pipeline. It's probably not an IRQ line any more... -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-08 Thread Hector Martin
dware behavior is to block nGnRE everywhere except in those ranges (i.e. the nGnRnE fault takes precedence over other errors, like the address not existing at all). -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
w if that's expected or something to be avoided. If this is intended to be kept in sync and be fully comprehensive, I might as well start planning out our longer term DT maintenance strategy around that (which might involve using that tree in our bootloader). -- Hector Martin (mar...@mar

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
that. Ack. I hope we can basically acknowledge breaking DT changes without too much fuss at this early stage of bring-up, until things calm down a bit and we have real users who would complain :) (not that I won't try to avoid it). -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-02-08 Thread Hector Martin
r_hw + AIC_NR_FIQ + AIC_NR_IPI, + &aic_irq_domain_ops, irqc); Please keep assignments on a single line. I think this one was one of those clang-format things :-). I'll fix it and watch out for similar things. + for (i = 0; i < BITS_TO_LONGS(irqc->nr_hw); i++) long is 64bit on arm64, so this loop is unlikely to do what you want. Consider using BITS_TO_U32. Ha, nice catch. Thanks! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-09 Thread Hector Martin
n require the drivers for this platform to go through devm_ioremap_resource() or similar. This sounds reasonable. For setting such a flag, I guess looking for a property (inherited from parents) would make sense. `mmio-map-mode = "nonposted"` or something like that? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFT PATCH v3 08/27] asm-generic/io.h: Add a non-posted variant of ioremap()

2021-03-25 Thread Hector Martin
() on 32-bit as well, and I would keep that separate from this series. Sounds good; I'm adding a patch to adjust the generic implementation and remove the arm64 one in v4, and we can then complete the cleanup for other arches later. -- Hector Martin (mar...@marcan.st) Public Key: https://mr

[RFT PATCH v3 03/27] dt-bindings: arm: apple: Add bindings for Apple ARM platforms

2021-03-04 Thread Hector Martin
This introduces bindings for all three 2020 Apple M1 devices: * apple,j274 - Mac mini (M1, 2020) * apple,j293 - MacBook Pro (13-inch, M1, 2020) * apple,j313 - MacBook Air (M1, 2020) Signed-off-by: Hector Martin --- .../devicetree/bindings/arm/apple.yaml| 64

[RFT PATCH v3 00/27] Apple M1 SoC platform bring-up

2021-03-04 Thread Hector Martin
ring yak. * Moved GIC registers to sysregs.h instead of including that in the AIC driver. * Added _EL1 suffixes to Apple sysregs. * Addressed further review comments and feedback. Arnd Bergmann (1): docs: driver-api: device-io: Document I/O access functions Hector Martin (25): dt-bindings: vend

[RFT PATCH v3 09/27] docs: driver-api: device-io: Document I/O access functions

2021-03-04 Thread Hector Martin
From: Arnd Bergmann This adds more detailed descriptions of the various read/write primitives available for use with I/O memory/ports. Signed-off-by: Arnd Bergmann Signed-off-by: Hector Martin --- Documentation/driver-api/device-io.rst | 138 + 1 file changed, 138

[RFT PATCH v3 07/27] arm64: arch_timer: implement support for interrupt-names

2021-03-04 Thread Hector Martin
This allows the devicetree to correctly represent the available set of timers, which varies from device to device, without the need for fake dummy interrupts for unavailable slots. Also add the hyp-virt timer/PPI, which is not currently used, but worth representing. Signed-off-by: Hector Martin

[RFT PATCH v3 06/27] dt-bindings: timer: arm,arch_timer: Add interrupt-names support

2021-03-04 Thread Hector Martin
code can pick the right one. This also adds the hyp-virt timer/interrupt, which was previously not expressed in the fixed 4-interrupt form. Signed-off-by: Hector Martin --- .../devicetree/bindings/timer/arm,arch_timer.yaml | 14 ++ 1 file changed, 14 insertions(+) diff --git a

[RFT PATCH v3 01/27] arm64: Cope with CPUs stuck in VHE mode

2021-03-04 Thread Hector Martin
whether there are many more such nuggets to be found... Reported-by: Hector Martin Signed-off-by: Marc Zyngier --- arch/arm64/kernel/head.S | 33 ++--- arch/arm64/kernel/hyp-stub.S | 28 2 files changed, 54 insertions(+), 7 deletions

[RFT PATCH v3 05/27] arm64: cputype: Add CPU implementor & types for the Apple M1 cores

2021-03-04 Thread Hector Martin
The implementor will be used to condition the FIQ support quirk. The specific CPU types are not used at the moment, but let's add them for documentation purposes. Signed-off-by: Hector Martin --- arch/arm64/include/asm/cputype.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[RFT PATCH v3 02/27] dt-bindings: vendor-prefixes: Add apple prefix

2021-03-04 Thread Hector Martin
This is different from the legacy AAPL prefix used on PPC, but consensus is that we prefer `apple` for these new platforms. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file

[RFT PATCH v3 04/27] dt-bindings: arm: cpus: Add apple,firestorm & icestorm compatibles

2021-03-04 Thread Hector Martin
These are the CPU cores in the "Apple Silicon" M1 SoC. Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/arm/cpus.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.

[RFT PATCH v3 08/27] asm-generic/io.h: Add a non-posted variant of ioremap()

2021-03-04 Thread Hector Martin
. Signed-off-by: Hector Martin --- .../driver-api/driver-model/devres.rst| 1 + arch/sparc/include/asm/io_64.h| 4 include/asm-generic/io.h | 22 ++- include/asm-generic/iomap.h | 9 include/linux/io.h

  1   2   3   >