/arch/powerpc/boot/ |
D | cuboot-hotfoot.c | 50 void *devp; in hotfoot_fixups() local 54 devp = finddevice("/plb/opb/serial@ef600300"); in hotfoot_fixups() 55 if (!devp) in hotfoot_fixups() 57 del_node(devp); in hotfoot_fixups() 59 devp = finddevice("/plb/opb/ethernet@ef600900"); in hotfoot_fixups() 60 if (!devp) in hotfoot_fixups() 62 del_node(devp); in hotfoot_fixups() 70 void *devp = finddevice("/plb/ebc/nor_flash@0"); in hotfoot_fixups() local 71 if (!devp) in hotfoot_fixups() 77 getprop(devp, "reg", regs, sizeof(regs)); in hotfoot_fixups() [all …]
|
D | serial.c | 87 void *devp; in serial_get_stdout_devp() local 91 devp = finddevice("/chosen"); in serial_get_stdout_devp() 92 if (devp == NULL) in serial_get_stdout_devp() 95 if (getprop(devp, "linux,stdout-path", path, MAX_PATH_LEN) > 0) { in serial_get_stdout_devp() 96 devp = finddevice(path); in serial_get_stdout_devp() 97 if (devp == NULL) in serial_get_stdout_devp() 100 if ((getprop(devp, "device_type", devtype, sizeof(devtype)) > 0) in serial_get_stdout_devp() 102 return devp; in serial_get_stdout_devp() 113 void *devp; in serial_console_init() local 116 devp = serial_get_stdout_devp(); in serial_console_init() [all …]
|
D | virtex.c | 28 static int virtex_ns16550_console_init(void *devp) in virtex_ns16550_console_init() argument 35 if (dt_get_virtual_reg(devp, (void **)®_base, 1) < 1) in virtex_ns16550_console_init() 38 n = getprop(devp, "reg-offset", ®_offset, sizeof(reg_offset)); in virtex_ns16550_console_init() 42 n = getprop(devp, "reg-shift", ®_shift, sizeof(reg_shift)); in virtex_ns16550_console_init() 46 n = getprop(devp, "current-speed", (void *)&spd, sizeof(spd)); in virtex_ns16550_console_init() 51 n = getprop(devp, "clock-frequency", (void *)&clk, sizeof(clk)); in virtex_ns16550_console_init() 81 void *devp; in platform_specific_init() local 85 devp = finddevice("/chosen"); in platform_specific_init() 86 if (devp == NULL) in platform_specific_init() 89 if (getprop(devp, "linux,stdout-path", path, MAX_PATH_LEN) > 0) { in platform_specific_init() [all …]
|
D | libfdt-wrapper.c | 51 #define devp_offset_find(devp) (((unsigned long)(devp))-1) argument 52 #define devp_offset(devp) (devp ? ((unsigned long)(devp))-1 : 0) argument 81 static int fdt_wrapper_getprop(const void *devp, const char *name, in fdt_wrapper_getprop() argument 87 p = fdt_getprop(fdt, devp_offset(devp), name, &len); in fdt_wrapper_getprop() 94 static int fdt_wrapper_setprop(const void *devp, const char *name, in fdt_wrapper_setprop() argument 99 rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len); in fdt_wrapper_setprop() 102 rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len); in fdt_wrapper_setprop() 108 static int fdt_wrapper_del_node(const void *devp) in fdt_wrapper_del_node() argument 110 return fdt_del_node(fdt, devp_offset(devp)); in fdt_wrapper_del_node() 113 static void *fdt_wrapper_get_parent(const void *devp) in fdt_wrapper_get_parent() argument [all …]
|
D | cuboot-85xx-cpm2.c | 25 void *devp; in platform_fixups() local 37 devp = find_node_by_devtype(NULL, "soc"); in platform_fixups() 38 if (devp) { in platform_fixups() 41 setprop(devp, "bus-frequency", &bd.bi_busfreq, in platform_fixups() 45 if (get_parent(serial) != devp) in platform_fixups() 53 devp = find_node_by_compatible(NULL, "fsl,cpm2-brg"); in platform_fixups() 54 if (devp) in platform_fixups() 55 setprop(devp, "clock-frequency", &bd.bi_brgfreq, in platform_fixups()
|
D | ops.h | 88 int ns16550_console_init(void *devp, struct serial_console_data *scdp); 89 int mpsc_console_init(void *devp, struct serial_console_data *scdp); 90 int cpm_console_init(void *devp, struct serial_console_data *scdp); 91 int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp); 92 int uartlite_console_init(void *devp, struct serial_console_data *scdp); 93 int opal_console_init(void *devp, struct serial_console_data *scdp); 108 static inline int getprop(void *devp, const char *name, void *buf, int buflen) in getprop() argument 110 return (dt_ops.getprop) ? dt_ops.getprop(devp, name, buf, buflen) : -1; in getprop() 113 static inline int setprop(void *devp, const char *name, in setprop() argument 116 return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1; in setprop() [all …]
|
D | ebony.c | 40 void *devp; in ebony_flashsel_fixup() local 45 devp = finddevice(EBONY_FPGA_PATH); in ebony_flashsel_fixup() 46 if (!devp) in ebony_flashsel_fixup() 49 if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga)) in ebony_flashsel_fixup() 55 devp = finddevice(EBONY_SMALL_FLASH_PATH); in ebony_flashsel_fixup() 56 if (!devp) in ebony_flashsel_fixup() 60 if (getprop(devp, "reg", reg, sizeof(reg)) != sizeof(reg)) in ebony_flashsel_fixup() 68 setprop(devp, "reg", reg, sizeof(reg)); in ebony_flashsel_fixup()
|
D | treeboot-walnut.c | 25 void *devp, *sram; in walnut_flashsel_fixup() local 31 devp = finddevice("/plb/ebc/fpga"); in walnut_flashsel_fixup() 32 if (!devp) in walnut_flashsel_fixup() 35 if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga)) in walnut_flashsel_fixup() 40 devp = finddevice("/plb/ebc/flash"); in walnut_flashsel_fixup() 41 if (!devp) in walnut_flashsel_fixup() 44 if (getprop(devp, "reg", reg_flash, sizeof(reg_flash)) != sizeof(reg_flash)) in walnut_flashsel_fixup() 59 setprop(devp, "reg", reg_flash, sizeof(reg_flash)); in walnut_flashsel_fixup()
|
D | mvme7100.c | 31 void *devp; in mvme7100_fixups() local 36 devp = finddevice("/soc@f1000000"); in mvme7100_fixups() 37 if (devp) in mvme7100_fixups() 38 setprop(devp, "bus-frequency", &busfreq, sizeof(busfreq)); in mvme7100_fixups() 40 devp = finddevice("/soc/serial@4500"); in mvme7100_fixups() 41 if (devp) in mvme7100_fixups() 42 setprop(devp, "clock-frequency", &busfreq, sizeof(busfreq)); in mvme7100_fixups()
|
D | mpsc.c | 104 static volatile char *mpsc_get_virtreg_of_phandle(void *devp, char *prop) in mpsc_get_virtreg_of_phandle() argument 109 n = getprop(devp, prop, &v, sizeof(v)); in mpsc_get_virtreg_of_phandle() 113 devp = find_node_by_linuxphandle((u32)v); in mpsc_get_virtreg_of_phandle() 114 if (devp == NULL) in mpsc_get_virtreg_of_phandle() 117 n = getprop(devp, "virtual-reg", &v, sizeof(v)); in mpsc_get_virtreg_of_phandle() 125 int mpsc_console_init(void *devp, struct serial_console_data *scdp) in mpsc_console_init() argument 131 n = getprop(devp, "virtual-reg", &v, sizeof(v)); in mpsc_console_init() 136 sdma_base = mpsc_get_virtreg_of_phandle(devp, "sdma"); in mpsc_console_init() 140 mpscintr_base = mpsc_get_virtreg_of_phandle(devp, "mpscintr"); in mpsc_console_init() 144 n = getprop(devp, "cell-index", &v, sizeof(v)); in mpsc_console_init()
|
D | treeboot-currituck.c | 65 void *devp = finddevice("/"); in ibm_currituck_fixups() local 70 while ((devp = find_node_by_devtype(devp, "pci"))) { in ibm_currituck_fixups() 71 if (getprop(devp, "dma-ranges", dma_ranges, sizeof(dma_ranges)) < 0) { in ibm_currituck_fixups() 79 setprop(devp, "dma-ranges", dma_ranges, sizeof(dma_ranges)); in ibm_currituck_fixups()
|
D | devtree.c | 64 void *devp = NULL; in dt_fixup_cpu_clocks() local 71 while ((devp = find_node_by_devtype(devp, "cpu"))) { in dt_fixup_cpu_clocks() 72 setprop_val(devp, "clock-frequency", cpu); in dt_fixup_cpu_clocks() 73 setprop_val(devp, "timebase-frequency", tb); in dt_fixup_cpu_clocks() 75 setprop_val(devp, "bus-frequency", bus); in dt_fixup_cpu_clocks() 83 void *devp = finddevice(path); in dt_fixup_clock() local 85 if (devp) { in dt_fixup_clock() 87 setprop_val(devp, "clock-frequency", freq); in dt_fixup_clock() 93 void *devp = find_node_by_alias(alias); in dt_fixup_mac_address_by_alias() local 95 if (devp) { in dt_fixup_mac_address_by_alias() [all …]
|
D | ofconsole.c | 25 void *devp; in of_console_open() local 27 if (((devp = of_finddevice("/chosen")) != NULL) in of_console_open() 28 && (of_getprop(devp, "stdout", &of_stdout_handle, in of_console_open()
|
D | ns16550.c | 55 int ns16550_console_init(void *devp, struct serial_console_data *scdp) in ns16550_console_init() argument 60 if (dt_get_virtual_reg(devp, (void **)®_base, 1) < 1) in ns16550_console_init() 63 n = getprop(devp, "reg-offset", ®_offset, sizeof(reg_offset)); in ns16550_console_init() 67 n = getprop(devp, "reg-shift", ®_shift, sizeof(reg_shift)); in ns16550_console_init()
|
D | ugecon.c | 114 void *devp; in ug_grab_exi_io_base() local 116 devp = find_node_by_compatible(NULL, "nintendo,flipper-exi"); in ug_grab_exi_io_base() 117 if (devp == NULL) in ug_grab_exi_io_base() 119 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) in ug_grab_exi_io_base()
|
D | opal.c | 86 int opal_console_init(void *devp, struct serial_console_data *scdp) in opal_console_init() argument 90 if (devp) { in opal_console_init() 91 int n = getprop(devp, "reg", &opal_con_id, sizeof(u32)); in opal_console_init() 105 int opal_console_init(void *devp, struct serial_console_data *scdp) in opal_console_init() argument
|
D | cuboot-c2k.c | 33 void *devp, *mv64x60_devp; in c2k_bridge_setup() local 62 devp = NULL; in c2k_bridge_setup() 68 devp = find_node_by_alias(name); in c2k_bridge_setup() 69 if (devp == NULL) in c2k_bridge_setup() 79 rc = getprop(devp, "ranges", v, sizeof(v)); in c2k_bridge_setup() 106 if (!dt_xlate_addr(devp, buf, sizeof(buf), &cpu_base)) in c2k_bridge_setup()
|
D | uartlite.c | 60 int uartlite_console_init(void *devp, struct serial_console_data *scdp) in uartlite_console_init() argument 65 n = getprop(devp, "virtual-reg", ®_base, sizeof(reg_base)); in uartlite_console_init() 67 if (!dt_xlate_reg(devp, 0, ®_phys, NULL)) in uartlite_console_init()
|
D | cpm-serial.c | 198 int cpm_console_init(void *devp, struct serial_console_data *scdp) in cpm_console_init() argument 207 if (dt_is_compatible(devp, "fsl,cpm1-smc-uart")) { in cpm_console_init() 209 } else if (dt_is_compatible(devp, "fsl,cpm2-scc-uart")) { in cpm_console_init() 211 } else if (dt_is_compatible(devp, "fsl,cpm2-smc-uart")) { in cpm_console_init() 229 if (getprop(devp, "fsl,cpm-command", &cpm_cmd, 4) < 4) in cpm_console_init() 232 if (dt_get_virtual_reg(devp, vreg, 2) < 2) in cpm_console_init() 242 parent = get_parent(devp); in cpm_console_init()
|
D | mv64x60.c | 536 void *devp; in mv64x60_get_bridge_pbase() local 538 devp = find_node_by_compatible(NULL, "marvell,mv64360"); in mv64x60_get_bridge_pbase() 539 if (devp == NULL) in mv64x60_get_bridge_pbase() 541 if (getprop(devp, "reg", v, sizeof(v)) != sizeof(v)) in mv64x60_get_bridge_pbase() 554 void *devp; in mv64x60_get_bridge_base() local 556 devp = find_node_by_compatible(NULL, "marvell,mv64360"); in mv64x60_get_bridge_base() 557 if (devp == NULL) in mv64x60_get_bridge_base() 559 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) in mv64x60_get_bridge_base() 571 void *devp; in mv64x60_is_coherent() local 573 devp = finddevice("/"); in mv64x60_is_coherent() [all …]
|
D | mpc52xx-psc.c | 52 int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp) in mpc5200_psc_console_init() argument 55 if (dt_get_virtual_reg(devp, &psc, 1) < 1) in mpc5200_psc_console_init()
|
D | mv64x60_i2c.c | 186 void *devp; in mv64x60_i2c_open() local 188 devp = find_node_by_compatible(NULL, "marvell,mv64360-i2c"); in mv64x60_i2c_open() 189 if (devp == NULL) in mv64x60_i2c_open() 191 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) in mv64x60_i2c_open()
|
D | 4xx.c | 174 void *devp; in ibm4xx_denali_get_cs() local 178 devp = finddevice("/"); in ibm4xx_denali_get_cs() 179 if (!devp) in ibm4xx_denali_get_cs() 182 if (getprop(devp, "model", model, sizeof(model)) <= 0) in ibm4xx_denali_get_cs() 309 void *devp; in ibm4xx_fixup_ebc_ranges() local 327 devp = finddevice(ebc); in ibm4xx_fixup_ebc_ranges() 328 if (! devp) in ibm4xx_fixup_ebc_ranges() 331 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32)); in ibm4xx_fixup_ebc_ranges()
|