powerpc/85xx: p2020: Create one unified machine description
Subsystems (3)
v3 cover powerpc/85xx: p2020: Create one unified machine description
This patch series unifies all P2020 boards and machine descriptions into one generic unified P2020 machine description. With this generic machine description, kernel can boot on any P2020-based board with correct DTS file.
Tested on CZ.NIC Turris 1.1 board with has Freescale P2020 processor. Kernel during booting correctly detects P2020 and prints:
[ 0.000000] Using Freescale P2020 machine description
Changes in v3:
* Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdef CONFIG_PPC_I8259'
* Simplify p2020_probe()
* Patches generated by -M and -C git options
Link to v2: https://lore.kernel.org/linuxppc-dev/[email protected]/
Changes in v2:
* Added patch "p2020: Move i8259 code into own function" (separated from the next one)
* Renamed CONFIG_P2020 to CONFIG_PPC_P2020
* Fixed descriptions
Link to v1: https://lore.kernel.org/linuxppc-dev/[email protected]/
Pali Rohár (8):
powerpc/85xx: Mark mpc85xx_rdb_pic_init() as static powerpc/85xx: Mark mpc85xx_ds_pic_init() as static powerpc/85xx: p2020: Move all P2020 machine descriptions to p2020.c powerpc/85xx: p2020: Move i8259 code into own function powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks powerpc/85xx: p2020: Define just one machine description powerpc/85xx: p2020: Enable boards by new config option
CONFIG_PPC_P2020
powerpc: dts: turris1x.dts: Remove "fsl,P2020RDB-PC" compatible string
arch/powerpc/boot/dts/turris1x.dts | 2 +-
arch/powerpc/platforms/85xx/Kconfig | 22 ++-
arch/powerpc/platforms/85xx/Makefile | 1 +
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 +---
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 46 +-----
.../platforms/85xx/{mpc85xx_ds.c => p2020.c} | 135 ++++++------------
6 files changed, 68 insertions(+), 163 deletions(-)
copy arch/powerpc/platforms/85xx/{mpc85xx_ds.c => p2020.c} (52%)Signature · 1 line
2.20.1
PATCH v3 1/8 powerpc/85xx: Mark mpc85xx_rdb_pic_init() as static
Function mpc85xx_rdb_pic_init() is not used out of the mpc85xx_rdb.c file.
--- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1 -1
@@ -38,7 +38,7 @@#endif -void __init mpc85xx_rdb_pic_init (void ) +static void __init mpc85xx_rdb_pic_init (void ) {struct mpic *mpic;
Signature · 1 line
2.20.1
PATCH v3 2/8 powerpc/85xx: Mark mpc85xx_ds_pic_init() as static
In reply to Pali RohárFunction mpc85xx_ds_pic_init() is not used out of the mpc85xx_ds.c file.
--- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/85xx/mpc85xx_ds.c +1 -1
@@ -54,7 +54,7 @@ static void mpc85xx_8259_cascade(struct irq_desc *desc) }#endif /* CONFIG_PPC_I8259 */ -void __init mpc85xx_ds_pic_init (void ) +static void __init mpc85xx_ds_pic_init (void ) {struct mpic *mpic;#ifdef CONFIG_PPC_I8259
Signature · 1 line
2.20.1
PATCH v3 3/8 powerpc/85xx: p2020: Move all P2020 machine descriptions to p2020.c
In reply to Pali RohárThis moves machine descriptions and all related code for all P2020 boards into new p2020.c source file. This change also copies helper static functions from other mpc85xx*.c files into p2020.c, which are required for machine descriptions. This is preparation for code de-duplication and providing one unified machine description for all P2020 boards. In follow-up patches would be copied functions refactored and simplified to be specific just for P2020 boards.
---
arch/powerpc/platforms/85xx/Makefile | 2 +
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 23 ---
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 44 ------
.../platforms/85xx/{mpc85xx_ds.c => p2020.c} | 134 ++++++++++++------
4 files changed, 91 insertions(+), 112 deletions(-)
copy arch/powerpc/platforms/85xx/{mpc85xx_ds.c => p2020.c} (65%)arch/powerpc/platforms/85xx/Makefile +2 -0
@@ -23,6 +23,8 @@ obj-$(CONFIG_P1010_RDB) += p1010rdb.o obj-$(CONFIG_P1022_DS) += p1022_ds.o obj-$(CONFIG_P1022_RDK) += p1022_rdk.o obj-$(CONFIG_P1023_RDB) += p1023_rdb.o +obj-$(CONFIG_MPC85xx_DS) += p2020.o +obj-$(CONFIG_MPC85xx_RDB) += p2020.o obj-$(CONFIG_TWR_P102x) += twr_p102x.o obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o
arch/powerpc/platforms/85xx/mpc85xx_ds.c +0 -23
@@ -168,7 +168,6 @@ static int __init mpc8544_ds_probe(void)machine_arch_initcall (mpc8544_ds, mpc85xx_common_publish_devices);machine_arch_initcall (mpc8572_ds, mpc85xx_common_publish_devices); -machine_arch_initcall (p2020_ds, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
@@ -178,14 +177,6 @@ static int __init mpc8572_ds_probe(void)return !!of_machine_is_compatible ("fsl,MPC8572DS" ); } -/* -* Called very early, device-tree isn't unflattened -*/ -static int __init p2020_ds_probe (void ) -{ -return !!of_machine_is_compatible ("fsl,P2020DS" ); -} -define_machine (mpc8544_ds) { .name = "MPC8544 DS", .probe = mpc8544_ds_probe,
@@ -213,17 +204,3 @@ define_machine(mpc8572_ds) { .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, }; - -define_machine (p2020_ds) { - .name = "P2020 DS", - .probe = p2020_ds_probe, - .setup_arch = mpc85xx_ds_setup_arch, - .init_IRQ = mpc85xx_ds_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -};
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0 -44
74 lines not on this page · raw message
arch/powerpc/platforms/85xx/p2020.c renamed from arch/powerpc/platforms/85xx/mpc85xx_ds.c +89 -45
209 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v3 4/8 powerpc/85xx: p2020: Move i8259 code into own function
In reply to Pali RohárSplits mpic and i8259 initialization codes into separate functions. Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdef CONFIG_PPC_I8259'.
--- arch/powerpc/platforms/85xx/p2020.c | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-)
arch/powerpc/platforms/85xx/p2020.c +18 -18
@@ -44,7 +44,6 @@#ifdef CONFIG_MPC85xx_DS -#ifdef CONFIG_PPC_I8259static void mpc85xx_8259_cascade (struct irq_desc *desc) {struct irq_chip *chip =irq_desc_get_chip (desc);
@@ -55,27 +54,13 @@ static void mpc85xx_8259_cascade(struct irq_desc *desc) } chip->irq_eoi (&desc->irq_data); } -#endif /* CONFIG_PPC_I8259 */ -static void __init mpc85xx_ds_pic_init (void ) +static void __init mpc85xx_8259_init (void ) { -struct mpic *mpic; -#ifdef CONFIG_PPC_I8259 struct device_node *np;struct device_node *cascade_node =NULL ;int cascade_irq; -#endif - mpic =mpic_alloc (NULL ,0 , -MPIC_BIG_ENDIAN | -MPIC_SINGLE_DEST_CPU , -0 ,256 ," OpenPIC " ); - -BUG_ON (mpic ==NULL ); -mpic_init (mpic); - -#ifdef CONFIG_PPC_I8259 -/* Initialize the i8259 controller */ for_each_node_by_type (np,"interrupt-controller" )if (of_device_is_compatible (np,"chrp,iic" )) { cascade_node = np;
@@ -93,13 +78,28 @@ static void __init mpc85xx_ds_pic_init(void)return ; } -DBG ("mpc85xxds: cascade mapped to irq %d\n" , cascade_irq); +DBG ("i8259: cascade mapped to irq %d\n" , cascade_irq);i8259_init (cascade_node,0 );of_node_put (cascade_node);irq_set_chained_handler (cascade_irq, mpc85xx_8259_cascade); -#endif /* CONFIG_PPC_I8259 */ +} + +static void __init mpc85xx_ds_pic_init (void ) +{ +struct mpic *mpic; + + mpic =mpic_alloc (NULL ,0 , +MPIC_BIG_ENDIAN | +MPIC_SINGLE_DEST_CPU , +0 ,256 ," OpenPIC " ); + +BUG_ON (mpic ==NULL ); +mpic_init (mpic); + +if (IS_ENABLED (CONFIG_PPC_I8259 )) +mpc85xx_8259_init (); }#ifdef CONFIG_PCI
Signature · 1 line
2.20.1
PATCH v3 5/8 powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks
In reply to Pali RohárMake just one .setup_arch and one .init_IRQ callback implementation for all P2020 board code. This deduplicate repeated and same code.
--- arch/powerpc/platforms/85xx/p2020.c | 58 +++++------------------------ 1 file changed, 9 insertions(+), 49 deletions(-)
arch/powerpc/platforms/85xx/p2020.c +9 -49
@@ -42,8 +42,6 @@ #define DBG(fmt, args...)#endif -#ifdef CONFIG_MPC85xx_DS -static void mpc85xx_8259_cascade (struct irq_desc *desc) {struct irq_chip *chip =irq_desc_get_chip (desc);
@@ -86,7 +84,7 @@ static void __init mpc85xx_8259_init(void)irq_set_chained_handler (cascade_irq, mpc85xx_8259_cascade); } -static void __init mpc85xx_ds_pic_init (void ) +static void __init p2020_pic_init (void ) {struct mpic *mpic;
@@ -138,58 +136,20 @@ static void __init mpc85xx_ds_uli_init(void)#endif } -#endif /* CONFIG_MPC85xx_DS */ - -#ifdef CONFIG_MPC85xx_RDB -static void __init mpc85xx_rdb_pic_init (void ) -{ -struct mpic *mpic; - - mpic =mpic_alloc (NULL ,0 , -MPIC_BIG_ENDIAN | -MPIC_SINGLE_DEST_CPU , -0 ,256 ," OpenPIC " ); - -BUG_ON (mpic ==NULL ); -mpic_init (mpic); -} -#endif /* CONFIG_MPC85xx_RDB */ -/* * Setup the architecture */ -#ifdef CONFIG_MPC85xx_DS -static void __init mpc85xx_ds_setup_arch (void ) +static void __init p2020_setup_arch (void ) { -if (ppc_md.progress) - ppc_md.progress ("mpc85xx_ds_setup_arch()" ,0 ); -swiotlb_detect_4g ();fsl_pci_assign_primary ();mpc85xx_ds_uli_init ();mpc85xx_smp_init (); -printk ("MPC85xx DS board from Freescale Semiconductor\n" ); -} -#endif /* CONFIG_MPC85xx_DS */ - -#ifdef CONFIG_MPC85xx_RDB -static void __init mpc85xx_rdb_setup_arch (void ) -{ -if (ppc_md.progress) - ppc_md.progress ("mpc85xx_rdb_setup_arch()" ,0 ); - -mpc85xx_smp_init (); - -fsl_pci_assign_primary (); -#ifdef CONFIG_QUICC_ENGINE mpc85xx_qe_par_io_init (); -#endif /* CONFIG_QUICC_ENGINE */ - -printk (KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n" ); +#endif } -#endif /* CONFIG_MPC85xx_RDB */ #ifdef CONFIG_MPC85xx_DSmachine_arch_initcall (p2020_ds, mpc85xx_common_publish_devices);
@@ -230,8 +190,8 @@ static int __init p2020_rdb_pc_probe(void)define_machine (p2020_ds) { .name = "P2020 DS", .probe = p2020_ds_probe, - .setup_arch = mpc85xx_ds_setup_arch, - .init_IRQ = mpc85xx_ds_pic_init, + .setup_arch = p2020_setup_arch, + .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
@@ -246,8 +206,8 @@ define_machine(p2020_ds) {define_machine (p2020_rdb) { .name = "P2020 RDB", .probe = p2020_rdb_probe, - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, + .setup_arch = p2020_setup_arch, + .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
@@ -260,8 +220,8 @@ define_machine(p2020_rdb) {define_machine (p2020_rdb_pc) { .name = "P2020RDB-PC", .probe = p2020_rdb_pc_probe, - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, + .setup_arch = p2020_setup_arch, + .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
Signature · 1 line
2.20.1
PATCH v3 6/8 powerpc/85xx: p2020: Define just one machine description
In reply to Pali RohárCombine machine descriptions and code of all P2020 boards into just one generic unified P2020 machine description. This allows kernel to boot on any P2020-based board with P2020 DTS file without need to patch kernel and define a new machine description in 85xx powerpc platform directory.
--- arch/powerpc/platforms/85xx/p2020.c | 77 ++++++----------------------- 1 file changed, 15 insertions(+), 62 deletions(-)
arch/powerpc/platforms/85xx/p2020.c +15 -62
@@ -151,83 +151,36 @@ static void __init p2020_setup_arch(void)#endif } -#ifdef CONFIG_MPC85xx_DS -machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); -#endif /* CONFIG_MPC85xx_DS */ - -#ifdef CONFIG_MPC85xx_RDB -machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices); -machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices); -#endif /* CONFIG_MPC85xx_RDB */ +machine_arch_initcall (p2020, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened */ -#ifdef CONFIG_MPC85xx_DS -static int __init p2020_ds_probe(void) +static int __init p2020_probe (void ) { - return !!of_machine_is_compatible("fsl,P2020DS"); -} -#endif /* CONFIG_MPC85xx_DS */ +struct device_node *p2020_cpu; -#ifdef CONFIG_MPC85xx_RDB -static int __init p2020_rdb_probe(void) -{ - if (of_machine_is_compatible("fsl,P2020RDB")) - return 1; - return 0; -} +/* +* There is no common compatible string for all P2020 boards. +* The only common thing is "PowerPC,P2020@0" cpu node. +* So check for P2020 board via this cpu node. +*/ + p2020_cpu =of_find_node_by_path ("/cpus/PowerPC,P2020@0" ); +of_node_put (p2020_cpu); -static int __init p2020_rdb_pc_probe(void) -{ - if (of_machine_is_compatible("fsl,P2020RDB-PC")) - return 1; - return 0; +return !!p2020_cpu; } -#endif /* CONFIG_MPC85xx_RDB */ - -#ifdef CONFIG_MPC85xx_DS -define_machine(p2020_ds) { - .name = "P2020 DS", - .probe = p2020_ds_probe, - .setup_arch = p2020_setup_arch, - .init_IRQ = p2020_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -}; -#endif /* CONFIG_MPC85xx_DS */ - -#ifdef CONFIG_MPC85xx_RDB -define_machine(p2020_rdb) { - .name = "P2020 RDB", - .probe = p2020_rdb_probe, - .setup_arch = p2020_setup_arch, - .init_IRQ = p2020_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -}; -define_machine(p2020_rdb_pc) { - .name = "P2020RDB-PC", - .probe = p2020_rdb_pc_probe, +define_machine (p2020) { + .name = "Freescale P2020", + .probe = p2020_probe, .setup_arch = p2020_setup_arch, .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, #endif .get_irq = mpic_get_irq, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, }; -#endif /* CONFIG_MPC85xx_RDB */
Signature · 1 line
2.20.1
PATCH v3 7/8 powerpc/85xx: p2020: Enable boards by new config option CONFIG_PPC_P2020
In reply to Pali RohárGeneric unified P2020 machine description which supports all P2020-based boards is now in separate file p2020.c. So create a separate config option CONFIG_PPC_P2020 for it.
Previously machine descriptions for P2020 boards were enabled by CONFIG_MPC85xx_DS or CONFIG_MPC85xx_RDB option. So set CONFIG_PPC_P2020 to be enabled by default when one of those option is enabled.
This allows to compile support for P2020 boards without need to have enabled support for older mpc85xx boards. And to compile kernel for old mpc85xx boards without having enabled support for new P2020 boards.
--- arch/powerpc/platforms/85xx/Kconfig | 22 ++++++++++++++++++---- arch/powerpc/platforms/85xx/Makefile | 3 +-- 2 files changed, 19 insertions(+), 6 deletions(-)
arch/powerpc/platforms/85xx/Kconfig +18 -4
@@ -78,16 +78,16 @@ config MPC8536_DS This option enables support for the MPC8536 DS board config MPC85xx_DS - bool "Freescale MPC8544 DS / MPC8572 DS / P2020 DS" + bool "Freescale MPC8544 DS / MPC8572 DS" select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575 if PCI select SWIOTLB help - This option enables support for the MPC8544 DS, MPC8572 DS and P2020 DS boards + This option enables support for the MPC8544 DS and MPC8572 DS boards config MPC85xx_RDB - bool "Freescale P102x MBG/UTM/RDB and P2020 RDB" + bool "Freescale P102x MBG/UTM/RDB" select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575 if PCI
@@ -95,7 +95,21 @@ config MPC85xx_RDB help This option enables support for the P1020 MBG PC, P1020 UTM PC, P1020 RDB PC, P1020 RDB PD, P1020 RDB, P1021 RDB PC, P1024 RDB, - P1025 RDB, P2020 RDB and P2020 RDB PC boards + and P1025 RDB boards + +config PPC_P2020 + bool "Freescale P2020" + default y if MPC85xx_DS || MPC85xx_RDB + select DEFAULT_UIMAGE + select SWIOTLB + imply PPC_I8259 + imply FSL_ULI1575 if PCI + help + This option enables generic unified support for any board with the + Freescale P2020 processor. + + For example: P2020 DS board, P2020 RDB board, P2020 RDB PC board or + CZ.NIC Turris 1.x boards. config P1010_RDB bool "Freescale P1010 RDB"
arch/powerpc/platforms/85xx/Makefile +1 -2
@@ -23,8 +23,7 @@ obj-$(CONFIG_P1010_RDB) += p1010rdb.o obj-$(CONFIG_P1022_DS) += p1022_ds.o obj-$(CONFIG_P1022_RDK) += p1022_rdk.o obj-$(CONFIG_P1023_RDB) += p1023_rdb.o -obj-$(CONFIG_MPC85xx_DS) += p2020.o -obj-$(CONFIG_MPC85xx_RDB) += p2020.o +obj-$(CONFIG_PPC_P2020) += p2020.o obj-$(CONFIG_TWR_P102x) += twr_p102x.o obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o
Signature · 1 line
2.20.1
PATCH v3 8/8 powerpc: dts: turris1x.dts: Remove "fsl,P2020RDB-PC" compatible string
In reply to Pali Rohár"fsl,P2020RDB-PC" compatible string was present in Turris 1.x DTS file just because Linux kernel required it for proper detection of P2020 processor during boot.
This was quite a hack as CZ.NIC Turris 1.x is not compatible with Freescale P2020-RDB-PC board.
Now when kernel has generic unified support for boards with P2020 processors, there is no need to have this "hack" in turris1x.dts file.
So remove incorrect "fsl,P2020RDB-PC" compatible string from turris1x.dts.
--- arch/powerpc/boot/dts/turris1x.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/boot/dts/turris1x.dts +1 -1
@@ -15,7 +15,7 @@ / { model = "Turris 1.x"; - compatible = "cznic,turris1x", "fsl,P2020RDB-PC"; /* fsl,P2020RDB-PC is required for booting Linux */ + compatible = "cznic,turris1x"; aliases { ethernet0 = &enet0;
Signature · 1 line
2.20.1
Hello Christophe! Could you look at this v3 series?
I addressed those small issues and hopefully it should be ready. It would be great to have this finally in v6.3 release.
Quoted 46 lines · On Saturday 18 February 2023 12:13:57 Pali Rohár wrote:
This patch series unifies all P2020 boards and machine descriptions into one generic unified P2020 machine description. With this generic machine description, kernel can boot on any P2020-based board with correct DTS file.
Tested on CZ.NIC Turris 1.1 board with has Freescale P2020 processor. Kernel during booting correctly detects P2020 and prints:
[ 0.000000] Using Freescale P2020 machine descriptionChanges in v3:
* Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdefCONFIG_PPC_I8259'
* Simplifyp2020_probe()
* Patches generated by -M and -C git optionsLink to v2: https://lore.kernel.org/linuxppc-dev/[email protected]/
Changes in v2:
* Added patch "p2020: Move i8259 code into own function" (separated from the next one)
* RenamedCONFIG_P2020toCONFIG_PPC_P2020
* Fixed descriptionsLink to v1: https://lore.kernel.org/linuxppc-dev/[email protected]/
Pali Rohár (8):
powerpc/85xx: Markmpc85xx_rdb_pic_init()as static powerpc/85xx: Markmpc85xx_ds_pic_init()as static powerpc/85xx: p2020: Move all P2020 machine descriptions top2020.cpowerpc/85xx: p2020: Move i8259 code into own function powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks powerpc/85xx: p2020: Define just one machine description powerpc/85xx: p2020: Enable boards by new config optionCONFIG_PPC_P2020powerpc: dts:
turris1x.dts: Remove "fsl,P2020RDB-PC" compatible stringarch/powerpc/boot/dts/turris1x.dts | 2 +- arch/powerpc/platforms/85xx/Kconfig | 22 ++- arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 +--- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 46 +----- .../platforms/85xx/{mpc85xx_ds.c => p2020.c} | 135 ++++++------------ 6 files changed, 68 insertions(+), 163 deletions(-) copy arch/powerpc/platforms/85xx/{mpc85xx_ds.c => p2020.c} (52%)Signature · 1 line
2.20.1
Hi,
Le 21/02/2023 à 23:07, Pali Rohár a écrit :
Quoted 3 lines
Hello Christophe! Could you look at this v3 series?
I addressed those small issues and hopefully it should be ready. It would be great to have this finally in v6.3 release.
I started looking at your series and I will try to provide a feedback within a few days.
By the way I see that Paul Gortmaker has started removal of several 85xx boards. Should we first take Paul's removal series then see what remains before applying yours ? That would make your series even more efficient.
Christoph
Quoted 48 lines · On Saturday 18 February 2023 12:13:57 Pali Rohár wrote:
Quoted 46 lines
This patch series unifies all P2020 boards and machine descriptions into one generic unified P2020 machine description. With this generic machine description, kernel can boot on any P2020-based board with correct DTS file.
Tested on CZ.NIC Turris 1.1 board with has Freescale P2020 processor. Kernel during booting correctly detects P2020 and prints:
[ 0.000000] Using Freescale P2020 machine descriptionChanges in v3:
* Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdefCONFIG_PPC_I8259'
* Simplifyp2020_probe()
* Patches generated by -M and -C git optionsLink to v2: https://lore.kernel.org/linuxppc-dev/[email protected]/
Changes in v2:
* Added patch "p2020: Move i8259 code into own function" (separated from the next one)
* RenamedCONFIG_P2020toCONFIG_PPC_P2020
* Fixed descriptionsLink to v1: https://lore.kernel.org/linuxppc-dev/[email protected]/
Pali Rohár (8):
powerpc/85xx: Markmpc85xx_rdb_pic_init()as static powerpc/85xx: Markmpc85xx_ds_pic_init()as static powerpc/85xx: p2020: Move all P2020 machine descriptions top2020.cpowerpc/85xx: p2020: Move i8259 code into own function powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks powerpc/85xx: p2020: Define just one machine description powerpc/85xx: p2020: Enable boards by new config optionCONFIG_PPC_P2020powerpc: dts:
turris1x.dts: Remove "fsl,P2020RDB-PC" compatible stringarch/powerpc/boot/dts/turris1x.dts | 2 +- arch/powerpc/platforms/85xx/Kconfig | 22 ++- arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 +--- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 46 +----- .../platforms/85xx/{mpc85xx_ds.c => p2020.c} | 135 ++++++------------ 6 files changed, 68 insertions(+), 163 deletions(-)copy
arch/powerpc/platforms/85xx/{mpc85xx_ds.c=>p2020.c} (52%)Signature · 1 line
2.20.1
Quoted 7 lines · On Wednesday 22 February 2023 06:39:07 Christophe Leroy wrote:
Hi,
Le 21/02/2023 à 23:07, Pali Rohár a écrit :
Quoted 3 lines
Hello Christophe! Could you look at this v3 series?
I addressed those small issues and hopefully it should be ready. It would be great to have this finally in v6.3 release.
Quoted 6 lines
I started looking at your series and I will try to provide a feedback within a few days.
By the way I see that Paul Gortmaker has started removal of several 85xx boards. Should we first take Paul's removal series then see what remains before applying yours ? That would make your series even more efficient.
I have already replied to Paul patch series. The important thing is that we are touching different files, so patch series should be independent.
Quoted 50 lines
Christoph
Quoted 48 lines · On Saturday 18 February 2023 12:13:57 Pali Rohár wrote:
Quoted 46 lines
This patch series unifies all P2020 boards and machine descriptions into one generic unified P2020 machine description. With this generic machine description, kernel can boot on any P2020-based board with correct DTS file.
Tested on CZ.NIC Turris 1.1 board with has Freescale P2020 processor. Kernel during booting correctly detects P2020 and prints:
[ 0.000000] Using Freescale P2020 machine descriptionChanges in v3:
* Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdefCONFIG_PPC_I8259'
* Simplifyp2020_probe()
* Patches generated by -M and -C git optionsLink to v2: https://lore.kernel.org/linuxppc-dev/[email protected]/
Changes in v2:
* Added patch "p2020: Move i8259 code into own function" (separated from the next one)
* RenamedCONFIG_P2020toCONFIG_PPC_P2020
* Fixed descriptionsLink to v1: https://lore.kernel.org/linuxppc-dev/[email protected]/
Pali Rohár (8):
powerpc/85xx: Markmpc85xx_rdb_pic_init()as static powerpc/85xx: Markmpc85xx_ds_pic_init()as static powerpc/85xx: p2020: Move all P2020 machine descriptions top2020.cpowerpc/85xx: p2020: Move i8259 code into own function powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks powerpc/85xx: p2020: Define just one machine description powerpc/85xx: p2020: Enable boards by new config optionCONFIG_PPC_P2020powerpc: dts:
turris1x.dts: Remove "fsl,P2020RDB-PC" compatible stringarch/powerpc/boot/dts/turris1x.dts | 2 +- arch/powerpc/platforms/85xx/Kconfig | 22 ++- arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 +--- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 46 +----- .../platforms/85xx/{mpc85xx_ds.c => p2020.c} | 135 ++++++------------ 6 files changed, 68 insertions(+), 163 deletions(-)copy
arch/powerpc/platforms/85xx/{mpc85xx_ds.c=>p2020.c} (52%)Signature · 1 line
2.20.1
Le 22/02/2023 à 08:52, Pali Rohár a écrit :
Quoted 11 lines · On Wednesday 22 February 2023 06:39:07 Christophe Leroy wrote:
Quoted 10 lines
Hi,
Le 21/02/2023 à 23:07, Pali Rohár a écrit :
Quoted 3 lines
Hello Christophe! Could you look at this v3 series?
I addressed those small issues and hopefully it should be ready. It would be great to have this finally in v6.3 release.I started looking at your series and I will try to provide a feedback within a few days.
Quoted 6 lines
Quoted 3 lines
By the way I see that Paul Gortmaker has started removal of several 85xx boards. Should we first take Paul's removal series then see what remains before applying yours ? That would make your series even more efficient.
I have already replied to Paul patch series. The important thing is that we are touching different files, so patch series should be independent.
Ok.
Because exemples are always better than long writings, I have prepared a v4 of your series and will send it out shortly.
If that approach is ok for you, feel free to restart from there.
Christophe
Quoted 51 lines
Quoted 51 lines
Christoph
Quoted 48 lines · On Saturday 18 February 2023 12:13:57 Pali Rohár wrote:
Quoted 46 lines
This patch series unifies all P2020 boards and machine descriptions into one generic unified P2020 machine description. With this generic machine description, kernel can boot on any P2020-based board with correct DTS file.
Tested on CZ.NIC Turris 1.1 board with has Freescale P2020 processor. Kernel during booting correctly detects P2020 and prints:
[ 0.000000] Using Freescale P2020 machine descriptionChanges in v3:
* Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdefCONFIG_PPC_I8259'
* Simplifyp2020_probe()
* Patches generated by -M and -C git optionsLink to v2: https://lore.kernel.org/linuxppc-dev/[email protected]/
Changes in v2:
* Added patch "p2020: Move i8259 code into own function" (separated from the next one)
* RenamedCONFIG_P2020toCONFIG_PPC_P2020
* Fixed descriptionsLink to v1: https://lore.kernel.org/linuxppc-dev/[email protected]/
Pali Rohár (8):
powerpc/85xx: Markmpc85xx_rdb_pic_init()as static powerpc/85xx: Markmpc85xx_ds_pic_init()as static powerpc/85xx: p2020: Move all P2020 machine descriptions top2020.cpowerpc/85xx: p2020: Move i8259 code into own function powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks powerpc/85xx: p2020: Define just one machine description powerpc/85xx: p2020: Enable boards by new config option
CONFIG_PPC_P2020
powerpc: dts:turris1x.dts: Remove "fsl,P2020RDB-PC" compatible stringarch/powerpc/boot/dts/turris1x.dts | 2 +- arch/powerpc/platforms/85xx/Kconfig | 22 ++- arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 +--- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 46 +----- .../platforms/85xx/{mpc85xx_ds.c => p2020.c} | 135 ++++++------------ 6 files changed, 68 insertions(+), 163 deletions(-)copy
arch/powerpc/platforms/85xx/{mpc85xx_ds.c=>p2020.c} (52%)Signature · 1 line
2.20.1