linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
@ 2024-11-14 13:11 Michael Ellerman
  2024-11-14 13:11 ` [RFC PATCH 02/10] powerpc/chrp: Remove various dead code Michael Ellerman
                   ` (12 more replies)
  0 siblings, 13 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

CHRP (Common Hardware Reference Platform) was a standard developed by
IBM & Apple for PowerPC-based systems.

The standard was used in the development of some machines but never
gained wide spread adoption.

The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
some from Motorola? No Apple machines should be affected.

All of those mentioned above are over or nearing 20 years old, and seem
to have no active users.

So remove the CHRP support. If there's interest in still supporting some
of the machines that can be brought back from the git history.

Note there are still some references to CHRP/chrp in various comments
and some in the code, because later standards (eg. RPA, PAPR) used some
elements of CHRP or copied the CHRP behaviour. These will need to be
cleaned up on a case-by-case basis to either refer to newer standards or
left as-is when that's correct.

The CHRP code was copied from arch/ppc, and before that it mostly
predates git, so the original authorship is largely lost. If anyone
wrote any of this code and would like a CREDITS entry just let me know.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/Kconfig            |   1 -
 arch/powerpc/platforms/Makefile           |   1 -
 arch/powerpc/platforms/chrp/Kconfig       |  16 -
 arch/powerpc/platforms/chrp/Makefile      |   4 -
 arch/powerpc/platforms/chrp/chrp.h        |  11 -
 arch/powerpc/platforms/chrp/gg2.h         |  61 ---
 arch/powerpc/platforms/chrp/nvram.c       |  96 ----
 arch/powerpc/platforms/chrp/pci.c         | 387 --------------
 arch/powerpc/platforms/chrp/pegasos_eth.c | 204 --------
 arch/powerpc/platforms/chrp/setup.c       | 586 ----------------------
 arch/powerpc/platforms/chrp/smp.c         |  54 --
 arch/powerpc/platforms/chrp/time.c        | 159 ------
 12 files changed, 1580 deletions(-)
 delete mode 100644 arch/powerpc/platforms/chrp/Kconfig
 delete mode 100644 arch/powerpc/platforms/chrp/Makefile
 delete mode 100644 arch/powerpc/platforms/chrp/chrp.h
 delete mode 100644 arch/powerpc/platforms/chrp/gg2.h
 delete mode 100644 arch/powerpc/platforms/chrp/nvram.c
 delete mode 100644 arch/powerpc/platforms/chrp/pci.c
 delete mode 100644 arch/powerpc/platforms/chrp/pegasos_eth.c
 delete mode 100644 arch/powerpc/platforms/chrp/setup.c
 delete mode 100644 arch/powerpc/platforms/chrp/smp.c
 delete mode 100644 arch/powerpc/platforms/chrp/time.c

diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index a454149ae02f..6c10a7241195 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -3,7 +3,6 @@ menu "Platform support"
 
 source "arch/powerpc/platforms/powernv/Kconfig"
 source "arch/powerpc/platforms/pseries/Kconfig"
-source "arch/powerpc/platforms/chrp/Kconfig"
 source "arch/powerpc/platforms/512x/Kconfig"
 source "arch/powerpc/platforms/52xx/Kconfig"
 source "arch/powerpc/platforms/powermac/Kconfig"
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 3cee4a842736..662652192a6f 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -3,7 +3,6 @@
 obj-$(CONFIG_FSL_ULI1575)	+= fsl_uli1575.o
 
 obj-$(CONFIG_PPC_PMAC)		+= powermac/
-obj-$(CONFIG_PPC_CHRP)		+= chrp/
 obj-$(CONFIG_44x)		+= 44x/
 obj-$(CONFIG_PPC_MPC512x)	+= 512x/
 obj-$(CONFIG_PPC_MPC52xx)	+= 52xx/
diff --git a/arch/powerpc/platforms/chrp/Kconfig b/arch/powerpc/platforms/chrp/Kconfig
deleted file mode 100644
index ff30ed579a39..000000000000
--- a/arch/powerpc/platforms/chrp/Kconfig
+++ /dev/null
@@ -1,16 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-config PPC_CHRP
-	bool "Common Hardware Reference Platform (CHRP) based machines"
-	depends on PPC_BOOK3S_32
-	select HAVE_PCSPKR_PLATFORM
-	select MPIC
-	select PPC_I8259
-	select PPC_INDIRECT_PCI
-	select PPC_RTAS
-	select PPC_RTAS_DAEMON
-	select RTAS_ERROR_LOGGING
-	select PPC_MPC106
-	select PPC_UDBG_16550
-	select PPC_HASH_MMU_NATIVE
-	select FORCE_PCI
-	default y
diff --git a/arch/powerpc/platforms/chrp/Makefile b/arch/powerpc/platforms/chrp/Makefile
deleted file mode 100644
index 05639db9a33f..000000000000
--- a/arch/powerpc/platforms/chrp/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-obj-y				+= setup.o time.o pegasos_eth.o pci.o
-obj-$(CONFIG_SMP)		+= smp.o
-obj-$(CONFIG_NVRAM:m=y)		+= nvram.o
diff --git a/arch/powerpc/platforms/chrp/chrp.h b/arch/powerpc/platforms/chrp/chrp.h
deleted file mode 100644
index 6ff4631d9db4..000000000000
--- a/arch/powerpc/platforms/chrp/chrp.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Declarations of CHRP platform-specific things.
- */
-
-extern void chrp_nvram_init(void);
-extern void chrp_get_rtc_time(struct rtc_time *);
-extern int chrp_set_rtc_time(struct rtc_time *);
-extern long chrp_time_init(void);
-
-extern void chrp_find_bridges(void);
diff --git a/arch/powerpc/platforms/chrp/gg2.h b/arch/powerpc/platforms/chrp/gg2.h
deleted file mode 100644
index 341ae55b99fb..000000000000
--- a/arch/powerpc/platforms/chrp/gg2.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *  include/asm-ppc/gg2.h -- VLSI VAS96011/12 `Golden Gate 2' register definitions
- *
- *  Copyright (C) 1997 Geert Uytterhoeven
- *
- *  This file is based on the following documentation:
- *
- *	The VAS96011/12 Chipset, Data Book, Edition 1.0
- *	VLSI Technology, Inc.
- *
- *  This file is subject to the terms and conditions of the GNU General Public
- *  License.  See the file COPYING in the main directory of this archive
- *  for more details.
- */
-
-#ifndef _ASMPPC_GG2_H
-#define _ASMPPC_GG2_H
-
-    /*
-     *  Memory Map (CHRP mode)
-     */
-
-#define GG2_PCI_MEM_BASE	0xc0000000	/* Peripheral memory space */
-#define GG2_ISA_MEM_BASE	0xf7000000	/* Peripheral memory alias */
-#define GG2_ISA_IO_BASE		0xf8000000	/* Peripheral I/O space */
-#define GG2_PCI_CONFIG_BASE	0xfec00000	/* PCI configuration space */
-#define GG2_INT_ACK_SPECIAL	0xfec80000	/* Interrupt acknowledge and */
-						/* special PCI cycles */
-#define GG2_ROM_BASE0		0xff000000	/* ROM bank 0 */
-#define GG2_ROM_BASE1		0xff800000	/* ROM bank 1 */
-
-
-    /*
-     *  GG2 specific PCI Registers
-     */
-
-extern void __iomem *gg2_pci_config_base;	/* kernel virtual address */
-
-#define GG2_PCI_BUSNO		0x40	/* Bus number */
-#define GG2_PCI_SUBBUSNO	0x41	/* Subordinate bus number */
-#define GG2_PCI_DISCCTR		0x42	/* Disconnect counter */
-#define GG2_PCI_PPC_CTRL	0x50	/* PowerPC interface control register */
-#define GG2_PCI_ADDR_MAP	0x5c	/* Address map */
-#define GG2_PCI_PCI_CTRL	0x60	/* PCI interface control register */
-#define GG2_PCI_ROM_CTRL	0x70	/* ROM interface control register */
-#define GG2_PCI_ROM_TIME	0x74	/* ROM timing */
-#define GG2_PCI_CC_CTRL		0x80	/* Cache controller control register */
-#define GG2_PCI_DRAM_BANK0	0x90	/* Control register for DRAM bank #0 */
-#define GG2_PCI_DRAM_BANK1	0x94	/* Control register for DRAM bank #1 */
-#define GG2_PCI_DRAM_BANK2	0x98	/* Control register for DRAM bank #2 */
-#define GG2_PCI_DRAM_BANK3	0x9c	/* Control register for DRAM bank #3 */
-#define GG2_PCI_DRAM_BANK4	0xa0	/* Control register for DRAM bank #4 */
-#define GG2_PCI_DRAM_BANK5	0xa4	/* Control register for DRAM bank #5 */
-#define GG2_PCI_DRAM_TIME0	0xb0	/* Timing parameters set #0 */
-#define GG2_PCI_DRAM_TIME1	0xb4	/* Timing parameters set #1 */
-#define GG2_PCI_DRAM_CTRL	0xc0	/* DRAM control */
-#define GG2_PCI_ERR_CTRL	0xd0	/* Error control register */
-#define GG2_PCI_ERR_STATUS	0xd4	/* Error status register */
-					/* Cleared when read */
-
-#endif /* _ASMPPC_GG2_H */
diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c
deleted file mode 100644
index d3bf56a46656..000000000000
--- a/arch/powerpc/platforms/chrp/nvram.c
+++ /dev/null
@@ -1,96 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- *  c 2001 PPC 64 Team, IBM Corp
- *
- * /dev/nvram driver for PPC
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/spinlock.h>
-#include <linux/uaccess.h>
-#include <linux/of.h>
-#include <asm/machdep.h>
-#include <asm/rtas.h>
-#include "chrp.h"
-
-static unsigned int nvram_size;
-static unsigned char nvram_buf[4];
-static DEFINE_SPINLOCK(nvram_lock);
-
-static unsigned char chrp_nvram_read_val(int addr)
-{
-	unsigned int done;
-	unsigned long flags;
-	unsigned char ret;
-
-	if (addr >= nvram_size) {
-		printk(KERN_DEBUG "%s: read addr %d > nvram_size %u\n",
-		       current->comm, addr, nvram_size);
-		return 0xff;
-	}
-	spin_lock_irqsave(&nvram_lock, flags);
-	if ((rtas_call(rtas_function_token(RTAS_FN_NVRAM_FETCH), 3, 2, &done, addr,
-		       __pa(nvram_buf), 1) != 0) || 1 != done)
-		ret = 0xff;
-	else
-		ret = nvram_buf[0];
-	spin_unlock_irqrestore(&nvram_lock, flags);
-
-	return ret;
-}
-
-static void chrp_nvram_write_val(int addr, unsigned char val)
-{
-	unsigned int done;
-	unsigned long flags;
-
-	if (addr >= nvram_size) {
-		printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n",
-		       current->comm, addr, nvram_size);
-		return;
-	}
-	spin_lock_irqsave(&nvram_lock, flags);
-	nvram_buf[0] = val;
-	if ((rtas_call(rtas_function_token(RTAS_FN_NVRAM_STORE), 3, 2, &done, addr,
-		       __pa(nvram_buf), 1) != 0) || 1 != done)
-		printk(KERN_DEBUG "rtas IO error storing 0x%02x at %d", val, addr);
-	spin_unlock_irqrestore(&nvram_lock, flags);
-}
-
-static ssize_t chrp_nvram_size(void)
-{
-	return nvram_size;
-}
-
-void __init chrp_nvram_init(void)
-{
-	struct device_node *nvram;
-	const __be32 *nbytes_p;
-	unsigned int proplen;
-
-	nvram = of_find_node_by_type(NULL, "nvram");
-	if (nvram == NULL)
-		return;
-
-	nbytes_p = of_get_property(nvram, "#bytes", &proplen);
-	if (nbytes_p == NULL || proplen != sizeof(unsigned int)) {
-		of_node_put(nvram);
-		return;
-	}
-
-	nvram_size = be32_to_cpup(nbytes_p);
-
-	printk(KERN_INFO "CHRP nvram contains %u bytes\n", nvram_size);
-	of_node_put(nvram);
-
-	ppc_md.nvram_read_val  = chrp_nvram_read_val;
-	ppc_md.nvram_write_val = chrp_nvram_write_val;
-	ppc_md.nvram_size      = chrp_nvram_size;
-
-	return;
-}
-
-MODULE_DESCRIPTION("PPC NVRAM device driver");
-MODULE_LICENSE("GPL v2");
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
deleted file mode 100644
index 428fd2a7b3ee..000000000000
--- a/arch/powerpc/platforms/chrp/pci.c
+++ /dev/null
@@ -1,387 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * CHRP pci routines.
- */
-
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-#include <linux/string.h>
-#include <linux/init.h>
-#include <linux/pgtable.h>
-#include <linux/of_address.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/hydra.h>
-#include <asm/machdep.h>
-#include <asm/sections.h>
-#include <asm/pci-bridge.h>
-#include <asm/grackle.h>
-#include <asm/rtas.h>
-
-#include "chrp.h"
-#include "gg2.h"
-
-/* LongTrail */
-void __iomem *gg2_pci_config_base;
-
-/*
- * The VLSI Golden Gate II has only 512K of PCI configuration space, so we
- * limit the bus number to 3 bits
- */
-
-static int gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off,
-			   int len, u32 *val)
-{
-	volatile void __iomem *cfg_data;
-	struct pci_controller *hose = pci_bus_to_host(bus);
-
-	if (bus->number > 7)
-		return PCIBIOS_DEVICE_NOT_FOUND;
-	/*
-	 * Note: the caller has already checked that off is
-	 * suitably aligned and that len is 1, 2 or 4.
-	 */
-	cfg_data = hose->cfg_data + ((bus->number<<16) | (devfn<<8) | off);
-	switch (len) {
-	case 1:
-		*val =  in_8(cfg_data);
-		break;
-	case 2:
-		*val = in_le16(cfg_data);
-		break;
-	default:
-		*val = in_le32(cfg_data);
-		break;
-	}
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static int gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off,
-			    int len, u32 val)
-{
-	volatile void __iomem *cfg_data;
-	struct pci_controller *hose = pci_bus_to_host(bus);
-
-	if (bus->number > 7)
-		return PCIBIOS_DEVICE_NOT_FOUND;
-	/*
-	 * Note: the caller has already checked that off is
-	 * suitably aligned and that len is 1, 2 or 4.
-	 */
-	cfg_data = hose->cfg_data + ((bus->number<<16) | (devfn<<8) | off);
-	switch (len) {
-	case 1:
-		out_8(cfg_data, val);
-		break;
-	case 2:
-		out_le16(cfg_data, val);
-		break;
-	default:
-		out_le32(cfg_data, val);
-		break;
-	}
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static struct pci_ops gg2_pci_ops =
-{
-	.read = gg2_read_config,
-	.write = gg2_write_config,
-};
-
-/*
- * Access functions for PCI config space using RTAS calls.
- */
-static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
-			    int len, u32 *val)
-{
-	struct pci_controller *hose = pci_bus_to_host(bus);
-	unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-		| (((bus->number - hose->first_busno) & 0xff) << 16)
-		| (hose->global_number << 24);
-        int ret = -1;
-	int rval;
-
-	rval = rtas_call(rtas_function_token(RTAS_FN_READ_PCI_CONFIG), 2, 2, &ret, addr, len);
-	*val = ret;
-	return rval? PCIBIOS_DEVICE_NOT_FOUND: PCIBIOS_SUCCESSFUL;
-}
-
-static int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
-			     int len, u32 val)
-{
-	struct pci_controller *hose = pci_bus_to_host(bus);
-	unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-		| (((bus->number - hose->first_busno) & 0xff) << 16)
-		| (hose->global_number << 24);
-	int rval;
-
-	rval = rtas_call(rtas_function_token(RTAS_FN_WRITE_PCI_CONFIG), 3, 1, NULL,
-			 addr, len, val);
-	return rval? PCIBIOS_DEVICE_NOT_FOUND: PCIBIOS_SUCCESSFUL;
-}
-
-static struct pci_ops rtas_pci_ops =
-{
-	.read = rtas_read_config,
-	.write = rtas_write_config,
-};
-
-volatile struct Hydra __iomem *Hydra = NULL;
-
-static int __init hydra_init(void)
-{
-	struct device_node *np;
-	struct resource r;
-
-	np = of_find_node_by_name(NULL, "mac-io");
-	if (np == NULL || of_address_to_resource(np, 0, &r)) {
-		of_node_put(np);
-		return 0;
-	}
-	of_node_put(np);
-	Hydra = ioremap(r.start, resource_size(&r));
-	printk("Hydra Mac I/O at %llx\n", (unsigned long long)r.start);
-	printk("Hydra Feature_Control was %x",
-	       in_le32(&Hydra->Feature_Control));
-	out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN |
-					   HYDRA_FC_SCSI_CELL_EN |
-					   HYDRA_FC_SCCA_ENABLE |
-					   HYDRA_FC_SCCB_ENABLE |
-					   HYDRA_FC_ARB_BYPASS |
-					   HYDRA_FC_MPIC_ENABLE |
-					   HYDRA_FC_SLOW_SCC_PCLK |
-					   HYDRA_FC_MPIC_IS_MASTER));
-	printk(", now %x\n", in_le32(&Hydra->Feature_Control));
-	return 1;
-}
-
-#define PRG_CL_RESET_VALID 0x00010000
-
-static void __init
-setup_python(struct pci_controller *hose, struct device_node *dev)
-{
-	u32 __iomem *reg;
-	u32 val;
-	struct resource r;
-
-	if (of_address_to_resource(dev, 0, &r)) {
-		printk(KERN_ERR "No address for Python PCI controller\n");
-		return;
-	}
-
-	/* Clear the magic go-slow bit */
-	reg = ioremap(r.start + 0xf6000, 0x40);
-	BUG_ON(!reg); 
-	val = in_be32(&reg[12]);
-	if (val & PRG_CL_RESET_VALID) {
-		out_be32(&reg[12], val & ~PRG_CL_RESET_VALID);
-		in_be32(&reg[12]);
-	}
-	iounmap(reg);
-
-	setup_indirect_pci(hose, r.start + 0xf8000, r.start + 0xf8010, 0);
-}
-
-/* Marvell Discovery II based Pegasos 2 */
-static void __init setup_peg2(struct pci_controller *hose, struct device_node *dev)
-{
-	struct device_node *root = of_find_node_by_path("/");
-	struct device_node *rtas;
-
-	rtas = of_find_node_by_name (root, "rtas");
-	if (rtas) {
-		hose->ops = &rtas_pci_ops;
-		of_node_put(rtas);
-	} else {
-		printk ("RTAS supporting Pegasos OF not found, please upgrade"
-			" your firmware\n");
-	}
-	pci_add_flags(PCI_REASSIGN_ALL_BUS);
-	/* keep the reference to the root node */
-}
-
-void __init
-chrp_find_bridges(void)
-{
-	struct device_node *dev;
-	const int *bus_range;
-	int len, index = -1;
-	struct pci_controller *hose;
-	const unsigned int *dma;
-	const char *model, *machine;
-	int is_longtrail = 0, is_mot = 0, is_pegasos = 0;
-	struct device_node *root = of_find_node_by_path("/");
-	struct resource r;
-	/*
-	 * The PCI host bridge nodes on some machines don't have
-	 * properties to adequately identify them, so we have to
-	 * look at what sort of machine this is as well.
-	 */
-	machine = of_get_property(root, "model", NULL);
-	if (machine != NULL) {
-		is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0;
-		is_mot = strncmp(machine, "MOT", 3) == 0;
-		if (strncmp(machine, "Pegasos2", 8) == 0)
-			is_pegasos = 2;
-		else if (strncmp(machine, "Pegasos", 7) == 0)
-			is_pegasos = 1;
-	}
-	for_each_child_of_node(root, dev) {
-		if (!of_node_is_type(dev, "pci"))
-			continue;
-		++index;
-		/* The GG2 bridge on the LongTrail doesn't have an address */
-		if (of_address_to_resource(dev, 0, &r) && !is_longtrail) {
-			printk(KERN_WARNING "Can't use %pOF: no address\n",
-			       dev);
-			continue;
-		}
-		bus_range = of_get_property(dev, "bus-range", &len);
-		if (bus_range == NULL || len < 2 * sizeof(int)) {
-			printk(KERN_WARNING "Can't get bus-range for %pOF\n",
-				dev);
-			continue;
-		}
-		if (bus_range[1] == bus_range[0])
-			printk(KERN_INFO "PCI bus %d", bus_range[0]);
-		else
-			printk(KERN_INFO "PCI buses %d..%d",
-			       bus_range[0], bus_range[1]);
-		printk(" controlled by %pOF", dev);
-		if (!is_longtrail)
-			printk(" at %llx", (unsigned long long)r.start);
-		printk("\n");
-
-		hose = pcibios_alloc_controller(dev);
-		if (!hose) {
-			printk("Can't allocate PCI controller structure for %pOF\n",
-				dev);
-			continue;
-		}
-		hose->first_busno = hose->self_busno = bus_range[0];
-		hose->last_busno = bus_range[1];
-
-		model = of_get_property(dev, "model", NULL);
-		if (model == NULL)
-			model = "<none>";
-		if (strncmp(model, "IBM, Python", 11) == 0) {
-			setup_python(hose, dev);
-		} else if (is_mot
-			   || strncmp(model, "Motorola, Grackle", 17) == 0) {
-			setup_grackle(hose);
-		} else if (is_longtrail) {
-			void __iomem *p = ioremap(GG2_PCI_CONFIG_BASE, 0x80000);
-			hose->ops = &gg2_pci_ops;
-			hose->cfg_data = p;
-			gg2_pci_config_base = p;
-		} else if (is_pegasos == 1) {
-			setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);
-		} else if (is_pegasos == 2) {
-			setup_peg2(hose, dev);
-		} else if (!strncmp(model, "IBM,CPC710", 10)) {
-			setup_indirect_pci(hose,
-					   r.start + 0x000f8000,
-					   r.start + 0x000f8010,
-					   0);
-			if (index == 0) {
-				dma = of_get_property(dev, "system-dma-base",
-							&len);
-				if (dma && len >= sizeof(*dma)) {
-					dma = (unsigned int *)
-						(((unsigned long)dma) +
-						len - sizeof(*dma));
-						pci_dram_offset = *dma;
-				}
-			}
-		} else {
-			printk("No methods for %pOF (model %s), using RTAS\n",
-			       dev, model);
-			hose->ops = &rtas_pci_ops;
-		}
-
-		pci_process_bridge_OF_ranges(hose, dev, index == 0);
-
-		/* check the first bridge for a property that we can
-		   use to set pci_dram_offset */
-		dma = of_get_property(dev, "ibm,dma-ranges", &len);
-		if (index == 0 && dma != NULL && len >= 6 * sizeof(*dma)) {
-			pci_dram_offset = dma[2] - dma[3];
-			printk("pci_dram_offset = %lx\n", pci_dram_offset);
-		}
-	}
-	of_node_put(root);
-
-	/*
-	 *  "Temporary" fixes for PCI devices.
-	 *  -- Geert
-	 */
-	hydra_init();		/* Mac I/O */
-
-	pci_create_OF_bus_map();
-}
-
-/* SL82C105 IDE Control/Status Register */
-#define SL82C105_IDECSR                0x40
-
-/* Fixup for Winbond ATA quirk, required for briq mostly because the
- * 8259 is configured for level sensitive IRQ 14 and so wants the
- * ATA controller to be set to fully native mode or bad things
- * will happen.
- */
-static void chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105)
-{
-	u8 progif;
-
-	/* If non-briq machines need that fixup too, please speak up */
-	if (!machine_is(chrp) || _chrp_type != _CHRP_briq)
-		return;
-
-	if ((sl82c105->class & 5) != 5) {
-		printk("W83C553: Switching SL82C105 IDE to PCI native mode\n");
-		/* Enable SL82C105 PCI native IDE mode */
-		pci_read_config_byte(sl82c105, PCI_CLASS_PROG, &progif);
-		pci_write_config_byte(sl82c105, PCI_CLASS_PROG, progif | 0x05);
-		sl82c105->class |= 0x05;
-		/* Disable SL82C105 second port */
-		pci_write_config_word(sl82c105, SL82C105_IDECSR, 0x0003);
-		/* Clear IO BARs, they will be reassigned */
-		pci_write_config_dword(sl82c105, PCI_BASE_ADDRESS_0, 0);
-		pci_write_config_dword(sl82c105, PCI_BASE_ADDRESS_1, 0);
-		pci_write_config_dword(sl82c105, PCI_BASE_ADDRESS_2, 0);
-		pci_write_config_dword(sl82c105, PCI_BASE_ADDRESS_3, 0);
-	}
-}
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
-			chrp_pci_fixup_winbond_ata);
-
-/* Pegasos2 firmware version 20040810 configures the built-in IDE controller
- * in legacy mode, but sets the PCI registers to PCI native mode.
- * The chip can only operate in legacy mode, so force the PCI class into legacy
- * mode as well. The same fixup must be done to the class-code property in
- * the IDE node /pci@80000000/ide@C,1
- */
-static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
-{
-	u8 progif;
-	struct pci_dev *viaisa;
-
-	if (!machine_is(chrp) || _chrp_type != _CHRP_Pegasos)
-		return;
-	if (viaide->irq != 14)
-		return;
-
-	viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL);
-	if (!viaisa)
-		return;
-	dev_info(&viaide->dev, "Fixing VIA IDE, force legacy mode on\n");
-
-	pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif);
-	pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5);
-	viaide->class &= ~0x5;
-
-	pci_dev_put(viaisa);
-}
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, chrp_pci_fixup_vt8231_ata);
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
deleted file mode 100644
index 6f4a41a9352a..000000000000
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ /dev/null
@@ -1,204 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- *  Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
- *  Thanks to :
- *	Dale Farnsworth <dale@farnsworth.org>
- *	Mark A. Greer <mgreer@mvista.com>
- *	Nicolas DET <nd@bplan-gmbh.de>
- *	Benjamin Herrenschmidt <benh@kernel.crashing.org>
- *  And anyone else who helped me on this.
- */
-
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <linux/mv643xx_eth.h>
-#include <linux/pci.h>
-
-#define PEGASOS2_MARVELL_REGBASE 		(0xf1000000)
-#define PEGASOS2_MARVELL_REGSIZE 		(0x00004000)
-#define PEGASOS2_SRAM_BASE 			(0xf2000000)
-#define PEGASOS2_SRAM_SIZE			(256*1024)
-
-#define PEGASOS2_SRAM_BASE_ETH_PORT0			(PEGASOS2_SRAM_BASE)
-#define PEGASOS2_SRAM_BASE_ETH_PORT1			(PEGASOS2_SRAM_BASE_ETH_PORT0 + (PEGASOS2_SRAM_SIZE / 2) )
-
-#define PEGASOS2_SRAM_RXRING_SIZE		(PEGASOS2_SRAM_SIZE/4)
-#define PEGASOS2_SRAM_TXRING_SIZE		(PEGASOS2_SRAM_SIZE/4)
-
-#undef BE_VERBOSE
-
-#define MV64340_BASE_ADDR_ENABLE                                    0x278
-#define MV64340_INTEGRATED_SRAM_BASE_ADDR                           0x268
-#define MV64340_SRAM_CONFIG                                         0x380
-
-static struct resource mv643xx_eth_shared_resources[] = {
-	[0] = {
-		.name	= "ethernet shared base",
-		.start	= 0xf1000000 + MV643XX_ETH_SHARED_REGS,
-		.end	= 0xf1000000 + MV643XX_ETH_SHARED_REGS +
-					MV643XX_ETH_SHARED_REGS_SIZE - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device mv643xx_eth_shared_device = {
-	.name		= MV643XX_ETH_SHARED_NAME,
-	.id		= 0,
-	.num_resources	= ARRAY_SIZE(mv643xx_eth_shared_resources),
-	.resource	= mv643xx_eth_shared_resources,
-};
-
-/*
- * The orion mdio driver only covers shared + 0x4 up to shared + 0x84 - 1
- */
-static struct resource mv643xx_eth_mvmdio_resources[] = {
-	[0] = {
-		.name	= "ethernet mdio base",
-		.start	= 0xf1000000 + MV643XX_ETH_SHARED_REGS + 0x4,
-		.end	= 0xf1000000 + MV643XX_ETH_SHARED_REGS + 0x83,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device mv643xx_eth_mvmdio_device = {
-	.name		= "orion-mdio",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(mv643xx_eth_mvmdio_resources),
-	.resource	= mv643xx_eth_mvmdio_resources,
-};
-
-static struct resource mv643xx_eth_port1_resources[] = {
-	[0] = {
-		.name	= "eth port1 irq",
-		.start	= 9,
-		.end	= 9,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-static struct mv643xx_eth_platform_data eth_port1_pd = {
-	.shared		= &mv643xx_eth_shared_device,
-	.port_number	= 1,
-	.phy_addr	= MV643XX_ETH_PHY_ADDR(7),
-
-	.tx_sram_addr = PEGASOS2_SRAM_BASE_ETH_PORT1,
-	.tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE,
-	.tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16,
-
-	.rx_sram_addr = PEGASOS2_SRAM_BASE_ETH_PORT1 + PEGASOS2_SRAM_TXRING_SIZE,
-	.rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE,
-	.rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16,
-};
-
-static struct platform_device eth_port1_device = {
-	.name		= MV643XX_ETH_NAME,
-	.id		= 1,
-	.num_resources	= ARRAY_SIZE(mv643xx_eth_port1_resources),
-	.resource	= mv643xx_eth_port1_resources,
-	.dev = {
-		.platform_data = &eth_port1_pd,
-	},
-};
-
-static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
-	&mv643xx_eth_shared_device,
-	&mv643xx_eth_mvmdio_device,
-	&eth_port1_device,
-};
-
-/***********/
-/***********/
-#define MV_READ(offset,val) 	{ val = readl(mv643xx_reg_base + offset); }
-#define MV_WRITE(offset,data) writel(data, mv643xx_reg_base + offset)
-
-static void __iomem *mv643xx_reg_base;
-
-static int __init Enable_SRAM(void)
-{
-	u32 ALong;
-
-	if (mv643xx_reg_base == NULL)
-		mv643xx_reg_base = ioremap(PEGASOS2_MARVELL_REGBASE,
-					PEGASOS2_MARVELL_REGSIZE);
-
-	if (mv643xx_reg_base == NULL)
-		return -ENOMEM;
-
-#ifdef BE_VERBOSE
-	printk("Pegasos II/Marvell MV64361: register remapped from %p to %p\n",
-		(void *)PEGASOS2_MARVELL_REGBASE, (void *)mv643xx_reg_base);
-#endif
-
-	MV_WRITE(MV64340_SRAM_CONFIG, 0);
-
-	MV_WRITE(MV64340_INTEGRATED_SRAM_BASE_ADDR, PEGASOS2_SRAM_BASE >> 16);
-
-	MV_READ(MV64340_BASE_ADDR_ENABLE, ALong);
-	ALong &= ~(1 << 19);
-	MV_WRITE(MV64340_BASE_ADDR_ENABLE, ALong);
-
-	ALong = 0x02;
-	ALong |= PEGASOS2_SRAM_BASE & 0xffff0000;
-	MV_WRITE(MV643XX_ETH_BAR_4, ALong);
-
-	MV_WRITE(MV643XX_ETH_SIZE_REG_4, (PEGASOS2_SRAM_SIZE-1) & 0xffff0000);
-
-	MV_READ(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
-	ALong &= ~(1 << 4);
-	MV_WRITE(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
-
-#ifdef BE_VERBOSE
-	printk("Pegasos II/Marvell MV64361: register unmapped\n");
-	printk("Pegasos II/Marvell MV64361: SRAM at %p, size=%x\n", (void*) PEGASOS2_SRAM_BASE, PEGASOS2_SRAM_SIZE);
-#endif
-
-	iounmap(mv643xx_reg_base);
-	mv643xx_reg_base = NULL;
-
-	return 1;
-}
-
-
-/***********/
-/***********/
-static int __init mv643xx_eth_add_pds(void)
-{
-	int ret = 0;
-	static struct pci_device_id pci_marvell_mv64360[] = {
-		{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360) },
-		{ }
-	};
-
-#ifdef BE_VERBOSE
-	printk("Pegasos II/Marvell MV64361: init\n");
-#endif
-
-	if (pci_dev_present(pci_marvell_mv64360)) {
-		ret = platform_add_devices(mv643xx_eth_pd_devs,
-				ARRAY_SIZE(mv643xx_eth_pd_devs));
-
-		if ( Enable_SRAM() < 0)
-		{
-			eth_port1_pd.tx_sram_addr = 0;
-			eth_port1_pd.tx_sram_size = 0;
-			eth_port1_pd.rx_sram_addr = 0;
-			eth_port1_pd.rx_sram_size = 0;
-
-#ifdef BE_VERBOSE
-			printk("Pegasos II/Marvell MV64361: Can't enable the "
-				"SRAM\n");
-#endif
-		}
-	}
-
-#ifdef BE_VERBOSE
-	printk("Pegasos II/Marvell MV64361: init is over\n");
-#endif
-
-	return ret;
-}
-
-device_initcall(mv643xx_eth_add_pds);
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
deleted file mode 100644
index 36ee3a5056a1..000000000000
--- a/arch/powerpc/platforms/chrp/setup.c
+++ /dev/null
@@ -1,586 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- *  Copyright (C) 1995  Linus Torvalds
- *  Adapted from 'alpha' version by Gary Thomas
- *  Modified by Cort Dougan (cort@cs.nmt.edu)
- */
-
-/*
- * bootup setup stuff..
- */
-
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/stddef.h>
-#include <linux/unistd.h>
-#include <linux/ptrace.h>
-#include <linux/user.h>
-#include <linux/tty.h>
-#include <linux/major.h>
-#include <linux/interrupt.h>
-#include <linux/reboot.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <generated/utsrelease.h>
-#include <linux/adb.h>
-#include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/console.h>
-#include <linux/seq_file.h>
-#include <linux/root_dev.h>
-#include <linux/initrd.h>
-#include <linux/timer.h>
-#include <linux/of_address.h>
-#include <linux/of_fdt.h>
-#include <linux/of_irq.h>
-
-#include <asm/io.h>
-#include <asm/pci-bridge.h>
-#include <asm/dma.h>
-#include <asm/machdep.h>
-#include <asm/irq.h>
-#include <asm/hydra.h>
-#include <asm/sections.h>
-#include <asm/time.h>
-#include <asm/i8259.h>
-#include <asm/mpic.h>
-#include <asm/rtas.h>
-#include <asm/xmon.h>
-
-#include "chrp.h"
-#include "gg2.h"
-
-void rtas_indicator_progress(char *, unsigned short);
-
-int _chrp_type;
-EXPORT_SYMBOL(_chrp_type);
-
-static struct mpic *chrp_mpic;
-
-/* Used for doing CHRP event-scans */
-DEFINE_PER_CPU(struct timer_list, heartbeat_timer);
-unsigned long event_scan_interval;
-
-extern unsigned long loops_per_jiffy;
-
-/* To be replaced by RTAS when available */
-static unsigned int __iomem *briq_SPOR;
-
-#ifdef CONFIG_SMP
-extern struct smp_ops_t chrp_smp_ops;
-#endif
-
-static const char *gg2_memtypes[4] = {
-	"FPM", "SDRAM", "EDO", "BEDO"
-};
-static const char *gg2_cachesizes[4] = {
-	"256 KB", "512 KB", "1 MB", "Reserved"
-};
-static const char *gg2_cachetypes[4] = {
-	"Asynchronous", "Reserved", "Flow-Through Synchronous",
-	"Pipelined Synchronous"
-};
-static const char *gg2_cachemodes[4] = {
-	"Disabled", "Write-Through", "Copy-Back", "Transparent Mode"
-};
-
-static const char *chrp_names[] = {
-	"Unknown",
-	"","","",
-	"Motorola",
-	"IBM or Longtrail",
-	"Genesi Pegasos",
-	"Total Impact Briq"
-};
-
-static void chrp_show_cpuinfo(struct seq_file *m)
-{
-	int i, sdramen;
-	unsigned int t;
-	struct device_node *root;
-	const char *model = "";
-
-	root = of_find_node_by_path("/");
-	if (root)
-		model = of_get_property(root, "model", NULL);
-	seq_printf(m, "machine\t\t: CHRP %s\n", model);
-
-	/* longtrail (goldengate) stuff */
-	if (model && !strncmp(model, "IBM,LongTrail", 13)) {
-		/* VLSI VAS96011/12 `Golden Gate 2' */
-		/* Memory banks */
-		sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
-			   >>31) & 1;
-		for (i = 0; i < (sdramen ? 4 : 6); i++) {
-			t = in_le32(gg2_pci_config_base+
-						 GG2_PCI_DRAM_BANK0+
-						 i*4);
-			if (!(t & 1))
-				continue;
-			switch ((t>>8) & 0x1f) {
-			case 0x1f:
-				model = "4 MB";
-				break;
-			case 0x1e:
-				model = "8 MB";
-				break;
-			case 0x1c:
-				model = "16 MB";
-				break;
-			case 0x18:
-				model = "32 MB";
-				break;
-			case 0x10:
-				model = "64 MB";
-				break;
-			case 0x00:
-				model = "128 MB";
-				break;
-			default:
-				model = "Reserved";
-				break;
-			}
-			seq_printf(m, "memory bank %d\t: %s %s\n", i, model,
-				   gg2_memtypes[sdramen ? 1 : ((t>>1) & 3)]);
-		}
-		/* L2 cache */
-		t = in_le32(gg2_pci_config_base+GG2_PCI_CC_CTRL);
-		seq_printf(m, "board l2\t: %s %s (%s)\n",
-			   gg2_cachesizes[(t>>7) & 3],
-			   gg2_cachetypes[(t>>2) & 3],
-			   gg2_cachemodes[t & 3]);
-	}
-	of_node_put(root);
-}
-
-/*
- *  Fixes for the National Semiconductor PC78308VUL SuperI/O
- *
- *  Some versions of Open Firmware incorrectly initialize the IRQ settings
- *  for keyboard and mouse
- */
-static inline void __init sio_write(u8 val, u8 index)
-{
-	outb(index, 0x15c);
-	outb(val, 0x15d);
-}
-
-static inline u8 __init sio_read(u8 index)
-{
-	outb(index, 0x15c);
-	return inb(0x15d);
-}
-
-static void __init sio_fixup_irq(const char *name, u8 device, u8 level,
-				     u8 type)
-{
-	u8 level0, type0, active;
-
-	/* select logical device */
-	sio_write(device, 0x07);
-	active = sio_read(0x30);
-	level0 = sio_read(0x70);
-	type0 = sio_read(0x71);
-	if (level0 != level || type0 != type || !active) {
-		printk(KERN_WARNING "sio: %s irq level %d, type %d, %sactive: "
-		       "remapping to level %d, type %d, active\n",
-		       name, level0, type0, !active ? "in" : "", level, type);
-		sio_write(0x01, 0x30);
-		sio_write(level, 0x70);
-		sio_write(type, 0x71);
-	}
-}
-
-static void __init sio_init(void)
-{
-	struct device_node *root;
-	const char *model;
-
-	root = of_find_node_by_path("/");
-	if (!root)
-		return;
-
-	model = of_get_property(root, "model", NULL);
-	if (model && !strncmp(model, "IBM,LongTrail", 13)) {
-		/* logical device 0 (KBC/Keyboard) */
-		sio_fixup_irq("keyboard", 0, 1, 2);
-		/* select logical device 1 (KBC/Mouse) */
-		sio_fixup_irq("mouse", 1, 12, 2);
-	}
-
-	of_node_put(root);
-}
-
-
-static void __init pegasos_set_l2cr(void)
-{
-	struct device_node *np;
-
-	/* On Pegasos, enable the l2 cache if needed, as the OF forgets it */
-	if (_chrp_type != _CHRP_Pegasos)
-		return;
-
-	/* Enable L2 cache if needed */
-	np = of_find_node_by_type(NULL, "cpu");
-	if (np != NULL) {
-		const unsigned int *l2cr = of_get_property(np, "l2cr", NULL);
-		if (l2cr == NULL) {
-			printk ("Pegasos l2cr : no cpu l2cr property found\n");
-			goto out;
-		}
-		if (!((*l2cr) & 0x80000000)) {
-			printk ("Pegasos l2cr : L2 cache was not active, "
-				"activating\n");
-			_set_L2CR(0);
-			_set_L2CR((*l2cr) | 0x80000000);
-		}
-	}
-out:
-	of_node_put(np);
-}
-
-static void __noreturn briq_restart(char *cmd)
-{
-	local_irq_disable();
-	if (briq_SPOR)
-		out_be32(briq_SPOR, 0);
-	for(;;);
-}
-
-/*
- * Per default, input/output-device points to the keyboard/screen
- * If no card is installed, the built-in serial port is used as a fallback.
- * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
- * to the built-in serial node. Instead, a /failsafe node is created.
- */
-static __init void chrp_init(void)
-{
-	struct device_node *node;
-	const char *property;
-
-	if (strstr(boot_command_line, "console="))
-		return;
-	/* find the boot console from /chosen/stdout */
-	if (!of_chosen)
-		return;
-	node = of_find_node_by_path("/");
-	if (!node)
-		return;
-	property = of_get_property(node, "model", NULL);
-	if (!property)
-		goto out_put;
-	if (strcmp(property, "Pegasos2"))
-		goto out_put;
-	/* this is a Pegasos2 */
-	property = of_get_property(of_chosen, "linux,stdout-path", NULL);
-	if (!property)
-		goto out_put;
-	of_node_put(node);
-	node = of_find_node_by_path(property);
-	if (!node)
-		return;
-	if (!of_node_is_type(node, "serial"))
-		goto out_put;
-	/*
-	 * The 9pin connector is either /failsafe
-	 * or /pci@80000000/isa@C/serial@i2F8
-	 * The optional graphics card has also type 'serial' in VGA mode.
-	 */
-	if (of_node_name_eq(node, "failsafe") || of_node_name_eq(node, "serial"))
-		add_preferred_console("ttyS", 0, NULL);
-out_put:
-	of_node_put(node);
-}
-
-static void __init chrp_setup_arch(void)
-{
-	struct device_node *root = of_find_node_by_path("/");
-	const char *machine = NULL;
-
-	/* init to some ~sane value until calibrate_delay() runs */
-	loops_per_jiffy = 50000000/HZ;
-
-	if (root)
-		machine = of_get_property(root, "model", NULL);
-	if (machine && strncmp(machine, "Pegasos", 7) == 0) {
-		_chrp_type = _CHRP_Pegasos;
-	} else if (machine && strncmp(machine, "IBM", 3) == 0) {
-		_chrp_type = _CHRP_IBM;
-	} else if (machine && strncmp(machine, "MOT", 3) == 0) {
-		_chrp_type = _CHRP_Motorola;
-	} else if (machine && strncmp(machine, "TotalImpact,BRIQ-1", 18) == 0) {
-		_chrp_type = _CHRP_briq;
-		/* Map the SPOR register on briq and change the restart hook */
-		briq_SPOR = ioremap(0xff0000e8, 4);
-		ppc_md.restart = briq_restart;
-	} else {
-		/* Let's assume it is an IBM chrp if all else fails */
-		_chrp_type = _CHRP_IBM;
-	}
-	of_node_put(root);
-	printk("chrp type = %x [%s]\n", _chrp_type, chrp_names[_chrp_type]);
-
-	rtas_initialize();
-	if (rtas_function_token(RTAS_FN_DISPLAY_CHARACTER) >= 0)
-		ppc_md.progress = rtas_progress;
-
-	/* use RTAS time-of-day routines if available */
-	if (rtas_function_token(RTAS_FN_GET_TIME_OF_DAY) != RTAS_UNKNOWN_SERVICE) {
-		ppc_md.get_boot_time	= rtas_get_boot_time;
-		ppc_md.get_rtc_time	= rtas_get_rtc_time;
-		ppc_md.set_rtc_time	= rtas_set_rtc_time;
-	}
-
-	/* On pegasos, enable the L2 cache if not already done by OF */
-	pegasos_set_l2cr();
-
-	/*
-	 *  Fix the Super I/O configuration
-	 */
-	sio_init();
-
-	/*
-	 * Print the banner, then scroll down so boot progress
-	 * can be printed.  -- Cort
-	 */
-	if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
-}
-
-static void chrp_8259_cascade(struct irq_desc *desc)
-{
-	struct irq_chip *chip = irq_desc_get_chip(desc);
-	unsigned int cascade_irq = i8259_irq();
-
-	if (cascade_irq)
-		generic_handle_irq(cascade_irq);
-
-	chip->irq_eoi(&desc->irq_data);
-}
-
-/*
- * Finds the open-pic node and sets up the mpic driver.
- */
-static void __init chrp_find_openpic(void)
-{
-	struct device_node *np, *root;
-	int len, i, j;
-	int isu_size;
-	const unsigned int *iranges, *opprop = NULL;
-	int oplen = 0;
-	unsigned long opaddr;
-	int na = 1;
-
-	np = of_find_node_by_type(NULL, "open-pic");
-	if (np == NULL)
-		return;
-	root = of_find_node_by_path("/");
-	if (root) {
-		opprop = of_get_property(root, "platform-open-pic", &oplen);
-		na = of_n_addr_cells(root);
-	}
-	if (opprop && oplen >= na * sizeof(unsigned int)) {
-		opaddr = opprop[na-1];	/* assume 32-bit */
-		oplen /= na * sizeof(unsigned int);
-	} else {
-		struct resource r;
-		if (of_address_to_resource(np, 0, &r)) {
-			goto bail;
-		}
-		opaddr = r.start;
-		oplen = 0;
-	}
-
-	printk(KERN_INFO "OpenPIC at %lx\n", opaddr);
-
-	iranges = of_get_property(np, "interrupt-ranges", &len);
-	if (iranges == NULL)
-		len = 0;	/* non-distributed mpic */
-	else
-		len /= 2 * sizeof(unsigned int);
-
-	/*
-	 * The first pair of cells in interrupt-ranges refers to the
-	 * IDU; subsequent pairs refer to the ISUs.
-	 */
-	if (oplen < len) {
-		printk(KERN_ERR "Insufficient addresses for distributed"
-		       " OpenPIC (%d < %d)\n", oplen, len);
-		len = oplen;
-	}
-
-	isu_size = 0;
-	if (len > 0 && iranges[1] != 0) {
-		printk(KERN_INFO "OpenPIC irqs %d..%d in IDU\n",
-		       iranges[0], iranges[0] + iranges[1] - 1);
-	}
-	if (len > 1)
-		isu_size = iranges[3];
-
-	chrp_mpic = mpic_alloc(np, opaddr, MPIC_NO_RESET,
-			isu_size, 0, " MPIC    ");
-	if (chrp_mpic == NULL) {
-		printk(KERN_ERR "Failed to allocate MPIC structure\n");
-		goto bail;
-	}
-	j = na - 1;
-	for (i = 1; i < len; ++i) {
-		iranges += 2;
-		j += na;
-		printk(KERN_INFO "OpenPIC irqs %d..%d in ISU at %x\n",
-		       iranges[0], iranges[0] + iranges[1] - 1,
-		       opprop[j]);
-		mpic_assign_isu(chrp_mpic, i - 1, opprop[j]);
-	}
-
-	mpic_init(chrp_mpic);
-	ppc_md.get_irq = mpic_get_irq;
- bail:
-	of_node_put(root);
-	of_node_put(np);
-}
-
-static void __init chrp_find_8259(void)
-{
-	struct device_node *np, *pic = NULL;
-	unsigned long chrp_int_ack = 0;
-	unsigned int cascade_irq;
-
-	/* Look for cascade */
-	for_each_node_by_type(np, "interrupt-controller")
-		if (of_device_is_compatible(np, "chrp,iic")) {
-			pic = np;
-			break;
-		}
-	/* Ok, 8259 wasn't found. We need to handle the case where
-	 * we have a pegasos that claims to be chrp but doesn't have
-	 * a proper interrupt tree
-	 */
-	if (pic == NULL && chrp_mpic != NULL) {
-		printk(KERN_ERR "i8259: Not found in device-tree"
-		       " assuming no legacy interrupts\n");
-		return;
-	}
-
-	/* Look for intack. In a perfect world, we would look for it on
-	 * the ISA bus that holds the 8259 but heh... Works that way. If
-	 * we ever see a problem, we can try to re-use the pSeries code here.
-	 * Also, Pegasos-type platforms don't have a proper node to start
-	 * from anyway
-	 */
-	for_each_node_by_name(np, "pci") {
-		const unsigned int *addrp = of_get_property(np,
-				"8259-interrupt-acknowledge", NULL);
-
-		if (addrp == NULL)
-			continue;
-		chrp_int_ack = addrp[of_n_addr_cells(np)-1];
-		break;
-	}
-	of_node_put(np);
-	if (np == NULL)
-		printk(KERN_WARNING "Cannot find PCI interrupt acknowledge"
-		       " address, polling\n");
-
-	i8259_init(pic, chrp_int_ack);
-	if (ppc_md.get_irq == NULL) {
-		ppc_md.get_irq = i8259_irq;
-		irq_set_default_host(i8259_get_host());
-	}
-	if (chrp_mpic != NULL) {
-		cascade_irq = irq_of_parse_and_map(pic, 0);
-		if (!cascade_irq)
-			printk(KERN_ERR "i8259: failed to map cascade irq\n");
-		else
-			irq_set_chained_handler(cascade_irq,
-						chrp_8259_cascade);
-	}
-}
-
-static void __init chrp_init_IRQ(void)
-{
-#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON)
-	struct device_node *kbd;
-#endif
-	chrp_find_openpic();
-	chrp_find_8259();
-
-#ifdef CONFIG_SMP
-	/* Pegasos has no MPIC, those ops would make it crash. It might be an
-	 * option to move setting them to after we probe the PIC though
-	 */
-	if (chrp_mpic != NULL)
-		smp_ops = &chrp_smp_ops;
-#endif /* CONFIG_SMP */
-
-	if (_chrp_type == _CHRP_Pegasos)
-		ppc_md.get_irq        = i8259_irq;
-
-#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON)
-	/* see if there is a keyboard in the device tree
-	   with a parent of type "adb" */
-	for_each_node_by_name(kbd, "keyboard")
-		if (of_node_is_type(kbd->parent, "adb"))
-			break;
-	of_node_put(kbd);
-	if (kbd) {
-		if (request_irq(HYDRA_INT_ADB_NMI, xmon_irq, 0, "XMON break",
-				NULL))
-			pr_err("Failed to register XMON break interrupt\n");
-	}
-#endif
-}
-
-static void __init
-chrp_init2(void)
-{
-#if IS_ENABLED(CONFIG_NVRAM)
-	chrp_nvram_init();
-#endif
-
-	request_region(0x20,0x20,"pic1");
-	request_region(0xa0,0x20,"pic2");
-	request_region(0x00,0x20,"dma1");
-	request_region(0x40,0x20,"timer");
-	request_region(0x80,0x10,"dma page reg");
-	request_region(0xc0,0x20,"dma2");
-
-	if (ppc_md.progress)
-		ppc_md.progress("  Have fun!    ", 0x7777);
-}
-
-static int __init chrp_probe(void)
-{
-	const char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(),
-						"device_type", NULL);
- 	if (dtype == NULL)
- 		return 0;
- 	if (strcmp(dtype, "chrp"))
-		return 0;
-
-	DMA_MODE_READ = 0x44;
-	DMA_MODE_WRITE = 0x48;
-
-	pm_power_off = rtas_power_off;
-
-	chrp_init();
-
-	return 1;
-}
-
-define_machine(chrp) {
-	.name			= "CHRP",
-	.probe			= chrp_probe,
-	.setup_arch		= chrp_setup_arch,
-	.discover_phbs		= chrp_find_bridges,
-	.init			= chrp_init2,
-	.show_cpuinfo		= chrp_show_cpuinfo,
-	.init_IRQ		= chrp_init_IRQ,
-	.restart		= rtas_restart,
-	.halt			= rtas_halt,
-	.time_init		= chrp_time_init,
-	.set_rtc_time		= chrp_set_rtc_time,
-	.get_rtc_time		= chrp_get_rtc_time,
-	.phys_mem_access_prot	= pci_phys_mem_access_prot,
-};
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
deleted file mode 100644
index ab95155647a4..000000000000
--- a/arch/powerpc/platforms/chrp/smp.c
+++ /dev/null
@@ -1,54 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Smp support for CHRP machines.
- *
- * Written by Cort Dougan (cort@cs.nmt.edu) borrowing a great
- * deal of code from the sparc and intel versions.
- *
- * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/smp.h>
-#include <linux/interrupt.h>
-#include <linux/kernel_stat.h>
-#include <linux/delay.h>
-#include <linux/spinlock.h>
-#include <linux/pgtable.h>
-
-#include <asm/ptrace.h>
-#include <linux/atomic.h>
-#include <asm/irq.h>
-#include <asm/page.h>
-#include <asm/sections.h>
-#include <asm/io.h>
-#include <asm/smp.h>
-#include <asm/machdep.h>
-#include <asm/mpic.h>
-#include <asm/rtas.h>
-
-static int smp_chrp_kick_cpu(int nr)
-{
-	*(unsigned long *)KERNELBASE = nr;
-	asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory");
-
-	return 0;
-}
-
-static void smp_chrp_setup_cpu(int cpu_nr)
-{
-	mpic_setup_this_cpu();
-}
-
-/* CHRP with openpic */
-struct smp_ops_t chrp_smp_ops = {
-	.cause_nmi_ipi = NULL,
-	.message_pass = smp_mpic_message_pass,
-	.probe = smp_mpic_probe,
-	.kick_cpu = smp_chrp_kick_cpu,
-	.setup_cpu = smp_chrp_setup_cpu,
-	.give_timebase = rtas_give_timebase,
-	.take_timebase = rtas_take_timebase,
-};
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c
deleted file mode 100644
index d46417e3d8e0..000000000000
--- a/arch/powerpc/platforms/chrp/time.c
+++ /dev/null
@@ -1,159 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
- *
- * Adapted for PowerPC (PReP) by Gary Thomas
- * Modified by Cort Dougan (cort@cs.nmt.edu).
- * Copied and modified from arch/i386/kernel/time.c
- *
- */
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
-#include <linux/time.h>
-#include <linux/timex.h>
-#include <linux/kernel_stat.h>
-#include <linux/mc146818rtc.h>
-#include <linux/init.h>
-#include <linux/bcd.h>
-#include <linux/ioport.h>
-#include <linux/of_address.h>
-
-#include <asm/io.h>
-#include <asm/nvram.h>
-#include <asm/sections.h>
-#include <asm/time.h>
-
-#include <platforms/chrp/chrp.h>
-
-#define NVRAM_AS0  0x74
-#define NVRAM_AS1  0x75
-#define NVRAM_DATA 0x77
-
-static int nvram_as1 = NVRAM_AS1;
-static int nvram_as0 = NVRAM_AS0;
-static int nvram_data = NVRAM_DATA;
-
-long __init chrp_time_init(void)
-{
-	struct device_node *rtcs;
-	struct resource r;
-	int base;
-
-	rtcs = of_find_compatible_node(NULL, "rtc", "pnpPNP,b00");
-	if (rtcs == NULL)
-		rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc");
-	if (rtcs == NULL)
-		return 0;
-	if (of_address_to_resource(rtcs, 0, &r)) {
-		of_node_put(rtcs);
-		return 0;
-	}
-	of_node_put(rtcs);
-
-	base = r.start;
-	nvram_as1 = 0;
-	nvram_as0 = base;
-	nvram_data = base + 1;
-
-	return 0;
-}
-
-static int chrp_cmos_clock_read(int addr)
-{
-	if (nvram_as1 != 0)
-		outb(addr>>8, nvram_as1);
-	outb(addr, nvram_as0);
-	return (inb(nvram_data));
-}
-
-static void chrp_cmos_clock_write(unsigned long val, int addr)
-{
-	if (nvram_as1 != 0)
-		outb(addr>>8, nvram_as1);
-	outb(addr, nvram_as0);
-	outb(val, nvram_data);
-	return;
-}
-
-/*
- * Set the hardware clock. -- Cort
- */
-int chrp_set_rtc_time(struct rtc_time *tmarg)
-{
-	unsigned char save_control, save_freq_select;
-	struct rtc_time tm = *tmarg;
-
-	spin_lock(&rtc_lock);
-
-	save_control = chrp_cmos_clock_read(RTC_CONTROL); /* tell the clock it's being set */
-
-	chrp_cmos_clock_write((save_control|RTC_SET), RTC_CONTROL);
-
-	save_freq_select = chrp_cmos_clock_read(RTC_FREQ_SELECT); /* stop and reset prescaler */
-
-	chrp_cmos_clock_write((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
-
-	if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
-		tm.tm_sec = bin2bcd(tm.tm_sec);
-		tm.tm_min = bin2bcd(tm.tm_min);
-		tm.tm_hour = bin2bcd(tm.tm_hour);
-		tm.tm_mon = bin2bcd(tm.tm_mon);
-		tm.tm_mday = bin2bcd(tm.tm_mday);
-		tm.tm_year = bin2bcd(tm.tm_year);
-	}
-	chrp_cmos_clock_write(tm.tm_sec,RTC_SECONDS);
-	chrp_cmos_clock_write(tm.tm_min,RTC_MINUTES);
-	chrp_cmos_clock_write(tm.tm_hour,RTC_HOURS);
-	chrp_cmos_clock_write(tm.tm_mon,RTC_MONTH);
-	chrp_cmos_clock_write(tm.tm_mday,RTC_DAY_OF_MONTH);
-	chrp_cmos_clock_write(tm.tm_year,RTC_YEAR);
-
-	/* The following flags have to be released exactly in this order,
-	 * otherwise the DS12887 (popular MC146818A clone with integrated
-	 * battery and quartz) will not reset the oscillator and will not
-	 * update precisely 500 ms later. You won't find this mentioned in
-	 * the Dallas Semiconductor data sheets, but who believes data
-	 * sheets anyway ...                           -- Markus Kuhn
-	 */
-	chrp_cmos_clock_write(save_control, RTC_CONTROL);
-	chrp_cmos_clock_write(save_freq_select, RTC_FREQ_SELECT);
-
-	spin_unlock(&rtc_lock);
-	return 0;
-}
-
-void chrp_get_rtc_time(struct rtc_time *tm)
-{
-	unsigned int year, mon, day, hour, min, sec;
-
-	do {
-		sec = chrp_cmos_clock_read(RTC_SECONDS);
-		min = chrp_cmos_clock_read(RTC_MINUTES);
-		hour = chrp_cmos_clock_read(RTC_HOURS);
-		day = chrp_cmos_clock_read(RTC_DAY_OF_MONTH);
-		mon = chrp_cmos_clock_read(RTC_MONTH);
-		year = chrp_cmos_clock_read(RTC_YEAR);
-	} while (sec != chrp_cmos_clock_read(RTC_SECONDS));
-
-	if (!(chrp_cmos_clock_read(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
-		sec = bcd2bin(sec);
-		min = bcd2bin(min);
-		hour = bcd2bin(hour);
-		day = bcd2bin(day);
-		mon = bcd2bin(mon);
-		year = bcd2bin(year);
-	}
-	if (year < 70)
-		year += 100;
-	tm->tm_sec = sec;
-	tm->tm_min = min;
-	tm->tm_hour = hour;
-	tm->tm_mday = day;
-	tm->tm_mon = mon;
-	tm->tm_year = year;
-}
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 02/10] powerpc/chrp: Remove various dead code
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-16 16:15   ` Christophe Leroy
  2024-11-14 13:11 ` [RFC PATCH 03/10] powerpc/chrp: Remove PPC_CHRP from defconfigs Michael Ellerman
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

Remove various bits of code that are dead now that PPC_CHRP has been
removed.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/Kconfig                 |  5 +--
 arch/powerpc/boot/Makefile           |  1 -
 arch/powerpc/include/asm/processor.h |  6 ---
 arch/powerpc/kernel/head_book3s_32.S | 12 ------
 arch/powerpc/kernel/pci_32.c         |  2 +-
 arch/powerpc/kernel/prom_init.c      | 56 ----------------------------
 6 files changed, 3 insertions(+), 79 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a9dd4c39ec00..f79e28f47dea 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -418,11 +418,10 @@ config PPC_DCR
 config PPC_PCI_OF_BUS_MAP
 	bool "Use pci_to_OF_bus_map (deprecated)"
 	depends on PPC32
-	depends on PPC_PMAC || PPC_CHRP
+	depends on PPC_PMAC
 	help
 	  This option uses pci_to_OF_bus_map to map OF nodes to PCI devices, which
-	  restricts the system to only having 256 PCI buses. On CHRP it also causes
-	  the "pci-OF-bus-map" property to be created in the device tree.
+	  restricts the system to only having 256 PCI buses.
 
 	  If unsure, say "N".
 
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 1ff6ad4f6cd2..8a0fb044e885 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -278,7 +278,6 @@ image-$(CONFIG_PPC_PSERIES)		+= zImage.pseries
 image-$(CONFIG_PPC_POWERNV)		+= zImage.pseries
 image-$(CONFIG_PPC_IBM_CELL_BLADE)	+= zImage.pseries
 image-$(CONFIG_PPC_PS3)			+= dtbImage.ps3
-image-$(CONFIG_PPC_CHRP)		+= zImage.chrp
 image-$(CONFIG_PPC_EFIKA)		+= zImage.chrp
 image-$(CONFIG_PPC_PMAC)		+= zImage.pmac
 image-$(CONFIG_PPC_HOLLY)		+= dtbImage.holly
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 6b94de17201c..b00b5ae2cfef 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -53,12 +53,6 @@
 #define _PREP_IBM	0x00	/* ibm prep */
 #define _PREP_Bull	0x03	/* bull prep */
 
-/* CHRP sub-platform types. These are arbitrary */
-#define _CHRP_Motorola	0x04	/* motorola chrp, the cobra */
-#define _CHRP_IBM	0x05	/* IBM chrp, the longtrail and longtrail 2 */
-#define _CHRP_Pegasos	0x06	/* Genesi/bplan's Pegasos and Pegasos2 */
-#define _CHRP_briq	0x07	/* TotalImpact's briQ */
-
 #if defined(__KERNEL__) && defined(CONFIG_PPC32)
 
 extern int _chrp_type;
diff --git a/arch/powerpc/kernel/head_book3s_32.S b/arch/powerpc/kernel/head_book3s_32.S
index cb2bca76be53..c6e297fd36e2 100644
--- a/arch/powerpc/kernel/head_book3s_32.S
+++ b/arch/powerpc/kernel/head_book3s_32.S
@@ -256,20 +256,8 @@ __secondary_hold_acknowledge:
  */
 	START_EXCEPTION(INTERRUPT_MACHINE_CHECK, MachineCheck)
 	EXCEPTION_PROLOG_0
-#ifdef CONFIG_PPC_CHRP
-	mtspr	SPRN_SPRG_SCRATCH2,r1
-	mfspr	r1, SPRN_SPRG_THREAD
-	lwz	r1, RTAS_SP(r1)
-	cmpwi	cr1, r1, 0
-	bne	cr1, 7f
-	mfspr	r1, SPRN_SPRG_SCRATCH2
-#endif /* CONFIG_PPC_CHRP */
 	EXCEPTION_PROLOG_1
 7:	EXCEPTION_PROLOG_2 0x200 MachineCheck
-#ifdef CONFIG_PPC_CHRP
-	beq	cr1, 1f
-	twi	31, 0, 0
-#endif
 1:	prepare_transfer_to_handler
 	bl	machine_check_exception
 	b	interrupt_return
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index ce0c8623e563..461e1a7f4fc2 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -277,7 +277,7 @@ static int __init pcibios_init(void)
 #endif
 	}
 
-#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_CHRP)
+#ifdef CONFIG_PPC_PMAC
 #ifdef CONFIG_PPC_PCI_OF_BUS_MAP
 	pci_bus_count = next_busno;
 
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 73210e5bcfa7..94ffc52440bd 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2792,61 +2792,6 @@ static void __init flatten_device_tree(void)
 		    dt_struct_start, dt_struct_end);
 }
 
-#ifdef CONFIG_PPC_CHRP
-/*
- * Pegasos and BriQ lacks the "ranges" property in the isa node
- * Pegasos needs decimal IRQ 14/15, not hexadecimal
- * Pegasos has the IDE configured in legacy mode, but advertised as native
- */
-static void __init fixup_device_tree_chrp(void)
-{
-	phandle ph;
-	u32 prop[6];
-	u32 rloc = 0x01006000; /* IO space; PCI device = 12 */
-	char *name;
-	int rc;
-
-	name = "/pci@80000000/isa@c";
-	ph = call_prom("finddevice", 1, 1, ADDR(name));
-	if (!PHANDLE_VALID(ph)) {
-		name = "/pci@ff500000/isa@6";
-		ph = call_prom("finddevice", 1, 1, ADDR(name));
-		rloc = 0x01003000; /* IO space; PCI device = 6 */
-	}
-	if (PHANDLE_VALID(ph)) {
-		rc = prom_getproplen(ph, "ranges");
-		if (rc == 0 || rc == PROM_ERROR) {
-			prom_printf("Fixing up missing ISA range on Pegasos...\n");
-
-			prop[0] = 0x1;
-			prop[1] = 0x0;
-			prop[2] = rloc;
-			prop[3] = 0x0;
-			prop[4] = 0x0;
-			prop[5] = 0x00010000;
-			prom_setprop(ph, name, "ranges", prop, sizeof(prop));
-		}
-	}
-
-	name = "/pci@80000000/ide@C,1";
-	ph = call_prom("finddevice", 1, 1, ADDR(name));
-	if (PHANDLE_VALID(ph)) {
-		prom_printf("Fixing up IDE interrupt on Pegasos...\n");
-		prop[0] = 14;
-		prop[1] = 0x0;
-		prom_setprop(ph, name, "interrupts", prop, 2*sizeof(u32));
-		prom_printf("Fixing up IDE class-code on Pegasos...\n");
-		rc = prom_getprop(ph, "class-code", prop, sizeof(u32));
-		if (rc == sizeof(u32)) {
-			prop[0] &= ~0x5;
-			prom_setprop(ph, name, "class-code", prop, sizeof(u32));
-		}
-	}
-}
-#else
-#define fixup_device_tree_chrp()
-#endif
-
 #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
 static void __init fixup_device_tree_pmac(void)
 {
@@ -3109,7 +3054,6 @@ static inline void fixup_device_tree_pasemi(void) { }
 
 static void __init fixup_device_tree(void)
 {
-	fixup_device_tree_chrp();
 	fixup_device_tree_pmac();
 	fixup_device_tree_efika();
 	fixup_device_tree_pasemi();
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 03/10] powerpc/chrp: Remove PPC_CHRP from defconfigs
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
  2024-11-14 13:11 ` [RFC PATCH 02/10] powerpc/chrp: Remove various dead code Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 13:11 ` [RFC PATCH 04/10] powerpc/powermac: Remove machine_is(chrp) test Michael Ellerman
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/configs/52xx/cm5200_defconfig        | 1 -
 arch/powerpc/configs/52xx/lite5200b_defconfig     | 1 -
 arch/powerpc/configs/52xx/motionpro_defconfig     | 1 -
 arch/powerpc/configs/52xx/pcm030_defconfig        | 1 -
 arch/powerpc/configs/52xx/tqm5200_defconfig       | 1 -
 arch/powerpc/configs/83xx/asp8347_defconfig       | 1 -
 arch/powerpc/configs/83xx/kmeter1_defconfig       | 1 -
 arch/powerpc/configs/83xx/mpc8313_rdb_defconfig   | 1 -
 arch/powerpc/configs/83xx/mpc8315_rdb_defconfig   | 1 -
 arch/powerpc/configs/83xx/mpc832x_rdb_defconfig   | 1 -
 arch/powerpc/configs/83xx/mpc834x_itx_defconfig   | 1 -
 arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig | 1 -
 arch/powerpc/configs/83xx/mpc836x_rdk_defconfig   | 1 -
 arch/powerpc/configs/83xx/mpc837x_rdb_defconfig   | 1 -
 arch/powerpc/configs/86xx-hw.config               | 1 -
 arch/powerpc/configs/amigaone_defconfig           | 1 -
 arch/powerpc/configs/ep8248e_defconfig            | 1 -
 arch/powerpc/configs/gamecube_defconfig           | 1 -
 arch/powerpc/configs/holly_defconfig              | 1 -
 arch/powerpc/configs/linkstation_defconfig        | 1 -
 arch/powerpc/configs/mpc512x_defconfig            | 1 -
 arch/powerpc/configs/mpc5200_defconfig            | 1 -
 arch/powerpc/configs/mpc83xx_defconfig            | 1 -
 arch/powerpc/configs/mvme5100_defconfig           | 1 -
 arch/powerpc/configs/pmac32_defconfig             | 1 -
 arch/powerpc/configs/storcenter_defconfig         | 1 -
 arch/powerpc/configs/wii_defconfig                | 1 -
 27 files changed, 27 deletions(-)

diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig
index 2412a6bf7ee6..1c491b13e94e 100644
--- a/arch/powerpc/configs/52xx/cm5200_defconfig
+++ b/arch/powerpc/configs/52xx/cm5200_defconfig
@@ -6,7 +6,6 @@ CONFIG_EXPERT=y
 # CONFIG_EPOLL is not set
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_PMAC is not set
diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig
index 7db479dcbc0c..8e5ea519eda2 100644
--- a/arch/powerpc/configs/52xx/lite5200b_defconfig
+++ b/arch/powerpc/configs/52xx/lite5200b_defconfig
@@ -9,7 +9,6 @@ CONFIG_EXPERT=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
-# CONFIG_PPC_CHRP is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 CONFIG_PPC_LITE5200=y
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig
index 6186ead1e105..8c4e2c978504 100644
--- a/arch/powerpc/configs/52xx/motionpro_defconfig
+++ b/arch/powerpc/configs/52xx/motionpro_defconfig
@@ -6,7 +6,6 @@ CONFIG_EXPERT=y
 # CONFIG_EPOLL is not set
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_PMAC is not set
diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig
index 88fbe0d42e11..ea0880e2cd9f 100644
--- a/arch/powerpc/configs/52xx/pcm030_defconfig
+++ b/arch/powerpc/configs/52xx/pcm030_defconfig
@@ -13,7 +13,6 @@ CONFIG_EXPERT=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
-# CONFIG_PPC_CHRP is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_PMAC is not set
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig
index 688f703d8e22..45f9924a8406 100644
--- a/arch/powerpc/configs/52xx/tqm5200_defconfig
+++ b/arch/powerpc/configs/52xx/tqm5200_defconfig
@@ -9,7 +9,6 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 CONFIG_PPC_MPC5200_BUGFIX=y
diff --git a/arch/powerpc/configs/83xx/asp8347_defconfig b/arch/powerpc/configs/83xx/asp8347_defconfig
index 10192410b33c..d3a440ee6fa0 100644
--- a/arch/powerpc/configs/83xx/asp8347_defconfig
+++ b/arch/powerpc/configs/83xx/asp8347_defconfig
@@ -11,7 +11,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 # CONFIG_MSDOS_PARTITION is not set
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_ASP834x=y
diff --git a/arch/powerpc/configs/83xx/kmeter1_defconfig b/arch/powerpc/configs/83xx/kmeter1_defconfig
index 487e5e1bbf4c..7895c1139639 100644
--- a/arch/powerpc/configs/83xx/kmeter1_defconfig
+++ b/arch/powerpc/configs/83xx/kmeter1_defconfig
@@ -10,7 +10,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 # CONFIG_MSDOS_PARTITION is not set
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_KMETER1=y
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
index 16a42e2267fb..d1949e3ddc2b 100644
--- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
@@ -9,7 +9,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC831x_RDB=y
diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
index 80d40ae668eb..666f39f1a178 100644
--- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
@@ -9,7 +9,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC831x_RDB=y
diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
index 1715ff547442..34ebb2a92382 100644
--- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
@@ -10,7 +10,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_LDM_PARTITION=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC832x_RDB=y
diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
index e65c0057147f..a78908582cc1 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
@@ -10,7 +10,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_MAC_PARTITION=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC834x_ITX=y
diff --git a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
index 17714bf0ed40..5050654bbd0f 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
@@ -10,7 +10,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_MAC_PARTITION=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC834x_ITX=y
diff --git a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
index 093df33f9455..f6d9fcb2eef6 100644
--- a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
+++ b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
@@ -8,7 +8,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 # CONFIG_MSDOS_PARTITION is not set
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC836x_RDK=y
diff --git a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
index 58fae5131fa7..b53c6ab46c04 100644
--- a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
@@ -6,7 +6,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC837x_RDB=y
diff --git a/arch/powerpc/configs/86xx-hw.config b/arch/powerpc/configs/86xx-hw.config
index 0cb24b33c88e..d452868b1042 100644
--- a/arch/powerpc/configs/86xx-hw.config
+++ b/arch/powerpc/configs/86xx-hw.config
@@ -57,7 +57,6 @@ CONFIG_PCI_DEBUG=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCI=y
 # CONFIG_PCMCIA_LOAD_CIS is not set
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_CMOS=y
diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs/amigaone_defconfig
index 200bb1ecb560..7d5f59f824d1 100644
--- a/arch/powerpc/configs/amigaone_defconfig
+++ b/arch/powerpc/configs/amigaone_defconfig
@@ -15,7 +15,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_AMIGA_PARTITION=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_AMIGAONE=y
 CONFIG_HIGHMEM=y
diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/ep8248e_defconfig
index 0d8d3f41f194..cb66f72806a2 100644
--- a/arch/powerpc/configs/ep8248e_defconfig
+++ b/arch/powerpc/configs/ep8248e_defconfig
@@ -5,7 +5,6 @@ CONFIG_LOG_BUF_SHIFT=14
 CONFIG_EXPERT=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_82xx=y
 CONFIG_EP8248E=y
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig
index d77eeb525366..47a233c903cc 100644
--- a/arch/powerpc/configs/gamecube_defconfig
+++ b/arch/powerpc/configs/gamecube_defconfig
@@ -11,7 +11,6 @@ CONFIG_PERF_EVENTS=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_EMBEDDED6xx=y
 CONFIG_GAMECUBE=y
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig
index 271daff47d1d..4ec803a6dcbc 100644
--- a/arch/powerpc/configs/holly_defconfig
+++ b/arch/powerpc/configs/holly_defconfig
@@ -7,7 +7,6 @@ CONFIG_EXPERT=y
 CONFIG_MODULES=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_EMBEDDED6xx=y
 CONFIG_PPC_HOLLY=y
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index fa707de761be..230835f1a14b 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_defconfig
@@ -10,7 +10,6 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_EMBEDDED6xx=y
 CONFIG_LINKSTATION=y
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig
index d24457bc5791..3991229be610 100644
--- a/arch/powerpc/configs/mpc512x_defconfig
+++ b/arch/powerpc/configs/mpc512x_defconfig
@@ -8,7 +8,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 CONFIG_PPC_MPC512x=y
 CONFIG_MPC512x_LPBFIFO=y
 CONFIG_MPC5121_ADS=y
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
index c0fe5e76604a..8a3fa19f66a1 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -6,7 +6,6 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
-# CONFIG_PPC_CHRP is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 CONFIG_PPC_EFIKA=y
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 83c4710017e9..00f37a564d73 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -6,7 +6,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_83xx=y
 CONFIG_MPC831x_RDB=y
diff --git a/arch/powerpc/configs/mvme5100_defconfig b/arch/powerpc/configs/mvme5100_defconfig
index d1c7fd5bf34b..c868a4681d7b 100644
--- a/arch/powerpc/configs/mvme5100_defconfig
+++ b/arch/powerpc/configs/mvme5100_defconfig
@@ -14,7 +14,6 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_EMBEDDED6xx=y
 CONFIG_MVME5100=y
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 57ded82c2840..b2b8c46814dd 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -14,7 +14,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_GOV_POWERSAVE=y
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
diff --git a/arch/powerpc/configs/storcenter_defconfig b/arch/powerpc/configs/storcenter_defconfig
index 7a978d396991..b1e55cd34ce1 100644
--- a/arch/powerpc/configs/storcenter_defconfig
+++ b/arch/powerpc/configs/storcenter_defconfig
@@ -6,7 +6,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_EMBEDDED6xx=y
 CONFIG_STORCENTER=y
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig
index 5017a697b67b..e6ca8c175fdf 100644
--- a/arch/powerpc/configs/wii_defconfig
+++ b/arch/powerpc/configs/wii_defconfig
@@ -11,7 +11,6 @@ CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
-# CONFIG_PPC_CHRP is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_EMBEDDED6xx=y
 CONFIG_WII=y
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 04/10] powerpc/powermac: Remove machine_is(chrp) test
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
  2024-11-14 13:11 ` [RFC PATCH 02/10] powerpc/chrp: Remove various dead code Michael Ellerman
  2024-11-14 13:11 ` [RFC PATCH 03/10] powerpc/chrp: Remove PPC_CHRP from defconfigs Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 13:11 ` [RFC PATCH 05/10] powerpc/rtasd: Remove machine_is(chrp) tests Michael Ellerman
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

Now that the chrp machine has been removed this test can never be
true, remove it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powermac/nvram.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c
index fe2e0249cbc2..23af93dcb212 100644
--- a/arch/powerpc/platforms/powermac/nvram.c
+++ b/arch/powerpc/platforms/powermac/nvram.c
@@ -589,13 +589,7 @@ int __init pmac_nvram_init(void)
 	}
 
 #ifdef CONFIG_PPC32
-	if (machine_is(chrp) && nvram_naddrs == 1) {
-		nvram_data = ioremap(r1.start, s1);
-		nvram_mult = 1;
-		ppc_md.nvram_read_val	= direct_nvram_read_byte;
-		ppc_md.nvram_write_val	= direct_nvram_write_byte;
-		ppc_md.nvram_size	= ppc32_nvram_size;
-	} else if (nvram_naddrs == 1) {
+	if (nvram_naddrs == 1) {
 		nvram_data = ioremap(r1.start, s1);
 		nvram_mult = (s1 + NVRAM_SIZE - 1) / NVRAM_SIZE;
 		ppc_md.nvram_read_val	= direct_nvram_read_byte;
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 05/10] powerpc/rtasd: Remove machine_is(chrp) tests
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (2 preceding siblings ...)
  2024-11-14 13:11 ` [RFC PATCH 04/10] powerpc/powermac: Remove machine_is(chrp) test Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 13:11 ` [RFC PATCH 06/10] powerpc: Remove prom_init longtrail work arounds Michael Ellerman
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

Now that the chrp machine has been removed these tests can never be
true, remove them.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/rtasd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 9bba469239fc..ce039c187156 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -502,7 +502,7 @@ static int __init rtas_event_scan_init(void)
 {
 	int err;
 
-	if (!machine_is(pseries) && !machine_is(chrp))
+	if (!machine_is(pseries))
 		return 0;
 
 	/* No RTAS */
@@ -545,7 +545,7 @@ static int __init rtas_init(void)
 {
 	struct proc_dir_entry *entry;
 
-	if (!machine_is(pseries) && !machine_is(chrp))
+	if (!machine_is(pseries))
 		return 0;
 
 	if (!rtas_log_buf)
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 06/10] powerpc: Remove prom_init longtrail work arounds
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (3 preceding siblings ...)
  2024-11-14 13:11 ` [RFC PATCH 05/10] powerpc/rtasd: Remove machine_is(chrp) tests Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 14:33   ` Geert Uytterhoeven
  2024-11-14 13:11 ` [RFC PATCH 07/10] powerpc: Remove CONFIG_ISA Michael Ellerman
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

Although these work arounds aren't guarded by PPC_CHRP, they should only
ever have taken effect on CHRP Long Trail machines due to the firmware
version check. With CHRP support removed they are no longer needed,
remove them.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/prom_init.c | 62 +++------------------------------
 1 file changed, 5 insertions(+), 57 deletions(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 94ffc52440bd..1485494cfc38 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -94,7 +94,6 @@ static int of_workarounds __prombss;
 #endif
 
 #define OF_WA_CLAIM	1	/* do phys/virt claim separately, then map */
-#define OF_WA_LONGTRAIL	2	/* work around longtrail bugs */
 
 #ifdef DEBUG_PROM
 #define prom_debug(x...)	prom_printf(x)
@@ -267,6 +266,7 @@ static ssize_t __init prom_strscpy_pad(char *dest, const char *src, size_t n)
 	return rc;
 }
 
+#ifdef CONFIG_PPC64
 static int __init prom_strncmp(const char *cs, const char *ct, size_t count)
 {
 	unsigned char c1, c2;
@@ -282,6 +282,7 @@ static int __init prom_strncmp(const char *cs, const char *ct, size_t count)
 	}
 	return 0;
 }
+#endif
 
 static size_t __init prom_strlen(const char *s)
 {
@@ -668,52 +669,11 @@ static inline int __init prom_getproplen(phandle node, const char *pname)
 	return call_prom("getproplen", 2, 1, node, ADDR(pname));
 }
 
-static void __init add_string(char **str, const char *q)
-{
-	char *p = *str;
-
-	while (*q)
-		*p++ = *q++;
-	*p++ = ' ';
-	*str = p;
-}
-
-static char *__init tohex(unsigned int x)
-{
-	static const char digits[] __initconst = "0123456789abcdef";
-	static char result[9] __prombss;
-	int i;
-
-	result[8] = 0;
-	i = 8;
-	do {
-		--i;
-		result[i] = digits[x & 0xf];
-		x >>= 4;
-	} while (x != 0 && i > 0);
-	return &result[i];
-}
-
 static int __init prom_setprop(phandle node, const char *nodename,
 			       const char *pname, void *value, size_t valuelen)
 {
-	char cmd[256], *p;
-
-	if (!(OF_WORKAROUNDS & OF_WA_LONGTRAIL))
-		return call_prom("setprop", 4, 1, node, ADDR(pname),
-				 (u32)(unsigned long) value, (u32) valuelen);
-
-	/* gah... setprop doesn't work on longtrail, have to use interpret */
-	p = cmd;
-	add_string(&p, "dev");
-	add_string(&p, nodename);
-	add_string(&p, tohex((u32)(unsigned long) value));
-	add_string(&p, tohex(valuelen));
-	add_string(&p, tohex(ADDR(pname)));
-	add_string(&p, tohex(prom_strlen(pname)));
-	add_string(&p, "property");
-	*p = 0;
-	return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd);
+	return call_prom("setprop", 4, 1, node, ADDR(pname),
+			 (u32)(unsigned long) value, (u32) valuelen);
 }
 
 /* We can't use the standard versions because of relocation headaches. */
@@ -1678,14 +1638,6 @@ static void __init prom_init_mem(void)
 	for (node = 0; prom_next_node(&node); ) {
 		type[0] = 0;
 		prom_getprop(node, "device_type", type, sizeof(type));
-
-		if (type[0] == 0) {
-			/*
-			 * CHRP Longtrail machines have no device_type
-			 * on the memory node, so check the name instead...
-			 */
-			prom_getprop(node, "name", type, sizeof(type));
-		}
 		if (prom_strcmp(type, "memory"))
 			continue;
 
@@ -2238,7 +2190,6 @@ static void __init prom_init_client_services(unsigned long pp)
 /*
  * For really old powermacs, we need to map things we claim.
  * For that, we need the ihandle of the mmu.
- * Also, on the longtrail, we need to work around other bugs.
  */
 static void __init prom_find_mmu(void)
 {
@@ -2254,10 +2205,7 @@ static void __init prom_find_mmu(void)
 	/* XXX might need to add other versions here */
 	if (prom_strcmp(version, "Open Firmware, 1.0.5") == 0)
 		of_workarounds = OF_WA_CLAIM;
-	else if (prom_strncmp(version, "FirmWorks,3.", 12) == 0) {
-		of_workarounds = OF_WA_CLAIM | OF_WA_LONGTRAIL;
-		call_prom("interpret", 1, 1, "dev /memory 0 to allow-reclaim");
-	} else
+	else
 		return;
 	prom.memory = call_prom("open", 1, 1, ADDR("/memory"));
 	prom_getprop(prom.chosen, "mmu", &prom.mmumap,
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 07/10] powerpc: Remove CONFIG_ISA
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (4 preceding siblings ...)
  2024-11-14 13:11 ` [RFC PATCH 06/10] powerpc: Remove prom_init longtrail work arounds Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 14:34   ` Geert Uytterhoeven
  2024-11-14 13:11 ` [RFC PATCH 08/10] macintosh: Remove ADB_MACIO Michael Ellerman
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

ISA support depended on PPC_CHRP which has now been removed, making
ISA unselectable, so remove it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/Kconfig                  | 11 -----------
 arch/powerpc/configs/chrp32_defconfig |  1 -
 arch/powerpc/configs/ppc6xx_defconfig |  1 -
 3 files changed, 13 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index f79e28f47dea..958e227a3cbf 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1083,17 +1083,6 @@ config ISA_DMA_API
 
 menu "Bus options"
 
-config ISA
-	bool "Support for ISA-bus hardware"
-	depends on PPC_CHRP
-	select PPC_I8259
-	help
-	  Find out whether you have ISA slots on your motherboard.  ISA is the
-	  name of a bus system, i.e. the way the CPU talks to the other stuff
-	  inside your box.  If you have an Apple machine, say N here; if you
-	  have an IBM RS/6000 or pSeries machine, say Y.  If you have an
-	  embedded board, consult your board documentation.
-
 config GENERIC_ISA_DMA
 	bool
 	depends on ISA_DMA_API
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index fb314f75ad4b..88eae3fae0fb 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_defconfig
@@ -20,7 +20,6 @@ CONFIG_GEN_RTC=y
 CONFIG_HIGHMEM=y
 CONFIG_BINFMT_MISC=y
 CONFIG_IRQ_ALL_CPUS=y
-CONFIG_ISA=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index c06344db0eb3..350167bf6d00 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -66,7 +66,6 @@ CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_BINFMT_MISC=y
 CONFIG_HIBERNATION=y
 CONFIG_PM_DEBUG=y
-CONFIG_ISA=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCI_MSI=y
 CONFIG_PCCARD=y
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 08/10] macintosh: Remove ADB_MACIO
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (5 preceding siblings ...)
  2024-11-14 13:11 ` [RFC PATCH 07/10] powerpc: Remove CONFIG_ISA Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 14:35   ` Geert Uytterhoeven
                     ` (2 more replies)
  2024-11-14 13:11 ` [RFC PATCH 09/10] i2c: Remove I2C_HYDRA Michael Ellerman
                   ` (5 subsequent siblings)
  12 siblings, 3 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

The macio-adb driver depends on PPC_CHRP, which has been removed, remove
the driver also.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/macintosh/Kconfig     |   9 --
 drivers/macintosh/Makefile    |   1 -
 drivers/macintosh/adb.c       |   4 -
 drivers/macintosh/macio-adb.c | 288 ----------------------------------
 4 files changed, 302 deletions(-)
 delete mode 100644 drivers/macintosh/macio-adb.c

diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
index fb38f684444f..aebe7ca50e59 100644
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -135,15 +135,6 @@ config PMAC_BACKLIGHT_LEGACY
 	  programs which use this old interface. New and updated programs
 	  should use the backlight classes in sysfs.
 
-config ADB_MACIO
-	bool "Include MacIO (CHRP) ADB driver"
-	depends on ADB && PPC_CHRP && !PPC_PMAC64
-	help
-	  Say Y here to include direct support for the ADB controller in the
-	  Hydra chip used on PowerPC Macintoshes of the CHRP type.  (The Hydra
-	  also includes a MESH II SCSI controller, DBDMA controller, VIA chip,
-	  OpenPIC controller and two RS422/Geoports.)
-
 config INPUT_ADBHID
 	bool "Support for ADB input devices (keyboard, mice, ...)"
 	depends on ADB && INPUT=y
diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile
index 712edcb3e0b0..efecf2c20af3 100644
--- a/drivers/macintosh/Makefile
+++ b/drivers/macintosh/Makefile
@@ -23,7 +23,6 @@ obj-$(CONFIG_PMAC_SMU)		+= smu.o
 obj-$(CONFIG_ADB)		+= adb.o
 obj-$(CONFIG_ADB_MACII)		+= via-macii.o
 obj-$(CONFIG_ADB_IOP)		+= adb-iop.o
-obj-$(CONFIG_ADB_MACIO)		+= macio-adb.o
 
 obj-$(CONFIG_THERM_WINDTUNNEL)	+= therm_windtunnel.o
 obj-$(CONFIG_THERM_ADT746X)	+= therm_adt746x.o
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 88adee42ba82..f1186ce04167 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -52,7 +52,6 @@ extern struct adb_driver via_macii_driver;
 extern struct adb_driver via_cuda_driver;
 extern struct adb_driver adb_iop_driver;
 extern struct adb_driver via_pmu_driver;
-extern struct adb_driver macio_adb_driver;
 
 static DEFINE_MUTEX(adb_mutex);
 static struct adb_driver *adb_driver_list[] = {
@@ -67,9 +66,6 @@ static struct adb_driver *adb_driver_list[] = {
 #endif
 #ifdef CONFIG_ADB_PMU
 	&via_pmu_driver,
-#endif
-#ifdef CONFIG_ADB_MACIO
-	&macio_adb_driver,
 #endif
 	NULL
 };
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
deleted file mode 100644
index 19c63959ebed..000000000000
--- a/drivers/macintosh/macio-adb.c
+++ /dev/null
@@ -1,288 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Driver for the ADB controller in the Mac I/O (Hydra) chip.
- */
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/delay.h>
-#include <linux/spinlock.h>
-#include <linux/interrupt.h>
-#include <linux/pgtable.h>
-#include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/adb.h>
-
-#include <asm/io.h>
-#include <asm/hydra.h>
-#include <asm/irq.h>
-#include <linux/init.h>
-#include <linux/ioport.h>
-
-struct preg {
-	unsigned char r;
-	char pad[15];
-};
-
-struct adb_regs {
-	struct preg intr;
-	struct preg data[9];
-	struct preg intr_enb;
-	struct preg dcount;
-	struct preg error;
-	struct preg ctrl;
-	struct preg autopoll;
-	struct preg active_hi;
-	struct preg active_lo;
-	struct preg test;
-};
-
-/* Bits in intr and intr_enb registers */
-#define DFB	1		/* data from bus */
-#define TAG	2		/* transfer access grant */
-
-/* Bits in dcount register */
-#define HMB	0x0f		/* how many bytes */
-#define APD	0x10		/* auto-poll data */
-
-/* Bits in error register */
-#define NRE	1		/* no response error */
-#define DLE	2		/* data lost error */
-
-/* Bits in ctrl register */
-#define TAR	1		/* transfer access request */
-#define DTB	2		/* data to bus */
-#define CRE	4		/* command response expected */
-#define ADB_RST	8		/* ADB reset */
-
-/* Bits in autopoll register */
-#define APE	1		/* autopoll enable */
-
-static volatile struct adb_regs __iomem *adb;
-static struct adb_request *current_req, *last_req;
-static DEFINE_SPINLOCK(macio_lock);
-
-static int macio_probe(void);
-static int macio_init(void);
-static irqreturn_t macio_adb_interrupt(int irq, void *arg);
-static int macio_send_request(struct adb_request *req, int sync);
-static int macio_adb_autopoll(int devs);
-static void macio_adb_poll(void);
-static int macio_adb_reset_bus(void);
-
-struct adb_driver macio_adb_driver = {
-	.name         = "MACIO",
-	.probe        = macio_probe,
-	.init         = macio_init,
-	.send_request = macio_send_request,
-	.autopoll     = macio_adb_autopoll,
-	.poll         = macio_adb_poll,
-	.reset_bus    = macio_adb_reset_bus,
-};
-
-int macio_probe(void)
-{
-	struct device_node *np __free(device_node) =
-		of_find_compatible_node(NULL, "adb", "chrp,adb0");
-
-	if (np)
-		return 0;
-
-	return -ENODEV;
-}
-
-int macio_init(void)
-{
-	struct device_node *adbs __free(device_node) =
-		of_find_compatible_node(NULL, "adb", "chrp,adb0");
-	struct resource r;
-	unsigned int irq;
-
-	if (!adbs)
-		return -ENXIO;
-
-	if (of_address_to_resource(adbs, 0, &r))
-		return -ENXIO;
-
-	adb = ioremap(r.start, sizeof(struct adb_regs));
-	if (!adb)
-		return -ENOMEM;
-
-
-	out_8(&adb->ctrl.r, 0);
-	out_8(&adb->intr.r, 0);
-	out_8(&adb->error.r, 0);
-	out_8(&adb->active_hi.r, 0xff); /* for now, set all devices active */
-	out_8(&adb->active_lo.r, 0xff);
-	out_8(&adb->autopoll.r, APE);
-
-	irq = irq_of_parse_and_map(adbs, 0);
-	if (request_irq(irq, macio_adb_interrupt, 0, "ADB", (void *)0)) {
-		iounmap(adb);
-		printk(KERN_ERR "ADB: can't get irq %d\n", irq);
-		return -EAGAIN;
-	}
-	out_8(&adb->intr_enb.r, DFB | TAG);
-
-	printk("adb: mac-io driver 1.0 for unified ADB\n");
-
-	return 0;
-}
-
-static int macio_adb_autopoll(int devs)
-{
-	unsigned long flags;
-	
-	spin_lock_irqsave(&macio_lock, flags);
-	out_8(&adb->active_hi.r, devs >> 8);
-	out_8(&adb->active_lo.r, devs);
-	out_8(&adb->autopoll.r, devs? APE: 0);
-	spin_unlock_irqrestore(&macio_lock, flags);
-	return 0;
-}
-
-static int macio_adb_reset_bus(void)
-{
-	unsigned long flags;
-	int timeout = 1000000;
-
-	/* Hrm... we may want to not lock interrupts for so
-	 * long ... oh well, who uses that chip anyway ? :)
-	 * That function will be seldom used during boot
-	 * on rare machines, so...
-	 */
-	spin_lock_irqsave(&macio_lock, flags);
-	out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | ADB_RST);
-	while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) {
-		if (--timeout == 0) {
-			out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST);
-			spin_unlock_irqrestore(&macio_lock, flags);
-			return -1;
-		}
-	}
-	spin_unlock_irqrestore(&macio_lock, flags);
-	return 0;
-}
-
-/* Send an ADB command */
-static int macio_send_request(struct adb_request *req, int sync)
-{
-	unsigned long flags;
-	int i;
-	
-	if (req->data[0] != ADB_PACKET)
-		return -EINVAL;
-	
-	for (i = 0; i < req->nbytes - 1; ++i)
-		req->data[i] = req->data[i+1];
-	--req->nbytes;
-	
-	req->next = NULL;
-	req->sent = 0;
-	req->complete = 0;
-	req->reply_len = 0;
-
-	spin_lock_irqsave(&macio_lock, flags);
-	if (current_req) {
-		last_req->next = req;
-		last_req = req;
-	} else {
-		current_req = last_req = req;
-		out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR);
-	}
-	spin_unlock_irqrestore(&macio_lock, flags);
-	
-	if (sync) {
-		while (!req->complete)
-			macio_adb_poll();
-	}
-
-	return 0;
-}
-
-static irqreturn_t macio_adb_interrupt(int irq, void *arg)
-{
-	int i, n, err;
-	struct adb_request *req = NULL;
-	unsigned char ibuf[16];
-	int ibuf_len = 0;
-	int complete = 0;
-	int autopoll = 0;
-	int handled = 0;
-
-	spin_lock(&macio_lock);
-	if (in_8(&adb->intr.r) & TAG) {
-		handled = 1;
-		req = current_req;
-		if (req) {
-			/* put the current request in */
-			for (i = 0; i < req->nbytes; ++i)
-				out_8(&adb->data[i].r, req->data[i]);
-			out_8(&adb->dcount.r, req->nbytes & HMB);
-			req->sent = 1;
-			if (req->reply_expected) {
-				out_8(&adb->ctrl.r, DTB + CRE);
-			} else {
-				out_8(&adb->ctrl.r, DTB);
-				current_req = req->next;
-				complete = 1;
-				if (current_req)
-					out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR);
-			}
-		}
-		out_8(&adb->intr.r, 0);
-	}
-
-	if (in_8(&adb->intr.r) & DFB) {
-		handled = 1;
-		err = in_8(&adb->error.r);
-		if (current_req && current_req->sent) {
-			/* this is the response to a command */
-			req = current_req;
-			if (err == 0) {
-				req->reply_len = in_8(&adb->dcount.r) & HMB;
-				for (i = 0; i < req->reply_len; ++i)
-					req->reply[i] = in_8(&adb->data[i].r);
-			}
-			current_req = req->next;
-			complete = 1;
-			if (current_req)
-				out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR);
-		} else if (err == 0) {
-			/* autopoll data */
-			n = in_8(&adb->dcount.r) & HMB;
-			for (i = 0; i < n; ++i)
-				ibuf[i] = in_8(&adb->data[i].r);
-			ibuf_len = n;
-			autopoll = (in_8(&adb->dcount.r) & APD) != 0;
-		}
-		out_8(&adb->error.r, 0);
-		out_8(&adb->intr.r, 0);
-	}
-	spin_unlock(&macio_lock);
-	if (complete && req) {
-	    void (*done)(struct adb_request *) = req->done;
-	    mb();
-	    req->complete = 1;
-	    /* Here, we assume that if the request has a done member, the
-    	     * struct request will survive to setting req->complete to 1
-	     */
-	    if (done)
-		(*done)(req);
-	}
-	if (ibuf_len)
-		adb_input(ibuf, ibuf_len, autopoll);
-
-	return IRQ_RETVAL(handled);
-}
-
-static void macio_adb_poll(void)
-{
-	unsigned long flags;
-
-	local_irq_save(flags);
-	if (in_8(&adb->intr.r) != 0)
-		macio_adb_interrupt(0, NULL);
-	local_irq_restore(flags);
-}
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 09/10] i2c: Remove I2C_HYDRA
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (6 preceding siblings ...)
  2024-11-14 13:11 ` [RFC PATCH 08/10] macintosh: Remove ADB_MACIO Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 14:37   ` Geert Uytterhoeven
  2024-11-14 14:47   ` Geert Uytterhoeven
  2024-11-14 13:11 ` [RFC PATCH 10/10] i2c: Drop reference to PPC_CHRP Michael Ellerman
                   ` (4 subsequent siblings)
  12 siblings, 2 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

The i2c-hydra driver depends on PPC_CHRP which has now been removed,
remove the driver also.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/i2c/busses/Kconfig     |  12 ---
 drivers/i2c/busses/Makefile    |   1 -
 drivers/i2c/busses/i2c-hydra.c | 150 ---------------------------------
 3 files changed, 163 deletions(-)
 delete mode 100644 drivers/i2c/busses/i2c-hydra.c

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 6b3ba7e5723a..cbd072955e45 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -373,18 +373,6 @@ endif # ACPI
 comment "Mac SMBus host controller drivers"
 	depends on PPC_CHRP || PPC_PMAC
 
-config I2C_HYDRA
-	tristate "CHRP Apple Hydra Mac I/O I2C interface"
-	depends on PCI && PPC_CHRP
-	select I2C_ALGOBIT
-	help
-	  This supports the use of the I2C interface in the Apple Hydra Mac
-	  I/O chip on some CHRP machines (e.g. the LongTrail).  Say Y if you
-	  have such a machine.
-
-	  This support is also available as a module.  If so, the module
-	  will be called i2c-hydra.
-
 config I2C_POWERMAC
 	tristate "Powermac I2C interface"
 	depends on PPC_PMAC
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index ecc07c50f2a0..ab366ce6f15c 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -32,7 +32,6 @@ obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
 obj-$(CONFIG_I2C_ZHAOXIN)	+= i2c-viai2c-zhaoxin.o i2c-viai2c-common.o
 
 # Mac SMBus host controller drivers
-obj-$(CONFIG_I2C_HYDRA)		+= i2c-hydra.o
 obj-$(CONFIG_I2C_POWERMAC)	+= i2c-powermac.o
 
 # Embedded system I2C/SMBus host controller drivers
diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c
deleted file mode 100644
index c60b73e933cf..000000000000
--- a/drivers/i2c/busses/i2c-hydra.c
+++ /dev/null
@@ -1,150 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
-    i2c Support for the Apple `Hydra' Mac I/O
-
-    Copyright (c) 1999-2004 Geert Uytterhoeven <geert@linux-m68k.org>
-
-    Based on i2c Support for Via Technologies 82C586B South Bridge
-    Copyright (c) 1998, 1999 Kyösti Mälkki <kmalkki@cc.hut.fi>
-
-*/
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/types.h>
-#include <linux/i2c.h>
-#include <linux/i2c-algo-bit.h>
-#include <linux/io.h>
-#include <asm/hydra.h>
-
-
-#define HYDRA_CPD_PD0	0x00000001	/* CachePD lines */
-#define HYDRA_CPD_PD1	0x00000002
-#define HYDRA_CPD_PD2	0x00000004
-#define HYDRA_CPD_PD3	0x00000008
-
-#define HYDRA_SCLK	HYDRA_CPD_PD0
-#define HYDRA_SDAT	HYDRA_CPD_PD1
-#define HYDRA_SCLK_OE	0x00000010
-#define HYDRA_SDAT_OE	0x00000020
-
-static inline void pdregw(void *data, u32 val)
-{
-	struct Hydra *hydra = (struct Hydra *)data;
-	writel(val, &hydra->CachePD);
-}
-
-static inline u32 pdregr(void *data)
-{
-	struct Hydra *hydra = (struct Hydra *)data;
-	return readl(&hydra->CachePD);
-}
-
-static void hydra_bit_setscl(void *data, int state)
-{
-	u32 val = pdregr(data);
-	if (state)
-		val &= ~HYDRA_SCLK_OE;
-	else {
-		val &= ~HYDRA_SCLK;
-		val |= HYDRA_SCLK_OE;
-	}
-	pdregw(data, val);
-}
-
-static void hydra_bit_setsda(void *data, int state)
-{
-	u32 val = pdregr(data);
-	if (state)
-		val &= ~HYDRA_SDAT_OE;
-	else {
-		val &= ~HYDRA_SDAT;
-		val |= HYDRA_SDAT_OE;
-	}
-	pdregw(data, val);
-}
-
-static int hydra_bit_getscl(void *data)
-{
-	return (pdregr(data) & HYDRA_SCLK) != 0;
-}
-
-static int hydra_bit_getsda(void *data)
-{
-	return (pdregr(data) & HYDRA_SDAT) != 0;
-}
-
-/* ------------------------------------------------------------------------ */
-
-static struct i2c_algo_bit_data hydra_bit_data = {
-	.setsda		= hydra_bit_setsda,
-	.setscl		= hydra_bit_setscl,
-	.getsda		= hydra_bit_getsda,
-	.getscl		= hydra_bit_getscl,
-	.udelay		= 5,
-	.timeout	= HZ
-};
-
-static struct i2c_adapter hydra_adap = {
-	.owner		= THIS_MODULE,
-	.name		= "Hydra i2c",
-	.algo_data	= &hydra_bit_data,
-};
-
-static const struct pci_device_id hydra_ids[] = {
-	{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_HYDRA) },
-	{ 0, }
-};
-
-MODULE_DEVICE_TABLE (pci, hydra_ids);
-
-static int hydra_probe(struct pci_dev *dev,
-				 const struct pci_device_id *id)
-{
-	unsigned long base = pci_resource_start(dev, 0);
-	int res;
-
-	if (!request_mem_region(base+offsetof(struct Hydra, CachePD), 4,
-				hydra_adap.name))
-		return -EBUSY;
-
-	hydra_bit_data.data = pci_ioremap_bar(dev, 0);
-	if (hydra_bit_data.data == NULL) {
-		release_mem_region(base+offsetof(struct Hydra, CachePD), 4);
-		return -ENODEV;
-	}
-
-	pdregw(hydra_bit_data.data, 0);		/* clear SCLK_OE and SDAT_OE */
-	hydra_adap.dev.parent = &dev->dev;
-	res = i2c_bit_add_bus(&hydra_adap);
-	if (res < 0) {
-		iounmap(hydra_bit_data.data);
-		release_mem_region(base+offsetof(struct Hydra, CachePD), 4);
-		return res;
-	}
-	return 0;
-}
-
-static void hydra_remove(struct pci_dev *dev)
-{
-	pdregw(hydra_bit_data.data, 0);		/* clear SCLK_OE and SDAT_OE */
-	i2c_del_adapter(&hydra_adap);
-	iounmap(hydra_bit_data.data);
-	release_mem_region(pci_resource_start(dev, 0)+
-			   offsetof(struct Hydra, CachePD), 4);
-}
-
-
-static struct pci_driver hydra_driver = {
-	.name		= "hydra_smbus",
-	.id_table	= hydra_ids,
-	.probe		= hydra_probe,
-	.remove		= hydra_remove,
-};
-
-module_pci_driver(hydra_driver);
-
-MODULE_AUTHOR("Geert Uytterhoeven <geert@linux-m68k.org>");
-MODULE_DESCRIPTION("i2c for Apple Hydra Mac I/O");
-MODULE_LICENSE("GPL");
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 10/10] i2c: Drop reference to PPC_CHRP
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (7 preceding siblings ...)
  2024-11-14 13:11 ` [RFC PATCH 09/10] i2c: Remove I2C_HYDRA Michael Ellerman
@ 2024-11-14 13:11 ` Michael Ellerman
  2024-11-14 14:31 ` [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Geert Uytterhoeven
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-14 13:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, geert, arnd

PPC_CHRP has been removed, so remove the reference to it in Kconfig.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/i2c/busses/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index cbd072955e45..153929ac5f59 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -371,7 +371,7 @@ config I2C_SCMI
 endif # ACPI
 
 comment "Mac SMBus host controller drivers"
-	depends on PPC_CHRP || PPC_PMAC
+	depends on PPC_PMAC
 
 config I2C_POWERMAC
 	tristate "Powermac I2C interface"
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (8 preceding siblings ...)
  2024-11-14 13:11 ` [RFC PATCH 10/10] i2c: Drop reference to PPC_CHRP Michael Ellerman
@ 2024-11-14 14:31 ` Geert Uytterhoeven
  2024-11-14 15:43   ` Arnd Bergmann
  2024-11-14 21:04 ` Segher Boessenkool
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Geert Uytterhoeven @ 2024-11-14 14:31 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, arnd

On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> CHRP (Common Hardware Reference Platform) was a standard developed by
> IBM & Apple for PowerPC-based systems.
>
> The standard was used in the development of some machines but never
> gained wide spread adoption.
>
> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
> some from Motorola? No Apple machines should be affected.
>
> All of those mentioned above are over or nearing 20 years old, and seem
> to have no active users.
>
> So remove the CHRP support. If there's interest in still supporting some
> of the machines that can be brought back from the git history.
>
> Note there are still some references to CHRP/chrp in various comments
> and some in the code, because later standards (eg. RPA, PAPR) used some
> elements of CHRP or copied the CHRP behaviour. These will need to be
> cleaned up on a case-by-case basis to either refer to newer standards or
> left as-is when that's correct.
>
> The CHRP code was copied from arch/ppc, and before that it mostly
> predates git, so the original authorship is largely lost. If anyone
> wrote any of this code and would like a CREDITS entry just let me know.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 06/10] powerpc: Remove prom_init longtrail work arounds
  2024-11-14 13:11 ` [RFC PATCH 06/10] powerpc: Remove prom_init longtrail work arounds Michael Ellerman
@ 2024-11-14 14:33   ` Geert Uytterhoeven
  0 siblings, 0 replies; 36+ messages in thread
From: Geert Uytterhoeven @ 2024-11-14 14:33 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, arnd

On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> Although these work arounds aren't guarded by PPC_CHRP, they should only
> ever have taken effect on CHRP Long Trail machines due to the firmware
> version check. With CHRP support removed they are no longer needed,
> remove them.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 07/10] powerpc: Remove CONFIG_ISA
  2024-11-14 13:11 ` [RFC PATCH 07/10] powerpc: Remove CONFIG_ISA Michael Ellerman
@ 2024-11-14 14:34   ` Geert Uytterhoeven
  0 siblings, 0 replies; 36+ messages in thread
From: Geert Uytterhoeven @ 2024-11-14 14:34 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, arnd

On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> ISA support depended on PPC_CHRP which has now been removed, making
> ISA unselectable, so remove it.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 08/10] macintosh: Remove ADB_MACIO
  2024-11-14 13:11 ` [RFC PATCH 08/10] macintosh: Remove ADB_MACIO Michael Ellerman
@ 2024-11-14 14:35   ` Geert Uytterhoeven
  2024-11-14 15:42   ` Arnd Bergmann
  2024-11-16 16:00   ` Christophe Leroy
  2 siblings, 0 replies; 36+ messages in thread
From: Geert Uytterhoeven @ 2024-11-14 14:35 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, arnd

On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> The macio-adb driver depends on PPC_CHRP, which has been removed, remove
> the driver also.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 09/10] i2c: Remove I2C_HYDRA
  2024-11-14 13:11 ` [RFC PATCH 09/10] i2c: Remove I2C_HYDRA Michael Ellerman
@ 2024-11-14 14:37   ` Geert Uytterhoeven
  2024-11-14 14:57     ` Wolfram Sang
  2024-11-14 14:47   ` Geert Uytterhoeven
  1 sibling, 1 reply; 36+ messages in thread
From: Geert Uytterhoeven @ 2024-11-14 14:37 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, arnd, Linux I2C

CC linux-i2c

On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> The i2c-hydra driver depends on PPC_CHRP which has now been removed,
> remove the driver also.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

> ---
>  drivers/i2c/busses/Kconfig     |  12 ---
>  drivers/i2c/busses/Makefile    |   1 -
>  drivers/i2c/busses/i2c-hydra.c | 150 ---------------------------------
>  3 files changed, 163 deletions(-)
>  delete mode 100644 drivers/i2c/busses/i2c-hydra.c
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index 6b3ba7e5723a..cbd072955e45 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -373,18 +373,6 @@ endif # ACPI
>  comment "Mac SMBus host controller drivers"
>         depends on PPC_CHRP || PPC_PMAC
>
> -config I2C_HYDRA
> -       tristate "CHRP Apple Hydra Mac I/O I2C interface"
> -       depends on PCI && PPC_CHRP
> -       select I2C_ALGOBIT
> -       help
> -         This supports the use of the I2C interface in the Apple Hydra Mac
> -         I/O chip on some CHRP machines (e.g. the LongTrail).  Say Y if you
> -         have such a machine.
> -
> -         This support is also available as a module.  If so, the module
> -         will be called i2c-hydra.
> -
>  config I2C_POWERMAC
>         tristate "Powermac I2C interface"
>         depends on PPC_PMAC
> diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
> index ecc07c50f2a0..ab366ce6f15c 100644
> --- a/drivers/i2c/busses/Makefile
> +++ b/drivers/i2c/busses/Makefile
> @@ -32,7 +32,6 @@ obj-$(CONFIG_I2C_VIAPRO)      += i2c-viapro.o
>  obj-$(CONFIG_I2C_ZHAOXIN)      += i2c-viai2c-zhaoxin.o i2c-viai2c-common.o
>
>  # Mac SMBus host controller drivers
> -obj-$(CONFIG_I2C_HYDRA)                += i2c-hydra.o
>  obj-$(CONFIG_I2C_POWERMAC)     += i2c-powermac.o
>
>  # Embedded system I2C/SMBus host controller drivers
> diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c
> deleted file mode 100644

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 09/10] i2c: Remove I2C_HYDRA
  2024-11-14 13:11 ` [RFC PATCH 09/10] i2c: Remove I2C_HYDRA Michael Ellerman
  2024-11-14 14:37   ` Geert Uytterhoeven
@ 2024-11-14 14:47   ` Geert Uytterhoeven
  2024-11-19 23:11     ` Michael Ellerman
  1 sibling, 1 reply; 36+ messages in thread
From: Geert Uytterhoeven @ 2024-11-14 14:47 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, arnd

Hi Michael,

On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> The i2c-hydra driver depends on PPC_CHRP which has now been removed,
> remove the driver also.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Thanks for your patch!

> --- a/drivers/i2c/busses/i2c-hydra.c
> +++ /dev/null

> -#include <asm/hydra.h>

Looks like this was the last real user of arch/powerpc/include/asm/hydra.h.
drivers/scsi/mesh.c still includes it, but I don't see why it was ever
needed in upstream.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 09/10] i2c: Remove I2C_HYDRA
  2024-11-14 14:37   ` Geert Uytterhoeven
@ 2024-11-14 14:57     ` Wolfram Sang
  0 siblings, 0 replies; 36+ messages in thread
From: Wolfram Sang @ 2024-11-14 14:57 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Michael Ellerman, linuxppc-dev, linux-kernel, arnd, Linux I2C

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On Thu, Nov 14, 2024 at 03:37:15PM +0100, Geert Uytterhoeven wrote:
> CC linux-i2c
> 
> On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> > The i2c-hydra driver depends on PPC_CHRP which has now been removed,
> > remove the driver also.
> >
> > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> 
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> 
> > ---

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 08/10] macintosh: Remove ADB_MACIO
  2024-11-14 13:11 ` [RFC PATCH 08/10] macintosh: Remove ADB_MACIO Michael Ellerman
  2024-11-14 14:35   ` Geert Uytterhoeven
@ 2024-11-14 15:42   ` Arnd Bergmann
  2024-11-14 16:35     ` Geert Uytterhoeven
  2024-11-16 16:00   ` Christophe Leroy
  2 siblings, 1 reply; 36+ messages in thread
From: Arnd Bergmann @ 2024-11-14 15:42 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: linux-kernel, Geert Uytterhoeven

On Thu, Nov 14, 2024, at 14:11, Michael Ellerman wrote:
> 
> -config ADB_MACIO
> -	bool "Include MacIO (CHRP) ADB driver"
> -	depends on ADB && PPC_CHRP && !PPC_PMAC64

The dependency looked weird to me, so I had to look up
what that thing is. Apparently this originally had a PPC_PMAC
dependency instead of PPC_CHRP, which explains the !PPC_PMAC64
part.

I also found the promotional video from 1996 at
https://www.youtube.com/watch?v=NrvrIEPeSNA .

     Arnd


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-14 14:31 ` [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Geert Uytterhoeven
@ 2024-11-14 15:43   ` Arnd Bergmann
  0 siblings, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2024-11-14 15:43 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Ellerman; +Cc: linuxppc-dev, linux-kernel

On Thu, Nov 14, 2024, at 15:31, Geert Uytterhoeven wrote:
> On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>> CHRP (Common Hardware Reference Platform) was a standard developed by
>> IBM & Apple for PowerPC-based systems.
>>
>> The standard was used in the development of some machines but never
>> gained wide spread adoption.
>>
>> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
>> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
>> some from Motorola? No Apple machines should be affected.
>>
>> All of those mentioned above are over or nearing 20 years old, and seem
>> to have no active users.
>>
>> So remove the CHRP support. If there's interest in still supporting some
>> of the machines that can be brought back from the git history.
>>
>> Note there are still some references to CHRP/chrp in various comments
>> and some in the code, because later standards (eg. RPA, PAPR) used some
>> elements of CHRP or copied the CHRP behaviour. These will need to be
>> cleaned up on a case-by-case basis to either refer to newer standards or
>> left as-is when that's correct.
>>
>> The CHRP code was copied from arch/ppc, and before that it mostly
>> predates git, so the original authorship is largely lost. If anyone
>> wrote any of this code and would like a CREDITS entry just let me know.
>>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
>

Whole series

Acked-by: Arnd Bergmann <arnd@arndb.de>


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 08/10] macintosh: Remove ADB_MACIO
  2024-11-14 15:42   ` Arnd Bergmann
@ 2024-11-14 16:35     ` Geert Uytterhoeven
  0 siblings, 0 replies; 36+ messages in thread
From: Geert Uytterhoeven @ 2024-11-14 16:35 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Michael Ellerman, linuxppc-dev, linux-kernel

Hi Arnd,

On Thu, Nov 14, 2024 at 4:42 PM Arnd Bergmann <arnd@arndb.de> wrote:
> I also found the promotional video from 1996 at
> https://www.youtube.com/watch?v=NrvrIEPeSNA .

Amazing to finally see this, 20y after mine died...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (9 preceding siblings ...)
  2024-11-14 14:31 ` [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Geert Uytterhoeven
@ 2024-11-14 21:04 ` Segher Boessenkool
  2024-11-26  3:49   ` Michael Ellerman
  2024-11-17 20:36 ` Gerhard Pircher
  2024-11-21  8:38 ` John Paul Adrian Glaubitz
  12 siblings, 1 reply; 36+ messages in thread
From: Segher Boessenkool @ 2024-11-14 21:04 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, geert, arnd

On Fri, Nov 15, 2024 at 12:11:04AM +1100, Michael Ellerman wrote:
> CHRP (Common Hardware Reference Platform) was a standard developed by
> IBM & Apple for PowerPC-based systems.
> 
> The standard was used in the development of some machines but never
> gained wide spread adoption.
> 
> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
> some from Motorola? No Apple machines should be affected.
> 
> All of those mentioned above are over or nearing 20 years old, and seem
> to have no active users.

This was used by all non-IBM 970 systems as well.  The last was SLOF on
JS20 and JS21, about 20 years ago yes, and I doubt anyone uses it still
(I don't).

> So remove the CHRP support. If there's interest in still supporting some
> of the machines that can be brought back from the git history.

Sorry to see it go, but that's the way of the world :-)

> Note there are still some references to CHRP/chrp in various comments
> and some in the code, because later standards (eg. RPA, PAPR) used some
> elements of CHRP or copied the CHRP behaviour. These will need to be
> cleaned up on a case-by-case basis to either refer to newer standards or
> left as-is when that's correct.
> 
> The CHRP code was copied from arch/ppc, and before that it mostly
> predates git, so the original authorship is largely lost. If anyone
> wrote any of this code and would like a CREDITS entry just let me know.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Acked-by: Segher Boessenkool <segher@kernel.crashing.org>


Segher


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 08/10] macintosh: Remove ADB_MACIO
  2024-11-14 13:11 ` [RFC PATCH 08/10] macintosh: Remove ADB_MACIO Michael Ellerman
  2024-11-14 14:35   ` Geert Uytterhoeven
  2024-11-14 15:42   ` Arnd Bergmann
@ 2024-11-16 16:00   ` Christophe Leroy
  2024-11-17 11:29     ` Michael Ellerman
  2 siblings, 1 reply; 36+ messages in thread
From: Christophe Leroy @ 2024-11-16 16:00 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: linux-kernel, geert, arnd



Le 14/11/2024 à 14:11, Michael Ellerman a écrit :
> The macio-adb driver depends on PPC_CHRP, which has been removed, remove
> the driver also.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>   drivers/macintosh/Kconfig     |   9 --
>   drivers/macintosh/Makefile    |   1 -
>   drivers/macintosh/adb.c       |   4 -
>   drivers/macintosh/macio-adb.c | 288 ----------------------------------
>   4 files changed, 302 deletions(-)
>   delete mode 100644 drivers/macintosh/macio-adb.c

What about:

drivers/macintosh/adb.c:        if (!machine_is(chrp) && 
!machine_is(powermac))
drivers/macintosh/adbhid.c:     if (!machine_is(chrp) && 
!machine_is(powermac))

Christophe

> 
> diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
> index fb38f684444f..aebe7ca50e59 100644
> --- a/drivers/macintosh/Kconfig
> +++ b/drivers/macintosh/Kconfig
> @@ -135,15 +135,6 @@ config PMAC_BACKLIGHT_LEGACY
>   	  programs which use this old interface. New and updated programs
>   	  should use the backlight classes in sysfs.
>   
> -config ADB_MACIO
> -	bool "Include MacIO (CHRP) ADB driver"
> -	depends on ADB && PPC_CHRP && !PPC_PMAC64
> -	help
> -	  Say Y here to include direct support for the ADB controller in the
> -	  Hydra chip used on PowerPC Macintoshes of the CHRP type.  (The Hydra
> -	  also includes a MESH II SCSI controller, DBDMA controller, VIA chip,
> -	  OpenPIC controller and two RS422/Geoports.)
> -
>   config INPUT_ADBHID
>   	bool "Support for ADB input devices (keyboard, mice, ...)"
>   	depends on ADB && INPUT=y
> diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile
> index 712edcb3e0b0..efecf2c20af3 100644
> --- a/drivers/macintosh/Makefile
> +++ b/drivers/macintosh/Makefile
> @@ -23,7 +23,6 @@ obj-$(CONFIG_PMAC_SMU)		+= smu.o
>   obj-$(CONFIG_ADB)		+= adb.o
>   obj-$(CONFIG_ADB_MACII)		+= via-macii.o
>   obj-$(CONFIG_ADB_IOP)		+= adb-iop.o
> -obj-$(CONFIG_ADB_MACIO)		+= macio-adb.o
>   
>   obj-$(CONFIG_THERM_WINDTUNNEL)	+= therm_windtunnel.o
>   obj-$(CONFIG_THERM_ADT746X)	+= therm_adt746x.o
> diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
> index 88adee42ba82..f1186ce04167 100644
> --- a/drivers/macintosh/adb.c
> +++ b/drivers/macintosh/adb.c
> @@ -52,7 +52,6 @@ extern struct adb_driver via_macii_driver;
>   extern struct adb_driver via_cuda_driver;
>   extern struct adb_driver adb_iop_driver;
>   extern struct adb_driver via_pmu_driver;
> -extern struct adb_driver macio_adb_driver;
>   
>   static DEFINE_MUTEX(adb_mutex);
>   static struct adb_driver *adb_driver_list[] = {
> @@ -67,9 +66,6 @@ static struct adb_driver *adb_driver_list[] = {
>   #endif
>   #ifdef CONFIG_ADB_PMU
>   	&via_pmu_driver,
> -#endif
> -#ifdef CONFIG_ADB_MACIO
> -	&macio_adb_driver,
>   #endif
>   	NULL
>   };
> diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
> deleted file mode 100644
> index 19c63959ebed..000000000000
> --- a/drivers/macintosh/macio-adb.c
> +++ /dev/null
> @@ -1,288 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -/*
> - * Driver for the ADB controller in the Mac I/O (Hydra) chip.
> - */
> -#include <linux/types.h>
> -#include <linux/errno.h>
> -#include <linux/kernel.h>
> -#include <linux/delay.h>
> -#include <linux/spinlock.h>
> -#include <linux/interrupt.h>
> -#include <linux/pgtable.h>
> -#include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_irq.h>
> -#include <linux/adb.h>
> -
> -#include <asm/io.h>
> -#include <asm/hydra.h>
> -#include <asm/irq.h>
> -#include <linux/init.h>
> -#include <linux/ioport.h>
> -
> -struct preg {
> -	unsigned char r;
> -	char pad[15];
> -};
> -
> -struct adb_regs {
> -	struct preg intr;
> -	struct preg data[9];
> -	struct preg intr_enb;
> -	struct preg dcount;
> -	struct preg error;
> -	struct preg ctrl;
> -	struct preg autopoll;
> -	struct preg active_hi;
> -	struct preg active_lo;
> -	struct preg test;
> -};
> -
> -/* Bits in intr and intr_enb registers */
> -#define DFB	1		/* data from bus */
> -#define TAG	2		/* transfer access grant */
> -
> -/* Bits in dcount register */
> -#define HMB	0x0f		/* how many bytes */
> -#define APD	0x10		/* auto-poll data */
> -
> -/* Bits in error register */
> -#define NRE	1		/* no response error */
> -#define DLE	2		/* data lost error */
> -
> -/* Bits in ctrl register */
> -#define TAR	1		/* transfer access request */
> -#define DTB	2		/* data to bus */
> -#define CRE	4		/* command response expected */
> -#define ADB_RST	8		/* ADB reset */
> -
> -/* Bits in autopoll register */
> -#define APE	1		/* autopoll enable */
> -
> -static volatile struct adb_regs __iomem *adb;
> -static struct adb_request *current_req, *last_req;
> -static DEFINE_SPINLOCK(macio_lock);
> -
> -static int macio_probe(void);
> -static int macio_init(void);
> -static irqreturn_t macio_adb_interrupt(int irq, void *arg);
> -static int macio_send_request(struct adb_request *req, int sync);
> -static int macio_adb_autopoll(int devs);
> -static void macio_adb_poll(void);
> -static int macio_adb_reset_bus(void);
> -
> -struct adb_driver macio_adb_driver = {
> -	.name         = "MACIO",
> -	.probe        = macio_probe,
> -	.init         = macio_init,
> -	.send_request = macio_send_request,
> -	.autopoll     = macio_adb_autopoll,
> -	.poll         = macio_adb_poll,
> -	.reset_bus    = macio_adb_reset_bus,
> -};
> -
> -int macio_probe(void)
> -{
> -	struct device_node *np __free(device_node) =
> -		of_find_compatible_node(NULL, "adb", "chrp,adb0");
> -
> -	if (np)
> -		return 0;
> -
> -	return -ENODEV;
> -}
> -
> -int macio_init(void)
> -{
> -	struct device_node *adbs __free(device_node) =
> -		of_find_compatible_node(NULL, "adb", "chrp,adb0");
> -	struct resource r;
> -	unsigned int irq;
> -
> -	if (!adbs)
> -		return -ENXIO;
> -
> -	if (of_address_to_resource(adbs, 0, &r))
> -		return -ENXIO;
> -
> -	adb = ioremap(r.start, sizeof(struct adb_regs));
> -	if (!adb)
> -		return -ENOMEM;
> -
> -
> -	out_8(&adb->ctrl.r, 0);
> -	out_8(&adb->intr.r, 0);
> -	out_8(&adb->error.r, 0);
> -	out_8(&adb->active_hi.r, 0xff); /* for now, set all devices active */
> -	out_8(&adb->active_lo.r, 0xff);
> -	out_8(&adb->autopoll.r, APE);
> -
> -	irq = irq_of_parse_and_map(adbs, 0);
> -	if (request_irq(irq, macio_adb_interrupt, 0, "ADB", (void *)0)) {
> -		iounmap(adb);
> -		printk(KERN_ERR "ADB: can't get irq %d\n", irq);
> -		return -EAGAIN;
> -	}
> -	out_8(&adb->intr_enb.r, DFB | TAG);
> -
> -	printk("adb: mac-io driver 1.0 for unified ADB\n");
> -
> -	return 0;
> -}
> -
> -static int macio_adb_autopoll(int devs)
> -{
> -	unsigned long flags;
> -	
> -	spin_lock_irqsave(&macio_lock, flags);
> -	out_8(&adb->active_hi.r, devs >> 8);
> -	out_8(&adb->active_lo.r, devs);
> -	out_8(&adb->autopoll.r, devs? APE: 0);
> -	spin_unlock_irqrestore(&macio_lock, flags);
> -	return 0;
> -}
> -
> -static int macio_adb_reset_bus(void)
> -{
> -	unsigned long flags;
> -	int timeout = 1000000;
> -
> -	/* Hrm... we may want to not lock interrupts for so
> -	 * long ... oh well, who uses that chip anyway ? :)
> -	 * That function will be seldom used during boot
> -	 * on rare machines, so...
> -	 */
> -	spin_lock_irqsave(&macio_lock, flags);
> -	out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | ADB_RST);
> -	while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) {
> -		if (--timeout == 0) {
> -			out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST);
> -			spin_unlock_irqrestore(&macio_lock, flags);
> -			return -1;
> -		}
> -	}
> -	spin_unlock_irqrestore(&macio_lock, flags);
> -	return 0;
> -}
> -
> -/* Send an ADB command */
> -static int macio_send_request(struct adb_request *req, int sync)
> -{
> -	unsigned long flags;
> -	int i;
> -	
> -	if (req->data[0] != ADB_PACKET)
> -		return -EINVAL;
> -	
> -	for (i = 0; i < req->nbytes - 1; ++i)
> -		req->data[i] = req->data[i+1];
> -	--req->nbytes;
> -	
> -	req->next = NULL;
> -	req->sent = 0;
> -	req->complete = 0;
> -	req->reply_len = 0;
> -
> -	spin_lock_irqsave(&macio_lock, flags);
> -	if (current_req) {
> -		last_req->next = req;
> -		last_req = req;
> -	} else {
> -		current_req = last_req = req;
> -		out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR);
> -	}
> -	spin_unlock_irqrestore(&macio_lock, flags);
> -	
> -	if (sync) {
> -		while (!req->complete)
> -			macio_adb_poll();
> -	}
> -
> -	return 0;
> -}
> -
> -static irqreturn_t macio_adb_interrupt(int irq, void *arg)
> -{
> -	int i, n, err;
> -	struct adb_request *req = NULL;
> -	unsigned char ibuf[16];
> -	int ibuf_len = 0;
> -	int complete = 0;
> -	int autopoll = 0;
> -	int handled = 0;
> -
> -	spin_lock(&macio_lock);
> -	if (in_8(&adb->intr.r) & TAG) {
> -		handled = 1;
> -		req = current_req;
> -		if (req) {
> -			/* put the current request in */
> -			for (i = 0; i < req->nbytes; ++i)
> -				out_8(&adb->data[i].r, req->data[i]);
> -			out_8(&adb->dcount.r, req->nbytes & HMB);
> -			req->sent = 1;
> -			if (req->reply_expected) {
> -				out_8(&adb->ctrl.r, DTB + CRE);
> -			} else {
> -				out_8(&adb->ctrl.r, DTB);
> -				current_req = req->next;
> -				complete = 1;
> -				if (current_req)
> -					out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR);
> -			}
> -		}
> -		out_8(&adb->intr.r, 0);
> -	}
> -
> -	if (in_8(&adb->intr.r) & DFB) {
> -		handled = 1;
> -		err = in_8(&adb->error.r);
> -		if (current_req && current_req->sent) {
> -			/* this is the response to a command */
> -			req = current_req;
> -			if (err == 0) {
> -				req->reply_len = in_8(&adb->dcount.r) & HMB;
> -				for (i = 0; i < req->reply_len; ++i)
> -					req->reply[i] = in_8(&adb->data[i].r);
> -			}
> -			current_req = req->next;
> -			complete = 1;
> -			if (current_req)
> -				out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR);
> -		} else if (err == 0) {
> -			/* autopoll data */
> -			n = in_8(&adb->dcount.r) & HMB;
> -			for (i = 0; i < n; ++i)
> -				ibuf[i] = in_8(&adb->data[i].r);
> -			ibuf_len = n;
> -			autopoll = (in_8(&adb->dcount.r) & APD) != 0;
> -		}
> -		out_8(&adb->error.r, 0);
> -		out_8(&adb->intr.r, 0);
> -	}
> -	spin_unlock(&macio_lock);
> -	if (complete && req) {
> -	    void (*done)(struct adb_request *) = req->done;
> -	    mb();
> -	    req->complete = 1;
> -	    /* Here, we assume that if the request has a done member, the
> -    	     * struct request will survive to setting req->complete to 1
> -	     */
> -	    if (done)
> -		(*done)(req);
> -	}
> -	if (ibuf_len)
> -		adb_input(ibuf, ibuf_len, autopoll);
> -
> -	return IRQ_RETVAL(handled);
> -}
> -
> -static void macio_adb_poll(void)
> -{
> -	unsigned long flags;
> -
> -	local_irq_save(flags);
> -	if (in_8(&adb->intr.r) != 0)
> -		macio_adb_interrupt(0, NULL);
> -	local_irq_restore(flags);
> -}


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 02/10] powerpc/chrp: Remove various dead code
  2024-11-14 13:11 ` [RFC PATCH 02/10] powerpc/chrp: Remove various dead code Michael Ellerman
@ 2024-11-16 16:15   ` Christophe Leroy
  2024-11-19  3:27     ` Michael Ellerman
  0 siblings, 1 reply; 36+ messages in thread
From: Christophe Leroy @ 2024-11-16 16:15 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: linux-kernel, geert, arnd



Le 14/11/2024 à 14:11, Michael Ellerman a écrit :
> Remove various bits of code that are dead now that PPC_CHRP has been
> removed.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>   arch/powerpc/Kconfig                 |  5 +--
>   arch/powerpc/boot/Makefile           |  1 -
>   arch/powerpc/include/asm/processor.h |  6 ---
>   arch/powerpc/kernel/head_book3s_32.S | 12 ------
>   arch/powerpc/kernel/pci_32.c         |  2 +-
>   arch/powerpc/kernel/prom_init.c      | 56 ----------------------------
>   6 files changed, 3 insertions(+), 79 deletions(-)
> 

> diff --git a/arch/powerpc/kernel/head_book3s_32.S b/arch/powerpc/kernel/head_book3s_32.S
> index cb2bca76be53..c6e297fd36e2 100644
> --- a/arch/powerpc/kernel/head_book3s_32.S
> +++ b/arch/powerpc/kernel/head_book3s_32.S
> @@ -256,20 +256,8 @@ __secondary_hold_acknowledge:
>    */
>   	START_EXCEPTION(INTERRUPT_MACHINE_CHECK, MachineCheck)
>   	EXCEPTION_PROLOG_0
> -#ifdef CONFIG_PPC_CHRP
> -	mtspr	SPRN_SPRG_SCRATCH2,r1
> -	mfspr	r1, SPRN_SPRG_THREAD
> -	lwz	r1, RTAS_SP(r1)
> -	cmpwi	cr1, r1, 0
> -	bne	cr1, 7f
> -	mfspr	r1, SPRN_SPRG_SCRATCH2
> -#endif /* CONFIG_PPC_CHRP */
>   	EXCEPTION_PROLOG_1
>   7:	EXCEPTION_PROLOG_2 0x200 MachineCheck
> -#ifdef CONFIG_PPC_CHRP
> -	beq	cr1, 1f
> -	twi	31, 0, 0
> -#endif
>   1:	prepare_transfer_to_handler
>   	bl	machine_check_exception
>   	b	interrupt_return

Then it becomes a standard exception handler that can be set up with

	EXCEPTION(INTERRUPT_MACHINE_CHECK, MachineCheck, machine_check_exception)

And the comment from paulus voids.



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 08/10] macintosh: Remove ADB_MACIO
  2024-11-16 16:00   ` Christophe Leroy
@ 2024-11-17 11:29     ` Michael Ellerman
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-17 11:29 UTC (permalink / raw)
  To: Christophe Leroy, linuxppc-dev; +Cc: linux-kernel, geert, arnd

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 14/11/2024 à 14:11, Michael Ellerman a écrit :
>> The macio-adb driver depends on PPC_CHRP, which has been removed, remove
>> the driver also.
>> 
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>> ---
>>   drivers/macintosh/Kconfig     |   9 --
>>   drivers/macintosh/Makefile    |   1 -
>>   drivers/macintosh/adb.c       |   4 -
>>   drivers/macintosh/macio-adb.c | 288 ----------------------------------
>>   4 files changed, 302 deletions(-)
>>   delete mode 100644 drivers/macintosh/macio-adb.c
>
> What about:
>
> drivers/macintosh/adb.c:        if (!machine_is(chrp) && 
> !machine_is(powermac))
> drivers/macintosh/adbhid.c:     if (!machine_is(chrp) && 
> !machine_is(powermac))

Oops, missed them, thanks.

cheers


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (10 preceding siblings ...)
  2024-11-14 21:04 ` Segher Boessenkool
@ 2024-11-17 20:36 ` Gerhard Pircher
  2024-11-18  6:07   ` Michael Ellerman
  2024-11-21  8:38 ` John Paul Adrian Glaubitz
  12 siblings, 1 reply; 36+ messages in thread
From: Gerhard Pircher @ 2024-11-17 20:36 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: linux-kernel, geert, arnd

Am 14.11.24 um 14:11 schrieb Michael Ellerman:
> CHRP (Common Hardware Reference Platform) was a standard developed by
> IBM & Apple for PowerPC-based systems.
>
> The standard was used in the development of some machines but never
> gained wide spread adoption.
>
> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
> some from Motorola? No Apple machines should be affected.
>
> All of those mentioned above are over or nearing 20 years old, and seem
> to have no active users.
Pegasos2 users still exist, but admittedly they mainly use MorphOS and
AmigaOS4 on these machines.

br,
Gerhard


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-17 20:36 ` Gerhard Pircher
@ 2024-11-18  6:07   ` Michael Ellerman
  2024-11-21  8:41     ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 36+ messages in thread
From: Michael Ellerman @ 2024-11-18  6:07 UTC (permalink / raw)
  To: Gerhard Pircher, linuxppc-dev; +Cc: linux-kernel, geert, arnd

Gerhard Pircher <gerhard_pircher@gmx.net> writes:
> Am 14.11.24 um 14:11 schrieb Michael Ellerman:
>> CHRP (Common Hardware Reference Platform) was a standard developed by
>> IBM & Apple for PowerPC-based systems.
>>
>> The standard was used in the development of some machines but never
>> gained wide spread adoption.
>>
>> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
>> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
>> some from Motorola? No Apple machines should be affected.
>>
>> All of those mentioned above are over or nearing 20 years old, and seem
>> to have no active users.

> Pegasos2 users still exist, but admittedly they mainly use MorphOS and
> AmigaOS4 on these machines.

Ack. To be clear my comment was only referring to Linux users.

The Linux CHRP support is still present in v6.12, which will be an LTS
for the next 2 years at least, so if there's folks who occasionally boot
Linux they will still be able to do that for a while.

cheers


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 02/10] powerpc/chrp: Remove various dead code
  2024-11-16 16:15   ` Christophe Leroy
@ 2024-11-19  3:27     ` Michael Ellerman
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-19  3:27 UTC (permalink / raw)
  To: Christophe Leroy, linuxppc-dev; +Cc: linux-kernel, geert, arnd

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 14/11/2024 à 14:11, Michael Ellerman a écrit :
>> Remove various bits of code that are dead now that PPC_CHRP has been
>> removed.
>> 
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>> ---
>>   arch/powerpc/Kconfig                 |  5 +--
>>   arch/powerpc/boot/Makefile           |  1 -
>>   arch/powerpc/include/asm/processor.h |  6 ---
>>   arch/powerpc/kernel/head_book3s_32.S | 12 ------
>>   arch/powerpc/kernel/pci_32.c         |  2 +-
>>   arch/powerpc/kernel/prom_init.c      | 56 ----------------------------
>>   6 files changed, 3 insertions(+), 79 deletions(-)
>> 
>
>> diff --git a/arch/powerpc/kernel/head_book3s_32.S b/arch/powerpc/kernel/head_book3s_32.S
>> index cb2bca76be53..c6e297fd36e2 100644
>> --- a/arch/powerpc/kernel/head_book3s_32.S
>> +++ b/arch/powerpc/kernel/head_book3s_32.S
>> @@ -256,20 +256,8 @@ __secondary_hold_acknowledge:
>>    */
>>   	START_EXCEPTION(INTERRUPT_MACHINE_CHECK, MachineCheck)
>>   	EXCEPTION_PROLOG_0
>> -#ifdef CONFIG_PPC_CHRP
>> -	mtspr	SPRN_SPRG_SCRATCH2,r1
>> -	mfspr	r1, SPRN_SPRG_THREAD
>> -	lwz	r1, RTAS_SP(r1)
>> -	cmpwi	cr1, r1, 0
>> -	bne	cr1, 7f
>> -	mfspr	r1, SPRN_SPRG_SCRATCH2
>> -#endif /* CONFIG_PPC_CHRP */
>>   	EXCEPTION_PROLOG_1
>>   7:	EXCEPTION_PROLOG_2 0x200 MachineCheck
>> -#ifdef CONFIG_PPC_CHRP
>> -	beq	cr1, 1f
>> -	twi	31, 0, 0
>> -#endif
>>   1:	prepare_transfer_to_handler
>>   	bl	machine_check_exception
>>   	b	interrupt_return
>
> Then it becomes a standard exception handler that can be set up with
>
> 	EXCEPTION(INTERRUPT_MACHINE_CHECK, MachineCheck, machine_check_exception)

Ack. And I checked the asm output is identical.

> And the comment from paulus voids.

Thanks.

cheers


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 09/10] i2c: Remove I2C_HYDRA
  2024-11-14 14:47   ` Geert Uytterhoeven
@ 2024-11-19 23:11     ` Michael Ellerman
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Ellerman @ 2024-11-19 23:11 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linuxppc-dev, linux-kernel, arnd

Geert Uytterhoeven <geert@linux-m68k.org> writes:
> Hi Michael,
>
> On Thu, Nov 14, 2024 at 2:11 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>> The i2c-hydra driver depends on PPC_CHRP which has now been removed,
>> remove the driver also.
>>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> Thanks for your patch!
>
>> --- a/drivers/i2c/busses/i2c-hydra.c
>> +++ /dev/null
>
>> -#include <asm/hydra.h>
>
> Looks like this was the last real user of arch/powerpc/include/asm/hydra.h.
> drivers/scsi/mesh.c still includes it, but I don't see why it was ever
> needed in upstream.

Thanks, I'll remove it in v2.

cheers


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
                   ` (11 preceding siblings ...)
  2024-11-17 20:36 ` Gerhard Pircher
@ 2024-11-21  8:38 ` John Paul Adrian Glaubitz
  2024-11-26  3:27   ` Michael Ellerman
  12 siblings, 1 reply; 36+ messages in thread
From: John Paul Adrian Glaubitz @ 2024-11-21  8:38 UTC (permalink / raw)
  To: mpe; +Cc: arnd, geert, linux-kernel, linuxppc-dev

Hello Michael,

> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
> some from Motorola? No Apple machines should be affected.

I have a Pegasos 2 and I planned on keeping it.

Have you asked among the Amiga community whether they plan on discarding
your hardware? I think it's always ill-fated to ask for popularity of
hardware on just the LKML. Most users are not on the LKML.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-18  6:07   ` Michael Ellerman
@ 2024-11-21  8:41     ` John Paul Adrian Glaubitz
  2024-11-22 18:31       ` Segher Boessenkool
  0 siblings, 1 reply; 36+ messages in thread
From: John Paul Adrian Glaubitz @ 2024-11-21  8:41 UTC (permalink / raw)
  To: mpe; +Cc: arnd, geert, gerhard_pircher, linux-kernel, linuxppc-dev

>> Pegasos2 users still exist, but admittedly they mainly use MorphOS and
>> AmigaOS4 on these machines.
>
> The Linux CHRP support is still present in v6.12, which will be an LTS
> for the next 2 years at least, so if there's folks who occasionally boot
> Linux they will still be able to do that for a while.

Is there any urgency that warrants the removal? I could understand when ia64
support was removed because it put a burden on maintainers.

But CHRP support?

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-21  8:41     ` John Paul Adrian Glaubitz
@ 2024-11-22 18:31       ` Segher Boessenkool
  0 siblings, 0 replies; 36+ messages in thread
From: Segher Boessenkool @ 2024-11-22 18:31 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: mpe, arnd, geert, gerhard_pircher, linux-kernel, linuxppc-dev

On Thu, Nov 21, 2024 at 09:41:36AM +0100, John Paul Adrian Glaubitz wrote:
> >> Pegasos2 users still exist, but admittedly they mainly use MorphOS and
> >> AmigaOS4 on these machines.
> >
> > The Linux CHRP support is still present in v6.12, which will be an LTS
> > for the next 2 years at least, so if there's folks who occasionally boot
> > Linux they will still be able to do that for a while.
> 
> Is there any urgency that warrants the removal? I could understand when ia64
> support was removed because it put a burden on maintainers.
> 
> But CHRP support?

It puts a burden on maintainers the same way.  No one can really test
it, to start with.  It is essentially dead code.

Or do you know someone who regularly builds and tests this?


Segher


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-21  8:38 ` John Paul Adrian Glaubitz
@ 2024-11-26  3:27   ` Michael Ellerman
  2024-11-26 13:27     ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 36+ messages in thread
From: Michael Ellerman @ 2024-11-26  3:27 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: arnd, geert, linux-kernel, linuxppc-dev

John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> writes:
> Hello Michael,

Hi Adrian,

>> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
>> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
>> some from Motorola? No Apple machines should be affected.
>
> I have a Pegasos 2 and I planned on keeping it.

OK great. You're the first user we've heard from in quite a while :)

Any idea what is the latest kernel version you have run on it?

> Have you asked among the Amiga community whether they plan on discarding
> your hardware? I think it's always ill-fated to ask for popularity of
> hardware on just the LKML. Most users are not on the LKML.

I haven't because I don't really know anything about the Amiga
community, who they are, where they hang out, etc.

Please cross post this to any Amiga folks you know, or tell me where I
should post it.

We've maintained this code for over 20 years, at some point if there's
no one in the *Linux community* who cares about it then it's hard to
justify keeping it.

cheers


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-14 21:04 ` Segher Boessenkool
@ 2024-11-26  3:49   ` Michael Ellerman
  2024-11-27 20:10     ` Segher Boessenkool
  0 siblings, 1 reply; 36+ messages in thread
From: Michael Ellerman @ 2024-11-26  3:49 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, linux-kernel, geert, arnd

Segher Boessenkool <segher@kernel.crashing.org> writes:
> On Fri, Nov 15, 2024 at 12:11:04AM +1100, Michael Ellerman wrote:
>> CHRP (Common Hardware Reference Platform) was a standard developed by
>> IBM & Apple for PowerPC-based systems.
>> 
>> The standard was used in the development of some machines but never
>> gained wide spread adoption.
>> 
>> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
>> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
>> some from Motorola? No Apple machines should be affected.
>> 
>> All of those mentioned above are over or nearing 20 years old, and seem
>> to have no active users.
>
> This was used by all non-IBM 970 systems as well.  The last was SLOF on
> JS20 and JS21, about 20 years ago yes, and I doubt anyone uses it still
> (I don't).

By "this" you mean the CHRP standard?

At least in Linux the "CHRP" platform has always been 32-bit only AFAIK.

My memory is that JS20/JS21 used the "maple" platform, which was a
64-bit only bare-metal platform, possibly it was actually == CHRP, but
we didn't call it that in Linux.

But maybe I'm wrong, you were more involved than me back than, and it
was a long time ago :)

cheers


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-26  3:27   ` Michael Ellerman
@ 2024-11-26 13:27     ` John Paul Adrian Glaubitz
  2024-12-12  9:50       ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 36+ messages in thread
From: John Paul Adrian Glaubitz @ 2024-11-26 13:27 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: arnd, geert, linux-kernel, linuxppc-dev

Hi,

On Tue, 2024-11-26 at 14:27 +1100, Michael Ellerman wrote:
> > > The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
> > > IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
> > > some from Motorola? No Apple machines should be affected.
> > 
> > I have a Pegasos 2 and I planned on keeping it.
> 
> OK great. You're the first user we've heard from in quite a while :)

Well, as I said, you won't find the people using that hardware on the LKML
as most of these people aren't developers but just users.

> Any idea what is the latest kernel version you have run on it?

I don't remember. But I'm planning to test a current kernel in the near future.

There is just so much other stuff on my plate, including that debian-installer
regression on all PowerPC targets introduced by a recent change.

> > Have you asked among the Amiga community whether they plan on discarding
> > your hardware? I think it's always ill-fated to ask for popularity of
> > hardware on just the LKML. Most users are not on the LKML.
> 
> I haven't because I don't really know anything about the Amiga
> community, who they are, where they hang out, etc.
> 
> Please cross post this to any Amiga folks you know, or tell me where I
> should post it.

I will.

> We've maintained this code for over 20 years, at some point if there's
> no one in the *Linux community* who cares about it then it's hard to
> justify keeping it.

The problem is that you don't reach the whole Linux community over the
Linux PPC kernel development mailing list ;-).

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-26  3:49   ` Michael Ellerman
@ 2024-11-27 20:10     ` Segher Boessenkool
  0 siblings, 0 replies; 36+ messages in thread
From: Segher Boessenkool @ 2024-11-27 20:10 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, geert, arnd

On Tue, Nov 26, 2024 at 02:49:49PM +1100, Michael Ellerman wrote:
> Segher Boessenkool <segher@kernel.crashing.org> writes:
> > On Fri, Nov 15, 2024 at 12:11:04AM +1100, Michael Ellerman wrote:
> >> CHRP (Common Hardware Reference Platform) was a standard developed by
> >> IBM & Apple for PowerPC-based systems.
> >> 
> >> The standard was used in the development of some machines but never
> >> gained wide spread adoption.
> >> 
> >> The Linux CHRP code only supports a handful of machines, all 32-bit, eg.
> >> IBM B50, bplan/Genesi Pegasos/Pegasos2, Total Impact briQ, and possibly
> >> some from Motorola? No Apple machines should be affected.
> >> 
> >> All of those mentioned above are over or nearing 20 years old, and seem
> >> to have no active users.
> >
> > This was used by all non-IBM 970 systems as well.  The last was SLOF on
> > JS20 and JS21, about 20 years ago yes, and I doubt anyone uses it still
> > (I don't).
> 
> By "this" you mean the CHRP standard?

I mean the "maple" stuff, and the whole "chrp" thing in PowerPC Linux.

> At least in Linux the "CHRP" platform has always been 32-bit only AFAIK.

No?  I've written stuff for it for years :-)

> My memory is that JS20/JS21 used the "maple" platform, which was a
> 64-bit only bare-metal platform, possibly it was actually == CHRP, but
> we didn't call it that in Linux.

Well, it is what it is called in the Open Firmware device trees!

It has a root "device_type" property that starts with the string "chrp".
But that really is only because Yaboot for some reason needs it to
behave reasonably, heh.  (I didn't remember the details, but I still
have the original SLOF open source release tarballs :-) )  So yeah it
wasn't anything "chrp" in Linux itself, aha.

> But maybe I'm wrong, you were more involved than me back than, and it
> was a long time ago :)

Very long ago.  Sad to see it go, but the Git tree will never forget :-)


Segher


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support
  2024-11-26 13:27     ` John Paul Adrian Glaubitz
@ 2024-12-12  9:50       ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 36+ messages in thread
From: John Paul Adrian Glaubitz @ 2024-12-12  9:50 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: arnd, geert, linux-kernel, linuxppc-dev

Hi Michael,

On Tue, 2024-11-26 at 14:27 +0100, John Paul Adrian Glaubitz wrote:
> > > Have you asked among the Amiga community whether they plan on discarding
> > > your hardware? I think it's always ill-fated to ask for popularity of
> > > hardware on just the LKML. Most users are not on the LKML.
> > 
> > I haven't because I don't really know anything about the Amiga
> > community, who they are, where they hang out, etc.
> > 
> > Please cross post this to any Amiga folks you know, or tell me where I
> > should post it.
> 
> I will.

I have started reaching out to the Amiga communities now. I didn't have time for
that before, but I am now on vacation and can therefore take care of this.

Please give them some time to respond. I will reach out to more communities
along the way.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2024-12-12  9:50 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 13:11 [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Michael Ellerman
2024-11-14 13:11 ` [RFC PATCH 02/10] powerpc/chrp: Remove various dead code Michael Ellerman
2024-11-16 16:15   ` Christophe Leroy
2024-11-19  3:27     ` Michael Ellerman
2024-11-14 13:11 ` [RFC PATCH 03/10] powerpc/chrp: Remove PPC_CHRP from defconfigs Michael Ellerman
2024-11-14 13:11 ` [RFC PATCH 04/10] powerpc/powermac: Remove machine_is(chrp) test Michael Ellerman
2024-11-14 13:11 ` [RFC PATCH 05/10] powerpc/rtasd: Remove machine_is(chrp) tests Michael Ellerman
2024-11-14 13:11 ` [RFC PATCH 06/10] powerpc: Remove prom_init longtrail work arounds Michael Ellerman
2024-11-14 14:33   ` Geert Uytterhoeven
2024-11-14 13:11 ` [RFC PATCH 07/10] powerpc: Remove CONFIG_ISA Michael Ellerman
2024-11-14 14:34   ` Geert Uytterhoeven
2024-11-14 13:11 ` [RFC PATCH 08/10] macintosh: Remove ADB_MACIO Michael Ellerman
2024-11-14 14:35   ` Geert Uytterhoeven
2024-11-14 15:42   ` Arnd Bergmann
2024-11-14 16:35     ` Geert Uytterhoeven
2024-11-16 16:00   ` Christophe Leroy
2024-11-17 11:29     ` Michael Ellerman
2024-11-14 13:11 ` [RFC PATCH 09/10] i2c: Remove I2C_HYDRA Michael Ellerman
2024-11-14 14:37   ` Geert Uytterhoeven
2024-11-14 14:57     ` Wolfram Sang
2024-11-14 14:47   ` Geert Uytterhoeven
2024-11-19 23:11     ` Michael Ellerman
2024-11-14 13:11 ` [RFC PATCH 10/10] i2c: Drop reference to PPC_CHRP Michael Ellerman
2024-11-14 14:31 ` [RFC PATCH 01/10] powerpc/chrp: Remove CHRP support Geert Uytterhoeven
2024-11-14 15:43   ` Arnd Bergmann
2024-11-14 21:04 ` Segher Boessenkool
2024-11-26  3:49   ` Michael Ellerman
2024-11-27 20:10     ` Segher Boessenkool
2024-11-17 20:36 ` Gerhard Pircher
2024-11-18  6:07   ` Michael Ellerman
2024-11-21  8:41     ` John Paul Adrian Glaubitz
2024-11-22 18:31       ` Segher Boessenkool
2024-11-21  8:38 ` John Paul Adrian Glaubitz
2024-11-26  3:27   ` Michael Ellerman
2024-11-26 13:27     ` John Paul Adrian Glaubitz
2024-12-12  9:50       ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).