* [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists. @ 2008-08-05 20:13 John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree John Rigby ` (2 more replies) 0 siblings, 3 replies; 18+ messages in thread From: John Rigby @ 2008-08-05 20:13 UTC (permalink / raw) To: linuxppc-dev This will allow the eventual removal of device_type = "soc" properties in soc nodes. Signed-off-by: John Rigby <jrigby@freescale.com> --- arch/powerpc/sysdev/fsl_soc.c | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 214388e..2643395 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -45,14 +45,35 @@ extern void init_fec_ioports(struct fs_platform_info*); extern void init_smc_ioports(struct fs_uart_platform_info*); static phys_addr_t immrbase = -1; +/* + * Some chips call this immr some ccsr, we + * use the term immr for both. + */ phys_addr_t get_immrbase(void) { - struct device_node *soc; + struct device_node *soc = NULL; + struct device_node *np; + const char *path; + if (immrbase != -1) return immrbase; - soc = of_find_node_by_type(NULL, "soc"); + /* + * First look for an immr alias + */ + np = of_find_node_by_name(NULL, "/aliases"); + if (np) { + path = of_get_property(np, "immr", NULL); + if (path) + soc = of_find_node_by_name(NULL, path); + } + /* + * If no immr alias then fall back to finding + * it by device_type + */ + if (!soc) + soc = of_find_node_by_type(NULL, "soc"); if (soc) { int size; u32 naddr; -- ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 20:13 [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists John Rigby @ 2008-08-05 20:13 ` John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 3/4] powerpc: 83xx: Add immr aliases to 83xx device trees John Rigby 2008-08-05 21:05 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree Grant Likely 2008-08-05 20:43 ` [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists Arnd Bergmann 2008-08-06 3:41 ` Stephen Rothwell 2 siblings, 2 replies; 18+ messages in thread From: John Rigby @ 2008-08-05 20:13 UTC (permalink / raw) To: linuxppc-dev So get_immrbase can function without a device_type = "soc" property in the soc node. The "soc" node should really be named "immr" because it does not include the entire soc, however u-boot currently looks up this node by name for a clock fixup so leave it "soc" for now. We will change it later after 5121 u-boot uses the immr alias instead of the node name. Signed-off-by: John Rigby <jrigby@freescale.com> --- arch/powerpc/boot/dts/mpc5121ads.dts | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts b/arch/powerpc/boot/dts/mpc5121ads.dts index 1f9036c..c52c51d 100644 --- a/arch/powerpc/boot/dts/mpc5121ads.dts +++ b/arch/powerpc/boot/dts/mpc5121ads.dts @@ -19,6 +19,7 @@ aliases { pci = &pci; + immr = &immr; }; cpus { @@ -135,7 +136,7 @@ }; }; - soc@80000000 { + immr: soc@80000000 { compatible = "fsl,mpc5121-immr"; #address-cells = <1>; #size-cells = <1>; -- ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH add immr alias 3/4] powerpc: 83xx: Add immr aliases to 83xx device trees. 2008-08-05 20:13 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree John Rigby @ 2008-08-05 20:13 ` John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 4/4] powerpc: 8[56]xx: Add immr aliases to 8[56]xx " John Rigby 2008-08-05 21:05 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree Grant Likely 1 sibling, 1 reply; 18+ messages in thread From: John Rigby @ 2008-08-05 20:13 UTC (permalink / raw) To: linuxppc-dev Now that get_immrbase knows about immr aliases. Signed-off-by: John Rigby <jrigby@freescale.com> --- arch/powerpc/boot/dts/mpc8313erdb.dts | 3 ++- arch/powerpc/boot/dts/mpc8315erdb.dts | 3 ++- arch/powerpc/boot/dts/mpc832x_mds.dts | 3 ++- arch/powerpc/boot/dts/mpc832x_rdb.dts | 3 ++- arch/powerpc/boot/dts/mpc8349emitx.dts | 3 ++- arch/powerpc/boot/dts/mpc8349emitxgp.dts | 3 ++- arch/powerpc/boot/dts/mpc834x_mds.dts | 3 ++- arch/powerpc/boot/dts/mpc836x_mds.dts | 3 ++- arch/powerpc/boot/dts/mpc836x_rdk.dts | 3 ++- arch/powerpc/boot/dts/mpc8377_mds.dts | 3 ++- arch/powerpc/boot/dts/mpc8377_rdb.dts | 3 ++- arch/powerpc/boot/dts/mpc8378_mds.dts | 3 ++- arch/powerpc/boot/dts/mpc8378_rdb.dts | 3 ++- arch/powerpc/boot/dts/mpc8379_mds.dts | 3 ++- arch/powerpc/boot/dts/mpc8379_rdb.dts | 3 ++- arch/powerpc/boot/dts/sbc8349.dts | 3 ++- 16 files changed, 32 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index 2a94ae0..3c04cd2 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts @@ -23,6 +23,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -94,7 +95,7 @@ }; }; - soc8313@e0000000 { + immr: soc8313@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts index f704513..3327670 100644 --- a/arch/powerpc/boot/dts/mpc8315erdb.dts +++ b/arch/powerpc/boot/dts/mpc8315erdb.dts @@ -22,6 +22,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -92,7 +93,7 @@ }; }; - immr@e0000000 { + immr: immr@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index fbc9304..a2757b3 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts @@ -35,6 +35,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -64,7 +65,7 @@ reg = <0xf8000000 0x8000>; }; - soc8323@e0000000 { + immr: soc8323@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts index b157d18..50e0539 100644 --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts @@ -23,6 +23,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -47,7 +48,7 @@ reg = <0x00000000 0x04000000>; }; - soc8323@e0000000 { + immr: soc8323@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts index 700e076..ed24c85 100644 --- a/arch/powerpc/boot/dts/mpc8349emitx.dts +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts @@ -24,6 +24,7 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + immr = &immr; }; cpus { @@ -48,7 +49,7 @@ reg = <0x00000000 0x10000000>; }; - soc8349@e0000000 { + immr: soc8349@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts index cdd3063..24a696d 100644 --- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts +++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts @@ -22,6 +22,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -46,7 +47,7 @@ reg = <0x00000000 0x10000000>; }; - soc8349@e0000000 { + immr: soc8349@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts index 783241c..aad88e1 100644 --- a/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/arch/powerpc/boot/dts/mpc834x_mds.dts @@ -24,6 +24,7 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + immr = &immr; }; cpus { @@ -53,7 +54,7 @@ reg = <0xe2400000 0x8000>; }; - soc8349@e0000000 { + immr: soc8349@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index a3b76a7..664c371 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts @@ -28,6 +28,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -57,7 +58,7 @@ reg = <0xf8000000 0x8000>; }; - soc8360@e0000000 { + immr: soc8360@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc836x_rdk.dts b/arch/powerpc/boot/dts/mpc836x_rdk.dts index 89c9202..af22122 100644 --- a/arch/powerpc/boot/dts/mpc836x_rdk.dts +++ b/arch/powerpc/boot/dts/mpc836x_rdk.dts @@ -29,6 +29,7 @@ ethernet2 = &enet2; ethernet3 = &enet3; pci0 = &pci0; + immr = &immr; }; cpus { @@ -55,7 +56,7 @@ reg = <0 0>; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts index 432782b..36c5ded 100644 --- a/arch/powerpc/boot/dts/mpc8377_mds.dts +++ b/arch/powerpc/boot/dts/mpc8377_mds.dts @@ -23,6 +23,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -113,7 +114,7 @@ }; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts index ed137aa..49465da 100644 --- a/arch/powerpc/boot/dts/mpc8377_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts @@ -22,6 +22,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -92,7 +93,7 @@ }; }; - immr@e0000000 { + immr: immr@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts index ed32c8d..368cad1 100644 --- a/arch/powerpc/boot/dts/mpc8378_mds.dts +++ b/arch/powerpc/boot/dts/mpc8378_mds.dts @@ -23,6 +23,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -113,7 +114,7 @@ }; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts index 34a7f2f..b6fa64e 100644 --- a/arch/powerpc/boot/dts/mpc8378_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts @@ -22,6 +22,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -92,7 +93,7 @@ }; }; - immr@e0000000 { + immr: immr@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts index f4db9ed..e79d8e5 100644 --- a/arch/powerpc/boot/dts/mpc8379_mds.dts +++ b/arch/powerpc/boot/dts/mpc8379_mds.dts @@ -23,6 +23,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -113,7 +114,7 @@ }; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts index e4d7030..830a254 100644 --- a/arch/powerpc/boot/dts/mpc8379_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts @@ -22,6 +22,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -92,7 +93,7 @@ }; }; - immr@e0000000 { + immr: immr@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/sbc8349.dts b/arch/powerpc/boot/dts/sbc8349.dts index 45f789b..efbdd21 100644 --- a/arch/powerpc/boot/dts/sbc8349.dts +++ b/arch/powerpc/boot/dts/sbc8349.dts @@ -27,6 +27,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -51,7 +52,7 @@ reg = <0x00000000 0x10000000>; // 256MB at 0 }; - soc8349@e0000000 { + immr: soc8349@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; -- ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH add immr alias 4/4] powerpc: 8[56]xx: Add immr aliases to 8[56]xx device trees 2008-08-05 20:13 ` [PATCH add immr alias 3/4] powerpc: 83xx: Add immr aliases to 83xx device trees John Rigby @ 2008-08-05 20:13 ` John Rigby 0 siblings, 0 replies; 18+ messages in thread From: John Rigby @ 2008-08-05 20:13 UTC (permalink / raw) To: linuxppc-dev Now that get_immrbase knows about immr aliases. Some chip docs call this ccsr for 8[56]xx platforms but we stick with immr for consistency across 8xxx. Signed-off-by: John Rigby <jrigby@freescale.com> --- arch/powerpc/boot/dts/ksi8560.dts | 3 ++- arch/powerpc/boot/dts/mpc8536ds.dts | 3 ++- arch/powerpc/boot/dts/mpc8540ads.dts | 3 ++- arch/powerpc/boot/dts/mpc8541cds.dts | 3 ++- arch/powerpc/boot/dts/mpc8544ds.dts | 3 ++- arch/powerpc/boot/dts/mpc8548cds.dts | 3 ++- arch/powerpc/boot/dts/mpc8555cds.dts | 3 ++- arch/powerpc/boot/dts/mpc8560ads.dts | 3 ++- arch/powerpc/boot/dts/mpc8568mds.dts | 3 ++- arch/powerpc/boot/dts/mpc8572ds.dts | 3 ++- arch/powerpc/boot/dts/mpc8610_hpcd.dts | 3 ++- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 3 ++- arch/powerpc/boot/dts/mpc866ads.dts | 6 +++++- arch/powerpc/boot/dts/mpc885ads.dts | 6 +++++- arch/powerpc/boot/dts/sbc8548.dts | 3 ++- arch/powerpc/boot/dts/sbc8560.dts | 3 ++- arch/powerpc/boot/dts/sbc8641d.dts | 3 ++- arch/powerpc/boot/dts/stx_gp3_8560.dts | 3 ++- arch/powerpc/boot/dts/tqm8540.dts | 3 ++- arch/powerpc/boot/dts/tqm8541.dts | 3 ++- arch/powerpc/boot/dts/tqm8548-bigflash.dts | 4 +++- arch/powerpc/boot/dts/tqm8548.dts | 4 +++- arch/powerpc/boot/dts/tqm8555.dts | 3 ++- arch/powerpc/boot/dts/tqm8560.dts | 3 ++- 24 files changed, 56 insertions(+), 24 deletions(-) diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts index 4973758..9d3e560 100644 --- a/arch/powerpc/boot/dts/ksi8560.dts +++ b/arch/powerpc/boot/dts/ksi8560.dts @@ -24,6 +24,7 @@ ethernet0 = &enet0; ethernet1 = &enet1; ethernet2 = &enet2; + immr = &immr; }; cpus { @@ -49,7 +50,7 @@ reg = <0x00000000 0x10000000>; /* Fixed by bootwrapper */ }; - soc@fdf00000 { + immr: soc@fdf00000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/mpc8536ds.dts index 1505d68..0d28ff4 100644 --- a/arch/powerpc/boot/dts/mpc8536ds.dts +++ b/arch/powerpc/boot/dts/mpc8536ds.dts @@ -26,6 +26,7 @@ pci1 = &pci1; pci2 = &pci2; pci3 = &pci3; + immr = &immr; }; cpus { @@ -45,7 +46,7 @@ reg = <00000000 00000000>; // Filled by U-Boot }; - soc@ffe00000 { + immr: soc@ffe00000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts index 9568bfa..1f32d2f 100644 --- a/arch/powerpc/boot/dts/mpc8540ads.dts +++ b/arch/powerpc/boot/dts/mpc8540ads.dts @@ -24,6 +24,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -49,7 +50,7 @@ reg = <0x0 0x8000000>; // 128M at 0x0 }; - soc8540@e0000000 { + immr: soc8540@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts index 6480f4f..e5fb2d1 100644 --- a/arch/powerpc/boot/dts/mpc8541cds.dts +++ b/arch/powerpc/boot/dts/mpc8541cds.dts @@ -24,6 +24,7 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + immr = &immr; }; cpus { @@ -49,7 +50,7 @@ reg = <0x0 0x8000000>; // 128M at 0x0 }; - soc8541@e0000000 { + immr: soc8541@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index f1fb207..0814730 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts @@ -25,6 +25,7 @@ pci1 = &pci1; pci2 = &pci2; pci3 = &pci3; + immr = &immr; }; cpus { @@ -50,7 +51,7 @@ reg = <0x0 0x0>; // Filled by U-Boot }; - soc8544@e0000000 { + immr: soc8544@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts index 431b496..71ff390 100644 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/arch/powerpc/boot/dts/mpc8548cds.dts @@ -29,6 +29,7 @@ pci0 = &pci0; pci1 = &pci1; pci2 = &pci2; + immr = &immr; }; cpus { @@ -54,7 +55,7 @@ reg = <0x0 0x8000000>; // 128M at 0x0 }; - soc8548@e0000000 { + immr: soc8548@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts index d833a5c..6b2eaa1 100644 --- a/arch/powerpc/boot/dts/mpc8555cds.dts +++ b/arch/powerpc/boot/dts/mpc8555cds.dts @@ -24,6 +24,7 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + immr = &immr; }; cpus { @@ -49,7 +50,7 @@ reg = <0x0 0x8000000>; // 128M at 0x0 }; - soc8555@e0000000 { + immr: soc8555@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts index 4d1f2f2..ff118e3 100644 --- a/arch/powerpc/boot/dts/mpc8560ads.dts +++ b/arch/powerpc/boot/dts/mpc8560ads.dts @@ -25,6 +25,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -49,7 +50,7 @@ reg = <0x0 0x10000000>; }; - soc8560@e0000000 { + immr: soc8560@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index a15f103..83a2d36 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts @@ -26,6 +26,7 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + immr = &immr; }; cpus { @@ -56,7 +57,7 @@ reg = <0xf8000000 0x8000>; }; - soc8568@e0000000 { + immr: soc8568@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts index e124dd1..f97045a 100644 --- a/arch/powerpc/boot/dts/mpc8572ds.dts +++ b/arch/powerpc/boot/dts/mpc8572ds.dts @@ -26,6 +26,7 @@ pci0 = &pci0; pci1 = &pci1; pci2 = &pci2; + immr = &immr; }; cpus { @@ -64,7 +65,7 @@ reg = <0x0 0x0>; // Filled by U-Boot }; - soc8572@ffe00000 { + immr: soc8572@ffe00000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 666185f..67f252f 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -22,6 +22,7 @@ pci0 = &pci0; pci1 = &pci1; pci2 = &pci2; + immr = &immr; }; cpus { @@ -46,7 +47,7 @@ reg = <0x00000000 0x20000000>; // 512M at 0x0 }; - localbus@e0005000 { + immr: localbus@e0005000 { #address-cells = <2>; #size-cells = <1>; compatible = "fsl,mpc8610-elbc", "fsl,elbc", "simple-bus"; diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts index ae08761..4287605 100644 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts @@ -27,6 +27,7 @@ pci0 = &pci0; pci1 = &pci1; rapidio0 = &rapidio0; + immr = &immr; }; cpus { @@ -103,7 +104,7 @@ }; }; - soc8641@f8000000 { + immr: soc8641@f8000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts index bd70065..021068b 100644 --- a/arch/powerpc/boot/dts/mpc866ads.dts +++ b/arch/powerpc/boot/dts/mpc866ads.dts @@ -18,6 +18,10 @@ #address-cells = <1>; #size-cells = <1>; + aliases { + immr = &immr; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -59,7 +63,7 @@ }; }; - soc@ff000000 { + immr: soc@ff000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts index b123e9f..daaa180 100644 --- a/arch/powerpc/boot/dts/mpc885ads.dts +++ b/arch/powerpc/boot/dts/mpc885ads.dts @@ -18,6 +18,10 @@ #address-cells = <1>; #size-cells = <1>; + aliases { + immr = &immr; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -67,7 +71,7 @@ }; }; - soc@ff000000 { + immr: soc@ff000000 { compatible = "fsl,mpc885", "fsl,pq1-soc"; #address-cells = <1>; #size-cells = <1>; diff --git a/arch/powerpc/boot/dts/sbc8548.dts b/arch/powerpc/boot/dts/sbc8548.dts index 333552b..6bbd50c 100644 --- a/arch/powerpc/boot/dts/sbc8548.dts +++ b/arch/powerpc/boot/dts/sbc8548.dts @@ -28,6 +28,7 @@ pci0 = &pci0; /* pci1 doesn't have a corresponding physical connector */ pci2 = &pci2; + immr = &immr; }; cpus { @@ -146,7 +147,7 @@ }; }; - soc8548@e0000000 { + immr: soc8548@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/sbc8560.dts b/arch/powerpc/boot/dts/sbc8560.dts index db3632e..f0e7db2 100644 --- a/arch/powerpc/boot/dts/sbc8560.dts +++ b/arch/powerpc/boot/dts/sbc8560.dts @@ -27,6 +27,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -52,7 +53,7 @@ reg = <0x00000000 0x20000000>; }; - soc@ff700000 { + immr: soc@ff700000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/sbc8641d.dts b/arch/powerpc/boot/dts/sbc8641d.dts index 9652456..f98e942 100644 --- a/arch/powerpc/boot/dts/sbc8641d.dts +++ b/arch/powerpc/boot/dts/sbc8641d.dts @@ -30,6 +30,7 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + immr = &immr; }; cpus { @@ -120,7 +121,7 @@ }; }; - soc@f8000000 { + immr: soc@f8000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/stx_gp3_8560.dts b/arch/powerpc/boot/dts/stx_gp3_8560.dts index fcd1db6..15d1889 100644 --- a/arch/powerpc/boot/dts/stx_gp3_8560.dts +++ b/arch/powerpc/boot/dts/stx_gp3_8560.dts @@ -22,6 +22,7 @@ ethernet1 = &enet1; serial0 = &serial0; pci0 = &pci0; + immr = &immr; }; cpus { @@ -47,7 +48,7 @@ reg = <0x00000000 0x10000000>; }; - soc@fdf00000 { + immr: soc@fdf00000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8540.dts b/arch/powerpc/boot/dts/tqm8540.dts index e1d260b..8f1fda7 100644 --- a/arch/powerpc/boot/dts/tqm8540.dts +++ b/arch/powerpc/boot/dts/tqm8540.dts @@ -24,6 +24,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -49,7 +50,7 @@ reg = <0x00000000 0x10000000>; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8541.dts b/arch/powerpc/boot/dts/tqm8541.dts index d76441e..3905e7c 100644 --- a/arch/powerpc/boot/dts/tqm8541.dts +++ b/arch/powerpc/boot/dts/tqm8541.dts @@ -23,6 +23,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -48,7 +49,7 @@ reg = <0x00000000 0x10000000>; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8548-bigflash.dts b/arch/powerpc/boot/dts/tqm8548-bigflash.dts index 64d2d5b..f2e7cf8 100644 --- a/arch/powerpc/boot/dts/tqm8548-bigflash.dts +++ b/arch/powerpc/boot/dts/tqm8548-bigflash.dts @@ -28,6 +28,8 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + + immr = &immr; }; cpus { @@ -50,7 +52,7 @@ reg = <0x00000000 0x00000000>; // Filled in by U-Boot }; - soc8548@a0000000 { + immr: soc8548@a0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8548.dts b/arch/powerpc/boot/dts/tqm8548.dts index 2563112..42ab8b1 100644 --- a/arch/powerpc/boot/dts/tqm8548.dts +++ b/arch/powerpc/boot/dts/tqm8548.dts @@ -28,6 +28,8 @@ serial1 = &serial1; pci0 = &pci0; pci1 = &pci1; + + immr = &immr; }; cpus { @@ -50,7 +52,7 @@ reg = <0x00000000 0x00000000>; // Filled in by U-Boot }; - soc8548@e0000000 { + immr: soc8548@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8555.dts b/arch/powerpc/boot/dts/tqm8555.dts index 6f7ea59..76de7bd 100644 --- a/arch/powerpc/boot/dts/tqm8555.dts +++ b/arch/powerpc/boot/dts/tqm8555.dts @@ -23,6 +23,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -48,7 +49,7 @@ reg = <0x00000000 0x10000000>; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8560.dts b/arch/powerpc/boot/dts/tqm8560.dts index 3fe3520..1fd6b74 100644 --- a/arch/powerpc/boot/dts/tqm8560.dts +++ b/arch/powerpc/boot/dts/tqm8560.dts @@ -25,6 +25,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + immr = &immr; }; cpus { @@ -50,7 +51,7 @@ reg = <0x00000000 0x10000000>; }; - soc@e0000000 { + immr: soc@e0000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; -- ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 20:13 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 3/4] powerpc: 83xx: Add immr aliases to 83xx device trees John Rigby @ 2008-08-05 21:05 ` Grant Likely 2008-08-05 21:05 ` Grant Likely 2008-08-05 21:08 ` Scott Wood 1 sibling, 2 replies; 18+ messages in thread From: Grant Likely @ 2008-08-05 21:05 UTC (permalink / raw) To: John Rigby; +Cc: linuxppc-dev On Tue, Aug 5, 2008 at 2:13 PM, John Rigby <jrigby@freescale.com> wrote: > So get_immrbase can function without a device_type = "soc" > property in the soc node. > > The "soc" node should really be named "immr" > because it does not include the entire soc, however > u-boot currently looks up this node by name for > a clock fixup so leave it "soc" for now. We will change > it later after 5121 u-boot uses the immr alias instead > of the node name. Is it not sufficient to search the tree for a node with the <chip>-immr compatible value? I don't think this is the intended use case of aliases. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:05 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree Grant Likely @ 2008-08-05 21:05 ` Grant Likely 2008-08-05 21:17 ` John Rigby 2008-08-05 21:08 ` Scott Wood 1 sibling, 1 reply; 18+ messages in thread From: Grant Likely @ 2008-08-05 21:05 UTC (permalink / raw) To: John Rigby; +Cc: linuxppc-dev, devicetree-discuss Oops, forgot to add devicetree-discuss to the cc: list g. On Tue, Aug 5, 2008 at 3:05 PM, Grant Likely <grant.likely@secretlab.ca> wrote: > On Tue, Aug 5, 2008 at 2:13 PM, John Rigby <jrigby@freescale.com> wrote: >> So get_immrbase can function without a device_type = "soc" >> property in the soc node. >> >> The "soc" node should really be named "immr" >> because it does not include the entire soc, however >> u-boot currently looks up this node by name for >> a clock fixup so leave it "soc" for now. We will change >> it later after 5121 u-boot uses the immr alias instead >> of the node name. > > Is it not sufficient to search the tree for a node with the > <chip>-immr compatible value? I don't think this is the intended use > case of aliases. > > g. > > -- > Grant Likely, B.Sc., P.Eng. > Secret Lab Technologies Ltd. > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:05 ` Grant Likely @ 2008-08-05 21:17 ` John Rigby 2008-08-05 21:20 ` Scott Wood 0 siblings, 1 reply; 18+ messages in thread From: John Rigby @ 2008-08-05 21:17 UTC (permalink / raw) To: Grant Likely; +Cc: linuxppc-dev, devicetree-discuss Uncle! U-boot: The 5121 currently fixes up the soc's bus-frequency node with a hard coded path. I'll leave it that way. Kernel: I would like to use mpc83xx_add_bridge for 5121. This is why I moved it to fsl_pci.c. It currently uses get_immrbase and adds 0x8300 and 0x8304 to it to pass to setup_indirect_pci as the cfg_addr, and cfg_data addresses. I'm more than willing to change mpc83xx_add_bridge to not use get_immrbase. One simple solution is to pass the cfg_addr and cfg_data addresses in. If that seems ok then thats what I will do. John Grant Likely wrote: > Oops, forgot to add devicetree-discuss to the cc: list > > g. > > On Tue, Aug 5, 2008 at 3:05 PM, Grant Likely <grant.likely@secretlab.ca> wrote: > >> On Tue, Aug 5, 2008 at 2:13 PM, John Rigby <jrigby@freescale.com> wrote: >> >>> So get_immrbase can function without a device_type = "soc" >>> property in the soc node. >>> >>> The "soc" node should really be named "immr" >>> because it does not include the entire soc, however >>> u-boot currently looks up this node by name for >>> a clock fixup so leave it "soc" for now. We will change >>> it later after 5121 u-boot uses the immr alias instead >>> of the node name. >>> >> Is it not sufficient to search the tree for a node with the >> <chip>-immr compatible value? I don't think this is the intended use >> case of aliases. >> >> g. >> >> -- >> Grant Likely, B.Sc., P.Eng. >> Secret Lab Technologies Ltd. >> >> > > > > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:17 ` John Rigby @ 2008-08-05 21:20 ` Scott Wood 2008-08-05 21:38 ` John Rigby 0 siblings, 1 reply; 18+ messages in thread From: Scott Wood @ 2008-08-05 21:20 UTC (permalink / raw) To: John Rigby; +Cc: linuxppc-dev, devicetree-discuss John Rigby wrote: > I would like to use mpc83xx_add_bridge for 5121. This is why I > moved it to fsl_pci.c. It currently uses get_immrbase and adds > 0x8300 and 0x8304 to it to pass to setup_indirect_pci as the > cfg_addr, and cfg_data addresses. > > I'm more than willing to change mpc83xx_add_bridge to not use > get_immrbase. One simple solution is to pass the cfg_addr and > cfg_data addresses in. If that seems ok then thats what I will do. We should really be putting those addresses in the "reg" property of the PCI node. -Scott ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:20 ` Scott Wood @ 2008-08-05 21:38 ` John Rigby 0 siblings, 0 replies; 18+ messages in thread From: John Rigby @ 2008-08-05 21:38 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev, devicetree-discuss Scott Wood wrote: > John Rigby wrote: >> I would like to use mpc83xx_add_bridge for 5121. This is why I >> moved it to fsl_pci.c. It currently uses get_immrbase and adds >> 0x8300 and 0x8304 to it to pass to setup_indirect_pci as the >> cfg_addr, and cfg_data addresses. >> >> I'm more than willing to change mpc83xx_add_bridge to not use >> get_immrbase. One simple solution is to pass the cfg_addr and >> cfg_data addresses in. If that seems ok then thats what I will do. > > We should really be putting those addresses in the "reg" property of > the PCI node. > > -Scott > Yes, which is what fsl_add_bridge does it. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:05 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree Grant Likely 2008-08-05 21:05 ` Grant Likely @ 2008-08-05 21:08 ` Scott Wood 2008-08-05 21:12 ` Grant Likely 1 sibling, 1 reply; 18+ messages in thread From: Scott Wood @ 2008-08-05 21:08 UTC (permalink / raw) To: Grant Likely; +Cc: linuxppc-dev, John Rigby Grant Likely wrote: > Is it not sufficient to search the tree for a node with the > <chip>-immr compatible value? I don't think this is the intended use > case of aliases. That get's really annoying in code that is meant to deal with multiple chips. I don't think finding the network or serial node that corresponds to u-boot's enumeration is what it's meant for, either, but pretty much any alternative you can come up with has someone saying that it's not what *that* was meant for, either. -Scott ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:08 ` Scott Wood @ 2008-08-05 21:12 ` Grant Likely 2008-08-05 21:19 ` Scott Wood 0 siblings, 1 reply; 18+ messages in thread From: Grant Likely @ 2008-08-05 21:12 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev, John Rigby On Tue, Aug 5, 2008 at 3:08 PM, Scott Wood <scottwood@freescale.com> wrote: > Grant Likely wrote: >> >> Is it not sufficient to search the tree for a node with the >> <chip>-immr compatible value? I don't think this is the intended use >> case of aliases. > > That get's really annoying in code that is meant to deal with multiple > chips. I don't think finding the network or serial node that corresponds to > u-boot's enumeration is what it's meant for, either, but pretty much any > alternative you can come up with has someone saying that it's not what > *that* was meant for, either. But finding nodes that meet a criteria *is* what compatible is for and there is precedence for it. All u-boot platforms are finding the node by path right now, and so all of them need to be changed. Changing them to find by compatible that is set per-board or per-SoC makes complete sense to me. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:12 ` Grant Likely @ 2008-08-05 21:19 ` Scott Wood 2008-08-05 23:46 ` Anton Vorontsov 0 siblings, 1 reply; 18+ messages in thread From: Scott Wood @ 2008-08-05 21:19 UTC (permalink / raw) To: Grant Likely; +Cc: linuxppc-dev, John Rigby Grant Likely wrote: > But finding nodes that meet a criteria *is* what compatible is for and > there is precedence for it. All u-boot platforms are finding the node > by path right now, and so all of them need to be changed. Changing > them to find by compatible that is set per-board or per-SoC makes > complete sense to me. It is ridiculous to have to duplicate code (or create a table, or whatever) just so it can search for mpc8536-foo, mpc8544-foo, mpc8548-foo, etc -- and in the case of the SoC, it's *not* fully compatible, so we *can't* pick one as the "default" -- but it's compatible for the purposes of the code in question. I figured an alias would attract fewer flames than a compatible of "fsl,immr" (though I'm fine with it -- it's specifying compatibility of device tree binding, not of the hardware). And no, they're not all finding it by path now -- there's a lot of use of device_type "soc", which is what we're trying to avoid by introducing this alias. The bootwrapper is also affected. -Scott ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree. 2008-08-05 21:19 ` Scott Wood @ 2008-08-05 23:46 ` Anton Vorontsov 0 siblings, 0 replies; 18+ messages in thread From: Anton Vorontsov @ 2008-08-05 23:46 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev, John Rigby On Tue, Aug 05, 2008 at 04:19:44PM -0500, Scott Wood wrote: > Grant Likely wrote: >> But finding nodes that meet a criteria *is* what compatible is for and >> there is precedence for it. All u-boot platforms are finding the node >> by path right now, and so all of them need to be changed. Changing >> them to find by compatible that is set per-board or per-SoC makes >> complete sense to me. > > It is ridiculous to have to duplicate code (or create a table, or > whatever) just so it can search for mpc8536-foo, mpc8544-foo, > mpc8548-foo, etc -- and in the case of the SoC, it's *not* fully > compatible, so we *can't* pick one as the "default" -- but it's > compatible for the purposes of the code in question. > > I figured an alias would attract fewer flames than a compatible of > "fsl,immr" (though I'm fine with it -- it's specifying compatibility of > device tree binding, not of the hardware). > > And no, they're not all finding it by path now -- there's a lot of use > of device_type "soc", which is what we're trying to avoid by introducing > this alias. The bootwrapper is also affected. FWIW, recent u-boot also looks for "fsl,soc" compatible entry. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists. 2008-08-05 20:13 [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree John Rigby @ 2008-08-05 20:43 ` Arnd Bergmann 2008-08-05 20:49 ` Scott Wood 2008-08-06 3:41 ` Stephen Rothwell 2 siblings, 1 reply; 18+ messages in thread From: Arnd Bergmann @ 2008-08-05 20:43 UTC (permalink / raw) To: linuxppc-dev; +Cc: John Rigby On Tuesday 05 August 2008, John Rigby wrote: > This will allow the eventual removal of device_type = "soc" > properties in soc nodes. Stupid question, but why not remove immrbase instead? It seems that all users can be converted to use a reg property of some actual device instead of making assumptions about the register layout of the whole SOC. Arnd <>< ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists. 2008-08-05 20:43 ` [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists Arnd Bergmann @ 2008-08-05 20:49 ` Scott Wood 2008-08-05 20:50 ` Kumar Gala 2008-08-05 21:08 ` Grant Likely 0 siblings, 2 replies; 18+ messages in thread From: Scott Wood @ 2008-08-05 20:49 UTC (permalink / raw) To: Arnd Bergmann; +Cc: linuxppc-dev, John Rigby Arnd Bergmann wrote: > On Tuesday 05 August 2008, John Rigby wrote: >> This will allow the eventual removal of device_type = "soc" >> properties in soc nodes. > > Stupid question, but why not remove immrbase instead? > > It seems that all users can be converted to use a reg > property of some actual device instead of making assumptions > about the register layout of the whole SOC. That wouldn't eliminate the need for the alias, though -- u-boot needs to find the node to fill in properties. -Scott ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists. 2008-08-05 20:49 ` Scott Wood @ 2008-08-05 20:50 ` Kumar Gala 2008-08-05 21:08 ` Grant Likely 1 sibling, 0 replies; 18+ messages in thread From: Kumar Gala @ 2008-08-05 20:50 UTC (permalink / raw) To: John Rigby; +Cc: Scott Wood, linuxppc-dev list, Arnd Bergmann On Aug 5, 2008, at 3:49 PM, Scott Wood wrote: > Arnd Bergmann wrote: >> On Tuesday 05 August 2008, John Rigby wrote: >>> This will allow the eventual removal of device_type = "soc" >>> properties in soc nodes. >> Stupid question, but why not remove immrbase instead? >> It seems that all users can be converted to use a reg >> property of some actual device instead of making assumptions >> about the register layout of the whole SOC. > > That wouldn't eliminate the need for the alias, though -- u-boot > needs to find the node to fill in properties. While I have no issue with the change. I'm interested to see how John plans on using this in u-boot. - k ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists. 2008-08-05 20:49 ` Scott Wood 2008-08-05 20:50 ` Kumar Gala @ 2008-08-05 21:08 ` Grant Likely 1 sibling, 0 replies; 18+ messages in thread From: Grant Likely @ 2008-08-05 21:08 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev, devicetree-discuss, John Rigby, Arnd Bergmann On Tue, Aug 5, 2008 at 2:49 PM, Scott Wood <scottwood@freescale.com> wrote: > Arnd Bergmann wrote: >> >> On Tuesday 05 August 2008, John Rigby wrote: >>> >>> This will allow the eventual removal of device_type = "soc" >>> properties in soc nodes. >> >> Stupid question, but why not remove immrbase instead? >> >> It seems that all users can be converted to use a reg >> property of some actual device instead of making assumptions >> about the register layout of the whole SOC. > > That wouldn't eliminate the need for the alias, though -- u-boot needs to > find the node to fill in properties. (already made this comment on one of the later patches, but it is more relevant here...) I don't think that using aliases is the best solution. I'd rather see U-Boot search for the appropriate compatible value for the IMMR node. g. > > -Scott > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists. 2008-08-05 20:13 [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree John Rigby 2008-08-05 20:43 ` [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists Arnd Bergmann @ 2008-08-06 3:41 ` Stephen Rothwell 2 siblings, 0 replies; 18+ messages in thread From: Stephen Rothwell @ 2008-08-06 3:41 UTC (permalink / raw) To: John Rigby; +Cc: linuxppc-dev [-- Attachment #1: Type: text/plain, Size: 578 bytes --] Hi John, [From further in the discussion, this may no longer be relevant ...] On Tue, 5 Aug 2008 14:13:37 -0600 John Rigby <jrigby@freescale.com> wrote: > > - soc = of_find_node_by_type(NULL, "soc"); > + /* > + * First look for an immr alias > + */ > + np = of_find_node_by_name(NULL, "/aliases"); > + if (np) { > + path = of_get_property(np, "immr", NULL); > + if (path) > + soc = of_find_node_by_name(NULL, path); of_node_put(np); > + } -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2008-08-06 3:41 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-05 20:13 [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 3/4] powerpc: 83xx: Add immr aliases to 83xx device trees John Rigby 2008-08-05 20:13 ` [PATCH add immr alias 4/4] powerpc: 8[56]xx: Add immr aliases to 8[56]xx " John Rigby 2008-08-05 21:05 ` [PATCH add immr alias 2/4] powerpc: 5121: Add immr alias to MPC5121 ADS device tree Grant Likely 2008-08-05 21:05 ` Grant Likely 2008-08-05 21:17 ` John Rigby 2008-08-05 21:20 ` Scott Wood 2008-08-05 21:38 ` John Rigby 2008-08-05 21:08 ` Scott Wood 2008-08-05 21:12 ` Grant Likely 2008-08-05 21:19 ` Scott Wood 2008-08-05 23:46 ` Anton Vorontsov 2008-08-05 20:43 ` [PATCH add immr alias 1/4] powerpc: Teach get_immrbase to use immr alias if it exists Arnd Bergmann 2008-08-05 20:49 ` Scott Wood 2008-08-05 20:50 ` Kumar Gala 2008-08-05 21:08 ` Grant Likely 2008-08-06 3:41 ` Stephen Rothwell
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).